function edit()
{
    global $db;
    $p_id = be("all", "p_id");
    if (!isN($p_id)) {
        $sql = "select * from {pre}cj_vod_projects where p_id = " . $p_id;
        $row = $db->getRow($sql);
        $p_name = $row["p_name"];
        $p_coding = $row["p_coding"];
        $p_playtype = $row["p_playtype"];
        $p_pagetype = $row["p_pagetype"];
        $p_url = $row["p_url"];
        $p_pagebatchurl = $row["p_pagebatchurl"];
        $p_manualurl = $row["p_manualurl"];
        $p_pagebatchid1 = $row["p_pagebatchid1"];
        $p_pagebatchid2 = $row["p_pagebatchid2"];
        $p_script = $row["p_script"];
        $p_collecorder = $row["p_collecorder"];
        $p_savefiles = $row["p_savefiles"];
        $p_intolib = $row["p_intolib"];
        $p_ontime = $row["p_ontime"];
        $p_server = $row["p_server"];
        $p_hitsstart = $row["p_hitsstart"];
        $p_hitsend = $row["p_hitsend"];
        $p_colleclinkorder = $row["p_colleclinkorder"];
        $p_showtype = $row["p_showtype"];
        unset($row);
    } else {
        $p_pagetype = 0;
    }
    ?>
<form action="?action=editstep1" method="post" id="form1" name="form1">
<INPUT id="p_id" name="p_id" type="hidden" value="<?php 
    echo $p_id;
    ?>
" >
<table class="tb">
    <tr>
      <td width="20%" >项目名称:</td>
      <td>
      	<INPUT id="p_name" name="p_name" size="50" value="<?php 
    echo $p_name;
    ?>
" >
	  </td>
    </tr>
    <tr>
    <td>采集过程方式:</td>
	 <td>
	  <input name="p_showtype" type="radio" value="0" <?php 
    if ($p_showtype == 0) {
        echo "checked";
    }
    ?>
>显示采集一个列表 &nbsp;&nbsp;
	  <input name="p_showtype" type="radio" value="1" <?php 
    if ($p_showtype == 1) {
        echo "checked";
    }
    ?>
>显示采集一条数据 &nbsp;&nbsp;
	</td>
	</tr>
   <tr>
	<td>采集参数:</td>
	<td>
  	<input id="p_collecorder" name="p_collecorder" type="checkbox" value="1" <?php 
    if ($p_collecorder == 1) {
        echo "checked";
    }
    ?>
>分页倒序采集 &nbsp;&nbsp;
  	<input id="p_colleclinkorder" name="p_colleclinkorder" type="checkbox" value="1" <?php 
    if ($p_colleclinkorder == 1) {
        echo "checked";
    }
    ?>
>列表倒序采集 &nbsp;&nbsp;
  	<input id="p_savefiles" name="p_savefiles" type="checkbox" value="1" <?php 
    if ($p_savefiles == 1) {
        echo "checked";
    }
    ?>
> 采集中保存图片(采集过程方式为:显示采集一条数据时使用)
	</td>
	</tr>
	<tr>
	<td>目标网页编码:</td>
	<td>&nbsp;
	<select id="p_coding" name="p_coding">
	<option value="GB2312" <?php 
    if ($p_coding == "GB2312") {
        echo "selected";
    }
    ?>
>GB2312</option>
	<option value="UTF-8" <?php 
    if ($p_coding == "UTF-8") {
        echo "selected";
    }
    ?>
>UTF-8</option>
	<option value="BIG5" <?php 
    if ($p_coding == "BIG5") {
        echo "selected";
    }
    ?>
>BIG5</option>
	</select>
	  </td>
    </tr>
    <tr>
      <td>播放器:</td>
      <td>
      	 &nbsp;<select id="p_playtype" name="p_playtype">
        <option value=''>暂没有数据</option>
        <?php 
    echo makeSelectPlayer($p_playtype);
    ?>
		</select>
	  </td>
    </tr>
    <tr>
      <td>服务器组:</td>
      <td>
      	 &nbsp;<select id="p_server" name="p_server">
        <option value='0'>无服务器组</option>
         <?php 
    echo makeSelectServer($p_server);
    ?>
        </select>
	  </td>
    </tr>
    <tr>
      <td>分页设置:</td>
      <td>
      	<input type="radio" value="0" id="p_pagetype" name="p_pagetype" checked="checked" onClick="ChangeCutPara(0);" <?php 
    if ($p_pagetype == 0) {
        echo "checked";
    }
    ?>
>
不分页&nbsp;&nbsp;
<input type="radio" value="1" id="p_pagetype" name="p_pagetype" onClick="ChangeCutPara(1);" <?php 
    if ($p_pagetype == 1) {
        echo "checked";
    }
    ?>
>
批量分页&nbsp;
<input type="radio" value="2" id="p_pagetype" name="p_pagetype" onClick="ChangeCutPara(2);" <?php 
    if ($p_pagetype == 2) {
        echo "checked";
    }
    ?>
>
手动分页&nbsp;
<input type="radio" value="3" id="p_pagetype" name="p_pagetype" onClick="ChangeCutPara(3);" <?php 
    if ($p_pagetype == 3) {
        echo "checked";
    }
    ?>
> 
按ID直接采集内容
	  </td>
    </tr>
    <tr ID="IndexCutPage" >
      <td>采集地址:</td>
      <td>
      	<INPUT id="p_url" name="p_url" size="50" value="<?php 
    echo $p_url;
    ?>
">
	  </td>
    </tr>
<tr ID="HandCutPage" style="display:none">
 <td><span id="CutPageName"></span>:</td>
 <td><input type="text"  name="p_pagebatchurl"  size="60" value="<?php 
    echo $p_pagebatchurl;
    ?>
"/>
 分页代码 <font color=red>{ID}</font><br>
标准格式:Http://www.xxxxx.com/list/list_{ID}.html<br>
采集范围:
<input name="p_pagebatchid1" type="text" value="<?php 
    echo $p_pagebatchid1;
    ?>
" size="4">
 To 
<input name="p_pagebatchid2" type="text" value="<?php 
    echo $p_pagebatchid2;
    ?>
" size="4">
例如:1 - 9</td>
 </tr>
 <tr ID="ListContent" style="display:none">
 <td>手动分页:</td>
 <td><textarea name="p_manualurl" cols="60" rows="3"><?php 
    echo $p_manualurl;
    ?>
</textarea></td>
 </tr>
 
 <tr>
 <td>随机人气:</td>
 <td>
  从&nbsp;<input id="p_hitsstart" name="p_hitsstart" type="text" size="4" value="<?php 
    echo $p_hitsstart;
    ?>
"> 
  到 &nbsp; <input id="p_hitsend" name="p_hitsend" type="text" size="4" value="<?php 
    echo $p_hitsend;
    ?>
"> 
  之间 (前小后大)
</td>
 </tr>
 <tr>
 <td>下一步显示源码:</td>
 <td>
  <input type="checkbox" class="checkbox" name="showcode" id="showcode" value="1"/>显示
</td>
 </tr>
 <tr>
 <td>过滤选项:</td>
 <td height=16 >
 <input name="p_script[]" type="checkbox" value="1" <?php 
    if (($p_script & 1) > 0) {
        echo "checked";
    }
    ?>
>
Iframe
<input name="p_script[]" type="checkbox" value="2" <?php 
    if (($p_script & 2) > 0) {
        echo "checked";
    }
    ?>
>
Object
<input name="p_script[]" type="checkbox" value="4" <?php 
    if (($p_script & 4) > 0) {
        echo "checked";
    }
    ?>
>
Script
<input name="p_script[]" type="checkbox" value="8" <?php 
    if (($p_script & 8) > 0) {
        echo "checked";
    }
    ?>
>
Div
<input name="p_script[]" type="checkbox" value="16" <?php 
    if (($p_script & 16) > 0) {
        echo "checked";
    }
    ?>
>
Class
<input name="p_script[]" type="checkbox" value="32" <?php 
    if (($p_script & 32) > 0) {
        echo "checked";
    }
    ?>
>
Table<br>
&nbsp;&nbsp; <br>
<input name="p_script[]" type="checkbox" value="64" <?php 
    if (($p_script & 64) > 0) {
        echo "checked";
    }
    ?>
>
Span
<input name="p_script[]" type="checkbox" value="128" <?php 
    if (($p_script & 128) > 0) {
        echo "checked";
    }
    ?>
>
Img
<input name="p_script[]" type="checkbox" value="256" <?php 
    if (($p_script & 256) > 0) {
        echo "checked";
    }
    ?>
>
Font
<input name="p_script[]" type="checkbox" value="512" <?php 
    if (($p_script & 512) > 0) {
        echo "checked";
    }
    ?>
>
A
<input name="p_script[]" type="checkbox" value="1024" <?php 
    if (($p_script & 1024) > 0) {
        echo "checked";
    }
    ?>
>
Tr
<input name="p_script[]" type="checkbox" value="2048" <?php 
    if (($p_script & 2048) > 0) {
        echo "checked";
    }
    ?>
>
Td
<input name="p_script[]" type="checkbox" value="4096" <?php 
    if (($p_script & 4096) > 0) {
        echo "checked";
    }
    ?>
>
Html
</td>
 	</tr>
	 <tr>
	<td  colspan="2"  ><input type="submit" class="btn" id="btnNext1" name="btnNext" value="下一步"></td>
	</tr>
</table>
</form>
<script language="JavaScript">
function ChangeCutPara(Flag)
{
	switch (Flag)
	{
	case 0 :
	$("#IndexCutPage").css("display","");
	$("#HandCutPage").css("display","none");
	$("#ListContent").css("display","none");
	break;
	case 1 :
	$("#IndexCutPage").css("display","none");
	$("#HandCutPage").css("display","");
	$("#ListContent").css("display","none");
	$("#CutPageName").html("批量分页");
	break;
	case 2 :
	$("#IndexCutPage").css("display","none");
	$("#HandCutPage").css("display","none");
	$("#ListContent").css("display","");
	break;
	case 3 :
	$("#IndexCutPage").css("display","none");
	$("#HandCutPage").css("display","");
	$("#ListContent").css("display","none");
	$("#CutPageName").html("按ID采集内容页");
	break;
	default :
	$("#IndexCutPage").css("display","none");
	$("#HandCutPage").css("display","none");
	$("#ListContent").css("display","none");
	break;
	}
}
ChangeCutPara(<?php 
    echo $p_pagetype;
    ?>
);
</script>
<?php 
}
Example #2
0
function info()
{
    global $db, $action;
    $backurl = getReferer();
    if (strpos($backurl, "admin_vod.php") <= 0) {
        $backurl = "admin_vod.php";
    }
    if ($action == "edit") {
        $d_id = be("get", "id");
        $row = $db->getRow("SELECT * FROM {pre}vod WHERE d_id=" . $d_id);
        if (!$row) {
            errmsg("系统信息", "错误没有找到该数据");
        } else {
            $d_name = $row["d_name"];
            $d_enname = $row["d_enname"];
            $d_state = $row["d_state"];
            $d_type = $row["d_type"];
            $d_color = $row["d_color"];
            $d_pic = $row["d_pic"];
            $d_starring = $row["d_starring"];
            $d_directed = $row["d_directed"];
            $d_area = $row["d_area"];
            $d_year = $row["d_year"];
            $d_language = $row["d_language"];
            $d_level = $row["d_level"];
            $d_stint = $row["d_stint"];
            $d_hits = $row["d_hits"];
            $d_dayhits = $row["d_dayhits"];
            $d_weekhits = $row["d_weekhits"];
            $d_monthhits = $row["d_monthhits"];
            $d_topic = $row["d_topic"];
            $d_content = $row["d_content"];
            $d_remarks = $row["d_remarks"];
            $d_hide = $row["d_hide"];
            $d_good = $row["d_good"];
            $d_bad = $row["d_bad"];
            $d_usergroup = $row["d_usergroup"];
            $d_score = $row["d_score"];
            $d_scorecount = $row["d_scorecount"];
            $d_addtime = $row["d_addtime"];
            $d_time = $row["d_time"];
            $d_hitstime = $row["d_hitstime"];
            $d_subname = $row["d_subname"];
            $d_playurl = $row["d_playurl"];
            $d_downurl = $row["d_downurl"];
            $d_playfrom = $row["d_playfrom"];
            $d_playserver = $row["d_playserver"];
            $d_letter = $row["d_letter"];
            $d_type_name = $row["d_type_name"];
            $d_pic_ipad = $row["d_pic_ipad"];
            $d_video_desc_url = $row["d_video_desc_url"];
            $duraning = $row["duraning"];
            $d_play_check = $row["d_play_check"];
            $can_play_device = $row["can_play_device"];
            $d_status = $row["d_status"];
            $can_search_device = $row["can_search_device"];
            $d_douban_id = $row["d_douban_id"];
            $d_capital_name = $row["d_capital_name"];
            if (isN($d_playurl)) {
                $d_playurl = "";
            }
            if (isN($d_video_desc_url)) {
                $d_video_desc_url = "";
            }
            if (isN($d_downurl)) {
                $d_downurl = "";
            }
            //			var_dump($d_downurl);
            $d_weburl = $row["webUrls"];
            if (isN($d_weburl)) {
                $d_weburl = "";
            }
            unset($row);
            if (!isNum($d_hide)) {
                $d_hide = -1;
            } else {
                $d_hide = intval($d_hide);
            }
            if (!isNum($d_play_check)) {
                $d_play_check = 0;
            } else {
                $d_play_check = intval($d_play_check);
            }
        }
    }
    ?>


<div id="win1" class="easyui-window" title="窗口"
	style="padding: 5px; width: 650px;" closed="true" minimizable="false"
	maximizable="false">
<table class="admin_vod tb">

	<tr>
		<td>视频地址:</td>
		<td><TEXTAREA id="tip" NAME="tip" ROWS="10"
			style="width: 500px; table-layout: fixed; word-wrap: break-word;"></TEXTAREA>
		</td>
	</tr>

</table>
</div>

<script
	language="javascript" src="editor/xheditor-zh-cn.min.js"></script>
<script language="javascript">
var ac = "<?php 
    echo $action;
    ?>
";
$(document).ready(function(){
	$("#form1").validate({
		rules:{
			d_type:{
				required:true
			},
			d_name:{
				required:true,
				maxlength:254
			},
			d_subname:{
				maxlength:254
			},
			d_enname:{
				maxlength:254
			},
			d_letter:{
				maxlength:1
			},
			d_state:{
				number:true
			},
			d_pic:{
				maxlength:254
			},
			d_starring:{
				maxlength:254
			},
			d_directed:{
				maxlength:254
			},
			d_year:{
				maxlength:32
			},
			d_hits:{
				number:true
			},
			d_dayhits:{
				number:true
			},
			d_weekhits:{
				number:true
			},
			d_monthhits:{
				number:true
			},
			d_good:{
				number:true
			},
			d_bad:{
				number:true
			},
			d_score:{
				number:true
			},
			d_scorecount:{
				number:true
			},
			d_stint:{
				number:true
			}
		}
	});
	$('#form1').form({
		onSubmit:function(){
			if(!$("#form1").valid()) {return false;}
		},
	    success:function(data){
	        if (ac=="add"){
		        $.messager.defaults.ok = "确定";
				$.messager.defaults.cancel = "返回";
				$.messager.confirm('系统提示', '是否继续添加数据?', function(r){
					if(r==true){
						location.href = "admin_vod.php?action=add";
					}
					else{
		        		location.href = $("#backurl").val();
		        	}
		        });
	        }
	        else{
	           if(data.indexOf('no') >-1){ 
	           alert("存在播放器为no,不能保存。");
			   }else {
				   location.href = $("#backurl").val();
			   }
	        	//
	        }
	    }
	});
	$("#btnCancel").click(function(){
		location.href = $("#backurl").val();
	});
});

	function collect(weburls,playerfrom){
		var urls=$("#"+weburls).val();
		var playerfrom=$("#"+playerfrom).val();
	//	alert(urls);
		$.post("admin_vod_getVideoUrls.php",{"weburls":urls,"playerfrom":playerfrom}, function(obj) {
			//oncomplete(obj);
			$("#tip").val(obj);
			$('#win1').window('open');
		});
		
	};

	function changeArea(prod_type,area,typename){
//	  alert(prod_type);alert(area);
//	  var areaArray=
//	  var content='<option value="0">请选择地区</option>';
      var content='';
	  if(prod_type =='1'){
		  content='内地,香港,台湾,美国,日本,韩国,欧洲,东南亚,其他';
	  }
	  if(prod_type =='2'){
		  content='内地,香港,台湾,韩国,美国,日本,其他';
	  }
	  if(prod_type =='3'){
		  content='港台,内地,日韩,欧美,其他';
	  }
	  if(prod_type =='131'){
		  content='日本,欧美,国产,其他';
	  }
	  var obj=$("#d_area_span");

	  obj[0].innerHTML=content;
//	  //alert(obj[0].innerHTML);
//	  for(var i=0;i<areaArray.length;i++){
//          if(area==areaArray[i]){
//        	  content=content+'<option value="'+area+'" selected="">'+area+'</option>';
//          }else {
//        	  content=content+'<option value="'+areaArray[i]+'" >'+areaArray[i]+'</option>';
//          }
//       }
//	  obj[0].innerHTML=content;

	//<input type="checkbox" name="can_search_device[]" value="TV" "checked" />TV版
	     var typenameContent='';
	     if(prod_type =='1'){
	    	 typeNameArray='恐怖,惊悚,悬疑,伦理,爱情,剧情,喜剧,科幻,动作,战争,冒险,音乐,动画,运动,奇幻,传记,古装,犯罪,武侠,其他'.split(',');
		  }
		  if(prod_type =='2'){
			  typeNameArray='剧情,情感,青春偶像,家庭伦理,喜剧,犯罪,战争,古装,动作,奇幻,经典,乡村,商战,历史,情景,TVB,其他'.split(',');
		  }
		  if(prod_type =='3'){
			  typeNameArray='综艺,选秀,情感,访谈,播报,旅游,音乐,美食,纪实,曲艺,生活,游戏互动,财经,求职,其他'.split(',');
		  }
		  if(prod_type =='131'){
			  typeNameArray='情感,科幻,热血,推理,搞笑,冒险,萝莉,校园,动作,机战,运动,耽美,战争,少年,少女,社会,原创,亲子,益智,励志,百合,其他'.split(',');
		  }
		  var typeNameobj=$("#d_type_name_span");
		  
		  for(var i=0;i<typeNameArray.length;i++){			 
			  var index =typename.indexOf(typeNameArray[i]);
			//  alert(typename + '==='+typeNameArray[i] +' ==' +index);
	          if( index >= 0 ){
		        //  alert('hear');
	        	  typenameContent=typenameContent+'<input type="checkbox" name="d_type_name[]" value="'+typeNameArray[i]+'" checked />'+typeNameArray[i];
	          }else {
	        	  typenameContent=typenameContent+'<input type="checkbox" name="d_type_name[]" value="'+typeNameArray[i]+'"  />'+typeNameArray[i];
	          }
	       }
		  typeNameobj[0].innerHTML=typenameContent;
	}

	
     
</script>

<form name="form1" id="form1" method="post" action="?action=save">
<table class="admin_vod_2 tb">
	<input name="flag" type="hidden" value="<?php 
    echo $action;
    ?>
">
	<input name="d_id" type="hidden" value="<?php 
    echo $d_id;
    ?>
">
	<input id="backurl" name="backurl" type="hidden"
		value="<?php 
    echo $backurl;
    ?>
">
	<tr>
		<td width="10%">参数:</td>
		<td><select id="d_type" name="d_type"
			onchange="changeArea(this.options[this.selectedIndex].value,'<?php 
    echo $d_area;
    ?>
','<?php 
    echo $d_type_name;
    ?>
');">
			<option value="">请选择栏目</option>
			<?php 
    echo makeSelectAll("{pre}vod_type", "t_id", "t_name", "t_pid", "t_sort", 0, "", "&nbsp;|&nbsp;&nbsp;", $d_type);
    ?>
		</select><select id="d_level" name="d_level">
			<option value="">选择推荐值</option>
			<option value="1" <?php 
    if ($d_level == 1) {
        echo "selected";
    }
    ?>
>推荐1</option>
			<option value="2" <?php 
    if ($d_level == 2) {
        echo "selected";
    }
    ?>
>推荐2</option>
			<option value="3" <?php 
    if ($d_level == 3) {
        echo "selected";
    }
    ?>
>推荐3</option>
			<option value="4" <?php 
    if ($d_level == 4) {
        echo "selected";
    }
    ?>
>推荐4</option>
			<option value="5" <?php 
    if ($d_level == 5) {
        echo "selected";
    }
    ?>
>推荐5</option>
			<option value="6" <?php 
    if ($d_level == 6) {
        echo "selected";
    }
    ?>
>推荐6</option>
			<option value="7" <?php 
    if ($d_level == 7) {
        echo "selected";
    }
    ?>
>推荐7</option>
			<option value="8" <?php 
    if ($d_level == 8) {
        echo "selected";
    }
    ?>
>推荐8</option>
		</select> &nbsp; <select id="d_language" name="d_language">
			<option value="0">请选择语言</option>
			<?php 
    echo makeSelectAreaLang("lang", $d_language);
    ?>
		</select><select id="d_hide" name="d_hide">
			<option value="0" <?php 
    if ($d_hide == 0) {
        echo "selected";
    }
    ?>
>显示</option>
			<option value="1" <?php 
    if ($d_hide == 1) {
        echo "selected";
    }
    ?>
>隐藏</option>
			<option value="-100" <?php 
    if ($d_hide == -100) {
        echo "selected";
    }
    ?>
>视频不能播放</option>
		</select> &nbsp;&nbsp;&nbsp;<a
			href="admin_vod_topic.php?action=info&id=<?php 
    echo $d_id;
    ?>
"><font
			color="red">所在榜单</font></a> &nbsp;&nbsp;&nbsp;视频ID: <?php 
    echo $d_id;
    ?>
&nbsp;&nbsp;&nbsp;<input
			type="checkbox" name="uptime" value="1" checked>更新时间 <input
			type="hidden" name="oldtime" value="<?php 
    echo $d_time;
    ?>
"></td>
	</tr>
	<tr>
		<td>名称:</td>
		<td><input id="d_name" name="d_name" type="text" size="40"
			value="<?php 
    echo $d_name;
    ?>
"
			onBlur="if(this.value){ajaxckname(this.value);}"><span id="d_name_ok"></span>
		&nbsp;名称首字母:<input id="d_capital_name" name="d_capital_name"
			type="text" size="40" value="<?php 
    echo $d_capital_name;
    ?>
">



		</td>
	</tr>
	<tr>
		<td>拼音:</td>
		<td><input id="d_enname" name="d_enname" type="text" size="40"
			value="<?php 
    echo $d_enname;
    ?>
"> &nbsp;备注:<input id="d_remarks"
			name="d_remarks" type="text" size="40"
			value="<?php 
    echo $d_remarks;
    ?>
"> &nbsp;连载信息:<input id="d_state"
			name="d_state" type="text" size="10" value="<?php 
    echo $d_state;
    ?>
"> <!--	&nbsp;&nbsp;&nbsp;播放设备:-->
		<!--	<select id="can_play_device" name="can_play_device">--> <!--	<option value="0" <?php 
    if ($can_play_device == 0) {
        echo "selected";
    }
    ?>
>所有设备</option>-->
		<!--	<option value="1" <?php 
    if ($can_play_device == 1) {
        echo "selected";
    }
    ?>
>只能ipad/iphone播放</option>-->
		<!--	<option value="2" <?php 
    if ($can_play_device == 2) {
        echo "selected";
    }
    ?>
>只能Android播放</option>-->
		<!--	</select>--></td>
	</tr>
	<tr>
		<td>演员:</td>
		<td><input id="d_starring" name="d_starring" type="text"
			size="40" value="<?php 
    echo $d_starring;
    ?>
"> &nbsp;导演:<input
			id="d_directed" name="d_directed" type="text" size="40"
			value="<?php 
    echo $d_directed;
    ?>
"> &nbsp;上映日期:<input id="d_year"
			name="d_year" type="text" value="<?php 
    echo $d_year;
    ?>
" size="10">
		&nbsp;豆瓣ID:<input id="d_douban_id" name="d_douban_id" type="text"
			value="<?php 
    echo $d_douban_id;
    ?>
" size="10">
	
	</tr>

	<tr>
		<td><font color="red"><strong>是否已经审核过:</strong></font></td>
		<td><select id="d_status" name="d_status">
			<option value="0" <?php 
    if ($d_status == 0) {
        echo "selected";
    }
    ?>
>未审核</option>
			<option value="1" <?php 
    if ($d_status == 1) {
        echo "selected";
    }
    ?>
>审核并锁定</option>
		</select> &nbsp;<font color="red"><strong>投放的设备:</strong></font> <?php 
    if (isN($can_search_device)) {
        $can_search_device = "iPad,iphone,web,apad,TV,aphone,Vendor";
    }
    ?>
 <input type="checkbox" name="can_search_device[]" value="TV"
		<?php 
    if (strpos($can_search_device, "TV") !== false) {
        echo "checked";
    }
    ?>
 />TV版
		<input type="checkbox" name="can_search_device[]" value="iPad"
		<?php 
    if (strpos($can_search_device, "iPad") !== false) {
        echo "checked";
    }
    ?>
 />iPad版
		<input type="checkbox" name="can_search_device[]" value="iphone"
		<?php 
    if (strpos($can_search_device, "iphone") !== false) {
        echo "checked";
    }
    ?>
 />iphone版
		<input type="checkbox" name="can_search_device[]" value="apad"
		<?php 
    if (strpos($can_search_device, "apad") !== false) {
        echo "checked";
    }
    ?>
 />Android-Pad版
		<input type="checkbox" name="can_search_device[]" value="aphone"
		<?php 
    if (strpos($can_search_device, "aphone") !== false) {
        echo "checked";
    }
    ?>
 />Android-phone版
		<input type="checkbox" name="can_search_device[]" value="web"
		<?php 
    if (strpos($can_search_device, "web") !== false) {
        echo "checked";
    }
    ?>
 />网站版
		<input type="checkbox" name="can_search_device[]" value="Vendor"
		<?php 
    if (strpos($can_search_device, "Vendor") !== false) {
        echo "checked";
    }
    ?>
 />Vendor版

		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color="red"><strong>播放时长:</strong></font>
		<input id="duraning" name="duraning" type="text"
			value="<?php 
    echo $duraning;
    ?>
" size="10"> <font color="red"><strong>(格式为:分钟:秒,例如:122:00)</strong></font>
		</td>
	</tr>


	<tr>
		<td>类别:</td>
		<td><span id="d_type_name_span"><?php 
    echo $d_type_name;
    ?>
</span>
		</td>
	</tr>
	<tr>
		<td>地区:</td>
		<td><input id="d_area" name="d_area" type="text" size="60"
			value="<?php 
    echo $d_area;
    ?>
">可以多个,以空格分开 <br />
		<span id='d_area_span'></span></td>
	</tr>

	<tr>
		<td>图片:</td>
		<td><input id="pic" name="pic" type="text" size="60"
			value="<?php 
    echo $d_pic;
    ?>
"><font color="red">(可以直接填写图片url地址)</font><iframe
			src="editor/uploadshow.php?action=vod" scrolling="no" topmargin="0"
			width="320" height="24" marginwidth="0" marginheight="0"
			frameborder="0" align="middle"></iframe></td>
	</tr>




	<tr>
		<td>图片 For IPad:</td>
		<td><input id="d_pic_ipad" name="d_pic_ipad" type="text"
			size="60" value="<?php 
    echo $d_pic_ipad;
    ?>
"><font color="red">(可以直接填写图片url地址)</font><iframe
			src="editor/uploadshow.php?action=vod" scrolling="no" topmargin="0"
			width="320" height="24" marginwidth="0" marginheight="0"
			frameborder="0" align="middle"></iframe> <br />
		<font color="red">备注:对于综艺悦榜里的视频,需要两种大图片,他们以逗号分开,格式为:综艺悦榜列表图片地址,综艺详细页面图片地址</font>
		</td>
	</tr>

	<tr>
		<td>短视频简介Url地址:</td>
		<td>&nbsp; <textarea id="d_video_desc_url" name="d_video_desc_url"
			style="width: 700px; height: 50px;"><?php 
    echo $d_video_desc_url;
    ?>
</textarea>
		<br />
		只用于微信 ,如果存在两个地址,按{Array}隔开。IOS/Android,其中android版的支持flash.</td>
	</tr>

	<tr>
		<td>其他:</td>
		<td>豆瓣评分:<input id="d_score" name="d_score" type="text" size="8"
			value="<?php 
    echo $d_score;
    ?>
"></td>
	</tr>
	<tr>
	<td>权限:</td>
	<td>
	&nbsp;收费积分:<input id="d_stint" name="d_stint" type="text" size="8" value="<?php 
    echo $d_stint;
    ?>
">
	&nbsp;可看会员组(向下兼容):
	<select id="d_usergroup" name="d_usergroup">
	<option value="0">请选择会员组</option>
	<?php 
    echo makeSelect("{pre}user_group", "ug_id", "ug_name", "", "", "&nbsp;|&nbsp;&nbsp;", $d_usergroup);
    ?>
	</select>
	</td>
	</tr>

	<tr>
		<td colspan="2" style="padding: 0">
		<div id="urlarr"><?php 
    $playnum = 0;
    if ($action == "edit") {
        if (isN($d_weburl)) {
            $d_weburl = "";
        }
        if (isN($d_playfrom)) {
            $d_playfrom = "";
        }
        $playurlarr1 = explode("\$\$\$", $d_weburl);
        $playfromarr = explode("\$\$\$", $d_playfrom);
        $playserverarr = explode("\$\$\$", $d_playserver);
        for ($i = 0; $i < count($playurlarr1); $i++) {
            if (!isN($playurlarr1[$i]) || $playfromarr[$i] === 'yuanxian') {
                $playnum = $i + 1;
                $playurl = replaceStr($playurlarr1[$i], "{Array}", Chr(13));
                $playfrom = $playfromarr[$i];
                $playserver = $playserverarr[$i];
                ?>
		<div id="playurldiv<?php 
                echo $playnum;
                ?>
" class="playurldiv">
		<table width="100%" class='tb2'>
			<tr>
				<td width='22%'>网页播放器<?php 
                echo $playnum;
                ?>
:</td>
				<td><input id="urlid<?php 
                echo $playnum;
                ?>
" name="urlid[]"
					type="hidden" value="<?php 
                echo $playnum;
                ?>
" /> &nbsp;播放器: <select
					id="urlfrom<?php 
                echo $playnum;
                ?>
" name="urlfrom[]">
					<option value="no">暂无数据</option>
					<?php 
                echo makeSelectPlayer($playfrom);
                ?>
				</select> &nbsp;&nbsp;<a href="javascript:void(0)"
					onclick="removeplay('<?php 
                echo $playnum;
                ?>
')">删除</a> &nbsp;&nbsp;<a
					href="javascript:void(0)" onclick="moveUp('<?php 
                echo $playnum;
                ?>
')">上移</a>
				&nbsp;&nbsp;<a href="javascript:void(0)"
					onclick="moveDown('<?php 
                echo $playnum;
                ?>
')">下移</a>
				说明:每行一个地址,不能有空行(如果是电视剧,剧集数$网页播放地址)。 <input type="button"
					value="采集视频地址" class="input"
					onclick="collect('url<?php 
                echo $playnum;
                ?>
','urlfrom<?php 
                echo $playnum;
                ?>
');return false;" />
				</td>
			</tr>
			<tr>
				<td>网页播放地址<?php 
                echo $playnum;
                ?>
:</td>
				<td><textarea id="url<?php 
                echo $playnum;
                ?>
" name="url[]"
					style="width: 700px; height: 150px;"><?php 
                echo $playurl;
                ?>
</textarea></td>
			</tr>
		</table>
		</div>
		<?php 
            }
        }
    }
    ?>
</div>
		</td>
	</tr>
	<tr>
		<td colspan="2"><img
			onClick="appendplay(<?php 
    echo $playnum + 1;
    ?>
,escape('<?php 
    echo replaceStr(makeSelectPlayer(""), "'", "\\'");
    ?>
'),escape('<?php 
    echo replaceStr(makeSelectServer(""), "'", "\\'");
    ?>
'))"
			src="../images/icons/edit_add.png" style="cursor: pointer" />&nbsp;&nbsp;单击按钮添加一组播放地址
		</td>
	</tr>

	<!--  play weburl address -->






	<!--  play weburl address -->


	<tr>

		<td colspan="2" style="padding: 0">
		<div id="downurlarr"><?php 
    if ($action == "edit") {
        $downurlarr1 = explode("\$\$\$", $d_downurl);
        $downurlarrcount = count($downurlarr1);
        for ($j = 0; $j < $downurlarrcount; $j++) {
            if (!isN($downurlarr1[$j])) {
                $downurlarr2 = explode("\$\$", $downurlarr1[$j]);
                $downnum = $j + 1;
                $downfrom = $downurlarr2[0];
                $downurl = replaceStr($downurlarr2[1], "{Array}", chr(13));
                //					$playfrom = $playfromarr[$j];
                //
                //					$playnum = $i + 1;
                //	                $playurl = replaceStr($playurlarr1[$i], "{Array}", Chr(13));
                //	                $playfrom = $playfromarr[$i];
                //	                $playserver = $playserverarr[$i];
                ?>
		<div id="downurldiv<?php 
                echo $downnum;
                ?>
" class="downurldiv">
		<table width="100%" class='tb2'>
			<tr>
				<td width='22%'>视频下载选择<?php 
                echo $downnum;
                ?>
:</td>
				<td><input id="downurlid<?php 
                echo $downnum;
                ?>
" name="downurlid[]"
					type="hidden" value="<?php 
                echo $downnum;
                ?>
" /> &nbsp;类型: <select
					id="downurlfrom<?php 
                echo $downnum;
                ?>
" name="downurlfrom[]">
					<option value="no">暂无数据</option>
					<?php 
                echo makeSelectPlayer($downfrom);
                ?>
				</select> &nbsp;&nbsp;<a href="javascript:void(0)"
					onclick="removedown('<?php 
                echo $downnum;
                ?>
')">删除</a> &nbsp;&nbsp;<a
					href="javascript:void(0)"
					onclick="moveUps('down','<?php 
                echo $downnum;
                ?>
')">上移</a>
				&nbsp;&nbsp;<a href="javascript:void(0)"
					onclick="moveDowns('down','<?php 
                echo $downnum;
                ?>
')">下移</a>
				说明:每行一个地址,不能有空行。(如果是电视剧,剧集数$视频地址)</td>
			</tr>
			<tr>
				<td>视频下载地址<?php 
                echo $downnum;
                ?>
:</td>
				<td><textarea id="downurl<?php 
                echo $downnum;
                ?>
" name="downurl[]"
					style="width: 700px; height: 150px;"><?php 
                echo $downurl;
                ?>
</textarea></td>
			</tr>
		</table>
		</div>
		<?php 
            }
        }
    }
    ?>
</div>
		</td>
	</tr>
	<tr>
		<td colspan="2"><img
			onClick="appenddown(<?php 
    echo $downnum + 1;
    ?>
,escape('<?php 
    echo replaceStr(makeSelectPlayer(""), "'", "\\'");
    ?>
'))"
			src="../images/icons/edit_add.png" style="cursor: pointer" />&nbsp;&nbsp;单击按钮添加一组下载地址
		</td>
	</tr>

	<tr>
		<td>相关介绍:</td>
		<td><textarea name="d_content" id="d_content"
			class="xheditor {tools:'BtnBr,Cut,Copy,Paste,Pastetext,Blocktag,Fontface,FontSize,Bold,Italic,Underline,Strikethrough,FontColor,BackColor,SelectAll,Removeformat,Align,List,Outdent,Indent,Link,Unlink,Img,Flash,Media,Table,Source,Fullscreen',width:'700',height:'200',upBtnText:'上传',html5Upload:false,upMultiple:1,upLinkUrl:'{editorRoot}upload.php?action=xht',upImgUrl:'{editorRoot}upload.php?action=xht'}"><?php 
    echo $d_content;
    ?>
</textarea>
		</td>
	</tr>
	<tr align="center">
		<td colspan="2"><input class="input" type="submit" value="保存"
			id="btnSave"> <input class="input" type="button" value="返回"
			id="btnCancel"></td>
	</tr>
</table>
</form>


<script language="javascript">
 changeArea('<?php 
    echo $d_type;
    ?>
','<?php 
    echo $d_area;
    ?>
','<?php 
    echo $d_type_name;
    ?>
');
</script>
		<?php 
    if ($playnum == 0) {
        ?>
<script>
	appendplay(1,escape("<?php 
        echo makeSelectPlayer("");
        ?>
"),escape("<?php 
        echo makeSelectServer("");
        ?>
"));
</script>
			<?php 
    }
    unset($rs);
}
Example #3
0
function edit()
{
    global $db;
    $m_id = be("get", "m_id");
    $sql = "select * from {pre}cj_vod where m_id=" . $m_id;
    $row = $db->getRow($sql);
    $m_name = $row["m_name"];
    $m_type = $row["m_type"];
    $m_typeid = $row["m_typeid"];
    $m_area = $row["m_area"];
    $m_playfrom = $row["m_playfrom"];
    $m_starring = $row["m_starring"];
    $m_directed = $row["m_directed"];
    $m_pic = $row["m_pic"];
    $m_content = $row["m_content"];
    $m_year = $row["m_year"];
    $m_urltest = $row["m_urltest"];
    $m_zt = $row["m_zt"];
    $m_playserver = $row["m_playserver"];
    $m_hits = $row["m_hits"];
    $m_state = $row["m_state"];
    $m_remarks = $row["m_remarks"];
    $m_language = $row["m_language"];
    $backurl = $_SERVER["HTTP_REFERER"];
    ?>
<script>
$(document).ready(function(){
	$("#form1").validate({
		rules:{
			m_name:{
				required:true,
				maxlength:255
			},
			m_typeid:{
				required:true
			},
			m_playfrom:{
				required:true
			},
			m_state:{
				number:true
			},
			m_remarks:{
				maxlength:255
			},
			m_starring:{
				maxlength:255
			},
			m_directed:{
				maxlength:255
			},
			m_year:{
				maxlength:32
			},
			m_hits:{
				number:true
			},
			m_area:{
				maxlength:32
			},
			m_language:{
				maxlength:32
			},
			m_typeid:{
				required:true
			}
		}
	});
});
</script>
<form id="form1" name="form1" action="?action=editsave" method="post">
	<input type="hidden" id="m_id" name="m_id" value="<?php 
    echo $m_id;
    ?>
">
	<input id="backurl" name="backurl" type="hidden" value="<?php 
    echo $backurl;
    ?>
">
	<table class=tb>
	<tr>
		<td width="70" >名称:</td>
		<td><input id="m_name" name="m_name" type="text" value="<?php 
    echo $m_name;
    ?>
" size="40">
		&nbsp;分类:<select name="m_typeid" id="m_typeid"  >
        <option value="">请选择数据分类</option>
            <?php 
    echo makeSelectAll("{pre}vod_type", "t_id", "t_name", "t_pid", "t_sort", 0, "", "&nbsp;|&nbsp;&nbsp;", $m_typeid);
    ?>
        </select>
        &nbsp;播放类型:<select name="m_playfrom">
		<option value=''>暂没有数据</option>
		<?php 
    echo makeSelectPlayer($m_playfrom);
    ?>
		</select> 
		&nbsp;服务器组:
		<select name="m_playserver">
		<option value=''>暂没有数据</option>
		<?php 
    echo makeSelectServer($m_playserver);
    ?>
		</select>
		</td>
    </tr>
    <tr>
	<td>连载:</td>
	<td><input id="m_state" name="m_state" type="text" value="<?php 
    echo $m_state;
    ?>
" size="50">
	&nbsp;备注:<input id="m_remarks" name="m_remarks" type="text" value="<?php 
    echo $m_remarks;
    ?>
" size="50">
	</td>
    </tr>
    <tr>
	<td>演员:</td>
	<td><input id="m_starring" name="m_starring" type="text" value="<?php 
    echo $m_starring;
    ?>
" size="50">
	&nbsp;导演:<input id="m_directed" name="m_directed" type="text" value="<?php 
    echo $m_directed;
    ?>
" size="50">
	</td>
    </tr>
    <tr>
	<td>上映:</td>
	<td><input id="m_year" name="m_year" type="text" value="<?php 
    echo $m_year;
    ?>
" size="50">
	&nbsp;人气:<input id="m_hits" name="m_hits" type="text" value="<?php 
    echo $m_hits;
    ?>
" size="50"> 
	</td>
    </tr>
    <tr>
	<td>地区:</td>
	<td>
	<input id="m_area" name="m_area" type="text" value="<?php 
    echo $m_area;
    ?>
" size="50">
	&nbsp;语言:<input id="m_language" name="m_language" type="text" value="<?php 
    echo $m_language;
    ?>
" size="50">
	</td>
	</tr>
	<tr>
	<td>类别:</td>
	<td>
	<input id="m_type" name="m_type" type="text" value="<?php 
    echo $m_type;
    ?>
" size="100">
	</td>
	</tr>
    <tr>
	<td>图片:</td>
	<td><input id="m_pic" name="m_pic" type="text" value="<?php 
    echo $m_pic;
    ?>
" size="113"> </td>
    </tr>
	<tr>
	<td>入库状态:</td>
	<td>
	<input type="radio" name="m_zt" value="0" <?php 
    if ($m_zt == 0) {
        echo "checked";
    }
    ?>
> 未入库
	<input type="radio" name="m_zt" value="1" <?php 
    if ($m_zt == 1) {
        echo "checked";
    }
    ?>
> 已入库
	</td>
	</tr>
	
	<tr>
	<td>播放页面地址:</td>
	<td>
	 <?php 
    echo $m_urltest;
    ?>
	</td>
	</tr>
	
    <tr>
	<td>播放地址:</td>
	<td>
	<?php 
    $sql = "Select * from {pre}cj_vod_url where u_movieid=" . $m_id . " order by u_id  asc";
    $i = 0;
    $rs = $db->query($sql);
    while ($row = $db->fetch_array($rs)) {
        $i = $i + 1;
        echo "<input type=\"text\" name=\"url" . $i . "\" size=10 value=\"" . $row["u_url"] . "\">  视频地址<input type=\"text\" name=\"videourl" . $i . "\" size=40 value=\"" . $row["iso_video_url"] . "\">&nbsp;网页地址<input type=\"text\" name=\"weburl" . $i . "\" size=40 value=\"" . $row["u_weburl"] . "\">&nbsp;剧集<input type=\"text\" name=\"setname" . $i . "\" size=25 value=\"" . $row["name"] . "\">&nbsp;第" . $i . "集&nbsp;&nbsp;&nbsp;<a href=\"?action=delurl&u_id=" . $row["u_id"] . "\"><font color=\"#FF0000\">删除</font></a><br>\r\n</hr>";
    }
    ?>
        </td>
    </tr>
    <tr>
		<td>介绍:</td>
		<td>
		<textarea id="m_content" name="m_content" style="width:750px;height:150px;"><?php 
    echo $m_content;
    ?>
</textarea>
		</td>
		</tr>
 	<tr>
		<td  colspan="2" >
		<input type="submit" class="btn" name="submit1" value="修 改">
		<input  type="button" class="btn" name="button" value="返 回" onClick="window.location.href='javascript:history.go(-1)'">
		</td>
	</tr>
</table>
</form>
<?php 
}
function main()
{
    ?>
<script language="javascript">
$(document).ready(function(){
	$("#btnDel").click(function(){
		if(confirm('确定要删除吗')){
			$("#form1").attr("action","admin_vod_batch.php?action=del");
			$("#form1").submit();
		}
		else{return false}
	});
	$("#btnDelPlay").click(function(){
		if($("#from").val()==""){
			alert("请选择要删除的播放器类型");
			return;
		}
		if(confirm('确定要删除吗')){
			$("#form1").attr("action","admin_vod_batch.php?action=delplay");
			$("#form1").submit();
		}
		else{return false}
	});
});

</script>
<form id="form1" name="form1" method="post">
<table class="tb">
	<tr>
	<td>
	<table width="96%" border="0" align="center" cellpadding="3" cellspacing="1">
	<tr>
	<td colspan="2">
	过滤条件:<select id="stype" name="stype">
	<option value="0">视频栏目</option>
	<option value="-1">没有栏目</option>
	<?php 
    echo makeSelectAll("{pre}vod_type", "t_id", "t_name", "t_pid", "t_sort", 0, "", "&nbsp;|&nbsp;&nbsp;", "");
    ?>
	</select>
	&nbsp;
	<select id="state" name="state">
	<option value="0">视频连载</option>
	<option value="1">连载中</option>
	<option value="2">未连载</option>
	</select>
	&nbsp;
	<select id="level" name="level">
	<option value="0">视频推荐</option>
	<option value="1">推荐1</option>
	<option value="2">推荐2</option>
	<option value="3">推荐3</option>
	<option value="4">推荐4</option>
	<option value="5">推荐5</option>
	</select>
	&nbsp;
	<select id="topic" name="topic">
	<option value="0">视频专题</option>
	<?php 
    echo makeSelect("{pre}vod_topic", "t_id", "t_name", "t_sort", "", "&nbsp;|&nbsp;&nbsp;", "");
    ?>
	</select>
	&nbsp;
	<select id="sserver" name="sserver">
	<option value="">视频服务器</option>
	<?php 
    echo makeSelectServer("");
    ?>
	</select>
	&nbsp;
	<select id="from" name="from">
	<option value="">视频播放器</option>
	<?php 
    echo makeSelectPlayer("");
    ?>
	</select>
	&nbsp;
	<select id="spic" name="spic">
	<option value="0">视频图片</option>
	<option value="1">无图片</option>
	<option value="2">远程图片</option>
	</select>
	&nbsp;
	<select id="hide" name="hide">
	<option value="-1">视频显隐</option>
	<option value="0">显示</option>
	<option value="1">隐藏</option>
	</select>
	</td>
	</tr>
	<tr>
	<td colspan="6">
		<input class="input" type="button" value="批量删除数据" id="btnDel">
		<input class="input" type="button" value="批量删除播放组" id="btnDelPlay">
	</td>
	</tr>
	</table>
	</td>
	</tr>
</table>
</form>
<?php 
}