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

📄 setup.cgi

📁 BBS3000 sourceCode
💻 CGI
📖 第 1 页 / 共 4 页
字号:
close(TITLES);
foreach $m (@hastitles){
$m=~ s/\n//g;
($rtime,$rthistime,$rusername,$rcomment,$rfrom,$remote,$retitles)=split(/\t/,$m);
if($rthistime eq $deltitle){
$oldtime=$rtime;
$olduser=$rusername;
$oldemote=$remote;
$oldcomment=$rcomment;
$oldtitle=$retitles;
}
$oldcomment=~ s/<([^>]|\n)*>/\n/g;
if($rdthistime eq $oldtime){
}
}
&send_html;
print <<EOF;
<html>
<head>
<title>编辑回复</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
a:link {  font-family: "宋体", "serif"; font-size: 9pt; color: #004080; text-decoration: none}
a:hover {  color: #004080; text-decoration: underline; background-color: #CCCC99}
a:visited {  text-decoration: none}
body {  font-family: "宋体", "serif"; font-size: 9pt}
td {  font-family: "宋体", "serif"; font-size: 9pt}
input {  font-size: 9pt}
p {  font-size: 9pt}
br {  font-size: 9pt}
tr {  font-size: 9pt}
table {  font-size: 9pt}
-->
</style>
</head>
<SCRIPT LANGUAGE="JavaScript">
function openWindow(url) {
  popupWin = window.open('$imagurl/ybb.htm','','resizable,scrollbars')
}
</SCRIPT>
<body topmargin=0>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="50%" align="center" >
<table width="100%" border="0" cellpadding="4" cellspacing="0" background=$imagurl/tablebg.gif>
<tr>
<td width="50%"><font color="#FFFFFF">您当前的位置:<a href="$cgiurl?id=$id"><font color="#FFFFFF">$bbsname</font></a>->>>编辑回复</font></td>
<td align=right>
EOF
if(($outurl ne "")&&($outurl ne "http://")){
print "<a href=$outurl target=_blank><font color=#FFFFFF>$outurl</font></a></td>";
}
print <<EOF;
</tr>
</table>
<br>
<form ACTION="$cgiurl" METHOD="POST" align="center">
<input type="hidden" name="menu" value="redit">
<input type="hidden" name="deltitle" value=$deltitle>
<div align="center">
<table border="0" cellpadding="0" width="590" cellspacing="0" align="left">
<tr bgcolor="#7AB7FA">
<td>
<div align="center">
<table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolorlight="#008000" bordercolordark="#FFFFFF">
<tr valign="top">
<td width="100%">
<div align="center"><font color=#FFFFFF>编辑回复</font><br>
<table width="549" border="1" cellspacing="0" cellpadding="0" bordercolorlight="#008000" bordercolordark="#FFFFFF">
<tr>
<td bgcolor=#FFF5E1 align="left">回复标题: <INPUT size=68 maxLength=50 name=titles value=$oldtitle>
</td>
<tr>
<input type="hidden" name="id" value="$id">
<input type="hidden" name="username" value="$username">
<input type="hidden" name="no" value="$no">
<input type="hidden" name="userpsd" value="$userpsd">
</td>
</tr>                  <tr bgcolor="#ffedc8">
<td background=$imagurl/tablebg.gif height="168" colspan="2" width="545">
<p>
<center>原回复内容</center><textarea name="comment" cols="75" rows="9">$oldcomment</textarea>
</p>
</td>
</tr>
</table>  </center>
</div>
<div align="center">
<input type="image" border="0" name="imageField" src="$imagurl/sbutton-send2.gif" width="59" height="21">
<a href="$cgiurl?id=$id"><img src="$imagurl/sbutton-cal2.gif" width="59" height="21" border="0"></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</div>
</td>
</tr>
</table>
</center>
</div>
EOF
if ($YBBCodeAllow eq "is") {
print <<EOF;
<tr>
<td>
<align=left><font color=#FF0000>* </font><a href=javascript:openWindow()>YBB代码</a>支持
</td></tr>
</form>
</body>
</html>
EOF
} else {
print <<EOF;
<tr>
<td>
</td></tr>
</form>
</body>
</html>
EOF
}
exit;
}
##########
sub edit{
if($titles eq ""){&errorview("您的标题不能没有填写!");exit;}
open(TITLES,"$filepath/list/$id/$deltitle");
@hastitles=<TITLES>;
close(TITLES);
foreach $hastitles (@hastitles) {
$hastitles=~ s/\n//g;
($rdtitles,$rdthistime,$rdusername,$comment1,$rdhassee,$rdhasreply,$r3,$r4,$r5,$r6,$rhassee1)=split(/\t/,$hastitles);
}
if($username eq ""){&errorview("对不起,您没有足够的权限编辑此帖!");exit;}
if(($username ne $rdusername)&&($userpsd ne $delpsd)&&($userpsd ne $fbzdel)){&errorview("对不起,您没有足够的权限编辑此帖!");exit;}
open(TITLES,">$filepath/list/$id/$deltitle");
@hastitles=<TITLES>;
if ($YBBCodeAllow eq "is") {
$comment = &YBBCode("$comment");
}
print TITLES $titles."\t".$rdthistime."\t".$rdusername."\t".$comment."<br><br>此消息由$username在$thistime编辑过!"."\t".$rdhassee."\t".$rdhasreply."\t".$r3."\t".$r4."\t".$r5."\t".$r6."\t".$rhassee1."\n";
close(TITLES);
&win;
exit;
}
##########
sub redit{
open(TITLES,"$filepath/list/$id/$no");
@hastitles=<TITLES>;
close(TITLES);
foreach $hastitles (@hastitles) {
$hastitles=~ s/\n//g;
($rtime,$rthistime,$rusername)=split(/\t/,$hastitles);
if ($rthistime eq $deltitle){
if($username eq ""){&errorview("对不起,您没有足够的权限编辑此帖!");exit;}
if(($username ne $rusername)&&($userpsd ne $delpsd)&&($userpsd ne $fbzdel)){&errorview("对不起,您没有足够的权限编辑此帖!");exit;}
}
}
open(TITLES,">$filepath/list/$id/$no");
foreach $m (@hastitles){
$m=~ s/\n//g;
($rtime,$rthistime,$rusername,$rcomment,$rfrom,$remote,$retitles,$rerhassee)=split(/\t/,$m);
if ($m ne ""){
if ($rthistime eq $deltitle){
if ($YBBCodeAllow eq "is") {
$comment = &YBBCode("$comment");
}
print TITLES $rtime."\t".$rthistime."\t".$rusername."\t".$comment."<br><br>此消息由$username在$thistime编辑过!"."\t".$rfrom."\t".$remote."\t".$titles."\t".$rerhassee."\n";
} else {
print TITLES $m."\n";
}
}
}
close(TITLES);
&win;
exit;
}
##########
sub deltitle{
if($userpsd eq ""){&errorview("对不起,您不是版主!");exit;}
if(($userpsd ne "$delpsd")&&($userpsd ne $fbzdel)){&errorview("对不起,您不是版主!");exit;}
if($FORM{'delyes'} eq ""){
&send_html;
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="$cgiurl?menu=deltitle&deltitle=$deltitle&id=$id&delyes=yes">[ 确定 ]</a>&nbsp;&nbsp;&nbsp;<a href=javascript:history.back(1)>[ 取消 ]</a></td></tr>
</table>
</body></html>
EOF
}else{
open(TITLES,"$filepath/list/$id/bbs");
@hastitles=<TITLES>;
close(TITLES);
open(TITLES,">$filepath/list/$id/bbs");
foreach $m (@hastitles){
$m=~ s/\n//g;
if($m ne ""){
($rthistime)=split(/\t/,$m);
if($rthistime ne $deltitle){
print TITLES $m."\n";
}
}
}
close(TITLES);
open(TITLES5,"$filepath/list/$id/bbs.bak");
@hastitles5=<TITLES5>;
close(TITLES5);
open(TITLES5,">$filepath/list/$id/bbs.bak");
foreach $m5 (@hastitles5){
$m5=~ s/\n//g;
if($m5 ne ""){
($rthistime5)=split(/\t/,$m5);
if($rthistime5 ne $deltitle){
print TITLES5 $m5."\n";
}
}
}
close(TITLES5);
unlink("$filepath/list/$id/$deltitle");
unlink("$filepath/list/$id/$deltitle"."b");
&listtitle;
}
exit;
}
##########
sub delreply{
if($userpsd eq ""){&errorview("对不起,您不是版主!");exit;}
if(($userpsd ne "$delpsd")&&($userpsd ne $fbzdel)){&errorview("对不起,您不是版主!");exit;}
if($FORM{'delyes'} eq ""){
&send_html;
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="$cgiurl?menu=delreply&deltitle=$deltitle&id=$id&no=$no&delyes=yes">[ 确定 ]</a>&nbsp;&nbsp;&nbsp;<a href=javascript:history.back(1)>[ 取消 ]</a></td></tr>
</table>
</body></html>
EOF
}else{
open(TITLES,"$filepath/list/$id/$no");
@hastitles=<TITLES>;
close(TITLES);
open(TITLES,">$filepath/list/$id/$no");
foreach $m (@hastitles){
$m=~ s/\n//g;
if($m ne ""){
($rtime,$rthistime)=split(/\t/,$m);
if($rthistime ne $deltitle){
print TITLES $m."\n";
}
}
}
close(TITLES);
open(TITLES,"$filepath/list/$id/$rtime");
@hastitles=<TITLES>;
close(TITLES);
open(TITLES,">$filepath/list/$id/$rtime");
foreach $m (@hastitles){
$m=~ s/\n//g;
($rtitles,$rthistime,$rusername,$rcomment,$rfrom,$rhasreply,$remote,$rlastname,$rlasttime,$re,$djj)=split(/\t/,$m);
}
$rhasreply--;
print TITLES $rtitles."\t".$rthistime."\t".$rusername."\t".$rcomment."\t".$rfrom."\t".$rhasreply."\t".$remote."\t--\t".$rlasttime."\t".$re."\t".$djj."\n";
close(TITLES);
&listtitle;
}
exit;
}
##########
sub errorview
{
print "Content-type: text/html\n\n";
print "<html><head></head><body><script>alert('$_[0]');history.back();</script></body></html>";
}
sub myurl
{
	local $myurl,$server_port;
	if ($ENV{'SERVER_PORT'} ne '80') { $server_port=$ENV{'SERVER_PORT'};}
	$fullcgiurl = "http://$ENV{'SERVER_NAME'}$server_port$ENV{'SCRIPT_NAME'}";
	$myurl=substr($fullcgiurl,0,rindex($fullcgiurl,"/"));
	return $myurl;
}
######################### END OF SCRIPT #########################

⌨️ 快捷键说明

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