Exemple #1
0
 /**
  * Maintenance::optimizetables()
  * 
  * @return
  */
 public function optimizetables()
 {
     CodonModule::checkPermission(MAINTENANCE);
     echo '<h3>Optimizing Tables...</h3>';
     $results = MaintenanceData::optimizeTables();
     foreach ($results as $row) {
         echo "{$row->Table} - {$row->Msg_text}<br />";
     }
 }
Exemple #2
0
 *
 * @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');
Exemple #3
0
 public function optimizetables()
 {
     echo '<h3>Optimizing Tables...</h3>';
     $results = MaintenanceData::optimizeTables();
     foreach ($results as $row) {
         echo "{$row->Table} - {$row->Msg_text}<br />";
     }
 }