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

📄 ph_mark.asp

📁 一个超级漂亮的班级主页asp代码
💻 ASP
字号:
<!--插入html头部分以及数据库接口-->
<!--#include file="in_conn.asp"-->
<!--时间转化ID的函数-->
<!--#include file="in_idtime.asp"-->

<!--权限判断-->
<%
if u_name="" then
	Response.Redirect "log_err.asp"
end if

u_power=conn.Execute("SELECT power FROM tblmates WHERE name='"&u_name&"'",0,1)(0)
IF u_power=0 THEN
	Response.Redirect "resp.asp?cmd=id_wait"
END IF
%>


<%
dim vid,vmark,vemo
dim vtip
dim vdate

'获取id传值
IF isNumeric(Request.FORM("hid_ph")) THEN
	vid=CLng(Request.FORM("hid_ph"))
	'找出该照片
	sqlstr="SELECT p_belong,p_idfre FROM tblphoto WHERE p_ID="&vid
	rs.open sqlstr,conn,1,3
		if rs.eof AND rs.bof then
			rs.close
			response.Redirect "resp.asp?cmd=phidmiss"
		else

'获取评论传值
vdate=now()
vmkidfre=idtime(vdate)
vtip=trim(Request.Form("tx_ph"))
vemo=CInt(Request.Form("rad_ph"))

if vtip="" then
	Response.Redirect "resp.asp?cmd=ph_mark"
end if

sqlstr="INSERT INTO tblphoto(p_author,p_tip,p_date,p_url,p_w,p_h,p_belong,p_emo,p_idfre) VALUES('"&u_name&"','"&stryin(vtip)&"',#"&vdate&"#,'url',0,0,"&vid&","&vemo&","&vmkidfre&")"
conn.Execute sqlstr

set rs3=server.CreateObject("adodb.recordset")
	sqlstr="SELECT p_emo,COUNT(p_ID) AS p_ren FROM tblphoto WHERE p_belong="&vid&" GROUP BY p_emo"
	rs3.open sqlstr,conn,1,1
	dim phgood,phbad,phall
	phgood=0
	phbad=0
	while not rs3.eof
		if rs3("p_emo")=1 then
			phgood=rs3("p_ren")
		elseif rs3("p_emo")=2 then
			phbad=rs3("p_ren")
		end if
		rs3.MoveNext
	wend
	phall=CLng(phgood*100000+phbad+1)
	phall=0-phall
	rs3.close
set rs3=Nothing
	rs("p_belong")=phall
	rs("p_idfre")=vmkidfre
	rs.UpDate
	rs.close
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="3;url=<% ="photoview.asp?id="&vid %>&rego=yes">

<title>页面转向</title>
<style>
<!--#include file="style.asp"-->
</style>
</head>
<body style="font-family: 宋体;font-size: 9pt;line-height: 14pt;color: <% =cotxt %>; background:<% =bg3 %>">

<br>
<table align="center" width="768" height="25" border="0" cellspacing="0" cellpadding="0" class="rdkuang">
<tr>
	<td width="100%" height="120" align="center">
		您的评论已被记录,3秒后自动转向原照片页面。
		如果自动转向失败,请[<a href="photoview.asp?id=<% =vid %>&rego=yes">点击这里</a>]
	</td>
</tr>
</table>


<%
		end if
ELSE
	Response.Redirect "resp.asp"
END IF
%>

<!--插入网站置底-->
<!--#include file="in_bottom.asp"-->
</body>

</html>

⌨️ 快捷键说明

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