Exemplo n.º 1
0
 public function RunJob()
 {
     $this->_lock();
     $now = time();
     $mysql_result = DataEngine::sql('SELECT ID FROM `SQL_PREFIX_Coordonnee` WHERE `TYPE`=1');
     while ($row = mysql_fetch_assoc($mysql_result)) {
         $tmp[] = $row['ID'];
     }
     if (is_array($tmp) && count($tmp) > 0) {
         $tmp = implode(',', $tmp);
         DataEngine::sql('DELETE FROM `SQL_PREFIX_Coordonnee` WHERE `ID` in (' . $tmp . ')');
         DataEngine::sql('DELETE FROM `SQL_PREFIX_Coordonnee_Joueurs` WHERE `jID` in (' . $tmp . ')');
         DataEngine::sql('DELETE FROM `SQL_PREFIX_Coordonnee_Planetes` WHERE `pID` in (' . $tmp . ')');
     }
     $wormhole_cleaning = array('enabled' => true, 'lastrun' => $now);
     DataEngine::conf_update('wormhole_cleaning', $wormhole_cleaning);
     DataEngine::sql_do_spool();
     // Mettre à jour maintenant, pas que deux membres le fasse a 1/2sec d'intervalle.
     addons::getinstance()->VortexCleaned();
     parent::RunJob();
 }
Exemplo n.º 2
0
 public static function CheckPermsKeyAdd($PermsKey, $value)
 {
     $perms = DataEngine::config('perms');
     $perms[$PermsKey] = $value;
     DataEngine::conf_update('perms', $perms);
 }
Exemplo n.º 3
0
}
// -- Modification 'couleurs' --------------------------------------------------
// -----------------------------------------------------------------------------
// -- Modification 'Permissions' -----------------------------------------------
if (isset($_POST['cxx'])) {
    DataEngine::conf_update('perms', $_POST['cxx']);
}
// -- Modification 'Permissions' -----------------------------------------------
// -----------------------------------------------------------------------------
// -- Changement dans la configuration -----------------------------------------
if (isset($_POST['configuration']) && $_POST['configuration']) {
    $data = array_map('gpc_esc', $_POST['data']);
    $data['DefaultGrade'] = DataEngine::strip_number($data['DefaultGrade']);
    $data['Parcours_Max_Time'] = DataEngine::strip_number($data['Parcours_Max_Time']);
    $data['Parcours_Nearest'] = DataEngine::strip_number($data['Parcours_Nearest']);
    DataEngine::conf_update('config', $data);
    output::Messager($lng['config_done']);
}
// -- Changement dans la configuration -----------------------------------------
// -----------------------------------------------------------------------------
// exécution du spooleur sql...
DataEngine::sql_do_spool();
///-----------------------------------------------------------------------------
include_once TEMPLATE_PATH . 'eadmin.tpl.php';
$tpl = tpl_eadmin::getinstance();
$tpl->page_title = $lng['page_title'];
$version[0] = @mysql_get_server_info();
$version[1] = PHP_VERSION;
$version[2] = @gd_info();
$version[2] = $version[2]['GD Version'];
$tpl->admin_header($version);
Exemplo n.º 4
0
 public function Save()
 {
     if (!is_object(DataEngine::config('cron'))) {
         DataEngine::conf_add('cron', $this);
     } else {
         DataEngine::conf_update('cron', $this);
     }
     DataEngine::sql_do_spool();
 }