<?php 
/*
 * Ssanl控制台
 */
if(!defined('EMLOG_ROOT')) {exit('error!');} 
require_once('top/config.php');
if (ROLE == ROLE_ADMIN):
require_once('functions.php');
plugin_setting();
?>
<div class="container-fluid home-fluid">
<div id="primary" class="left-column">
<div class="iphone"></div>
<link rel='stylesheet' id='set-css'  href='<?php echo TEMPLATE_URL; ?>css/set.css' type='text/css' media='all' />
<script type='text/javascript' src='<?php echo TEMPLATE_URL; ?>js/jquery.js'></script>
<div id="setting" >
<main id="main" class="site-main" role="main">
<form action="?setting&do=save" method="post" id="input" class="da-form" enctype="multipart/form-data">
<div class="set_nav">
<ul><li class="active"><a href="#sethome">基本配置</a></li>
<li><a href="#setkey">工具设置 </a></li>
<li><a href="#setaside">幻灯片设置</a></li>
<li><a href="#plus">图标设置</a></li>
<li><a href="#qita">其他设置</a></li>
<li class="last"><input type="submit" value="保 存" class="svae" /></li>
</ul></div>
<div class="set_cnt">
<div class="set_box" id="sethome" style="display:block">
<div class="da-form-row">
<td class="right_td">站点LOGO：</td>
<td class="left_td"><input type="file" name="logo" style="display: inline-flex;" class="text-width"/></td>
<td class="right_td"><img src="<?php echo $logo ?  $logo : ''.TEMPLATE_URL."tpimg/logo.png";?>" width="135px" height="32px" style="margin-left:5px;vertical-align: middle;margin-top:2px;border-radius: 3px;border:1px solid #eee;padding:2px"></td>
</div>
<div class="da-form-row">
<td class="right_td">建站时间:</td>
<td class="left_td"><input size="10" name="yxsjdate" type="text" value="<?php echo $yxsjdate; ?>" id="datepicker"/></td>
</div> 
<div class="da-form-row">
<td class="right_td">首页列表文章篇数：</td>
<td class="left_td"><input size="2" name="index_mnum" type="text" value="<?php echo $index_mnum; ?>"/></td>
</div>
<div class="da-form-row">
<td class="right_td">首页图文ID：</td>
<td class="left_td"><input size="2" name="index_cid" type="text" value="<?php echo $index_cid; ?>"/></td>
</div>
<div class="da-form-row">
<td class="right_td">首页CMS风格分类ID：</td>
<td class="left_td"><input size="20" name="cms_cid" type="text" value="<?php echo $cms_cid; ?>" class="text-width"/></td>
<td class="right_td">多个模块之间用英文<span style="color:red">逗号</span>隔开即可！</td>
</div>
<div class="da-form-row">
<td class="right_td">首页轮番图文ID：</td>
<td class="left_td"><input size="2" name="lunfan_cid" type="text" value="<?php echo $lunfan_cid; ?>"/></td>
</div>
<div class="da-form-row">图片分类ID：
<input size="5" name="img_id" type="text" class="input-text" value="<?php echo $img_id; ?>">
 显示图片列表的分类ID，多个ID之间用英文<span style="color:red">逗号</span>隔开即可！
</div>
</div>
<div class="set_box" id="qita" >
<div class="da-form-row">
<td class="right_td">首页友链开关:</td>
<span class="right_td">
<td class="left_td"><input name="sylinks" type="radio" value="1" <?php if ($sylinks == "1") echo 'checked'?> ></input></td>
<td class="right_td">显示</td>
<td class="right_td"><input name="sylinks" type="radio"  value="2" <?php if ($sylinks == "2") echo 'checked'?>></input></td>
<td class="right_td">隐藏</td>
</span>
</div>
<div class="da-form-row">
<td class="right_td">源码压缩：:</td>
<span class="right_td">
<td class="left_td"><input name="compress_html" type="radio" value="1" <?php if ($compress_html == "1") echo 'checked'?> ></input></td>
<td class="right_td">开启</td>
<td class="right_td"><input name="compress_html" type="radio"  value="2" <?php if ($compress_html == "2") echo 'checked'?>></input></td>
<td class="right_td">关闭</td>
</span>
</div>
<div class="da-form-row">
<td class="right_td">右键功能:</td>
<span class="right_td">
<td class="left_td"><input name="log_listpax" type="radio" value="1" <?php if ($log_listpax == "1") echo 'checked'?> ></input></td>
<td class="right_td">开启</td>
<td class="right_td"><input name="log_listpax" type="radio"  value="2" <?php if ($log_listpax == "2") echo 'checked'?>></input></td>
<td class="right_td">关闭</td>
</span>
</div>
<div class="da-form-row">
<td class="right_td">百度收录API:</td>
<span class="right_td">
<td class="left_td"><input name="tbaiduapi" type="radio" value="1" <?php if ($tbaiduapi == "1") echo 'checked'?> ></input></td>
<td class="right_td">开启</td>
<td class="right_td"><input name="tbaiduapi" type="radio"  value="2" <?php if ($tbaiduapi == "2") echo 'checked'?>></input></td>
<td class="right_td">关闭</td>
</span>
</div>
</div>
<div class="set_box" id="setkey">
<div class="da-form-row">
<td class="right_td">微信地址：</td>
<td class="left_td"><input size="30" name="wxurl" type="text" value="<?php echo $wxurl; ?>" class="text-width"/></td>
</div>
<div class="da-form-row">
<td class="right_td">腾讯QQ：</td>
<td class="left_td"><input size="30" name="txurl" type="text" value="<?php echo $txurl; ?>" class="text-width"/></td>
</div>
<div class="da-form-row">
<td class="right_td">新浪地址：</td>
<td class="left_td"><input size="30" name="xlurl" type="text" value="<?php echo $xlurl; ?>" class="text-width"/></td>
</div>
<div class="da-form-row">
<td class="right_td">电影分类ID：</td>
<td class="left_td"><input size="2" name="dy_id" type="text" value="<?php echo $dy_id; ?>"/></td>
<td class="right_td">需要配合视频插件,否则设置一个没有的分类ID！</td>
</div>
<div class="da-form-row">
<td class="right_td">电影接口：</td>
<td class="left_td"><input size="30" name="dy_jk" type="text" value="<?php echo $dy_jk; ?>"/></td>
<td class="right_td">例如：http://jx.ejiafarm.com/dy.php?url=</td>
</div>
<div class="da-form-row">
<td class="right_td">开启菜单栏更多：</td>
<td class="left_td"><input name="more" type="radio" value="1" <?php if ($more == "1") echo 'checked'?> ></input></td>
<td class="right_td">开启</td>
<td class="left_td"><input name="more" type="radio" value="2" <?php if ($more == "2") echo 'checked'?> ></input></td>
<td class="right_td">关闭</td>
</div>
<div class="da-form-row">
<td class="right_td">菜单栏更多功能 (<span style="color:red; font-weight:bold">支持html代码</span>)</td><br/>
<p><textarea name="more_html" cols="125" rows="8" id="home_text" ><?php echo $more_html; ?></textarea></p>
</div>

</div>
<div class="set_box" id="setaside">
<div class="da-form-row">
<td class="right_td">开启轮播图：</td>
<td class="left_td"><input name="Slide" type="radio" value="1" <?php if ($Slide == "1") echo 'checked'?> ></input></td>
<td class="right_td">开启</td>
<td class="left_td"><input name="Slide" type="radio" value="2" <?php if ($Slide == "2") echo 'checked'?> ></input></td>
<td class="right_td">关闭</td>
</div>
<div class="da-form-row">
<td class="right_td">幻灯片图片1：</td>
<td class="left_td"><input size="30" name="Slide1" type="text" value="<?php echo $Slide1; ?>" class="text-width"/></td>
</div>
<div class="da-form-row">
<td class="right_td">幻灯片链接1：</td>
<td class="left_td"><input size="30" name="Surl1" type="text" value="<?php echo $Surl1; ?>" class="text-width"/></td>
</div>
<div class="da-form-row">
<td class="right_td">幻灯片图片2：</td>
<td class="left_td"><input size="30" name="Slide2" type="text" value="<?php echo $Slide2; ?>" class="text-width"/></td>
</div>
<div class="da-form-row">
<td class="right_td">幻灯片链接2：</td>
<td class="left_td"><input size="30" name="Surl2" type="text" value="<?php echo $Surl2; ?>" class="text-width"/></td>
</div>
<div class="da-form-row">
<td class="right_td">幻灯片图片3：</td>
<td class="left_td"><input size="30" name="Slide3" type="text" value="<?php echo $Slide3; ?>" class="text-width"/></td>
</div>
<div class="da-form-row">
<td class="right_td">幻灯片链接3：</td>
<td class="left_td"><input size="30" name="Surl3" type="text" value="<?php echo $Surl3; ?>" class="text-width"/></td>
</div>
</div>
<div class="set_box" id="plus">
<div class="da-form-row">
<td class="right_td"><span style="color:red; font-weight:bold">导航设置: <a href="http://www.fontawesome.com.cn/faicons/" rel="external nofollow" target="_black">Awesome 字体图标</a></span></td>
</div>
<div class="da-form-row">
<td class="right_td"> 导航图标设置(<span style="color:red; font-weight:bold">注意更改导航后需重新设置</span>)</td></br>
<?php
global $CACHE; 
global $arr_navico1; 
$navi_cache = $CACHE->readCache('navi');
foreach($navi_cache as $num=>$value):

        if ($value['pid'] != 0) {
            continue;
        }
		$id=$value["id"];
		
		echo '<td class="right_td">'.$value['naviname'].' &nbsp; =></td>
<td class="left_td"><input class="input"  value="'.$arr_navico1[$id].'" name="arr_navico['.$id.']"></td></br>';
endforeach;
?>
</div>
<div class="da-form-row">
<td class="right_td">分类和二级导航图标(<span style="color:red; font-weight:bold">注意更改分类后需重新设置</span>)</td></br>
<?php
global $CACHE;
$sort_cache = $CACHE->readCache('sort'); 
global $arr_navico1; 
foreach($sort_cache as $num=>$value):
		$sid=$value["sid"];
		
		echo '<td class="right_td">'.$value['sortname'].' &nbsp; =></td>
<td class="left_td"><input class="input"  value="'.$arr_sortico1[$sid].'" name="arr_sortico['.$sid.']"></td></br>';
endforeach;
?>
</div>
</div>
</div>
</form>
</main>
</div>
</div></div>
<script>
$(function(){
	$(".set_nav li").not(".set_nav .last").click(function(e) {
		e.preventDefault();
		$(this).addClass("active").siblings().removeClass("active");
		$($(this).children("a").attr("href")).show().siblings().hide();
	});
	
  })
</script>
<?php else:?>
<?php header("Location:".BLOG_URL.""); exit; ?> 
<?php endif; ?>
<div class="clear"></div>
<br/>
<?php include View::getView('footer');?>