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

📄 photoedit.asp

📁 一套非常实用的博客源代码,功能全,界面简单易用.
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="commond.asp" -->
<!--#include file="check_path.asp"-->
<!--#include file="include/function.asp" -->
<!--#include file="include/md5code.asp" -->
<!--#include file="include/library.asp" -->
<!--#include file="header.asp" -->
<%IF Request.QueryString("action")="editcomm" Then
	Dim ph_commID
	ph_commID=Trim(Request.QueryString("commID"))
	Dim ph_editComm
	Set ph_editComm=Server.CreateObject("ADODB.Recordset")
	SQL="SELECT * FROM photo_Comment WHERE comm_ID="&ph_commID&""
	ph_editComm.Open SQL,znwl,1,1
	SQLQueryNums=SQLQueryNums+1
	IF ph_editComm.EOF AND ph_editComm.BOF Then
%>
		<table width="780" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
		  <tr>
			<td align="center" valign="middle" height="120">
				<h4>错误:你要修改的评论不存在</h4>
				<p>&nbsp;</p>
				<div><a href="default.asp">点击返回主页面</a></div>
			</td>
		  </tr>
		</table>
	<%Else%>
		<table width="710" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#FFFFFF">
		  <tr>
			<td valign="top">
				<table width="100%" border="0" cellpadding="4" cellspacing="1" class="photo_bg">
				  <tr align="center">
					<td colspan="2">修改图片&nbsp;<font color="#FF0000">[ <%=""&ph_commID&""%> ]</font>&nbsp;中的评论</td>
				  </tr>
				<form action="photoedit.asp?action=commedit" method="post" name="inputform" id="inputform">
				  <tr bgcolor="#FFFFFF">
					<td width="112" align="right" nowrap="nowrap"><strong> 作者:</strong></td>
					<td width="100%"><input name="comm_Author" class="input_bg" type="text" id="comm_Author" value="<%=ph_editComm("comm_Author")%>" /></td>
				  </tr>
				  <script language="JavaScript" src="include/ubbcode.js" type="text/javascript"></script>
				  <tr bgcolor="#FFFFFF">
					<td align="right" valign="top"><strong>内容:</strong> </td>
					<td valign="top"><textarea name="message" class="textarea_bg" rows="6" style="width:100%" wrap="VIRTUAL" id="Message" onselect="javascript: storeCaret(this);" onclick="javascript: storeCaret(this);" onkeyup="javascript: storeCaret(this);" onkeydown="javascript: ctlent();"><%=EditDeHTML(ph_editComm("comm_Content"))%></textarea>
						<div align="right">缩放输入框: <span title='放大输入框' style='FONT-SIZE: 12px; CURSOR: hand' onclick="document.inputform.message.rows+=4"><img src="images/icon_ar2.gif" border="0" align="absbottom" alt="" /></span> <span title='缩小输入框' style='FONT-SIZE: 12px; CURSOR: hand' onclick='if(document.inputform.message.rows>=4)document.inputform.message.rows-=4;else return false'><img src="images/icon_al2.gif" border="0" align="absbottom" alt="" /></span></div></td>
				  </tr>
				  <tr align="center" bgcolor="#FFFFFF">
					<td colspan="2">
						相片ID: <input name="ph_ID" type="text" class="input_bg" id="ph_ID" value="<%=ph_editComm("ph_ID")%>" size="2" />
						<input name="comm_ID" type="hidden" value="<%=""&ph_commID&""%>" />
						<input name="commsubmit" type="submit" value="确定编辑[可按Ctrl+Enter发布]" onClick="this.disabled=true;document.inputform.submit();">
						<input name="L_Reset" type="button" id="L_Reset" value="取消编辑" onclick="javascript:history.go(-1);" />
					</td>
				  </tr>
				</form>
			</table></td>
		  </tr>
		</table>
	<%End IF
	ph_editComm.Close
	Set ph_editComm=Nothing%>
<%ElseIf Request.QueryString("action")="commedit" Then
	IF Request.Form("message")=Empty Or Request.Form("comm_Author")=Empty Or Request.Form("ph_ID")=Empty Then%>
		<table width="710" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#FFFFFF" class="wordbreak">
		  <tr>
			<td align="center" valign="middle" height="120">
				<p>1,必须填写评论人名称</p>
				<p>2,必须填写评论内容</p>
				<p>3,必须填写相片ID</p>
				<p>&nbsp;</p>
				<div><a href='javascript:history.go(-1);'>返回上一页</a></div>
			</td>
		  </tr>
		</table>
	<%Else%>
		<table width="710" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#FFFFFF" class="wordbreak">
		  <tr>
			<td align="center" valign="middle" height="120">
				<%Dim comm_ID,comm_Author,comm_Content,comm_ph_ID
				comm_ID=CheckStr(Request.Form("comm_ID"))
				comm_Author=CheckStr(Request.Form("comm_Author"))
				comm_Content=CheckStr(Request.Form("message"))
				comm_ph_ID=CheckStr(Request.Form("ph_ID"))
				znwl.ExeCute("UPDATE photo_Comment Set comm_Author='"&comm_Author&"',comm_Content='"&comm_Content&"',ph_ID="&comm_ph_ID&" WHERE comm_ID="&comm_ID&"")
				SQLQueryNums=SQLQueryNums+1%>
				<a href='default.asp'>点击返回首页</a>
				<p>&nbsp;</p>
				<a href="photoshow.asp?photoID=<%=""&comm_ph_ID&""%>">或者返回你所修改的图片</a>
				<p>&nbsp;</p>
				或者等待3秒后自动返回你所修改的图片<meta http-equiv='refresh' content='3;url=photoshow.asp?photoID=<%=""&comm_ph_ID&""%>'>
			</td>
		  </tr>
		</table>
	<%End If
ElseIf Request.QueryString("action")<>"photoedit" Then
	Dim photo_ID
	photo_ID=Trim(Request.QueryString("photoID"))
	If IsInteger(photo_ID)=False Then%>
		<table width="710" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#FFFFFF" class="wordbreak">
		  <tr>
			<td align="center" valign="middle" height="120">
				<h4>参数错误</h4>
				<p>&nbsp;</p>
				<div><a href='javascript:history.go(-1);'>请返回重新填写</a></div>
			</td>
		  </tr>
		</table>
	<%Else
		Dim ph_Edit
		Set ph_Edit=Server.CreateObject("ADODB.Recordset")
		SQL="SELECT L.*,C.cate_Name FROM photo AS L,photo_Cate AS C WHERE ph_ID="&photo_ID&" AND C.cate_ID=L.ph_CateID"
		ph_Edit.Open SQL,znwl,1,1
		SQLQueryNums=SQLQueryNums+1
		IF ph_Edit.EOF AND ph_Edit.BOF Then%>
			<table width="710" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#FFFFFF" class="wordbreak">
			  <tr>
				<td align="center" valign="middle" height="120">
					<h4>错误:你要修改的图片不存在</h4>
					<p>&nbsp;</p>
					<div><a href="default.asp">点击返回主页面</a></div>
				</td>
			  </tr>
			</table>
		<%Else
			IF Not((ph_Edit("ph_Author")=memName AND memStatus="Admin") OR memStatus="SupAdmin") Then%>
				<table width="710" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#FFFFFF" class="wordbreak">
				  <tr>
					<td align="center" valign="middle" height="120">
						<h4>错误:没有权限修改</h4>
						<p>&nbsp;</p>
					  <div><a href="default.asp">点击返回主页面</a> 或者 <a href="logging.asp">重新登陆</a></div>
					</td>
				  </tr>
				</table>
			<%Else%>
				<table width="710" border="0" align="center" cellpadding="0" cellspacing="6" bgcolor="#FFFFFF">
				  <tr>
					<td valign="top">
						<table width="100%" border="0" cellpadding="4" cellspacing="1" class="photo_bg">
						  <tr align="center">
							<td colspan="2">修改分类&nbsp;<font color="#FF0000">[ <%=ph_Edit("cate_Name")%> ]</font>&nbsp;中的图片</td>
						  </tr>
						  <form name="inputform" method="post" action="photoedit.asp?action=photoedit">
						  <tr bgcolor="#FFFFFF">
						    <td align="right" nowrap><strong>作者:</strong></td>
						    <td><input name="ph_Author" class="input_bg" type="text" id="ph_Author" value="<%=ph_Edit("ph_Author")%>" size="10" /></td>
						  </tr>
						  <tr bgcolor="#FFFFFF">
							<td align="right" nowrap><strong>操作:</strong></td>
							<td><input name="phdel" type="checkbox" id="phdel" value="1">删除此图片&nbsp;&nbsp;|&nbsp;&nbsp;
								转移到:
								<select name="Ph_moveto" id="Ph_moveto">
									<option value="0">请选择分类</option>
									<%Dim Arr_phCates '写入分类
									Dim ph_CateList
									Set ph_CateList=Server.CreateObject("ADODB.RecordSet")
									SQL="SELECT cate_ID,cate_Name FROM photo_Cate ORDER BY cate_Order ASC"
									ph_CateList.Open SQL,znwl,1,1
									SQLQueryNums=SQLQueryNums+1
									If ph_CateList.EOF And ph_CateList.BOF Then
										Redim Arr_phCates(3,0)
									Else
										Arr_phCates=ph_CateList.GetRows
										Dim ph_CateNums,ph_CateNumI
										ph_CateNums=Ubound(Arr_phCates,2)
										For ph_CateNumI=0 To ph_CateNums%>
											<option value="<%=""&Arr_phCates(0,ph_CateNumI)&""%>"><%=""&Arr_phCates(1,ph_CateNumI)&""%></option>
										<%Next
									End If
									ph_CateList.Close
									Set ph_CateList=Nothing%>
								</select>
							</td>
						  </tr>
						  <tr bgcolor="#FFFFFF">
							<td align="right" nowrap><strong>属性:</strong></td>
							<td>
								<input name="Ph_DisVote" type="checkbox" id="Ph_DisVote" value="1" <%IF ph_Edit("Ph_DisVote")=True Then Response.Write("checked")%>>禁止打分&nbsp;&nbsp;|&nbsp;&nbsp;
								<input name="ph_DisComm" type="checkbox" id="ph_DisComm" value="1" <%IF ph_Edit("ph_DisComm")=True Then Response.Write("checked")%>>禁止评论

⌨️ 快捷键说明

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