📄 counter.asp
字号:
<!--#include file="config.asp"-->
<!--#include file="chkuser.asp"-->
<!--#include file="inc/user.asp"-->
<!--#include file="mytop.asp"-->
<script language=javascript>
function manage(url)
{
window.open('manage.asp','manage','fullscren=yes');
}
</script>
<%
if rshost("count")=False then WriteErrMsg("您没有权限使用此功能!")
username=Request.Cookies("9cool_username")
sql="select * from [counter] where username='"&username&"'"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
rs.addnew
rs("username")=username
rs("sitename")=rsuser("sitename")
rs("sitetype")=rsuser("sitetype")
rs("date")=Date()
rs.update
elseif request("action")="edit" then
rs("style")=request.Form("style")
if request.form("reset")="yes" then rs("counter")=0
rs.update
response.write "<script language=javascript>alert('修改成功!');location.href='counter.asp'</script>"
end if
%>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="css/user.css" rel="stylesheet" type="text/css">
<SCRIPT language=javascript>
function popwin(url,name,width,height,scroll)
{
var Left_size = (screen.width) ? (screen.width-width)/2 : 0;
var Top_size = (screen.height) ? (screen.height-height)/2 : 0;
var open_win=window.open(url,name,'width=' + width + ',height=' + height + ',left=' + Left_size + ',top=' + Top_size + ',toolbar=no,scrollbars=' + scroll + '' );
}
</SCRIPT>
<title></title>
</head>
<body>
<table width=778 align="center" cellpadding=4 cellspacing=1 class="a2">
<form name="form1" action="?action=edit" method="post" onSubmit="javascript:form1.Submit.disabled=true;">
<tr align="center" class="a1">
<td height="25" colspan="2"><A href="counter.asp" class=navbar>Script计数器</A> <A href="imgcounter.asp" class=navbar><font color=#FF0000><strong>IMG计数器</strong></font></A></td>
</tr>
<tr class="a3">
<td colspan="2"><p>提示:<br>
1.如需加入用户网站排行,请在您网站适当位置加入计数器代码<br>
2.本计数系统采用防刷新机制,同一IP24小时只计数一次</p> </td>
</tr>
<tr class="a4">
<td>网站名称:</td>
<td><%=rsuser("sitename")%></td>
</tr>
<tr class="a4">
<td width="191">网站地址:</td>
<td><a href="<%=rshost("userurl")%>/<%=Request.Cookies("9cool_username")%>" target="_blank"><%=rshost("userurl")%>/<%=Request.Cookies("9cool_username")%></a></td>
</tr>
<tr class="a3">
<td>计数器代码:</td>
<td><textarea name="code1" cols="50" rows="3" id="code1" onClick="this.select();window.clipboardData.setData('text',form1.code1.value);alert('已经复制到剪贴板')"><script language="JavaScript" src="<%=siteurl%>count.asp?id=<%=username%>"></script>
</textarea>
Script脚本</td>
</tr>
<tr class="a4">
<td>开始统计日期:</td>
<td><%=formatdatetime((rs("date")),1)%></td>
</tr>
<tr class="a3">
<td>选择样式:</td>
<td>
<SELECT NAME="style" id="style">
<%
set countfolder=fso.GetFolder(server.MapPath(".")+"\count_style")
for each theFolder in countfolder.SubFolders
MaxDir=MaxDir+1
next
for i=1 to MaxDir%>
<OPTION VALUE=<%=i%> <%if int(rs("style"))=i then response.write(" selected")%> >样式<%=i%></OPTION>
<%next%>
</SELECT>
[<A href=javascript:void(0) onClick="javascript:popwin('count_style.asp','',600,300,'yes')">预览样式</A>]</td>
</tr>
<tr class="a4">
<td>总流量:</td>
<td><strong><%=rs("counter")%></strong></td>
</tr>
<tr class="a3">
<td>计数重置为0:</td>
<td width="529"><input name="reset" type="checkbox" value="yes" onclick="return confirm('提示:确定要将计数器重置为0吗?');"></td>
</tr>
<tr align="center" class="a4">
<td colspan="2"><input name="Submit" type="submit" value="提交"></td>
</tr></form>
</table>
<!--#include file="links.asp"-->
<!--#include file="bottom.asp"-->
<%
rs.close
set rs=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -