<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
	if(!$module->roleid_check('yp',$_roleid))showmsg_nourl($lang['RETURN_NOPRI']);
?>
<!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>
<title>黄页管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk"/>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="admin/template/css/style.css" />
<script type="text/javascript" src="images/js/jquery.min.js"></script>
<script language="javascript" src="admin/template/js/css.js"></script>
<script src="images/js/check.func.js"></script>
<script language="javascript" type="text/javascript">
	$(document).ready(function(){
		checkForm(0);
	});
</script>
</head>
<body>
<div id="wrap">
	<div class="tab">
		<ul>
			<li><a href="?file=yp&mod=yp&action=manage">黄页管理</a></li>
			<li><a href="javascript:void(0);" class="on">添加黄页</a></li>			
		</ul>
	</div>
	<div class="main">
	<fieldset>
		<legend><?php echo $lang['RETURN_TIPS'];?></legend>
		1：黄页名称不能为空； 2：黄页排序应为数字。
	</fieldset>
	<form action="" method="post" name="myform">
	<input type="hidden" name="do_submit" value="1" />
	<table cellspacing="0" class="sub" width="98%">
		<tr>
			<td width="262" align="right">会 员 名：</td>
			<td width="1006">
			<input type="text"  name="info[username]" datatype="limit" min="1" max="30" size="25" value="<?php echo $info['username'];?>" />
		  </td>
		</tr>
		<tr>
			<td width="262" align="right">会员密码：</td>
			<td>
			<input type="password" size="25" datatype="limit" min="1" max="30"  name="info[password]" />
			</td>
		</tr>
		<tr>
			<td width="262" align="right">电子邮箱：</td>
			<td>
			<input type="text" datatype="email" size="25" name="info[email]" />
			</td>
		</tr>
		<tr>
			<td width="262" align="right">黄页类型：</td>
			<td>
			<?php echo js_selectmenu('yp','typeid');?>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">黄页名称：</td>
			<td>
			<input type="text" datatype="limit" min="1" max="100" size="35" name="info[name]" />
			</td>
		</tr>
		<tr>
			<td width="262" align="right">黄页目录：</td>
			<td> 
			<input type="text" datatype="table" size="10" name="info[dir]" />
			<span>由1-30位字母、数字、下划线组成!</span>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">黄页LOGO：</td>
			<td>
			<?php echo $form->image('logo');?>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">黄页Banner：</td>
			<td>
			<?php echo $form->image('banner');?>
			</td>
		</tr>
		<tr id="textdomain" style="display:none">
			<td width="262" align="right">绑定域名：</td>
			<td>
			<input type="text" size="35" name="info[domain]" />
			<span>无需绑定请留空</span>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">Meta_title：</td>
			<td>
			<input type="text" datatype="max" max="255" size="45" name="info[meta_title]" />
			</td>
		</tr>
		<tr>
			<td width="262" align="right">Meta_keywords：</td>
			<td>
			<input type="text" datatype="max" max="100" size="30" name="info[meta_keywords]" />
			</td>
		</tr>
		<tr>
			<td width="262" align="right">Meta_description：</td>
			<td>
			<textarea datatype="max" max="255" name="info[meta_description]" rows="6" cols="60"></textarea>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">竞价排名：</td>
			<td>
			<input type="text" datatype="number" value="0" size="4" name="info[seo]" />
			</td>
		</tr>
		<tr>
			<td width="262" align="right">开放时间：</td>
			<td>
			<input type="text" size="35" value="8:00——18:00" name="info[opentime]" />
			</td>
		</tr>
		<tr>
			<td width="262" align="right">地图方位：</td>
			<td>
			<?php echo $form->map('map');?>
			</td>
		</tr>
		<?php if($forms)foreach($forms as $val){ ?>
		<tr>
			<td width="262" align="right" valign="top"><?php echo $val['name'];?>：</td>
			<td>
			<?php echo $val['form'];?> <?php echo $val['unit']?$val['unit']:'';?>
			<span><?php echo $val['tips'];?></span>
			</td>
		</tr>
		<?php }?>
		<tr>
			<td width="262" align="right">推荐显示：</td>
			<td>
			<input type="radio" name="info[istop]" value="1" />是
			<input type="radio" name="info[istop]" checked="checked" value="0" />否
			</td>
		</tr>
		<tr class="bg2"><td></td><td><input type="button" class="button" onclick="doSubmit(this);" value="保存黄页" /> <input type="button" class="button" onclick="window.location.href='<?php echo ADMIN_FILE;?>?file=yp&mod=yp&action=manage'" value="取消返回" /></td></tr>
	</table>
	</form>

	</div>
</div>
</body>
</html>