示例#1
0
function init_stats_perso($id_troll)
{
    $t = new troll_vtt($id_troll);
    $text = "{$t->nom_troll} ({$t->id_troll})<br>";
    $text .= "<select name='id_troll' id='id_troll_rm'";
    $text .= "onChange=\"javascript:document.location.href='/vtt/stats_perso.php?id_troll=";
    $text .= "'+this.value+'";
    $text .= "';\">";
    $text .= afficher_listbox_troll_rm_select($id_troll, $no_not = "", "", false);
    $text .= "</select>";
    $img = "<img src='/images/narcissotron.jpg'>";
    afficher_titre_tableau("{$img}", $text);
    if ($t->pv == "") {
        $text = "{$t->nom_troll} ({$t->id_troll}) n'a jamais renseign&eacute; le VTT.";
        afficher_titre_tableau("Erreur", $text);
        die;
    }
    $s = new stats_vtt($t->race_troll, $t->niveau_troll);
    ?>
	<table width='100%'>
	<tr>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_pv($s, $t);
    ?>
	</table><br>

	</td>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_reg($s, $t);
    ?>
	</table><br>

	</td>
	</tr>

	<tr>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_dla($s, $t);
    ?>
	</table><br>

	</td>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_vue($s, $t);
    ?>
	</table><br>

	</td>
	</tr>
	<tr>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_att($s, $t);
    ?>
	</table><br>

	</td>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_esq($s, $t);
    ?>
	</table><br>

	</td>
	</tr>
	<tr>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_deg($s, $t);
    ?>
	</table><br>

	</td>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_arm($s, $t);
    ?>
	</table><br>

	</td>
	</tr>
	<tr>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_kill($s, $t);
    ?>
	</table><br>

	</td>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_dead($s, $t);
    ?>
	</table><br>

	</td>
	</tr>
	<tr>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_rm($s, $t);
    ?>
	</table><br>

	</td>
	<td>

	<table align='center' class='mh_tdborder'>
	<?php 
    dessine_mm($s, $t);
    ?>
	</table><br>

	</td>
	</tr>

	</table>
	<?php 
}
示例#2
0
function afficherChoixTrollsChangePassword($change_password)
{
    isControlAdministrateur("yes");
    // Control strict de l'administrateur
    echo "<h2>Changement de mot de passe</h2>";
    if ($change_password != 'next') {
        echo "Un troll Relais&Mago n'arrive plus à se connecter sur les outils ?<br>";
        echo "Choississez un troll dans la liste, remplissez le champ <b>mot de passe md5</b>";
        echo "et cliquez sur le bouton <b>Suivant</b><br><br>";
        echo "Vous pouvez calculer le md5 <a href='md5.php'>ici</a><br><br>";
        echo "<form action='engine_view.php'>";
        echo "<input type='hidden' name='change_password' value='next'>";
        echo "Choisissez un troll : <br>";
        echo "<select name='id_troll'>";
        afficher_listbox_troll_rm_select();
        echo "</select><br><br>";
        echo "Nouveau mot de passe MD5 : <br>";
        echo "<input type='text' name='pass_troll' value='' size='32' maxlength='32'><br><br>";
        echo "<input type='submit' value='Suivant'>";
        echo "</form>";
        echo "<br>";
        echo "Le clic sur le bouton <b>Suivant</b> vous demandera ensuite une confirmation";
    } else {
        if ($_REQUEST[id_troll] == '-1') {
            die("<font color=red>ERREUR : Vous devez choisir un troll</font>");
        }
        if (strlen($_REQUEST[pass_troll]) != 32) {
            die("<font color=red>ERREUR Le mot de passe md5 que vous avez rentré ne fait pas 32 caractères</font>");
        }
        $lesTrolls = selectDbTrolls($_REQUEST[id_troll]);
        $troll = $lesTrolls[1];
        echo "Vous allez maintenant changer le mot de passe du troll";
        echo " {$troll['nom_troll']} ({$troll['id_troll']})<br><br>";
        echo " Ancien mot de passe MD5 : {$troll['pass_troll']}<br>";
        echo " Nouveau mot de passe MD5 : {$_REQUEST['pass_troll']}<br>";
        echo "<form action='engine_view.php'>";
        echo "<input type='hidden' name='change_password' value='edit'>";
        echo "<input type='hidden' name='id_troll' value='{$_REQUEST['id_troll']}'><br><br>";
        echo "<input type='hidden' name='nom_troll' value='{$troll['nom_troll']}'><br><br>";
        echo "<input type='hidden' name='pass_troll' value='{$_REQUEST['pass_troll']}'><br><br>";
        echo "<input type='submit' value='Valider'>";
        echo "</form>";
    }
}
示例#3
0
function afficherFicheBug($id_bug)
{
    global $db_vue_rm, $admin;
    if ($id_bug == "new") {
        $titre = "<h3>Ajout d'un bug ou d'un souhait</h3>";
        $id_troll_emetteur_bug = $_SESSION[AuthTroll];
        $id_troll_responsable_bug = 0;
        $date_ouverture_bug = date("Y-m-d H-i-s");
    } else {
        // On va chercher les informations du bug
        $lesBugs = selectDbBugs($id_bug);
        $res = $lesBugs[1];
        $id_bug = $res[id_bug];
        $id_troll_emetteur_bug = $res[id_troll_emetteur_bug];
        $id_troll_responsable_bug = $res[id_troll_responsable_bug];
        $nom_emetteur = stripslashes($res[nom_emetteur]);
        $nom_responsable = stripslashes($res[nom_responsable]);
        $date_ouverture_bug = $res[date_ouverture_bug];
        $date_cloture_bug = $res[date_cloture_bug];
        $description_bug = stripslashes($res[description_bug]);
        $criticite_bug = $res[criticite_bug];
        $type_bug = $res[type_bug];
        $etat_bug = $res[etat_bug];
        $outil_touche_bug = $res[outil_touche_bug];
        $titre = "<h3>Edition d'un Bug ou d'un souhait</h3>";
    }
    if ($description == "") {
        $description = "....";
    }
    echo "<form action='bugs.php'>";
    echo "<input type='hidden' name='bug' value='edit'>";
    echo "<input type='hidden' name='id_bug' value='{$id_bug}'>";
    echo "<input type='hidden' name='id_troll_emetteur_bug' value='{$id_troll_emetteur_bug}'>";
    echo "<input type='hidden' name='id_troll_responsable_bug' value='{$id_troll_responsable_bug}'>";
    echo "<input type='hidden' name='date_ouverture_bug' value='{$date_ouverture_bug}'>";
    echo "<input type='hidden' name='etat_bug_old' value='{$etat_bug}'>";
    echo "<table><tr><td valign='top'>";
    echo "<table class='mh_tdborder'>";
    echo "<tr class='mh_tdtitre'><td colspan='2' align='center'>{$titre}";
    if ($id_bug == "new") {
        echo "<input type='submit' value='Ajouter' class='mh_form_submit'> ";
    } else {
        if ($id_troll_emetteur_bug == $_SESSION[AuthTroll] || isControlAdministrateur()) {
            echo " <input type='submit' value='Modifier' class='mh_form_submit'>";
            echo " <input type='button' name='suppression' value='Supprimer' class='mh_form_submit'";
            echo " onClick=\"javascript=";
            echo " k=confirm('Vous êtes sur le point de supprimer le bug. Il sera détruit de la base de données !";
            echo " Voulez-vous confirmer la suppression ?');";
            echo " if (k==true) {document.location.href=";
            echo "'bugs.php?bug={$id_bug}&action=del';}";
            echo "\"'>&nbsp;";
        }
    }
    echo "<input type='button' class='mh_form_submit' onClick=\"Javascript=document.location.href='bugs.php?bugs=liste'\" value='Retour Liste'>";
    echo "</td></tr>";
    echo "<tr class='mh_tdpage'><td><b>N° du bug</b></td>";
    echo "<td>{$id_bug}</td></tr>";
    echo "<tr class='mh_tdpage'><td><b>Troll émetteur</b></td>";
    echo "<td>{$nom_emetteur} ({$id_troll_emetteur_bug})</td></tr>";
    if ($id_bug != "new") {
        echo "<tr class='mh_tdpage'><td><b>Date d'émission</b></td>";
        echo "<td>" . date('d/m/y H:i', $date_ouverture_bug) . "</td></tr>";
    }
    echo "<tr class='mh_tdpage'><td><b>Description</b></td>";
    echo "<td><textarea cols=60 rows=4 name='description_bug'>";
    echo stripslashes($description_bug);
    echo "</textarea>";
    echo "</td></tr>";
    echo "<tr class='mh_tdpage'><td><b>Outil Touché principalement</b></td>";
    echo "<td><select name='outil_touche_bug'>";
    afficher_listbox_select("bestiaire", $outil_touche_bug);
    afficher_listbox_select("bugs", $outil_touche_bug);
    afficher_listbox_select("firemago", $outil_touche_bug);
    afficher_listbox_select("gps", $outil_touche_bug);
    afficher_listbox_select("ggc", $outil_touche_bug);
    afficher_listbox_select("recherchator", $outil_touche_bug);
    afficher_listbox_select("rg", $outil_touche_bug);
    afficher_listbox_select("stats", $outil_touche_bug);
    afficher_listbox_select("trombinoscope", $outil_touche_bug);
    afficher_listbox_select("vue2d", $outil_touche_bug);
    afficher_listbox_select("vtt", $outil_touche_bug);
    afficher_listbox_select("autre", $outil_touche_bug);
    echo "</select>";
    echo "</td></tr>";
    echo "<tr class='mh_tdpage'><td><b>Criticité</b></td>";
    echo "<td><select name='criticite_bug'>";
    afficher_listbox_select("basse", $criticite_bug);
    afficher_listbox_select("moyenne", $criticite_bug);
    afficher_listbox_select("prioritaire", $criticite_bug);
    echo "</select>";
    echo "</td></tr>";
    echo "<tr class='mh_tdpage'><td><b>Type</b></td>";
    echo "<td><select name='type_bug'>";
    afficher_listbox_select("souhait", $type_bug);
    afficher_listbox_select("bug", $type_bug);
    echo "</select>";
    echo "</td></tr>";
    echo "<tr class='mh_tdpage'><td><b>Etat</b></td>";
    echo "<td><select name='etat_bug'>";
    afficher_listbox_select("ouvert", $etat_bug);
    afficher_listbox_select("en-cours", $etat_bug);
    afficher_listbox_select("clos", $etat_bug);
    echo "</select>";
    echo "</td></tr>";
    if ($id_bug != "new") {
        echo "<tr class='mh_tdpage'><td><b>Responsable</b></td>";
        echo "<td><select name='id_troll_responsable_bug'>";
        afficher_listbox_troll_rm_select($id_troll_responsable_bug, "", 0);
        echo "</select></td></tr>";
        if ($etat_bug == "clos") {
            echo "<tr class='mh_tdpage'><td><b>Date de clôture</b></td>";
            echo "<td>" . date('d/m/y H:i', $date_cloture_bug) . "</td></tr>";
        }
    }
    echo "</table>";
    echo "</td><td valign='top'>";
    if ($id_bug != "new") {
        //echo "<table style='background-color:#6f7ca2;' class='fiche'>";
        echo "<table class='mh_tdborder'>";
        echo "<tr class='mh_tdtitre'><td align='center'> Description </td></tr>";
        $description_bug = preg_replace("/\n/", "<br>", $description_bug);
        echo "<tr class='mh_tdpage'><td>" . stripslashes($description_bug) . "</td></tr>";
        echo "</table>";
    }
    echo "</table>";
    echo "</form>";
}