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

📄 user_photomodify.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true	
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/func.asp"-->
<!--#include file="inc/ad_code_Photo.asp"-->
<%
if CheckUserLogined()=False then
	response.Redirect "User_Login.asp"
end if

dim PhotoID,rsPhoto,sql,FoundErr,ErrMsg
dim ClassID,SkinID,LayoutID,SkinCount,LayoutCount,ClassMaster,BrowsePurview,AddPurview

PhotoID=trim(request("PhotoID"))
if PhotoID="" then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>请指定要修改的图片ID</li>"
	call WriteErrMsg()
	call CloseConn()
	response.end
else
	PhotoID=CLng(PhotoID)
end if
sql="select * from Photo where PhotoID=" & PhotoID & ""
Set rsPhoto= Server.CreateObject("ADODB.Recordset")
rsPhoto.open sql,conn,1,1
if rsPhoto.bof and rsPhoto.eof then
	FoundErr=True
	ErrMsg=ErrMsg & "<br><li>找不到文章</li>"
else
	if rsPhoto("Editor")=request.Cookies("luyeweb")("UserName") then
	 	if rsPhoto("Passed")=True then
			FoundErr=True
			ErrMsg=ErrMsg & "<br><li>图片已经被审核通过,你不能再进行修改!</li>"
		end if
	else
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>你不能修改其他人添加的图片!</li>"
	end if
end if
if FoundErr=True then
	call WriteErrMsg()
else
	ClassID=rsPhoto("ClassID")
%>
<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="ad_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 leftmargin="2" topmargin="0" marginwidth="0" marginheight="0">
<form method="POST" name="myform" onSubmit="return CheckForm();" action="User_PhotoSave.asp" target="_self">
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
    <tr class="title">
      <td height="22" align="center"><b>修 改 图 片</b></td>
    </tr>
    <tr align="center">
      <td>
	    <table width="100%" border="0" cellpadding="2" cellspacing="1">
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>所属栏目:</strong></td>
            <td colspan="2">
              <select name='ClassID'>
                <%call Admin_ShowClass_Option(3,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="<%=rsPhoto("PhotoName")%>" 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" value="<%=mid(rsPhoto("Keyword"),2,len(rsPhoto("Keyword"))-2)%>" 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>图片作者:</strong></td>
            <td colspan="2"> 
              <input name="Author" type="text"
           id="Author" value="<%=rsPhoto("Author")%>" size="20" maxlength="100">
              <font color="#FF0000">&nbsp;</font> <strong>信箱:</strong> 
              <input name="AuthorEmail" type="text" id="AuthorEmail" value="<%=rsPhoto("AuthorEmail")%>" size="30" maxlength="100">
              <strong>&nbsp;主页: 
              <input name="AuthorHomepage" type="text"
           id="CopyFrom2" value="<%=rsPhoto("AuthorHomepage")%>" 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" value="<%=rsPhoto("PhotoUrl_Thumb")%>" size="50" maxlength="200">
              </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" value="<%=rsPhoto("PhotoUrl")%>" size="50" maxlength="200">
              </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" value="<%=rsPhoto("PhotoUrl2")%>" size="50" maxlength="200">
              </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" value="<%=rsPhoto("PhotoUrl3")%>" size="50" maxlength="200">
              </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" value="<%=rsPhoto("PhotoUrl4")%>" size="50" maxlength="200">
              </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代码</td>
            <td colspan="2">
              <textarea name="PhotoIntro" cols="80" rows="5" id="PhotoIntro"><%=rsPhoto("PhotoIntro")%></textarea>
            </td>
          </tr>
          <tr class="tdbg"> 
            <td width="100" align="right"><strong>图片大小:</strong></td>
            <td colspan="2">缩略图: 
              <input name="PhotoSize_Thumb" type="text" id="PhotoSize_Thumb" value="<%=rsPhoto("PhotoSize_Thumb")%>" size="6" maxlength="10">
              K&nbsp;&nbsp;&nbsp;&nbsp;原始图片: 
              <input name="PhotoSize" type="text" id="PhotoSize" value="<%=rsPhoto("PhotoSize")%>" size="6" maxlength="10">
              K &nbsp;&nbsp;&nbsp;&nbsp;图片二: 
              <input name="PhotoSize2" type="text" id="PhotoSize2" value="<%=rsPhoto("PhotoSize2")%>" size="6" maxlength="10">
              K &nbsp;&nbsp;&nbsp;&nbsp;图片三: 
              <input name="PhotoSize3" type="text" id="PhotoSize3" value="<%=rsPhoto("PhotoSize3")%>" size="6" maxlength="10">
              K &nbsp;&nbsp;&nbsp;&nbsp; 图片四: 
              <input name="PhotoSize4" type="text" id="PhotoSize4" value="<%=rsPhoto("PhotoSize4")%>" size="6" maxlength="10">
              K </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <div align="center"> 
    <p>
      <input name="PhotoID" type="hidden" id="PhotoID" value="<%=PhotoID%>"> 
      <input name="Action" type="hidden" id="Action" value="Modify">
      <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>
<%
end if
rsPhoto.close
set rsPhoto=nothing
call CloseConn()
%>

⌨️ 快捷键说明

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