<?php header('Content-Type: text/html; charset=iso-8859-1'); require_once "../easyem_functions.php"; $tanieres = array("38965" => "La Bïblyohtek", "1646554" => "Le Relais des Abysses", "34111" => "La Taverne"); if ($_POST["type"] == "Compo") { $composant = getItemById(getComposants(), $_POST["id"]); } if ($_POST["type"] == "Champi") { $composant = getItemById(getChampignons(), $_POST["id"]); } if ($_POST["type"] == "PoPaAn") { $composant = getItemById(getParchemins(), $_POST["id"]); } echo "<h3><a href='' onClick=\"window.open('http://games.mountyhall.com/mountyhall/View/TresorHistory.php?ai_IDTresor=" . $composant->getAttribute("id") . "&as_From=Comptoir&ai_IDLieu=" . $composant->getAttribute("idTaniere") . "','_blank','toolbar=0, location=0, directories=0, status=0, scrollbars=1, resizable=1, copyhistory=0, menuBar=0, width=766, height=636');return(false);\">[" . $_POST["id"] . "]</a> <a href='http://games.mountyhall.com/mountyhall/MH_Comptoirs/Comptoir_o_Stock.php?IDLieu=" . $composant->getAttribute("idTaniere") . "&as_type=" . $_POST["type"] . "' target='_blank'>" . getTanieresById($composant->getAttribute("idTaniere")) . "</a></h3>";
function getTanieresComposant($query = "/Elements/Element") { $retour = ""; $retour .= "<tr style='color:white'>\n\t\t\t\t\t\t<th>Id</th>\n\t\t\t\t\t\t<th>Tanière</th>\t\t\t\t\t\n\t\t\t\t\t\t<th>Sortilège</th>\n\t\t\t\t\t\t<th>Mundidey</th>\n\t\t\t\t\t\t<th>Nom Complet</th>\n\t\t\t\t\t</tr>"; $xpath = new DOMXPath(getComposantsTanieres()); foreach ($xpath->query($query) as $composant) { $retour .= "<tr align='center'>"; $retour .= "<td>"; $retour .= $composant->getAttribute("id"); $retour .= "</td>"; $retour .= "<td>"; $retour .= getTanieresById($composant->getAttribute("idTaniere")); $retour .= "</td>"; $retour .= "<td>"; $retour .= $composant->getAttribute("sortilege") ? utf8_decode($composant->getAttribute("sortilege")) : "-"; $retour .= "</td>"; $retour .= "<td>"; $retour .= $composant->getAttribute("mundidey") ? utf8_decode($composant->getAttribute("mundidey")) : "-"; $retour .= "</td>"; $retour .= "<td>"; $retour .= utf8_decode($composant->nodeValue); $retour .= "</td>"; $retour .= "</tr>"; } return $retour; }