function main()
{
    global $db, $template, $cache;
    $loginname = getCookie("adminname");
    $keyword = be("all", "keyword");
    $stype = be("all", "stype");
    $area = be("all", "area");
    $topic = be("all", "topic");
    $level = be("all", "level");
    $from = be("all", "from");
    $sserver = be("all", "sserver");
    $sstate = be("all", "sstate");
    $repeat = be("all", "repeat");
    $repeatlen = be("all", "repeatlen");
    $order = be("all", "order");
    $pagenum = be("all", "page");
    $sort = be("all", "sort");
    $spic = be("all", "spic");
    $hide = be("all", "hide");
    $d_status = be("all", "d_status");
    $douban_score = be("all", "douban_score");
    $ipadpic = be("all", "ipadpic");
    $d_douban_id = be("all", "d_douban_id");
    $can_search_device = be("all", "can_search_device");
    if (!isNum($level)) {
        $level = 0;
    } else {
        $level = intval($level);
    }
    if (!isNum($sstate)) {
        $sstate = 0;
    } else {
        $sstate = intval($sstate);
    }
    if (!isNum($stype)) {
        $stype = 0;
    } else {
        $stype = intval($stype);
    }
    if (!isNum($area)) {
        $area = 0;
    } else {
        $area = intval($area);
    }
    if (!isNum($topic)) {
        $topic = 0;
    } else {
        $topic = intval($topic);
    }
    if (!isNum($spic)) {
        $spic = 0;
    } else {
        $spic = intval($spic);
    }
    if (!isNum($ipadpic)) {
        $ipadpic = 0;
    } else {
        $ipadpic = intval($ipadpic);
    }
    if (!isNum($hide)) {
        $hide = -1;
    } else {
        $hide = intval($hide);
    }
    if (!isNum($douban_score)) {
        $douban_score = 0;
    } else {
        $douban_score = intval($douban_score);
    }
    if (!isNum($repeatlen)) {
        $repeatlen = 0;
    }
    if (!isNum($d_status)) {
        $d_status = -1;
    } else {
        $d_status = intval($d_status);
    }
    if (isNum($d_douban_id)) {
        $d_douban_id = intval($d_douban_id);
    }
    if (!isNum($pagenum)) {
        $pagenum = 1;
    } else {
        $pagenum = intval($pagenum);
    }
    if ($pagenum < 1) {
        $pagenum = 1;
    }
    $where = " d_type in (1,2,3,131) ";
    $keyword_col = be("all", "keyword_col");
    if (!isN($keyword)) {
        $keyword = trim($keyword);
        if (isN($keyword_col)) {
            $where .= " AND ( d_directed like '%" . $keyword . "%' or d_starring like '%" . $keyword . "%' or d_name like '%" . $keyword . "%' or d_enname like '%" . $keyword . "%'   ) ";
        } else {
            $where .= " AND " . $keyword_col . " like '%" . $keyword . "%' ";
        }
    }
    if ($stype > 0) {
        $typearr = getValueByArray($cache[0], "t_id", $stype);
        if (is_array($typearr)) {
            $where = $where . " and d_type in (" . $typearr["childids"] . ")";
        } else {
            $where .= " AND d_type=" . $stype . " ";
        }
    }
    if ($stype == -1) {
        $where .= " AND d_type=0 ";
    }
    if ($area > 0) {
        $where .= " AND d_area = " . $area . " ";
    }
    if ($topic > 0) {
        $where .= " AND d_topic = " . $topic . " ";
    }
    if ($level > 0) {
        $where .= " AND d_level = " . $level . " ";
    }
    if ($sstate == 1) {
        $where .= " AND d_state>0 ";
    } else {
        if ($sstate == 2) {
            $where .= " AND d_state=0 ";
        }
    }
    if ($hide != -1) {
        $where .= " AND d_hide=" . $hide . " ";
    }
    if ($d_douban_id == -1) {
        $where .= " AND d_douban_id=" . $d_douban_id . " ";
    } else {
        if ($d_douban_id == 1) {
            $where .= " AND d_douban_id >0 ";
        } else {
            if ($d_douban_id == 2) {
                $where .= " AND d_douban_id =0 ";
            }
        }
    }
    if ($d_status != -1) {
        $where .= " AND d_status=" . $d_status . " ";
    }
    if ($douban_score == 1) {
        $where .= " AND d_score >0 ";
    }
    if ($douban_score == 2) {
        $where .= " AND d_score <=0 ";
    }
    if ($stype == 1 || $stype == 2) {
        $douban_scoreT = "block";
    } else {
        $douban_scoreT = "none";
    }
    if (!isN($can_search_device)) {
        //    	if($can_search_device ==='TV'){
        //    		$where .= " AND can_search_device like '%TV%' ";
        //    	}else {
        //    		$where .= " AND (can_search_device like '".$can_search_device."' or can_search_device is null or can_search_device ='' ) ";
        //    	}
        $where .= " AND (can_search_device like '" . $can_search_device . "' or can_search_device is null or can_search_device ='' ) ";
    }
    if ($repeat == "ok") {
        $repeatSearch = " d_name ";
        if ($repeatlen > 0) {
            $repeatSearch = " substring(d_name,1," . $repeatlen . ") ";
        }
        $repeatsql = " , (SELECT " . $repeatSearch . " as d_name1 FROM {pre}vod GROUP BY d_name1 HAVING COUNT(*)>1) as `t2` ";
        $where .= " AND `{pre}vod`.`d_name`=`t2`.`d_name1` ";
        if (isN($order)) {
            $order = "d_name,d_addtime";
        }
    }
    $douban_comment = be("all", "douban_comment");
    if (!isNum($douban_comment)) {
        $douban_comment = 0;
    } else {
        $douban_comment = intval($douban_comment);
    }
    if ($douban_comment == 1) {
        $where .= " and d_id in (SELECT DISTINCT content_id FROM tbl_comments WHERE author_id IS NULL AND thread_id IS NULL) ";
    }
    if ($douban_comment == 2) {
        $where .= " and d_id not in (SELECT DISTINCT content_id FROM tbl_comments WHERE author_id IS NULL AND thread_id IS NULL) ";
    }
    if (isN($order)) {
        $orders = "d_time desc ";
    } else {
        if (!isN($sort)) {
            $orders = $order . ' ' . $sort;
        }
    }
    if (!isN($sserver)) {
        $where .= " AND d_playserver like '%" . $sserver . "%' ";
    }
    if (!isN($from)) {
        $where .= " and d_playfrom like  '%" . $from . "%' ";
    }
    if ($spic == 1) {
        $where .= " AND d_pic = '' ";
    } else {
        if ($spic == 2) {
            $where .= " and  d_pic not like '%joyplus%' and d_pic!=''  ";
        }
    }
    if ($ipadpic == 1) {
        $where .= " AND (d_pic_ipad = ''  or d_pic_ipad is null )";
    } else {
        if ($ipadpic == 2) {
            $where .= " AND d_pic_ipad not like '%joyplus%' and d_pic_ipad != '' ";
        }
    }
    $select_weburl = be("all", "select_weburl");
    $select_videourl = be("all", "select_videourl");
    $select_videourl_play = be("all", "select_videourl_play");
    if (!isNum($select_videourl_play)) {
        $select_videourl_play = -1;
    } else {
        $select_videourl_play = intval($select_videourl_play);
    }
    if ($select_videourl_play == 0) {
        $where .= " AND d_play_check = 0 ";
    }
    if ($select_videourl_play == 2) {
        $where .= " AND d_play_check = 2 ";
    }
    if ($select_videourl_play == 1) {
        $where .= " AND d_play_check = 1 ";
    }
    if ($select_weburl == 1) {
        $where .= " AND webUrls is not null and webUrls !='' ";
    }
    if ($select_weburl == 2) {
        $where .= " AND (webUrls is null or  webUrls ='') ";
    }
    if ($select_videourl == 1) {
        $where .= " AND d_downurl is not null and d_downurl !='' ";
    }
    if ($select_videourl == 2) {
        $where .= " AND (d_downurl is null or d_downurl ='') ";
    }
    $sql = "SELECT count(*) FROM {pre}vod " . $repeatsql . " where " . $where;
    $nums = $db->getOne($sql);
    $pagecount = ceil($nums / app_pagenum);
    //$sql = "SELECT d_year,d_id, d_name, d_enname, d_play_num,d_type,d_state,d_topic, d_level, d_hits, d_time,d_remarks,d_playfrom,d_hide,p.id as popular_id FROM {pre}vod ".$repeatsql." left join {pre}vod_popular as p on p.vod_id=d_id  WHERE" . $where . " ORDER BY " . $orders . "  limit ".(app_pagenum * ($pagenum-1)) .",".app_pagenum;
    $sql = "SELECT d_year,d_id, d_name, d_enname, d_play_num,d_type,d_state,d_topic, d_level, d_hits, d_time,d_remarks,d_playfrom,d_hide FROM {pre}vod " . $repeatsql . "  WHERE" . $where . " ORDER BY " . $orders . "  limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum;
    // var_dump($sql);
    $rs = $db->query($sql);
    ?>


<script type="text/javascript" src="./resource/thickbox-compressed.js"></script>
<script type="text/javascript" src="./resource/thickbox.js"></script>
<link href="./resource/thickbox.css" rel="stylesheet" type="text/css" />
<script language="javascript">
$(document).ready(function(){
	$("#form1").validate({
		rules:{
			repeatlen:{
				number:true,
				max:10
			}
		}
	});
	
	$("#btnrepeat").click(function(){
		var repeatlen = $("#repeatlen").val();
		var reg = /^\d+$/;
		var re = repeatlen.match(reg);
		if (!re){ repeatlen=0; }
		if (repeatlen >20){ alert("长度最大20");$("#repeatlen").focus();return;}
		var url = "admin_vod.php?repeat=ok&repeatlen=" + repeatlen;
		window.location.href=url;
	});
	$("#btnDel").click(function(){
			if(confirm('确定要删除吗')){
				$("#form1").attr("action","admin_vod.php?action=del");
				$("#form1").submit();
			}
			else{return false}
	});
	$("#plsc").click(function(){
		var ids="",rc=false;
		$("input[name='d_id']").each(function() {
			if(this.checked){
				if(rc)ids+=",";
				ids =  ids + this.value;
				rc=true;
			}
        });
		$("#form1").attr("action","admin_makehtml.php?acton=viewpl&flag=vod&d_id="+ids);
		$("#form1").submit();
	});
});
function filter(){
	var stype=$("#stype").val();
	var order=$("#order").val();
	var from=$("#from").val();
	var sort=$("#sort").val();
	var keyword=$("#keyword").val();
	var keyword_col=$("#keyword_col").val();
	var can_search_device=$("#can_search_device").val();
	var url = "admin_online_subscribe.php?can_search_device="+can_search_device+"&keyword_col="+keyword_col+"&sort="+sort+"&keyword="+encodeURI(keyword)+"&stype="+stype+"&order="+order+"&from="+from; //ipadpic
	window.location.href=url;
}


function prepareWeiboText(type,id,name){
	   document.getElementById( "weiboText").value= name; 
	   document.getElementById( "notify_msg_prod_id").value= id; 
	   document.getElementById( "notify_msg_prod_type").value= type; 
	   $('#SendWeiboMsg').empty();
}


function sendWeiboText(){

	
	var weibotxt= document.getElementById( "weiboText").value;
	var notify_msg_prod_id= document.getElementById( "notify_msg_prod_id").value;
	var notify_msg_prod_type= document.getElementById( "notify_msg_prod_type").value;
	var urlT='admin_vod.php?action=notifyMsg&prod_type='+notify_msg_prod_type+'&prod_id='+notify_msg_prod_id+'&content=' +encodeURIComponent(weibotxt) ;
	var channels= document.getElementById( "channel[]");
	alert(channels);
	for(var i = 0; i < channels.length; i++){
		 if (channels[i].checked == true) {
			  urlT = urlT +'&channels='+channels[i].value;				 		 
		  }
	}
		 $.post(urlT, {Action:"post"}, function (data, textStatus){     
			  if(textStatus == "success"){   
	          //alert(data);
				  $('#SendWeiboMsg').empty().append(data);
	           }else{
	        	   $('#SendWeiboMsg').empty().append('发送失败。');
	           }
	       });
	
    // alert(urlT);
	 
}

</script>
<table class="admin_online_subscribe tb">
	<tr>
	<td>
	<table width="96%" border="0" align="center" cellpadding="3" cellspacing="1">
	<tr>
	<td colspan="2">
	过滤条件:<select id="stype" name="stype" onchange="javascript:{var typeid= this.options[this.selectedIndex].value; if(typeid=='1' ||  typeid=='2'){document.getElementById('btnsearchs').style.display='block';  document.getElementById('btnsearchsThumbs').style.display='block';document.getElementById('btnsearchsComment').style.display='block';}else {document.getElementById('btnsearchs').style.display='none'; document.getElementById('btnsearchsThumbs').style.display='none';document.getElementById('btnsearchsComment').style.display='none';}}">
	<option value="0">视频栏目</option>
	<option value="-1" <?php 
    if ($stype == -1) {
        echo "selected";
    }
    ?>
>没有栏目</option>
	<?php 
    echo makeSelectAll("{pre}vod_type", "t_id", "t_name", "t_pid", "t_sort", 0, "", "&nbsp;|&nbsp;&nbsp;", $stype);
    ?>
	</select>
	&nbsp;
	
	<select id="order" name="order">
	<option value="d_time">视频排序</option>
	<option value="d_id" <?php 
    if ($order == "d_id") {
        echo "selected";
    }
    ?>
>视频编号</option>
	<option value="d_name" <?php 
    if ($order == "d_name") {
        echo "selected";
    }
    ?>
>视频名称</option>
	<option value="d_play_num" <?php 
    if ($order == "d_play_num") {
        echo "selected";
    }
    ?>
>播放次数</option>
	<option value="d_year" <?php 
    if ($order == "d_year") {
        echo "selected";
    }
    ?>
>上映日期</option>
	</select>
	&nbsp;<select id="sort" name="sort">
	<option value="desc" <?php 
    if ($sort == "desc") {
        echo "selected";
    }
    ?>
>视频排序 降序序</option>
	<option value="asc" <?php 
    if ($sort == "asc") {
        echo "selected";
    }
    ?>
>视频排序  升序</option>
	</select>
	
	
	&nbsp;
	<select id="from" name="from">
	<option value="">视频播放器</option>
	<?php 
    echo makeSelectPlayer($from);
    ?>
	</select>
	
	 <select   id="can_search_device" name="can_search_device">
	    <option value="" >投放设备</option>
		<option value="TV" <?php 
    if ($can_search_device === 'TV') {
        echo "selected";
    }
    ?>
>TV版</option>
		<option value="iPad" <?php 
    if ($can_search_device === 'iPad') {
        echo "selected";
    }
    ?>
>iPad版</option>
		<option value="iphone" <?php 
    if ($can_search_device === 'iphone') {
        echo "selected";
    }
    ?>
>iphone版</option>
		<option value="apad" <?php 
    if ($can_search_device === 'apad') {
        echo "selected";
    }
    ?>
>Android-Pad版</option>
		<option value="aphone" <?php 
    if ($can_search_device === 'aphone') {
        echo "selected";
    }
    ?>
>Android-Phone版</option>
		<option value="web" <?php 
    if ($can_search_device === 'web') {
        echo "selected";
    }
    ?>
>网站版</option>
	</select> 
	
	</td>
	</tr>
	<tr>
	<td colspan="4">
	关键字:<input id="keyword" size="40" name="keyword" value="<?php 
    echo $keyword;
    ?>
">&nbsp;
	<select id="keyword_col" name="keyword_col">
	<option value="">关键字的匹配列</option>
	<option value="d_name" <?php 
    if ($keyword_col == "d_name") {
        echo "selected";
    }
    ?>
>视频名称</option>
	<option value="d_starring" <?php 
    if ($keyword_col == "d_starring") {
        echo "selected";
    }
    ?>
>演员</option>
	<option value="d_directed" <?php 
    if ($keyword_col == "d_directed") {
        echo "selected";
    }
    ?>
>导演</option>
	</select>
	<input class="input" type="button" value="搜索" id="btnsearch" onClick="filter();">
	
	</td>
	
	</tr>
	</table>
	</td>
	</tr>
</table>

<form id="form1" name="form1" method="post">
<table class="tb">
	<tr>
	<td width="10%">编号</td>
	<td width="25%">名称</td>
	<td width="10%">播放次数</td>
	<td width="10%">上映日期</td>
	<td width="5%">分类</td>
	<td width="20%">时间</td>
	<td width="20%">操作</td>
	</tr>
	<?php 
    if ($nums == 0) {
        ?>
	<tr><td align="center" colspan="12">没有任何记录!</td></tr>
	<?php 
    } else {
        while ($row = $db->fetch_array($rs)) {
            $d_id = $row["d_id"];
            $tname = "未知";
            $tenname = "";
            $typearr = getValueByArray($cache[0], "t_id", $row["d_type"]);
            if (is_array($typearr)) {
                $tname = $typearr["t_name"];
                $tenname = $typearr["t_enname"];
            }
            ?>
    <tr>
	<td><?php 
            echo $d_id;
            ?>
</td>
	<td><?php 
            echo substring($row["d_name"], 20);
            ?>
	<?php 
            if ($row["d_state"] > 0) {
                echo "<font color=\"red\">[" . $row["d_state"] . "]</font>";
            }
            ?>
	<?php 
            if (!isN($row["d_remarks"])) {
                echo "<font color=\"red\">[" . $row["d_remarks"] . "]</font>";
            }
            ?>
	<?php 
            if ($row["d_hide"] == 1) {
                echo "<font color=\"red\">[隐藏]</font>";
            }
            ?>
	</td>
	<td><?php 
            echo $row["d_play_num"];
            ?>
</td>
	<td><?php 
            echo $row["d_year"];
            ?>
</td>
	<td><?php 
            echo $tname;
            ?>
</td>
	<td><?php 
            echo isToday($row["d_time"]);
            ?>
</td>
	<td><a href="admin_vod_topic.php?action=info&id=<?php 
            echo $d_id;
            ?>
">所在榜单</a> |
	<a class="thickbox" href="#TB_inline?height=400&width=600&inlineId=myOnPageContent" onclick="javascript:{prepareWeiboText('<?php 
            echo $row["d_type"];
            ?>
','<?php 
            echo $d_id;
            ?>
','<?php 
            echo substring($row["d_name"], 20);
            ?>
');}" > 消息推送</a>	 </td>
    </tr>
	<?php 
        }
    }
    ?>
<!--	<tr>-->
<!--	<td colspan="12">-->
<!--	全选<input name="chkall" type="checkbox" id="chkall" value="1" onClick="checkAll(this.checked,'d_id[]');"/>&nbsp;-->
<!--    批量操作:<input type="button" id="btnDel" value="删除" class="input">-->
<!--	<input type="button" id="pltj" value="推荐" onClick="plset('pltj','vod')" class="input">-->
<!--	<input type="button" id="plfl" value="分类" onClick="plset('plfl','vod')" class="input">-->
<!--	<input type="button" id="plzt" value="专题" onClick="plset('plzt','vod')" class="input">-->
<!--	<input type="button" id="plluobo" value="轮播图" onClick="plsetLuobo()" class="input">-->
<!--	<input type="button" id="plbd" value="视频悦单" onClick="plsetBD('plbd','vod','1')" class="input">-->
<!--	<input type="button" id="plbd" value="视频悦榜" onClick="plsetBD('plbd','vod','2')" class="input">-->
<!--	<input type="button" id="plrq" value="人气" onClick="plset('plrq','vod')" class="input">-->
<!--	<input type="button" id="plsc" value="生成" class="input">-->
<!--	<input type="button" id="plyc" value="显隐" onClick="plset('plyc','vod')" class="input">-->
<!--	<span id="plmsg" name="plmsg"></span>-->
<!--	</td>-->
<!--	</tr>-->
	<tr class="formlast">
	<td align="center" colspan="12">
	<?php 
    echo pagelist_manage($pagecount, $pagenum, $nums, app_pagenum, "admin_online_subscribe.php?page={p}&can_search_device=" . $can_search_device . "&keyword=" . urlencode($keyword) . "&keyword_col=" . $keyword_col . "&sort=" . $sort . "&order=" . $order . "&stype=" . $stype . "&from=" . $from);
    ?>
	</td>
	</tr>
</table>

</form>
<div id="myOnPageContent" style="display:none">
<script language="javascript">

$('#form2').form({
	success:function(data){
		$('#SendWeiboMsg').empty().append(data);
		$("#btnEdit").attr("disabled",false); 		
    }
});

$("#btnEdit").click(function(){
	if(confirm('确定要推送消息吗')){
		$("#form2").attr("action","?action=notifyMsg");
		var weibotxt= $("#weiboText").val();
		$("#btnEdit").attr("disabled",true); 
		if(weibotxt ==''){
          alert("发送内容不能为空。");
          $("#btnEdit").attr("disabled",false); 
          return;
		}

		if(weibotxt.length>=110){
	          alert("你发送的内容太长,不能超过110个字符。");
	          $("#btnEdit").attr("disabled",false); 
	          return;
		}
		var prod_id= $("#notify_msg_prod_id").val();
		
		var prod_type= $("#notify_msg_prod_type").val();
		 $('#SendWeiboMsg').empty().append('正在推送消息.....<br/>');
		var urlT='admin_online_subscribe.php?action=notifyMsg&notify_msg_prod_type='+prod_type+'&notify_msg_prod_id='+prod_id+'&content=' +encodeURIComponent(weibotxt) ;
		var channels=document.getElementsByName("channel[]");
		var channelFlag=true;
		var index=0;
		var indexSelect=0;
		for(var i = 0; i < channels.length; i++){
			 if (channels[i].checked == true) {
				  channelFlag=false;
				  indexSelect++;
				  urlTs = urlT +'&channel='+channels[i].value;	
				 // alert(channels[i].value);	
				  $.post(urlTs, {Action:"post"}, function (data, textStatus){     
					  if(textStatus == "success"){ 
						  index++;  
			          //alert(data);
						  $('#SendWeiboMsg').append(data).append('<br/>');
			           }else{
			        	   index++;  
			        	   $('#SendWeiboMsg').append('发送失败。').append('<br/>');
			           }
					  if( index==indexSelect){			  
						     $("#btnEdit").attr("disabled",false); 
						     $('#SendWeiboMsg').append('推送消息完成。').append('<br/>');
				      }
			       });	 		 
			  }
		}
		if(channelFlag){
			alert('你必须要选择一个频道发送');
	    }
	   
	    
		//$("#form2").submit();
		
	}
});
</script>
<form id="form2"  name="form1" method="post">
<table class="table" cellpadding="0" cellspacing="0" width="100%" border="0">

                <thead class="tb-tit-bg">
<!--                   <tr>-->
<!--                        <td > <h3 class="title">    发送设备:<select name="device_type" id="device_type" >                       -->
<!--                             <option value="" >所有设备</option>-->
<!--                             <option value="ios" >IOS</option>-->
<!--                             <option value="android" >Android</option>                          -->
<!--                        </select> -->
<!--                        </h3></td>    -->
<!--                      -->
<!--                    </tr>-->
                    <tr>
                        <td colspan="2"><span><h3>发送信息</h3></span></td>    
                       
                    </tr>
                    <input type="hidden" name="notify_msg_prod_id" id="notify_msg_prod_id" value="">
                    <input type="hidden" name="notify_msg_prod_type" id="notify_msg_prod_type" value="">
                      
                      <tr>
                        <td colspan="2" align="center"><textarea name="wbText" id="weiboText" rows="10" cols="90"></textarea></td>
                    </tr>
                     <tr>
                        <td align="left"> <br/>
                            Parse 云推送<br/>
	                        &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_ANDROID"   />悦视频 Android版<br/>
<!--						    &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_TV"  />悦视频 TV版<br/>-->
						    &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_IOS"  />悦视频 IOS版<br/>
						    &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_IPHONE"  />今晚剧场iphone版<br/>
						    &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_IPAD"  />今晚剧场IPAD版<br/>
                        </td>
                         <td align="left"> <br/>
                                                                         百度云推送<br/>
	                        &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_ANDROID_BAIDU"   />悦视频 Android版<br/>
<!--						    &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_TV_BAIDU"  />悦视频 TV版<br/>-->
						    &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_IOS_BAIDU"  />悦视频 IOS版<br/>
						    &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_IPHONE_BAIDU"  />今晚剧场iphone版<br/>
						    &nbsp;&nbsp;&nbsp;&nbsp;<input type="checkbox" id='channel[]' name="channel[]" value="CHANNEL_IPAD_BAIDU"  />今晚剧场IPAD版<br/>
                        </td>
                    </tr>
                      <tr>
                         <td align="center" colspan="2"><input type="button" value="发送消息" id="btnEdit"  class="input"  /></td>
                      </tr>
                        <tr>
                        <td align="left" colspan="2">  <font color=red><span id="SendWeiboMsg"></span></font></td>    
                       
                    </tr> 
                    
                </thead>
            </table>
</form>
</div>
<?php 
    if ($pagenum == 1 && $where == " 1=1 ") {
        echo "<script>showpic();</script>";
    }
    unset($rs);
}
function View()
{
    $d_id = be("all", "id");
    global $db;
    ?>

<table class="admin_vod_feedback tb" width="50%">
	<tr>
	<td  width="5%"></td>
	<td width="40%">反馈类别</td>
	<td>反馈次数</td>
	</tr>
	
<?php 
    for ($i = 1; $i <= 10; $i++) {
        if ($i == 8) {
            continue;
        }
        ?>
 <tr><td></td>
	<td><select id="feedback_types" name="feedback_types" disabled>
	<option value="9" <?php 
        if ($i == "9") {
            echo "selected";
        }
        ?>
>程序反馈影片无法播放</option>
	<option value="1" <?php 
        if ($i == "1") {
            echo "selected";
        }
        ?>
>用户反馈影片无法播放</option>
	<option value="2" <?php 
        if ($i == "2") {
            echo "selected";
        }
        ?>
>用户反馈影片播放不流畅</option>
	<option value="3" <?php 
        if ($i == "3") {
            echo "selected";
        }
        ?>
>用户反馈影片加载比较慢</option>
	<option value="4" <?php 
        if ($i == "4") {
            echo "selected";
        }
        ?>
>用户反馈影片不能下载</option>
	<option value="5" <?php 
        if ($i == "5") {
            echo "selected";
        }
        ?>
>用户反馈观看影片时出现闪退</option>
	<option value="6" <?php 
        if ($i == "6") {
            echo "selected";
        }
        ?>
>用户反馈画质不清晰</option>
	<option value="7" <?php 
        if ($i == "7") {
            echo "selected";
        }
        ?>
>用户反馈音画不同步</option>
	<option value="8" <?php 
        if ($i == "8") {
            echo "selected";
        }
        ?>
>用户反馈其它(用户自己填写,可不填)</option>
	<option value="10" <?php 
        if ($i == "10") {
            echo "selected";
        }
        ?>
>程序反馈视频地址失效</option>
	</select></td>
	<td><?php 
        echo $db->getOne("select count(*) as count from tbl_video_feedback where feedback_type like '%" . $i . "%' and prod_id=" . $d_id);
        ?>
</td>
	</tr>
 <?php 
    }
    ?>
</table>
<table class="admin_vod_feedback tb" width="50%">
	<tr>
	<td colspan="3">反馈类别:其它(用户自己填写,可不填)</td>
	</tr>
	<tr>
	<td  width="5%"></td>
	<td>反馈时间</td>
	<td>反馈内容</td>
	</tr>
	
	<?php 
    $rs = $db->query("select * from tbl_video_feedback where feedback_type like '%8%' and prod_id=" . $d_id);
    while ($row = $db->fetch_array($rs)) {
        ?>
      <tr><td  width="5%"></td>
		<td width="40%"><?php 
        echo isToday($row["create_date"]);
        ?>
</td>
		<td><?php 
        echo substring($row["feedback_memo"], 20);
        ?>
</td>
	 </tr>
    <?php 
    }
    unset($rs);
    ?>
	</table>
<?php 
    echo '</body>
</html>';
}
function main()
{
    global $db, $cache, $parse_appid_restkey;
    $topic_id = be("all", "topic_id");
    $flag = be("all", "flag");
    if (!isNum($topic_id)) {
        $topic_id = 0;
    } else {
        $topic_id = intval($topic_id);
    }
    if (!isNum($flag)) {
        $flag = -1;
    } else {
        $flag = intval($flag);
    }
    $where = " 1=1 ";
    $where .= " AND a.topic_id =" . $topic_id;
    if ($flag == 1) {
        $where .= " AND a.flag =1 ";
    }
    if ($flag == 0) {
        $where .= " AND a.flag =0 ";
    }
    $pagenum = be("all", "page");
    if (!isNum($pagenum)) {
        $pagenum = 1;
    } else {
        $pagenum = intval($pagenum);
    }
    if ($pagenum < 1) {
        $pagenum = 1;
    }
    $sql = "SELECT count(a.prod_id) FROM {pre}vod_pasre_item a,{pre}vod vod where  a.prod_id=vod.d_id and vod.favority_user_count >0 ";
    $nums = $db->getOne($sql);
    $pagecount = ceil($nums / app_pagenum);
    $sql = "SELECT a.channels as channels, vod.d_remarks ,vod.d_state,a.d_status as status,a.id as id, a.create_date as create_date, vod.favority_user_count as favority_user_count, vod.d_name as vod_name,vod.d_id as vod_id FROM {pre}vod_pasre_item a,{pre}vod vod where  a.prod_id=vod.d_id and vod.favority_user_count >0 order by vod.favority_user_count desc, a.d_status asc, a.create_date desc limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum;
    //var_dump($sql);
    $rs = $db->query($sql);
    ?>
<script language="javascript">
function filter(){
	var topic_id=$("#topic_id").val();
	var st_flag  =$("#st_flag").val();
	var url = "admin_vod_topic_items.php?topic_id="+topic_id+"&flag="+st_flag;
	window.location.href=url;
}

$(document).ready(function(){
	
	$('#form1').form({
		onSubmit:function(){
			if(!$("#form1").valid()) {return false;}
		},
	    success:function(data){
	        $.messager.alert('系统提示', data, 'info',function(){
	        	location.href=location.href;
	        });
	    }
	});
	
	$("#btnDel").click(function(){
			if(confirm('确定要删除吗')){
				$("#form1").attr("action","admin_ajax.php?action=del&flag=batch&tab={pre}vod_pasre_item");
				$("#form1").submit();
			}
			else{return false}
	});
	$("#btnEdit").click(function(){
		if(confirm('确定要推送消息吗')){
			var url='admin_subscribe.php?action=editall&ids=';
			var channels=document.getElementsByName("ids[]");
			var channelFlag=true;
			var ids='';
			for(var i = 0; i < channels.length; i++){
				 if (channels[i].checked == true) {
					  channelFlag=false;
					  ids=channels[i].value+","+ids;
			     }
		    }
			if(channelFlag){
				alert("你至少需要选择一个视频");
		    }else {
		    	location.href=url+ids;		    	
		    }
		    
//			location.href
			
		}
	});
//	$("#btnAdd").click(function(){
//		window.location.href="admin_vod.php?topic_id=<?php 
    echo $topic_id;
    ?>
";
//	});
	$("#btnCancel").click(function(){		
		location.href= location.href;
	});
});
function edit(id)
{
	$('#form2').form('clear');
	$("#flag").val("edit");
	$('#win1').window('open');
	$('#form2').form('load','admin_ajax.php?action=getinfo&tab={pre}vod_topic&col=t_id&val='+id);
}
</script>



<table class="admin_subscribe tb">
<form action="" method="post" id="form1" name="form1">
	<tr>
	<td width="5%">&nbsp;</td>
	<td width="10%">视频ID</td>
	<td>视频名称</td>
	<td>推送应用</td>
	<td width="15%">更新时间</td>
	<td width="5%">追剧人数</td>
	<td width="5%">操作</td>
	</tr>
	<?php 
    if ($nums == 0) {
        ?>
    <tr><td align="center" colspan="7">没有任何记录!</td></tr>
    <?php 
    } else {
        while ($row = $db->fetch_array($rs)) {
            $t_id = $row["id"];
            ?>
    <tr>
	  <td>
	  <input name="ids[]" type="checkbox" id="ids" value="<?php 
            echo $t_id;
            ?>
" /></td>
      <td><?php 
            echo $row["vod_id"];
            ?>
 </td>     
      <td><a href="admin_vod.php?action=edit&id=<?php 
            echo $row["vod_id"];
            ?>
">
      <?php 
            echo $row["vod_name"];
            ?>
</a>
      
      <?php 
            if ($row["d_state"] > 0) {
                echo "<font color=\"red\">[" . $row["d_state"] . "]</font>";
            }
            ?>
	<?php 
            if (!isN($row["d_remarks"])) {
                echo "<font color=\"red\">[" . $row["d_remarks"] . "]</font>";
            }
            ?>
      </td>
	   <td> <?php 
            $tempChannels = $row["channels"];
            //$parse_appid_restkey
            if (isN($tempChannels)) {
                echo '所有应用';
            } else {
                $tempChannels = explode(",", $tempChannels);
                foreach ($tempChannels as $tChannel) {
                    echo '[' . $parse_appid_restkey[$tChannel]['appname'] . '] ';
                }
            }
            ?>
</td>
	 
	  <td>
	   <?php 
            echo isToday($row["create_date"]);
            ?>
</td>
	  <td>
	 
	  <?php 
            echo $row["favority_user_count"];
            ?>
	  </td>
      <td>	
	 
	  <a href="admin_ajax.php?action=del&tab={pre}vod_pasre_item&ids=<?php 
            echo $t_id;
            ?>
" onClick="return confirm('确定要删除吗?');">删除</a></td>
    </tr>
	<?php 
        }
    }
    ?>
	<tr class="formlast">
	<td  colspan="8"><input type="checkbox" name="chkall" id="chkall" class="checkbox" onClick="checkAll(this.checked,'ids[]')" /> 全选 
	<input type="button" value="批量删除" id="btnDel" class="input"  />
	&nbsp;<input type="button" value="发送消息" id="btnEdit" class="input" />
	
	</td></tr>
    <tr align="center" class="formlast">
	<td colspan="8">
		<?php 
    echo pagelist_manage($pagecount, $pagenum, $nums, app_pagenum, "admin_subscribe.php?page={p}&topic_id=" . $topic_id . "&flag=" . $flag);
    ?>
	</td>
    </tr>
</table>
</form>

</body>
</html>
<?php 
    unset($rs);
}
Example #4
0
function printDay($i, $eventDaysArray)
{
    // wenn Heute UND ein Event ist, beide Klassen hinzufügen
    if (isToday($i) && isEvent($eventDaysArray, $i)) {
        echo "<td class='today' class='eventDay'>" . $i . "</td>";
    } elseif (isToday($i)) {
        echo "<td class='today'>" . $i . "</td>";
    } elseif (isEvent($eventDaysArray, $i)) {
        echo "<td class='eventDay'>" . $i . "</td>";
    } else {
        echo "<td>" . $i . "</td>";
    }
}
Example #5
0
function getPrice($symbol, $date)
{
    if (isToday($date) == true) {
        $url = 'http://finance.yahoo.com/q/ecn?s=' . $symbol;
        if (($file = fopen($url, "r")) == false) {
            return -1;
        }
        $r = "";
        do {
            $data = fread($file, 8192);
            $r .= $data;
        } while (strlen($data) != 0);
        $idx = strpos($r, 'Last Trade:', 0);
        $idx = strpos($r, '<b>', $idx);
        $end = strpos($r, '</b>', $idx);
        $val = substr($r, $idx + 3, $end - $idx - 3);
        if (is_numeric($val) == false) {
            return -1;
        }
        return $val;
    } else {
        $mm = intval(substr($date, 5, 2)) - 1;
        $dd = substr($date, 8, 2);
        $yyyy = substr($date, 0, 4);
        $url = 'http://finance.yahoo.com/q/hp?s=' . $symbol . '&a=' . $mm . '&b=' . $dd . '&c=' . $yyyy . '&d=' . $mm . '&e=' . $dd . '&f=' . $yyyy . '&g=d';
        if (($file = fopen($url, "r")) == false) {
            return -1;
        }
        $r = "";
        do {
            $data = fread($file, 8192);
            $r .= $data;
        } while (strlen($data) != 0);
        $idx = strpos($r, '>Adj Close*<', 0);
        $idx = strpos($r, '<td class=', $idx);
        $idx = strpos($r, '<td class=', $idx + 1);
        $idx = strpos($r, '<td class=', $idx + 1);
        $idx = strpos($r, '<td class=', $idx + 1);
        $idx = strpos($r, '<td class=', $idx + 1);
        $idx = strpos($r, '<td class=', $idx + 1);
        $idx = strpos($r, '<td class=', $idx + 1);
        $idx = strpos($r, '>', $idx);
        $end = strpos($r, '</td>', $idx);
        $val = substr($r, $idx + 1, $end - $idx - 1);
        if (is_numeric($val) == false) {
            return -1;
        }
        return $val;
    }
}
Example #6
0
function main()
{
    global $db, $template, $cache;
    $loginname = getCookie("adminname");
    $keyword = be("all", "keyword");
    $stype = be("all", "stype");
    $area = be("all", "area");
    $topic = be("all", "topic");
    $level = be("all", "level");
    $from = be("all", "from");
    $sstate = be("all", "sstate");
    $repeat = be("all", "repeat");
    $repeatlen = be("all", "repeatlen");
    $order = be("all", "order");
    $pagenum = be("all", "page");
    $sort = be("all", "sort");
    $spic = be("all", "spic");
    $hide = be("all", "hide");
    $d_status = be("all", "d_status");
    $douban_score = be("all", "douban_score");
    $ipadpic = be("all", "ipadpic");
    $d_douban_id = be("all", "d_douban_id");
    $can_search_device = be("all", "can_search_device");
    if (!isNum($level)) {
        $level = 0;
    } else {
        $level = intval($level);
    }
    if (!isNum($sstate)) {
        $sstate = 0;
    } else {
        $sstate = intval($sstate);
    }
    if (!isNum($stype)) {
        $stype = 0;
    } else {
        $stype = intval($stype);
    }
    if (!isNum($area)) {
        $area = 0;
    } else {
        $area = intval($area);
    }
    if (!isNum($topic)) {
        $topic = 0;
    } else {
        $topic = intval($topic);
    }
    if (!isNum($spic)) {
        $spic = 0;
    } else {
        $spic = intval($spic);
    }
    if (!isNum($ipadpic)) {
        $ipadpic = 0;
    } else {
        $ipadpic = intval($ipadpic);
    }
    if (!isNum($hide)) {
        $hide = -1;
    } else {
        $hide = intval($hide);
    }
    if (!isNum($douban_score)) {
        $douban_score = 0;
    } else {
        $douban_score = intval($douban_score);
    }
    if (!isNum($repeatlen)) {
        $repeatlen = 0;
    }
    if (!isNum($d_status)) {
        $d_status = -1;
    } else {
        $d_status = intval($d_status);
    }
    if (isNum($d_douban_id)) {
        $d_douban_id = intval($d_douban_id);
    }
    if (!isNum($pagenum)) {
        $pagenum = 1;
    } else {
        $pagenum = intval($pagenum);
    }
    if ($pagenum < 1) {
        $pagenum = 1;
    }
    $where = " d_type in (1,2,3,131,5) ";
    $keyword_col = be("all", "keyword_col");
    if (!isN($keyword)) {
        $keyword = trim($keyword);
        if (isN($keyword_col)) {
            $where .= " AND ( d_directed like '%" . $keyword . "%' or d_starring like '%" . $keyword . "%' or d_name like '%" . $keyword . "%' or d_enname like '%" . $keyword . "%'   ) ";
        } else {
            $where .= " AND " . $keyword_col . " like '%" . $keyword . "%' ";
        }
    }
    if ($stype > 0) {
        $typearr = getValueByArray($cache[0], "t_id", $stype);
        if (is_array($typearr)) {
            $where = $where . " and d_type in (" . $typearr["childids"] . ")";
        } else {
            $where .= " AND d_type=" . $stype . " ";
        }
    }
    if ($stype == -1) {
        $where .= " AND d_type=0 ";
    }
    if ($area > 0) {
        $where .= " AND d_area = " . $area . " ";
    }
    if ($topic > 0) {
        $where .= " AND d_topic = " . $topic . " ";
    }
    if ($level > 0) {
        $where .= " AND d_level = " . $level . " ";
    }
    if ($sstate == 1) {
        $where .= " AND d_state>0 ";
    } else {
        if ($sstate == 2) {
            $where .= " AND d_state=0 ";
        }
    }
    if ($hide != -1) {
        $where .= " AND d_hide=" . $hide . " ";
    }
    if ($d_douban_id == -1) {
        $where .= " AND d_douban_id=" . $d_douban_id . " ";
    } else {
        if ($d_douban_id == 1) {
            $where .= " AND d_douban_id >0 ";
        } else {
            if ($d_douban_id == 2) {
                $where .= " AND d_douban_id =0 ";
            }
        }
    }
    if ($d_status != -1) {
        $where .= " AND d_status=" . $d_status . " ";
    }
    if ($douban_score == 1) {
        $where .= " AND d_score >0 ";
    }
    if ($douban_score == 2) {
        $where .= " AND d_score <=0 ";
    }
    if ($stype == 1 || $stype == 2) {
        $douban_scoreT = "block";
    } else {
        $douban_scoreT = "none";
    }
    if (!isN($can_search_device)) {
        $where .= " AND (can_search_device like '%" . $can_search_device . "%' or can_search_device is null or can_search_device ='' ) ";
    }
    if ($repeat == "ok") {
        $repeatSearch = " d_name ";
        if ($repeatlen > 0) {
            $repeatSearch = " substring(d_name,1," . $repeatlen . ") ";
        }
        $repeatsql = " , (SELECT " . $repeatSearch . " as d_name1 FROM {pre}vod GROUP BY d_name1 HAVING COUNT(*)>1) as `t2` ";
        $where .= " AND `{pre}vod`.`d_name`=`t2`.`d_name1` ";
        if (isN($order)) {
            $order = "d_name,d_addtime";
        }
    }
    $douban_comment = be("all", "douban_comment");
    if (!isNum($douban_comment)) {
        $douban_comment = 0;
    } else {
        $douban_comment = intval($douban_comment);
    }
    if ($douban_comment == 1) {
        $where .= " and d_id in (SELECT DISTINCT content_id FROM tbl_comments WHERE author_id IS NULL AND thread_id IS NULL) ";
    }
    if ($douban_comment == 2) {
        $where .= " and d_id not in (SELECT DISTINCT content_id FROM tbl_comments WHERE author_id IS NULL AND thread_id IS NULL) ";
    }
    if (isN($order)) {
        $orders = "d_time desc ";
    } else {
        if (!isN($sort)) {
            $orders = $order . ' ' . $sort;
        }
    }
    if (!isN($from)) {
        $where .= " and d_playfrom like  '%" . $from . "%' ";
    }
    if ($spic == 1) {
        $where .= " AND d_pic = '' ";
    } else {
        if ($spic == 2) {
            $where .= " and  d_pic not like '%joyplus%' and d_pic!=''  ";
        }
    }
    if ($ipadpic == 1) {
        $where .= " AND (d_pic_ipad = ''  or d_pic_ipad is null )";
    } else {
        if ($ipadpic == 2) {
            $where .= " AND d_pic_ipad not like '%joyplus%' and d_pic_ipad != '' ";
        }
    }
    $select_weburl = be("all", "select_weburl");
    $select_videourl = be("all", "select_videourl");
    $select_videourl_play = be("all", "select_videourl_play");
    if (!isNum($select_videourl_play)) {
        $select_videourl_play = -1;
    } else {
        $select_videourl_play = intval($select_videourl_play);
    }
    if ($select_videourl_play == 0) {
        $where .= " AND d_play_check = 0 ";
    }
    if ($select_videourl_play == 2) {
        $where .= " AND d_play_check = 2 ";
    }
    if ($select_videourl_play == 1) {
        $where .= " AND d_play_check = 1 ";
    }
    if ($select_weburl == 1) {
        $where .= " AND webUrls is not null and webUrls !='' ";
    }
    if ($select_weburl == 2) {
        $where .= " AND (webUrls is null or  webUrls ='') ";
    }
    if ($select_videourl == 1) {
        $where .= " AND d_downurl is not null and d_downurl !='' ";
    }
    if ($select_videourl == 2) {
        $where .= " AND (d_downurl is null or d_downurl ='') ";
    }
    $sql = "SELECT count(*) FROM {pre}vod " . $repeatsql . " where " . $where;
    $nums = $db->getOne($sql);
    $pagecount = ceil($nums / app_pagenum);
    //$sql = "SELECT d_year,d_id, d_name, d_enname, d_play_num,d_type,d_state,d_topic, d_level, d_hits, d_time,d_remarks,d_playfrom,d_hide,p.id as popular_id FROM {pre}vod ".$repeatsql." left join {pre}vod_popular as p on p.vod_id=d_id  WHERE" . $where . " ORDER BY " . $orders . "  limit ".(app_pagenum * ($pagenum-1)) .",".app_pagenum;
    $sql = "SELECT d_year,d_id, d_name, d_enname, d_play_num,d_type,d_state,d_topic, d_level, d_hits, d_time,d_remarks,d_playfrom,d_hide FROM {pre}vod " . $repeatsql . "  WHERE" . $where . " ORDER BY " . $orders . "  limit " . app_pagenum * ($pagenum - 1) . "," . app_pagenum;
    //	var_dump($sql);
    $rs = $db->query($sql);
    ?>


<script
	type="text/javascript" src="./resource/thickbox-compressed.js"></script>
<script
	type="text/javascript" src="./resource/thickbox.js"></script>
<link
	href="./resource/thickbox.css" rel="stylesheet" type="text/css" />
<script language="javascript">
$(document).ready(function(){
	$("#form1").validate({
		rules:{
			repeatlen:{
				number:true,
				max:10
			}
		}
	});
	
	$("#btnrepeat").click(function(){
		var repeatlen = $("#repeatlen").val();
		var reg = /^\d+$/;
		var re = repeatlen.match(reg);
		if (!re){ repeatlen=0; }
		if (repeatlen >20){ alert("长度最大20");$("#repeatlen").focus();return;}
		var url = "admin_vod.php?repeat=ok&repeatlen=" + repeatlen;
		window.location.href=url;
	});
	$("#btnDel").click(function(){
			if(confirm('确定要删除吗')){
				$("#form1").attr("action","admin_vod.php?action=del");
				$("#form1").submit();
			}
			else{return false}
	});
	
});
function filter(){
	var stype=$("#stype").val();
	var state=$("#state").val();
	var order=$("#order").val();
	var level=$("#level").val();
	var topic=$("#topic").val();
	var sserver=$("#sserver").val();
	var from=$("#from").val();
	var spic=$("#spic").val();
	var hide=$("#hide").val();
	var ipadpic=$("#ipadpic").val();
	var sort=$("#sort").val();
	
	
	var select_weburl=$("#select_weburl").val();
	var select_videourl=$("#select_videourl").val();
	var douban_score =$("#douban_score").val();
	var douban_comment =$("#douban_comment").val();
	var select_videourl_play=$("#select_videourl_play").val();
	var keyword=$("#keyword").val();	
	var d_status=$("#d_status").val();	
	var d_douban_id=$("#d_douban_id").val();
	var keyword_col=$("#keyword_col").val();
	var can_search_device=$("#can_search_device").val();
	var url = "admin_vod.php?can_search_device="+can_search_device+"&d_douban_id="+d_douban_id+"&keyword_col="+keyword_col+"&d_status="+d_status+"&sort="+sort+"&select_videourl_play="+select_videourl_play+"&douban_comment="+douban_comment+"&keyword="+encodeURI(keyword)+"&stype="+stype+"&topic="+topic+"&select_weburl="+select_weburl+"&select_videourl="+select_videourl+"&level="+level+"&order="+order+"&sserver="+sserver+"&sstate="+state+"&from="+from+"&spic="+spic+"&hide="+hide+"&douban_score="+douban_score+"&ipadpic="+ipadpic; //ipadpic
	window.location.href=url;
}

function doubans(){
	var stype=$("#stype").val();
	var state=$("#state").val();
	var order=$("#order").val();
	var level=$("#level").val();
	var topic=$("#topic").val();
	var sserver=$("#sserver").val();
	var from=$("#from").val();
	var spic=$("#spic").val();
	var hide=$("#hide").val();
	var sort=$("#sort").val();
	var ipadpic=$("#ipadpic").val();
	var douban_score =$("#douban_score").val();
	var select_weburl=$("#select_weburl").val();
	var select_videourl=$("#select_videourl").val();
	var douban_comment =$("#douban_comment").val();
	var select_videourl_play=$("#select_videourl_play").val();
	var keyword=$("#keyword").val();	
	var d_status=$("#d_status").val();
	var keyword_col=$("#keyword_col").val();	
	var d_douban_id=$("#d_douban_id").val();
	var can_search_device=$("#can_search_device").val();
	var url = "admin_vod.php?can_search_device="+can_search_device+"&d_douban_id="+d_douban_id+"&keyword_col="+keyword_col+"&d_status="+d_status+"&sort="+sort+"&select_videourl_play="+select_videourl_play+"&douban_comment="+douban_comment+"&action=doubans&keyword="+encodeURI(keyword)+"&select_weburl="+select_weburl+"&select_videourl="+select_videourl+"&stype="+stype+"&topic="+topic+"&level="+level+"&order="+order+"&sserver="+sserver+"&sstate="+state+"&from="+from+"&spic="+spic+"&hide="+hide+"&douban_score="+douban_score+"&ipadpic="+ipadpic;
	window.location.href=url;
}

function doubansComment(){
	var stype=$("#stype").val();
	var state=$("#state").val();
	var order=$("#order").val();
	var level=$("#level").val();
	var topic=$("#topic").val();
	var sserver=$("#sserver").val();
	var from=$("#from").val();
	var spic=$("#spic").val();
	var hide=$("#hide").val();
	var sort=$("#sort").val();
	var ipadpic=$("#ipadpic").val();
	var douban_score =$("#douban_score").val();
	var select_weburl=$("#select_weburl").val();
	var select_videourl=$("#select_videourl").val();
	var select_videourl_play=$("#select_videourl_play").val();
	var keyword=$("#keyword").val();
	var douban_comment =$("#douban_comment").val();	
	var d_status=$("#d_status").val();
	var keyword_col=$("#keyword_col").val();	
	var d_douban_id=$("#d_douban_id").val();
	var can_search_device=$("#can_search_device").val();
	var url = "admin_vod.php?can_search_device="+can_search_device+"&d_douban_id="+d_douban_id+"&keyword_col="+keyword_col+"&d_status="+d_status+"&sort="+sort+"&select_videourl_play="+select_videourl_play+"&douban_comment="+douban_comment+"&action=doubansComment&keyword="+encodeURI(keyword)+"&select_weburl="+select_weburl+"&select_videourl="+select_videourl+"&stype="+stype+"&topic="+topic+"&level="+level+"&order="+order+"&sserver="+sserver+"&sstate="+state+"&from="+from+"&spic="+spic+"&hide="+hide+"&douban_score="+douban_score+"&ipadpic="+ipadpic;
	window.location.href=url;
}

function doubanThumbs(){
	var stype=$("#stype").val();
	var state=$("#state").val();
	var order=$("#order").val();
	var level=$("#level").val();
	var topic=$("#topic").val();
	var sserver=$("#sserver").val();
	var from=$("#from").val();
	var spic=$("#spic").val();
	var hide=$("#hide").val();
	var sort=$("#sort").val();
	var ipadpic=$("#ipadpic").val();
	var douban_score =$("#douban_score").val();
	var select_weburl=$("#select_weburl").val();
	var select_videourl=$("#select_videourl").val();
	var select_videourl_play=$("#select_videourl_play").val();
	var keyword=$("#keyword").val();
	var douban_comment =$("#douban_comment").val();	
	var d_status=$("#d_status").val();
	var keyword_col=$("#keyword_col").val();	
	var d_douban_id=$("#d_douban_id").val();
	var can_search_device=$("#can_search_device").val();
	var url = "admin_vod.php?can_search_device="+can_search_device+"&d_douban_id="+d_douban_id+"&keyword_col="+keyword_col+"&d_status="+d_status+"&sort="+sort+"&select_videourl_play="+select_videourl_play+"&douban_comment="+douban_comment+"&action=doubanThumbs&keyword="+encodeURI(keyword)+"&select_weburl="+select_weburl+"&select_videourl="+select_videourl+"&stype="+stype+"&topic="+topic+"&level="+level+"&order="+order+"&sserver="+sserver+"&sstate="+state+"&from="+from+"&spic="+spic+"&hide="+hide+"&douban_score="+douban_score+"&ipadpic="+ipadpic;
	window.location.href=url;
}



function showpic(){
	$.get("admin_vod.php?action=chkpic&rnd=" + Math.random(),function(obj){
		if(Number(obj)>0){
			$.messager.show({
			title:'系统提示',
			msg:'发现数据中调用远程图片<br>下载到本地可以提高网页载入速度<br>',
			timeout:5000,
			showType:'slide'
			});
		}
	});
}
function gosyncpic(){
	if(confirm('确定要同步下载远程图片吗?数据不可恢复,请做好备份')){
		location.href = 'admin_pic.php?action=syncpic';
	}
}

function prepareWeiboText(type,id,name){
	   document.getElementById( "weiboText").value= name; 
	   document.getElementById( "notify_msg_prod_id").value= id; 
	   document.getElementById( "notify_msg_prod_type").value= type; 
	   $('#SendWeiboMsg').empty();
}


function sendWeiboText(){

	var device_types= document.getElementById( "device_type");
	
	var weibotxt= document.getElementById( "weiboText").value;
	var notify_msg_prod_id= document.getElementById( "notify_msg_prod_id").value;
	var notify_msg_prod_type= document.getElementById( "notify_msg_prod_type").value;
	var urlT='admin_vod.php?action=notifyMsg&prod_type='+notify_msg_prod_type+'&prod_id='+notify_msg_prod_id+'&content=' +encodeURIComponent(weibotxt) ;
	
	for(var i = 0; i < device_types.options.length; i++){
		  if(device_types.options[i].selected){
			  urlT = urlT +'&device_type='+device_types.options[i].value;				 		 
		  }
	}
		//alert(urlT);
		 $.post(urlT, {Action:"post"}, function (data, textStatus){     
			  if(textStatus == "success"){   
	          //alert(data);
				  $('#SendWeiboMsg').empty().append(data);
	           }else{
	        	   $('#SendWeiboMsg').empty().append('发送失败。');
	           }
	       });
	
    // alert(urlT);
	 
}

function send(e){
	if(e.keyCode==13){
		  filter();
    }
}
 
</script>
<table class="admin_vod_1 tb">
	<tr>
		<td>
		<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1">
			<tr>
				<td colspan="2">过滤条件:<br /><select id="stype" name="stype"
					onchange="javascript:{var typeid= this.options[this.selectedIndex].value; if(typeid=='1' ||  typeid=='2' ||  typeid=='131'){document.getElementById('btnsearchs').style.display='block';  document.getElementById('btnsearchsThumbs').style.display='block';document.getElementById('btnsearchsComment').style.display='block';}else {document.getElementById('btnsearchs').style.display='none'; document.getElementById('btnsearchsThumbs').style.display='none';document.getElementById('btnsearchsComment').style.display='none';}}">
					<option value="0">视频栏目</option>
					<option value="-1" <?php 
    if ($stype == -1) {
        echo "selected";
    }
    ?>
>没有栏目</option>
					<?php 
    echo makeSelectAll("{pre}vod_type", "t_id", "t_name", "t_pid", "t_sort", 0, "", "&nbsp;|&nbsp;&nbsp;", $stype);
    ?>
				</select><select id="state" name="state">
					<option value="0">视频连载</option>
					<option value="1" <?php 
    if ($sstate == "1") {
        echo "selected";
    }
    ?>
>连载中</option>
					<option value="2" <?php 
    if ($sstate == "2") {
        echo "selected";
    }
    ?>
>未连载</option>
				</select><select id="order" name="order">
					<option value="d_time">视频排序</option>
					<option value="d_id" <?php 
    if ($order == "d_id") {
        echo "selected";
    }
    ?>
>视频编号</option>
					<option value="d_name"
					<?php 
    if ($order == "d_name") {
        echo "selected";
    }
    ?>
>视频名称</option>
					<option value="d_play_num"
					<?php 
    if ($order == "d_play_num") {
        echo "selected";
    }
    ?>
>播放次数</option>
					<option value="d_year"
					<?php 
    if ($order == "d_year") {
        echo "selected";
    }
    ?>
>上映日期</option>
					<option value="d_level"
					<?php 
    if ($order == "d_level") {
        echo "selected";
    }
    ?>
>推荐度</option>
				</select><select id="sort" name="sort">
					<option value="desc" <?php 
    if ($sort == "desc") {
        echo "selected";
    }
    ?>
>视频排序
					降序序</option>
					<option value="asc" <?php 
    if ($sort == "asc") {
        echo "selected";
    }
    ?>
>视频排序
					升序</option>
				</select><select id="level" name="level">
					<option value="0">视频推荐</option>
					<option value="1" <?php 
    if ($level == 1) {
        echo "selected";
    }
    ?>
>推荐1</option>
					<option value="2" <?php 
    if ($level == 2) {
        echo "selected";
    }
    ?>
>推荐2</option>
					<option value="3" <?php 
    if ($level == 3) {
        echo "selected";
    }
    ?>
>推荐3</option>
					<option value="4" <?php 
    if ($level == 4) {
        echo "selected";
    }
    ?>
>推荐4</option>
					<option value="5" <?php 
    if ($level == 5) {
        echo "selected";
    }
    ?>
>推荐5</option>
					<option value="6" <?php 
    if ($level == 6) {
        echo "selected";
    }
    ?>
>推荐6</option>
					<option value="7" <?php 
    if ($level == 7) {
        echo "selected";
    }
    ?>
>推荐7</option>
					<option value="8" <?php 
    if ($level == 8) {
        echo "selected";
    }
    ?>
>推荐8</option>
				</select><select id="from" name="from">
					<option value="">视频播放器</option>
					<?php 
    echo makeSelectPlayer($from);
    ?>
				</select><select id="spic" name="spic">
					<option value="0">视频图片</option>
					<option value="1" <?php 
    if ($spic == 1) {
        echo "selected";
    }
    ?>
>无图片</option>
					<option value="2" <?php 
    if ($spic == 2) {
        echo "selected";
    }
    ?>
>远程图片</option>
				</select><select id="ipadpic" name="ipadpic">
					<option value="0">视频IPAD图片</option>
					<option value="1" <?php 
    if ($ipadpic == 1) {
        echo "selected";
    }
    ?>
>无图片</option>
					<option value="2" <?php 
    if ($ipadpic == 2) {
        echo "selected";
    }
    ?>
>远程图片</option>
				</select><select id="hide" name="hide">
					<option value="-1">视频显隐</option>
					<option value="0" <?php 
    if ($hide == 0) {
        echo "selected";
    }
    ?>
>显示</option>
					<option value="1" <?php 
    if ($hide == 1) {
        echo "selected";
    }
    ?>
>隐藏</option>
					<option value="-100" <?php 
    if ($hide == -100) {
        echo "selected";
    }
    ?>
>视频不能播放</option>
				</select><select id="douban_score" name="douban_score">
					<option value="0">豆瓣评分</option>
					<option value="1" <?php 
    if ($douban_score == 1) {
        echo "selected";
    }
    ?>
>已采集</option>
					<option value="2" <?php 
    if ($douban_score == 2) {
        echo "selected";
    }
    ?>
>未采集</option>
				</select><select id="douban_comment" name="douban_comment">
					<option value="0">豆瓣评论</option>
					<option value="1"
					<?php 
    if ($douban_comment == 1) {
        echo "selected";
    }
    ?>
>已采集</option>
					<option value="2"
					<?php 
    if ($douban_comment == 2) {
        echo "selected";
    }
    ?>
>未采集</option>
				</select><select id="select_weburl" name="select_weburl">
					<option value="0">网页地址</option>
					<option value="1"
					<?php 
    if ($select_weburl == 1) {
        echo "selected";
    }
    ?>
>存在</option>
					<option value="2"
					<?php 
    if ($select_weburl == 2) {
        echo "selected";
    }
    ?>
>不存在</option>
				</select><select id="select_videourl" name="select_videourl">
					<option value="0">视频地址</option>
					<option value="1"
					<?php 
    if ($select_videourl == 1) {
        echo "selected";
    }
    ?>
>存在</option>
					<option value="2"
					<?php 
    if ($select_videourl == 2) {
        echo "selected";
    }
    ?>
>不存在</option>
				</select><select id="d_status" name="d_status">
					<option value="-1">是否已经审核过</option>
					<option value="0" <?php 
    if ($d_status == 0) {
        echo "selected";
    }
    ?>
>未审核</option>
					<option value="1" <?php 
    if ($d_status == 1) {
        echo "selected";
    }
    ?>
>审核并锁定</option>
				</select><select id="d_douban_id" name="d_douban_id">
					<option value="0">能否在豆瓣上找到</option>
					<option value="-1"
					<?php 
    if ($d_douban_id == -1) {
        echo "selected";
    }
    ?>
>不能</option>
					<option value="1" <?php 
    if ($d_douban_id == 1) {
        echo "selected";
    }
    ?>
>能找到</option>
					<option value="2" <?php 
    if ($d_douban_id == 2) {
        echo "selected";
    }
    ?>
>不确定,未搜索</option>
				</select><select id="can_search_device" name="can_search_device">
					<option value="">投放设备</option>
					<option value="TV"
					<?php 
    if ($can_search_device === 'TV') {
        echo "selected";
    }
    ?>
>TV版</option>
					<option value="iPad"
					<?php 
    if ($can_search_device === 'iPad') {
        echo "selected";
    }
    ?>
>iPad版</option>
					<option value="iphone"
					<?php 
    if ($can_search_device === 'iphone') {
        echo "selected";
    }
    ?>
>iphone版</option>
					<option value="apad"
					<?php 
    if ($can_search_device === 'apad') {
        echo "selected";
    }
    ?>
>Android-Pad版</option>
					<option value="aphone"
					<?php 
    if ($can_search_device === 'aphone') {
        echo "selected";
    }
    ?>
>Android-Phone版</option>
					<option value="web"
					<?php 
    if ($can_search_device === 'web') {
        echo "selected";
    }
    ?>
>网站版</option>
					<option value="Vendor"
					<?php 
    if ($can_search_device === 'Vendor') {
        echo "selected";
    }
    ?>
>Vendor版</option>
				</select></td>
			</tr>
			<tr>
				<td colspan="4">关键字:<input id="keyword" size="40" name="keyword"
					value="<?php 
    echo $keyword;
    ?>
" onkeypress="send(event);">&nbsp; <select
					id="keyword_col" name="keyword_col">
					<option value="">关键字的匹配列</option>
					<option value="d_name"
					<?php 
    if ($keyword_col == "d_name") {
        echo "selected";
    }
    ?>
>视频名称</option>
					<option value="d_starring"
					<?php 
    if ($keyword_col == "d_starring") {
        echo "selected";
    }
    ?>
>演员</option>
					<option value="d_directed"
					<?php 
    if ($keyword_col == "d_directed") {
        echo "selected";
    }
    ?>
>导演</option>
				</select> <input class="input" type="button" value="搜索"
					id="btnsearch" onClick="filter();"></td>
				<td align="left"><input style="display:<?php 
    echo $douban_scoreT;
    ?>
" type="button" value="豆瓣评分" id="btnsearchs" onClick="doubans();">
				</td>
				<td align="left"><input style="display:<?php 
    echo $douban_scoreT;
    ?>
" type="button" value="豆瓣影评" id="btnsearchsComment" onClick="doubansComment();">
				</td>
				<td align="left"><input style="display:<?php 
    echo $douban_scoreT;
    ?>
" type="button" value="豆瓣缩略图 " id="btnsearchsThumbs" onClick="doubanThumbs();">
				</td>

			</tr>
		</table>
		</td>
	</tr>
</table>


<form id="form1" name="form1" method="post">
<table class="admin_vod tb">
	<tr>
		<td width="4%"></td>
		<td width="4%">编号</td>
		<td width="15%">名称</td>
		<td width="4%">播放次数</td>
		<td width="3%">上映日期</td>
		<td width="5%">分类</td>
		<td width="5%">来源</td>
		<!--	<td width="3%">人气</td>-->
		<td width="4%">推荐</td>
		<!--	<td width="5%">专题</td>-->
		<!--	<td width="5%">轮播图</td>-->
		<td width="13%" align="center">视频榜单</td>
		<!--	<td width="5%">浏览</td>-->
		<td width="8%">时间</td>
		<td width="25%">操作</td>
	</tr>
	<?php 
    if ($nums == 0) {
        ?>
	<tr>
		<td align="center" colspan="12">没有任何记录!</td>
	</tr>
	<?php 
    } else {
        while ($row = $db->fetch_array($rs)) {
            $d_id = $row["d_id"];
            $tname = "未知";
            $tenname = "";
            $typearr = getValueByArray($cache[0], "t_id", $row["d_type"]);
            if (is_array($typearr)) {
                $tname = $typearr["t_name"];
                $tenname = $typearr["t_enname"];
            }
            ?>
	<tr>
		<td><input name="d_id[]" type="checkbox" value="<?php 
            echo $d_id;
            ?>
"></td>
		<td><?php 
            echo $d_id;
            ?>
</td>
		<td><?php 
            echo substring($row["d_name"], 20);
            ?>
 <?php 
            if ($row["d_state"] > 0) {
                echo "<font color=\"red\">[" . $row["d_state"] . "]</font>";
            }
            ?>
		<?php 
            if (!isN($row["d_remarks"])) {
                echo "<font color=\"red\">[" . $row["d_remarks"] . "]</font>";
            }
            ?>
		<?php 
            if ($row["d_hide"] == 1) {
                echo "<font color=\"red\">[隐藏]</font>";
            }
            ?>
		</td>
		<td><?php 
            echo $row["d_play_num"];
            ?>
</td>
		<td><?php 
            echo $row["d_year"];
            ?>
</td>
		<td><?php 
            echo $tname;
            ?>
</td>
		<td title="<?php 
            echo replaceStr($row["d_playfrom"], "\$\$\$", ",");
            ?>
"><?php 
            echo substring(replaceStr($row["d_playfrom"], "\$\$\$", ","), 15, 0);
            ?>
</td>
		<!--<td><?php 
            echo $row["d_hits"];
            ?>
</td>
	-->
		<td id="tj<?php 
            echo $d_id;
            ?>
"><?php 
            echo "<img src=\"../images/icons/ico" . $row["d_level"] . ".gif\" border=\"0\" style=\"cursor: pointer;\" onClick=\"setday('tj','" . $d_id . "','vod')\"/>";
            ?>
		</td>
		<!--<td id="zt<?php 
            echo $d_id;
            ?>
" >
	<?php 
            if ($row["d_topic"] == 0) {
                ?>
	<?php 
                echo "<img src=\"../images/icons/icon_02.gif\" border=\"0\" style=\"cursor: pointer;\" onClick=\"setday('zt','" . $d_id . "','vod')\"/>";
                ?>
	<?php 
            } else {
                ?>
	<?php 
                echo "<img src=\"../images/icons/icon_01.gif\" border=\"0\" style=\"cursor: pointer;\" onClick=\"ajaxdivdel('" . $d_id . "','zt','vod')\"/>";
                ?>
	<?php 
            }
            ?>
	</td>
	
	-->
		<!--<td id="popular<?php 
            echo $d_id;
            ?>
" >
	<?php 
            if ($row["popular_id"] > 0) {
                ?>
		<?php 
                echo "<img src=\"../images/icons/icon_01.gif\" border=\"0\" style=\"cursor: pointer;\" />";
                ?>
	
	<?php 
            } else {
                ?>
	<?php 
                echo "<img src=\"../images/icons/icon_02.gif\" border=\"0\" style=\"cursor: pointer;\" onClick=\"ajaxsubmit('" . $d_id . "','lunbo','vod');\"/>";
                ?>
	<?php 
            }
            ?>
	</td>
	
	-->
		<td align="center"><span id="bd<?php 
            echo $d_id;
            ?>
"></span> <a href="#"
			onClick="setdayBD('bd','<?php 
            echo $d_id;
            ?>
','vod','1')" /> 添加悦单</a> |
		<a href="#" onClick="setdayBD('bd','<?php 
            echo $d_id;
            ?>
','vod','2')" />
		添加悦榜</a></td>
		<!--<td>
	<?php 
            if (app_playtype == 0) {
                if ($row["d_type"] == 0) {
                    $mlink = "#";
                } else {
                    $mlink = "../" . $template->getVodLink($d_id, $row["d_name"], $row["d_enname"], $row["d_type"], $tname, $tenname);
                }
                $mlink = replaceStr($mlink, "../" . app_installdir, "../");
                $plink = $mlink;
            } else {
                $mlink = "../" . $template->getVodPlayUrl($d_id, $row["d_name"], $row["d_enname"], $row["d_type"], $tname, $tenname, 1, 1);
                $mlink = replaceStr($mlink, "../" . app_installdir, "../");
                $plink = $mlink;
                $mlink = replaceStr($mlink, "javascript:OpenWindow1('", "");
                $mlink = replaceStr($mlink, "',popenW,popenH);", "");
            }
            if (substring($mlink, 1, strlen($mlink) - 1) == "/") {
                $mlink = $mlink . "index." . app_vodsuffix;
            }
            if (app_vodcontentviewtype == 2) {
                if (file_exists($mlink)) {
                    ?>
		 	<a target="_blank" href="<?php 
                    echo $plink;
                    ?>
"><Img src="../images/icons/html_ok.gif" border="0" alt='浏览' /></a>
		 	<?php 
                } else {
                    ?>
		 	<a  href="admin_makehtml.php?action=viewpl&flag=vod&d_id=<?php 
                    echo $d_id;
                    ?>
"><Img src="../images/icons/html_no.gif" border="0" alt='生成' /></a>
		 	<?php 
                }
            } else {
                ?>
	 	<a target="_blank" href="<?php 
                echo $plink;
                ?>
"><Img src="../images/icons/html_ok.gif" border="0" alt='浏览' /></a>
	 <?php 
            }
            ?>
	 </td>
	-->
		<td><?php 
            echo isToday($row["d_time"]);
            ?>
</td>
		<td><a href="admin_vod_topic.php?action=info&id=<?php 
            echo $d_id;
            ?>
">所在榜单</a>
		|<a href="admin_vod.php?action=edit&id=<?php 
            echo $d_id;
            ?>
">修改</a> | <?php 
            if ($row["d_type"] == 1 || $row["d_type"] == 2 || $row["d_type"] == 131) {
                ?>
<a
			href="admin_vod.php?action=douban&id=<?php 
                echo $d_id;
                ?>
">豆瓣评分</a> | <a
			href="admin_vod.php?action=doubanComment&id=<?php 
                echo $d_id;
                ?>
">豆瓣影评</a>
		| <?php 
            }
            ?>
 <a
			href="admin_vod.php?action=doubanPic&id=<?php 
            echo $d_id;
            ?>
">豆瓣图片</a>
		| <a href="admin_vod.php?action=doubanThumb&id=<?php 
            echo $d_id;
            ?>
">豆瓣缩略图</a>
		|<a href="#"
			onClick="if(confirm('确定要添加到追剧列表吗')){ajaxsubmit('<?php 
            echo $d_id;
            ?>
','subscribe_msg_list','vod');}">添加到追剧列表</a>
			<?php 
            if ($loginname === 'dale' || $loginname === 'admin' || $loginname === 'lulu' || $loginname === 'scottliyq' || $loginname === 'zhouyinlong') {
                ?>
		<!--	|--> <!--	 <a class="thickbox" href="#TB_inline?height=200&width=400&inlineId=myOnPageContent" onclick="javascript:{prepareWeiboText('<?php 
                echo $row["d_type"];
                ?>
','<?php 
                echo $d_id;
                ?>
','<?php 
                echo substring($row["d_name"], 20);
                ?>
');}" > 消息推送</a>	  -->
			<?php 
            }
            ?>
 | <A
			href="admin_vod.php?action=del&d_id=<?php 
            echo $d_id;
            ?>
"
			onClick="return confirm('确定要删除吗?');">删除</a></td>
	</tr>
	<?php 
        }
    }
    ?>
	<tr class="formlast">
		<td colspan="11"><input name="chkall" type="checkbox" id="chkall"
			value="1" onClick="checkAll(this.checked,'d_id[]');" /> 全选 &nbsp;批量操作:&nbsp;<input
			type="button" id="btnDel" value="删除" class="input"> <input
			type="button" id="pltj" value="推荐" onClick="plset('pltj','vod')"
			class="input"> <input type="button" id="plfl" value="分类"
			onClick="plset('plfl','vod')" class="input"> <input type="button"
			id="plluobo" value="轮播图" onClick="plsetLuobo()" class="input"> <input
			type="button" id="plbd" value="视频悦单"
			onClick="plsetBD('plbd','vod','1')" class="input"> <input
			type="button" id="plbd" value="视频悦榜"
			onClick="plsetBD('plbd','vod','2')" class="input"> <input
			type="button" id="plyc" value="显隐" onClick="plset('plyc','vod')"
			class="input"> 
			<input type="button" id="plsh" value="批量审核" onClick="plset('plsh','vod')" class="input"> 
			<span id="plmsg" name="plmsg"></span></td>
	</tr>
	<tr class="formlast">
		<td align="center" colspan="12"><?php 
    echo pagelist_manage($pagecount, $pagenum, $nums, app_pagenum, "admin_vod.php?page={p}&can_search_device=" . $can_search_device . "&d_douban_id=" . $d_douban_id . "&keyword=" . urlencode($keyword) . "&d_status=" . $d_status . "&keyword_col=" . $keyword_col . "&sort=" . $sort . "&select_videourl_play=" . $select_videourl_play . "&topic=" . $topic . "&level=" . $level . "&order=" . $order . "&stype=" . $stype . "&sserver=" . $sserver . "&sstate=" . $sstate . "&repeat=" . $repeat . "&repeatlen=" . $repeatlen . "&from=" . $from . "&spic=" . $spic . "&hide=" . $hide . "&douban_comment=" . $douban_comment . "&douban_score=" . $douban_score . "&select_weburl=" . $select_weburl . "&select_videourl=" . $select_videourl . "&ipadpic=" . $ipadpic);
    ?>
		</td>
	</tr>
</table>

<div id="myOnPageContent" style="display: none">

<table class="table" cellpadding="0" cellspacing="0" width="100%"
	border="0">

	<thead class="tb-tit-bg">
		<tr>
			<td>
			<h3 class="title">发送设备:<select name="device_type" id="device_type">
				<option value="">所有设备</option>
				<option value="ios">IOS</option>
				<option value="android">Android</option>
			</select></h3>
			</td>

		</tr>
		<tr>
			<td><span><font color="blue">消息内容 </font></span></td>

		</tr>
		<input type="hidden" name="notify_msg_prod_id" id="notify_msg_prod_id"
			value="">
		<input type="hidden" name="notify_msg_prod_type"
			id="notify_msg_prod_type" value="">

		<tr>
			<td align="center"><textarea name="wbText" id="weiboText" rows="9"
				cols="60" style="border: 1; border-color: blue;"></textarea></td>
		</tr>
		<tr>
			<td align="right"><a href="#" onclick="javascript:sendWeiboText();">发送</a></td>
		</tr>
		<tr>
			<td align="center"><font color=red><span id="SendWeiboMsg"></span></font></td>

		</tr>

	</thead>
</table>

</div>
</form>
	<?php 
    if ($pagenum == 1 && $where == " 1=1 ") {
        echo "<script>showpic();</script>";
    }
    unset($rs);
}