www.gusucode.com > QQ空间互踩整站源码asp网站源码程序 > QQ空间互踩整站源码asp网站源码程序/editlink.asp
<!--#include file="conn.asp"--> <!--#include file="md5.asp"--> <% dim action dim strerror %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>管理Qzone群信息_<%=WebName&ChannelName%></title> <link href="style.css" rel="stylesheet" type="text/css"> </head> <body leftmargin="0" topmargin="0"> <!--#include file="top.asp"--> <% action=request("action") if action="chklogin" then call chklogin elseif action="listinfo" and session("username")<>"" then call listinfo elseif action="showlog" and session("username")<>"" then call showlog elseif action="saveedit" and session("username")<>"" then call saveedit elseif action="exit" then call exitlogin else call loginform end if sub exitlogin session("username")="" strerror="<li>成功退出" call loginform end sub sub chklogin dim username,password username=hx.checkstr(request.form("username"),12) password=hx.checkstr(request.form("password"),12) if username="" or password="" then strerror="<li>请重新输入" call loginform else dim rs set rs=hx.execute("select * from CL_Link where username='"&username&"'") if rs.eof then strerror="<li>无此用户名" call loginform else if rs("password")<>md5(password,16) then strerror="<li>密码不符" call loginform else session("username")=username call listinfo end if end if end if end sub sub listinfo if session("username")="" then response.end end if dim rs set rs=hx.execute("select * from CL_Link where username='"&session("username")&"'") call shownav("修改网站信息") %> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="main_tdbg"> <tr> <td> <form method="post" action="?action=saveedit"> <div align="center"><a href="editlink.asp?action=listinfo">修改Qzone信息</a> <a href="editlink.asp?action=showlog">详细点击记录</a> <a href="editlink.asp?action=listinfo"></a> <a href="?action=exit">退出管理</a> </div> <table width="100%" border="1" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <tr> <td> <div align="center">用 户 名:</div></td> <td> <%=rs("username")%>(不能修改)</td> </tr> <tr> <td> <div align="center">Qzone名称:</div></td> <td> <input type="text" name="sitename" size="14" maxlength="12" value="<%=rs("sitename")%>"> <font color="#CC0000">* 不能超过20个字符(10个汉字)</font></td> </tr> <tr> <td> <div align="center">Qzone地址:</div></td> <td> <input type="text" name="siteurl" size="20" maxlength="20" value="<%=rs("siteurl")%>"> <b>.qzone.qq.com</b> <font color="#CC0000">* 不能超过100个字符</font></td> </tr> <tr> <td> <div align="center">QQ头像展示:</div></td> <td> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td><select name="sitelogo" size="1" id="select5" onChange="document.all.idface.src=options[selectedIndex].value;"><option value="<%=rs("sitelogo")%>"><%=rs("sitelogo")%></option><%call hx.listQface(0)%></select></td> <td width="90"><img src="<%=rs("sitelogo")%>" name="idface" width=40 height=40 border=0 id=idface></td> </tr> </table> </td> </tr> <tr> <td> <div align="center">Q空间类型:</div></td> <td> <select name="webtype" size="1"> <%call hx.listwebtype(rs("webtype"))%> </select> <font color="#CC0000">* <font color="#FF0000">请正确选择您网站的类型</font></font> </td> </tr> <tr> <td> <div align="center">密 码:</div></td> <td> <input type="password" name="password" size="10" maxlength="12" value="<%=rs("password")%>"> <font color="#CC0000">* 不能超过12个字符</font></td> </tr> <tr> <td> <div align="center">密码确认:</div></td> <td> <input type="password" name="pwdconfirm" size="10" maxlength="12" value="<%=rs("password")%>"> <font color="#CC0000">* 请再输一遍确认</font></td> </tr> <tr> <td> <div align="center">联系邮箱:</div></td> <td> <input type="text" name="email" size="30" maxlength="50" value="<%=rs("email")%>"> <font color="#CC0000">* 请输入有效的邮件地址,不能超过50个字符</font></td> </tr> <tr> <td> <div align="center">Qzone简介:<font color="#FF0000"></font></div></td> <td> <textarea rows="4" name="siteintro" cols="70"><%=rs("siteintro")%></textarea> <br> <font color="#FF0000">*</font> <font color="#CC0000">不能超过200个字符(100个汉字)</font> </td> </tr> <tr> <td colspan="2" align="center" class="td"> <input type="submit" value=" 确 定 " name="yes"> <input type="reset" value=" 重 写 " name="reset"> </td> </tr> </table> </form></td> </tr> </table> <%end sub%> <%sub loginform call shownav("第一步:登陆") %> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="main_tdbg"> <tr><form method="post" action="?action=chklogin"> <td> <div align="center"><%=strerror%></div> <table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <tr> <td width="100%" align="center" class="td">用 户 名: <input name="username" type="text" id="username" size="10" maxlength="12"> </td> </tr> <tr> <td width="100%" align="center" class="td">密 码: <input name="password" type="password" id="password" size="10" maxlength="12"> </td> </tr> <tr> <th width="100%"> <input type="submit" value="登陆管理" name="submit"> </th> </tr> </table> </td> </form> </tr> </table> <%end sub%> <%sub showlog call shownav("详细点击记录") dim rs%> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="main_tdbg"> <tr> <td><div align="center"><a href="editlink.asp?action=listinfo">修改Qzone信息</a> <a href="editlink.asp?action=showlog">详细点击记录</a> <a href="editlink.asp?action=listinfo"></a> <a href="?action=exit">退出管理</a> </div> <table width="99%" border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td><div align="center">点入记录(你站对我站的贡献)最近3天的记录</div></td> </tr> </table> <table width="99%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <tr align="center"> <td width="120">时间</td> <td width="100">IP地址</td> <td>来源</td> </tr> <% set rs=hx.execute("select * from CL_Log where inout=0 and dateandtime>"&SqlNowString&"-3 and username='"&session("username")&"' order by id desc") if rs.eof then Response.write "<tr><td colspan=3 align=center>暂时还没有记录</td></tr>" else do while not rs.eof %> <tr> <td><%=rs("dateandtime")%></td> <td><%="<a href='http://www.itlearner.com/ip/ipinfo.asp?ip="&rs("ip")&"' title='查询此IP地址所在区域' target='_blank'>"&rs("ip")&"</a>"%></td> <td><%if trim(rs("come"))="" then response.write "无" else response.write "<a href="&rs("come")&" target=_blank>"&rs("come")&"</a>" end if%></td> </tr> <% rs.movenext loop end if set rs=nothing%> </table> <br> <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0"> <tr> <td><div align="center">点出记录(我站对你的空间的贡献)最近3天的记录</div></td> </tr> </table> <table width="100%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#000000" bordercolordark="#FFFFFF"> <tr align="center"> <td width="120">时间</td> <td width="100">IP地址</td> <td>来源</td> </tr> <% set rs=hx.execute("select * from CL_Log where inout=1 and dateandtime>"&SqlNowString&"-3 and username='"&session("username")&"' order by id desc") if rs.eof then Response.write "<tr><td colspan=3 align=center>暂时还没有记录</td></tr>" else do while not rs.eof %> <tr> <td><%=rs("dateandtime")%></td> <td><%="<a href='http://www.itlearner.com/ip/ipinfo.asp?ip="&rs("ip")&"' title='查询此IP地址所在区域' target='_blank'>"&rs("ip")&"</a>"%></td> <td> <%if trim(rs("come"))="" then response.write "无" else response.write "<a href="&rs("come")&" target=_blank>"&rs("come")&"</a>" end if%> </td> </tr> <% rs.movenext loop end if set rs=nothing%> </table></td> </tr> </table> <%end sub%> <% sub saveedit dim username,sitename,siteurl,sitelogo,email,password,pwdconfirm,webtype,siteintro sitename=hx.checkstr(request.form("sitename"),12) siteurl=hx.checkstr(request.form("siteurl"),100) sitelogo=hx.checkstr(request.form("sitelogo"),100) email=hx.checkstr(request.form("email"),50) password=hx.checkstr(request.form("password"),16) pwdconfirm=hx.checkstr(request.form("pwdconfirm"),16) webtype=request.form("webtype") siteintro=hx.checkstr(request.form("siteintro"),250) dim blnerror,strerror blnerror=false if session("username")="" then blnerror=true strerror="<li>意外出错,请重新登陆" end if if sitename="" or siteurl="" or password="" or siteintro="" or email="" then blnerror=true strerror=strerror & "<li>请检查是否有必填信息没有填写" end if if not isnumeric(webtype) then blnerror=true strerror=strerror & "<li>请正确选择Qzone类型" end if if password<>pwdconfirm then blnerror=true strerror=strerror & "<li>两次密码不相同" end if if blnerror=true then call shownav("错误信息") %> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="main_tdbg"> <tr> <td> <% response.write strerror response.write "<p><< <a href=javascript:history.go(-1)>返回上一页 </a> << <a href=editlink.asp?action=listinfo>返回管理首页</a></p>" %> </td></tr></table> <% else dim rs,sql sql= "select * from CL_Link where username='"&session("username")&"'" set rs=server.CreateObject("adodb.recordset") rs.open sql,conn,1,3 rs("email")=email rs("sitename")=sitename rs("webtype")=webtype if len(password)<16 then rs("password")=md5(password,16) end if rs("siteurl")=siteurl rs("siteintro")=siteintro rs("sitelogo")=sitelogo rs.Update rs.close set rs=nothing call shownav("资料修改成功") %> <table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="main_tdbg"> <tr> <td> <% response.write "<p align=center>资料修改成功</p>" response.write "<p><< <a href=javascript:history.go(-1)>返回上一页 </a> << <a href=editlink.asp?action=listinfo>返回管理首页</a> << <a href=editlink.asp?action=exit>退出管理</a></p>" %> </td></tr></table> <% end if end sub sub shownav(str) %> <table width="760" border="0" align="center" cellpadding="3" cellspacing="0" class="main_tdbg"> <tr> <td height="22"><div align="center"><a href="addlink.asp">QQ空间互踩联盟,加入马上获得更多的朋友来访!</a></div></td> </tr> </table> <% end sub CloseDatabase %> <!--#include file="under.asp"--> </body> </html>