<?php

/*

'**************************************************************************************************

' 软件名称: 黑色幻想舞曲管理系统CMS2.0

' 版本编号: hshxsdj 2.0

' 官方网站: http://www..hshxs.com

' 官方论坛：http://bbs.hshxs.com

' 版权所有: 黑色幻想开发团队    噬己翼(QQ:532917920)

' 郑重声明:

'    1、任何个人或组织不得在未经授权的情况下删除、修改、拷贝本软件及其他副本上一切关于版权的信息；

'    2、黑色幻想网络事业部保留此软件的法律追究权利

'**************************************************************************************************

*/

include "../include/conn.php";

include "../include/function.php";

include "admin_version.php";

include "admin_loginstate.php";

include "../include/userset.php";

@set_time_limit(0);

@header("Cache-control: private"); 

@header("Content-type: text/html;charset=gb2312");

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title>舞曲管理</title>

<link  href="images/style.css" rel="stylesheet" type="text/css" />

<link type="text/css" href="images/alerts.css" rel="stylesheet" media="screen">

<script type="text/javascript" language="javascript">var tentpath='<?php echo S_SitePath?>';</script>

<script language="javascript" type="text/javascript" src="js/jquery.js"></script>

<script language="javascript" type="text/javascript" src="js/video.js"></script>

<script language="javascript" src="js/alerts.js"></script>

<script language="javascript">

function SelectTemplets(fname){

   if(document.all){

     var posLeft = window.event.clientY-100;

     var posTop = window.event.clientX-400;

   }

   else{

     var posLeft = 100;

     var posTop = 100;

   }

   window.open("admin_templets.php?f="+fname, "popmoldWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left="+posLeft+", top="+posTop);

}

</script>

</head>

<body>

<?php

SystemPer(2);

$action=SafeRequest("action","get");

switch($action){

	case 'main':

		main();

		break;

	case 'edit':

		edit();

		break;

	default:

		main();

		break;

}

function main(){

         global $db;

         $playadd=playadd(1);

         $S_ID=RequestBox("S_ID");

         if($S_ID==0) $S_ID="";

?>

<div class="r_main">

	<div class="r_content">

		<div class="r_content_1">

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

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

		  <tr><td colspan="3" class="td_title">&nbsp;舞曲数据批量操作</td></tr>

		  <tr>					

		    <td width="25%" valign="top" height="30" class="td_border"><table width="100%" border="0" cellpadding="0" cellspacing="0">

                      <tr><td colspan="2" height="30" class="td_title">&nbsp;<input type="radio" name="type" id="type" value="1" <?php if($S_ID!="") echo "checked";?> class="radio">&nbsp;按舞曲ID批量修改&nbsp;</td></tr>

                      <tr><td colspan="2" height="30" class="td_border">&nbsp;&nbsp;ID：&nbsp;<input type="text" name="S_ID" id="S_ID" value="<?php echo $S_ID?>" size="30" /><br>&nbsp;&nbsp;&nbsp;<font color="#FF0000">＊多个ID请用,号阁开，如：25,65,28,11</font></td></tr>

                      <tr><td colspan="2" height="30" class="td_title">&nbsp;<input type="radio" name="type" id="type" value="2" class="radio">&nbsp;按舞曲分类批量修改&nbsp;</td></tr>

                      <tr><td colspan="2" height="30" class="td_border">&nbsp;&nbsp;&nbsp;<select name="ClassID[]" size="1" multiple="multiple" style="WIDTH: 200px; HEIGHT: 220px;color:#000000;" >

              <?php

              	$sqlclass="select * from s_class where S_SystemID=1 ";

				$results=$db->query($sqlclass);

				if($results){

					while ($row3=$db->fetch_array($results)){

							echo "<option value='".$row3['S_ID']."' >".$row3['S_Name']."</option>";

					}	

				}

			  ?>	 

                                                                                                </select><br>&nbsp;&nbsp;&nbsp;<font color="#FF0000">＊按住Ctrl键可选择多个</font></td></tr>

                  </tr>

                      <tr><td colspan="2" height="30" class="td_title">&nbsp;<input type="radio" name="type" id="type" value="3" class="radio">&nbsp;按舞曲服务器组修改&nbsp;</td></tr>

                      <tr><td colspan="2" height="30" class="td_border">&nbsp;&nbsp;&nbsp;<select name="AddPath[]" size="1" multiple="multiple" style="WIDTH: 200px; HEIGHT: 220px;color:#000000;" >

              <?php

              	$sqlclass="select * from s_pathip";

				$results=$db->query($sqlclass);

				if($results){

					while ($row3=$db->fetch_array($results)){

							echo "<option value='".$row3['S_ID']."' >".$row3['S_Name']."</option>";

					}	

				}

			  ?>	 

                                                                                                </select><br>&nbsp;&nbsp;&nbsp;<font color="#FF0000">＊按住Ctrl键可选择多个</font></td></tr>

                    </table></td>

                    <td width="3%" height="30" class="td_title"></td>		

		    <td width="72%" height="30" class="td_title" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Color" class="checkbox" id="Tid"/>&nbsp;舞曲颜色：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><select name="S_Color" >

                           <option style="background-color:#FFFFFF;color: #FFFFFF" value="">无色</option>

                           <option style="background-color:#00FF00;color: #00FF00" value="#00FF00">绿色</option>

                           <option style="background-color:#0000CC;color: #0000CC" value="#0000CC">深蓝</option>

                           <option style="background-color:#FFFF00;color: #FFFF00" value="#FFFF00">黄色</option>

                           <option style="background-color:#FF33CC;color: #FF33CC" value="#FF33CC">粉红</option>

                           <option style="background-color:#FF0000;color: #FF0000" value="#FF0000">红色</option>

                           <option style="background-color:#660099;color: #660099" value="#660099">紫色</option>									

                         </select></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_ClassID" class="checkbox" id="Tid"/>&nbsp;舞曲分类：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><select name="S_ClassID" id="S_ClassID">

                           <?php

              	               $sqlclass="select * from s_class where S_SystemID=1 ";

				$results=$db->query($sqlclass);

				if($results){

					while ($row3=$db->fetch_array($results)){

						echo "<option value='".$row3['S_ID']."' >".$row3['S_Name']."</option>";

					}	

						

				}

			   ?>	 

                         </select></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Author" class="checkbox" id="Tid"/>&nbsp;舞曲歌手：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input name="S_Author" type="text" id="S_Author" value="" size="20" onfocus="this.style.borderColor='#F93'" onblur="this.style.borderColor='#CCC'" />

                                                <select onChange='S_Author.value=this.value;'>

                                                <option value=''>选择歌手</option>

                                                <option value='网络转摘'>网络转摘</option>

                                                <option value='本站原创'>本站原创</option>

                                                </select></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Reco" class="checkbox" id="Tid"/>&nbsp;推荐星级：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border">

                                  <select name="S_Reco" id="S_Reco" style=" color:#FF0000; " >

                                  <option value="0">取消</option>

                                  <option value="1">一星</option>

                                  <option value="2">二星</option>

                                  <option value="3">三星</option>

				  <option value="4">四星</option>

                                  <option value="5">五星</option>

                                  </select></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Rhits" class="checkbox" id="Tid"/>&nbsp;每日人气：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input type="text" name="S_Rits" id="S_Rhits" value="0"  size="10" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>

                         </td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Zhits" class="checkbox" id="Tid"/>&nbsp;每周人气：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input type="text" name="S_Zhits" id="S_Zhits" value="0"  size="10" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>

                         </td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Yhits" class="checkbox" id="Tid"/>&nbsp;每月人气：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input type="text" name="S_Yhits" id="S_Yhits" value="0"  size="10" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Favhits" class="checkbox" id="Tid"/>&nbsp;收藏人气：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input type="text" name="S_Favhits" id="S_Favhits" value="0"  size="10" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>

                         </td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Downhits" class="checkbox" id="Tid"/>&nbsp;下载人气：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input type="text" name="S_Downhits" id="S_Downhits" value="0"  size="10" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/>

                         </td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Hits" class="checkbox" id="Tid"/>&nbsp;年度人气：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input type="text" name="S_Hits" id="S_Hits" value="0"  size="10" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"/></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Direct" class="checkbox" id="Tid"/>&nbsp;所属会员：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input name="S_Direct" type="text" id="S_Direct" value="admin" size="20" onfocus="this.style.borderColor='#F93'" onblur="this.style.borderColor='#CCC'" />

                         <select onChange='S_Direct.value=this.value;'>

                                                <option value='admin'>选择会员</option>

                                       <?php

              	                         $sqluser="select * from s_users where S_State=0 ";

				                         $results=$db->query($sqluser);

				                         if($results){

					                         while ($rowu=$db->fetch_array($results)){

						                         	echo "<option value='".$rowu['S_Name']."' >".$rowu['S_Name']."</option>";	

						                 }

					                  }

			                ?>	



                          </select></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Area" class="checkbox" id="Tid"/>&nbsp;所属地区：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border">

                                  <select name="S_Area" id="S_Area" >

                                  	<option value="未知">选择地区</option>

                                        <?php

              	                          $sqlclass="select * from s_area ";

              	                          $results=$db->query($sqlclass);

              	                          if($results){

              	                            while ($row3=$db->fetch_array($results)){

							echo "<option value='".$row3['S_AreaName']."' >".$row3['S_AreaName']."</option>";	

					    }

					  }

			               ?>

                                </select></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Language" class="checkbox" id="Tid"/>&nbsp;所属语言：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border">

                                <select name="S_Language" id="S_Language" >

                                  	<option value="未知">选择语言</option>

                                         <?php

              	                         $sqlclass="select * from s_area ";

				                         $results=$db->query($sqlclass);

				                         if($results){

					                         while ($row3=$db->fetch_array($results)){

							                         echo "<option value='".$row3['S_Language']."' >".$row3['S_Language']."</option>";

							          }	

					                 }

			                  ?>

                                </select></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Year" class="checkbox" id="Tid"/>&nbsp;发行年月：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input id="S_Year" name="S_Year" size="8" value="<?php echo date( "Y")?>"></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_Topic" class="checkbox" id="Tid"/>&nbsp;所属专题：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border">

                                                <select name="S_Topic" id="S_Topic">

                                                  <option value="0">选择专题</option>

                                                  <?php

              	                                    $sqlclass="select * from s_topic where S_SystemID=1 ";

				                    $results=$db->query($sqlclass);

				                    if($results){

					                  while ($row3=$db->fetch_array($results)){

							     echo "<option value='".$row3['S_ID']."' >".$row3['S_Name']."</option>";

							   }	

						     }

			                           ?>

                                                 </select></td>

                      </tr>

		      <tr>

                         <td width="15%" height="30" class="td_border"><input type="checkbox" name="Tid[]" value="S_IsHide" class="checkbox" id="Tid"/>&nbsp;批量审核：</td>

                         <td height="30" class="td_border">

                                  <select name="S_IsHide" id="S_IsHide" style=" color:#FF0000; " >

                                  <option value="0">审核</option>

                                  <option value="1">回收站</option>

                                  </select></td>

                      </tr>

		      <tr>

                         <td width="15%" height="30" class="td_border"><input type="checkbox" name="Tid[]" value="S_Source" class="checkbox" id="Tid"/>&nbsp;播放来源：</td>

                         <td height="30" class="td_border">

                                  <select name="S_Source" id="S_Source" style=" color:#FF0000; " >

                                  <?php echo playselect($playadd,"");?>

                                  </select></td>

                      </tr>

		      <tr>

                         <td width="15%" height="30" class="td_border"><input type="checkbox" name="Tid[]" value="S_AddPath" class="checkbox" id="Tid"/>&nbsp;服务器组：</td>

                         <td height="30" class="td_border">

                                  <select name="S_AddPath" id="S_AddPath" style=" color:#FF0000; " >

                                  	<option value="0">不要服务器组</option>

                                  <?php

              	                    $sqlclass="select * from s_pathip";

				                    $results=$db->query($sqlclass);

				                    if($results){

					                    while ($row3=$db->fetch_array($results)){

							         echo "<option value='".$row3['S_ID']."' >".$row3['S_Name']."</option>";

					                    }	

				                    }

			          ?>

                                  </select></td>

                      </tr>

		      <tr>

                         <td width="15%" height="30" class="td_border"><input type="checkbox" name="Tid[]" value="19" class="checkbox" id="Tid"/>&nbsp;播放页模板：</td>

                         <td height="30" class="td_border"><input name="S_Templay" type="text" id="S_Templay" size="20" value="play.html"/>&nbsp;<input type="button" value="浏览..." style="width:60px"  onClick="SelectTemplets('form1.S_Templay');" class="submit" /></td>

                      </tr>

                      <tr class="td_title">

                         <td width="15%" class="td_border" height="30"><input type="checkbox" name="Tid[]" value="S_IsEnd" class="checkbox" id="Tid"/>&nbsp;下载点数：&nbsp;&nbsp;</td>

                         <td width="89%" class="td_border"><input id="S_IsEnd" name="S_IsEnd" size="10" value="1"></td>

                      </tr>

		      <tr>

                         <td colspan="2" height="30" class="td_border">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="submit" value="&nbsp;执行操作&nbsp;"  class="rb1"/></td>

                      </tr>

                    </table></td>

                  </tr>

		</form>

		</table>

		</div>

	</div>

</div>

<?php

}

function edit(){

	global $db;

		$S_Type = SafeRequest("type","post");

		$S_ID = SafeRequest("S_ID","post");

		$ClassID = RequestBox("ClassID");

		$AddPath = RequestBox("AddPath");

		$S_Tid = RequestBox("Tid");

		$Arr=explode(',',$S_Tid);



		$S_Color = SafeRequest("S_Color","post");

		$S_ClassID = SafeRequest("S_ClassID","post");

		$S_Topic = SafeRequest("S_Topic","post");

		$S_Author = SafeRequest("S_Author","post");

		$S_Reco = SafeRequest("S_Reco","post");

		$S_IsEnd = SafeRequest("S_IsEnd","post");

		$S_Source = SafeRequest("S_Source","post");

		$S_Year = SafeRequest("S_Year","post");

		$S_Area = SafeRequest("S_Area","post");

		$S_Language = SafeRequest("S_Language","post");

		$S_AddPath= SafeRequest("S_AddPath","post");

		$S_Hits = SafeRequest("S_Hits","post");

		$S_Rhits = SafeRequest("S_Rhits","post");

		$S_Zhits = SafeRequest("S_Zhits","post");

		$S_Yhits = SafeRequest("S_Yhits","post");

		$S_Favhits = SafeRequest("S_Favhits","post");

		$S_Downhits = SafeRequest("S_Downhits","post");

		$S_Direct = SafeRequest("S_Direct","post");

		$S_IsHide = SafeRequest("S_IsHide","post");

		$S_Templay=SafeRequest("S_Templay","post");

		if($S_Type==""){

			echo "<script>jAlert('请选择要操作的分类?','操作提示',function(R){history.back();})</script>";

			die();

			}

		if($S_Tid=="0"){

			echo "<script>jAlert('请选择要操作的项目?','操作提示',function(R){history.back();})</script>";

			die();

			}



                switch($S_Type){

	                 case '1':

		              if($S_ID==""){

			         echo "<script>jAlert('请填写要操作的舞曲ID！','操作提示',function(R){history.back();})</script>";

			         die();

		              }

                              for($i=0;$i<count($Arr);$i++){

                                     if($Arr[$i]=="S_Color"){

                                         $db->query("update s_video set S_Color='".$S_Color."' where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_ClassID"){

                                         $db->query("update s_video set S_ClassID=".$S_ClassID." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Topic"){

                                         $db->query("update s_video set S_Topic=".$S_Topic." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Author"){

                                         $db->query("update s_video set S_Author='".$S_Author."' where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Reco"){

                                         $db->query("update s_video set S_Reco=".$S_Reco." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_IsEnd"){

                                         $db->query("update s_video set S_IsEnd=".$S_IsEnd." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Source"){

                                         $db->query("update s_video set S_Source='".$S_Source."' where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Year"){

                                         $db->query("update s_video set S_Year='".$S_Year."' where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Area"){

                                         $db->query("update s_video set S_Area='".$S_Area."' where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Language"){

                                         $db->query("update s_video set S_Language='".$S_Language."' where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_AddPath"){

                                         $db->query("update s_video set S_AddPath=".$S_AddPath." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Hits"){

                                         $db->query("update s_video set S_Hits=".$S_Hits." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Rhits"){

                                         $db->query("update s_video set S_Rhits=".$S_Rhits." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Zhits"){

                                         $db->query("update s_video set S_Zhits=".$S_Zhits." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Yhits"){

                                         $db->query("update s_video set S_Yhits=".$S_Yhits." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Favhits"){

                                         $db->query("update s_video set S_Favhits=".$S_Favhits." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Downhits"){

                                         $db->query("update s_video set S_Downhits=".$S_Downhits." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Direct"){

                                         $db->query("update s_video set S_Direct='".$S_Direct."' where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_IsHide"){

                                         $db->query("update s_video set S_IsHide=".$S_IsHide." where s_id in (".$S_ID.")");

                                     }elseif($Arr[$i]=="S_Templay"){

                                         $db->query("update s_video set S_Templay='".$S_Templay."' where s_id in (".$S_ID.")");

                                     }

                              }

                              die("<script>jAlert('数据批量操作成功!！','操作提示',function(R){history.back();})</script>");

                         break;

	                 case '2':

		              if($ClassID=="0"){

			         echo "<script>jAlert('选择要操作的舞曲分类！','操作提示',function(R){history.back();})</script>";

			         die();

		              }

                              for($i=0;$i<count($Arr);$i++){

                                     if($Arr[$i]=="S_Color"){

                                         $db->query("update s_video set S_Color='".$S_Color."' where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_ClassID"){

                                         $db->query("update s_video set S_ClassID=".$S_ClassID." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Topic"){

                                         $db->query("update s_video set S_Topic=".$S_Topic." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Author"){

                                         $db->query("update s_video set S_Author='".$S_Author."' where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Reco"){

                                         $db->query("update s_video set S_Reco=".$S_Reco." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_IsEnd"){

                                         $db->query("update s_video set S_IsEnd=".$S_IsEnd." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Source"){

                                         $db->query("update s_video set S_Source='".$S_Source."' where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Year"){

                                         $db->query("update s_video set S_Year='".$S_Year."' where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Area"){

                                         $db->query("update s_video set S_Area='".$S_Area."' where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Language"){

                                         $db->query("update s_video set S_Language='".$S_Language."' where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_AddPath"){

                                         $db->query("update s_video set S_AddPath=".$S_AddPath." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Hits"){

                                         $db->query("update s_video set S_Hits=".$S_Hits." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Rhits"){

                                         $db->query("update s_video set S_Rhits=".$S_Rhits." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Zhits"){

                                         $db->query("update s_video set S_Zhits=".$S_Zhits." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Yhits"){

                                         $db->query("update s_video set S_Yhits=".$S_Yhits." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Favhits"){

                                         $db->query("update s_video set S_Favhits=".$S_Favhits." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Downhits"){

                                         $db->query("update s_video set S_Downhits=".$S_Downhits." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Direct"){

                                         $db->query("update s_video set S_Direct='".$S_Direct."' where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_IsHide"){

                                         $db->query("update s_video set S_IsHide=".$S_IsHide." where S_ClassID in (".$ClassID.")");

                                     }elseif($Arr[$i]=="S_Templay"){

                                         $db->query("update s_video set S_Templay='".$S_Templay."' where S_ClassID in (".$ClassID.")");

                                     }

                              }

                              die("<script>jAlert('数据批量操作成功!！','操作提示',function(R){history.back();})</script>");

                         break;

	                 case '3':

		              if($AddPath=="0"){

			         echo "<script>jAlert('请填写要操作的服务器组！','操作提示',function(R){history.back();})</script>";

			         die();

		              }

                              for($i=0;$i<count($Arr);$i++){

                                     if($Arr[$i]=="S_Color"){

                                         $db->query("update s_video set S_Color='".$S_Color."' where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_ClassID"){

                                         $db->query("update s_video set S_ClassID=".$S_ClassID." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Topic"){

                                         $db->query("update s_video set S_Topic=".$S_Topic." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Author"){

                                         $db->query("update s_video set S_Author='".$S_Author."' where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Reco"){

                                         $db->query("update s_video set S_Reco=".$S_Reco." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_IsEnd"){

                                         $db->query("update s_video set S_IsEnd=".$S_IsEnd." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Source"){

                                         $db->query("update s_video set S_Source='".$S_Source."' where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Year"){

                                         $db->query("update s_video set S_Year='".$S_Year."' where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Area"){

                                         $db->query("update s_video set S_Area='".$S_Area."' where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Language"){

                                         $db->query("update s_video set S_Language='".$S_Language."' where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_AddPath"){

                                         $db->query("update s_video set S_AddPath=".$S_AddPath." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Hits"){

                                         $db->query("update s_video set S_Hits=".$S_Hits." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Rhits"){

                                         $db->query("update s_video set S_Rhits=".$S_Rhits." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Zhits"){

                                         $db->query("update s_video set S_Zhits=".$S_Zhits." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Yhits"){

                                         $db->query("update s_video set S_Yhits=".$S_Yhits." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Favhits"){

                                         $db->query("update s_video set S_Favhits=".$S_Favhits." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Downhits"){

                                         $db->query("update s_video set S_Downhits=".$S_Downhits." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Direct"){

                                         $db->query("update s_video set S_Direct='".$S_Direct."' where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_IsHide"){

                                         $db->query("update s_video set S_IsHide=".$S_IsHide." where S_AddPath in (".$AddPath.")");

                                     }elseif($Arr[$i]=="S_Templay"){

                                         $db->query("update s_video set S_Templay='".$S_Templay."' where S_AddPath in (".$AddPath.")");

                                     }

                              }

                              die("<script>jAlert('数据批量操作成功!！','操作提示',function(R){history.back();})</script>");

                         break;

                }

}

?>

<?php include "admin_bottom.php"; ?>

</body>

</html>

