<%@language=vbscript codepage=936 %>

<!--#include file="inc/conn_user.asp"-->
<%
Action=trim(request("Action"))
	if Action="add" then
	set rs=server.createobject("adodb.recordset")
    rs.open "select * from [usergs] order by id desc ",conn_user,1,3
	if rs.eof then
	rs.addnew
	rs("gname")=trim(request("gname"))
    rs("gintor")=request("gintor")
    rs("point")=request("point")
	rs.update
	rs.close
	end if
	end if
%>
<html>
<head>
<title>挂饰管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="Admin_Style.css">

<style type="text/css">
<!--
body {	background-color: #FFFFFF;
	margin-right: 8px;
	margin-bottom: 8px;
	margin-left: 8px;
	margin-top: 0px;
}
.STYLE1 {color: #FF0000}
-->
</style>


</head>
<body leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1" bgcolor="#D6D5D9"></td>
    <td height="34" align=left bgcolor="#F8F8F9"><table width="100%">
      <tr>
        <td width="80"><strong>&nbsp;&nbsp;管理导航：</strong></td>
        <td><a href="Admin_gadd.asp">添加新挂饰</a> &nbsp;<a href="Admin_g.asp">所有挂饰</a></td>
      </tr>
    </table></td>
    <td width="1" bgcolor="#D6D5D9"></td>
  </tr>
  <tr>
    <td width="1" bgcolor="#F8F8F9"></td>
    <td height="1" bgcolor="#D6D5D9" ></td>
    <td width="1" bgcolor="#F8F8F9"></td>
  </tr>
</table>
<table width="100%" height="8" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<div align="center">
</div>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1" bgcolor="#F8F8F9"></td>
    <td height="1" bgcolor="#D6D5D9" ></td>
    <td width="1" bgcolor="#F8F8F9"></td>
  </tr>
  <tr>
    <td width="1" bgcolor="#D6D5D9"></td>
    <td height="25" align=center bgcolor="#F8F8F9"><strong>挂饰添加</strong></td>
    <td width="1" bgcolor="#D6D5D9"></td>
  </tr>

</table>

<%
set rs=server.createobject("adodb.recordset")
rs.open "select * from [usergs] order by id desc ",conn_user,1,1
%>
<form action="admin_gadd.asp?action=add" method="post">

<table width="100%" border="0" cellpadding="6" cellspacing="1" bgcolor="#CCCCCC">
<tr>
    <td width="8%" align="center" bgcolor="#FFFFFF">标题：</td>
    <td bgcolor="#FFFFFF"><input name="gname" type="text" size="40"></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF">简介：</td>
    <td bgcolor="#FFFFFF"><input name="gintor" type="text" size="40"></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF">地址：</td>
    <td bgcolor="#FFFFFF"><input name="textfield3" type="text" value="userg/<%
	  id=rs("id")
	  gid=right("0000000"&id+1,3)
	  response.Write gid
	  %>.gif" size="40">  <font color="#FF0000">*</font>
    将挂饰用FTP上传至userg下并重命名为 <strong><font color="#FF0000">"<%=gid%>.gif"</font></strong></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF">所需点数：</td>
    <td bgcolor="#FFFFFF"><input name="point" type="text" size="40"></td>
  </tr>
  <tr>
    <td align="center" bgcolor="#FFFFFF">&nbsp;</td>
    <td bgcolor="#FFFFFF"><input type="submit" name="Submit" value="添加"></td>
  </tr>

</table></form>
</body>
</html>
