<?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=utf-8"/>
<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" />
	<input type="hidden" name="id" value="<?php echo $id;?>" />
	<input type="hidden" name="info[dir]" value="<?php echo $ypinfo['dir'];?>" />
	<input type="hidden" name="userid" value="<?php echo $ypinfo['memberid'];?>" />
	<table cellspacing="0" class="sub" width="98%">
		<tr>
			<td width="262" align="right">黄页类型：</td>
			<td>
			<?php echo js_selectmenu('yp','typeid','info',$ypinfo['typeid']);?>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">黄页名称：</td>
			<td>
			<input type="text" datatype="limit" min="1" max="100" value="<?php echo $ypinfo['name'];?>" size="35" name="info[name]" /> 黄页目录：<input type="text" datatype="limit" min="1" value="<?php echo $ypinfo['dir'];?>" max="30" size="6" disabled="disabled" /><span>不可更改!</span>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">黄页LOGO：</td>
			<td>
			<?php echo $form->image('logo',$ypinfo['logo']);?>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">黄页Banner：</td>
			<td>
			<?php echo $form->image('banner',$ypinfo['banner']);?>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">绑定域名：</td>
			<td>
			<input type="text" size="45" value="<?php echo $ypinfo['domain'];?>" 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" value="<?php echo $ypinfo['meta_title'];?>" 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" value="<?php echo $ypinfo['meta_keywords'];?>" 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"><?php echo $ypinfo['meta_description'];?></textarea>
			</td>
		</tr>
		<tr>
			<td width="262" align="right">竞价排名：</td>
			<td>
			<input type="text" datatype="number" value="<?php echo $ypinfo['seo'];?>" size="4" name="info[seo]" />
			</td>
		</tr>
		<tr>
			<td width="262" align="right">开放时间：</td>
			<td>
			<input type="text" size="35" value="<?php echo $ypinfo['opentime'];?>" name="info[opentime]" />
			</td>
		</tr>
		<tr>
			<td width="262" align="right">地图方位：</td>
			<td>
			<?php echo $form->map('map',$ypinfo['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]" <?php echo $ypinfo['istop']?'checked="checked"':'';?> value="1" />是
			<input type="radio" name="info[istop]" <?php echo !$ypinfo['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>