<% data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/safe.asp"--><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> </title>
<link href="images/css.css" rel="stylesheet" type="text/css">

<script language="javascript">
function isgog()
{
var i=confirm("你确定要升级吗?");
if(i)
{
return true;
}
else
{
return false;
}

}
</script>
</head>
<%
if issession=0 then
gsid=Replace_Text(request.Cookies("Yxmemberid"))
username=Replace_Text(request.Cookies("Yxmember"))
else
gsid=session("id")
username=session("user")
end if

'xx--------------------------
set rscom=server.CreateObject("adodb.recordset")
sqlcom="select * from yixiang_corporation where id="&gsid&""
rscom.open sqlcom,conn,1,1
if rscom.eof then
	response.end
end if

coname=rscom("qymc")
gradenow=rscom("gradeid")
gradeid=request("cgid")
action=request("action")

rscom.close
set rscom=nothing
'xx end-------------------------
set rsgn=server.CreateObject("adodb.recordset")
sqlgn="select * from yixiang_vipgrade where roleid="&gradenow
rsgn.open sqlgn,conn,1,1
if rsgn.eof then
	response.end
else
	gnamenow=rsgn("gradename")
end if

if gradeid="" then
	   response.Write("<script language='javascript'>alert('参数错误');history.go(-1);</script>")
	   response.End
end if
	
	set rsget=server.CreateObject("adodb.recordset")
	sqlget="select * from yixiang_vipgrade where roleid="&gradeid
	rsget.open sqlget,conn,1,1
	if rsget.eof then
s		response.Write("<script language='javascript'>alert('该等级类型不存在！');history.go(-1);</script>")
		response.end
	else
		gname=rsget("gradename")
		gcontent=rsget("regcontent")
	end if
	rsget.close
	set rsget=nothing
'if--------------------------------
if action="save" then
   
	set rsch=server.CreateObject("adodb.recordset")
	sqlch="select * from yixiang_gradetemp where gsid="&gsid&" and shkey=0"
	rsch.open sqlch,conn,1,3
	if rsch.eof then
	rsch.addnew
		rsch("gsid")=gsid
		rsch("gradenow")=gradenow
		rsch("gradesq")=gradeid
		rsch("username")=username
		rsch("coname")=coname
		rsch("shkey")=0
		rsch("gnamenow")=gnamenow
		rsch("gnamesq")=gname
		rsch("sqtime")=date()
	rsch.update
	rsch.close
	set rsch=nothing
	response.Write("<script language='javascript'>alert('升级成功，请等待管理员审核！');location.href='right.asp';</script>")
	else
		response.Write("<script language='javascript'>alert('操作错误，您有未审核的申请或重复提交！');location.href='right.asp';</script>")
		response.end
	end if
end if
'if end--------------------------------
%>
<body>
<table width="100%" border="1" cellpadding="0" style="border-collapse:collapse" cellspacing="0" bordercolor="#2B6FBD">
  
  <tr><td bgcolor="#AFCDF5"  height="25" align="center"><span class="C"> 等级服务升级<font color="red"><%=gname%></font>的操作 </span></td>
  </tr>   
</table>

<table width="100%" border="1" cellpadding="0" style="border-collapse:collapse" cellspacing="0" bordercolor="#EBEBEB">

 <tr>
    <td></td>
  </tr>

  <form name="goform"  method="post" action="changegrade.asp?action=save&cgid=<%=gradeid%>" onSubmit="return isgog();">
  <tr><td bgcolor="#F9F9F9"  height="40" align="center"><input type="submit" name="go" value="确定升级">    &nbsp;&nbsp;&nbsp; <input type="button" name="gogg" onClick="history.back(-1);" value="放弃升级">
  </td></tr>
  </form>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40" align="center" bgcolor="#AFCDF5" style="font-size:15px; margin:10px 0px 0px 0px; border-top:1px solid #2B6FBD"><font color="red"><%=gname%></font> 等级服务注册协议</td>
  </tr>
  <tr>
    <td align="center">
	<table width="100%" cellpadding="0" cellspacing="0" style="border:1px solid #AFCDF5;">
	  <tr>
	    <td><%=gcontent%></td>
	  </tr>
	</table>
	</td>
  </tr>
</table>
</body>
</html>
 