<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" rel="stylesheet" href="../css/admin_css.css">
</head>
<body>
<?php
/*********
if ($action == 's') {
print <<<EOT

本次操作成功!
<script>window.history.go(-1);</script>
EOT;

}
***********************  网站参数设置  *******************************/
if ($action == 'web'){
	$charset=='utf-8' ? $charset_checked1 = 'checked' : $charset_checked2 =  'checked' ;
	!$re_onoff ? $re_onoff_checked1 = 'checked' : $re_onoff_checked2 =  'checked' ;
	!$mailsend ? $mailsend_checked1 = 'checked' : $mailsend_checked2 =  'checked' ;
	print <<<EOT
<h1>网站参数设置</h1>
<form action="?action=web&type=m" enctype="multipart/form-data" method="POST" >
网站名称: <input type="text" name="web_name" size="50" value="$web_name">

<br><br>

网站编码: 
<input type="radio" value="utf-8"   name="charset" $charset_checked1>   utf-8
<input type="radio" value="gb2312"   name="charset" $charset_checked2>  gb2312

<br><br>

网站域名: <input type="text" name="web_domin" size="50" value="$web_domin">如: www.fztt.com

<br><br>

默认模板风格: <input type="text" name="tpl_path" size="50" value="$tpl_path"> *

<br><br>

网站LOGO地址: <input type="text" name="web_logo" size="50" value="$web_logo"> *

<br><br>

管理员后台路径: <input type="text" name="admin_file" size="50" value="$admin_file"> *

<br><br>

是否开启邮件发送: 
<input type="radio" value="0"   name="mailsend" $mailsend_checked1>  否
<input type="radio" value="1"   name="mailsend" $mailsend_checked2>  是


<br><br>


管理员邮箱: <input type="text" name="admin_mail" size="50" value="$admin_mail">

<br><br>

客服QQ: <input type="text" name="services_qq" size="50" value="$services_qq">  

<br><br>


客服MSN: <input type="text" name="services_msn" size="50" value="$services_msn">  

<br><br>


客服邮箱: <input type="text" name="services_mail" size="50" value="$services_mail">  

<br><br>
是否允许注册: 
<input type="radio" value="0"   name="re_onoff" $re_onoff_checked1>  不允许
<input type="radio" value="1"   name="re_onoff" $re_onoff_checked2>  允许

<br><br>
<!--
注册说明:
<br>
<textarea cols="60" rows="5" name="re_text">$re_text</textarea>

<br><br>
-->
cookie前缀: <input type="text" name="cookie_pre" size="50" value="$cookie_pre"> *如无需要勿设置本项

<br><br>

cookie作用域: <input type="text" name="cookie_domain" size="50" value="$cookie_domain"> *如无需要勿设置本项

<br><br>

cookie路径: <input type="text" name="cookie_path" size="50" value="$cookie_path">  *如无需要勿设置本项

<br><br>


上传文件夹名称: <input type="text" name="up_dir" size="50" value="$up_dir">  *如无需要勿设置本项

<br><br>
<input type="submit" value="提 交"> 
<input type="reset" value="重 置"> 
</form>
EOT;
}
/********************************  采集记录表  *******************************/
elseif ($action == 'db'){
	print <<<EOT
	<h1>数据库设置</h1>

<form action="?action=db&type=m" enctype="multipart/form-data" method="POST" >

数据表名: <input type="text" name="db_bought" size="50" value="$db_bought">

<br><br>


数据表名: <input type="text" name="db_sell" size="50" value="$db_sell">

<br><br>


数据表名: <input type="text" name="db_rental" size="50" value="$db_rental">

<br><br>


数据表名: <input type="text" name="db_tenants" size="50" value="$db_tenants">

<br><br>
采集表名:<input type="text" name="db_rental_spider" size="50" value="$db_rental_spider">
<br>
采集记录表:
<input type="text" name="db_rental_spider_count" size="50" value="$db_rental_spider_count">
<br><br>


<input type="submit" value="提 交"> 
<input type="reset" value="重 置"> 
</form>

EOT;
}
/********************************  房产参数设置  *******************************/
elseif ($action == 'house'){
	foreach ($houseconfig_arr as $k=>$v){
		$$k = implode(',',$v);
	}
	print <<<EOT

	<h1>房产参数设置</h1>

<form action="?action=house&type=m" enctype="multipart/form-data" method="POST" >

房产名称: <input type="text" name="house_type" size="50" value="$house_type">

<br><br>


区域名称: <input type="text" name="house_regional" size="50" value="$house_regional">

<br><br>


配套设施: <input type="text" name="house_facilities" size="50" value="$house_facilities">

<br><br>


房屋结构: <input type="text" name="house_structure" size="50" value="$house_structure">

<br><br>



朝向:<input type="text" name="house_direction" size="50" value="$house_direction">
<br><br>

税:<input type="text" name="house_tax" size="50" value="$house_tax">
<br><br>


装修情况: <input type="text" name="house_renovation" size="50" value="$house_renovation">
<br><br>

高档装修是否上传图片:
<input type="text" name="house_renovation_set" size="50" value="$house_renovation_set">
<br><br>

租房类型:
<input type="text" name="house_way" size="50" value="$house_way">
<br><br>

租期:<input type="text" name="house_term" size="50" value="$house_term">
<br><br>

产权:<input type="text" name="house_rights" size="50" value="$house_rights">
<br><br>

租客要求:<input type="text" name="house_retclaim" size="50" value="$house_retclaim">
<br><br>


<input type="submit" value="提 交"> 
<input type="reset" value="重 置"> 
</form>
EOT;
}
//小区参数设置
elseif ($action == 'premises'){
	if ($type == 'm') {
		foreach ($houseconfig_arr['house_regional'] as $ks => $vs){
			$ks == $p_regional &&  $p_regional_checked = 'checked';
			$p_regional_sel .= ' <option value="'.$ks.'" '.$p_regional_checked.'>'.$vs.'</option>';
		}

		$p_oldnewflats ? $p_oldnewflats_checked2 = 'checked' : $p_oldnewflats_checked1 = 'checked' ;

		$p_green ? $p_green == 1 ? $p_green_checked2 = 'checked' : $p_green_checked3 = 'checked'  : $p_green_checked1 = 'checked' ;

		$p_scale ? $p_scale == 1 ? $p_scale_checked2 = 'checked' : $p_scale_checked3 = 'checked'  : $p_scale_checked1 = 'checked' ;

		$p_settled ? $p_settled_checked2 = 'checked'   : $p_settled_checked1 = 'checked' ;

		$p_state ? $p_state_checked2 = 'checked'   : $p_state_checked1 = 'checked' ;

		list($p_site_1,$p_site_2) = explode('|',$p_site);


		//输出
		print <<<EOT
<form action="?action=premises&type=up" enctype="multipart/form-data" method="POST" >
地产名称:<input type="text" name="p_name" size="50" value="$p_name">  <br><br>
所属地区:<select name="p_regional" >$p_regional_sel </select>  <br><br>
房产照片:<input type="text" name="p_img" size="50" value="$p_img"> <br><br>
小区地址:<input type="text" name="p_site" size="20" value="$p_site_1">路/街<br><br>
所属地段:<input type="text" name="p_ownedlots" size="50" value="$p_ownedlots"> <br><br>
附近商场:<input type="text" name="p_shopping" size="50" value="$p_shopping"> <br><br>
公交线路:<input type="text" name="p_bus" size="50" value="$p_bus"> <br><br>
标志建筑:<input type="text" name="p_signs" size="50" value="$p_signs"> <br><br>
楼盘特点:<input type="text" name="p_features" size="50" value="$p_features"> <br><br>
景观特点:<input type="text" name="p_landscape" size="50" value="$p_landscape">  <br><br>

新旧楼盘:<input type="radio" name="p_oldnewflats" value="0" $p_oldnewflats_checked1> 旧
        <input type="radio" name="p_oldnewflats" value="1" $p_oldnewflats_checked2> 新 <br><br>
        
绿化情况:<input type="radio" name="p_green" value="0" $p_green_checked1> 一般
        <input type="radio" name="p_green" value="1" $p_green_checked2> 好
        <input type="radio" name="p_green" value="2" $p_green_checked3> 无
        <br><br>
小区配套:<input type="text" name="p_matching" size="50" value="$p_matching"> <br><br>
划片小学:<input type="text" name="p_dicing" size="50" value="$p_dicing"> <br><br>
开 发 商:<input type="text" name="p_developer" size="50" value="$p_developer"> <br><br>
建筑类型:<input type="text" name="p_c_type" size="50" value="$p_c_type"> <br><br>
原国家单位宿舍:<input type="radio" name="p_state" value="0" $p_state_checked1> 否
       		 <input type="radio" name="p_state" value="1" $p_state_checked2> 是
			 <br><br>
小区期数:<input type="text" name="p_period" size="50" value="$p_period"> <br><br>
附近的医院:<input type="text" name="p_period" size="50" value="$p_hospital"> <br><br>
附近的公园:<input type="text" name="p_park" size="50" value="$p_park"> <br><br>
公交车站点:<input type="text" name="p_busstops" size="50" value="$p_busstops"> <br><br>
楼盘规模:<input type="radio" name="p_scale" value="0" $p_scale_checked1> 小
       	<input type="radio" name="p_scale" value="1" $p_scale_checked2> 中
       	<input type="radio" name="p_scale" value="2" $p_scale_checked3> 大
		<br><br>
建筑栋数:<input type="text" name="p_c_number" size="50" value="$p_c_number"> <br><br>
建筑楼距:<input type="text" name="p_c_distance" size="50" value="$p_c_distance"> <br><br>
划片初中:<input type="text" name="p_d_junior" size="50" value="$p_d_junior"> <br><br>
物业公司:<input type="text" name="p_property" size="50" value="$p_property"> <br><br>
房产类型:<input type="text" name="p_p_type" size="50" value="$p_p_type"> <br><br>

能否落户:<input type="radio" name="p_settled" value="0" $p_settled_checked1> 小
       	<input type="radio" name="p_settled" value="1" $p_settled_checked2> 中
		<br><br>
物 业 费:<input type="text" name="p_p_charges" size="50" value="$p_p_charges"> <br><br>



简介说明:<textarea cols="60" rows="5" name="p_content" >$p_content</textarea> <br><br>


:<input type="hidden" name="p_id" size="50" value="$p_id">
<input type="submit" value="提 交"> 
<input type="reset" value="重 置"> 
</form>
EOT;
}else
while( $premises = $rs->FetchRow() ) {
	$p_id = $premises[0];
	$p_name = $premises['p_name'];
	//输出
	print <<<EOT

$id    $p_name  <a href="?action=premises&type=m&p_id=$p_id">修改</a>
                 <a href="javascript:if(confirm(' 确定删除本条采集? ')){location='?action=premises&type=del&p_id=$p_id';}"> 删除 </a>
		<br><br>
		
EOT;
	//输出结束
}
print <<<EOT
$page_foot

EOT;
}
//黑名单设置
elseif ($action == 'bl'){
	if ($type == 'm'){
		//输出
		print <<<EOT
<form action="?action=bl&type=up" enctype="multipart/form-data" method="POST" >
电话:<input type="text" name="bl_contact" size="50" value="$bl_contact">  <br><br>
手机:<input type="text" name="bl_mobile" size="50" value="$bl_mobile"><br><br>
<input type="hidden" name="bl_id" size="50" value="$bl_id">
<input type="submit" value="提 交"> 
<input type="reset" value="重 置"> 
EOT;
		//输出结束
}
elseif ($type == 'news'){
	//输出
	print <<<EOT
<form action="?action=bl&type=news_into" enctype="multipart/form-data" method="POST" >
电话:<input type="text" name="bl_contact" size="50" value="$bl_contact">  <br><br>
手机:<input type="text" name="bl_mobile" size="50" value="$bl_mobile"><br><br>
<input type="submit" value="提 交"> 
<input type="reset" value="重 置"> 
EOT;
	//输出结束

}
else {
	print <<<EOT
	 <a href="?action=bl&type=news"><h3>增加黑名单</h3>	</a><br><br>
EOT;
	while( $blacklist = $rs->FetchRow() ) {
		//输出结束
		$bl_id = $blacklist[0];
		$bl_contact = $blacklist['bl_contact'];
		$bl_mobile = $blacklist['bl_mobile'];
		$bl_uptimes = date("Y-m-d",$blacklist['bl_uptimes']);
		//输出
		print <<<EOT
id: $bl_id    電話號碼 : $bl_contact  手機號碼: $bl_mobile 加入時間: $bl_uptimes  <a href="?action=bl&type=m&bl_id=$bl_id">修改</a>
                 <a href="javascript:if(confirm(' 确定删除本条采集? ')){location='?action=bl&type=del&bl_id=$bl_id';}"> 删除 </a>
		<br><br>


EOT;
		//输出结束
}
print <<<EOT
$page_foot

EOT;
}
}
?>

</body>
</html>