<?php
include("admin.php");
$rst=mysql_query("SELECT * FROM `".$ad."sjadmin` WHERE `name` LIKE '{$_SESSION['name']}'");
$rwt=mysql_fetch_assoc($rst);
$rst=mysql_query("SELECT * FROM `".$ad."setting`");
$rwt=mysql_fetch_assoc($rst);
if($_POST['web']&&$_POST['url']){
mysql_query("UPDATE `".$ad."setting` SET `web` = '{$_POST['web']}',
`url` = '{$_POST['url']}',
`admin` = '{$_POST['admin']}',
`qq` = '{$_POST['qq']}',
`email` = '{$_POST['email']}',
`banquan` = '{$_POST['banquan']}',
`icp` = '{$_POST['icp']}',
`shouji` = '{$_POST['shouji']}' WHERE `".$ad."setting`.`id` ='{$_POST['id']}' LIMIT 1 ;");
echo "<script language=javascript>  
alert( \"恭喜你，信息修改成功\"  );
location.href = \"admin_setting.php\"
</script>";
}
?>
<html>
<head>
<title><?=$rwt['web']?>-管理面版  </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/Css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body >
<center>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <!--DWLayoutTable-->
    <tr> 
      <td width="992" height="30" background="images/Mypic_top15.gif"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr> 
            <td><img src="images/Mypic_top14.gif" width="14" height="14" align="absmiddle"> 
              欢迎光临粉丝刷人管理系统</td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td height="417" valign="top"><table width="100%" border="0" cellspacing="4" cellpadding="0">
          <!--DWLayoutTable-->
          <tr> 
            <td width="984" height="409" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#9FD74E">
                <!--DWLayoutTable-->
                <tr> 
                  <td width="978" height="26" background="images/Mypic_top12.gif"> <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <td><img src="images/Mypic_top13.gif" width="18" height="9" align="absmiddle"> 
                          基本设置</td>
                      </tr>
                    </table></td>
                </tr>
                <tr> 
                  <td height="377" valign="top" bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="4" cellpadding="0">
                      <!--DWLayoutTable-->
                      <tr>
                        <td width="970" height="372" valign="top"><table width="100%" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#EBEBEB" class="tableoutline">
                            <!--DWLayoutTable-->
                            <form action=""  method="post" name="setting" >
                              <tr nowrap bgcolor="#F5F5F5" class="firstalt"> 
                                <td colspan="2"><strong>网站基本设置<b>：</b></strong></td>
                              </tr>
                              <tr nowrap bgcolor="#FFFFFF" class="firstalt"> 
                                <td width="229"><b>网站标题</b><br></td>
                                <td width="718"> <input name="web"  type="text" id="web" value="<?=$rwt['web']?>" size="100" maxlength="100" valid="required" errmsg="不能为空!"> 
                                  <span id="errMsg_c_app_name" class="errmsg"></span>                                </td>
                              </tr>
                              <tr nowrap bgcolor="#FFFFFF" class="secondalt"> 
                                <td><b>主页地址</b><br>
                                  <font color="#666666">系统主页地址'</font><span class="style1">不带http://</span><font color="#666666">'</font></td>
                                <td> <input name="url"  type="text" id="url" value="<?=$rwt['url']?>" size="100" maxlength="100" valid="required" errmsg="不能为空!"> 
                                  <span id="errMsg_c_app_home" class="errmsg"></span>                                </td>
                              </tr>
                              <tr nowrap bgcolor="#FFFFFF" class="secondalt"> 
                                <td><b>站长名称</b><br></td>
                                <td> <input name="admin"  type="text" id="admin" value="<?=$rwt['admin'];?>" size="100" maxlength="50" > </td>
                              </tr>
							    <tr nowrap bgcolor="#FFFFFF" class="secondalt"> 
                                <td><b>站长QQ</b><br></td>
                                <td> <input name="qq"  type="text" id="qq" value="<?=$rwt['qq'];?>" size="100" maxlength="100" >                                </td>
                              </tr>
                              <tr nowrap bgcolor="#FFFFFF" class="secondalt"> 
                                <td><b>站长Email</b><br></td>
                                <td> <input name="email"  type="text" id="email" value="<?=$rwt['email'];?>" size="100" maxlength="100" valid="isEmail" errmsg="格式不对!"> </td>
                              </tr>
                              <tr nowrap bgcolor="#FFFFFF" class="secondalt">
                                <td><b>站长电话</b><br></td>
                                <td><input name="shouji"  type="text" id="shouji" value="<?=$rwt['shouji'];?>" size="100" maxlength="50" ></td>
                              </tr>
                              <tr nowrap bgcolor="#FFFFFF" class="secondalt"> 
                                <td><strong>版权信息</strong></td>
                                <td> <textarea name="banquan" cols="80" id="banquan" valid="required" errmsg="不能为空!"><?=$rwt['banquan'];?></textarea> 
                                  <span id="banquan" class="errmsg"></span>                                </td>
                              </tr>
                              <tr bgcolor="#F5F5F5" class="tbcat" id="cat"> 
                                <td height="23" valign="top"><strong>备案信息</strong> <br></td>
                                <td rowspan="2" valign="top"> <input name="icp"  type="text" id="icp" value="<?=$rwt['icp'];?>" size="35" maxlength="50" valid="required" errmsg="不能为空!"> 
                                <span id="errMsg_c_water_pos" class="errmsg"></span>                                </td>
                              </tr>
                              <tr bgcolor="#F5F5F5" class="tbcat" id="cat">
                                <td height="2"></td>
                              </tr>
                              <tr bgcolor="#F5F5F5" class="tbcat" id="cat">
                                <td height="29" colspan="2" align="center" valign="top"> <input class="bginput" type="submit" name="submit" value=" 提交 " > 
                                  <input class="bginput" type="reset" name="Input" value=" 重置 " >
                                  <input name="id" type="hidden" id="id" value="<?=$rwt['id'];?>"></td>
                              </tr>
                            </form>
                        </table></td>
                      </tr>
                                                        </table></td>
                </tr>
                                      </table></td>
          </tr>
                    </table></td>
    </tr>
  </table>
<center>Powered by: <a href="http://www.126php.com" target="_blank">www.126php.com</a> 程序开发:*!!杨公子 联系QQ:61709225</center>
</body>
</html>