示例#1
0
 public function __construct()
 {
     parent::__construct();
     $lng = language::getinstance()->GetLngBlock('dataengine');
     $this->CronPattern = $lng['wormholes_cron'];
     $this->lastrun = DataEngine::config_key('wormhole_cleaning', 'lastrun');
 }
示例#2
0
 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . 'pillage.php';
     $this->ress = DataEngine::a_ressources();
     $this->lng = language::getinstance()->GetLngBlock('pillage');
     parent::__construct();
 }
示例#3
0
 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . 'Membre.php';
     $this->lng = language::getinstance()->GetLngBlock('membre');
     parent::__construct();
     $this->page_title = $this->lng['page_title'];
 }
示例#4
0
 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . "Carte.php";
     $this->map = map::getinstance();
     $this->lng = language::getinstance()->GetLngBlock('carte');
     parent::__construct();
 }
 public function GetCustomPerms()
 {
     $lng = language::getinstance()->GetLngBlock(LNG_CODE, SCANNER_PATH);
     $value = array();
     $value[1000] = $lng['conf_perms'];
     $value['ADVANCED_SCANNER'] = $lng['conf_perms_global'];
     return $value;
 }
 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . 'cartographie.php';
     $this->BASE_GET = Get_string();
     $this->lng = language::getinstance()->GetLngBlock('cartographie');
     $this->SetheaderInput();
     parent::__construct();
 }
 public function __construct()
 {
     $this->lng = language::getinstance()->GetLngBlock('ownuniverse');
     foreach (DataEngine::a_ressources() as $v) {
         $this->ressourcesnames[$v['Field']] = $v['Nom'];
     }
     $this->BatimentsName = DataEngine::a_batiments();
     $this->parser = parser::getinstance();
 }
 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . 'Cartedetail.php';
     $this->lng = language::getinstance()->GetLngBlock('cartedetails');
     $this->bulle1 = bulle($this->lng['bulle1']);
     $this->bulle2 = bulle($this->lng['bulle2']);
     $this->lngtype = language::getinstance()->GetLngBlock('dataengine');
     $this->lngtype = $this->lngtype['types']['imgurl'];
     parent::__construct();
 }
示例#9
0
    public function __construct()
    {
        $this->BASE_FILE = ROOT_URL . "stats.php";
        $this->lng = language::getinstance()->GetLngBlock('stats');
        $this->lngtype = language::getinstance()->GetLngBlock('dataengine');
        $this->lngtype = $this->lngtype['types']['dropdown'];
        parent::__construct();
        $this->total = array_fill(-1, 8, 0);
        $actived_pts = isset($_GET['act']) ? 'titre' : 'header link';
        $actived_de = !isset($_GET['act']) ? 'titre' : 'header link';
        $out = <<<h
        <br/>
<table class="table_center table_nospacing" width="900px">
<tr class="spacing_header">
<td class="color_{$actived_de} text_center" width="450px" OnClick="location.href='{$this->BASE_FILE}';">{$this->lng['eude_stats']}</td>
<td class="color_{$actived_pts} text_center spacing_row" width="450px" OnClick="location.href='{$this->BASE_FILE}?act=pts';">{$this->lng['pts_stats']}</td></tr>
<tr><td colspan="2">
h;
        $this->PushOutput($out);
    }
示例#10
0
    public function __construct()
    {
        $this->BASE_FILE = ROOT_URL . 'EAdmin.php';
        $this->lng = language::getinstance()->GetLngBlock('admin');
        parent::__construct();
        $out = <<<o
   <style>
       /* Redéfinition du style de base */
address, a:link, a:active, a:visited {
    color: blue;
    text-decoration: none;
}
a:hover {
    color: darkorange;
}
   </style>
   <br/>
o;
        $this->PushOutput($out);
    }
示例#11
0
 /**
  * @return troops
  */
 public static function getinstance()
 {
     if (!self::$instance) {
         self::$instance = new self();
         self::$instance->lng = language::getinstance()->GetLngBlock('pillage');
     }
     return self::$instance;
 }
示例#12
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 )
 *
 **/
if (!SCRIPT_IN) {
    die('Need by included');
}
$validsession = false;
// false=nul, true=Ok, -1=Err?
$login_msg = '';
// Message en cas d'erreur.
$lng = language::getinstance()->GetLngBlock('login');
if (NO_SESSIONS) {
    $login = sqlesc(mb_strtolower($_POST['user'], 'utf8'), false);
    $mdp = $_POST['pass'];
    $query = 'SELECT LOWER(u.`Login`) as `Login`, u.`Permission`, m.`carte_prefs` from `SQL_PREFIX_Users` u, `SQL_PREFIX_Membres` m WHERE LOWER(u.`Login`)=LOWER(\'' . $login . '\') AND u.`Password`=\'' . $mdp . '\' AND (m.`Joueur`=LOWER(\'' . $login . '\'))';
    $mysql_result = DataEngine::sql($query);
    $ligne = mysql_fetch_assoc($mysql_result);
    if (is_array($ligne) && $ligne['Login'] == $login) {
        // session valide
        $validsession = true;
        $_SESSION['_login'] = $login;
        $_SESSION['_pass'] = $mdp;
        $_SESSION['_Perm'] = $ligne['Permission'];
        $_SESSION['carte_prefs'] = $ligne['carte_prefs'];
        $_SESSION['_IP'] = Get_IP();
        $_SESSION['_permkey'] = sha1($mdp . $_SESSION['_IP']);
示例#13
0
    public function __construct()
    {
        if (isset($_SESSION['carte_prefs']) && $_SESSION['carte_prefs'] != '') {
            $this->load_prefs($_SESSION['carte_prefs']);
        } else {
            $this->load_prefs('1;1;1;1;0;600;1;1;1');
        }
        $this->parcours = '';
        if (IS_IMG) {
            //            $this->inactif		= $_SESSION['inactif'];
            $this->IN = $_SESSION['IN'];
            $this->OUT = $_SESSION['OUT'];
            $this->loadfleet = isset($_SESSION['loadfleet']) ? $_SESSION['loadfleet'] : '';
            $this->parcours = $_SESSION['parcours'];
        } else {
            if (isset($_POST['coorin'])) {
                $this->IN = intval($_POST['coorin']);
            } else {
                $this->IN = 0;
            }
            if (isset($_POST['coorout'])) {
                $this->OUT = intval($_POST['coorout']);
            } else {
                $this->OUT = 0;
            }
            if ($this->IN < 1 || $this->IN > 10000) {
                $this->IN = '';
            }
            if ($this->OUT < 1 || $this->OUT > 10000) {
                $this->OUT = '';
            }
            $this->loadfleet = (isset($_REQUEST['loadfleet']) and intval($_REQUEST['loadfleet']) > 0) ? intval($_REQUEST['loadfleet']) : 0;
            $this->method = (isset($_REQUEST['method']) and intval($_REQUEST['method']) > 0) ? intval($_REQUEST['method']) : 2;
            //            $this->inactif		= ( isset($_POST['inactif']) 	&& $_POST['inactif'] > 0 ) 	? true: false;
            $this->nointrass = isset($_POST['nointrass']) && $_POST['nointrass'] > 0 ? true : false;
            $this->update_session();
            FB::warn($this->method, 'method');
        }
        // mise en variable, plus rapide que 36 call function
        if (($this->empire = trim(DataEngine::config_key('config', 'MyEmpire'))) == '') {
            $mysql_result = DataEngine::sql('Select g.`Grade` from
		`SQL_PREFIX_Membres` as m, `SQL_PREFIX_Grade` as g WHERE
		`Joueur`=\'' . sqlesc($_SESSION['_login']) . '\' AND (m.`Grade`=g.`GradeId`)');
            $ligne = mysql_fetch_assoc($mysql_result);
            $grade = $ligne['Grade'];
            $this->empire = $ligne['Grade'];
        }
        $this->cxx_empires = Members::CheckPerms('CARTE_SHOWEMPIRE');
        $this->lng = language::getinstance()->GetLngBlock('carte');
        $this->itineraire = $this->IN != '' && $this->OUT != '' && $this->IN != $this->OUT;
    }
 public static function NoPermsAndDie()
 {
     $lng = language::getinstance()->GetLngBlock('dataengine');
     DataEngine::ErrorAndDie($lng['nopermsanddie']);
 }
示例#15
0
<?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 )
 * 
 **/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
require_once CLASS_PATH . 'parser.class.php';
Members::CheckPermsOrDie('PERSO');
$lng = language::getinstance()->GetLngBlock('personal');
if (isset($_POST['importation'])) {
    //    $data = file_get_contents('./test/data/mafiche_ff.txt');
    $data = gpc_esc($_POST['importation']);
    $parser = parser::getinstance();
    // simple détection...
    if (p_stripos($parser->GetValueByLabel($data, $lng['ident']), $_SESSION['_login'], 0) !== false) {
        $matrix = explode("\n", trim($data));
        $info = array();
        $info['GameGrade'] = trim($matrix[0]);
        $info['Race'] = $parser->GetValueByLabel($data, $lng['Race']);
        $info['Titre'] = $parser->GetValueByLabel($data, $lng['Titre']);
        $info['Commerce'] = $parser->GetValueByLabel($data, $lng['Commerce']);
        $info['Recherche'] = $parser->GetValueByLabel($data, $lng['Recherche']);
        $info['Combat'] = $parser->GetValueByLabel($data, $lng['Combat']);
        $info['Construction'] = $parser->GetValueByLabel($data, $lng['Construction']);
        $info['Economie'] = $parser->GetValueByLabel($data, $lng['Economie']);
        $info['Navigation'] = $parser->GetValueByLabel($data, $lng['Navigation']);
示例#16
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 )
 *
 **/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
require_once CLASS_PATH . 'ownuniverse.class.php';
require_once CLASS_PATH . 'parser.class.php';
require_once TEMPLATE_PATH . 'ownuniverse.tpl.php';
Members::CheckPermsOrDie('PERSO_OWNUNIVERSE');
$ownuniverse = ownuniverse::getinstance();
$lng = language::getinstance()->GetLngBlock('ownuniverse');
// initialisation des variables
$info = $warn = '';
if (isset($_GET['reset']) && $_GET['reset'] == $_SESSION['_permkey']) {
    DataEngine::sql('DELETE FROM `SQL_PREFIX_ownuniverse` WHERE `UTILISATEUR` = \'' . $_SESSION['_login'] . '\' LIMIT 1');
    output::Boink('%ROOT_URL%ownuniverse.php');
}
if ($_GET['showuser'] != '' && Members::CheckPerms('PERSO_OWNUNIVERSE_READONLY')) {
    $player = gpc_esc($_GET['showuser']);
    $include_form = false;
} else {
    $player = false;
    $include_form = true;
}
if (isset($_POST['importation'])) {
    $cleandata = $ownuniverse->get_universe(false);
示例#17
0
<?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 )
 *
 * */
define('USE_AJAX', true);
require_once '../init.php';
require_once INCLUDE_PATH . 'Script.php';
if (!Members::CheckPerms('CARTE_SEARCH')) {
    $msg = language::getinstance()->GetLngBlock('dateengine');
    $msg = $msg['nopermsanddie'];
    $out = <<<o
<carte>
    <script>
    Carte.DetailsShow(false);
    alert('{$msg}');
    </script>
</carte>
o;
    output::_DoOutput($out);
}
// Partie recherche
$_SESSION['emp'] = $_POST['s'] != '' && $_POST['type'] == 'emp' ? stripslashes($_POST['s']) : '';
$_SESSION['jou'] = $_POST['s'] != '' && $_POST['type'] == 'jou' ? stripslashes($_POST['s']) : '';
$_SESSION['inf'] = $_POST['s'] != '' && $_POST['type'] == 'inf' ? stripslashes($_POST['s']) : '';
$search = '';
$typeeval = 'return false;';
示例#18
0
 * @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 )
 *
 * @since 1.4.2
 *
 * */
define('NO_SESSIONS', true);
// mode login/pass a chaque requêtes...
define('USE_AJAX', true);
// mode xml
//define('CHECK_LOGIN',false);
require_once '../init.php';
require_once INCLUDE_PATH . 'Script.php';
require_once CLASS_PATH . 'parser.class.php';
require_once CLASS_PATH . 'cartographie.class.php';
$lng = language::getinstance()->GetLngBlock('eude');
if (!Members::CheckPerms('CARTOGRAPHIE_GREASE')) {
    header('HTTP/1.1 403 Forbidden');
    output::_DoOutput('<eude><alert>' . $lng['err_403'] . '</alert><GM_active>0</GM_active></eude>');
}
$serveur = DataEngine::config_key('config', 'eude_srv');
if ($serveur != '' && $serveur != $_POST['svr']) {
    header('HTTP/1.1 403 Forbidden');
    output::_DoOutput("<eude><alert>{$lng['err_wrongserver']}</alert><GM_active>0</GM_active></eude>");
}
$xml = array();
$carto = cartographie::getinstance();
switch ($_GET['act']) {
    case 'init':
        //-------------------------------------------------------------
        $xml['GM_galaxy_info'] = Members::CheckPerms('CARTOGRAPHIE_PLAYERS') ? '1' : '0';
示例#19
0
            $_GET['sort'][$v] = '';
        }
    }
    $newvalue = array('sort' => array($v => $invert_sort[$_GET['sort'][$v]]));
    $tpl->AddToRow(Get_string($newvalue), 'sort_' . $v);
}
$tpl->PushRow();
$sql = <<<sql
SELECT udate, c.`ID`, c.`TYPE`, c.`POSIN`, c.`POSOUT`, c.`COORDET`, c.`COORDETOUT`, j.`USER`, j.`EMPIRE`, j.`INFOS`, c.`NOTE`, p.`water`,
\tj.`batiments`, j.`troop`, j.`troop_date`, c.`UTILISATEUR`, p.`pID`, p.`Titane`, p.`Cuivre`, p.`Fer`, p.`Aluminium`, p.`Mercure`, p.`Silicium`, p.`Uranium`, p.`Krypton`,
\tp.`Azote`, p.`Hydrogene` from `SQL_PREFIX_Coordonnee` c
left outer join `SQL_PREFIX_Coordonnee_Joueurs` j on (c.`ID`=j.`jID`)
left outer join `SQL_PREFIX_Coordonnee_Planetes` p on (c.`ID`=p.`pID`) {$where}{$sort}{$limit}
sql;
$mysql_result = DataEngine::sql($sql);
$lngmain = language::getinstance()->GetLngBlock('dataengine');
$a_Ress = DataEngine::a_ressources();
$stype = $lngmain['types']['string'];
$i = 0;
$cmdinput = '<input class="color_row%%rowA%%" type="checkbox" value="1" id="item[%%id%%][%%cmd%%]" name="item[%%id%%][%%cmd%%]" %%bulle%%/>';
while ($ligne = mysql_fetch_assoc($mysql_result)) {
    $coords = $ligne['POSIN'] . '-' . $ligne['COORDET'];
    switch ($ligne['TYPE']) {
        case 1:
            $coords = $ligne['POSIN'] . '-' . $ligne['COORDET'] . '<br/>' . $ligne['POSOUT'] . '-' . $ligne['COORDETOUT'];
        case 6:
            $tpl->SetRowModelTypeC();
            break;
        case 2:
        case 4:
            $tpl->SetRowModelTypeA();
示例#20
0
 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . 'register.php';
     $this->lng = language::getinstance()->GetLngBlock('login');
     parent::__construct();
 }
示例#21
0
<?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 )
 *
 **/
require_once './init.php';
require_once INCLUDE_PATH . 'Script.php';
Members::CheckPermsOrDie('PERSO_TROOPS_BATTLE');
require_once TEMPLATE_PATH . 'troops.tpl.php';
$tpl = tpl_troops::getinstance();
$lng = language::getinstance()->GetLngBlock('pillage');
$_GET['player'] = str_replace('%', '', $_GET['player']);
if ($_GET['player'] != '') {
    $player = gpc_esc($_GET['player']);
} else {
    $player = $_SESSION['_login'];
}
$sql = sqlesc($player);
$sql = <<<sql
  SELECT  ta.`ID`, ta.`type`, ta.`players_attack`, ta.`players_defender`, ta.`players_pertes`, ta.`when`, ta.`coords_ss`, ta.`coords_3p`, tp.`mid`, tp.`Player`, tp.`ress0`, tp.`ress1`, tp.`ress2`, tp.`ress3`, tp.`ress4`, tp.`ress5`, tp.`ress6`, tp.`ress7`, tp.`ress8`, tp.`ress9`, tp.`date` FROM `SQL_PREFIX_troops_attack` ta
  LEFT JOIN `SQL_PREFIX_troops_pillage` tp on (tp.`mid`=ta.`id`)
   WHERE `players_attack` LIKE '%"{$sql}"%' OR `players_defender` LIKE '%"{$sql}"%'
  ORDER BY `when` DESC LIMIT 0,30

sql;
$result = DataEngine::sql($sql);
$tpl->Setheader();
示例#22
0
 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . "Recherche.php";
     $this->lng = language::getinstance()->GetLngBlock('recherche');
     parent::__construct();
 }
 public function __construct()
 {
     $this->reset();
     $this->lng = language::getinstance()->GetLngBlock('cartographie');
     $this->lngmain = language::getinstance()->GetLngBlock('dataengine');
     $this->allys = DataEngine::config('EmpireAllys');
     $this->wars = DataEngine::config('EmpireEnnemy');
     if (!is_array($this->allys) && $this->allys != '') {
         $this->allys = array($this->allys);
     }
     if (!is_array($this->wars) && $this->wars != '') {
         $this->wars = array($this->wars);
     }
     if (!is_array($this->allys) && $this->allys == '') {
         $this->allys = array();
     }
     if (!is_array($this->wars) && $this->wars == '') {
         $this->wars = array();
     }
     if (is_array($this->allys)) {
         $this->allys = parser::getinstance()->cleaning_array($this->allys);
     }
     if (is_array($this->wars)) {
         $this->wars = parser::getinstance()->cleaning_array($this->wars);
     }
     $this->detelespooler = array();
 }
示例#24
0
 public function __construct()
 {
     $this->BASE_FILE = ROOT_URL . 'Mafiche.php';
     $this->lng = language::getinstance()->GetLngBlock('personal');
     parent::__construct();
 }