<!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=gbk" />
<title><?=$page_title?></title>
<link rel="shortcut icon" href="<?=$mymps_global[SiteUrl]?>/favicon.ico" />
<link rel="stylesheet" type="text/css" href="<?=$mymps_global[SiteUrl]?>/template/default/css/global.css" />
<link rel="stylesheet" type="text/css" href="<?=$mymps_global[SiteUrl]?>/template/default/css/style.css" />
<? if($mymps_global[bodybg] == 1){?><link rel="stylesheet" href="<?=$mymps_global[SiteUrl]?>/template/default/css/bodybg.css" /><? }?>
<link rel="stylesheet" type="text/css" href="<?=$mymps_global[SiteUrl]?>/template/default/css/post.css" />
<script src="<?=$mymps_global[SiteUrl]?>/template/default/js/global.js" type="text/javascript"></script>
<script src="<?=$mymps_global[SiteUrl]?>/template/default/js/jquery.min.js" type="text/javascript"></script>
<script src="<?=$mymps_global[SiteUrl]?>/template/default/js/validator.common.js" type="text/javascript"></script> 
<script src="<?=$mymps_global[SiteUrl]?>/template/default/js/validator.js" type="text/javascript"></script>
<script src="<?=$mymps_global[SiteUrl]?>/template/default/js/post.js" type="text/javascript"></script> 
<? if($onload || $cat[if_mappoint] == 1){?>
<script language="javascript">var current_domain = '<?=$mymps_global[SiteUrl]?>';</script>
<script language="javascript" src="<?=$mymps_global[SiteUrl]?>/template/global/messagebox.js"></script>
<? }?>
<script type="text/javascript">
window.history.go(1);
</script>
</head>

<body class="<?=$mymps_global[cfg_tpl_dir]?>" onload="<?=$onload?>">
<? include mymps_tpl('inc_head_post');?>
<div class="body1000">
	<div class="clear15"></div>
	<div class="wrapper" id="main">
		<? if($post[action] == 'edit'){?>
		<div class="step2">
		<span><font class="number">1</font> 输入管理密码</span>
		<span class="cur"><font class="number">2</font> 填写信息内容</span>
		<span><font class="number">3</font> 完成信息修改</span>
		</div>
		<? }else{?>
		<div class="step2">
		<span><font class="number">1</font> 选择信息分类 <a onClick="if(!confirm('重选分类将清空您当前填写的数据，您确定要重选分类吗？'))return false;" href="?action=input&cityid=<?=$city[cityid]?>">(重选)</a></span>
		<span class="cur"><font class="number">2</font> 填写信息内容</span>
		<span><font class="number">3</font> 发布成功</span>
		</div>
		<? }?>
		<div id="fenlei2">
		<div class='publish-detail'>
		<div style="display:none;">
            <iframe width=0 height=0 src='' id="iframe_area" name="iframe_area"></iframe> 
            <iframe width=0 height=0 src='' id="iframe_street" name="iframe_street"></iframe> 
            <form method="post" target="iframe_area" id="form_area"></form>
        </div>
        <form name="form1" method="post" enctype="multipart/form-data" onSubmit="return postcheck();" action="<?=$mymps_global[cfg_postfile]?>?action=<?=$post[action]?>">
        <input name="act" value="dopost" type="hidden">
        <input name="ismember" value="<?=$post[ismember]?>" type="hidden">
        <input name="catid" value="<?=$post[catid]?>" type="hidden">
        <input name="id" value="<?=$post[id]?>" type="hidden">
		<input name="mixcode" value="<?=$post[mixcode]?>" type="hidden">	
		
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  所属分类：</label>
			<div class="publish-detail-item">
				<?=$cat[parentname]?> > <?=$cat[catname]?> &nbsp;&nbsp;<? if($post[action] != 'edit'){?><a onClick="if(!confirm('更改分类将清空您当前填写的数据，您确定要更改分类吗？'))return false;" href="?action=input&cityid=<?=$city[cityid]?>">更改分类</a><? }?>
			</div>
		</div>
		<? if($cat_option){?>
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  下属分类：</label>
			<div class="publish-detail-item">
				<select name="catid" class="input" require="true" datatype="limit" msg="请选择下属分类" onChange="location.href='?cityid=<?=$cityid?>&catid='+(this.options[this.selectedIndex].value)">
					<option value="">请选择所属分类</option>
					<? foreach($cat_option as $k =>$v){?>
					<option value="<?=$v[catid]?>"><?=$v[catname]?></option>
					<? }?>
				</select>
			</div>
		</div>		
		<? }else{?>
		<input name="catid" value="<?=$post[catid]?>" type="hidden">
		<? }?>
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  所属地区：</label>
			<div class="publish-detail-item">
				<?=$post[select_where_option]?>
				<span id="地区" style="margin-top:-12px;*margin-top:-17px;"></span>
			</div>
		</div>	
		<div class="clearfix"></div>
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  有效期：</label>
			<div class="publish-detail-item">
				<?=$post[GetInfoLastTime]?>
			</div>
		</div>	
		
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  信息标题：</label>
			<div class="publish-detail-item">
				<input type="text" maxlength="50" name="title" class="input input-60" value="<?=$post[title]?>" require="true" datatype="limit" msg="信息标题不能为空"/>
			</div>
		</div>
		<? if($cat[if_mappoint] == 1){?>
		<div class="p-line">
			<label class="p-label">地理位置：</label>
			<div class="publish-detail-item">
				<input name="markmap" type="button" value="点击标注" class="mappoint" onclick="setbg('地图标注',500,410,'map.php?action=markpoint&width=500&height=310&p=<?=$post[mappoint]?>&cityname=<?=$city[citypy]?>')">
				<input id="mappoint" type="text" maxlength="25" name="mappoint" class="input input-small" value="<?=$post[mappoint]?>" /> 
			</div>
		</div>
		<? }?>
		<? foreach($post[mymps_extra_value] as $k =>$v){?>
		<div class="p-line">
			<label class="p-label"><? if($v[required] == 1){?><span class="red required">*</span><? }?><?=$v[title]?>：</label>
			<div class="publish-detail-item">
				<?=$v[value]?> <span id="<?=$v[title]?>"></span>
			</div>
		</div>
		<? }?>
		<? if($post[upload_img]){?>
		<div class="p-line">
			<label class="p-label">上传图片：</label>
			<div class="publish-detail-item">
				<span class="contentinner">
				<?=$post[upload_img]?>
				</span>
			</div>
		</div>
		<? }?>
		
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  内容详情：</label>
			<div class="publish-detail-item">
				<span class="contentinner"><?=$acontent?></span><span id="content"></span>
			</div>
		</div>
		
		<div class="contact">
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  联系人：</label>
			<div class="publish-detail-item">
				<input name="contact_who" type="text" class="input input-large" value="<?=$post[contact_who]?>" require="true" datatype="limit" msg="请填写联系人姓名"/>
			</div>
		</div>
		
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  联系电话：</label>
			<div class="publish-detail-item">
				<input name="tel" type="text" class="input input-large" value="<?=$post[mobile]?>" datatype="limit" require="true" msg="固话或手机，固话格式如010-123456">
			</div>
		</div>
		
		<div class="p-line">
			<label class="p-label">  联系QQ：</label>
			<div class="publish-detail-item">
				<input name="qq" type="text" class="input input-large" value="<?=$post[qq]?>" require="qq" datatype="qq" msg="请填写准确的QQ号，形式如123456"/>
			</div>
		</div>
		
		<div class="p-line">
			<label class="p-label">电子邮箱：</label>
			<div class="publish-detail-item">
				<input name="email" type="text" class="input input-large" value="<?=$post[email]?>" require="email" datatype="email" msg="请填写准确的电子邮箱帐号">
			</div>
		</div>
		</div>
		<? if($post[action] == 'input' && $post[ismember] != 1){?>
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  管理密码：</label>
			<div class="publish-detail-item">
				<input name="manage_pwd" type="text" class="input input-small" value="" datatype="limit" require="true" msg="请填写该信息的管理密码"> 
			</div>
		</div>
		<? }elseif($post[action] == 'edit' && $post[ismember] != 1){?>
		<div class="p-line">
			<label class="p-label">  管理密码：</label>
			<div class="publish-detail-item">
				<input name="manage_pwd" type="text" class="input input-small" value=""> <font style="font-size:12px; line-height:32px;"> 若不修改密码，请留空</font>
			</div>
		</div>
		<? }?>
		
		<? if($post[imgcode]){?>
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  验证码：</label>
			<div class="publish-detail-item">
				<input name="checkcode" type="text" class="input input-small" value="" datatype="limit|ajax" require="true" msg="请填写验证码" url="<?=$mymps_global[SiteUrl]?>/javascript.php?part=chk_authcode" msgid="code">
				<img src="<?=$mymps_global[SiteUrl]?>/<?=$mymps_global[cfg_authcodefile]?>" title="看不清，请点击刷新" width="80" height="25" align="absmiddle" style="cursor:pointer;" onClick="this.src=this.src+'?'" class="authcode"/><span id="code"></span>
			</div>
		</div>
		<? }?>
		
		<? if($checkquestion){?>
		<div class="p-line">
			<label class="p-label"><span class="red required">*</span>  验证问答：</label>
			<div class="publish-detail-item">
				<input name="checkquestion[answer]" value="" type="text" msgid="wer" class="input input-small" datatype="limit|ajax" require="true" msg="请填写验证问题的答案" url="<?=$mymps_global[SiteUrl]?>/javascript.php?part=chk_answer&id=<?=$checkquestion[id]?>"/>
				<div class="qfont"><?=$checkquestion[question]?></div>
				<span id="wer"></span><input name="checkquestion[id]" type="hidden" value="<?=$checkquestion[id]?>"/> 
			</div>
		</div>
		<? }?>
	
		<p class='p-submit'>
		<input type="submit" id="fabu" class="fabu1" value="马上发布" ct="submit" onclick="return AllInputCheck();"/>
		</p>
		<div class="clear"></div>
		<div id='formsubmittips' class='small p-submit'>
		<div id="divTxt" style="display:none"><span style="color:red"><strong>已经上传的图片有：</strong></span><br></div>
		信息填写越完整详细，越能提高排名增加可信度！<br />您的IP是：<span style="color:red"><?=$post[ip]?></span>，请不要发布虚假信息、重复信息
		</div>
		</form>
		</div>
		</div>
	</div>
	<div class="clear"></div>
	<? include mymps_tpl('inc_foot_about');?>
</div>
<script language="javascript" type="text/javascript" src="<?=$mymps_global[SiteUrl]?>/template/default/js/validator3.js"></script> 
</body>
</html>