<!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);
    $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>电脑端播放器宽度：</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;
开启<input type="radio" name="forcejx" value="yes" <?php if($forcejx=="yes") echo 'checked';?>>
&nbsp;&nbsp;&nbsp;&nbsp;
开启后强制除下面排除列表外的所有播放器使用解析</td>
</tr>

<tr>
<td >强制解析排除：</td>
<td><input type="text" name="unforcejx" size="60" value="<?php echo $unforcejx;?>"/><br>
不使用强制解析的播放器，请填写播放器后缀，如多个播放器请用英文 # 隔开,如：youku#letv#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 ></td>
<td>
* 解析接口留空表示关闭该接口，输入内容后自动开启该接口。如果需要删除某个接口，直接清空名称和接口地址内容即可。<br>
* 接口对应的播放器为【解析线路】播放器，站长也可以灵活修改复用，参考/js/player/jiexi.html文件。<br>
* 以上配置项如出现错误或无法修改，请手动修改/js/play.js文件。
</td>
</tr>
</table>



<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>