<?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 "../../include/dj95_config.php";

include "../admin_loginstate.php";

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

if($ac=="class"){

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

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

if(!IsNul($DjClassID)) die("</br></br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;抱歉，请选择要绑定的分类！<script>setTimeout('ReadGo();',3000);function ReadGo(){window.location='?ac=main'}</script>");

$DjClassID1=",dj95_".$DjClassID;

global $db;

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

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

if($row){

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

}

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

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

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

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

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

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

if(!IsNul($ym)||!IsNul($key)||!IsNul($name)) die("</br></br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;抱歉，请把信息填写完整！<script>setTimeout('ReadGo();',3000);function ReadGo(){window.location='?ac=main'}</script>");

$config=file_get_contents("../../include/dj95_config.php");

$config=preg_replace('/"Dj95_ym","(.*?)"/','"Dj95_ym","'.$ym.'"',$config);

$config=preg_replace('/"Dj95_name","(.*?)"/','"Dj95_name","'.$name.'"',$config);

$config=preg_replace('/"Dj95_key","(.*?)"/','"Dj95_key","'.$key.'"',$config);

fwrite(fopen("../../include/dj95_config.php","wb"),$config);

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

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

global $db;

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

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

}else{

global $db;

?>

<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" src="../js/jquery.js"></script>

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

<style type="text/css"> 

body { background:#ffffff; font-size: 13px; margin-top:0px;SCROLLBAR-FACE-COLOR: #009ace; SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; SCROLLBAR-SHADOW-COLOR: #ffffff; SCROLLBAR-DARKSHADOW-COLOR: #009ace; SCROLLBAR-3DLIGHT-COLOR: #009ace; SCROLLBAR-ARROW-COLOR: #def0fa;SCROLLBAR-TRACK-COLOR: #def0fa;}

TD {	FONT-SIZE: 13px}

INPUT {	FONT-SIZE: 13px;	HEIGHT: 20px;}

Button{	FONT-SIZE: 9pt;	HEIGHT: 20px; }

Select{	FONT-SIZE: 9pt;	HEIGHT: 20px;}

A{	TEXT-DECORATION: none;	color: #000000;}

A:hover{	COLOR: #428EFF;	text-decoration: underline;}

.STYLE1 {color: #FF0000}
</style>

<script language="JavaScript"> 

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

</script>

<br>

<?php SystemPer(5);?>

<table width="99%" border="0"  cellpadding="2" cellspacing="2" align="center" style="background:#2894FF;">

  <tr>

    <td width="100%" height="24" colspan="2" bgcolor="#ffffff">

    &nbsp;95DJ数据资源入库系统&nbsp;由&nbsp;<a href="http://www.hshxs.com" target="_blank" class="STYLE1">黑色幻想舞曲程序</a>&nbsp;编写并整合到装B舞曲&nbsp;&nbsp;如果您还没有以下信息，<a href="http://www.95dj.com/U/Dj95.Reg.do" target="_blank"><font color=red>请点此注册</font></a></td>

  </tr>

  <tr>

    <td colspan="2" valign="top" bgcolor="#FFFFFF">

<form name='myform' method='post' action='?ac=key'>

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">

<tr> 

    <td width="45%" height="32" colspan="2" bgcolor="#ffffff">

    &nbsp;会员名字：<input name="name" type="text" id="name" size="15" value="<?php echo Dj95_name;?>">&nbsp;*这里填写您95DJ资源的授权用户名&nbsp;

  </td>

    <td width="55%" height="32" colspan="2" bgcolor="#ffffff">

    &nbsp;授权密钥：<input name="key" type="text" id="key" size="20" value="<?php echo Dj95_key;?>">&nbsp;*填写您的授权密钥,注意20个字符以内&nbsp;

  </td>

  </tr>

<tr> 

    <td width="45%" height="32" colspan="2" bgcolor="#ffffff">

    &nbsp;授权域名：<input name="ym" type="text" id="ym" size="15" value="<?php echo Dj95_ym;?>">&nbsp;*这里填写您的授权域名&nbsp;

  </td>

    <td width="55%" height="32" colspan="2" bgcolor="#ffffff">&nbsp;<input type="submit" name="Submit" value="确认保存"></td>

  </tr>

</table>

  </td>

  </tr>

</form>

  <tr>

    <td width="100%" height="24" colspan="2" bgcolor="#ffffff">

    &nbsp;95DJ数据资源栏目绑定</td>

  </tr>

  <tr>

    <td colspan="2" valign="top" bgcolor="#FFFFFF">

<form name='myform' method='post' action='?ac=class'>

	    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">

          <tr> 

            <td colspan="2" height="12"></td>

          </tr>

          <tr> 

            <td width="14%" height="25">95DJ资源栏目是：</td>

            <td width="86%">

<input name="DjClassID" id="DjClassID" type="radio" value="1">1、迪高串烧

<?php

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

if($s_ids){

echo "<font color=red>√</font>";

}else{

echo "<font color=green>×</font>";

}

?>

<input name="DjClassID" id="DjClassID" type="radio" value="11">2、慢摇串烧

<?php

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

if($s_ids){

echo "<font color=red>√</font>";

}else{

echo "<font color=green>×</font>";

}

?>　

<input name="DjClassID" id="DjClassID" type="radio" value="2">3、中文DISCO

<?php

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

if($s_ids){

echo "<font color=red>√</font>";

}else{

echo "<font color=green>×</font>";

}

?>　

<input name="DjClassID" id="DjClassID" type="radio" value="15">4、中文慢摇

<?php

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

if($s_ids){

echo "<font color=red>√</font>";

}else{

echo "<font color=green>×</font>";

}

?>

<input name="DjClassID" id="DjClassID" type="radio" value="13">5、英文Disco

<?php

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

if($s_ids){

echo "<font color=red>√</font>";

}else{

echo "<font color=green>×</font>";

}

?>

<input name="DjClassID" id="DjClassID" type="radio" value="14">6、英文慢摇

<?php

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

if($s_ids){

echo "<font color=red>√</font>";

}else{

echo "<font color=green>×</font>";

}

?>

<input name="DjClassID" id="DjClassID" type="radio" value="18">7、交谊舞曲

<?php

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

if($s_ids){

echo "<font color=red>√</font>";

}else{

echo "<font color=green>×</font>";

}

?>

           </td>

          </tr>

          <tr> 

            <td width="14%" height="25"></td>

            <td width="86%">

<input name="DjClassID" id="DjClassID" type="radio" value="16">8、RNB-RAP

<?php

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

if($s_ids){

echo "<font color=red>√</font>";

}else{

echo "<font color=green>×</font>";

}

?>

<input name="DjClassID" id="DjClassID" type="radio" value="17">9、电音House

<?php

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

if($s_ids){

echo "<font color=red>√</font>";

}else{

echo "<font color=green>×</font>";

}

?>　

           </td>

          </tr>

          <tr> 

            <td height="20">你网站的栏目是：</td>

            <td>

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

 

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

            请对应栏目后（确认绑定）请谨慎操作！<font color=red>“√”</font>表示已经绑定，<font color=green>“×”</font>表示未绑定</td>

          </tr>

          <tr> 

            <td height="30"></td>

            <td align="center">

            <input type="submit" name="Submit" value="确认绑定">

            <input name="jiecbd" type="button" onClick="window.location.href='?ac=classqx'" value="解除所有绑定">

            </td>

          </tr>

        </table>

	  </td>

	  </form>

  </tr>

</table>

<?php

}

?>

<table width="99%" border="0"  cellpadding="1" cellspacing="1" align="center" style="background:#66B3FF;">

  <tr>

	<td  align="center">

<iframe class="iframe" name="main" src="admin_95djrk.php?ac=main" width="100%" height="300" marginwidth="0" marginheight="0" border="0" frameborder="0" scrolling="no"></iframe>		

 </td>

	</tr> 

</table>

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