Esempio n. 1
0
}
if ($validsession !== true && IS_IMG) {
    header("Content-Type: image/png");
    header("Cache-Control: no-cache, must-revalidate");
    // HTTP/1.1
    header("Expires: Mon, 16 Jul 2008 04:21:44 GMT");
    // HTTP/1.0 Date dans le passé
    require_once CLASS_PATH . 'map.class.php';
    $Taille = 180;
    $image = imagecreate($Taille, 20);
    $background_color = imagecolorallocate($image, 0, 0, 0);
    imagefilledrectangle($image, 0, 0, $Taille, $Taille, $background_color);
    $debug_cl = imagecolorallocate($image, 254, 254, 254);
    map::map_debug($lng['session_lost']);
    imagepng($image);
    imagedestroy($image);
    exit;
}
// $validsession
if ($validsession === true && $_SESSION['_Perm'] < AXX_VALIDATING) {
    $query = 'INSERT INTO `SQL_PREFIX_Log` (`DATE`,`log`,`IP`) VALUES(NOW(),"login,needvalidation:' . $_SESSION['_login'] . '",\'' . $_SESSION['_IP'] . '\')';
    $_SESSION['_login'] = '';
    DataEngine::sql($query);
    output::_DoOutput('<a href="' . DataEngine::config_key('config', 'ForumLink') . '"><p style="color:red">' . $lng['no_axx'] . '</p></a>');
}
if ($validsession !== true) {
    require_once TEMPLATE_PATH . 'login.tpl.php';
    $tpl = tpl_login::getinstance();
    $tpl->page_title = $lng['login_page_title'];
    $tpl->DoOutput($login_msg);
}
    /**
     * @param integer $NeededAXX Constante du niveau d'accès
     */
    public static function CheckPermsOrDie($NeededAXX = AXX_MEMBER)
    {
        if (!self::CheckPerms($NeededAXX)) {
            $lng = language::getinstance()->GetLngBlock('dataengine');
            if (is_numeric($NeededAXX)) {
                $perm = self::s_perms();
                $NeededAXX = $perm[$NeededAXX];
            }
            $str = sprintf($lng['minimalpermsneeded'], $NeededAXX);
            $out = <<<PERM
<br/><br/>
\t<center>
\t\t<a href='%ROOT_URL%'>
\t\t<font color=red><i>
                    {$str}
\t\t</i></font></a>
\t</center>
PERM;
            output::_DoOutput($out);
        }
    }
Esempio n. 3
0
require_once '../init.php';
require_once INCLUDE_PATH . 'Script.php';
if (!Members::CheckPerms('CARTE_JOUEUR')) {
    $out = <<<o
<carte>
    <script>
    Carte.DetailsShow(false);
    alert('Accès requis manquant');
    </script>
</carte>
o;
    output::_DoOutput($out);
}
//Tracé Menu
if (!isset($_GET["ID"]) or $_GET["ID"] == "") {
    output::_DoOutput("<CarteDetails><content><![CDATA[Aucune donn&eacute;e a charger, retour :<a href='javascript:void();' onclick='Carte.DetailsShow(false)'>Carte</a>]]></content></CarteDetails>");
}
$id = intval($_GET['ID']);
$sql = <<<sql
SELECT `TYPE`, `POSIN`, `POSOUT`, `COORDET`, `COORDETOUT`, `USER`, `EMPIRE`, `INFOS`
FROM`SQL_PREFIX_Coordonnee`
LEFT JOIN`SQL_PREFIX_Coordonnee_Joueurs` on id=jid
WHERE (`POSIN`={$id} OR `POSOUT`={$id}) ORDER BY `USER`
sql;
$mysql_result = DataEngine::sql($sql);
require_once TEMPLATE_PATH . 'cartedetails.tpl.php';
$tpl = tpl_cartedetails::getinstance();
$tpl->Setheader(intval($_GET["ID"]));
while ($ligne = mysql_fetch_array($mysql_result)) {
    $tpl->AddRow($ligne);
}
Esempio n. 4
0
    }
    unset($vortex_a[$CurrSS]);
    // destruction du vortex...
}
$tabdata[] = job_map_tooltips__add_ss($CurrSS, $CurrSS_a);
if (is_array($currentsearch)) {
    $currentsearch = implode(',', $currentsearch);
}
$tabdata = implode('', $tabdata);
$out = <<<o
<carte>
    <currentsearch><![CDATA[{$currentsearch}]]></currentsearch>
    <tabdata><![CDATA[{$tabdata}]]></tabdata>
</carte>
o;
output::_DoOutput($out);
/** crontab.php/array_js */
function array_js(&$item1, $key)
{
    if (!is_numeric($item1)) {
        $item1 = '"' . addslashes($item1) . '"';
    }
}
function job_map_tooltips__add_ss($ss, $data)
{
    $line = array();
    $tmp = '';
    // map::ss_info
    foreach ($data as $k => $v) {
        /// $k = ID mysql/nb type @@ $v = array...
        if (isset($v['EMPIRE'])) {
Esempio n. 5
0
function my_xml_error_handler($errno, $errstr, $errfile, $errline)
{
    global $_my_xml_error_handler;
    $errfile = str_replace(ROOT_PATH, '', $errfile);
    $errstr = str_replace(ROOT_PATH, '', $errstr);
    switch ($errno) {
        case E_USER_WARNING:
        case E_WARNING:
            xdebug_break();
            $_my_xml_error_handler .= "ALERTE [{$errno}] {$errstr} (Fichier {$errfile}:{$errline})\n";
            break;
        case E_ERROR:
        case E_PARSE:
        case E_USER_ERROR:
            xdebug_break();
            $_my_xml_error_handler .= "ERREUR [{$errno}] {$errstr}\n" . "  Erreur fatale sur la ligne {$errline} dans le fichier {$errfile}" . ", PHP " . PHP_VERSION . " (" . PHP_OS . ")\n" . 'Arr&ecirc;t...';
            output::_DoOutput('<php><phperror><![CDATA[' . DataEngine::xml_fix51($_my_xml_error_handler) . ']]></phperror></php>');
            break;
        default:
            //Do nothing?
            if (!stristr($errstr, 'Undefined')) {
                xdebug_break();
                $_my_xml_error_handler .= "NOTICE [{$errno}] {$errstr} (Fichier {$errfile}:{$errline})\n";
            }
            break;
    }
}
Esempio n. 6
0
 /**
  * Génère la page
  * @param boolean,array $include_menu Inclure le menu ?
  * @param boolean $include_header Inclure l'entete ?
  */
 public function DoOutput($include_menu = true, $include_header = true)
 {
     if (!USE_AJAX) {
         if ($include_menu) {
             include_once TEMPLATE_PATH . 'menu.tpl.php';
             if (is_array($include_menu)) {
                 $menu = addons::getinstance()->Parse_Menu($include_menu);
             } else {
                 $menu = addons::getinstance()->Parse_Menu(tpl_menu::DefaultMenu());
             }
             $this->ShiftOutput(tpl_menu::Gen_Menu($menu));
         }
         if ($include_header) {
             include_once TEMPLATE_PATH . 'header.tpl.php';
             $this->ShiftOutput(tpl_header::Get_Header());
             tpl_header::messager($this->output, $_SESSION['messager']);
         }
     }
     output::_DoOutput($this->output);
 }