📄 cleanup.php
字号:
<?php
// +-------------------------------------------------------------+
// | DeskPRO v [2.0.1 Production]
// | Copyright (C) 2001 - 2004 Headstart Solutions Limited
// | Supplied by WTN-WDYL
// | Nullified by WTN-WDYL
// | Distribution via WebForum, ForumRU and associated file dumps
// +-------------------------------------------------------------+
// | DESKPRO IS NOT FREE SOFTWARE
// +-------------------------------------------------------------+
// | License ID : Full Enterprise License =) ...
// | License Owner : WTN-WDYL Team
// +-------------------------------------------------------------+
// | $RCSfile: cleanup.php,v $
// | $Date: 2004/02/10 01:34:25 $
// | $Revision: 1.11 $
// +-------------------------------------------------------------+
// | File Details:
// | - Internal maintenance.
// +-------------------------------------------------------------+
error_reporting(E_ALL ^ E_NOTICE);
cron_check();
// Delete old search data more than a week old
$time = mktime() - (60 * 60 * 24 * 7); // one week
$db->query("DELETE FROM search WHERE 'time' < $time");
// Delete attachments uploaded but no ticket created
$time = mktime() - (60 * 60 * 24 * 7); // one week
$db->query("
DELETE FROM ticket_attachments WHERE
NOT ticketid
AND timestamp < $time
");
// Delete source emails
if ($options['delete_emails']) {
$db->query("DELETE FROM gateway_source");
$db->query("UPDATE ticket SET sourceid = 0");
}
if ($warn = max_limits('tickets', 0, 1)) {
$warning[] = "$warn tickets left.\n";
}
if ($warn = max_limits('faq', 0, 1)) {
$warning[] = "$warn faq left.\n";
}
if (is_array($warning)) {
$expiry_data = join("\n", $warning);
eval(makeemaileval('message', 'TECHBODY_license_expiring_soon', $subject));
dp_mail($settings['email_offemail'], $subject, $message);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -