function afficherFicheComposant($id_composant) { global $MUNDIDEY; $page = "engine_view.php"; if ($id_composant == "new") { $info = "Ajouter"; $nom_composant = ""; $commentaire_composant = ""; $id_race_composant = ""; $priorite_composant = ""; } else { $lesComposants = selectDbComposants($id_composant); $res = $lesComposants[1]; $id_composant = $res[id_composant]; $nom_composant = stripslashes($res[nom_composant]); $id_race_composant = stripslashes($res[id_race_composant]); // c'est une chaine ! $priorite_composant = $res[priorite_composant]; $commentaire_composant = html_entity_decode(stripslashes($res[commentaire_composant])); $info = "Modifier"; } echo "<form action='{$page}?composant=edit' method='post' name='formulaire_compo'>"; echo "<input type='hidden' name='act' value='{$id_composant}'>"; echo "<input type='hidden' name='id_composant' value='{$id_composant}'>"; echo "<table style='background-color:#6f7ca2;' class='fiche'>"; echo "<tr><td>Nom</td>"; echo "<td><input type='textbox' value=\"" . $nom_composant . "\" name='nom_composant' size='50'</td></tr>"; echo "<tr><td>Race</td>"; echo "<td>"; echo "<select name='id_race_composant'>"; afficher_listbox_race_bestiaire_select($id_race_composant); echo "</select>"; echo "</td></tr>"; echo "<tr><td>Priorité</td>"; echo "<td>"; echo "<select name='priorite_composant'>"; afficher_listbox_select("aucune", $priorite_composant, "Hein ?"); afficher_listbox_select("tresbasse", $priorite_composant, "Pour l'an prochain"); afficher_listbox_select("basse", $priorite_composant, "Recherché"); afficher_listbox_select("moyenne", $priorite_composant, "Urgent"); afficher_listbox_select("haute", $priorite_composant, "Super urgent"); afficher_listbox_select("superhaute", $priorite_composant, "Pour hier"); echo "</select>"; echo "</td></tr>"; echo "<tr><td>Commentaire</td>"; echo "<td><textarea name='commentaire_composant'cols='50' rows='10'>"; echo $commentaire_composant; echo "</textarea></td></tr>"; echo "</table>"; $res = selectDbVtt($_SESSION['AuthTroll'], "Ecriture Magique"); // Un bouton modifier pour l'administrateur // >10 c'est normal !! if (isControlAdministrateur() || count($res) > 10) { echo "<input type='submit' name='submit' value='{$info}' class='mh_form_submit'> "; if ($id_composant != "new") { echo "<input type='button' name='suppression' value='Supprimer' class='mh_form_submit'"; echo " onClick=\"javascript="; echo " k=confirm('Confirmer la suppression du composant prioritaire ?');"; echo " if (k==true) {document.location.href='{$page}?composant=del&id_composant={$id_composant}';}"; echo "\"> "; } } echo "<input type='Button' value='Retour à la liste'"; echo " onClick='JavaScript=document.location.href=\"{$page}?composant=liste\"' class='mh_form_submit'>"; echo "</form>"; }
function afficherCockpitRecherchator() { ?> <form name='cockpitRecherchator' method='POST' action='cockpit.php' > <input type='hidden' name='old_recherche'> <table width='100%' cellspacing='0'> <tr class='mh_tdtitre'> <td align='center'>Recherchator</td> </tr> <tr class='mh_tdpage'> <td> <select name='recherche' onChange="Javascript:change_type();"> <?php afficher_listbox_select("trolls", $_REQUEST['recherche'], "Trolls"); afficher_listbox_select("monstres", $_REQUEST['recherche'], "Monstres"); afficher_listbox_select("lieux", $_REQUEST['recherche'], "Lieux"); ?> </select> <div name="conteneur" class="conteneur"> <div id="trolls" name="trolls" style='display:block'> <select name='trolls_rm_num' id='trolls_rm_num' onChange='change_infos_RM(false)'> <?php if ($_REQUEST[id_troll] != "") { $hidden = showListeCache($_REQUEST[id_troll], true); } else { if ($_REQUEST[trolls_rm_num] != "") { $hidden = showListeCache($_REQUEST[trolls_rm_num], true); } else { $hidden = showListeCache($_SESSION[AuthTroll], true); } } ?> </select> <a id='link_rg' href=''><img src='images/puce_rg.gif' title='Accès à la fiche RG' border=0></a> <a id='link_mh' href='' target='_blank'><img src='images/puce_mh.gif' title='Accès au profil MH' border=0></a> <a id='link_gps' href=''><img src='images/puce_gps.gif' title='Accès au GPS centré sur ce troll' border=0></a> <?php echo $hidden; ?> <?php $act = "onClick=\"JavaScript:document.getElementById('troll_avatar').style.display ="; $act .= "swapSpan('trolls_plus','img_trolls_plus','swap_trolls_plus')\""; echo "<input type='hidden' id='swap_trolls_plus' name='swap_reglage' value='visible'>"; if ($_REQUEST['recherche'] != "") { $id_troll_recherche = $_REQUEST[id_troll]; } ?> <table> <tr> <td nowrap>N° <input type='textbox' name='id_troll' size='6' value='<?php echo $id_troll_recherche; ?> '></td> <td nowrap>Nom <input type='textbox' name='nom_troll' size='6' value='<?php echo $_REQUEST[nom_troll]; ?> '></td> <td colspan='2' nowrap>Guilde <input type='textbox' name='nom_guilde' size='6' value='<?php echo $_REQUEST[nom_guilde]; ?> '> <img id='img_trolls_plus' src='images/triangle-bleu.gif' <?php echo $act; ?> > plus d'options </td> </tr> </table> </div> <div id="troll_avatar" name="troll_avatar" style='display:block' align='center'> <table border='0' class='mh_tdborder' cellpadding='0' cellspacing='1' align='center'> <tr class='mh_tdtitre'> <td valign='bottom' align='center'> <font color=black> <img id='avatar' src=''> </font> </td> </tr> </table> </div> <div id="trolls_plus" name="trolls_plus" style='display: none'> <table width='100%'> <tr> <td nowrap>Niveau <input type='textbox' name='niveau_troll' size='2' value='<?php echo $_REQUEST[niveau_troll]; ?> '> </td> <td colspan='3' nowrap>Race <select name='race_troll'> <?php afficher_listbox_select("", $_REQUEST['race_troll']); afficher_listbox_select("Durakuir", $_REQUEST['race_troll']); afficher_listbox_select("Kastar", $_REQUEST['race_troll']); afficher_listbox_select("Skrim", $_REQUEST['race_troll']); afficher_listbox_select("Tomawak", $_REQUEST['race_troll']); ?> </select> </td> </tr> <tr> <td colspan='4'> <table width='100%'> <tr valign='top'> <td nowrap>Tk </td><td nowrap> <?php afficher_radio("is_tk_troll", "oui", $_REQUEST['is_tk_troll'], "oui"); ?> <br> <?php afficher_radio("is_tk_troll", "", $_REQUEST['is_tk_troll'], "n'importe"); ?> </td><td nowrap>Wanted </td><td nowrap> <?php afficher_radio("is_wanted_troll", "oui", $_REQUEST['is_wanted_troll'], "oui"); ?> <br> <?php afficher_radio("is_wanted_troll", "", $_REQUEST['is_wanted_troll'], "n'importe"); ?> </td><td nowrap>Chatié </td><td nowrap> <?php afficher_radio("is_venge_troll", "oui", $_REQUEST['is_venge_troll'], "oui"); ?> <br> <?php afficher_radio("is_venge_troll", "", $_REQUEST['is_venge_troll'], "n'importe"); ?> </td></tr> </table> </tr><tr> <td colspan='3' nowrap>Diplo Troll <select name='statut_troll'> <?php afficher_listbox_select("", $_REQUEST['statut_troll']); afficher_listbox_select("neutre", $_REQUEST['statut_troll']); afficher_listbox_select("tk", $_REQUEST['statut_troll']); afficher_listbox_select("ennemie", $_REQUEST['statut_troll']); afficher_listbox_select("amie", $_REQUEST['statut_troll']); afficher_listbox_select("alliee", $_REQUEST['statut_troll'], "alliée"); ?> </select> Diplo Guilde <select name='statut_guilde'> <?php afficher_listbox_select("", $_REQUEST['statut_guilde']); afficher_listbox_select("neutre", $_REQUEST['statut_guilde']); afficher_listbox_select("tk", $_REQUEST['statut_guilde']); afficher_listbox_select("ennemie", $_REQUEST['statut_guilde']); afficher_listbox_select("amie", $_REQUEST['statut_guilde']); afficher_listbox_select("alliee", $_REQUEST['statut_guilde'], "alliée"); ?> </select></td> </tr><tr> <td colspan='4' nowrap>Position X/Y/Z <?php formulaire_listbox("x_troll", -150, 150, 1, $_REQUEST['x_troll'], "plusmoins", "yes"); formulaire_listbox("y_troll", -150, 150, 1, $_REQUEST['y_troll'], "plusmoins", "yes"); formulaire_listbox("z_troll", 0, 100, 1, $_REQUEST['z_troll'], "plusmoins", "yes"); ?> </td></tr> </table> </div> <div id="monstres" name="monstres" style='display: none'> <?php $act = "onClick=\"JavaScript:swapSpan('monstres_plus','img_monstres_plus','swap_monstres_plus')\""; echo "<input type='hidden' id='swap_monstres_plus' name='swap_monstres_plus' value='visible'>"; ?> <table> <tr> <td nowrap>N° <input type='textbox' id='id_monstre' name='id_monstre' size='6' value='<?php echo $_REQUEST[id_monstre]; ?> '> </td> <td nowrap>Nom <input type='textbox' id='nom_monstre' name='nom_monstre' size='6' value='<?php echo $_REQUEST[nom_monstre]; ?> '> </td> <td> <img id='img_monstres_plus' src='images/triangle-bleu.gif' <?php echo $act; ?> > plus d'options </td> </tr> </table> </div> <div id="monstres_plus" name="monstres_plus" style='display: none'> <table> <tr> <td colspan='2' nowrap>Position X/Y/Z <?php formulaire_listbox("x_monstre", -150, 150, 1, $_REQUEST['x_monstre'], "plusmoins", "yes"); formulaire_listbox("y_monstre", -150, 150, 1, $_REQUEST['y_monstre'], "plusmoins", "yes"); formulaire_listbox("z_monstre", 0, 100, 1, $_REQUEST['z_monstre'], "plusmoins", "yes"); ?> </td></tr> <tr><td> Niveau du monstre (+/- 1) : <?php formulaire_listbox("niveau_monstre", 0, 40, 1, $_REQUEST[niveau_monstre], "moinsplus", "yes"); ?> </td></tr> <tr><td> Race : <?php echo "<select name='race_monstre'>"; afficher_listbox_race_bestiaire_select($_REQUEST[race_monstre], true); echo "</select>"; ?> </td></tr> <tr><td> Famille : <?php echo "<select name='famille_monstre'>"; afficher_listbox_famille_bestiaire_select($_REQUEST[famille_monstre], true); echo "</select>"; ?> </td></tr> </table> </div> <div id="lieux" name="lieux" style='display: none'> <?php $act = "onClick=\"JavaScript:swapSpan('lieux_plus','img_lieux_plus','swap_lieux_plus')\""; echo "<input type='hidden' id='swap_lieux_plus' name='swap_lieux_plus' value='visible'>"; ?> <table> <tr> <td nowrap>Nom <input type='textbox' name='nom_lieu' size='6' value='<?php echo $_REQUEST[nom_lieu]; ?> '></td> <td nowrap> <img id='img_lieux_plus' src='images/triangle-bleu.gif' <?php echo $act; ?> > plus d'options </td> </tr> </table> </div> <div id="lieux_plus" name="lieux_plus" style='display: none'> <table> <td nowrap>Position X/Y/Z <?php formulaire_listbox("x_lieu", -150, 150, 1, $_REQUEST['x_lieu'], "plusmoins", "yes"); formulaire_listbox("y_lieu", -150, 150, 1, $_REQUEST['y_lieu'], "plusmoins", "yes"); formulaire_listbox("z_lieu", 0, 100, 1, $_REQUEST['z_lieu'], "plusmoins", "yes"); ?> </td></tr> </table> </div> </td></tr> <tr><td> <center><input type='submit' class='mh_form_submit' value='Rechercher'> <input type='reset' class='mh_form_submit' value='Par défaut'></center> </td></tr> </table> <?php }