?? admin_editlink.asp
字號:
<!--#include file="conn.asp"-->
<%
'-------------------------------------
'功能:管理員管理網站信息
'天天智能友情鏈接管理系統
'天天DV網制作 http://www.ttdv.cn
'博大網址庫http://www.ip126.com
'海納數據廣西http://www.idcgx.net
'可自由傳播和免費使用,但必須保留此完整版權信息
'本程序擷取了ITlearner、博大網址庫等優秀程序中的源代碼,對他們的作者表示感謝
'-------------------------------------
if session(hxCacheName&"_admin")<>"OK" then
response.redirect("admin_login.asp")
end if
dim username
username=hx.checkstr(request("username"),12)
dim strerror
dim rs,sql
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改網站信息_<%=WebName & ChannelName%></title>
<link href="../style.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="../md5.asp"-->
<script language=javascript src=../images/mouse_on_title.js></script>
<script LANGUAGE=JavaScript>
function textLimitCheck(thisArea, maxLength){
if (thisArea.value.length > maxLength){
alert(maxLength + ' 個字限制. \r超出的將自動去除.');
thisArea.value = thisArea.value.substring(0, maxLength);
thisArea.focus();
}
/*回寫span的值,當前填寫文字的數量*/
messageCount.innerText = thisArea.value.length;
}
</script>
<%
sub saveedit
dim username,ttname,tturl,ttlogo,email,password,pwdconfirm,webtype,ttinfo,IsVerify
username=hx.checkstr(request.form("username"),12)
ttname=hx.checkstr(request.form("ttname"),12)
tturl=hx.checkstr(request.form("tturl"),100)
ttlogo=hx.checkstr(request.form("ttlogo"),100)
email=hx.checkstr(request.form("email"),50)
password=hx.checkstr(request.form("password"),32)
pwdconfirm=hx.checkstr(request.form("pwdconfirm"),32)
webtype=request.form("webtype")
ttinfo=hx.checkstr(request.form("ttinfo"),120)
dim outc,outj,outp,inc,inj,inp,zdate,indate,outdate,fromdate
outc=cint(request.form("outc"))
outj=cint(request.form("outj"))
outp=CSng(request.form("outp"))
inc=cint(request.form("inc"))
inj=cint(request.form("inj"))
inp=CSng(request.form("inp"))
fromdate=cdate(request.form("fromdate"))
zdate=cdate(request.form("dateandtime"))
indate=cdate(request.form("indate"))
outdate=cdate(request.form("outdate"))
IsVerify=request.form("IsVerify")
dim blnerror
blnerror=false
if username="" then
blnerror=true
strerror="<li>意外出錯,請選擇用戶名"
else
sql="select * from tt_Link where username='"&username&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open sql,conn,1,2
if rs.eof then
blnerror=true
strerror="<li>沒有該用戶"
end if
end if
if ttname="" or tturl="" or ttinfo="" or email="" then
blnerror=true
strerror=strerror & "<li>請檢查是否有必填信息沒有填寫"
end if
if hx.blnfilter(ttname,1) then
blnerror = true
strerror = strerror & "<li>網站名稱不能包含某些特殊關鍵詞"
end if
if hx.blnfilter(ttinfo,1) then
blnerror = true
strerror = strerror & "<li>網站簡介不能包含某些特殊關鍵詞"
end if
if hx.blnfilter(tturl,2) then
blnerror = true
strerror = strerror & "<li>此域名已經被屏蔽!"
end if
if ttlogo="" then
ttlogo="" &WebUrl & "link/images/wu.gif"
end if
if webtype="" or not isnumeric(webtype) then
blnerror=true
strerror=strerror & "<li>請正確選擇網站類型"
end if
if IsVerify="1" then
IsVerify=strTrue
else
IsVerify=strFalse
end if
if (password<>"" or pwdconfirm<>"") and password<>pwdconfirm then
blnerror=true
strerror=strerror & "<li>兩次密碼不相同"
end if
if blnerror=true then
response.write strerror
response.write "<p><< <a href=""javascript:history.go(-1)"">返回上一頁 </a> << <a href=""admin_manage.asp"">返回管理首頁</a></p>"
else
rs("outc")=outc
rs("outj")=outj
rs("outp")=outp
rs("inc")=inc
rs("inj")=inj
rs("inp")=inp
rs("email")=email
rs("ttname")=ttname
rs("webtype")=webtype
if password<>"" then
rs("password")=md5(password)
end if
rs("tturl")=tturl
rs("ttinfo")=ttinfo
rs("ttlogo")=ttlogo
rs("indate")=indate
rs("outdate")=outdate
rs("fromdate")=fromdate
rs("dateandtime")=zdate
rs("IsVerify")=IsVerify
rs.Update
response.write "<p>修改成功</p>"
response.write "<p><< <a href=""javascript:history.go(-1)"">返回上一頁 </a> << <a href=""admin_manage.asp"">返回管理首頁</a></p>"
'刪除系統緩存
set hxcache=new cls_cache
hxcache.DelCahe("js")
set hxcache=nothing
end if
end sub
%>
<!--#include file="top.asp"-->
<div class="path<%=skin%>">
您的位置:<a href="<%=WebUrl%>">首頁</a> -> <a href="admin_manage.asp">管理首頁</a> -> 修改網站信息
</div>
<div class="mainbar_a<%=skin%>">
<%
dim action
action=request("action")
select case action
case "saveedit"
call saveedit
case else
call showlist
end select
sub showlist
dim rs
rs=hx.execute("select * from tt_Link where username='"&username&"'")
%> <form action="?username=<%=username%>&Action=saveedit" method="POST">
<table width="90%" border="0" cellpadding="3" cellspacing="1" bgcolor="#000000">
<tr class="tr<%=skin%>">
<td align="center">用 戶 名:</td>
<td colspan="5"><%=rs("username")%>
<input name="username" type="hidden" id="username" value="<%=rs("username")%>" >
<input name="IsVerify" type="checkbox" id="IsVerify" value="1"<%if rs("IsVerify")=strTrue then Response.Write " checked"%>>是否通過審核
</td>
</tr>
<tr class="tr<%=skin%>">
<td align="center">網站名稱:</td>
<td colspan="5"> <input name="ttname" type="text" id="ttname" value="<%=rs("ttname")%>" size="12" maxlength="12"> <img src=../images/memo.gif alt="不能超過12個字符(6個漢字)"></td>
</tr>
<tr class="tr<%=skin%>">
<td align="center">網站地址:</td>
<td colspan="5"> <input name="tturl" type="text" id="tturl" value="<%=rs("tturl")%>" size="50" maxlength="110"> <img src=../images/memo.gif alt="不能超過100個字符"></td>
</tr>
<tr class="tr<%=skin%>">
<td align="center">注冊時間:</td>
<td colspan="5"> <input name="dateandtime" type="text" id="dateandtime" value="<%=rs("dateandtime")%>" size="16" maxlength="20">
</td>
</tr>
<tr class="tr<%=skin%>">
<td>統計時間:</td>
<td><input name="fromdate" type="text" id="fromdate" value="<%=rs("fromdate")%>" size="16" maxlength="20">
</td>
<td>點入時間:</td>
<td> <input type="text" name="indate" size="10" maxlength="10" value="<%=rs("indate")%>">
</td>
<td>點出時間:</td>
<td> <input type="text" name="outdate" size="10" maxlength="10" value="<%=rs("outdate")%>">
</td>
</tr>
<tr class="tr<%=skin%>">
<td>總計點入:</td>
<td> <input type="text" name="inc" size="16" maxlength="8" value="<%=rs("inc")%>">
</td>
<td>今天點入:</td>
<td> <font color="#FF0000">
<input type="text" name="inj" size="16" maxlength="8" value="<%=rs("inj")%>">
</font></td>
<td>平均點入:</td>
<td> <input type="text" name="inp" size="16" maxlength="8" value="<%=rs("inp")%>">
</td>
</tr>
<tr class="tr<%=skin%>">
<td>總擊點出:</td>
<td> <input type="text" name="outc" size="16" maxlength="8" value="<%=rs("outc")%>">
</td>
<td>今天點出:</td>
<td> <font color="#FF0000">
<input type="text" name="outj" size="16" maxlength="8" value="<%=rs("outj")%>">
</font></td>
<td>平均點出: </td>
<td> <input type="text" name="outp" size="16" maxlength="8" value="<%=rs("outp")%>">
</td>
</tr>
<tr class="tr<%=skin%>">
<td align="center">圖片地址:</td>
<td colspan="4"> <input name="ttlogo" type="text" id="ttlogo" value="<%=rs("ttlogo")%>" size="50" maxlength="100"> <img src=../images/memo.gif alt="可選項,不能超過100個字符 (圖片大小尺寸為:88*31,如果暫時沒有,請留空)">
</td>
<td><img src="<%=rs("ttlogo")%>" width=88 height=31></td>
</tr>
<tr class="tr<%=skin%>">
<td align="center">網站類型:</td>
<td colspan="5"> <select name="webtype" size="1">
<%call hx.listwebtype(rs("webtype"),0)%>
</select> </td>
</tr>
<tr class="tr<%=skin%>">
<td align="center">密 碼:</td>
<td colspan="5"> <input name="password" type="password" id="password" value="" size="10" maxlength="12"> <img src=../images/memo.gif alt="不改密碼請留空。不能超過12個字符"></td>
</tr>
<tr class="tr<%=skin%>">
<td align="center">密碼確認:</td>
<td colspan="5"> <input name="pwdconfirm" type="password" id="pwdconfirm" value="" size="10" maxlength="12"> <img src=../images/memo.gif alt="請再輸一遍確認"></td>
</tr>
<tr class="tr<%=skin%>">
<td align="center">聯系郵箱:</td>
<td colspan="5"> <input type="text" name="email" size="30" maxlength="50" value="<%=rs("email")%>"> <img src=../images/memo.gif alt="請輸入有效的郵件地址,不能超過50個字符"></td>
</tr>
<tr class="tr<%=skin%>">
<td align="center">網站簡介:</td>
<td colspan="5"> <textarea name="ttinfo" cols="70" rows="4" id="ttinfo" onkeyUp="textLimitCheck(this, 50);"><%=rs("ttinfo")%></textarea>
<br>
<font color="#FF0000">*</font> 限 100 個字符 已輸入 <font color="#CC0000"><span id="messageCount">0</span></font> 個字 <img src=../images/memo.gif alt="不能超過100個字符(50個漢字)">
</td>
</tr>
<tr class="tr<%=skin%>">
<td colspan="6" align="center" class="td"> <input type="submit" value=" 確 定 " name="yes">
<input name="reset" type="reset"
value=" 重 寫 "> </td>
</tr>
</table>
</form>
<%end sub%>
</div>
<!--#include file="../under.asp"-->
<%set hx=nothing%>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -