<?php
/*
'**************************************************************************************************
' 程序名称: CCTVAI开源音乐管理系统
' 官方网站: http://www.cctvai.com
' 联系 Q Q: 1542367792
' QQ交流群：136687984
' 版本：(终结版)
' 备注：未经书面授权，不得向任何第三方提供本软件系统！
' 功能，模板，插件，扩展，定制请联系QQ：1542367792
'**************************************************************************************************
*/
error_reporting(0);
if($classid){$class=$db->getrow('select * from ' . tname('videoclass') . " where CD_ID='" . $classid . "'");}
?>
<script type="text/javascript" src="js/jquery.js"></script>
<link type="text/css" rel="stylesheet" href="css/list.css" /> 
<?php 
if($view==""){?>
   <div class="tag-list"> 
    <div class="tag-section">
	<a href="index.php?ac=video" class="on tag-item"><span>已审视频</span></a>
	<a href="index.php?ac=video&view=passed" class="tag-item"><span>未审视频</span></a>
	<a href="index.php?ac=video&view=upload" class="tag-item"><span>上传视频</span></a>
	<a href="index.php?ac=video&view=help" class="tag-item"><span>帮助</span></a>
    </div>  	
   </div> 
  <span onclick="shareready();" class="x5-btn x5-btn-warning" style="float: right;margin: 10px;">按分类查看</span>
  <div class="x5-tc">
    <div class="x5-tc-popover"> 
     <div class="x5-tc-poptit"> 
      <b title="关闭" class="close" onclick="shareclose();">&times;</b> 
      <h3>按分类选择查看</h3> 
     </div> 
     <div class="x5-tc-popbod"> 
  <div class="popDiyTags-form form-box"> 
<?php
$classq='videoclass';
function Get_Fclass($id,$classq) { 
global $db;
$Fsql="select CD_ID,CD_Name from " . tname($classq) . " where CD_FatherID='".$id."' and CD_IsHide=0 order by CD_TheOrder asc";
$Fresult=$db->query($Fsql);
    if($Fresult && $db->num_rows($Fresult)){
        while($Frow=$db->fetch_array($Fresult)) { 
            $str .= '<dd><a href="?ac=video&classid='.$Frow['CD_ID'].'">'.$Frow['CD_Name'].'</a></dd>';
            Get_Fclass($Frow['CD_ID']); 
        } 
    } 
    return $str; 
}
global $db;
$sql="select CD_ID,CD_Name from " . tname($classq) . " where CD_FatherID=0 and CD_IsHide=0 order by CD_TheOrder asc";
$result=$db->query($sql);
$classnum=$db->num_rows($result);
if($result) {
	while($row=$db->fetch_array($result)) {
?>
   <dl class="popDiyTags-list clearfix">
    <dt><?php echo $row['CD_Name']?></dt>
    <dd><a href="?ac=video&classid=<?php echo $row['CD_ID']?>"><?php echo $row['CD_Name']?></a></dd>
<?php
echo get_Fclass($row['CD_ID'],$classq);
echo'</dl>';
}
}
?>
  </div> 
     </div> 
    </div> 
    </div> 
    <div class="x5-tc-popover-mask"></div>
  <div class="video-list"> 
  <div class="head"><strong><?php if($classid){echo $class['CD_Name'];}else{ echo '已通过审核的视频';}?></strong></div> 
  <ul>
<?php
global $db;
if($classid) {
if(cd_zclass=="1"){
	if($class["CD_FatherID"]==0){$fidsql=" and CD_ClassID in (".rtrim($class["CD_ID"].','.$class['CD_TieID'], ',').")";}else{$fidsql=" and CD_ClassID='".$class["CD_ID"]."'";}
	}else{
		$fidsql=" and CD_ClassID='".$class["CD_ID"]."'";
		}
}
$videosql="select CD_Hits,CD_Pic,CD_ID,CD_Name,CD_LastHitTime from " . tname('video') . " where CD_Deleted=0 and CD_Passed=0$fidsql and CD_User='" . $CcTvAi_com_username . "' order by CD_AddTime desc";
$Arr=getuserpage($videosql, 20); //sql,每页显示条数
$result=$db->query($Arr[2]);
$num=$db->num_rows($result);
if($num==0) {
		echo '<center>暂无已审视频</center>';
} else {
	if($result) {
		while($video=$db->fetch_array($result)) {
echo '    <div class="videoMv" onclick="window.open(\'../video_p.php?id='.$video['CD_ID'].'\',\'_self\')">
     <p class="videoMvImg"><img src="'.LinkPicUrl($video['CD_Pic'],"video").'" width="100%" height="75" /></p>
     <p class="videoRiTex"><span class="videoRiName">'.$video['CD_Name'].'</span><span class="videoRiHits">人气：'.$video['CD_Hits'].'</span><span class="videoRiHits">推荐时间：'.datetime($video['CD_LastHitTime']).'</span></p>
    </div> ';
}
} 
}
?>
  </ul>
  <div class="page"><?php echo $Arr[0];?></div>
  </div> 
<?php 
}elseif(
$view=="passed"){?>
   <div class="tag-list"> 
    <div class="tag-section">
	<a href="index.php?ac=video" class="tag-item"><span>已审视频</span></a>
	<a href="index.php?ac=video&view=passed" class="on tag-item"><span>未审视频</span></a>
	<a href="index.php?ac=video&view=upload" class="tag-item"><span>上传视频</span></a>
	<a href="index.php?ac=video&view=help" class="tag-item"><span>帮助</span></a>
    </div>  	
   </div> 
  <span onclick="shareready();" class="x5-btn x5-btn-warning" style="float: right;margin: 10px;">按分类查看</span>
  <div class="x5-tc">
    <div class="x5-tc-popover"> 
     <div class="x5-tc-poptit"> 
      <b title="关闭" class="close" onclick="shareclose();">&times;</b> 
      <h3>按分类选择查看</h3> 
     </div> 
     <div class="x5-tc-popbod"> 
  <div class="popDiyTags-form form-box"> 
<?php
$classq='videoclass';
function Get_Fclass($id,$classq) { 
global $db;
$Fsql="select CD_ID,CD_Name from " . tname($classq) . " where CD_FatherID='".$id."' and CD_IsHide=0 order by CD_TheOrder asc";
$Fresult=$db->query($Fsql);
    if($Fresult && $db->num_rows($Fresult)){
        while($Frow=$db->fetch_array($Fresult)) { 
            $str .= '<dd><a href="?ac=video&view=passed&classid='.$Frow['CD_ID'].'">'.$Frow['CD_Name'].'</a></dd>';
            Get_Fclass($Frow['CD_ID']); 
        } 
    } 
    return $str; 
}
global $db;
$sql="select CD_ID,CD_Name from " . tname($classq) . " where CD_FatherID=0 and CD_IsHide=0 order by CD_TheOrder asc";
$result=$db->query($sql);
$classnum=$db->num_rows($result);
if($result) {
	while($row=$db->fetch_array($result)) {
?>
   <dl class="popDiyTags-list clearfix">
    <dt><?php echo $row['CD_Name']?></dt>
    <dd><a href="?ac=video&view=passed&classid=<?php echo $row['CD_ID']?>"><?php echo $row['CD_Name']?></a></dd>
<?php
echo get_Fclass($row['CD_ID'],$classq);
echo'</dl>';
}
}
?>
  </div> 
     </div> 
    </div> 
    </div> 
    <div class="x5-tc-popover-mask"></div>
  <div class="dance-list"> 
  <div class="head"><strong><?php if($classid){echo $class['CD_Name'];}else{ echo '正在审核中的视频';}?></strong></div> 
  <ul>
<?php
global $db;
if($classid) {
if(cd_zclass=="1"){
	if($class["CD_FatherID"]==0){$fidsql=" and CD_ClassID in (".rtrim($class["CD_ID"].','.$class['CD_TieID'], ',').")";}else{$fidsql=" and CD_ClassID='".$class["CD_ID"]."'";}
	}else{
		$fidsql=" and CD_ClassID='".$class["CD_ID"]."'";
		}
}
$videosql="select CD_Hits,CD_Pic,CD_ID,CD_Name,CD_LastHitTime from " . tname('video') . " where CD_Deleted=0 and CD_Passed=1$fidsql and CD_User='" . $CcTvAi_com_username . "' order by CD_AddTime desc";
$Arr=getuserpage($videosql, 20); //sql,每页显示条数
$result=$db->query($Arr[2]);
$num=$db->num_rows($result);
if($num==0) {
		echo '<center>暂无待审视频</center>';
} else {
	if($result) {
		while($video=$db->fetch_array($result)) {
echo '    <div class="videoMv" onclick="window.open(\'../video_p.php?id='.$video['CD_ID'].'\',\'_self\')">
     <p class="videoMvImg"><img src="'.LinkPicUrl($video['CD_Pic'],"video").'" width="100%" height="75" /></p>
     <p class="videoRiTex"><span class="videoRiName">'.$video['CD_Name'].'</span><span class="videoRiHits">人气：'.$video['CD_Hits'].'</span><span class="videoRiHits">推荐时间：'.datetime($video['CD_LastHitTime']).'</span></p>
    </div> ';
}
} 
}
?>
  </ul>
  <div class="page"><?php echo $Arr[0];?></div>
  </div> 
<?php }elseif($view=="upload"){
$editor=SafeRequest("editor", "get"); 
if(cd_uploadentrance=="no") {showmessage("已关闭作品提交", "index.php?ac=video", 0);}
if(cd_userupload=="0"){showmessage("已关闭本地上传服务", "index.php?ac=video", 0);}
?>
<link type="text/css" rel="stylesheet" href="css/up.css" /> 
   <div class="tag-list"> 
    <div class="tag-section">
	<a href="index.php?ac=video" class="tag-item"><span>已审视频</span></a>
	<a href="index.php?ac=video&view=passed" class="tag-item"><span>未审视频</span></a>
	<a href="index.php?ac=video&view=upload" class="on tag-item"><span>上传视频</span></a>
	<a href="index.php?ac=video&view=help" class="tag-item"><span>帮助</span></a>
    </div>  	
   </div> 
<?php if($editor==""){?>
  <div class="video-list"> 
  <div class="head"><strong>上传你的视频作品</strong></div> 
  </div>
  <script type="text/javascript">
      function fileSelected() {
        var file = document.getElementById('Filedata').files[0];
        if (file) {
          var fileSize = 0;
          if (file.size > 1024 * 1024)
            fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB';
          else
            fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB';
          document.getElementById('fileName').innerHTML = '文件名: ' + file.name;
          document.getElementById('fileSize').innerHTML = '文件大小: ' + fileSize;
          document.getElementById('fileType').innerHTML = '文件类型: ' + file.type;
		  var cd_name=/\.[^\.]+/.exec(file.name);
		  var cd_type = "<?php echo cd_upvideotype?>";
		  if(cd_type.indexOf(''+cd_name+'') > 0 ){}else{sweetAlert({title: "上传提醒",text: "文件格式错误，请重新选择",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});}
		  
		  var cd_size=document.getElementById('Filedata').files[0].size;
		  var cd_uppicsize="<?php echo (cd_upvideosize*1024*1024); ?>";
		  if(cd_size > cd_uppicsize){sweetAlert({title: "上传提醒",text: "文件太大，请重新选择",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});}
        }
      }
      function uploadFile() {
        var fd = new FormData();
        fd.append("Filedata", document.getElementById('Filedata').files[0]);
        var xhr = new XMLHttpRequest();
        xhr.upload.addEventListener("progress", uploadProgress, false);
        xhr.addEventListener("load", uploadComplete, false);
        xhr.addEventListener("error", uploadFailed, false);
        xhr.addEventListener("abort", uploadCanceled, false);
        xhr.open("POST", "upload.php?ac=video");
        xhr.send(fd);
      }
      function uploadProgress(evt) {
        if (evt.lengthComputable) {
          var percentComplete = Math.round(evt.loaded * 100 / evt.total);
		  if(percentComplete==100){
			  document.getElementById('progressNumber').innerHTML = "<div id=\"percent\" style=\"left: -"+ percentComplete.toString() +"%;\">服务器正在处理中,请稍等....</div><div id=\"line\" w=\"100\" style=\"width: "+ percentComplete.toString() +"%;\"></div>";
		  }else{
			  document.getElementById('progressNumber').innerHTML = "<div id=\"percent\" style=\"left: -"+ percentComplete.toString() +"%;\">"+ percentComplete.toString() +"%</div><div id=\"line\" w=\"100\" style=\"width: "+ percentComplete.toString() +"%;\"></div>";
		  }
        }
        else {
          document.getElementById('progressNumber').innerHTML = '未知大小';
        }
      }
      function uploadComplete(evt) {
        var uploadok=evt.target.responseText;
		if(uploadok==10000){
			sweetAlert({title: "上传提醒",text: "请先登录后操作",type: "",confirmButtonColor: "#1abc9c"});
		} else if(uploadok==10001){
			sweetAlert({title: "上传提醒",text: "请上传正确的视频文件",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		} else if(uploadok==10002){
			sweetAlert({title: "上传提醒",text: "保存文件失败",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		} else if(uploadok==10003){
			sweetAlert({title: "上传提醒",text: "请选择要上传的文件",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		} else if(uploadok==10004){
			sweetAlert({title: "上传提醒",text: "本站已关闭上传视频功能",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		} else if(/[\u4E00-\u9FA5]/g.test(uploadok)){
			sweetAlert({title: "上传提醒",text: "视频文件上传成功,请完善封面图片",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = 'index.php?ac=video&view=upload&editor=1&'+uploadok+'';});
		} else if(uploadok==10005){
			sweetAlert({title: "上传提醒",text: "文件太大，请重新选择",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		} else {
			sweetAlert({title: "上传提醒",text: "未知错误",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		}
		
      }
	  
      function uploadFailed(evt) {
        sweetAlert({title: "上传提醒",text: "文件错误",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
      }
      function uploadCanceled(evt) {
        sweetAlert({title: "上传提醒",text: "文件上传中断",type: "",confirmButtonColor: "#1abc9c"});
      }
    </script>
<div class="video-up">
 <div style="padding: 10px;line-height: 25px;">
 <p>请选择您手机上的<?php echo cd_upvideotype?>视频文件</p>
 <p>单个文件限制：<?php echo cd_upvideosize?>MB以内</p>
    <div id="fileName"></div>
    <div id="fileSize"></div>
    <div id="fileType"></div>
</div>
		<form class="form" enctype="multipart/form-data" method="post" action="upload.php?ac=video">
			<input type="file" name="Filedata" class="file" id="Filedata" onchange="fileSelected();"/>
			<input type="button" value="上传" onclick="uploadFile()" class="form-btn"/>
		</form>	
 </div>
<div class="up-barline"><div id="progressNumber"></div></div>
<?php }elseif($editor=="1"){?>
  <script type="text/javascript">
      function fileSelected() {
        var file = document.getElementById('Filedata').files[0];
        if (file) {
          var fileSize = 0;
          if (file.size > 1024 * 1024)
            fileSize = (Math.round(file.size * 100 / (1024 * 1024)) / 100).toString() + 'MB';
          else
            fileSize = (Math.round(file.size * 100 / 1024) / 100).toString() + 'KB';
          document.getElementById('fileName').innerHTML = '文件名: ' + file.name;
          document.getElementById('fileSize').innerHTML = '文件大小: ' + fileSize;
          document.getElementById('fileType').innerHTML = '文件类型: ' + file.type;
		  var cd_name=/\.[^\.]+/.exec(file.name);
		  var cd_type = "<?php echo cd_uppictype?>";
		  if(cd_type.indexOf(''+cd_name+'') > 0 ){}else{sweetAlert({title: "上传提醒",text: "文件格式错误，请重新选择",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});}
		  
		  var cd_size=document.getElementById('Filedata').files[0].size;
		  var cd_uppicsize="<?php echo (cd_uppicsize*1024*1024); ?>";
		  if(cd_size > cd_uppicsize){sweetAlert({title: "上传提醒",text: "文件太大，请重新选择",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});}
        }
      }
      function uploadFile() {
        var fd = new FormData();
        fd.append("Filedata", document.getElementById('Filedata').files[0]);
        var xhr = new XMLHttpRequest();
        xhr.upload.addEventListener("progress", uploadProgress, false);
        xhr.addEventListener("load", uploadComplete, false);
        xhr.addEventListener("error", uploadFailed, false);
        xhr.addEventListener("abort", uploadCanceled, false);
        xhr.open("POST", "upload.php?ac=addpic&op=videopic&id=<?php echo date('YmdHis', time()).rand(2, pow(2, 24))?>");
        xhr.send(fd);
      }
      function uploadProgress(evt) {
        if (evt.lengthComputable) {
          var percentComplete = Math.round(evt.loaded * 100 / evt.total);
		  if(percentComplete==100){
			  document.getElementById('progressNumber').innerHTML = "<div id=\"percent\" style=\"left: -"+ percentComplete.toString() +"%;\">服务器正在处理中,请稍等....</div><div id=\"line\" w=\"100\" style=\"width: "+ percentComplete.toString() +"%;\"></div>";
		  }else{
			  document.getElementById('progressNumber').innerHTML = "<div id=\"percent\" style=\"left: -"+ percentComplete.toString() +"%;\">"+ percentComplete.toString() +"%</div><div id=\"line\" w=\"100\" style=\"width: "+ percentComplete.toString() +"%;\"></div>";
		  }
        }
        else {
          document.getElementById('progressNumber').innerHTML = '未知大小';
        }
      }
      function uploadComplete(evt) {
        var uploadok=evt.target.responseText;
		if(uploadok==10000){
			sweetAlert({title: "上传提醒",text: "请先登录后操作",type: "",confirmButtonColor: "#1abc9c"});
		} else if(uploadok==10001){
			sweetAlert({title: "上传提醒",text: "请上传正确的照片文件",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		} else if(uploadok==10002){
			sweetAlert({title: "上传提醒",text: "保存文件失败",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		} else if(uploadok==10003){
			sweetAlert({title: "上传提醒",text: "请选择要上传的文件",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		} else if(uploadok==10004){
			sweetAlert({title: "上传提醒",text: "照片文件太大",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		} else if(/[\u4E00-\u9FA5]/g.test(uploadok)){
			sweetAlert({title: "上传提醒",text: "上传成功,请完善视频信息",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = 'index.php?ac=video&view=upload&editor=2&'+uploadok+'&cd_url=<?php echo SafeRequest("cd_url", "get");?>&rServer=<?php echo SafeRequest("rServer", "get");?>&rsiz=<?php echo SafeRequest("rsiz", "get");?>&rmd5=<?php echo SafeRequest("rmd5", "get");?>';});
		} else {
			sweetAlert({title: "上传提醒",text: "未知错误",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
		}
		
      }
	  
      function uploadFailed(evt) {
        sweetAlert({title: "上传提醒",text: "文件错误",type: "",confirmButtonColor: "#1abc9c"}, function() {location.href = location.href;});
      }
      function uploadCanceled(evt) {
        sweetAlert({title: "上传提醒",text: "文件上传中断",type: "",confirmButtonColor: "#1abc9c"});
      }
    </script>
  <div class="dance-list"> 
  <div class="head"><strong>上传封面图片</strong></div> 
  </div>
<div class="dance-up">
 <div style="padding: 10px;line-height: 25px;">
 <p>请上传一张作品封面</p>
 <p>如没有请点击下一步</p>
     <div id="fileName"></div>
    <div id="fileSize"></div>
    <div id="fileType"></div>
</div>
<form class="form" enctype="multipart/form-data" method="post" action="upload.php?ac=addpic&op=videopic">
	<input type="file" name="Filedata" class="file" id="Filedata" onchange="fileSelected();"/>
	<input type="button" value="上传" onclick="uploadFile()" class="form-btn"/>
	<a style="border: 2px solid #fff;background: #1abc9c;color: #fff;width: 54px;vertical-align: middle;line-height: 36px;font-size: 14px;cursor: pointer;float: right;padding-left: 10px;" href="index.php?ac=video&view=upload&editor=2&cd_url=<?php echo SafeRequest("cd_url", "get");?>&rServer=<?php echo SafeRequest("rServer", "get");?>&rsiz=<?php echo SafeRequest("rsiz", "get");?>&rmd5=<?php echo SafeRequest("rmd5", "get");?>" class="form-btn"><span>下一步</span></a>
</form>
 </div>
<div class="up-barline"><div id="progressNumber"></div></div>
<?php }elseif($editor=="2"){
$CD_Url=SafeRequest("cd_url", "get");
$CD_Pic=SafeRequest("cd_pic", "get");
$CD_Siz=SafeRequest("rsiz", "get");
$CD_Md5=SafeRequest("rmd5", "get");
$CD_From='local';
//$CD_Playtime=SafeRequest("CD_Playtime", "get");
//$CD_Bitkbps=SafeRequest("CD_Bitkbps", "get");
$CD_Server=SafeRequest("rServer", "get");
//$CD_Uid=SafeRequest("CD_Uid", "get");
if($CD_Url==""){showmessage("参数错误", "index.php?ac=video", 0);}
?>
<script type="text/javascript">
function changeimg()
{
var myimg = document.getElementById("code"); 
now = new Date(); 
myimg.src="img_seccode.php?ac=loginseccode&rand="+now.getTime();
}
</script>

  <div class="dance-list"> 
  <div class="head"><strong>完善作品信息</strong></div> 
  </div>
  <div class="x5-tc">
    <div class="x5-tc-popover"> 
     <div class="x5-tc-poptit"> 
      <b title="关闭" class="close" onclick="shareclose();">&times;</b> 
      <h3>为作品选择一个分类</h3> 
     </div> 
     <div class="x5-tc-popbod"> 
  <div class="popDiyTags-form form-box"> 
<?php
$classq='videoclass';
function Get_Fclass($id,$classq) { 
global $db;
$Fsql="select CD_ID,CD_Name from " . tname($classq) . " where CD_FatherID='".$id."' and CD_IsHide=0 order by CD_TheOrder asc";
$Fresult=$db->query($Fsql);
    if($Fresult && $db->num_rows($Fresult)){
        while($Frow=$db->fetch_array($Fresult)) { 
            $str .= '<dd><a onclick="document.getElementById(\'CD_ClassID\').value=\''.$Frow['CD_ID'].'\';document.getElementById(\'ClassID\').value=\''.$Frow['CD_ID'].'\';shareclose();">'.$Frow['CD_Name'].'</a></dd>';
            Get_Fclass($Frow['CD_ID']); 
        } 
    } 
    return $str; 
}
global $db;
$sql="select CD_ID,CD_Name from " . tname($classq) . " where CD_FatherID=0 and CD_IsHide=0 order by CD_TheOrder asc";
$result=$db->query($sql);
$classnum=$db->num_rows($result);
if($result) {
	while($row=$db->fetch_array($result)) {
?>
   <dl class="popDiyTags-list clearfix">
    <dt><?php echo $row['CD_Name']?></dt>
    <dd><a onclick="document.getElementById('CD_ClassID').value='<?php echo $row['CD_ID']?>';document.getElementById('ClassID').value='<?php echo $row['CD_ID']?>';shareclose();"><?php echo $row['CD_Name']?></a></dd>
<?php
echo get_Fclass($row['CD_ID'],$classq);
echo'</dl>';
}
}
?>
  </div> 
     </div> 
    </div> 
    </div> 
<div class="x5-tc-popover-mask"></div>
  <div class="dance-content"> 
   <form action="do.php?ac=videoadd" method="post"> 
    <div class="uinArea"> 
     <label class="input-tips" style="width: 80px;">所属分类：</label> 
     <div class="inputOuter"  style="border: 0px solid #D7D7D7;"> 
<select class="select_normal" name="ClassID" id="ClassID" disabled> <option value="0">请选择→</option> 
<?php
$classsql="select CD_ID,CD_Name from " . tname('videoclass') . " where CD_FatherID=0 and CD_IsHide=0 order by CD_TheOrder asc";
$result=$db->query($classsql);
//$classnum=$db->num_rows($result);
if($result) {
	while($class=$db->fetch_array($result)) {
			echo "<option value='" . $class['CD_ID'] . "' >&nbsp;|—" . $class['CD_Name'] . "</option>";
echo Get_Fclass_select($class['CD_ID'],'videoclass');				
}
}
?></select><a onclick="shareready();" style="margin-left: 5px;padding: 4px;background: #1abc9c;color: #fff;border-radius: 4px;">点我选择分类</a>
     </div> 
    </div> 
    <div class="uinArea"> 
     <label class="input-tips" style="width: 80px;">视频名称：</label> 
     <div class="inputOuter"> 
      <input type="text" name="CD_Name" class="inputstyle" placeholder="请认真填写" value="<?php echo SafeRequest("cd_name", "get");?>"/> 
     </div> 
    </div> 
    <div class="uinArea"> 
     <label class="input-tips" style="width: 80px;">所属歌手：</label> 
     <div class="inputOuter"> 
      <input type="text" name="CD_Singer" class="inputstyle" placeholder="请认真填写" value="<?php echo SafeRequest("cd_singer", "get");?>"/> 
     </div> 
    </div> 
    <div class="uinArea"> 
     <label class="input-tips" style="width: 80px;">视频标签：</label> 
     <div class="inputOuter"> 
      <input type="text" name="CD_Tag" class="inputstyle" placeholder="请用英文逗号隔开" value="<?php echo SafeRequest("cd_tag", "get");?>"/> 
     </div> 
    </div> 
    <div class="uinArea"> 
     <label class="input-tips" style="width: 80px;">下载售价：</label> 
     <div class="inputOuter"> 
      <input type="text" name="CD_Points" class="inputstyle" placeholder="最高<?php echo cd_attachmentpoints?>金币" value="<?php echo SafeRequest("cd_points", "get");?>"/> 
     </div> 
    </div> 
    <div class="uinArea"> 
     <label class="input-tips" style="width: 80px;">下载权限：</label> 
     <div class="inputOuter" style="border: 0px solid #D7D7D7;"> 
      <select class="select_normal" name="CD_Grade" id="CD_Grade"> <option value="0">游客下载</option> <option value="1" selected="">普通用户</option> <option value="2">VIP 用户</option> </select>
     </div> 
    </div> 
    <div class="uinArea"> 
     <label class="input-tips" style="width: 80px;">验证码：</label> 
     <div class="inputOuter"> 
      <input type="text" name="seccode" class="inputstyle" placeholder="4位验证码" /> 
     </div> 
    </div>
	<div class="input_msg"><img id="code" alt="" src="img_seccode.php?ac=loginseccode&rand=" /> <a href="javascript:changeimg()">看不清?换一张</a> </div>
    <div class="uinArea"> 
     <label class="input-tips" style="width: 80px;">视频介绍：</label> 
     <div class="inputOuter" style="border: 0px solid #D7D7D7;"> 
      <textarea name="CD_Word" cols="30" rows="7" style="margin-bottom: 20px;"><?php echo SafeRequest("cd_word", "get");?></textarea>
     </div> 
    </div> 
           <input type="hidden" name="CD_Url" id="CD_Url" value="<?php echo $CD_Url?>" /> 
           <input type="hidden" name="CD_Pic" id="CD_Pic" value="<?php echo $CD_Pic?>" /> 
           <input type="hidden" name="CD_Siz" id="CD_Siz" value="<?php echo $CD_Siz?>" /> 
           <input type="hidden" name="CD_Md5" id="CD_Md5" value="<?php echo $CD_Md5?>" /> 
           <input type="hidden" name="CD_From" id="CD_From" value="<?php echo $CD_From?>" /> 
           <input type="hidden" name="CD_Uid" id="CD_Uid" value="<?php echo $CD_Uid?>" /> 
           <input type="hidden" name="CD_Playtime" id="CD_Playtime" value="<?php echo $CD_Playtime?>" /> 
		   <input type="hidden" name="CD_Bitkbps" id="CD_Bitkbps" value="<?php echo $CD_Bitkbps?>" /> 
		   <input type="hidden" name="CD_Server" id="CD_Server" value="<?php echo $CD_Server?>" /> 
		   <input type="hidden" name="CD_ClassID" id="CD_ClassID" value="" /> 
    <div class="ptm-btn-row"> <button class="ptm-btn ptm-btn-primary ptm-btn-block">保存发布</button> </div>
   </form> 
  </div> 
<?php }?>
<?php }elseif($view=="help"){?>
   <div class="tag-list"> 
    <div class="tag-section">
	<a href="index.php?ac=video" class="tag-item"><span>已审视频</span></a>
	<a href="index.php?ac=video&view=passed" class="tag-item"><span>未审视频</span></a>
	<a href="index.php?ac=video&view=upload" class="tag-item"><span>上传视频</span></a>
	<a href="index.php?ac=video&view=help" class="on tag-item"><span>帮助</span></a>
    </div>  	
   </div> 
  <div class="dance-list"> 
  <div class="head"><strong>帮助说明</strong></div> 
  <div style="padding: 10px;line-height: 25px;">
  <p>禁止上传：文件包含任何损坏文档、病毒、蠕虫、木马或其他类似损害程序代码的视频文件</p>
  <p>视频文件格式：<?php echo cd_upvideotype?></p>
  <p>视频文件大小：<?php echo cd_upvideosize?>MB</p>
  <p>&nbsp;</p>
  <p>禁止上传违法图片，您上传的每张图片都会审核，一旦发现将封号处理，谢谢合作！</p>
  <p>封面图片格式：<?php echo cd_uppictype?></p>
  <p>封面图片大小：<?php echo cd_uppicsize?>MB</p>
  <p>审核时间：24小时内</p>
  </div>
  </div>
<?php }?>