为什么我用弹窗的方法弹出的网页是空页?

李傻傻 发布于 2012/03/19 19:11
阅读 388
收藏 0

这是要被弹窗的代码:

 

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="conn.asp" -->
<% if Session("AdminName")="" then
Response.Redirect("login.asp?action=erro")%>
<%end if%>
<html>
<base target=_self>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>网站管理</title>
<link href="../css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
whichEl.style.display == "none"
if (document.yuziform.checkbox.checked)
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function clean(url,form,id){
url=url.substr(0,url.lastIndexOf("\\")+1); 
var a;
if (document.all.txtimg.value=="")
{
return false;
}
else{
a=document.all.txtimg.value;
a=a.replace("/","\\");
document.all.txtimg.value='';
var fso, f2;
fso = new ActiveXObject("Scripting.FileSystemObject");
f2 = fso.GetFile(url+a);
f2.Delete();
alert("清除图片成功!请重新上传!");
}
}
//-->
</script>
<link href="css.css" rel="stylesheet" type="text/css">
</head>
<body leftMargin=0 topMargin=0 MARGINWIDTH="0" MARGINHEIGHT="0" bgcolor="#FFFFFF">
<table width="782" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#666666">
  <tr>
    <td height="300" align="center" valign="top" bgcolor="#FFFFFF"><br>
      <%
select case Request("action")
case "add"
 call add()
case "savenew"
 call savenew()
case "edit"
 call edit()
case "savedit"
 call savedit()
case "del"
 call del()
case "delok"
 call delok()
case "orders"
 call orders()
case "savorder"
 call savorder()
case else
 call list()
end select

sub list()
%>
        <%
end sub

sub add()
dim sql,rs,i
%>
      <form name="yuziform" method="post" onSubmit="return CheckForm(this);" action="add.asp?action=savenew&id=<%= Request.QueryString("editid") %>">
        <table width="90%" border="0" cellpadding="2" cellspacing="1" bgcolor="#999999">
          <tr bgcolor="#FFFFFF" class="textBlack">
            <td width="19%" align="right">版块内容标题:</td>
            <td colspan="2">
              <input name="txProName" type="text" id="txProName" size="50">
            </td>
          </tr>
          <tr bgcolor="#FFFFFF" class="textBlack">
            <td align="right">版块内容类别:</td>
            <td width="29%">
              <select name=class>
                <%
    sql="select * from ProStr where UserPower='0' order by orders"
    set rs=conn.execute(sql)
    do while not rs.EOF
    %>
                <option value="<%=rs("boardid")%>" <%if request("editid")<>"" and clng(request("editid"))=rs("boardid") then%>selected<%end if%>>
                <%if rs("depth")>0 then%> <%for i=1 to (rs("depth")-1)%> <%next%>
                 <%end if%> <%=rs("boardtype")%></option>
                <%
    rs.MoveNext
    loop
    rs.Close
    %>
              </select>
            </td>
            <td width="52%">是否要上传附件
              <input name="checkbox" type="checkbox"  onclick=showsubmenu(0)  value="checkbox">
            </td>
          </tr>
          <tr class="textBlack"  id=submenu0 style="display:none">
            <td height="25" align="right" bgcolor="#FFFFFF">上传附件:</td>
            <td height="25" colspan="2" valign="middle" bgcolor="#FFFFFF"><iframe name="ad" align="middle" frameborder=0 width=320 height=22 scrolling=no src=uploadfile.asp?k=2></iframe><br>
              <input name="txtimg" type="text" class="btText" id="txtimg" size="30" readonly>
              <input name="Submit" type="button" class="btText" value="清除附件" onclick="clean('<%= replace(Request.ServerVariables("PATH_TRANSLATED"),"\","\\") %>',this.form)">
            </td>
          </tr>
          <tr class="textBlack" >
            <td height="25" align="right" bgcolor="#FFFFFF">友情链接:</td>
            <td height="25" align="center" valign="middle" bgcolor="#FFFFFF">文字说明:
              <input name="smlin" type="text" id="smlin" size="14" maxlength="16">
            </td>
            <td height="25" valign="middle" bgcolor="#FFFFFF">链接地址:
              <input name="alin" type="text" id="alin">
            </td>
          </tr>
          <tr class="textBlack" >
            <td height="25" align="right" bgcolor="#FFFFFF">发布时间:</td>
            <td height="25" bgcolor="#FFFFFF" colspan="2">
              <input name="infotime" type="text" id="alin">
              <font color="#CC0066">(格式为:<font face="Times New Roman, Times, serif">yyyy-mm-dd</font>
              ,如果为空则采用当前时间) </font></td>
          </tr>
          <tr bgcolor="#FFFFFF" class="textBlack">
            <td height="400" colspan="3" valign="top">
              <input name="content" type="hidden">
              <SCRIPT src="inc/post.js"></SCRIPT>
            </td>
          </tr>
          <tr bgcolor="#FFFFFF" class="textBlack">
            <td colspan="3" align="center">
              <input type="submit" name="submit1" value="提交">
             
              <input name=preview type="reset" value="取消">
            </td>
          </tr>
        </table>
      </form>
      <%
end sub

sub savenew()
dim rs,sql,maxid,isrs
dim proname,propertis,protype,picpath,isre,infotime
if Request.Form("txProName")="" then
 response.Write("<span class='textblack'>请填写版块内容标题!</span><br><br><a href='#' class='linkblack' onclick='history.back(-1)'>点击这里返回</a>")
 exit sub
end if
'if Request.Form("content")="" then
 'response.Write("<span class='textblack'>请填写版块内容内容!</span><br><br><a href='#' class='linkblack' onclick='history.back(-1)'>点击这里返回</a>")
 'exit sub
'end if
set rs = conn.execute("select max(id) from products")
maxid=rs(0)+1
set isrs=conn.execute("select * from products")
if not(isrs.eof and isrs.bof) then
 isre="y"
end if
set rs = server.CreateObject ("adodb.recordset")
sql = "select * from products"
rs.Open sql,conn,1,3
rs.AddNew
if isre="y" then
 rs("id")=maxid
else
 rs("id")=1
end if
rs("proname")=Request.Form("txProName")
rs("propertis")=strcode(Request.Form("content"))
rs("protype")=Request.Form("class")
if Request.Form("txtimg")<>"" then
 rs("picpath")=Request.Form("txtimg")
end if
rs("YorN")=Request.Form("opIs")
rs("alink")=Request.Form("alin")
rs("smlink")=Request.Form("smlin")
rs("viewnum")=0

if Request.Form("infotime") <>"" then

rs("uptime")=Request.Form("infotime")

else

rs("uptime")=date()

end if

rs.Update
rs.Close
response.write ("<span class='textblack'>版块内容添加成功!</span><br><br><a href='#' onclick='window.close()'>点击这里返回版块内容列表</a>")
end sub

sub edit()
dim sql,rs,i
dim proname,propertis,protype,picpath,YorN,alin,smlin,infotime
set rs=conn.execute("select * from products where id="&request.QueryString("editid"))
proname=rs("proname")
propertis=rs("propertis")
protype=rs("protype")
picpath=rs("picpath")
infotime=rs("uptime")
YorN=rs("YorN")
alin=rs("alink")
smlin=rs("smlink")
%>
      <form name="yuziform" method="post" onSubmit="return CheckForm(this);" action="ProList.asp?action=savedit&id=<%= Request.QueryString("id") %>">
        <table width="90%" border="0" cellpadding="2" cellspacing="1" bgcolor="#999999">
          <tr bgcolor="#FFFFFF" class="textBlack">
            <td width="22%" align="right">版块内容标题:</td>
            <td colspan="2">
              <input name="txProName" type="text" id="txProName" value="<%=proname%>" size="50">
            </td>
          </tr>
          <tr bgcolor="#FFFFFF" class="textBlack">
            <td align="right">版块内容类别:</td>
            <td width="27%">
              <select name=class>
                <%
    sql="select * from ProStr where UserPower='0' order by orders"
    set rs=conn.execute(sql)
    do while not rs.EOF
    %>
                <option value="<%=rs("boardid")%>" <%if protype<>"" and clng(protype)=rs("boardid") then%>selected<%end if%>>
                <%if rs("depth")>0 then%> <%for i=1 to (rs("depth")-1)%> <%next%>
                ┗ <%end if%> <%=rs("boardtype")%></option>
                <%
    rs.MoveNext
    loop
    rs.Close
    %>
              </select>
              <input name="editid" type="hidden" id="editid2" value="<%=request.QueryString("editid")%>">
            </td>
            <td width="51%">是否要修改原附件
              <input name="checkbox" type="checkbox"  onclick=showsubmenu(0)  value="checkbox">
            </td>
          </tr>
          <tr class="textBlack"  id=submenu0 style="display:none">
            <td height="25" align="right" bgcolor="#FFFFFF">上传附件:</td>
            <td height="25" colspan="2" valign="middle" bgcolor="#FFFFFF"><iframe name="ad" align="middle" frameborder=0 width=320 height=22 scrolling=no src=uploadfile.asp?k=2></iframe><br>
              <input name="txtimg" type="text" class="btText" id="txtimg" value="<%= picpath %>" size="30" readonly>
              <input name="Submit" type="button" class="btText" value="请先清除原附件" onclick="clean('<%= replace(Request.ServerVariables("PATH_TRANSLATED"),"\","\\") %>',this.form,'<%=request.QueryString("editid")%>')">
            </td>
          </tr>
          <tr class="textBlack">
            <td height="25" align="right" bgcolor="#FFFFFF">友情链接:</td>
            <td height="25" align="center" valign="middle" bgcolor="#FFFFFF">文字说明:
              <input name="smlin" type="text" id="smlin" value='<%=smlin%>' size="14" maxlength="16">
            </td>
            <td height="25" valign="middle" bgcolor="#FFFFFF">链接地址:
              <input name="alin" type="text" id="alin" value='<%=alin%>' >
            </td>
          </tr>
          <tr class="textBlack">
            <td height="25" align="right" bgcolor="#FFFFFF">发布时间:</td>
            <td height="25" valign="middle" bgcolor="#FFFFFF" colspan="2">
              <input name="infotime" type="text" id="infotime" value="<%=infotime%>">
              <font color="#CC0066">(格式为:<font face="Times New Roman, Times, serif">yyyy-mm-dd</font>
              ,如果为空则采用当前时间) </font></td>
          </tr>
          <tr valign="top" bgcolor="#FFFFFF" class="textBlack">
            <td height="400" colspan="3">
              <input name="content" type="hidden" id="content" value='<%=propertis%>'>
              <SCRIPT src="inc/post.js"></SCRIPT>
            </td>
          </tr>
          <tr bgcolor="#FFFFFF" class="textBlack">
            <td colspan="3" align="center">
              <input name="submit1" type="submit" id="submit1" value="提交">
             
              <input name=preview type="reset" value="取消">
            </td>
          </tr>
        </table>
      </form>
<%
end sub

sub savedit()
dim sql
if request.Form("editid")="" then
 response.Write("<span class='textblack'>没有指定要编辑的记录号!</span><br><br><a href='ProList.asp' class='linkblack'>点击这里返回</a>")
 exit sub
end if
if Request.Form("txProName")="" then
 response.Write("<span class='textblack'>请填写版块内容标题!</span><br><br><a href='#' class='linkblack' onclick='history.back(-1)'>点击这里返回</a>")
 exit sub
end if
if Request.Form("content")="" then
 response.Write("<span class='textblack'>请填写版块内容内容!</span><br><br><a href='#' class='linkblack' onclick='history.back(-1)'>点击这里返回</a>")
 exit sub
end if


dim infotime,thesavetime

if Request.Form("infotime") <>"" then

thesavetime=Request.Form("infotime")

else

thesavetime=date()

end if

sql="update products set proname='"&request.Form("txProName")&"',uptime='"&thesavetime&"',propertis='"&strcode(request.Form("content"))&"',protype="&request.Form("class")&",picpath='"&request.Form("txtimg")&"',alink='"&request.Form("alin")&"',smlink='"&request.Form("smlin")&"' where id="&request.Form("editid")
conn.execute(sql)
'response.write("sql="&sql&"<br>")
response.Write("<span class='textblack'>编辑版块内容成功!</span><br><br><a href='#' class='linkblack' onclick='window.close()'>点击这里返回版块内容列表</a>")
end sub

sub orders()
%>
<%
end sub
function strcode(str)
 str=replace(str,"'","||")
 str=replace(str,"<","&lt;")
 str=replace(str,CHR(34),"&quot;")
 strcode=replace(str,">","&gt;")
end function
%>
</td>
  </tr>
</table>
</body>
</html>

加载中
0
james.xu
james.xu
=_=, 你真的期望别人看这一堆乱代码然后就能给你解答么?
0
leo108
leo108

引用来自“james.xu”的答案

=_=, 你真的期望别人看这一堆乱代码然后就能给你解答么?
+1
0
Sky__
Sky__
最不喜欢的就是js
0
Andre.Z
Andre.Z
看到就头晕了,你地址栏直接敲一下你弹的地址看看结果呗。估计还是空白 - -
0
白黑白
白黑白
这一坨代码真心看不了
返回顶部
顶部