📄 asp_search_result_clt.~pas
字号:
end else
begin
s_name:=vartostr(request.QueryString.Item['workname']);
begin_date:=vartostr(Session.Contents.Item['begin_date']);
end_date:=vartostr(Session.Contents.Item['end_date']);
s_total_string:='select count(id) as tmp from webproxylog1 where clientusername='''+s_name+'''';
if trim(begin_date)<>'' then
s_total_string:=s_total_string+' and logdate>='''+begin_date+'''';
if trim(end_date)<>'' then
s_total_string:=s_total_string+' and logdate<='''+end_date+'''';
Fdatamodule.cds_general1.Close;
Fdatamodule.cds_general1.CommandText:=s_total_string;
Fdatamodule.cds_general1.Open;
session.Contents.Item['s_total']:=Fdatamodule.cds_general1.fieldbyname('tmp').AsString;
s_select:='select a.id as id,a.desthost as desthost,(a.processingtime/1000+1) as processingtime,a.logdate as logdate ,a.logtime as logtime';
s_select:=s_select+' ,a.uri as uri from webproxylog1 a where a.clientusername='''+s_name+'''';
if begin_date<>'' then
s_select:=s_select+' and a.logdate>='''+begin_date+'''';
if end_date<>'' then
s_select:=s_select+' and a.logdate<='''+end_date+'''';
s_select:=s_select+' order by a.id';
// s_select:='select top 30 a.id,a.desthost as desthost, a.processingtime,a.logdate as logdate ,a.logtime as logtime, a.uri as uri from webproxylog1 a where a.clientusername=''NBZH\10799'' and a.logdate > =''2003-11-24'' and a.logdate<= ''2003-12-28'' order by a.id';
Fdatamodule.clientdataset2.Close;
Fdatamodule.clientdataset2.CommandText:=s_select;
Fdatamodule.clientdataset2.Open;
if (fdatamodule.ClientDataSet2.RecordCount mod 500)=0 and (trunc(fdatamodule.ClientDataSet2.RecordCount/500)) then
total_page:=trunc(fdatamodule.ClientDataSet2.RecordCount/500)
else total_page:=trunc(fdatamodule.ClientDataSet2.RecordCount/500)+1;
Fdatamodule.ClientDataSet2.First;
n:= strtoint(request.QueryString.Item['pageno']);
Fdatamodule.ClientDataSet2.MoveBy((n-1)*500);
// Fdatamodule.ClientDataSet2.MoveBy(current_page*500+1);
Response.Write('<p><img border="0" src="image/logo1.jpg" width="256" height="80"> <img border="0" src="image/title.jpg" width="480" height="80"></p>');
// if total_page=0 then
// Response.Write('第一页')
// else
Response.Write('<a href="search_detail.asp?workname='+vartostr(session.Contents.Item['w_name'])+'&pageno=0">第一页</a>');
response.Write(' ');
if n=1 then
response.Write('上一页')
else
Response.Write('<a href="search_detail.asp?workname='+vartostr(session.Contents.Item['w_name'])+'&pageno='+inttostr(n-1)+'">上一页</a>');
response.Write(' ');
if n=total_page then
response.Write('下一页')
else
Response.Write('<a href="search_detail.asp?workname='+vartostr(session.Contents.Item['w_name'])+'&pageno='+inttostr(n+1)+'">下一页</a>');
response.Write(' ');
Response.Write('<a href="search_detail.asp?workname='+vartostr(session.Contents.Item['w_name'])+'&pageno='+inttostr(total_page)+'">最后一页</a>');
Response.Write(' 当前用户共有'+vartostr(session.Contents.Item['s_total'])+'条记录');
Response.Write('<p align="center"> </p>');
response.Write('<table border="1" width="3100">');
response.Write('<tr>');
response.Write('<td width="200">');
response.Write('域名');
response.Write('</td>');
response.Write('<td width="200">');
response.Write('上网时间总量(秒)');
response.Write('</td>');
response.Write('<td width="200">');
response.Write('上网(浏览)时间');
response.Write('</td>');
response.Write('<td width="2500">');
response.Write('网址');
response.Write('</td>');
response.Write('</tr>');
{ for i:=1 to 500 do
begin
response.Write('<tr>');
response.Write('<td width="200">');
response.Write('<a href="http://'+Fdatamodule.ClientDataSet2.fieldbyname('desthost').AsString+'">'+Fdatamodule.ClientDataSet2.fieldbyname('desthost').AsString+'</a>');
response.Write('</td>');
response.Write('<td width="200">');
response.Write(Fdatamodule.ClientDataSet2.fieldbyname('processingtime').AsString);
response.Write('</td>');
response.Write('<td width="200">');
response.Write(datetostr(Fdatamodule.clientdataset2.fieldbyname('logdate').AsDateTime)+' '+timetostr(Fdatamodule.clientdataset2.fieldbyname('logtime').AsDateTime));
response.Write('</td>');
response.Write('<td width="2500">');
response.Write('<a href="'+Fdatamodule.clientdataset2.fieldbyname('uri').AsString+'">'+Fdatamodule.clientdataset2.fieldbyname('uri').AsString+'</a>');
response.Write('</td>');
response.Write('</tr>');
Fdatamodule.clientdataset2.Next;
end; }
i:=0;
while not Fdatamodule.clientdataset2.Eof do
begin
response.Write('<tr>');
response.Write('<td width="200">');
response.Write('<a href="http://'+Fdatamodule.ClientDataSet2.fieldbyname('desthost').AsString+'">'+Fdatamodule.ClientDataSet2.fieldbyname('desthost').AsString+'</a>');
response.Write('</td>');
response.Write('<td width="200">');
response.Write(Fdatamodule.ClientDataSet2.fieldbyname('processingtime').AsString);
response.Write('</td>');
response.Write('<td width="200">');
response.Write(datetostr(Fdatamodule.clientdataset2.fieldbyname('logdate').AsDateTime)+' '+timetostr(Fdatamodule.clientdataset2.fieldbyname('logtime').AsDateTime));
response.Write('</td>');
response.Write('<td width="2500">');
response.Write('<a href="'+Fdatamodule.clientdataset2.fieldbyname('uri').AsString+'">'+Fdatamodule.clientdataset2.fieldbyname('uri').AsString+'</a>');
response.Write('</td>');
response.Write('</tr>');
i:=i+1;
if i=500 then
// session.Contents.Item['cur_id']:=Fdatamodule.ClientDataSet2.fieldbyname('id').AsString;
exit;
Fdatamodule.clientdataset2.Next;
end;
response.Write('</table>');
end;
end;
procedure Tco_asp_search.search_user;
var
s_workno,s_name,s_bm_name:string;
s_select:string;
begin
if vartostr(session.Contents.Item['qjh1'])='' then
begin
Response.Write('<p><img border="0" src="image/logo1.jpg" width="256" height="80"> <img border="0" src="image/title.jpg" width="480" height="80"></p>');
Response.Write('<p align="center"> </p>');
Response.Write('<p align="center"> </p>');
Response.Write('<p align="center">您未登入系统,请登入</p>');
end else
begin
Fdatamodule.ClientDataSet2.Close;
Fdatamodule.ClientDataSet2.CommandText:='select opright from opright where userid='''+trim(vartostr(session.Contents.Item['qjh1']))+'''';
Fdatamodule.ClientDataSet2.Open;
if copy(Fdatamodule.ClientDataSet2.fieldbyname('opright').AsString,11,1)='0' then
begin
Response.Write('<p><img border="0" src="image/logo1.jpg" width="256" height="80"> <img border="0" src="image/title.jpg" width="480" height="80"></p>');
Response.Write('<p align="center"> </p>');
Response.Write('<p align="center"> </p>');
Response.Write('<p align="center">您没有权限操作此模块</p>');
end else
begin
s_workno:=vartostr(request.Form.Item['t1']);
s_name:=vartostr(request.Form.Item['t2']);
s_bm_name:=copy(vartostr(request.Form.Item['t3']),1,4);
s_select:='select a.userid userid,b.name name,b.bm_name bm_name,create_date,isgl from swyh a ,vinternet b where a.userid=b.workno';
if s_workno<>'' then
s_select:=s_select+' and a.userid='''+s_workno+'''';
if s_name<>'' then
s_select:=s_select+' and b.name='''+s_name+'''';
if (s_bm_name<>'') and (s_bm_name<>'全部') then
s_select:=s_select+' and bm_code='''+s_bm_name+'''';
Fdatamodule.cds_general2.Close;
Fdatamodule.cds_general2.CommandText:=s_select;
Fdatamodule.cds_general2.Open;
Fdatamodule.cds_general2.First;
Response.Write('<p><img border="0" src="image/logo1.jpg" width="256" height="80"> <img border="0" src="image/title.jpg" width="480" height="80"></p>');
Response.Write('<p align="center"> </p>');
response.Write('<table border="1" width="760">');
response.Write('<tr>');
response.Write('<td width="190">');
response.Write('工号');
response.Write('</td>');
response.Write('<td width="190">');
response.Write('姓名');
response.Write('</td>');
response.Write('<td width="190">');
response.Write('部门');
response.Write('</td>');
response.Write('<td>');
response.Write('创建日期');
response.Write('</td>');
response.Write('<td>');
response.Write('是否过滤');
response.Write('</td>');
response.Write('</tr>');
while not Fdatamodule.cds_general2.Eof do
begin
response.Write('<tr>');
response.Write('<td width="190">');
response.Write(Fdatamodule.cds_general2.fieldbyname('userid').AsString);
response.Write('</td>');
response.Write('<td width="190">');
response.Write(Fdatamodule.cds_general2.fieldbyname('name').AsString); response.Write('</td>');
response.Write('<td>');
response.Write(Fdatamodule.cds_general2.fieldbyname('bm_name').AsString);
response.Write('</td>');
response.Write('<td>');
response.Write(Fdatamodule.cds_general2.fieldbyname('create_date').AsString);
response.Write('</td>');
response.Write('<td>');
if trim(Fdatamodule.cds_general2.FieldByName('isgl').AsString)='0' then
response.Write('否')
else response.Write('是');
//response.Write(Fdatamodule.cds_general2.fieldbyname('isgl').asstring);
response.Write('</td>');
response.Write('</tr>');
Fdatamodule.cds_general2.Next;
end;
response.Write('</table>');
end;
end;
end;
procedure Tco_asp_search.dellog;
var
begin_date,end_date:string;
s_del:string;
begin
if vartostr(session.Contents.Item['qjh1'])='' then
begin
Response.Write('<p><img border="0" src="image/logo1.jpg" width="256" height="80"> <img border="0" src="image/title.jpg" width="480" height="80"></p>');
Response.Write('<p align="center"> </p>');
Response.Write('<p align="center"> </p>');
Response.Write('<p align="center">您未登入系统,请登入</p>');
end else
begin
Fdatamodule.ClientDataSet2.Close;
Fdatamodule.ClientDataSet2.CommandText:='select opright from opright where userid='''+trim(vartostr(session.Contents.Item['qjh1']))+'''';
Fdatamodule.ClientDataSet2.Open;
if copy(Fdatamodule.ClientDataSet2.fieldbyname('opright').AsString,12,1)='0' then
begin
Response.Write('<p><img border="0" src="image/logo1.jpg" width="256" height="80"> <img border="0" src="image/title.jpg" width="480" height="80"></p>');
Response.Write('<p align="center"> </p>');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -