<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8">
	<title>插件管理</title>
	<link rel="stylesheet" href="js/bootstrap.min.css">
	<script src="js/jquery.js"></script>
	<script src="js/bootstrap.min.js"></script>
	<script src="js/common.js" type="text/javascript"></script>
	<script src="js/main.js" type="text/javascript"></script>
	<style>
.bottom{ width:99%;height:15px;border-top:4px solid #c6dbe7; background:#FBFEFF;line-height:15px;margin:0 auto; font-size:12px;text-align:center;padding:5px;}
.nav-pills>li>a {border-radius: 0px;color: #337ab7;padding: 8px 15px;font-size: 12px;}
.nav-pills>li.active>a, .nav-pills>li.active>a:focus, .nav-pills>li.active>a:hover {
    color: #fff;
    background-color: #7b9cb8;
}
.nav-pills>li>a:hover{background-color: #e6f2fb;}
.panel {
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 0px;
}
.panel-info {
    border-color: #e6f2fb;
}
.panel-info>.panel-heading {
    color: #333;
    background-color: #e6f2fb;
    border: 0;
	border-radius: 0px;
}
.panel-heading {
    padding: 6px 15px;
    border-bottom: 1px solid transparent;
    border-radius: 0px;
}
.label {
    display: inline;
    padding: .2em .6em .3em;
    font-size: 75%;
    font-weight:100;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: .25em;
}
.label-info {
    background-color: #7b9cb8;
}
.panel-title {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 14px;
    color: inherit;
}
input[type=checkbox], input[type=radio] {
    margin: 0;
}
.rb1{padding-top:3px;}
	</style>
</head>
<body style="margin-left:10px;">
	<script
		type="text/JavaScript">if(parent.$('admincpnav')) parent.$('admincpnav').innerHTML='后台首页&nbsp;&raquo;&nbsp;视频&nbsp;&raquo;&nbsp;增强插件';</script>
	<ul id="myTab" class="nav nav-pills navbar-fixed-top " style="background-color: #e6f2fb;
    margin-left: 10px;margin-right:10px;margin-top: 6px;">
		<li id="myTab1" style="border-radius:0px;"><a href="#HideVideo" data-toggle="pill">增强管理</a></li>
		<li id="myTab2" style="border-radius:0px;"><a href="#JmpVideo" data-toggle="pill">网站改版</a></li>
		<li id="myTab3" style="border-radius:0px;"><a href="#Other" data-toggle="pill">其它功能</a></li>
	</ul>
	
	
	<div id="myTabContent" class="tab-content" style="margin-top:50px;margin-right:10px;">
		<div class="tab-pane fade" id="HideVideo">

			<form action="?action=HideVideo" method="post" role="form">

				<div class="form-group">

					<!--    链接屏蔽    -->
					
					<div class="panel panel-info">

						<div class="panel-heading">

							<h3 class="panel-title">
								<input type="checkbox" name="hideoff_url"
									<?php echo $PLUS["HideVideo"]["off"]?"checked":""; ?> />启用？&nbsp;&nbsp;&nbsp;&nbsp【视频屏蔽】用于收到版权投诉后屏蔽其显示
							</h3>
						</div>
						
						
						<div class="panel-body">
							<span class="label label-info">ID或链接</span>&nbsp;&nbsp;输入视频ID或链接，如果是链接需要点击自动校正后再保存，每行一个
						
							<textarea name="hidebody_url" id="hidebody_url" cols="30" rows="5" class="form-control"
								style="border-radius:2px;margin-top:5px;"><?php foreach($PLUS["HideVideo"]["data"] as $key){echo "$key\r";} ?></textarea>
							
							<h3><span class="label label-info">显示信息</span>&nbsp;&nbsp;支持HTML、模板全局标签</h3>
                                 	<textarea name="hideinfo_url"  cols="30" rows="5" class="form-control"
								style="border-radius:2px;"><?php  echo $PLUS["HideVideo"]["info"];?></textarea>
							
							
						</div>

					</div>
					
					<!--    片名屏蔽     -->
					
						<div class="panel panel-info">

						<div class="panel-heading">



							<h3 class="panel-title">
								<input type="checkbox" name="hideoff_name"
									<?php echo $PLUS["HideName"]["off"]?"checked":""; ?> />启用？&nbsp;&nbsp;&nbsp;&nbsp;【片名屏蔽】用于屏蔽片名包含关键字的影片
							</h3>
						</div>
						<div class="panel-body">
							 <span class="label label-info">片名关键字</span>&nbsp;&nbsp;输入关键字,每行一个,影片名包含关键字的影片将会屏蔽

							<textarea name="hidebody_name" cols="30" rows="5" class="form-control"
								style="border-radius:2px;margin-top:5px;"><?php foreach($PLUS["HideName"]["data"] as $key){echo "$key\r";} ?></textarea>
								 <h3><span class="label label-info">显示信息</span>&nbsp;&nbsp;支持HTML、模板全局标签</h3>

							<textarea name="hideinfo_name" cols="30" rows="5" class="form-control"
								style="border-radius:2px;"><?php  echo $PLUS["HideName"]["info"];?></textarea>


							<br>


						</div>

					</div>
					
					<!--     分类 屏蔽   -->
					

                      	<div class="panel panel-info">

						<div class="panel-heading">



							<h3 class="panel-title">
								<input type="checkbox" name="hideoff_type"
									<?php echo $PLUS["HideType"]["off"]?"checked":""; ?> />启用？&nbsp;&nbsp;&nbsp;&nbsp;【观看限制】限制该分类必须使用移动设备播放
							</h3>
						</div>
						<div class="panel-body">

                             <span class="label label-info">视频分类</span>&nbsp;&nbsp;输入视频分类ID,每行一个,包含的分类将只能移动设备播放
							<textarea name="hidebody_type"  cols="30" rows="5" class="form-control"
								style="border-radius:2px;margin-top:5px;"><?php foreach($PLUS["HideType"]["data"] as $key){echo "$key\r";} ?></textarea>
							
						<h3><span class="label label-info">显示信息</span> &nbsp;&nbsp;支持HTML、模板全局标签、{playpage:link}标签</h3>
						

							<textarea name="hideinfo_type" cols="30" rows="5" class="form-control"
								style="border-radius:2px;"><?php  echo $PLUS["HideType"]["info"];?></textarea>


							<br>

							<input type="submit" value="保存设置" class="rb1" />

						</div>

					</div>
					
					
						<!--     分类 屏蔽  结束 -->
					
					

				</div>



			</form>


			





		</div>

		<div class="tab-pane fade" id="JmpVideo">
			<form action="?action=JmpVideo" method="post" role="form">
				<div class="form-group">

					<div class="panel panel-info">
						<div class="panel-heading">


							<h3 class="panel-title">
								<input type="checkbox" name="jmpoff" 
									<?php echo $PLUS["JmpVideo"]["off"]?"checked":""; ?> />启用？&nbsp;&nbsp;&nbsp;&nbsp;【网站改版】用于视频跳转(每行一个,格式：失效视频ID=>正常视频ID)
							</h3>
						</div>
						<div class="panel-body">
							<textarea name="jmpbody" id="jmpbody" cols="30" rows="15"
								class="form-control"><?php foreach($PLUS["JmpVideo"]["data"] as $key=>$val){echo "$key=>$val\r";} ?></textarea>
							<br>
							<input type="submit" value="保存设置" class="rb1" />

						</div>

					</div>



				</div>



			</form>

		</div>


		<div class="tab-pane fade" id="Other">
			<form action="?action=Other" method="post" role="form">
				<div class="form-group">

					<div class="panel panel-info">
						<div class="panel-heading">

							<h3 class="panel-title">
								【列表个数】自定义视频管理页面中每页显示的视频个数
							</h3>
						</div>
						<div class="panel-body">


							视频管理每页显示个数：<input name="numPerPage" type="text"
								value='<?php echo $PLUS["Other"]["numPerPage"]; ?>' class="rb1" />

							<p></p>
							<input type="submit" value="保存设置" class="rb1" />

						</div>

					</div>



				</div>



			</form>

		</div>


* 增强插件只针对动态和伪静态运行模式有效，生成静态页后无效。<br>
* 如果修改无效，请检查/data/config.plus.inc.php文件权限是否可写。
<br><br>


	</div>

	<?php viewFoot(); ?>

<script type="text/JavaScript">

//效验数据

  function check()
{
  var obj=$('hidebody_url');
  var uidArr = obj.value.split(/[(\r\n)\r\n]+/);
  var temp=[];
  //正则取得数值数组
  for(var j = 0,len = uidArr.length; j < len; j++){
     var uid=uidArr[j].replace(/(^\s*)|(\s*$)/g, "");
     if(uid!=""){var m = uid.match(/(\d+)(?:-|)/);if(m){temp.push(m[1]);}}
   }
   uidArr = []; 
  //删除数值重复 
  for(var i = 0,len = temp.length;i< len; i++){
        if(uidArr.indexOf(temp[i]) == -1){
            uidArr.push(temp[i]);
        }
    }
    obj.value=uidArr.join("\r\n");
  
  
   	alert("校正成功,共有"+uidArr.length+"条数据。");
  
}


//智能判断选项卡
window.onload = function(){
	
   var self="<?php echo filter_input(INPUT_GET, 'active',FILTER_SANITIZE_STRING);?>";
  
  switch (self)
 	 
 	 { 	
 	 	case "HideVideo"  : 
 	 		
 	 		  document.getElementById("myTab1").className = "active";
 	 		  document.getElementById("HideVideo").className = document.getElementById("HideVideo").className +" in active";
 	 		  break;
  
        case "JmpVideo"  : 
 	 		
 	 		  document.getElementById("myTab2").className = "active";
 	 		  document.getElementById("JmpVideo").className = document.getElementById("JmpVideo").className +" in active";
 	 		  break;

      case "Other"  : 
 	 		
 	 		  document.getElementById("myTab3").className = "active";
 	 		  document.getElementById("Other").className = document.getElementById("Other").className +" in active";
 	 		  break;

 	 	 default:
 	 	  	    document.getElementById("myTab1").className = "active";
 	 		    document.getElementById("HideVideo").className = document.getElementById("HideVideo").className +" in active";
 	 	    	break;
 	 	
 	 }
 	 
   
}

</script>

</body>

</html>