<%@ LANGUAGE=VBScript codepage ="936" %>
<!--#include file="check.asp"-->
<%Response.Expires=0
name=trim(request("name"))
if name="" then Response.End
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("sjjh_usermdb")
tmprs=conn.execute("Select count(*) As 数量 from sjjh_gvurl where a='"& name &"'")
gvurlsl=tmprs("数量")
%>
<html><head><title><%=name%>--世纪下载修改</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link href="jh.css" rel="stylesheet" type="text/css"></head>
<SCRIPT language=JavaScript>
function check(){
var name=document.form.name.value;
var xf=document.form.xf.value;
var xfvalue=document.form.xfvalue.value;
var gvtype=document.form.gvtype.value;
var daoxiao=document.form.daoxiao.value;
var format=document.form.format.value;
var sm=document.form.sm.value;
var gvpic=document.form.gvpic.value;
if(name==""){alert("提示：请输入名称！");return false;}
if(xf==""){alert("提示：请选择消费方式！");return false;}
var pattern = /^([0-9])+$/;
if(pattern.test(xfvalue)!=true){alert("提示：消费数值请用数字添写！");return false;}
if(xfvalue==0){alert("提示：消费数值要大于0！");return false;}
if(gvtype==""){alert("提示：请选择下载类型！");return false;}
if(daoxiao==""){alert("提示：请输入文件大小！");return false;}
if(format==""){alert("提示：请选择文件格式！");return false;}
<%for i=1 to gvurlsl
response.write"var url"& i &"=document.form.url"& i &".value;"& chr(13)&chr(10)
response.write"var urlid"& i &"=document.form.urlid"& i &".value;"& chr(13)&chr(10)
response.write"if(url"& i &"=="& chr(34) & chr(34) &"){alert("& chr(34) &"提示：联接地址"& i &"不可以为空！"& chr(34) &");return false;}"& chr(13)&chr(10)
response.write"if(urlid"& i &"=="& chr(34) & chr(34) &"){alert("& chr(34) &"提示：地址"& i &"不可以为空！"& chr(34) &");return false;}"& chr(13)&chr(10)
response.write"if(urlid"& i &"==0 || urlid"& i &" > "& gvurlsl &"){alert("& chr(34) &"提示：地址"& i &"不可以为0也不可以大于"& gvurlsl &"！"& chr(34) &");return false;}"& chr(13)&chr(10)
response.write"if(pattern.test(urlid"& i &")!=true){alert("& chr(34) &"提示：地址"& i &"请使用数字！"& chr(34) &");return false;}"& chr(13)&chr(10)
next
for t=1 to gvurlsl
for tt=t+1 to gvurlsl
response.write"if (urlid" & t & "==urlid" & tt & "){alert(" & chr(34) & "提示：地址[" & t & "]与地址(" & tt & ")序更号不可以重复!" & chr(34) & ");return false;}" & chr(13)&chr(10)
next
next%>
if(sm==""){alert("提示：请输入简介说明！");return false;}
if(gvpic==""){alert("提示：请输入图片Url！");return false;}
}
</script>
<%
rs.Open "Select * from sjjh_gvzhu where c=1 Order By a", conn, 1,1
str=""
do while (Not RS.Eof)
        str=str & "<option value='"& rs("b") &"'>"& rs("b") &"</option>"
RS.MoveNext
Loop
rs.close
rs.Open "select * from sjjh_gvdata where  m=1 and a='"& name &"'", conn, 1,1
%>
<div align="center"><font size="+1">游戏下载修改--<%=name%></font></div>
<form name="form" method="post" action="jhgl.asp?act=gvgamemodi" onSubmit="return check(this);">
  <table width="80%" border=1 align="center" cellpadding=1 cellspacing=0  bordercolor="#000000" bordercolordark="#FFFFFF">
    <tr> 
      <td colspan="6" align="center" bgcolor="#d7ebff">游戏下载添加</td>
    </tr>
    <tr> 
      <td align="center" bgcolor="#d7ebff">名称</td>
      <td>
<input name="name" type="text" id="name" size="20" maxlength="40" value="<%=rs("a")%>"> 
        <input name="oldname" type="hidden" id="oldname" size="20" maxlength="40" value="<%=rs("a")%>"> 
        <input name="id" type="hidden" id="id" size="20" maxlength="40" value="<%=rs("id")%>"> 
        <input name="gvfs" type="hidden" id="gvfs" value="<%=rs("n")%>" size="4="4">
      </td>
      <td align="center" bgcolor="#d7ebff">消费</td>
      <td> 
        <select name="xf" id="xf">
          <option value="jh_yl" <%if rs("b")="jh_yl" then%>selected<%end if%>>银两</option>
          <option value="jh_jb" <%if rs("b")="jh_jb" then%>selected<%end if%>>金币</option>
          <option value="allvalue" <%if rs("b")="allvalue" then%>selected<%end if%>>存点</option>
        </select>
      </td>
      <td align="center" bgcolor="#d7ebff">消费点数</td>
      <td>
<input name="xfvalue" type="text" id="xfvalue" value="<%=rs("bb")%>" size="8" maxlength="10">
      </td>
    </tr>
    <tr> 
      <td align="center" bgcolor="#d7ebff">推荐</td>
      <td> <select name="tj" id="tj">
          <option value="1" <%if rs("d")=1 then%>selected<%end if%>>★</option>
          <option value="2" <%if rs("d")=2 then%>selected<%end if%>>★★</option>
          <option value="3" <%if rs("d")=3 then%>selected<%end if%>>★★★</option>
          <option value="4" <%if rs("d")=4 then%>selected<%end if%>>★★★★</option>
          <option value="5" <%if rs("d")=5 then%>selected<%end if%>>★★★★★</option>
          <option value="6" <%if rs("d")=6 then%>selected<%end if%>>强烈推荐</option>
        </select>
      </td>
      <td align="center" bgcolor="#d7ebff">大小</td>
      <td> <input name="daoxiao" type="text" id="daoxiao" value="<%=rs("e")%>" size="6" maxlength="6"> 
      </td>
      <td align="center" bgcolor="#d7ebff">格式</td>
      <td><select name="format" id="select2">
          <option value="rar" <%if rs("f")="rar" then%>selected<%end if%>>RAR</option>
          <option value="zip" <%if rs("f")="zip" then%>selected<%end if%>>ZIP</option>
          <option value="iso" <%if rs("f")="iso" then%>selected<%end if%>>ISO</option>
          <option value="exe" <%if rs("f")="exe" then%>selected<%end if%>>EXE</option>
          <option value="other" <%if rs("f")="other" then%>selected<%end if%>>其它</option>
        </select></td>
    </tr>
    <tr> 
      <td align="center" valign="top" bgcolor="#d7ebff">分类</td>
      <td><select name="gvtype" id="gvtype">
          <%=replace(str,"'"& rs("c")&"'","'" & rs("c") & "' selected") %></select></td>
      <td align="center" bgcolor="#d7ebff">会员</td>
      <td colspan="3">
<input type="radio" name="viphy" value="1" <%if rs("bbb")=1 then%>checked<%end if%>>
        是 
        <input type="radio" name="viphy" value="0" <%if rs("bbb")=0 then%>checked<%end if%>>
        否</td>
    </tr>
    <tr> 
      <td align="center" valign="top" bgcolor="#d7ebff">方式</td>
      <td colspan="5">
所在服务器：
        <select name="gvserver" id="gvserver">
<%Set conn1=Server.CreateObject("ADODB.CONNECTION")
Set rs1=Server.CreateObject("ADODB.RecordSet")
conn1.open Application("sjjh_usermdb")
rs1.Open "Select * from sjjh_gvserver", conn1, 1,1
do while (Not RS1.Eof)%>
<option value="<%=rs1("gs_id")%>" <%if rs1("gs_id")=rs("r") then%>selected<%end if%>>第<%=rs1("gs_id")%>号服务器</option>
<%RS1.MoveNext
Loop
rs1.close
set rs1=nothing
conn1.close
set conn1=nothing%>
</select> 
        号服务器
      </td>
    </tr>        
    <tr> 
      <td align="center" valign="top" bgcolor="#d7ebff">简介</td>
      <td colspan="5"><textarea name="sm" cols="60" rows="6" id="sm"> <%=rs("l")%></textarea> 
      </td>
    </tr>
    <tr> 
      <td rowspan="2" align="center" valign="top" bgcolor="#d7ebff">图片</td>
      <td colspan="4"><input name="gvpic" type="text" id="gvpic" size="50" maxlength="150" value="<%=rs("k")%>"></td>
      <td rowspan="2" align="center" bgcolor="#d7ebff" id="pic"> 
        <%if rs("k")="无" then%>
        无图片 
        <%else%>
        <%if instr(rs("k"),"upimg")<>0 then%>
        <img src="../gvdown/<%=rs("k")%>"  width='80' height='60'> 
        <%else%>
        <img src="<%=rs("k")%>"  width='80' height='60'> 
        <%end if%>
        <%end if%>
      </td>
    </tr>
    <tr> 
      <td colspan="4"> <iframe name="ad" frameborder=0 width=100% height=25 scrolling=no src=upfile.asp></iframe></td>
    </tr>
    <%rs.close
     rs.Open "select * from sjjh_gvurl where a='"& name &"' Order by id", conn, 1,1
     urlsl=0
     do while (Not RS.Eof)
     urlsl=urlsl+1%>
    <tr> 
      <td align="center" bgcolor="#d7ebff">址址<%=urlsl%></td>
      <td colspan="5"><input name="url<%=urlsl%>" type="text" id="url<%=urlsl%>" size="60" value="<%=rs("b")%>"> 
        <input name="urlid<%=urlsl%>" type="text" id="urlid<%=urlsl%>" size="2" value="<%=rs("id")%>"> 
      </td>
    </tr>
    <%RS.MoveNext    
	Loop
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing%>
    <input name="urlsl" type="hidden" id="urlsl" value="<%=urlsl%>" size="4" maxlength="4">
    <tr> 
      <td colspan="6" align="center" bgcolor="#d7ebff"><input type="SUBMIT" name="Submit" value="确定"> 
        <input type="RESET" name="Reset" value="清除"></td>
    </tr>
  </table>
</form>
</body>
</html>
