Ejemplo n.º 1
0
/**
 * Authentifie le numéro de troll et un mot de pas hashé contre la base de donnée, et positionne les variables de
 * session en conséquence.
 * @return true si l'authentification a réussie
 * @return false si elle a échouée (mot de passe incorrecte ou troll inexistant)
 */
function userLogin($numTroll, $md5pass)
{
    global $db_vue_rm;
    // On regarde si le troll existe dans la base de données
    $sql = "SELECT pass_outils_troll, guilde_troll, nom_troll";
    $sql .= " FROM trolls WHERE id_troll={$numTroll}";
    $result = mysql_query($sql, $db_vue_rm);
    if ($result == false) {
        return false;
    }
    list($DBmd5pass, $DBAuthGuilde, $DBNomTroll) = mysql_fetch_array($result);
    if (mysql_affected_rows() > 0 && $DBmd5pass != "" && $DBmd5pass == $md5pass) {
        $_SESSION['AuthTroll'] = $numTroll;
        $_SESSION['Auth'] = $md5pass;
        $_SESSION['AuthGuilde'] = $DBAuthGuilde;
        $_SESSION['AuthNomTroll'] = $DBNomTroll;
        if (userIsGuilde() || userIsGroupSpec()) {
            // Controle de l'administrateur
            // Remplis la variable de session
            if (isDbAdministration()) {
                $_SESSION['admin'] = "authenticated";
            } else {
                $_SESSION['admin'] = "notauthorized";
            }
            $_SESSION['Status'] = "authentified";
            setcookie("cookie_id_troll", $_SESSION['AuthTroll'], time() + 31536000);
            // on garde le cookie 1 an
            enregistre_connection($_SESSION['AuthTroll']);
            return true;
        }
    }
    return false;
}
Ejemplo n.º 2
0
function init_bug($bug)
{
    // Si l'on vient de remplir le formulaire d'ajout ou d"édition
    // d'un bug, on met à jour la bdd
    if ($bug == "edit" && userIsGuilde()) {
        editDbBug();
        // editDbBug ne prend pas de parametre
        // Suppression d'un bug
    } elseif (is_numeric($bug) && $_REQUEST[action] == "del" && userIsGuilde()) {
        deleteDbBug($bug);
    }
    // On affiche le formulaire si l'on connait l'id du bug
    // ou que l'on veut en créer un nouveau
    if (is_numeric($bug) || $bug == "new") {
        afficher_titre_tableau("Bug Track des outils " . RELAISMAGO, "");
        afficherFicheBug($bug);
        // Sinon, on affiche la liste des bugs
    } else {
        $text = "<i>Vous venez de découvrir un dysfonctionnement dans les outils, ou vous voulez voir ";
        $text .= "une nouvelle fonctionnalité apparaître ? Cet outil est pour vous !</i><br><br>";
        if (userIsGuilde()) {
            $text .= "<input type='button' class='mh_form_submit' ";
            $text .= "onClick=\"Javascript:document.location.href='bugs.php?bug=new'\" value=\"Ajouter un bug ou une demande d'amélioration\">";
        } else {
            $text .= "L'ajout de Bug ou Souhait est uniquement accessible par les " . RELAISMAGO . " authentifiés pour l'instant.<br>";
        }
        afficher_titre_tableau("Bug Track " . RELAISMAGO . " : Les Bugs ou Souhaits dans les outils", $text);
        afficherListeBugs();
    }
}
Ejemplo n.º 3
0
function affiche_formulaire()
{
    ?>
  <table class='mh_tdborder' width='60%' align="center">
   <tr><td>
     <table width='100%' cellspacing='0'>
       <tr class='mh_tdtitre' align="center">
         <td>
						<img src='/images/titre-vue.gif'>
	         </td>
       </tr>
     </table>
		</td></tr>
	</table><br>
	<form name="select_troll" action="get_vue.php" method="POST">

  <table class='mh_tdborder' width='70%' align="center">
   <tr class='mh_tdtitre' >
	 		<td align='center'>
					Cliquez sur la fenêtre de vue, de MH, pressez CTRL + A, pour tout selectionner,<br>
					Pressez CTRL + C pour tout copier,<br>
					cliquez dans la petite zone de texte (ci dessous), et pressez sur CTRL + V pour tout coller.<br>
         </td>
   </tr>
   <tr class='mh_tdpage'>
	 	<td width='100%' align="center">

	<?php 
    // Un RM peut choisir de mettre à jour la vue de quelqu'un d'autre en cas de TS
    if (userIsGuilde()) {
        echo "<p><b>Selectionnez-bien votre numéro de TROLL !</b><br>";
        echo "Numéro du troll : <input type=text name='id_troll' size=6 value='" . $_SESSION["AuthTroll"] . "'>";
        echo "<br>La base de données des Relais&Mago va être mise à jour avec la vue.";
    } else {
        echo "<p><b>Si vous avez une vue importante, vous pouvez la limiter en renseignant la taille.</b><br> <br>";
        echo "Taille de la vue : <input type='textbox' name='taille_vue_publique' size='3' maxlength='3'> cavernes.<br><br>";
        echo "<p><b>Également, si votre vue est importante, vous pouvez limiter la taille en PA du trollometer.<br>";
        echo " Le Trollometer résume les éléments vus sur la vue2d en dessous de celle-ci.</b><br> <br>";
        echo "Taille du Trollometer : <input type='textbox' name='max_pa_publique' size='3' maxlength='3'> Pa";
        echo "<input type='hidden' name='TROLL' value='" . session_id() . "'>";
    }
    ?>
	<br><br>
	<input type=submit name="Submit" value="[Uploader] - la vue du troll" class='mh_form_submit' ><br><br>
	<textarea name="datas" rows=10 cols=80></textarea>
	<br>
	</td></tr>
	</table>
	</form>

	<?php 
    include 'foot.php';
}
Ejemplo n.º 4
0
function addItemMenu($rm_only, $is_parent, $pos, $name, $tip, $link = "", $target = "")
{
    $flag = true;
    if ($rm_only) {
        if (userIsGuilde() || userIsGroupSpec()) {
            $flag = false;
        }
    } else {
        $flag = false;
    }
    if (!$flag) {
        if (!$is_parent) {
            echo "menu.addSubItem('{$pos}','{$name}','{$tip}','{$link}','{$target}');";
            //echo "menu.addSubItem('$pos','$name','$tip','$link','$target');";
            //echo "ssmItems[$pos]=[\"$name\", \"$link\", \"$target\", \"$colspan\", \"$endrow\"];";
            //	$pos++;
        } else {
            //echo "menu.addItem('$pos', '$name', '$tip',  null, null);";
            echo "menu.addItem('{$pos}', '{$name}', '{$tip}',  null, null);";
        }
    }
    return $pos;
}
Ejemplo n.º 5
0
function TestSecurite()
{
    require "conf.php";
    // CONNEXION MYSQL
    $db_link = @mysql_connect($serveur, $user, $password);
    if (!$db_link) {
        echo "Connexion impossible à la base de données <b>{$sql_bdd}</b> sur le serveur <b>{$sql_server}</b><br>Vérifiez les paramètres du fichier conf.php3";
        exit;
    }
    mysql_select_db($bdd);
    if ($_SESSION['AuthTroll'] > 0 && userIsGuilde() || $_SESSION['AuthTroll'] > 0 && userIsGroupSpec()) {
        //Le troll est connecté chez R&M
        $sql = "select id_troll from ggc_troll where id_troll='{$_SESSION['AuthTroll']}'";
        $result = mysql_query($sql, $db_link);
        echo mysql_error();
        list($nb) = mysql_fetch_array($result);
        if ($nb > 0) {
            //Le troll est inscrit c'est bon
            $id_troll = $_SESSION[AuthTroll];
            return $id_troll;
        } else {
            //Le troll n'est pas inscrit au GGC-> vers page d'inscription
            echo "<script language='JavaScript'>";
            echo "document.location.href='inscription.php'";
            echo "</script>";
            exit;
        }
        mysql_free_result($requete);
    } else {
        //Le troll n'est pas connecté R&M
        echo "<script language='JavaScript'>";
        echo "document.location.href='erreur.php'";
        echo "</script>";
        exit;
    }
}
Ejemplo n.º 6
0
<?php

include_once "functions_auth.php";
include_once "functions_display.php";
include_once "gps_advanced_functions.php";
?>
<html>
<head>
<script type="text/javascript" src="/js/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
<script type="text/javascript" src="/js/overlib_exclusive.js"><!-- overLIB (c) Erik Bosrup --></script>
<?php 
if (userIsGuilde()) {
    ?>
<link rel='stylesheet' href='/css/news.css' type='text/css'>
<?php 
}
?>
</head>
<body>
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<div class=popperlink id=topdecklink style='z-index:1000;'></div>
<script language="javascript" src="vue.js" type="text/javascript">
</script>

<?php 
$x = $_REQUEST[x];
$y = $_REQUEST[y];
$vue = $_REQUEST[vue];
$taille_map = $_REQUEST[taille_map];
$quadrillage = $_REQUEST[quadrillage];
$repere = $_REQUEST[repere];
Ejemplo n.º 7
0
<?php

include_once "../functions_auth.php";
include_once "../admin_functions_db.php";
include_once "firemago_functions.php";
if (userIsGuilde() || userIsGroupSpec()) {
    $vue = $_REQUEST["Vue"];
    $X = $_REQUEST["X"];
    $Y = $_REQUEST["Y"];
    $N = $_REQUEST["N"];
    echo "try { \n";
    echo "\n\t\t\t\tfunction piege(){\n\t\t\t\t\t\n\t\t\t\t\t\$('.fm_piege').each(function(index) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\$(this).css('background-color',colorUrg);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( \$(this).css('display') == 'none' )\n\t\t\t\t\t\t\t\$(this).show();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\$(this).hide();\n\t\t\t\t\t\t\n\t\t\t\t\t});\t\n\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\t\n\t\t\t";
    echo "var anchorPlace = \$('html>body>table>tbody>tr:eq(1)>td>table>tbody>tr>td:eq(1)>p>table:eq(4)>tbody>tr:eq(1)');";
    $sql = "SELECT * FROM ggc_piege WHERE abs(X-" . intval($X) . ") < 6  AND abs(Y-" . intval($Y) . ") < 6 AND abs(N-" . intval($N) . ") < 6;";
    $pieges = mysql_query($sql, $db_vue_rm);
    if (mysql_error()) {
        echo "alert('" . mysql_error() . "');";
    }
    if (mysql_num_rows($pieges) > 0) {
        while ($piege = mysql_fetch_assoc($pieges)) {
            $dist = getDist($X, $Y, $N, $piege["X"], $piege["Y"], $piege["N"]);
            echo "anchorPlace.after('<tr style=\"background-color:red;\"><td width=\"75\">" . $dist . "</td><td>Piège à " . $piege["type"] . "</td><td>" . addslashes($piege["date"] . " " . $piege["texte"]) . "</td><td align=\"center\">" . $piege["X"] . "</td><td align=\"center\">" . $piege["Y"] . "</td><td align=\"center\">" . $piege["N"] . "</td></tr>');";
            if ($dist < 2) {
                echo "\n\t\t\t\t\t\t\t\tif ( \$('#table_piege').length == 0 )\n\t\t\t\t\t\t\t\t\t\$('html>body>table>tbody>tr:eq(1)>td>table>tbody>tr>td:eq(1)>p>table:eq(0)').before('<table id=\"table_piege\" class=\"mh_tdborder\" width=\"50%\"><tr style=\"background-color:red;\" onClick=\"piege();\" onMouseOver=\"this.style.cursor = \\'pointer\\';\"<td align=\"center\" colspan=\"6\">ATTENTION => Pièges à une cases de votre Troll !</td></tr></table><br/>');\n\t\t\t\t\t\t\t ";
                echo "\$(\"#table_piege\").append('<tr class=\"fm_piege\" style=\"display:none\" align=\"center\"><td>Dist : " . $dist . "</td><td>Type : " . $piege["type"] . "</td><td>" . addslashes($piege["date"] . " " . $piege["texte"]) . "</td><td>X:" . $piege["X"] . "</td><td>Y:" . $piege["Y"] . "</td><td>N" . $piege["N"] . "</td></tr>');";
            }
        }
    }
    echo "} catch ( e ) { error ( e, 'Piege error' ); } \n";
}
Ejemplo n.º 8
0
<?php

if (!userIsGuilde()) {
    die("<h1><font color=black><b>Vous n'avez pas accès à cette page !</b></font></h1>");
}
Ejemplo n.º 9
0
function afficherAccesRapide()
{
    $fiche = "<a href='/engine_view.php?troll=" . $_SESSION['AuthTroll'] . "' title='Accès direct à ma fiche RG'>[Ma fiche RG]</a> ";
    if (!preg_match("/cockpit.php/", $_SERVER['REQUEST_URI'])) {
        $fiche .= "<a href='/cockpit.php?id_troll=" . $_SESSION['AuthTroll'] . "' title='Accès direct à ma vue2D'>[Ma Vue]</a> ";
    } else {
        $fiche .= "<a href='#' onClick='document.form_cockpit.id_troll.value=" . $_SESSION[AuthTroll] . ";get_map();'title='Accès direct à ma vue2D'>[Ma Vue]</a> ";
    }
    $lesGowaps = selectDbGowaps("", $_SESSION['AuthTroll']);
    $nbGowaps = count($lesGowaps);
    if ($nbGowaps > 0) {
        $text = "<b>Mes Gowaps</b><br><br>";
        for ($i = 1; $i <= $nbGowaps; $i++) {
            $res = $lesGowaps[$i];
            $id_gowap = $res['id_gowap'];
            $text .= "Gowap {$id_gowap}";
            $titre = "X={$res['x_monstre']}, Y={$res['y_monstre']}, Z={$res['z_monstre']}<br>";
            $titre .= "vu : {$res['is_seen_monstre']} (" . date("d/m/y H:i", $res['date_monstre']) . ")";
            $text .= afficherLien('gowap', 'fiche', $res['id_gowap'], "", "", "", "", false);
            $text .= afficherLien('gowap', 'vue2d', $res['id_gowap'], $res['x_monstre'], $res['y_monstre'], $res['z_monstre'], "", false);
            $text .= afficherLien('gowap', 'gps', $res['id_gowap'], $res['x_monstre'], $res['y_monstre'], $res['z_monstre'], "", false);
            $text .= afficherLien('gowap', 'mh_evenements', $res['id_gowap'], "", "", "", "", false);
            $text .= "<br>" . $titre;
            $text .= "<br><br>";
        }
        $html_gowap = "<td onmouseover=\"return overlib('{$text}',CAPTION,'Clique pour fixer la popup!');\"";
        $html_gowap .= " onclick=\"return overlib('{$text}', STICKY, CAPTION, 'Accès Rapide', CLOSECLICK, EXCLUSIVE);\" ";
        $html_gowap .= " onmouseout=\"return nd();\">Mes Gowaps</td>";
    }
    if (!isset($html_gowap)) {
        $html_gowap = "";
    }
    $lesTanieres = selectDbTanieres("", $_SESSION['AuthTroll']);
    $nbTanieres = count($lesTanieres);
    $html_taniere = "";
    if ($nbTanieres > 0) {
        $text = "<b>Mes Tanières</b><br><br>";
        for ($i = 1; $i <= $nbTanieres; $i++) {
            $res = $lesTanieres[$i];
            $id_taniere = $res['id_taniere'];
            $text .= "Tanière {$id_taniere}";
            $text .= afficherLien('taniere', 'fiche', $res['id_taniere'], "", "", "", "", false);
            $text .= afficherLien('taniere', 'vue2d', $res['id_taniere'], $res['x_lieu'], $res['y_lieu'], $res['z_lieu'], "", false);
            $text .= afficherLien('taniere', 'gps', $res['id_taniere'], $res['x_lieu'], $res['y_lieu'], $res['z_lieu'], "", false);
            $text .= afficherLien('taniere', 'mh_profil', $res['id_taniere'], "", "", "", "", false);
            $text .= "<br>X={$res['x_lieu']}, Y={$res['y_lieu']}, Z={$res['z_lieu']}";
            $text .= "<br><br>";
        }
        $html_taniere .= "<td onmouseover=\"return overlib('{$text}',CAPTION,'Clique pour fixer la popup!');\"";
        $html_taniere .= " onclick=\"return overlib('{$text}', STICKY, CAPTION, 'Accès Rapide', CLOSECLICK, EXCLUSIVE);\" ";
        $html_taniere .= " onmouseout=\"return nd();\">Mes Tanières</td>";
    }
    $lesGt = selectDbTanieres("", "", true);
    $nbTanieres = count($lesGt);
    $html_gt = "";
    if ($nbTanieres > 0 && userIsGuilde()) {
        $text = "<b>Les Grandes Tanières Relais&Mago</b><br><br>";
        for ($i = 1; $i <= $nbTanieres; $i++) {
            $res = $lesGt[$i];
            $id_taniere = $res['id_taniere'];
            $nom_lieu = $res['nom_lieu'] . " ";
            $text .= addslashes($nom_lieu);
            $text .= afficherLien('taniere', 'fiche', $res['id_taniere'], "", "", "", "", false);
            $text .= afficherLien('taniere', 'vue2d', $res['id_taniere'], $res['x_lieu'], $res['y_lieu'], $res['z_lieu'], "", false);
            $text .= afficherLien('taniere', 'gps', $res['id_taniere'], $res['x_lieu'], $res['y_lieu'], $res['z_lieu'], "", false);
            $text .= afficherLien('taniere', 'mh_profil', $res['id_taniere'], "", "", "", "", false);
            $text .= "<br>X={$res['x_lieu']}, Y={$res['y_lieu']}, Z={$res['z_lieu']}";
            $text .= "<br><br>";
        }
        $html_gt .= "<td onmouseover=\"return overlib('{$text}',CAPTION,'Clique pour fixer la popup!');\"";
        $html_gt .= " onclick=\"return overlib('{$text}', STICKY, CAPTION, 'Accès Rapide', CLOSECLICK, EXCLUSIVE);\" ";
        $html_gt .= " onmouseout=\"return nd();\">GT</td>";
    }
    ?>
	<table class='mh_tdborder'>
		<tr class='mh_tdpage'>
			<td nowrap>
				<?php 
    echo $fiche;
    ?>
	
			</td>
			<?php 
    echo $html_gowap;
    ?>
			<?php 
    echo $html_taniere;
    ?>
			<?php 
    echo $html_gt;
    ?>
		</tr>
	</table>
	<?php 
}
Ejemplo n.º 10
0
function initAuth()
{
    global $db_vue_rm;
    if (isset($_SERVER['REQUEST_URI'])) {
        $REQUEST_URI = $_SERVER['REQUEST_URI'];
    } else {
        $REQUEST_URI = "";
    }
    if (isset($_SERVER['HTTP_REFERER'])) {
        $HTTP_REFERER = $_SERVER['HTTP_REFERER'];
    } else {
        $HTTP_REFERER = "";
    }
    if (isset($_REQUEST['CHTROLL'])) {
        $CHTROLL = $_REQUEST['CHTROLL'];
    } else {
        $CHTROLL = "";
    }
    if (isset($_REQUEST['CHPASS'])) {
        $CHPASS = $_REQUEST['CHPASS'];
    } else {
        $CHPASS = "";
    }
    if (isset($_REQUEST['logout'])) {
        $logout = $_REQUEST['logout'];
    } else {
        $logout = "";
    }
    if (isset($_REQUEST['CHTROLL']) && isset($_REQUEST['CHPASS'])) {
        setcookie('autologin', $_REQUEST['autologin'], time() + 365 * 24 * 3600);
        if ($_REQUEST['autologin']) {
            setcookie('num_troll', $_REQUEST['CHTROLL'], time() + 365 * 24 * 3600);
            setcookie('hash_pass_troll', md5($_REQUEST['CHPASS']), time() + 365 * 24 * 3600);
        }
    }
    if (isset($_COOKIE['autologin'])) {
        $autologin = $_COOKIE['autologin'];
    } else {
        $autologin = false;
    }
    if ($autologin) {
        $CHTROLL = $_COOKIE['num_troll'];
        $CHPASS = $_COOKIE['hash_pass_troll'];
    }
    if ($HTTP_REFERER == "" || preg_match("/inc_authent/", $HTTP_REFERER)) {
        $GOTO = $REQUEST_URI;
    } else {
        $GOTO = $HTTP_REFERER;
    }
    if (!preg_match("/inc_authent/", $GOTO) && !preg_match("/index/", $GOTO)) {
        $_SESSION['uri'] = $GOTO;
    } else {
        $_SESSION['uri'] = "/cockpit.php";
    }
    # submit tout frais ?
    if ($CHTROLL > 0 || $CHPASS != "") {
        // Si le mot de passe n'est pas le mot de passe md5
        if (strlen($CHPASS) != 32) {
            // On se débarasse du pass en clair
            $CHPASS = md5($CHPASS);
        }
        $_SESSION['AuthTroll'] = $CHTROLL;
        $_SESSION['Auth'] = $CHPASS;
    }
    # demande de logout ?
    if ($logout) {
        $_SESSION['Status'] = "";
        $_SESSION['AuthTroll'] = "";
        $_SESSION['AuthNomTroll'] = "";
        $_SESSION['AuthGuilde'] = "";
        $_SESSION['Auth'] = "";
        $_SESSION['AuthGroupSpec'] = "";
        session_unset();
        session_destroy();
        setcookie('autologin', false);
        echo "<script language='JavaScript'>";
        echo "document.location.href='/index.php'";
        echo "</script>";
    }
    # Si la personne est déjà authentifiée
    if (isset($_SESSION['Status']) && $_SESSION['Status'] == "authentified") {
        return;
    }
    # Vérification normale
    if (is_numeric($CHTROLL) && $_SESSION['Status'] != "authentified") {
        $md5pass = "******";
        // Initialisation, mais çà sert pas à grand chose ici
        // On regarde si le troll existe dans la base de données
        $sql = "SELECT pass_outils_troll, guilde_troll, nom_troll, nom_rang_troll, groupe_spec_troll";
        $sql .= " FROM trolls WHERE id_troll={$CHTROLL}";
        $result = mysql_query($sql, $db_vue_rm);
        echo mysql_error();
        list($md5pass, $AuthGuilde, $AuthNomTroll, $nom_rang_troll, $groupe_spec_troll) = mysql_fetch_array($result);
        // S'il existe
        if (preg_match("/essai/", $nom_rang_troll)) {
            die("<h2>Vous êtes un troll à l'essai, vous n'avez pas accès aux outils pendant cette période<h2>");
        }
        if (mysql_affected_rows() > 0 && $md5pass != "") {
            // et que le mot de passe est correct
            if ($md5pass == $_SESSION['Auth']) {
                //$_SESSION[AuthTroll]=$_SESSION[AuthTroll]; // pour indiquer ici toutes les valeurs possibles de session
                $_SESSION['AuthGuilde'] = $AuthGuilde;
                $_SESSION['AuthNomTroll'] = $AuthNomTroll;
                $_SESSION['AuthGroupSpec'] = $groupe_spec_troll;
                //$_SESSION[Auth]=$_SESSION[Auth];
            } else {
                setcookie('autologin', false);
                die("<h2><font color='red'>Mot de passe incorrect</font></h2>");
            }
            // S'il n'existe pas dans la base de données
        } else {
            /* Premier connection du troll sur les outils */
            setcookie('autologin', false);
            echo "<script language='JavaScript'>";
            echo "document.location.href='/change_password.php'";
            echo "</script>";
            echo "2 - Si vous n'etes pas redirigé automatiquement, cliquez ici : ";
            echo "<a href='/change_password.php?act=premiere'> Là j'tai dis !! </a>";
        }
        if (userIsGuilde() || userIsGroupSpec()) {
            // Controle de l'administrateur
            // Remplis la variable de session
            if (isDbAdministration()) {
                $_SESSION['admin'] = "authenticated";
            } else {
                $_SESSION['admin'] = "notauthorized";
            }
            $_SESSION['Status'] = "authentified";
            setcookie("cookie_id_troll", $_SESSION['AuthTroll'], time() + 31536000);
            // on garde le cookie 1 an
            enregistre_connection($_SESSION['AuthTroll']);
            redirectAuth();
        } else {
            setcookie('autologin', false);
            session_unset();
            session_destroy();
            die("<h2>Soit vous n'êtes pas un Relais&Mago\n\t\t\t<br> soit le mot de passe est incorrect\n\t\t\t<br> soit c'est votre première connexion (réessayez)<br>\n\t\t\t<br><br>Conclusion : \n\t\t\t<br>Vous n'avez pas accès à ces pages<br>\n\t\t\tContactez glupglup (51166) pour résoudre le problème.<br><br>\n\t\t\t");
        }
    }
}
Ejemplo n.º 11
0
<?php

include_once "inc_connect.php";
include_once "functions_auth.php";
include_once "options_functions_db.php";
include_once "top.php";
if (!userIsGuilde() && !userIsGroupSpec()) {
    die("<h1><font color=black><b>Vous n'avez pas accès à cette page !</b></font></h1>");
}
init();
function init()
{
    affiche_titre_options();
    update_options($_REQUEST['upd']);
    affiche_liste_options();
}
function affiche_titre_options()
{
    ?>
	<table width='80%' cellspacing='0' class='mh_tdborder' align='center'>
		<tr class='mh_tdtitre' align="center">
			<td>
				<h2>Mes Options dans les outils <?php 
    echo RELAISMAGO;
    ?>
</h2>
			</td>
		</tr>
	</table><br>

	<?php 
Ejemplo n.º 12
0
include_once "inc_connect.php";
include_once "functions_auth.php";
include_once "functions.php";
//$auto = false;
$auto = $_REQUEST['auto'];
$refresh = $_REQUEST['refresh'];
if ($auto != "") {
    if (md5($auto) == MD5_PASS_EXTERNE) {
        if ($_REQUEST['state'] == "") {
            die('ERREUR STATE');
        }
    } else {
        die('Acces Refuse - seq_ref');
    }
}
if (userIsGuilde() || $auto != "" || userIsGroupSpec()) {
    $state = $_REQUEST['state'];
    $maj_troll_id = $_REQUEST['maj_troll_id'];
    $maj_x_troll = $_REQUEST['maj_x_troll'];
    $maj_y_troll = $_REQUEST['maj_y_troll'];
    $maj_z_troll = $_REQUEST['maj_z_troll'];
    if (!$auto) {
        initSequenceRefresh($state);
    }
    suiteSequenceRefresh($auto, $state, $maj_troll_id, $maj_x_troll, $maj_y_troll, $maj_z_troll, $refresh);
} else {
    die("Accès refusé");
}
function initSequenceRefresh($state)
{
    ?>
Ejemplo n.º 13
0
function afficheMenuBestiaire($niv, $fam)
{
    if ($niv != '') {
        $niv = "?Niv={$niv}";
    }
    if ($fam != '') {
        $fam = "?Famille={$fam}";
    }
    ?>
		<table class='mh_tdborder' width='60%'>
			<tr class='mh_tdpage'>
				<td align='center'><a href='bestiaire.php'>Bestiaire</a> </td>
				<?php 
    if (userIsGuilde()) {
        echo "<td align='center'><a href='cdm_parser.php'>Nouvelle CdM</a> </td>";
    }
    ?>
				<td align='center'><a href='allniv.php<?php 
    echo $niv;
    ?>
'>Monstres/Niveau</a> </td>
				<td align='center'><a href='allraces.php<?php 
    echo $fam;
    ?>
'>Races/Famille</a> </td>
			</tr>
		</table>
	<?php 
}
Ejemplo n.º 14
0
function afficher_position($x, $y, $z, $id = "", $nom = "")
{
    if ($id == "") {
        $alt = "Centrer sur {$x}/{$y}/{$z}";
        $texta = "{$x}/{$y}/{$z}";
        $link = "cX={$x}&cY={$y}&cZ={$z}";
    } else {
        $alt = "Centrer la vue2d sur ce troll";
        $texta = "{$x}/{$y}/{$z}";
        $link = "id_troll={$id}";
    }
    if (userIsGuilde()) {
        $text_d = "<a href='/cockpit.php?{$link}' title='{$alt}'>";
        $text_f = "</a>";
    }
    return $text_d . $texta . $text_f;
}
Ejemplo n.º 15
0
function imgTroll($troll)
{
    if (userIsGuilde()) {
        if ($troll[wanted] == 'oui' || $troll[diplomatie] == 'ennemie' || $troll[diplomatie] == 'tk' || $troll[tk] == 'oui') {
            $is_tk = "-tk";
        }
        if ($troll[guilde_troll] == ID_GUILDE || $troll[guilde] == 'RELAIS&MAGO' || $troll[guilde] == 'RELAISamp;&MAGO') {
            $is_guilde = "RM";
        }
    }
    switch ($troll[race]) {
        # Detection type de troll
        case 'Durakuir':
            $img = "durak{$is_guilde}{$is_tk}";
            break;
        case 'Kastar':
            $img = "kastar{$is_guilde}{$is_tk}";
            break;
        case 'Tomawak':
            $img = "tom{$is_guilde}{$is_tk}";
            break;
        case 'Skrim':
            $img = "skrim{$is_guilde}{$is_tk}";
            break;
        default:
            $img = "skrim";
            break;
    }
    if ($troll[malade] != "") {
        $is_malade = "-malade";
        $img = "malade";
    }
    if ($troll[is_seen] == "non") {
        $img = "fantome";
    }
    $tab["is_guilde"] = $is_guilde;
    $tab["is_malade"] = $is_malade;
    $tab["is_tk"] = $is_tk;
    $tab["img"] = $img;
    return $tab;
}