?? ph_mark.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 %>®o=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 %>®o=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 + -