photoedit.asp

来自「不是我做的一个留言板」· ASP 代码 · 共 195 行

ASP
195
字号
<%
bg_id=1
%>
<!--#include file="conn.asp" -->
<!--#include file="../js/vbjava.asp" -->
<!--#include file="../templet/mon.asp" -->
<!--#include file="../main/session.asp" -->
<head>
<SCRIPT src="../js/win_js.js"></SCRIPT>
</HEAD>
<center>
<SCRIPT>SL_open(735,400);</SCRIPT>
<center>
<%
web_id="../language/"&l_id
web_id=web_id&"/WELCOM_MSG.ASP"
call include(web_id)
web_id="../language/"&l_id
web_id=web_id&"/CHECK.ASP"
call include(web_id)
%>


<script language="JavaScript">
<!--
function checkform(){
if (document.form1.phototitle.value.length==0){
	alert("<%=L_CHECKPHOTO1%>");
	document.form1.phototitle.focus();
	return false;
	}
if  (document.form1.photocomment.value.length>200) {
	alert("<%=L_CHECKPHOTO2%>");
	document.form1.photocomment.focus();
	return false;
	}
	return true
	}
//-->
</script>
<%
photoid=request.QueryString("id")
group=request.QueryString("group")
if request.Form("method")="submit" then
	phototitle=trim(request.Form("phototitle"))
	photocomment=trim(request.Form("photocomment"))
	photoid=trim(request.Form("id"))
	set rs1=server.CreateObject("adodb.recordset")
	sql1="select * from photo where photoid="&photoid
	rs1.open sql1,conn,3,3
	rs1("phototitle")=phototitle
	rs1("photocomment")=photocomment
	rs1.update
	rs1.close
	set rs1=nothing
IF group="admin" THEN
log_url="../class_admin/admin_photo.asp?sid=相册管理"
log_msg=L_WELCOM_MSG5
else
log_url="../main/user_photo.asp?sid=我的相册"
log_msg=L_WELCOM_MSG5
end if
%>
<!--#include file="../main/welcom.asp" -->
<%
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from photo where photoid="&photoid
rs.open sql,conn,1,1
phototitle=trim(rs("phototitle"))
photocomment=trim(rs("photocomment"))
photoid=trim(rs("photoid"))
%>



<center>
<table border="1" width="100%" bgcolor=<%=top_bg_color%> bordercolor=<%=top_borderbg_color%> heigth="700">
<tr><td>
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.phototitle.value == "")
  {
    alert("<%=L_CHECKPHOTO3%>");
    theForm.phototitle.focus();
    return (false);
  }

  if (theForm.phototitle.value.length > 20)
  {
    alert("<%=L_CHECKPHOTO4%>");
    theForm.phototitle.focus();
    return (false);
  }

  if (theForm.photocomment.value == "")
  {
    alert("<%=L_CHECKPHOTO5%>");
    theForm.photocomment.focus();
    return (false);
  }

  if (theForm.photocomment.value.length > 200)
  {
    alert("<%=L_CHECKPHOTO6%>");
    theForm.photocomment.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form action="photoedit.asp?group=<%=group%>" method="post" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)">
<center>

<%
' -----------------------------------------------------------------
call mon(y)
        RESPONSE.WRITE "<table width=100% border=1 bgColor='"&td_bg_color&"' bgborder='"&td_bor&"'>"
        RESPONSE.WRITE "<tr><td  height=50 background="&web_background&"/top_foot_img/bg4.gif>"
        RESPONSE.WRITE "『<font color='#ff0000'>"&left(trim(rs("phototitle")),6)&"...</font>』<br>"
        RESPONSE.WRITE LEFT(Trim(rs("photocomment")),10)
        RESPONSE.WRITE "</td></tr><tr><td bgColor=ffffff align=center> <br>"
%>

<table border="0" cellPadding="0" cellSpacing="0" height="90" width="130">
  <tr>
    <td align="middle" width="130">
      <table bgColor="#cccccc" border="0" cellPadding="0" cellSpacing="1" height="90" width="130">
        <tbody>
          <tr>
            <td bgColor="#ffffff">
              <table align="center" bgColor="#ffffff" border="0" cellPadding="0" cellSpacing="1" height="80" width="110">
                <tbody>
                  <tr>
                    <td align=center>

<img src="<%=photopath%>/<%=rs("photoname")%>" border="0" onload="javascript:DrawImage(this);" >


                   </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
        </tbody>
      </table>
<%
        RESPONSE.WRITE "</td><td align=middle vAlign=bottom width=17>"
        RESPONSE.WRITE "<img border=0 src="&img_path&"/cool.gif width=10 height=70>"
        RESPONSE.WRITE "</td></tr></table><br>"
        RESPONSE.WRITE L_CLASS_UPUSER&":"&trim(rs("photouser"))
        RESPONSE.WRITE "<br>"&trim(rs("phototime"))
	RESPONSE.WRITE mon_foot&"</table>"
' --------------------------------------------------------------------
%>
<br>
<table> 
<tr> 
<td>
<div align="right">
<%=L_CLASS_PHOTOTILE2%>:
</div>
</td>
<td>

<input name="phototitle" height="20" value="<%=rs("phototitle")%>" size="26" style="background-color: <%=test_style_onMouseOut%>" onMouseOver = "this.style.backgroundColor = '<%=test_style_onMouseOver%>'" onMouseOut = "this.style.backgroundColor = '<%=test_style_onMouseOut%>'" id="phototitle2" maxlength="20"></td>
                                </tr>
                                <tr> 
                                  <td valign="top"> <div align="right"><%=L_CLASS_photo_text%>:</div> <div align="right">

(<br><font color="#FF0000"><%=L_CHECK_USER32%></font>)
</div></td>
<td>


<textarea name="photocomment" cols="24" rows="5" id="photocomment" style="background-color: <%=test_style_onMouseOut%>" onMouseOver = "this.style.backgroundColor = '<%=test_style_onMouseOver%>'" onMouseOut = "this.style.backgroundColor = '<%=test_style_onMouseOut%>'"><%=rs("photocomment")%></textarea></td>
                                </tr>
                                <tr> 
                                  <td colspan="2"><div align="center">
                                      <input name="method" type="hidden" id="method" value="submit">
                                      <input name="id" type="hidden" id="id" value="<%=photoid%>">

<input name="Submit" type="submit" value="<%=L_CLASSi_pMsgEDIT2%>" style="background-color: <%=test_style_onMouseOut%>" onMouseOver = "this.style.backgroundColor = '<%=test_style_onMouseOver%>'" onMouseOut = "this.style.backgroundColor = '<%=test_style_onMouseOut%>'"> 
                                      &nbsp;&nbsp; <input type="reset" name="Submit2" value="<%=L_CLASS_pmsg_reset%>" style="background-color: <%=test_style_onMouseOut%>" onMouseOver = "this.style.backgroundColor = '<%=test_style_onMouseOver%>'" onMouseOut = "this.style.backgroundColor = '<%=test_style_onMouseOut%>'">  
                                    </div></td>  
                                </tr>  
                              </table>  
                            </form> </td>
  </tr>
</table>
<% end if %>

<SCRIPT>SL_close()</SCRIPT>  

⌨️ 快捷键说明

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