<?php

/*
'**************************************************************************************************
' 程序名称: CCTVAI开源音乐管理系统
' 官方网站: http://www.cctvai.com
' 联系 Q Q: 1542367792
' QQ交流群：136687984
' 版本：(终结版)
' 备注：未经书面授权，不得向任何第三方提供本软件系统！
' 功能，模板，插件，扩展，定制请联系QQ：1542367792
'**************************************************************************************************
*/
error_reporting(0);
include '../../../include/cctvai.conn.php';
include "../../function_common.php";
admincheck(6);
/*if(Smallfivesolution() == $_SERVER['SERVER_NAME']) {
} else {
    echo Smallfivesq();
    exit();
}*/
include "../../../plug/userSlot/conf.inc.php";
$action=SafeRequest("action", "get");
$ac=SafeRequest("ac", "get");
if($action=="config") {
	$userSlot_open=SafeRequest("userSlot_open", "post");
	$userSlotpointsa=SafeRequest("userSlotpointsa", "post");
	$userSlotpointsb=SafeRequest("userSlotpointsb", "post");
	$userSlotpointsc=SafeRequest("userSlotpointsc", "post");
	$strs="<?php" . "\n";
	$strs=$strs . "define(\"userSlot_open\",\"" . $userSlot_open . "\");\n";
	$strs=$strs . "define(\"userSlotpointsa\",\"" . $userSlotpointsa . "\");\n";
	$strs=$strs . "define(\"userSlotpointsb\",\"" . $userSlotpointsb . "\");\n";
	$strs=$strs . "define(\"userSlotpointsc\",\"" . $userSlotpointsc . "\");\n";
	$strs=$strs . "?>";
	if(!$fp=fopen('../../../plug/userSlot/conf.inc.php', 'w')) {
		showmessage("出错了，文件 ../../../plug/userSlot/conf.inc.php 没有写入权限！", $_SERVER['HTTP_REFERER'], 0);
	}
	$ifile=new iFile('../../../plug/userSlot/conf.inc.php', 'w');
	$ifile->WriteFile($strs, 3);
	showmessage("恭喜您，保存设置成功！", $_SERVER['HTTP_REFERER'], 0);
}
?>
<!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" /> 
  <meta name="renderer" content="webkit" /> 
  <title> 管理后台</title> 
  <link rel="stylesheet" href="../../css/add.css" type="text/css" media="screen" /> 
<style type="text/css">
.table2{width: 100%;max-width: 100%;border-collapse: collapse;border-spacing: 0;}
.table2 td{font-size: 12px;border-top: 1px solid #ddd;padding: 8px;vertical-align: top;}
.table2 tr:hover{text-decoration: none;background-color: #e6f2fb;}
.table2 th{border-bottom: 2px solid #ddd;vertical-align: bottom;padding: 2px;text-align: left;}
.table3{width: 100%;max-width: 100%;border-collapse: collapse;border-spacing: 0;}
.table3 tr:hover{text-decoration: none;background-color: #e6f2fb;}
.table3 td{font-size: 12px;line-height:25px;border-top: 1px solid #ddd;padding: 5px;vertical-align: top;border-right: solid 1px #ddd;}
.table3 th{border-bottom: 2px solid #ddd;vertical-align: bottom;padding: 2px;text-align: left;}
</style>
 </head> 
 <body> 
  <div class="contents"> 
   <div class="panel"> 
    <div class="panel-head">
     <strong>摇摇乐插件</strong>
    </div> 
    <form action="?action=config" method="post" name="form2" >
    <table class="table3" id="dellist"> 
     <tbody>
	 <tr>
       <td width="120" align="left">是否启用</td>
       <td align="left">
<label class="mr20"><input name="userSlot_open" type="radio" value="yes" <?php if(userSlot_open=="yes"){echo "checked";} ?>>&nbsp;启用&nbsp;</label>
<label class="mr20"><input type="radio" name="userSlot_open" value="no" <?php if(userSlot_open=="no"){echo "checked";} ?>>&nbsp;关闭&nbsp;</label>
	   </td>
      </tr>
	 <tr>
       <td width="120" align="left">第一位数上限</td>
       <td align="left">
<input id="userSlotpointsa" name="userSlotpointsa" value="<?php echo userSlotpointsa?>" type="text" class="input input_hd length_1">*单位(百) 0-9
	   </td>
      </tr>
	 <tr>
       <td width="120" align="left">第二位数上限</td>
       <td align="left">
<input id="userSlotpointsb" name="userSlotpointsb" value="<?php echo userSlotpointsb?>" type="text" class="input input_hd length_1">*单位(十) 1-9
	   </td>
      </tr>
	 <tr>
       <td width="120" align="left">第三位数上限</td>
       <td align="left">
<input id="userSlotpointsc" name="userSlotpointsc" value="<?php echo userSlotpointsc?>" type="text" class="input input_hd length_1">*单位(个) 1-9
	   </td>
      </tr>
      <tr>
       <td width="60" align="left">友情提醒</td>
       <td align="left">摇摇乐奖励金币将从 位数上限中随机，第一位：0-上限　第二位：1-上限　第三位：1-上限</td>
      </tr>
      <tr>
       <td height="35" colspan="2" align="left" bgcolor="#FAFBF7" class="td_border"><button type="submit" id="adddance" class="btn btn_submit J_ajax_submit_btn" style="margin-left: 80px;">保存设置</button></td>
      </tr>
     </tbody>
    </table> 
   </div> 
  </div>  
 </body>
</html>