<?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";

?>

<!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>欢迎进入装B资源库</title>

<link href="http://dj.chshcms.com/images/style.css" rel="stylesheet" type="text/css" />

 <script language="JavaScript"> 

document.oncontextmenu=new Function("event.returnValue=false;"); 

document.onselectstart=new Function("event.returnValue=false;"); 

</script>

</head>

<body>

<?php

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

if($ac=="go"){

	global $db;

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

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

	$chshid=",".$chshid."";

	$sql="Select * from s_class where S_ID=".$classid."";

	$row=$db->getrow($sql);

if($row){

	$chshid="".$row["S_TieID"]."".$chshid.",";

}

	$db->query("update s_class set S_TieID='".$chshid."' where s_id=".$classid."");

	die("<script>;window.location='?ac=main';</script>");

}elseif($ac=="jieb"){

	global $db;

	$classid=SafeRequest("chshid","get");

	$db->query("update s_class set S_TieID=0 where S_TieID='".$classid."'");

	die("<script>;window.location='?ac=main';</script>");

}elseif($ac=="delall"){

	global $db;

	$db->query("update s_class set S_TieID=0 ");

	die("<script>;window.location='?ac=main';</script>");

}

?>

<?php

if($ac=="main"){

global $db;

?>

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

          <tr>

          <td colspan="7"  bgcolor="#FFFFFF" class="type_zy" style="color:red; font-size:12px;text-align:center;normal; height:30px;"><strong>&nbsp;*　注意：请点击＂未绑定＂的文字绑定您的分类，否则数据将不会入库！</strong></td>

                     </tr>

         

          <tr>

		

  <td width="13%" height="30"  style="padding-left:10px;"><a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=1' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">现场舞曲</font></a>

<?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,1,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=1&name=现场舞曲' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=1&name=现场舞曲'>未绑定</a>

<?php

}

?>

</td>

 

  <td width="13%" height="30"  style="padding-left:10px;"><a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=2' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">慢摇舞曲</font></a>

 <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,2,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=2&name=慢摇舞曲' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=2&name=慢摇舞曲'>未绑定</a>

<?php

}

?>

</td>

 

  <td width="13%" height="30"  style="padding-left:10px;"><a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=3' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">综合舞曲</font></a>

  <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,3,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=3&name=综合舞曲' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=3&name=综合舞曲'>未绑定</a>

<?php

}

?>



</td>

 

  <td width="13%" height="30"  style="padding-left:10px;"><a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=4' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">酒吧Club</font></a>

   <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,4,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=4&name=酒吧Club' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=4&name=酒吧Club'>未绑定</a>

<?php

}

?>

</td>

 

  <td width="13%" height="30"  style="padding-left:10px;"><a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=5' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">交谊舞曲</font></a>

    <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,5,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=5&name=交谊舞曲' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=5&name=交谊舞曲'>未绑定</a>

<?php

}

?>



</td>

 

  <td width="13%" height="30"  style="padding-left:10px;"><a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=6' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">慢摇串烧</font></a>

    <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,6,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=6&name=慢摇串烧' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=6&name=慢摇串烧'>未绑定</a>

<?php

}

?>

</td>

 

  <td width="13%" height="30"  style="padding-left:10px;"><a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=7' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">中文舞曲</font></a>

    <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,7,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=7&name=中文舞曲' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=7&name=中文舞曲'>未绑定</a>

<?php

}

?> 

</td>

 

 

  </tr>

    

          <tr>

		  

 

  <td width="13%" height="30"  style="padding-left:10px;">

<a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=8' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">英文舞曲</font></a>

    <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,8,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=8&name=英文舞曲' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=8&name=英文舞曲'>未绑定</a>

<?php

}

?> 

</td>

 

  <td width="13%" height="30"  style="padding-left:10px;">

<a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=9' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">歪歌翻唱</font></a>

    <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,9,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=9&name=歪歌翻唱' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=9&name=歪歌翻唱'>未绑定</a>

<?php

}

?>  

</td>

 

  <td width="13%" height="30"  style="padding-left:10px;">

<a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=10' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">流行歌曲</font></a>

    <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,10,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=10&name=流行歌曲' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=10&name=流行歌曲'>未绑定</a>

<?php

}

?>  

</td>

 

  <td width="13%" height="30"  style="padding-left:10px;">

<a href='http://chshcms.com/mp3/dj/?ac=list&mark=php&classid=11' target="main"><font style="font-size:12px; font-weight:bold; color:#00F; font-family:'新宋体';">视频舞曲</font></a>

    <?php

$s_ids= $db->Getone("select s_id from s_class where S_TieID like '%,11,%'");

if($s_ids){

?>

  <a title='已经定---点击修改该分类' href='admin_classid.php?ac=bd&chshid=11&name=视频舞曲' style=" color:#009900">已绑定</a>

<?php

}else{

?>

  <a title='未绑定---点击绑定该分类' href='admin_classid.php?ac=bd&chshid=11&name=视频舞曲'>未绑定</a>

<?php

}

?> 

</td>





 

 

  <td width="13%" height="30"   style="padding-left:10px;"><a  href='http://chshcms.com/mp3/dj/?ac=&mark=php' target="main"><font color="#FF0000"><b>全部资源</b></font></a>



  <td width="13%" height="30"   style="padding-left:10px;"><a  href='?ac=delall'><font color="#009966"><b>一键解除所有绑定</b></font></a>

 

  </tr>

    

  

          </table>



<?php

}elseif($ac=="bd"){

$classid=SafeRequest("chshid","get");

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

?>

<form id="login" name="login" onSubmit="return checklogin()" method="post" action="?ac=go">

<TABLE width="100%" border=0 align=center cellpadding="4" cellSpacing=1 class=tbtitle style="BACKGROUND: #cad9ea;">



  <TBODY>

  <input name="chshid" type="hidden" value="<?php echo $classid?>">

    <TR>

      <TD width="20%" vAlign=center bgcolor="#FFFFFF" class="tdxingmu">提示信息：</TD>

      <TD bgcolor="#FFFFFF" class="tdback"> 将资源库分类: <font color="red"><?php echo $name?></font> 绑定到

	  </TD>

    </TR>

    <TR>

      <TD width="20%" vAlign=center bgcolor="#FFFFFF" class="tdxingmu">本地分类：</TD>

      <TD bgcolor="#FFFFFF" class="tdback">

      &nbsp;  

        <select name="classid">

              <?php

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

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

				if($results){

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

						if($class==$row3['S_ID']){

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

							}

						else{

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

							}	

						

						}

					}

			  ?>

		 </select>

	  </TD>

    </TR>

    <TR align="center" bgcolor="#f8fbfb">

      <TD colspan="2"><input class=inputbut type=submit value=绑定分类 name=Submit> &nbsp;<input name="jiecbd" type="button" onClick="window.location.href='?ac=jieb&chshid=<?php echo $classid?>'" value="解除绑定"></TD>

    </TR>

  </TBODY>

 

</TABLE>

 </form>

<?php

}

?>

</body>

</html>









