if (!userIsGuilde()) { die("<h1 style='color:red'>Vous n'avez pas accés à cette page !</h1>"); } ?> <script language="javascript" type="text/javascript" src="/js/overlib.js"></script> <script language="javascript" type="text/javascript" src="/js/overlib_exclusive.js"></script> <script language="javascript" type="text/javascript" src="/js/ajax.js"></script> <script language="javascript" type="text/javascript" src="/js/recherche.js"></script> <script language="javascript" type="text/javascript" src="/js/jquery.js"></script> <script language="javascript" type="text/javascript" src="/js/easyem.js"></script> <script language="javascript" type="text/javascript">var $j = jQuery.noConflict();</script> <table width="80%" class='mh_tdborder' align='center' cellpadding='5' cellspacing='5'> <tr align='center'> <td class="mh_tdpage" style="border: 1px solid #F9BB2F;"> <?php echo "<br/><h2>Le Mundidey courant est " . getMundidey(time()) . "</h2>"; ?> </td> </tr> <tr align='center'> <td class="mh_tdpage" style="border: 1px solid #F9BB2F;" onClick="location.href='update.php?type=recettes';" onMouseOut="this.style.backgroundColor = '#30385C';" onMouseOver="this.style.backgroundColor = '#F9BB2F';this.style.cursor='pointer'"> <h2>Mettre à jour les recettes.</h2> <p>Mets à jour le statut/composant des recettes</p> <p>Les composants variables seront effacés si le mundidey du composant est obsolète !</p> </td> </tr> </table> <br/> <table width="90%" class='mh_tdborder' align='center' cellpadding='10' cellspacing='10'> <?php echo htmlRecettes();
<?php require_once 'easyem_functions.php'; include "../top.php"; if (!userIsGuilde()) { die("<h1 style='color:red'>Vous n'avez pas accés à cette page !</h1>"); } if (isset($_GET["type"])) { if ($_GET["type"] == "recettes") { updateRecettesEM(getMundidey(time())); } if ($_GET["type"] == "compotroll") { updateCompoTroll($_SESSION["AuthTroll"], $_SESSION["AuthNomTroll"], $_POST); } if ($_GET["type"] == "composant") { updateTanieresComposant(); } } else { die; } ?> <table width="80%" class='mh_tdborder' align='center' cellpadding='0' cellspacing='0'> <tr class='mh_tdtitre' align='center'> <td class='mh_tdpage'> <h3>Mise à jour réussie !</h3> </td> </tr> <tr class='mh_tdtitre' align='center'> <td class='mh_tdpage'><a href="index.php" style="text-decoration:none;"><img src="img/flecheg.jpg" alt="back"/></a></td> </tr> </table>
function getChampignonOption() { $retour = ""; $qualités = array("Mielleux" => "0", "Sucré" => "-5", "Salé" => "-10", "Acide" => "-20"); $arrayCorrespondance = array("du Hum ..." => "Inconnu", "du Phoenix" => "Préscientus Reguis", "de la Mouche" => "Amanite Trolloïde", "du Dindon" => "Girolle Sanglante", "du Goblin" => "Horreur Des Prés", "du Démon" => "Bolet Péteur", "de la Limace" => "Pied Jaune", "du Rat" => "Agaric Sous-Terrain", "de l'Hydre" => "Suinte Cadavre", "du Ver" => "Cèpe Lumineux", "du Fungus" => "Fungus Rampant", "de la Vouivre" => "Nez Noir", "du Gnu" => "Pleurote Pleureuse", "du Scarabée" => "Phytomassus Xilénique"); $arrayChampignon = array(); $mundidey = getMundidey(time()); $xpath = new DOMXPath(getChampignons()); foreach ($xpath->query('/Elements/Element[contains(child::text(),"' . utf8_encode($arrayCorrespondance[$mundidey]) . '")]') as $champignon) { foreach ($qualités as $qualité => $value) { if (preg_match("#.*" . utf8_encode($qualité) . "#", $champignon->nodeValue)) { $arrayChampignon[] = array("id" => $champignon->getAttribute("id"), "idTaniere" => $champignon->getAttribute("idTaniere"), "ratio" => $value, "nom" => $champignon->nodeValue); break; } } } if (empty($arrayChampignon)) { $retour .= "<option onClick='updateRatio();' value='0'>Pas de champignons en Tanières !</option>"; $retour = "<td class='mh_tdpage'><select class='composant_taniere'>" . $retour . "</select></td>"; $retour .= "<td id='td_champignon' class='mh_tdpage' width='200px'><h3></h3></td>"; $retour .= "<input class='hidden_element' type='hidden' value='Pas de champignons en Tanières !'/>"; } else { usort($arrayChampignon, 'sortByRatio'); foreach ($arrayChampignon as $champignon) { $retour .= "<option onClick='updateHidden( \"hidden_champignon\", \"[" . $champignon["id"] . "] " . addslashes(utf8_decode($champignon["nom"])) . " " . getTanieresById($champignon["idTaniere"]) . "\" );updateRatio();getTaniere( \"Champi\", \"champignon\", " . $champignon["id"] . " );' value='" . $champignon["ratio"] . "'>" . utf8_decode($champignon["nom"]) . " -> " . $champignon["ratio"] . "%</option>"; } $retour = "<td class='mh_tdpage'><select class='composant_taniere'>" . $retour . "</select></td>"; $retour .= "<td id='td_champignon' class='mh_tdpage' width='200px'><h3><a href='' onClick=\"window.open('http://games.mountyhall.com/mountyhall/View/TresorHistory.php?ai_IDTresor=" . $arrayChampignon[0]["id"] . "&as_From=Comptoir&ai_IDLieu=" . $arrayChampignon[0]["idTaniere"] . "','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=766, height=636');return(false);\">[" . $arrayChampignon[0]["id"] . "]</a> <a href='http://games.mountyhall.com/mountyhall/MH_Comptoirs/Comptoir_o_Stock.php?IDLieu=" . $arrayChampignon[0]["idTaniere"] . "&as_type=Champi' target='_blank'>" . getTanieresById($arrayChampignon[0]["idTaniere"]) . "</a></h3></td>"; $retour .= "<input id='hidden_champignon' class='hidden_element' type='hidden' value=\"[" . $arrayChampignon[0]["id"] . "] " . utf8_decode($arrayChampignon[0]["nom"]) . " " . getTanieresById($arrayChampignon[0]["idTaniere"]) . "\"/>"; } return $retour; }