⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 photoadd.asp

📁 功能特点:1、在wap1.0的基础上添加了铃声栏目; 2、修改了后台程序中的一些错误; 3、优化了上传文件中的冗余; 4、
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="cook.asp"-->
<!--#include file="info.asp"-->
<script laguage="javascript">
<!--
function form1_onsubmit()
{
if (document.form1.picname.value=="")
    {
      alert("请输入图片名称!")
      document.form1.picname.focus()
      return false
     }
else if(document.form1.picsize.value=="")
    { 
      alert("图片大小不能为空,请上传图片!")
      document.form1.picsize.focus()
      return false
     }
else if(document.form1.picurl.value=="")
    { 
      alert("图片地址不能为空,请上传图片!")
      document.form1.picurl.focus()
      return false
     }
}
-->
</script>
<%
if request.Form("sub")="sub" then
picname=request.Form("picname")
picsize=request.Form("picsize")
picurl=request.Form("picurl")

if picname="" or picsize="" or picurl="" then
   response.Write"<script>alert('图片内容不能为空!');history.go(-1)</script>"
   response.End()
else
   set rs=server.CreateObject("adodb.recordset")
   sql="select * from photo"
   rs.open sql,conn,3,3
   rs.addnew
   rs("picname")=picname
   rs("picsize")=picsize
   rs("picurl")=picurl
   rs("tjtime")=date()
   rs.update
   response.Write"<script>alert('图片上传成功!');window.location.href('photo.asp')</script>"
   response.End()
end if
end if

call htmltop
%>
<table width="700" height="400" border="0" align="center" cellpadding="0" cellspacing="0" class="TdStyle">
  <tr>
    <td align="center" valign="top" bgcolor="#FFFFFF"><br>
      <table width="600" border="0" cellpadding="5" cellspacing="1" bgcolor="#C0C0C0">
       <form name="form1" method="post" action="photoadd.asp" onsubmit="return form1_onsubmit()">
          <tr align="center" bgcolor="#E3E3E3"> 
            <td height="30" colspan="2"><B>上 传 图 片</B></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td width="100" height="25" align="right">图片名称:</td>
            <td width="500"><input name="picname" type="text" size="30"></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="right">图片大小:</td>
            <td><input name="picsize" type="text" size="12" readonly></td>
          </tr>
          <tr bgcolor="#FFFFFF"> 
            <td height="25" align="right">图片地址:</td>
            <td><input name="picurl" type="text" size="40" readonly><input type="button" name="Submit2" value="上传图片" onClick="window.open('../uppicload.asp','','status=no,scrollbars=no,top=20,left=260,width=420,height=160')"></td>
          </tr>
          <tr align="center" bgcolor="#E3E3E3"> 
            <td height="30" colspan="2"> 
              <input type="submit" name="Submit" value=" 提交 ">
            <input type="hidden" name="sub" value="sub">
            <input type="reset" name="Submit2" value=" 重置 "></td>
    </tr>
  </form>
</table><br>
    </td>
  </tr>
</table>
<%
call htmlend
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -