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

📄 cleanup_monthly.inc.php

📁 php最好的论坛程序! php最好的论坛程序! php最好的论坛程序!
💻 PHP
字号:
<?php

/*
	[Discuz!] (C)2001-2006 Comsenz Inc.
	This is NOT a freeware, use is subject to license terms

	$RCSfile: cleanup_monthly.inc.php,v $
	$Revision: 1.5.2.2 $
	$Date: 2006/07/17 07:50:18 $
*/

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

$myrecordtimes = $_DCACHE['settings']['myrecorddays'] * 86400;
$db->query("DELETE FROM {$tablepre}mythreads WHERE dateline<'$timestamp'-'$myrecordtimes'", 'UNBUFFERED');
$db->query("DELETE FROM {$tablepre}myposts WHERE dateline<'$timestamp'-'$myrecordtimes'", 'UNBUFFERED');

$db->query("DELETE {$tablepre}favorites FROM {$tablepre}favorites LEFT JOIN {$tablepre}forums USING(fid) WHERE {$tablepre}favorites.fid>0 AND {$tablepre}forums.fid IS NULL");
$db->query("DELETE {$tablepre}favorites FROM {$tablepre}favorites LEFT JOIN {$tablepre}threads USING(tid) WHERE {$tablepre}favorites.tid>0 AND {$tablepre}threads.tid IS NULL");

$db->query("DELETE {$tablepre}rewardlog FROM {$tablepre}rewardlog LEFT JOIN {$tablepre}threads USING(tid) WHERE {$tablepre}threads.tid IS NULL", 'UNBUFFERED');
$db->query("DELETE FROM {$tablepre}tradelog WHERE orderid<='".date('Ymd', $timestamp-5*86400)."'", 'UNBUFFERED');

$db->query("TRUNCATE {$tablepre}relatedthreads");

?>

⌨️ 快捷键说明

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