本文整理汇总了PHP中PilotData::findRetiredPilots方法的典型用法代码示例。如果您正苦于以下问题:PHP PilotData::findRetiredPilots方法的具体用法?PHP PilotData::findRetiredPilots怎么用?PHP PilotData::findRetiredPilots使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PilotData
的用法示例。
在下文中一共展示了PilotData::findRetiredPilots方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: post_module_load
function post_module_load()
{
/* Misc tasks which need to get done */
/* If the setting to auto-retired pilots is on, then do that
and only check every 24 hours
*/
if (Config::Get('USE_CRON') == false) {
if (Config::Get('PILOT_AUTO_RETIRE') == true) {
$within_timelimit = CronData::check_hoursdiff('find_retired_pilots', '24');
if ($within_timelimit === false) {
PilotData::findRetiredPilots();
CronData::set_lastupdate('find_retired_pilots');
}
}
if (Config::Get('CLOSE_BIDS_AFTER_EXPIRE') === false) {
$within_timelimit = CronData::check_hoursdiff('check_expired_bids', '24');
if ($within_timelimit === false) {
SchedulesData::deleteExpiredBids();
CronData::set_lastupdate('check_expired_bids');
}
}
/* Expenses, make sure they're all populated */
$within_timelimit = CronData::check_hoursdiff('populate_expenses', 18);
if ($within_timelimit === false) {
FinanceData::updateAllExpenses();
CronData::set_lastupdate('populate_expenses');
}
/* And finally, clear expired sessions */
Auth::clearExpiredSessions();
}
if (Config::Get('TWITTER_AIRLINE_ACCOUNT') != '') {
$within_timelimit = CronData::check_hoursdiff('twitter_update', '3');
if ($within_timelimit === false) {
ActivityData::readTwitter();
CronData::set_lastupdate('twitter_update');
}
}
// @TODO: Clean ACARS records older than one month
if (Config::Get('MAINTENANCE_MODE') == true && !Auth::LoggedIn() && !PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN)) {
Template::Show('maintenance.tpl');
die;
}
return true;
}
示例2: post_module_load
function post_module_load()
{
/* Misc tasks which need to get done */
/* If the setting to auto-retired pilots is on, then do that
and only check every 24 hours
*/
if (Config::Get('USE_CRON') === true) {
if (Config::Get('PILOT_AUTO_RETIRE') == true) {
$within_timelimit = CronData::check_hoursdiff('find_retired_pilots', '24');
if ($within_timelimit == false) {
PilotData::findRetiredPilots();
CronData::set_lastupdate('find_retired_pilots');
}
}
if (Config::Get('CLOSE_BIDS_AFTER_EXPIRE') === false) {
$within_timelimit = CronData::check_hoursdiff('check_expired_bids', '24');
if ($within_timelimit == false) {
SchedulesData::deleteExpiredBids();
CronData::set_lastupdate('check_expired_bids');
}
}
/* Expenses, make sure they're all populated */
$within_timelimit = CronData::check_hoursdiff('populate_expenses', '18');
if ($within_timelimit == false) {
FinanceData::updateAllExpenses();
CronData::set_lastupdate('populate_expenses');
}
/* And finally, clear expired sessions */
Auth::clearExpiredSessions();
}
// @TODO: Clean ACARS records older than one month
if (Config::Get('MAINTENANCE_MODE') == true && !Auth::LoggedIn() && !PilotGroups::group_has_perm(Auth::$usergroups, FULL_ADMIN)) {
echo '<html><head><title>Down for maintenance - ' . SITE_NAME . '</title></head><body>';
Debug::showCritical(Config::Get('MAINTENANCE_MESSAGE'), 'Down for maintenance');
echo '</body></html>';
die;
}
return true;
}
示例3: define
*
* @author Nabeel Shahzad
* @copyright Copyright (c) 2008, Nabeel Shahzad
* @link http://www.phpvms.net
* @license http://creativecommons.org/licenses/by-nc-sa/3.0/
*/
/* This is the maintenance cron file, which can run nightly.
You should either point to this file directly in your web-host's control panel
Or add an entry into the crontab file. I recommend running this maybe 2-3am,
*/
define('ADMIN_PANEL', true);
include dirname(dirname(__FILE__)) . '/core/codon.config.php';
Auth::$userinfo->pilotid = 0;
error_reporting(E_ALL);
ini_set('display_errors', 'on');
/* Clear expired sessions */
Auth::clearExpiredSessions();
/* Update any expenses */
FinanceData::updateAllExpenses();
if (Config::Get('PILOT_AUTO_RETIRE') == true) {
/* Find any retired pilots and set them to retired */
PilotData::findRetiredPilots();
CronData::set_lastupdate('find_retired_pilots');
}
if (Config::Get('CLOSE_BIDS_AFTER_EXPIRE') === false) {
SchedulesData::deleteExpiredBids();
CronData::set_lastupdate('check_expired_bids');
}
MaintenanceData::optimizeTables();
MainController::Run('Maintenance', 'resetpirepcount');
MainController::Run('Maintenance', 'resethours');