Beispiel #1
0
function afficherListeGuildes($sort)
{
    global $db_vue_rm;
    $page = "engine_view.php";
    echo "<form action='{$page}'>";
    ?>
   <table class='mh_tdborder' width='70%' align='center'>
      <tr><td>
        <table width='100%' cellspacing='0'>
          <tr class='mh_tdpage' align="center">
            <td>

	<?php 
    echo "<a href='{$page}?guilde=sort_diplomatie'>Trier suivant leur Diplomatie</a><br>";
    echo "<a href='{$page}?guilde=sort_diplomate'>Trier suivant le Diplomate " . RELAISMAGO . "</a><br>";
    echo "Affiche les guildes avec le statut : ";
    echo "<select name='guilde'>";
    afficher_listbox_select("liste", $sort, " ");
    afficher_listbox_select("neutre", $sort);
    afficher_listbox_select("tk", $sort);
    afficher_listbox_select("ennemie", $sort);
    afficher_listbox_select("amie", $sort);
    afficher_listbox_select("alliee", $sort, "alliée");
    echo "</select>";
    echo "<input type='submit' value='Afficher' class='mh_form_submit'>";
    echo "<br><br>";
    ?>
		</td></tr></table>
		</td></tr></table><br>
	<?php 
    $lesGuildes = selectDbGuildes("", $sort);
    $nbGuildes = count($lesGuildes);
    ?>
   <table class='mh_tdborder' width='70%' align='center'>
      <tr><td>
        <table width='100%' cellspacing='0'>
          <tr class='mh_tdpage' align="center">
            <td>

	<?php 
    echo "<table class='list'>";
    echo "<tr class='titre-tableau yvo'>";
    echo "<td>Liste des Guildes</td>";
    echo "<td>Diplomatie</td>";
    echo "<td>Gestionnaire (chef)</td>";
    echo "<td>Contact</td>";
    echo "<td>Diplomate" . RELAISMAGO . "</td>";
    echo "<td>Mh</td>";
    echo "</tr>";
    for ($i = 1; $i <= $nbGuildes; $i++) {
        $res = $lesGuildes[$i];
        $id_guilde = $res[id_guilde];
        $nom_guilde = stripslashes($res[nom_guilde]);
        //$nom_guilde = htmlentities(stripslashes($res[nom_guilde])); // bug signalé par P&T
        $statut_guilde = $res[statut_guilde];
        $gestionnaire_id_troll_guilde = $res[gestionnaire_id_troll_guilde];
        $contact_id_troll_guilde = $res[contact_id_troll_guilde];
        $info_1_guilde = $res[info_1_guilde];
        $diplomate_id_troll_guilde = $res[diplomate_id_troll_guilde];
        $web_guilde = $res[web_guilde];
        $historique_guilde = $res[historique_guilde];
        $nom_gestionnaire = stripslashes($res[nom_gestionnaire]);
        $nom_contact = stripslashes($res[nom_contact]);
        $nom_diplomate = stripslashes($res[nom_diplomate]);
        if ($gestionnaire_id_troll_guilde == 0) {
            $gestionnaire_id_troll_guilde = "";
        }
        if ($contact_id_troll_guilde == 0) {
            $contact_id_troll_guilde = "";
        }
        if ($diplomate_id_troll_guilde == 0) {
            $diplomate_id_troll_guilde = "";
        }
        $lien = "href='{$page}?guilde={$id_guilde}'";
        $lien_fiche = "href='engine_view.php?troll=";
        echo "<tr class=\"item-impair\" onmouseover=\"this.className='item-mouseover'\"";
        echo "onmouseout=\"this.className='item-impair'\">";
        //echo "<td nowrap><a $lien>".htmlentities(stripslashes($res[nom_guilde]))."</a></td>"; // boulet ! :)
        echo "<td nowrap><a {$lien}>" . stripslashes($res[nom_guilde]) . "</a></td>";
        echo "<td nowrap>{$statut_guilde}</td>";
        echo "<td nowrap><a {$lien_fiche}{$gestionnaire_id_troll_guilde}'>{$nom_gestionnaire} {$gestionnaire_id_troll_guilde}</a></td>";
        echo "<td nowrap><a {$lien_fiche}{$contact_id_troll_guilde}'>{$nom_contact} {$contact_id_troll_guilde}</a></td>";
        echo "<td nowrap><a {$lien_fiche}{$diplomate_id_troll_guilde}'>{$nom_diplomate} {$diplomate_id_troll_guilde}</a></td>";
        $lien_mh = "http://games.mountyhall.com/mountyhall/View/AllianceView.php?ai_IDAlliance={$id_guilde}";
        echo "<td nowrap><a href='{$lien_mh}'>Mh</a></td>";
        echo "</tr>";
    }
    echo "</table>";
    echo "</td></tr></table>";
    echo "</td></tr></table>";
}
Beispiel #2
0
<?php

include_once "../functions_auth.php";
include_once "../admin_functions_db.php";
if (userIsGuilde() || userIsGroupSpec()) {
    $arrayColor = array("" => "''", "neutre" => "''", "tk" => "colorTK", "ennemie" => "colorEnemy", "amie" => "colorFriend", "alliee" => "colorAlly");
    $guildsid = $_REQUEST['guildsid'];
    echo "try { \n";
    for ($i = 0; $i < count($guildsid); $i++) {
        $arrInfos = explode(";", $guildsid[$i]);
        $statut_guilde = selectDbGuildes($arrInfos[0], "");
        $statut_guilde = $statut_guilde[1]["statut_guilde"];
        echo "tableTrolls[" . $arrInfos[1] . "].childNodes[5].setAttribute( 'background', '' ); \n";
        echo $guildsid[$i] == 450 ? "tableTrolls[" . $arrInfos[1] . "].childNodes[5].setAttribute( 'bgcolor', colorRM ); \n" : "tableTrolls[" . $arrInfos[1] . "].childNodes[5].setAttribute( 'bgcolor', " . $arrayColor[$statut_guilde] . " );\n";
    }
    echo "} catch ( e ) { error ( e, 'Guild Colouring error' ); }\n";
}