⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 searcher.cgi

📁 界面和WEB源码 界面和WEB源码
💻 CGI
📖 第 1 页 / 共 2 页
字号:
sub PrintHeader {
print "Content-type: text/html\n\n";
}
sub add{
&PrintHeader;
print <<EOF;
<html>
<head>
<style>
<!--
A:link {text-decoration: none; color:005AB5}
A:visited {text-decoration: none; color: 005AB5}
A:active {text-decoration: none; color: 005AB5}
A:hover {text-decoration: none; color: ff0000}
-->
</style>
<style type=text/css>A {
TEXT-DECORATION: none
}
A:hover {
COLOR: #ee9c00; TEXT-DECORATION: underline
}
TD {
FONT-SIZE: 9pt
}
</style>
<title>Yuzi搜索引擎2000</title>
</head>
<body>
<center><b><font face="华文行楷" size="5" color="#FFBB9D">Yuzi搜索引擎2000</font></b>
<form method="post" action="searcher.cgi">
<hr width="500" size="0">
<input type="hidden" name="action" value="search"><input type="text" size="20" name="Keywords"> <input type="submit" value="搜索">
</center>
<hr width="500" size="0">
</form>
<form method="post" action="searcher.cgi">
<input type="hidden" name="action" value="add"><div align="center"><center>
<table border="0" cellspacing="3" bgcolor="#FFECE0">
<tr>
<td width="100%" align="left" colspan="2" bgcolor="#FFCFB3">
◎ <a href=$wzurl>$wzname</a> —〉<a href="searcher.cgi">$title</a> —〉登录网站</td>
</tr>
<tr>
<td><span style=FONT-SIZE:9pt>网站名称:
<input type="text" size="15" maxlength="20" name="Title"></span></td>
<td><span style=FONT-SIZE:9pt>网站地址: <input type="text" size="20" maxlength="50" name="URL" value="http://">
</span>
</td>
</tr>
<tr>
<td><span style=FONT-SIZE:9pt>网站简介:<font color="#FF0000">↓</font></span></td>
<td><span style=FONT-SIZE:9pt>网站类型:</span> <span style=FONT-SIZE:9pt>
<select name=yuzi>
<option>请选择</option>
EOF
open(ONLINE,"menu.txt")|| die $!;
@online=<ONLINE>;
close(ONLINE);
foreach $user (@online) {
$user =~ s/\n//g;
if ($user ne "") {
($no,$mc)=split(/\|/,$user);
print "<option value=$no>$mc</option>\n";
}
}
print <<EOF;
</select></span></td>
</tr>
<tr>
<td width="100%" colspan="2" align="center"><span style=FONT-SIZE:9pt><textarea name="Description" wrap="virtual" cols="60" rows="3"></textarea></span></td>
</tr>
<tr>
<td width="50%" align="right"><span style=FONT-SIZE:9pt><input type="submit" value="登录"> </span></td>
<td width="50%"><span style=FONT-SIZE:9pt><input type="reset" value="重填"> </span></td>
</tr>
</table>
</center></div> <span style=FONT-SIZE:9pt>
</form>
<p align=center><font size=1>版权所有 2000 <a href=http://www.yuzi.net target=_blank>Yuzi工作室</a>.</span>
</body>
</html>
EOF
exit;
}
sub index{
if(($psd ne $password)&&($psd ne "")){&errorview("您的密码错误!");exit;}
open(GUEST,"$BaseDir/menu.txt")||die $!;
@lines=<GUEST>;
close(GUEST);
if($psd eq $password){$glms=" —〉管理模式";}
&PrintHeader;
print <<EOF;
<html>
<head>
<style>
<!--
A:link {text-decoration: none; color:005AB5}
A:visited {text-decoration: none; color: 005AB5}
A:active {text-decoration: none; color: 005AB5}
A:hover {text-decoration: none; color: ff0000}
-->
</style>
<style type=text/css>A {
TEXT-DECORATION: none
}
A:hover {
COLOR: #ee9c00; TEXT-DECORATION: underline
}
TD {
FONT-SIZE: 9pt
}
</style>
</head>
<center>
<center><b><font face="华文行楷" size="5" color="#FFBB9D">Yuzi搜索引擎2000</font></b>
<form method="post" action="searcher.cgi">
<hr width="550" size="0">
<input type="hidden" name="action" value="search"><input type="text" size="20" name="Keywords"> <input type="submit" value="搜索">
</center>
<hr width="550" size="0">
</form>
<body>
<center>
<table border=0 cellpadding=0 cellspacing=0 width=600 height=59><span style=FONT-SIZE:9pt>◎ <a href=$wzurl>$wzname</a> —〉<a href="searcher.cgi">$title</a>$glms                    <a href=searcher.cgi?menu=glms>站长管理</a>   <a href=searcher.cgi?menu=add>登录网站</a>
<tr>
<td width=33% height=59 valign=top bgcolor=#FFF9F7><div align=center><table
border=0 cellpadding=0 width=100% height=84>
<tr>
<td width=100% height=84 style=line-height: 10px><table width=454 cellspacing=3
cellpadding=3>
EOF
foreach $line (@lines){
$line =~ s/\n//g;
if ($line ne "") {
($no,$mc,$jie) = split(/\|/,$line);
if ( -e "$BaseDir/data/$no.dat"){
open(TITLES,"$BaseDir/data/$no.dat")|| die $!;
@hastitles=<TITLES>;
close(TITLES);
$noo=@hastitles;
}else{
$noo="0";
}
if ($NO_count <6) {
$NO_count ++;
} else {
$NO_count =1;
}
print "<tr><td bgColor=#FFF9F7 width=151><center><a href=searcher.cgi?yuzi=$no=&psd=$psd>$mc</a>( <font color=#FF0000>$noo</font> 个网站)<br>$jie</td>"   if ($NO_count==1);
print "<td align=middle bgColor=#FFF9F7 width=151><center><a href=searcher.cgi?yuzi=$no=&psd=$psd>$mc</a>( <font color=#FF0000>$noo</font> 个网站)<br>$jie</td>" if ($NO_count==2);
print "<td align=middle bgColor=#FFF9F7 width=152><center><a href=searcher.cgi?yuzi=$no=&psd=$psd>$mc</a>( <font color=#FF0000>$noo</font> 个网站)<br>$jie</td></tr>"  if ($NO_count==3);
print "<tr align=middle><td bgColor=#FFEDE6 width=151><center><a href=searcher.cgi?yuzi=$no=&psd=$psd>$mc</a>( <font color=#FF0000>$noo</font> 个网站)<br>$jie</td>"  if ($NO_count==4);
print "<td align=middle bgColor=#FFEDE6 width=151><center><a href=searcher.cgi?yuzi=$no=&psd=$psd>$mc</a>( <font color=#FF0000>$noo</font> 个网站)<br>$jie</td>"  if ($NO_count==5);
print "<td align=middle bgColor=#FFEDE6 width=152><center><a href=searcher.cgi?yuzi=$no=&psd=$psd>$mc</a>( <font color=#FF0000>$noo</font> 个网站)<br>$jie</td></tr>"  if ($NO_count==6);
}
}
open(FILE,"$BaseDir/data/new")||die $!;
@lines=<FILE>;
close(FILE);
@MEMTIMES=@lines;
for($inti=1;$inti<11;$inti++){
$line=@MEMTIMES[$inti-1];
$line=~s/\n//g;
($mz,$url,$yuzi)=split(/\|/,$line);
$top="$top<a href=searcher.cgi?menu=dj&yuzi=$yuzi&url=$url target=_blank>$mz</a><br>";
}
print <<EOF;
</table>
</td>
</tr>
</table>
</div></td>
<td width=34% height=59 valign=top bgcolor=#FFF4F0><div align=center><table
border=0 cellpadding=0 width=94% style=border: 1px solid rgb(255,185,155)>
<tr>
<td width=100% bgcolor=#FFCEB9><p align=center><font color=#FFFFFF>新进10个网站</font></td>
</tr>
<tr>
<td width=100% align=center>$top</td>
</tr>
<tr>
<td width=100% valign=top><div align=center><table border=0
cellpadding=0 cellspacing=0 width=95%>
</table>
</div></td>
</tr>
</table>
</div></td>
</tr>
</table>
<p align=center><font size=1>版权所有 2000 <a href=http://www.yuzi.net target=_blank>Yuzi工作室</a>.
</body></html>
EOF
exit;
}
sub dj{
open(TMP,"$BaseDir/data/ip")|| die $!;
@lasttxt=<TMP>;
close(TMP);
$lasttxt=@lasttxt[0];
($ip1)=split(/\t/,$lasttxt);
if($ip1 ne $ip){
open(TITLES,"$BaseDir/data/$yuzi.dat")|| die $!;
@hastitles=<TITLES>;
close(TITLES);
open(TITLES,">$BaseDir/data/$yuzi.dat")|| die $!;
foreach $m (@hastitles){
$m=~ s/\n//g;
if($m ne ""){
($mc,$wz,$jj,$dj)=split(/\|/,$m);
if($wz eq $url){
unless($dj){$dj=0;}
$dj++;
$newtitle=$mc."|".$wz."|".$jj."|".$dj;
print TITLES $newtitle."\n";
}else{
print TITLES $m."\n";
}
}
}
close(TITLES);
}
open(TMP,">$BaseDir/data/ip")|| die $!;
print TMP $ip;
close(TMP);
print "Location: $url\n\n";
exit;
}
sub errorview
{
print "Content-type: text/html\n\n";
print "<html><head></head><body><script>alert('$_[0]');history.back();</script></body></html>";
}
sub del {
if($psd ne $password){&errorview("您的输入的密码错误,请重新输入!");exit;}
if($in{'delyes'} eq ""){
&PrintHeader;
print <<EOF;
<html>
<head>
<style>
<!--
{font-size: 12px;}
p {font-size:12px;}
a { text-decoration: none; color: rgb(40,40,180) }
a:hover {color:#FF9900;text-decoration:none}
table {font-size:12px;}
td {font-size:12px;}
-->
</style>
</head>
<body>
<CENTER>
<br><br><br>
<table width=335 cellspacing=1 cellpadding=5>
<tr><td width=100% bgcolor=#ffffff align=center>
<span style="font-size: 10.5pt;line-height: 13pt">- 您确定要删除吗 -</span><BR> 
<tr><td align=center><a href="?menu=del&yuzi=$yuzi&psd=$psd&delnr=$delnr&delyes=yes">[ 确定 ]</a>&nbsp;&nbsp;&nbsp;<a href=javascript:history.back(1)>[ 取消 ]</a></td></tr> 
</table> 
</body></html>
EOF
}else{
open (GUEST,"$BaseDir/data/$yuzi.dat") ||die $!;
@lines=<GUEST>;
close(GUEST);
open (GUEST,">$BaseDir/data/$yuzi.dat") || die $!;
foreach $usersays (@lines) {
$usersays=~ s/\n//g;
if($usersays  ne ""){
($index)=split(/\|/,$usersays);
if($delnr ne $index){
print GUEST "$usersays\n";
}
}
}
close(GUEST);
print "Location: searcher.cgi?yuzi=$yuzi=&psd=$psd\n\n";
}
}
##########
sub glms{
&PrintHeader;
print <<EOF;
<HTML><HEAD><TITLE>【管理模式】</TITLE>
<META content=text/html; charset=gb2312 http-equiv=Content-Type>
<STYLE>BODY {
COLOR: black; FONT-FAMILY: 宋体, Arial; FONT-SIZE: 9pt; LINE-HEIGHT: 12pt; MARGIN-TOP: 0px
}
</STYLE>
</HEAD>
<P align=center><FONT color=black><BR></FONT><FONT
color=#000000>请输入管理员密码</FONT></P>
<form action=searcher.cgi method=post>
<DIV align=center>
<CENTER>
<TABLE bgColor=#b2b2b2 border=1 borderColor=#ffffff borderColorDark=#ffffff
borderColorLight=#000000 cellSpacing=0 width=617>
<TBODY>
<TR>
<TD align=center bgColor=#FFEEEE width=611>
<FONT color=#0080ff><INPUT name=psd size=20
tabIndex=3 type=password></FONT></TD></TR>
<TR align=middle>
<TD align=left borderColorDark=#ffffff borderColorLight=#000000 width=605 bgColor="#FFEEEE">
<P
align=center><INPUT tabIndex=10 type=submit value="   进入   "></P></TD></TR></TBODY></TABLE></DIV></CENTER></FORM><P align=center><FONT color=#000000>程序制作 </FONT><a href=http://www.yuzi.net target=_blank><b>Yuzi工作室</b></a>
</P>
</BODY></HTML>
EOF
exit;
}
######################### END OF SCRIPT #########################

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -