<?php
/**
 * 拒绝直接访问模板
 */ 
if(ZIBANMA_SYS_LINK != 'zibanma_com'){
	die('access deny');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>main</title>
<link href="/template/admin/style/style.css" rel="stylesheet" type="text/css"/>
<script src="/library/jquery/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="/library/editor/kindeditor-min.js" type="text/javascript"></script>
<script src="/library/js/zibanma.admin.js" type="text/javascript"></script>
<script type="text/javascript">
zibanma.adminLoadSimpleEditer();
zibanma.userIsExists = function(user){
	if(user!=''){
		var url = '<?php echo $user_is_exists_post_url;?>';
		$.post(url, {'user':user}, function(data){
			try{var json=eval(data);}catch(e){}
			if(json){
				if(json.status=='success'){
					$('#user_is_exists_span').html('');
					$('#zibanma_category_list').css('display','');
					$('#submit').attr('disabled', false);
				}else{
					$('#user_is_exists_span').html('<font style="color:#ff0000;">* 用户不存在</font>');
				}
			}
		});
	}else{
		$('#user_is_exists_span').html('<font style="color:#ff0000;">* 请输入正确用户名</font>');
	}
}
</script>
</head>
<body id="main">
	<div class="body">
		<div class="title"><?php echo $menu_name;?></div>
		<div class="content">
			<form action="" method="post">
			<table>
				<tr>
					<td colspan="2">本操作将直接添加相册至用户帐号下</td>
				</tr>
				<tr>
					<td style="text-align:right;">所属用户：</td>
					<td><input type="text" id="create_user" name="create_user" class="input" onblur="zibanma.userIsExists(this.value);" /> <span id="user_is_exists_span">* 输入用户名</span></td>
				</tr>
				<tr id="zibanma_category_list" style="display:none;">
					<td style="text-align:right;">选择分类：</td>
					<td>
						<select name="category" class="select">
							<?php
							if($album_list):
								foreach ($album_list as $ak=>$av):
							?>
							<option value="<?php echo $av->id;?>"><?php echo $av->category_name;?></option>
							<?php 
								endforeach;
							endif;
							?>
						</select>
					</td>
				</tr>
				<tr>
					<td style="text-align:right;">相册名称：</td>
					<td><input type="text" name="title" class="input" /></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>优化选项，多个关键词以半角逗号 , 隔开</td>
				</tr>
				<tr>
					<td style="text-align:right;">相册关键词：</td>
					<td><textarea name="keywords" style="width:500px; height:60px;"></textarea></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td>优化选项，说明不超过200字，请勿在说明里使用特殊符号</td>
				</tr>
				<tr>
					<td style="text-align:right;">相册说明：</td>
					<td><textarea name="description" style="width:500px; height:60px;"></textarea></td>
				</tr>
				<tr>
					<td style="text-align:right;">发布日期：</td>
					<td><input type="text" id="create_time" name="create_time" class="input" value="<?php echo date('Y-m-d H:i:s');?>" onblur="zibanma.adminCheckFromIsNull(this)" /></td>
				</tr>
				<tr>
					<td style="text-align:right;">初始点击：</td>
					<td><input type="text" name="click" class="input" value="500" /> * 本选项只可为数字</td>
				</tr>
				<tr>
					<td style="text-align:right;">相册简介：</td>
					<td><textarea name="content"></textarea></td>
				</tr>
				<tr>
					<td>&nbsp;</td>
					<td><input type="submit" id="submit" name="submit" class="button" disabled="disabled" value="确认提交" /></td>
				</tr>
			</table>
			</form>
		</div>
	</div>
</body>
</html>