📄 clearbbs.php
字号:
<?php
include("pwdsuper.php");
include("connect.inc.php");
include("char.inc.php");
if(isset($op)){
$nowdatetime=strftime('%m/%d/%Y %H:%M:%S %p');
list($nowdate,$nowtime,$amorpm)=explode(" ",$nowdatetime);
list($nowm,$nowd,$nowy)=explode("/",$nowdate);
switch ($radiobutton){
case "oneyear":
$nowy=$nowy-1;
break;
case "halfyear":
if ($nowm<=6){ $nowy=$nowy-1; $nowm=6+$nowm;}
else {$nowm=$nowm-6;}
if($nowm<10)$nowm="0".$nowm;
break;
case "threemonth":
if ($nowm<=3){ $nowy=$nowy-1; $nowm=9+$nowm;}
else {$nowm=$nowm-3;}
if($nowm<10)$nowm="0".$nowm;
break;
case "onemonth":
if ($nowm==1){ $nowy=$nowy-1; $nowm=12;}
else{ $nowm=$nowm-1;}
if($nowm<10)$nowm="0".$nowm;
break;
default:
break;
}
$radiobuttondate=$nowy."-".$nowm."-".$nowd;
$radiobuttondate=$radiobuttondate." ".$nowtime." ".$amorpm;
$query="DELETE FROM guestbook WHERE dateandtime<'".$radiobuttondate."'";
if(mysql_query($query)){
$ok="ok";
header("Location: cleardb.php?userid=$userid&ok=$ok");}
else{
echo "<center>".mysql_error()."</center><br>";}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -