PageRenderTime 0ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/xml/cartedetail.php

http://eude.googlecode.com/
PHP | 47 lines | 33 code | 6 blank | 8 comment | 4 complexity | d538440dd2a516fb935a8cd719289c22 MD5 | raw file
 1<?php
 2/**
 3 * @author Alex10336
 4 * Dernière modification: $Id: cartedetail.php 504 2010-07-17 18:28:54Z Alex10336 $
 5 * @license GNU Public License 3.0 ( http://www.gnu.org/licenses/gpl-3.0.txt )
 6 * @license Creative Commons 3.0 BY-SA ( http://creativecommons.org/licenses/by-sa/3.0/deed.fr )
 7 *
 8 **/
 9define('USE_AJAX',true);
10
11require_once('../init.php');
12require_once(INCLUDE_PATH.'Script.php');
13
14if (!DataEngine::CheckPerms('CARTE_JOUEUR')) {
15    $out=<<<o
16<carte>
17    <script>
18    Carte.DetailsShow(false);
19    alert('Accès requis manquant');
20    </script>
21</carte>
22o;
23    output::_DoOutput($out);
24}
25//Tracé Menu
26if (!isset($_GET["ID"]) or $_GET["ID"] == "") {
27    output::_DoOutput("<CarteDetails><content><![CDATA[Aucune donn&eacute;e a charger, retour :<a href='javascript:void();' onclick='Carte.DetailsShow(false)'>Carte</a>]]></content></CarteDetails>");
28}
29$id = intval($_GET['ID']);
30$sql = <<<sql
31SELECT `TYPE`, `POSIN`, `POSOUT`, `COORDET`, `COORDETOUT`, `USER`, `EMPIRE`, `INFOS`
32FROM`SQL_PREFIX_Coordonnee`
33LEFT JOIN`SQL_PREFIX_Coordonnee_Joueurs` on id=jid
34WHERE (`POSIN`=$id OR `POSOUT`=$id) ORDER BY `USER`
35sql;
36$mysql_result = DataEngine::sql($sql);
37
38require_once(TEMPLATE_PATH.'cartedetails.tpl.php');
39
40$tpl = tpl_cartedetails::getinstance();
41$tpl->Setheader(intval($_GET["ID"]));
42while ($ligne=mysql_fetch_array($mysql_result)) {
43    $tpl->AddRow($ligne);
44}
45$tpl->DoOutput();
46
47