Beispiel #1
0
#!/usr/bin/php
<?php 
use fr\gilman\nj\client\models\Conf;
use fr\gilman\nj\common\admin\Log;
use fr\gilman\nj\common\bb\DbHandler;
error_reporting(E_ALL);
ini_set("display_errors", 1);
try {
    spl_autoload_register('autoload_client');
    Conf::initCommon(dirname(__FILE__) . '/common.ini');
    Conf::initPath(dirname(__FILE__) . '/path.ini');
    require_once Conf::common()['path']['commonClasses'] . '/inc.php';
    DbHandler::connect(Conf::common()['DB']['HOST'], Conf::common()['DB']['DB'], Conf::common()['DB']['USER'], Conf::common()['DB']['PASS']);
    Log::getInstance()->setPath(Conf::path()['logs']['path']);
    Log::getInstance()->setDebugPath(Conf::path()['logs']['debugPath']);
    Log::getInstance()->setDebugMode(Conf::path()['logs']['debug']);
    //DbHandler::update('TRUNCATE qg;');
    //DbHandler::update('TRUNCATE traj;');
    //DbHandler::update('TRUNCATE unite;');
    //DbHandler::insert("INSERT INTO nj.qg (idJoueur, idHexa, nom, capop, xp, niveau, idTypeMission, idTypeQg, idCibleMission) VALUES (2, 844, 'id 1', 100, 0, 1, 1, 1, 2);");
    //DbHandler::insert("INSERT INTO nj.qg (idJoueur, idHexa, nom, capop, xp, niveau, idTypeMission, idTypeQg, idCibleMission) VALUES (6, 876, 'id 2', 100, 0, 1, 1, 1, 0);");
    //DbHandler::insert("INSERT INTO nj.qg (idJoueur, idHexa, nom, capop, xp, niveau, idTypeMission, idTypeQg, idCibleMission) VALUES (2, 875, 'id 3', 100, 0, 1, 3, 1, 0);");
    //DbHandler::insert("INSERT INTO nj.unite (idQg, idType, nom, xp, moral, idHexaConstruit, enConstruction, idQgTransfert) VALUES (1, 1, 'Infanterie I', 0, 100, 0, 0, 0);");
    //DbHandler::insert("INSERT INTO nj.unite (idQg, idType, nom, xp, moral, idHexaConstruit, enConstruction, idQgTransfert) VALUES (2, 1, 'Infanterie I', 0, 100, 0, 0, 0);");
    //DbHandler::insert("INSERT INTO nj.unite (idQg, idType, nom, xp, moral, idHexaConstruit, enConstruction, idQgTransfert) VALUES (3, 1, 'Infanterie I', 0, 100, 0, 0, 0);");
    //DbHandler::insert("INSERT INTO nj.traj(idQg, idHexa, ordre) VALUES(1,875,1);");
    //DbHandler::insert("INSERT INTO nj.traj(idQg, idHexa, ordre) VALUES(2,875,1);");
    \fr\gilman\nj\common\bb\business\PartieBusiness::getById(2)->nouveauTour();
} catch (Exception $e) {
    echo utf8_decode($e->getMessage()) . "\n" . $e->getTraceAsString();
}