<?php
require '../../../zb_system/function/c_system_base.php';
require '../../../zb_system/function/c_system_admin.php';
$zbp->Load();
$action='root';
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}
if (!$zbp->CheckPlugin('CustomPostCount')) {$zbp->ShowError(48);die();}

$blogtitle='自定义文章浏览数';
require $blogpath . 'zb_system/admin/admin_header.php';
require $blogpath . 'zb_system/admin/admin_top.php';

	if(isset($_POST['ViewNumsOnOff'])){
		$zbp->Config('CustomPostCount')->ViewNumsOnOff=$_POST['ViewNumsOnOff'];
		$zbp->Config('CustomPostCount')->ViewNumsStart=$_POST['ViewNumsStart'];
		$zbp->Config('CustomPostCount')->ViewNumsEnd=$_POST['ViewNumsEnd'];
		$zbp->Config('CustomPostCount')->SaveOnOff=$_POST['SaveOnOff'];
		$zbp->Config('CustomPostCount')->SaveStart=$_POST['SaveStart'];
		$zbp->Config('CustomPostCount')->SaveEnd=$_POST['SaveEnd'];
		$zbp->SaveConfig('CustomPostCount');
		$zbp->SetHint('good');
		Redirect('./main.php');
	}

?>
<div id="divMain">
  <div class="divHeader"><?php echo $blogtitle;?></div>
  <div class="SubMenu">
  <a href="main.php"><span class="m-left">设置首页</span></a>
  <a href="https://me.alipay.com/zrcs" target="_blank"><span class="m-left" style="color:#F00">赞助</span></a>
  <a href="http://www.fengwensheng.com/" target="_blank"><span class="m-right">帮助</span></a>
  </div>
  <div id="divMain2">
<!--代码-->

	<form id="form1" name="form1" method="post">  
    <table width="100%" style='padding:0;margin:0;' cellspacing='0' cellpadding='0' class="tableBorder">
		<tr>
			<th width="15%"><p align="center">配置名称</p></th>
			<th width="25%"><p align="center">配置内容</p></th>
			<th width="15%"><p align="center">配置名称</p></th>
			<th width="25%"><p align="center">配置内容</p></th>
			<th width="20%"><p align="center">配置开关</p></th>
		</tr>
		<tr>
			<td><label for="ViewNumsStart"><p align="center">客户浏览开始</p></label></td>
			<td><p align="left"><textarea name="ViewNumsStart" type="text" id="ViewNumsStart" style="width:98%;height:25px;"><?php echo $zbp->Config('CustomPostCount')->ViewNumsStart;?></textarea></p></td>
			<td><label for="ViewNumsEnd"><p align="center">客户浏览结束</p></label></td>
			<td><p align="left"><textarea name="ViewNumsEnd" type="text" id="ViewNumsEnd" style="width:98%;height:25px;"><?php echo $zbp->Config('CustomPostCount')->ViewNumsEnd;?></textarea></p></td>
			<td><p align="center"><input type="text" id="ViewNumsOnOff" name="ViewNumsOnOff" class="checkbox" value="<?php echo $zbp->Config('CustomPostCount')->ViewNumsOnOff;?>"/></p></td>
		</tr>
		<tr>
			<td><label for="SaveStart"><p align="center">保存浏览开始</p></label></td>
			<td><p align="left"><textarea name="SaveStart" type="text" id="SaveStart" style="width:98%;height:25px;"><?php echo $zbp->Config('CustomPostCount')->SaveStart;?></textarea></p></td>
			<td><label for="SaveEnd"><p align="center">保存浏览结束</p></label></td>
			<td><p align="left"><textarea name="SaveEnd" type="text" id="SaveEnd" style="width:98%;height:25px;"><?php echo $zbp->Config('CustomPostCount')->SaveEnd;?></textarea></p></td>
			<td><p align="center"><input type="text" id="SaveOnOff" name="SaveOnOff" class="checkbox" value="<?php echo $zbp->Config('CustomPostCount')->SaveOnOff;?>"/></p></td>
		</tr>

	</table>
	<br />
   <input name="" type="Submit" class="button" value="保存"/>
    </form>

  </div>
</div>
<script type="text/javascript">AddHeaderIcon("<?php echo $bloghost . 'zb_users/plugin/CustomPostCount/logo.png';?>");</script>
<script type="text/javascript">
ActiveTopMenu("topmenu_CustomPostCount");
</script> 
<?php
require $blogpath . 'zb_system/admin/admin_footer.php';
RunTime();
?>
