<?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('orangecms')) {$zbp->ShowError(48);die();}
$blogtitle='主题配置';

$act = "";
if ($_GET['act']){
$act = $_GET['act'] == "" ? 'config' : $_GET['act'];
}
require $blogpath . 'zb_system/admin/admin_header.php';
require $blogpath . 'zb_system/admin/admin_top.php';

//基本设置
if(isset($_POST['description'])){
if (function_exists('CheckIsRefererValid')) CheckIsRefererValid();
$zbp->Config('orangecms')->seotitle = $_POST['seotitle'];
	$zbp->Config('orangecms')->description = $_POST['description'];
	$zbp->Config('orangecms')->keyword = $_POST['keyword'];
	$zbp->Config('orangecms')->blogger =$_POST['blogger'];
	$zbp->Config('orangecms')->Abstractwords =$_POST['Abstractwords'];
	$zbp->Config('orangecms')->DisplayAbstractwords=$_POST['DisplayAbstractwords'];
	$zbp->Config('orangecms')->DisplayRelated =$_POST['DisplayRelated'];	
    $zbp->Config('orangecms')->GravatarNow=$_POST['GravatarNow'];	
	$zbp->Config('orangecms')->sycate=$_POST['sycate'];
	$zbp->Config('orangecms')->sytuijian=$_POST['sytuijian'];
	$zbp->Config('orangecms')->syhdp=$_POST['syhdp'];
	$zbp->Config('orangecms')->nocate=$_POST['nocate'];
	$zbp->Config('orangecms')->displaynocate=$_POST['displaynocate'];
	$zbp->Config('orangecms')->Displaysy=$_POST['Displaysy'];
	$zbp->SaveConfig('orangecms');
	$zbp->ShowHint('good');
	}
//广告
if(isset($_POST['contentad'])){
if (function_exists('CheckIsRefererValid')) CheckIsRefererValid();
	$zbp->Config('orangecms')->contentad =$_POST['contentad'];
	$zbp->Config('orangecms')->Displaycontentad =$_POST['Displaycontentad'];
	$zbp->Config('orangecms')->contentadx =$_POST['contentadx'];
	$zbp->Config('orangecms')->Displaycontentadx =$_POST['Displaycontentadx'];
    $zbp->Config('orangecms')->Displaycomentad=$_POST['Displaycomentad']; 
    $zbp->Config('orangecms')->comentad=$_POST['comentad'];	
	$zbp->SaveConfig('orangecms');
	$zbp->ShowHint('good');
	}

if(isset($_POST['submit3'])){
if (function_exists('CheckIsRefererValid')) CheckIsRefererValid();
	$zbp->Config('orangecms')->add1 = $_POST['add1'];
	$zbp->Config('orangecms')->add2 = $_POST['add2'];
	$zbp->Config('orangecms')->add3 = $_POST['add3'];
	$zbp->Config('orangecms')->add4 = $_POST['add4'];
	$zbp->SaveConfig('orangecms');
	$zbp->ShowHint('good');	
}

?>

<style>
input.sedit{ width:93%;}
table input{margin:0.25em 0;}
table input.text{padding: 2px 5px;}
table .button{padding: 2px 12px 5px 12px; margin: 0.25em 0;}
.tc{border: solid 2px #E1E1E1;width: 50px;height: 23px;float: left;margin: 0.25em;cursor: pointer}
.tc:hover,.active{border: 2px solid #2694E8;}
.upinfo{position: relative;left: 3px;top: -19px;color: white;background: #5EAAE4;width: 190px;height: 23px;display: inline-block;text-align: center;opacity: 0.8;filter: alpha(opacity=80);}
.imageshow{margin:0.25em 0;}.imageshow img{margin:0 10px;margin-bottom:-10px;}
</style>
<!--#include file="..\..\..\..\zb_system\admin\admin_top.asp"-->
<div id="divMain">
	<div class="divHeader"><?php echo $blogtitle;?></div>
	<div class="SubMenu">
         <?php orangecms_SubMenu($act);?>
        <a href="http://www.xxzhiyuan.cn" target="_blank"><span class="m-left" style="color:#F00">帮助</span></a>
	<div id="divMain2">
		<?php
   
if ($act == 'base'){
     ?>	
	<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="40%"><p align="center">配置内容</p></th>
			<th width="10%"><p align="center">配置开关</p></th>
			<th width='20%'><p align="center">配置说明</p><?php if (function_exists('CheckIsRefererValid')) {echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';}?></th>
		</tr>        
        <tr>
			<td><label for="description"><p align="center">seo首页标题</p></label></td>
			<td><p align="left"><textarea name="seotitle" type="text" id="description" style="width:98%;"><?php echo $zbp->Config('orangecms')->seotitle;?></textarea></p></td>
			<td><p align="center"></p></td>
			<td><p align="left">网站首页的META标签seo首页标题描述内容维护</p></td>			
		</tr>
		<tr>
			<td><label for="description"><p align="center">网站首页描述</p></label></td>
			<td><p align="left"><textarea name="description" type="text" id="description" style="width:98%;"><?php echo $zbp->Config('orangecms')->description;?></textarea></p></td>
			<td><p align="center"></p></td>
			<td><p align="left">网站首页的META标签 description描述内容维护</p></td>			
		</tr>
		<tr>
			<td><label for="keyword"><p align="center">网站关键词</p></label></td>
			<td><p align="left"><textarea name="keyword" type="text" id="keyword" style="width:98%;"><?php echo $zbp->Config('orangecms')->keyword;?></textarea></p></td>
			<td><p align="center"></p></td>
			<td><p align="left">网站首页的META标签 keywords描述内容维护</p></td>
		</tr>
		<tr>
			<td><label for="Abstractwords"><p align="center">摘要内容文字个数(填写数字)</p></label></td>
			<td><p align="left"><textarea name="Abstractwords" type="text" id="Abstractwords" style="width:10%;"><?php echo $zbp->Config('orangecms')->Abstractwords;?></textarea></p></td>
			<td><p align="center"><input type="text" id="DisplayAbstractwords" name="DisplayAbstractwords" class="checkbox" value="<?php echo $zbp->Config('orangecms')->DisplayAbstractwords;?>"/></p></td>
			<td><p align="left">摘要内容文字个数,以及是否采用系统默认摘要内容，默认不启用</p></td>
		</tr>
		<tr>
			<td><label for="DisplayRelated"><p align="center">相关文章</p></label></td>
			<td><p align="left"></p></td>
			<td><p align="center"><input type="text" id="DisplayRelated" name="DisplayRelated" class="checkbox" value="<?php echo $zbp->Config('orangecms')->DisplayRelated;?>"/></p></td>
			<td><p align="left">是否显示相关文章</p></td>
		</tr>
		<tr>
			<td><label for="nocate"><p align="center">首页过滤某一分类</p></label></td>
			<td><p align="left"><select name='nocate'>
			<option><?php echo $zbp->Config('orangecms')->nocate;?></option>
			<?php echo orangecms_Category_gg();?>
			</select>
			当前被选择的分类为：<?php echo $zbp->Config('orangecms')->nocate;?></p></td>
			<td><p align="center"><p align="center"><input type="text" id="displaynocate" name="displaynocate" class="checkbox" value="<?php echo $zbp->Config('orangecms')->displaynocate;?>"/></p></p></td>
			<td><p align="left">是否启用过滤功能,默认不过滤</p></td>
		</tr>
		<tr>
			<td><label for="Displaysy"><p align="center">首页CMS模式</p></label></td>
			<td><p align="left"></p></td>
			<td><p align="center"><input type="text" id="Displaysy" name="Displaysy" class="checkbox" value="<?php echo $zbp->Config('orangecms')->Displaysy;?>"/></p></td>
			<td><p align="left">是否启用首页CMS模式，如果选择不，则默认常用列表模式，默认列表模式。</p></td>
		</tr>
				<tr>
			<td><label for="sycate"><p align="center">首页CMS分类ID填写</p></label></td>
			<td><p align="left"><textarea name="sycate" type="text" id="sycate" style="width:80%;"><?php echo $zbp->Config('orangecms')->sycate;?></textarea></p></td>
			<td></td>
			<td><p align="left">填写分类用英文','分隔</p></td>
		</tr>
        
        	<tr>
			<td><label for="syhdp"><p align="center">首页幻灯片文章ID填写</p></label></td>
			<td><p align="left"><textarea name="syhdp" type="text" id="syhdp" style="width:80%;"><?php echo $zbp->Config('orangecms')->syhdp;?></textarea></p></td>
			<td></td>
			<td><p align="left">填写文章用英文','分隔</p></td>
		</tr>
		<tr>
			<td><label for="syhdp"><p align="center">首页推荐文章ID填写</p></label></td>
			<td><p align="left"><textarea name="sytuijian" type="text" id="syhdp" style="width:80%;"><?php echo $zbp->Config('orangecms')->sytuijian;?></textarea></p></td>
			<td></td>
			<td><p align="left">填写文章用英文','分隔</p></td>
		</tr>
	</table>
    <table name="form1" width="100%" style="padding:0;margin:0;" cellspacing="0" cellpadding="0" class="tableBorder">
	<br/>
	<tr>
    <td>	
		<p>1、企业模板由志远网络制作</p>
		<p>2、在线技术支持，970907509，尽量解答</p>
		<p>3、联系我们可以定制你想要的企业模板主题，唯一属于你的zblog模板</p>
        <p>模板使用率少的话，更有利搜索引擎体验度，利于SEO；</p>
	</td>
	
	</tr>	
</table>
	<br />
   <input name="" type="Submit" class="button" value="保存"/>
    </form>
    <?php
    }
	    if ($act == 'ad'){
    ?>


	<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="40%"><p align="center">广告内容</p></th>
			<th width="10%"><p align="center">配置开关</p></th>
			<th width='20%'><p align="center">配置说明</p><?php if (function_exists('CheckIsRefererValid')) {echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';}?></th>
		</tr>
		<tr>
			<td><label for="contentad"><p align="center">TOP广告</p></label></td>
			<td><p align="left"><textarea name="contentad" type="text" id="contentad" style="width:98%;"><?php echo $zbp->Config('orangecms')->contentad;?></textarea></p></td>
			<td><p align="center"><input type="text" id="Displaycontentad" name="Displaycontentad" class="checkbox" value="<?php echo $zbp->Config('orangecms')->Displaycontentad;?>"/></p></td>
			<td><p align="left">内容页-文章内广告:适合尺寸最大建议宽度为640px，建议内容为640px x 60px</p></td>
			
		</tr>
		<tr>
			<td><label for="contentadx"><p align="center">相关文章上部广告</p></label></td>
			<td><p align="left"><textarea name="contentadx" type="text" id="contentadx" style="width:98%;"><?php echo $zbp->Config('orangecms')->contentadx;?></textarea></p></td>
			<td><p align="center"><input type="text" id="Displaycontentadx" name="Displaycontentadx" class="checkbox" value="<?php echo $zbp->Config('orangecms')->Displaycontentadx;?>"/></p></td>
			<td><p align="left">相关文章上部广告适合尺寸最佳宽度为640px，建议内容为640px x 60px</p></td>
			
		</tr>
		<tr>
			<td><label for="comentad"><p align="center">评论框下面的广告</p></label></td>
			<td><p align="left"><textarea name="comentad" type="text" id="comentad" style="width:98%;"><?php echo $zbp->Config('orangecms')->comentad;?></textarea></p></td>
			<td><p align="center"><input type="text" id="Displaycomentad" name="Displaycomentad" class="checkbox" value="<?php echo $zbp->Config('orangecms')->Displaycomentad;?>"/></p></td>
			<td><p align="left">评论下面的广告适合尺寸最佳宽度为640px，建议内容为640px x 60px</p></td>
			
		</tr>
		<tr>
			<td><label for="contentadx"><p align="center">说明</p></label></td>
			<td><p align="left">关于top导航部分的css地方，如果你的标题或者副标题过长，请最好关闭top广告。这样更美观或者你把标题设置短点，开启广告。</p></td>
			<td><p align="center"></p></td>
			<td><p align="left"></p></td>
			
		</tr>
		
	</table>
	<br />
   <input name="" type="Submit" class="button" value="保存"/>
    </form>
    <?php
    }
  ?>
<?php if ($act == 'pic') { ?>

<table id="form1" name="form1" width="100%" style="padding:0;margin:0;" cellspacing="0" cellpadding="0" class="tableBorder">
<tr>
    <th width="30%"><p align="center">选项名称</p></th>
    <th width="20%"><p align="center">当前图片</p></th>
	<th width="50%"><p align="center">上传图片</p><?php if (function_exists('CheckIsRefererValid')) {echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';}?></th>
  </tr>

  <form enctype="multipart/form-data" method="post" action="save.php?type=logo">
	<tr>
    <td><p align="center">LOGO图片</p></td>
	<td>
	<p align="center"><a href="style/images/logo.png" target="_blank"><img src="style/images/logo.png" height="40px"></a></p>
	</td>
	<td><p align="center"><input name="logo.png" type="file"/><input name="" type="Submit" class="button" value="保存"/></p></td>
	</tr>	
	</form> 
	 <form enctype="multipart/form-data" method="post" action="save.php?type=favicon">
	 <tr>
    <td><p align="center">favicon图片</p></td>
	<td>
	<p align="center"><a href="style/images/favicon.ico" target="_blank"><img src="style/images/favicon.ico" height="40px"></a></p>
	</td>
	<td><p align="center"><input name="favicon.ico" type="file"/><input name="" type="Submit" class="button" value="保存"/></p></td>
	</tr>
	 </form> 
	 <form enctype="multipart/form-data" method="post" action="save.php?type=tupian1">
	 <tr>
    <td><p align="center">图片1</p></td>
	<td>
	<p align="center"><a href="style/images/tupian1.jpg" target="_blank"><img src="style/images/tupian1.jpg" height="40px"></a></p>
	</td>
	<td><p align="center"><input name="tupian1.jpg" type="file"/><input name="" type="Submit" class="button" value="保存"/></p></td>
	</tr>
	 </form> 

	 	 <form enctype="multipart/form-data" method="post" action="save.php?type=tupian2">
	 <tr>
    <td><p align="center">图片2</p></td>
	<td>
	<p align="center"><a href="style/images/tupian2.jpg" target="_blank"><img src="style/images/tupian2.jpg" height="40px"></a></p>
	</td>
	<td><p align="center"><input name="tupian2.jpg" type="file"/><input name="" type="Submit" class="button" value="保存"/></p></td>
	</tr>
	 </form> 

	 	 <form enctype="multipart/form-data" method="post" action="save.php?type=weixin">
	 <tr>
    <td><p align="center">微信二维码</p></td>
	<td>
	<p align="center"><a href="style/images/weixin.jpg" target="_blank"><img src="style/images/weixin.jpg" height="40px"></a></p>
	</td>
	<td><p align="center"><input name="weixin.jpg" type="file"/><input name="" type="Submit" class="button" value="保存"/></p></td>
	</tr>
	 </form> 
</table>

<?php } ?>
<?php if($act == 'about'){?>
<form id="form2" name="form2" 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="50%"><p align="center">选项内容</p></th>
			<th width="25%"><p align="center">选项说明</p><?php if (function_exists('CheckIsRefererValid')) {echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';}?></th>
		</tr>
		<tr>
			<td><label for="add1"><p align="center">邮箱</p></label></td>
			<td><p align="left"><input type="text" name="add1" id="title"style="width:98%;" value="<?php echo $zbp->Config('orangecms')->add1;?>"/></p></td>
			<td><p align="left">邮箱</p></td>
		</tr>
		<tr>
			<td><label for="add2"><p align="center">QQ</p></label></td>
			<td><p align="left"><input type="text" name="add2" id="title"style="width:98%;" value="<?php echo $zbp->Config('orangecms')->add2;?>"/></p></td>
			<td><p align="left">QQ</p></td>
		</tr>

		<tr>
			<td><label for="add3"><p align="center">微博</p></label></td>
			<td><p align="left"><input type="text" name="add3" id="title"style="width:98%;" value="<?php echo $zbp->Config('orangecms')->add3;?>"/></p></td>
			<td><p align="left">微博</p></td>
		</tr>		
		<tr>
			<td><label for="add8"><p align="center">博客介绍</p></label></td>
			<td><p align="left"><textarea rows="12" name="add4" type="text" id="tongji" style="width:98%;"><?php echo $zbp->Config('orangecms')->add4;?></textarea></p></td>
			<td><p align="left">请输博客介绍</p></td>
		</tr>
		
	</table>

	<br />
	<input name="submit3" type="Submit" class="button" style="width:15%;" value="保存"/>
</form>

	<?php } ?>
	</div>
</div>
<!--#include file="..\..\..\..\zb_system\admin\admin_footer.asp"-->
<script type="text/javascript">
ActiveTopMenu("topmenu_orangecms");
</script> 
<?php
require $blogpath . 'zb_system/admin/admin_footer.php';
RunTime();
?>