user_photoadd.asp

来自「利用C++编写的网络跟踪代码」· ASP 代码 · 共 223 行

ASP
223
字号
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true	
%>
<!--#include file="inc/Conn_User.asp"-->
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/function.asp"-->
<!--#include file="inc/admin_code_Photo.asp"-->
<%
if CheckUserLogined()=False then
	response.Redirect "User_Login.asp"
end if
dim ClassID,SpecialID
dim SkinID,LayoutID,SkinCount,LayoutCount,ClassMaster,BrowsePurview,AddPurview
ClassID=session("ClassID")
SpecialID=session("SpecialID")
if ClassID="" then
	ClassID=0
else
	ClassID=Clng(ClassID)
end if
if SpecialID="" then
	SpecialID=0
else
	SpecialID=Clng(SpecialID)
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="MicroPhoto FrontPage 3.0">
<title>添加图片</title>
<link rel="stylesheet" type="text/css" href="Admin_Style.css">
<script language = "JavaScript">
function CheckForm()
{
  if (document.myform.ClassID.value=="")
  {
    alert("图片所属栏目不能指定为含有子栏目的栏目!");
	document.myform.ClassID.focus();
	return false;
  }
  if (document.myform.ClassID.value==0)
  {
    alert("图片所属栏目不能指定为外部栏目!");
	document.myform.ClassID.focus();
	return false;
  }
  if (document.myform.ClassID.value=="-1")
  {
    alert("你没有在此栏目添加软件的权限,请选择其他栏目!");
	document.myform.ClassID.focus();
	return false;
  }
  if (document.myform.PhotoName.value=="")
  {
    alert("图片名称不能为空!");
	document.myform.PhotoName.focus();
	return false;
  }
  if (document.myform.Keyword.value=="")
  {
    alert("关键字不能为空!");
	document.myform.Keyword.focus();
	return false;
  }
  if (document.myform.PhotoUrl_Thumb.value=="")
  {
    alert("缩略图地址不能为空!");
	document.myform.PhotoUrl_Thumb.focus();
	return false;
  }
  if (document.myform.PhotoSize_Thumb.value=="")
  {
    alert("缩略图文件大小不能为空!");
	document.myform.PhotoSize_Thumb.focus();
	return false;
  }
  if (document.myform.PhotoUrl.value=="")
  {
    alert("原始图片地址不能为空!");
	document.myform.PhotoUrl.focus();
	return false;
  }
  if (document.myform.PhotoSize.value=="")
  {
    alert("原始图片文件大小不能为空!");
	document.myform.PhotoSize.focus();
	return false;
  }
}
</script>
</head>
<body>
<form method="POST" name="myform" onSubmit="return CheckForm();" action="User_PhotoSave.asp" target="_self">
  <table width="760" border="0" align="center"  cellpadding="0" cellspacing="0">
    <tr> 
      <td height="20" background="imge/atopa.gif"> <div align="center"><b>添 加 
          图 片</b></div></td>
    </tr>
  </table>
  <table width="100%" border="0" align="center"  cellpadding="0" cellspacing="0">
    <tr> 
      <td height="11"></td>
    </tr>
  </table>
  <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
   
    <tr align="center">
      <td>
	    <table width="760" border="0" align="center" cellpadding="2" cellspacing="0">
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>所属栏目:</strong></td>
            <td colspan="2"> 
              <select name='ClassID'>
                <%call Admin_ShowClass_Option(4,ClassID)%>
              </select>
              <font color='#0000FF'>不能指定为含有子栏目的栏目,或者外部栏目,或者带“<font color="#FF0000">*</font>”的栏目(无权限)</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>作品名称:</strong></td>
            <td colspan="2"> 
              <input name="PhotoName" type="text" id="PhotoName" value="" size="50" maxlength="255">
              <font color="#FF0000">*</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>关键字:</strong></td>
            <td colspan="2"> 
              <input name="Keyword" type="text"
           id="Keyword" size="50" maxlength="255">
              <font color="#FF0000">*</font><br>
              <font color="#0000FF">用来查找相关图片,可输入多个关键字,中间用<font color="#FF0000">“|”</font>隔开。不能出现&quot;&quot;'*?,.()等字符。</font></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>作&nbsp;&nbsp;者:</strong></td>
            <td colspan="2"> 
              <input name="Author" type="text"
           id="Author" size="20" maxlength="100">
              <font color="#FF0000">&nbsp;</font> <strong>信箱:</strong> 
              <input name="AuthorEmail" type="text" id="AuthorEmail" size="30" maxlength="100">
              <strong>&nbsp;主页: 
              <input name="AuthorHomepage" type="text"
           id="CopyFrom2" value="http://" size="30" maxlength="100">
              </strong></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>缩略图:</strong></td>
            <td> 
              <input name="PhotoUrl_Thumb" type="text" id="PhotoUrl_Thumb" size="46" maxlength="200">
              <font color="#FF0000">&nbsp;              </font></td>
            <td><iframe style="top:2px" ID="UploadFiles" src="upload_Photo.asp?PhotoUrlID=0" frameborder=0 scrolling=no width="320" height="25"></iframe></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>图片一:</strong></td>
            <td> 
              <input name="PhotoUrl" type="text" id="PhotoUrl" size="46" maxlength="200">
              <font color="#FF0000">&nbsp;              </font> </td>
            <td><iframe style="top:2px" ID="UploadFiles" src="upload_Photo.asp?PhotoUrlID=1" frameborder=0 scrolling=no width="320" height="25"></iframe></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>图片二:</strong></td>
            <td> 
              <input name="PhotoUrl2" type="text" id="PhotoUrl2" size="46" maxlength="200">
              <font color="#FF0000">&nbsp;              </font> </td>
            <td><iframe style="top:2px" ID="UploadFiles" src="upload_Photo.asp?PhotoUrlID=2" frameborder=0 scrolling=no width="320" height="25"></iframe></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>图片三:</strong></td>
            <td> 
              <input name="PhotoUrl3" type="text" id="PhotoUrl3" size="46" maxlength="200">
              <font color="#FF0000">&nbsp;              </font> </td>
            <td><iframe style="top:2px" ID="UploadFiles" src="upload_Photo.asp?PhotoUrlID=3" frameborder=0 scrolling=no width="320" height="25"></iframe></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>图片四:</strong></td>
            <td> 
              <input name="PhotoUrl4" type="text" id="PhotoUrl4" size="46" maxlength="200">
              <font color="#FF0000">&nbsp;              </font> </td>
            <td><iframe style="top:2px" ID="UploadFiles" src="upload_Photo.asp?PhotoUrlID=4" frameborder=0 scrolling=no width="320" height="25"></iframe></td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right" valign="middle"><strong>作品描述:</strong><br>
              支持UBB代码&nbsp;</td>
            <td colspan="2"> 
              <textarea name="PhotoIntro" cols="85" rows="7" id="PhotoIntro"></textarea>
            </td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" height="40" align="right"><strong>图片大小:</strong></td>
            <td colspan="2">缩略图: 
              <input name="PhotoSize_Thumb" type="text" id="PhotoSize_Thumb" size="6" maxlength="10">
              K&nbsp;&nbsp;原始图片: 
              <input name="PhotoSize" type="text" id="PhotoSize" size="6" maxlength="10">
              K&nbsp;&nbsp;图片二: 
              <input name="PhotoSize2" type="text" id="PhotoSize2" size="6" maxlength="10">
              K &nbsp;图片三: 
              <input name="PhotoSize3" type="text" id="PhotoSize3" size="6" maxlength="10">
              K &nbsp; 图片四: 
              <input name="PhotoSize4" type="text" id="PhotoSize4" size="6" maxlength="10">
              K </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <div align="center"> 
    <p> 
      <input name="Action" type="hidden" id="Action" value="Add">
      <input
  name="Add" type="submit"  id="Add" value=" 添 加 " style="cursor:hand;">
      &nbsp; 
      <input name="Cancel" type="button" id="Cancel" value=" 取 消 " onClick="window.location.href='User_PhotoManage.asp'" style="cursor:hand;">
    </p>
  </div>
</form>
</body>
</html>
<%
call CloseConn()
%>

⌨️ 快捷键说明

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