<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta name="robots" content="noindex,nofollow">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex,nofollow" />
<TITLE>播放器相关配置-系统-seacms后台管理</TITLE>
<link href="img/style.css" rel="stylesheet" type="text/css" />
<script src="js/main.js" type="text/javascript"></script>
<script src="js/common.js" type="text/javascript"></script>


</head>
<body>
<!--当前导航-->
<script type="text/JavaScript">if(parent.$('admincpnav')) parent.$('admincpnav').innerHTML='后台首页&nbsp;&raquo;&nbsp;系统&nbsp;&raquo;&nbsp;播放器配置 ';</script>
<script type="text/javascript">
function upformone(i){
	$('id').value=i,$('sort').value=$('sort'+i).value,$('info').value=$('info'+i).value;$('postfix').value=$('postfix'+i).value,$('flag').value=$('flag'+i);
	$('form1').submit();
}
</script>
<script>
var ColorHex=new Array('00','33','66','99','CC','FF')
var SpColorHex=new Array('FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF')
var current=null
var targetElement = null;
function intocolor(){
	var colorTable=''
	for (i=0;i<2;i++){
	for (j=0;j<6;j++){
		colorTable=colorTable+'<tr height=12>'
		colorTable=colorTable+'<td width=11 style="background-color:#000000">'
		if (i==0){
			colorTable=colorTable+'<td width=11 style="background-color:#'+ColorHex[j]+ColorHex[j]+ColorHex[j]+'">'
		}else{
			colorTable=colorTable+'<td width=11 style="background-color:#'+SpColorHex[j]+'">'
		}
		colorTable=colorTable+'<td width=11 style="background-color:#000000">'
		for (k=0;k<3;k++)
		{
			for (l=0;l<6;l++){colorTable=colorTable+'<td width=11 style="background-color:#'+ColorHex[k+i*3]+ColorHex[l]+ColorHex[j]+'">'}
		}
	}
}
colorTable='<table width=253 border="0" cellspacing="0" cellpadding="0" style="border:1px #000000 solid;border-bottom:none;border-collapse: collapse" bordercolor="000000">'
		   +'<tr height=30><td colspan=21 bgcolor=#cccccc>'
		   +'<table cellpadding="0" cellspacing="1" border="0" style="border-collapse: collapse">'
		   +'<tr><td width="3"><td><input type="text" name="DisColor" size="6"  style="border:solid 1px #000000;"></td>'
		   +'<td width="3"><td><input type="text" name="HexColor" size="7" style="border:inset 1px;font-family:Arial;" value="#000000"></td></tr></table></td></table>'
		   +'<table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="000000" onmouseover="doOver()" onmouseout="doOut()" onclick="doclick()" style="cursor:hand;">'
		   +colorTable+'</table>';
colorpanel.innerHTML=colorTable
}

function doOver() {
	  if ((event.srcElement.tagName=="TD") && (current!=event.srcElement)) {
		if (current!=null){current.style.backgroundColor = current._background}
		event.srcElement._background = event.srcElement.style.backgroundColor
		DisColor.style.backgroundColor = event.srcElement.style.backgroundColor
		HexColor.value = event.srcElement.style.backgroundColor.toUpperCase();
		event.srcElement.style.backgroundColor = "white"
		current = event.srcElement
	  }
}

function doOut() {
	if (current!=null) current.style.backgroundColor = current._background.toUpperCase();
}

function doclick()
{
	if (event.srcElement.tagName == "TD")
	{
		var clr = event.srcElement._background;
		clr = clr.toUpperCase();
		if (targetElement)
		{
			targetElement.value = clr.replace(/#/g,'');
		}
		DisplayClrDlg(false);
		return clr;
	}
}

function OnDocumentClick()
{
	var srcElement = window.event.srcElement;
	if (typeof(srcElement.title) != "undefined"&&srcElement.title.indexOf('clrDlg')==0){
		targetElement = window.event.srcElement;
		DisplayClrDlg(true);
	}
	else
	{
		while (srcElement && srcElement.id!="colorpanel")
		{
			srcElement = srcElement.parentElement;
		}
		if (!srcElement)
		{
			DisplayClrDlg(false);
		}
	}
}

function DisplayClrDlg(display)
{
	var clrPanel = document.getElementById("colorpanel");
	if (display)
	{
		var left = document.body.scrollLeft + event.clientX;
		var top = document.body.scrollTop + event.clientY;
		if (event.clientX+clrPanel.style.pixelWidth > document.body.clientWidth)
		{
			left -= clrPanel.style.pixelWidth;
		}
		if (event.clientY+clrPanel.style.pixelHeight > document.body.clientHeight)
		{
			top -= clrPanel.style.pixelHeight;
		}

		clrPanel.style.pixelLeft = left;
		clrPanel.style.pixelTop = top;
		clrPanel.style.display = "block";
	}
	else
	{
		clrPanel.style.display = "none";
	}
}
</script>
<div class="container" id="cpcontainer">
<!--当前导航-->
<script type="text/JavaScript">if(parent.$('admincpnav')) parent.$('admincpnav').innerHTML='后台首页&nbsp;&raquo;&nbsp;系统&nbsp;&raquo;&nbsp;站点配置';</script>
<?php
if($action=="boardsource")
{
?>
<form id="form1" name="form1" method="post" action="?action=modifysource" target="hiddensubmit">
<input type="hidden" name="id" id="id" value="" />
<input type="hidden" name="sort" id="sort" value="" />
<input type="hidden" name="info" id="info" value="" />
<input type="hidden" name="postfix" id="postfix" value="" />
<input type="hidden" name="flag" id="flag" value="" />
</form>
<form id="form2" name="form2" method="post" action="?action=save">
<table class="tb">
	<tr class="thead"><td colspan="4" class="td_title">播放来源管理</td></tr>
</table>
<table class="tb">
	<tr align="center" bgcolor="#f5fafe">
		<td  align="left" width="120">来源名称</td>
		<td width="100">排序</td>
        <td width="100">后缀</td>
		<td width="693">来源简介</td>
		<td width="196">操作</td>
	</tr>
<?php
	$xml = simplexml_load_file($playerKindsfile);
	if(!$xml){$xml = simplexml_load_string(file_get_contents($playerKindsfile));}
    $id=0;
	foreach($xml as $player){
    $id++;
?>
	<tr align="center"  bgcolor="#f5fafe">
    <td  align="left" ><input type="checkbox" class="checkbox"  name="e_id[]" value="<?php echo $id ?>"  checked /><input type="text" style="width:90px;  id="flag<?php echo $id ?>" name="flag<?php echo $id ?>" value="<?php  echo gbutf8($player['flag']); ?>"  /></td>
    <td><input type="text" id="sort<?php echo $id ?>" name="sort<?php echo $id ?>" value="<?php echo $player['sort']; ?>" style="width:50px;" maxlength="6" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onchange="this.onkeyup();"/></td>
            <td><input type="text" id="postfix<?php echo $id ?>" name="postfix<?php echo $id ?>" value="<?php echo $player['postfix']; ?>" style="width:80px;  onkeyup="this.value=this.value.replace(/[^\d|\w]/g,'');" onchange="this.onkeyup();" readonly="readonly" /></td>
		<td><textarea id="info<?php echo $id ?>" name="info<?php echo $id ?>" style="height:20px; width:500px;"><?php echo gbutf8($player->intro); ?></textarea></td>

		<td><a href="?action=modifysourceban&id=<?php echo $id; ?>" title="隐藏或显示">
        <?php 
        	if($player['open']==1)
            	echo "隐藏";
            else
            	echo "<font color=\"red\">显示</font>";
        ?></a>&nbsp;&nbsp;<a href="admin_editplayer.php?action=edit&filedir=../js/player/<?php  echo gbutf8($player['postfix']); ?>.html">修改播放代码</a>&nbsp;&nbsp;<a href="?action=delete&id=<?php echo $id ?>&playerfile=<?php echo gbutf8($player['postfix']); ?>" onclick="return confirm('确定要删除吗')">删除</a>
		</td>
	</tr>
 	<?php
    }
    ?>
	

<tr><td colspan="4">
<input type="checkbox" class="checkbox" id="chkall" onclick="checkAll(this.checked,'input','e_id[]')"/>全选 <input type="submit" name="submit" value="修改选中项" class="btn" /> <strong><font color="green" >
 * 排序需在网站设置中开启才生效，按数字从小到大排列</font></strong></td> <td></td> </tr>
</table>
</form>
<form method="post" action="?action=addnew">
<table class="tb" width="100%">
	<tr class="thead"><td  class="td_title">播放来源添加</td></tr>
</table>
<table class="tb">
	<tr align="center" bgcolor="#f5fafe">
		<td  align="left" width="86">来源名称</td>
		<td width="145">排序</td>
        <td width="100">后缀</td>
		<td width="693">来源简介</td>
		<td width="196">操作</td>
	</tr>

	<tr align="center" bgcolor="#f5fafe">

		<td><input name="playername" value="" size="10" /></td>
		<td><input name="order" value="0" size="10"  onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onchange="this.onkeyup();"/></td>
        <td><input name="trail" value="" size="10" onkeyup="this.value=this.value.replace(/[^\d|\w]/g,'');" onchange="this.onkeyup();"/></td>
		<td><textarea name="info" style="height:20px; width:500px;"></textarea></td>
		<td><input type="submit" value="保 存" /></td>
	</tr>

</table>
</form>

<iframe src="about:blank" name="hiddensubmit" width="0" height="0" frameborder="0"scrolling="no" style="display:none"></iframe>
</div>
<?php
}else{
?>





<form method="post" action="?action=edit">

<table class="tb">
<tr class="thead"><td colspan="2" class="td_title">播放器相关配置</td></tr>
<tr><td colspan="2" style="border-bottom:;"><div style="padding: 5px;border: 0;border-radius: 4px;color: #a15d5d;font-size: 12px;background-color: #eef5f4;"> 
播放地址中可填写指定符号扩展第二参数，云盘：密码(地址,密码)，弹幕播放：调用哔哩哔哩弹幕(地址,哔哩哔哩aid)，ckplayer和Dplayer：外挂字幕(地址|字幕地址)
</div></td></tr>
<tr>
<td>电脑端播放器宽度：</td>
<td><input type="text" name="playerwidth" size="10" value="<?php echo $playerWidth;?>" /></td>
</tr>

<tr>
<td >电脑端播放器高度：</td>
<td><input type="text" name="playerheight" size="10" value="<?php echo $playerHeight;?>" /></td>
</tr>
<tr>
<td >手机端播放器宽度：</td>
<td><input type="text" name="mplayerwidth" size="10" value="<?php echo $mplayerWidth;?>" /></td>
</tr>
<tr>

<td >手机端播放器高度：</td>
<td><input type="text" name="mplayerheight" size="10" value="<?php echo $mplayerHeight;?>" /></td>
</tr>

<tr>
<td >缓冲地址：</td>
<td><input type="text" name="adbeforeplay" size="60" value="<?php echo $playerBeforeAdUrl;?>" /></td>
</tr>

<tr>
<td >广告时间：</td>
<td><input type="text" name="adtimebeforeplay" size="15" value="<?php echo $playerBeforeTime;?>"onkeyup="value=value.replace(/[^1234567890]+/g,'');if(this.value==''){this.value=1};"/> (秒)</td>
</tr>

<tr>
<td >强制播放器</td>
<td>

<input type="radio" name="forcejx" value="no" <?php if($forcejx=="no") echo 'checked';?>>关闭
&nbsp;&nbsp;&nbsp;
<input type="radio" name="forcejx" value="jiexi" <?php if($forcejx=="jiexi") echo 'checked';?>>解析播放
&nbsp;&nbsp;&nbsp;
<input type="radio" name="forcejx" value="ck" <?php if($forcejx=="ck") echo 'checked';?>>CKplayer播放<font style="color:#CC3333;">[连播 外挂字幕]</font>
&nbsp;&nbsp;&nbsp;
<input type="radio" name="forcejx" value="dp" <?php if($forcejx=="dp") echo 'checked';?>>Dplayer播放<font style="color:#CC3333;">[全屏连播 记忆 试看 外挂字幕]</font>
&nbsp;&nbsp;&nbsp;
<input type="radio" name="forcejx" value="dm" <?php if($forcejx=="dm") echo 'checked';?>>弹幕播放<font style="color:#CC3333;">[弹幕 连播 记忆 试看]</font>
</td>
</tr>

<tr>
<td >强制播放器排除：</td>
<td><input type="text" name="unforcejx" size="60" value="<?php echo $unforcejx;?>"/>
不使用强制播放的后缀，格式：youku#yunpan</td>
</tr>



<tr class="thead"><td colspan="2" class="td_title">解析接口配置</td></tr>
<tr>
<td >解析接口A：</td>
<td>名称：<input type="text" name="jxAname" size="10" value="<?php echo $jxAname;?>" /> 地址：<input type="text" name="jxAapi" size="50" value="<?php echo $jxAapi;?>" /></td>
</tr>

<tr>
<td >解析接口B：</td>
<td>名称：<input type="text" name="jxBname" size="10" value="<?php echo $jxBname;?>" /> 地址：<input type="text" name="jxBapi" size="50" value="<?php echo $jxBapi;?>" /></td>
</tr>

<tr>
<td >解析接口C：</td>
<td>名称：<input type="text" name="jxCname" size="10" value="<?php echo $jxCname;?>" /> 地址：<input type="text" name="jxCapi" size="50" value="<?php echo $jxCapi;?>" /></td>
</tr>

<tr>
<td >解析接口D：</td>
<td>名称：<input type="text" name="jxDname" size="10" value="<?php echo $jxDname;?>" /> 地址：<input type="text" name="jxDapi" size="50" value="<?php echo $jxDapi;?>" /></td>
</tr>

<tr>
<td >解析接口E：</td>
<td>名称：<input type="text" name="jxEname" size="10" value="<?php echo $jxEname;?>" /> 地址：<input type="text" name="jxEapi" size="50" value="<?php echo $jxEapi;?>" /></td>
</tr>

<tr>
<td >解析接口F：</td>
<td>名称：<input type="text" name="jxFname" size="10" value="<?php echo $jxFname;?>" /> 地址：<input type="text" name="jxFapi" size="50" value="<?php echo $jxFapi;?>" /></td>
</tr>

<tr>
<td >解析接口G：</td>
<td>名称：<input type="text" name="jxGname" size="10" value="<?php echo $jxGname;?>" /> 地址：<input type="text" name="jxGapi" size="50" value="<?php echo $jxGapi;?>" /></td>
</tr>

<tr>
<td >解析接口H：</td>
<td>名称：<input type="text" name="jxHname" size="10" value="<?php echo $jxHname;?>" /> 地址：<input type="text" name="jxHapi" size="50" value="<?php echo $jxHapi;?>" /></td>
</tr>

<tr>
<td >解析接口I：</td>
<td>名称：<input type="text" name="jxIname" size="10" value="<?php echo $jxIname;?>" /> 地址：<input type="text" name="jxIapi" size="50" value="<?php echo $jxIapi;?>" /></td>
</tr>



</table>
<tr>
<td><div style="padding: 10px;border: 0;border-radius: 4px;font-size: 12px;background-color: #eef5f4;">
* 强制播放器为解析播放或者播放来源为解析播放（jiexi）时，接口才生效。<br>
* 解析接口留空表示关闭该接口，输入内容后自动开启该接口。如果需要删除某个接口，直接清空名称和接口地址内容即可。<br>
* 以上配置项如出现错误或无法修改，请手动修改/js/play.js文件。
</div></td>
</tr>
<tr><td></td><td><input type="submit" value="确认更新" class="btn" />&nbsp;<input type="button" value="返   回" class="btn" onClick="javascript:history.go(-1)" /><br><br></td></tr>

</table>

</form>

<?php
}
viewFoot();
?>
</body>
</html>