<!DOCTYPE html>
<html lang="zh-CN" class="index_page">
<head>
	<?php include mymps_tpl('header');?>
	<title>发布信息 - <?=$mymps_global[SiteName]?></title>
	<link type="text/css" rel="stylesheet" href="template/css/global.css">
	<link type="text/css" rel="stylesheet" href="template/css/style.css">
	<link type="text/css" rel="stylesheet" href="template/css/post.css">
	<script src="template/js/jq.min.js"></script>
</head>
<body>

	<?php include mymps_tpl('header_search');?>	

	<?php if($areaid){?>
		<form id="form1" method="post" enctype="multipart/form-data" action="index.php?mod=post&catid=<?=$catid?>">
		<input name="areaid" type="hidden" value="<?=$areaid?>">
		<input name="action" type="hidden" value="post">
		<input type="hidden" value="<?=$mixcode?>" name="mixcode"/>
			<ul class="list">		
				<li class="item">
					<div class="title"><span><font style="color:#FF0000;">* </font>地区：</span></div>
					<div class="input"><?php echo $areaname; ?> &nbsp;&nbsp;&nbsp;<a href="index.php?mod=post&catid=<?=$catid?>">(重选)</a></div>
				</li>
				
				<li class="item">
					<div class="title"><span><font style="color:#FF0000;">* </font>标题：</span></div>
					<div class="input"><input name="title" type="text" size="26" value="" /></div>
				</li>
				
				<?php 
				if(is_array($show_mod_option)){
				foreach($show_mod_option as $k => $v){?>
				<li class="item">
					<div class="title"><span><?php if($v['required'] == 1){?><font style="color:#FF0000;">* </font><?php }?><?php echo $v['title']; ?></strong>：</span></div>
					<div class="inputs"><?php echo $v['value']; ?></div>
				</li>
				<?php }
				}?>
				
				<li class="item">
					<div class="title"><span><font style="color:#FF0000;">* </font>内容：</span></div>
					<div class="input"><textarea name="content" style="width:100%; height:70px;"></textarea></div>
				</li>
				
				<li class="item">
					<div class="title"><span><font style="color:#FF0000;">* </font>联系人：</span></div>
					<div class="input"><input name="contact_who" type="text" size="26" value="<?=$contact_who?>" /></div>
				</li>
				
				<li class="item">
					<div class="title"><span><font style="color:#FF0000;">* </font>联系电话：</span></div>
					<div class="input"><input name="tel" type="text" size="26" value="<?=$tel?>" /></div>
				</li>
				
				<li class="item">
					<div class="title"><span>联系QQ：</span></div>
					<div class="input"><input name="qq" type="text" size="26" value="<?=$qq?>" /></div>
				</li>

				<?php if($upload_img){?>	
				<!--li class="item">
					<div class="title"><span>添加照片：</span></div>
					<div class=""><?=$upload_img?></div>
				</li-->
				<?php }?>

				<?php if($mobile_settings['authcode'] == 1){?>
				<li class="item">
					<div class="title"><span><font style="color:#FF0000;">* </font>验证码：</span></div>
					<div class="input"><input name="checkcode" type="text" size="26" /><img src="<?php echo $mymps_global['SiteUrl']?>/<?php echo $mymps_global['cfg_authcodefile']?>" alt="看不清，请点击刷新" width="70" height="25" align="absmiddle" style="cursor:pointer;" onClick="this.src=this.src+'?'"/></div>
				</li>
				<?php }?>
			</ul>
			<div class="post"><input type="submit" name="button" id="button" value="点击发布" /></div>
		  </form>
		  
	<?php }else{ ?>
	
		<?php if(is_array($cat_list)){?>
	
		<?php foreach($categories as $k => $v){?>
		<dl class="business">
			<dt class="house" style="background:url(<?=$mymps_global[SiteUrl]?>/<?=$v[icon]?>) 10px 7px no-repeat;">发布<?=$v[catname]?>信息</dt>
			<dd>
				<?php foreach($v[children] as $x => $c){?>
				<a href="index.php?mod=post&catid=<?=$c['catid']?>&areaid=1"><?=$c[catname]?></a>
				<?php }?>
			</dd>
		</dl>
		<?php }?>
		
		<?php }else{?>	
		<dl class="business exp">
			<dt class="house" style="background:url(<?=$mymps_global[SiteUrl]?>/template/default/images/login/arrow.gif) 10px 10px no-repeat;background-size: 28px 27px;">选择地区</dt>
			<dd>
			<?php foreach($area_list as $k => $v){?>
			  <a href="index.php?mod=post&catid=<?=$catid?>&areaid=<?=$v[areaid]?>"><?=$v[areaname]?></a>
			<?php }?>
			</dd>
		</dl>
		<?php }?>
		
	<?php }?>

	<script type="text/javascript">
	(function () {
		$('.business dt').bind('click', function () {
			var $this = $(this).parent();
			if ($this.hasClass('exp')) {
				$this.removeClass('exp');
			} else {
				var scrollTop = document.body.scrollTop;
				$this.addClass('exp');
				window.scrollTo(0, scrollTop);
			}
		});
	}());
	</script>
	<?php include mymps_tpl('footer');?>
</body>
</html>