예제 #1
0
 public static function minimalinit()
 {
     if (!defined('ROOT_URL')) {
         if (p_strlen(ROOT_PATH) > p_strlen($_SERVER['DOCUMENT_ROOT'])) {
             define('ROOT_URL', p_substr(ROOT_PATH, p_strlen($_SERVER['DOCUMENT_ROOT'])));
         } else {
             define('ROOT_URL', '/');
         }
     }
     define('INCLUDE_URL', ROOT_URL . 'Script/');
     define('IMAGES_URL', ROOT_URL . 'Images/');
     define('ADDONS_URL', ROOT_URL . 'addons/');
     define('TEMPLATE_URL', ROOT_URL . 'tpl/');
     define('CACHE_URL', ROOT_URL . 'cache/');
     define('BTN_URL', CACHE_URL . 'btn-');
     DataEngine::conf_cache('perms');
     DataEngine::conf_cache('config');
     // Fix multiple installations/conflit avec forum ou autre soft utilisant les sessions
     session_set_cookie_params(0, ROOT_URL);
     if (!NO_SESSIONS) {
         session_start() or trigger_error('Erreur de session', E_USER_ERROR);
     }
     return self::$initialized = true;
 }
<?php

/**
 * @author Alex10336
 * Dernière modification: $Id$
 * @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
 * @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
 *
 **/
DataEngine::conf_cache('EmpireAllys');
DataEngine::conf_cache('EmpireEnnemy');
class cartographie
{
    protected static $instance;
    private $nbmsg;
    private $pinfos;
    private $perreurs;
    private $pwarns;
    private $lng;
    private $lngmain;
    protected $allys;
    protected $wars;
    protected $detelespooler;
    /**
     * Ajoute/réactive un vortex dans la base
     * @param string $coordsin
     * @param string $coordsout
     * @return boolean
     */
    function add_vortex($coordsin, $coordsout)
    {
예제 #3
0
/**
 * @author Alex10336
 * Dernière modification: $Id$
 * @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
 * @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
 *
 * */
define('IS_IMG', true);
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
require_once CLASS_PATH . 'map.class.php';
require_once CLASS_PATH . 'parser.class.php';
require_once CLASS_PATH . 'ownuniverse.class.php';
DataEngine::conf_cache('EmpireAllys');
DataEngine::conf_cache('EmpireEnnemy');
DataEngine::conf_cache('MapColors');
$map = map::getinstance();
// initialisation...
/// INIT ///
$NbCase = 100;
$TailleCase = floor($map->taille / $NbCase);
$image = initimg($NbCase, $NbCase, $TailleCase, $TailleCase);
$mysql_result = $map->init_map();
while ($line = mysql_fetch_assoc($mysql_result)) {
    if ($CurrSS == 0) {
        $CurrSS = $line['POSIN'];
    }
    if ($line['POSIN'] != $CurrSS) {
        $map->add_ss(false, 'img_addplot');
        $CurrSS = $line['POSIN'];
    }
예제 #4
0
    public function __wakeup()
    {
        $this->filename = CACHE_PATH . 'map.' . md5($_SESSION['_login'] . $_SESSION['_pass']) . '.js';
        if (file_exists($this->filename)) {
            $this->lastrun = filemtime($this->filename);
            $sqlr = DataEngine::sql('SELECT udate FROM SQL_PREFIX_Coordonnee ORDER BY udate DESC LIMIT 1');
            $sqla = mysql_fetch_array($sqlr);
            if ($this->lastrun > $sqla['udate']) {
                $this->CronPattern = strftime("%M %H %d %m 0", time() + 3600);
            } else {
                $this->CronPattern = strftime("%M %H %d %m %w", time());
            }
        } else {
            $this->lastrun = 0;
            $this->CronPattern = '* * * * *';
        }
    }
}
// -----------------------------------------------------------------------------
DataEngine::conf_cache('cron');
$cron_conf = DataEngine::config('cron');
if (is_object($cron_conf)) {
    $cron = $cron_conf;
} else {
    $cron = phpcron_list::getinstance();
    $cron->AddJob(new job_vortex());
    $cron->AddJob(new job_buttons());
    $cron->AddJob(new job_css());
    $cron->AddJob(new job_map_tooltips());
}
//DataEngine::Grab_Custom_Jobs();