You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

350 regels
15 KiB

  1. <?php include "header.php";
  2. $message[0]='';
  3. $message[1]='
  4. <div class="col-lg-6 alert alert-dismissable alert-success">
  5. <button type="button" class="close" data-dismiss="alert">X</button>
  6. <h4>C\'est bon !</h4>
  7. <p>Vous pouvez à présent vous connecter pour commencer à configurer votre partie.</p>';
  8. $message[2]='
  9. <div class="col-lg-6 alert alert-dismissable alert-warning">
  10. <button type="button" class="close" data-dismiss="alert">X</button>
  11. <h4>Hey !</h4>
  12. <p>Vous avez déjà un compte !</p>';
  13. $message[3]='
  14. <div class="col-lg-6 alert alert-dismissable alert-danger">
  15. <button type="button" class="close" data-dismiss="alert">X</button>
  16. <h4>Erreur !</h4>
  17. <p>Votre email/mot de passe est invalide !</p>';
  18. $message[4]='
  19. <div class="col-lg-6 alert alert-dismissable alert-info">
  20. <button type="button" class="close" data-dismiss="alert">X</button>
  21. <h4>Oups !</h4>
  22. <p>Vous devez vous connecter pour pouvoir jouer ;)</p>';
  23. $message[5]='
  24. <div class="col-lg-6 alert alert-dismissable alert-success">
  25. <button type="button" class="close" data-dismiss="alert">X</button>
  26. <h4>OK !</h4>
  27. <p>Votre carte est à jour !</p>';
  28. $message[6]='
  29. <div class="col-lg-6 alert alert-dismissable alert-danger">
  30. <button type="button" class="close" data-dismiss="alert">X</button>
  31. <h4>ERREUR !</h4>
  32. <p>Echec de mise à jour de votre carte. Seul les fichiers <strong>.jpg</strong> (10 Mo max) sont autorisés.</p>';
  33. ?>
  34. <!DOCTYPE html>
  35. <html lang="fr">
  36. <head>
  37. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  38. <title>EcoMonde</title>
  39. <meta name="viewport" content="width=device-width, initial-scale=1">
  40. <link rel="stylesheet" href="./css/bootstrap.css" media="screen">
  41. <link rel="stylesheet" href="./css/bootswatch.min.css">
  42. <link rel="stylesheet" href="./css/ionicons.min.css">
  43. <link rel="stylesheet" href="./css/ecomonde.css">
  44. </head>
  45. <body>
  46. <div class="container-fluid">
  47. <div class="col-lg-1"></div>
  48. <div class="col-lg-3">
  49. <a href="#"><img class="img-responsive" src="./img/logo_<?php echo rand(1, 6); ?>.png" alt="logo" /></a>
  50. </div>
  51. <div class="col-lg-6">
  52. <div class="navbar navbar-default">
  53. <div class="navbar-header">
  54. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
  55. <span class="icon-bar"></span>
  56. <span class="icon-bar"></span>
  57. <span class="icon-bar"></span>
  58. </button>
  59. </div>
  60. <div class="navbar-collapse collapse navbar-responsive-collapse">
  61. <ul class="nav navbar-nav">
  62. <li><a href="http://wiki.ecomonde.land" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;WIKI</a></li>
  63. <li><a href="https://github.com/heuzef/ecomonde" target="_blank"><i class="ionicons ion-social-github"></i>&nbsp;&nbsp;GITHUB</a></li>
  64. <li><a href="http://wiki.ecomonde.land/doku.php?id=wiki:a_propos" target="_blank"><i class="ionicons ion-information-circled"></i>&nbsp;&nbsp;A PROPOS</a></li>
  65. </ul>
  66. <ul class="nav navbar-nav navbar-right">
  67. <?php if($status != 0): ?>
  68. <a href="http://fr.gravatar.com" target="_blank"><?php echo '<img class="img-circle" src="http://gravatar.com/avatar/'.$hash.'?s=50" alt="gravatar" />'; ?></a>&nbsp;&nbsp;<strong><?php echo strtoupper($pseudo); ?></strong>
  69. &nbsp;&nbsp;
  70. <a href="logout.php" class="btn btn-danger btn-xs"><i class="ionicons ion-power"></i></a>&nbsp;&nbsp;
  71. <?php elseif($status == 0): ?>
  72. <a class="btn btn-info btn-xs" data-toggle="modal" data-target="#modal_login"><i class="ionicons ion-power"></i>&nbsp;&nbsp;CONNEXION</a>
  73. <?php endif; ?>
  74. </ul>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="col-lg-1"></div>
  79. </div>
  80. <hr />
  81. <?php if(isset($_GET["msg"])){?>
  82. <div class="container-fluid">
  83. <div class="col-lg-3"></div>
  84. <?php echo $message[$_GET["msg"]]; ?>
  85. </div>
  86. <div class="col-lg-3"></div>
  87. </div>
  88. <?php } else {} ?>
  89. <?php if($status != 0):?>
  90. <div class="container-fluid">
  91. <div class="col-lg-1"></div>
  92. <div class="col-lg-3">
  93. <div class="panel panel-default">
  94. <div class="panel-heading"><i class="ionicons ion-gear-a"></i>&nbsp;&nbsp;<strong>Configurer votre partie</strong></div>
  95. <div class="panel-body">
  96. <p>
  97. <a href="play" class="btn btn-info btn-lg" target="_blank"><i class="ionicons ion-play"></i>&nbsp;&nbsp;Lancer votre partie</a>
  98. <p>
  99. <hr />
  100. <p>
  101. <a data-toggle="modal" data-target="#modal_new_player" class="btn btn-default btn-lg"><i class="ionicons ion-person-add"></i>&nbsp;&nbsp;Créer un joueur</a>
  102. </p>
  103. <hr />
  104. <p>
  105. <a href="#" class="btn btn-default btn-lg disabled"><i class="glyphicon glyphicon-import"></i>&nbsp;&nbsp;Importer un joueur (.XML)</a>
  106. </p>
  107. <hr />
  108. <p>
  109. <div class="btn-group">
  110. <a href="#" class="btn btn-default btn-lg dropdown-toggle disabled" data-toggle="dropdown">
  111. <i class="ionicons ion-music-note"></i>&nbsp;&nbsp;Changer les musiques
  112. <span class="caret"></span>
  113. </a>
  114. <ul class="dropdown-menu">
  115. <li><a href="#" style="color:#CCC;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;SOFT</a></li>
  116. <li class="divider"></li>
  117. <li><a href="#" style="color:#AAA;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;TONIC</a></li>
  118. <li class="divider"></li>
  119. <li><a href="#" style="color:#000;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;HARD</a></li>
  120. <li class="divider"></li>
  121. <li><a href="#" style="color:#ADDFFF;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;LIGHT</a></li>
  122. <li class="divider"></li>
  123. <li><a href="#" style="color:#8128B5;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;DARK</a></li>
  124. </ul>
  125. </div>
  126. </p>
  127. <hr />
  128. <p>
  129. <a data-toggle="modal" data-target="#modal_change_map" class="btn btn-default btn-lg"><i class="ionicons ion-map"></i>&nbsp;&nbsp;Changer la carte</a>
  130. </p>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="col-lg-7">
  135. <div class="panel panel-default">
  136. <div class="panel-heading"><i class="ionicons ion-person"></i>&nbsp;&nbsp;<strong>Joueurs présents dans votre partie :</strong></div>
  137. <div class="panel-body">
  138. <table class="table table-striped table-hover ">
  139. <thead>
  140. <tr>
  141. <th></th>
  142. <th>Nom</th>
  143. <th><i class="ionicons ion-heart" style="color:red;"></i></th>
  144. <th><i class="ionicons ion-flash" style="color:#FFD700;"></i></th>
  145. <th><i class="ionicons ion-egg" style="color:brown"></i></th>
  146. <th><i class="ionicons ion-fireball" style="color:grey"></i></th>
  147. <th><i class="ionicons ion-fireball" style="color:#ADDFFF"></i></th>
  148. <th><i class="ionicons ion-fireball" style="color:#8128B5"></i></th>
  149. <th><i class="ionicons ion-android-note" style="color:#000"></i></th>
  150. </tr>
  151. </thead>
  152. <tbody>
  153. <?php
  154. // nombre de gamers
  155. $f = 0;
  156. foreach(glob('*.xml') as $f) {$f+=1;}
  157. $nb_membres = count(glob('./medias/'.$hash.'/*.xml'));
  158. // liste des gamers
  159. $folder = "./medias/".$hash."/";
  160. $dossier = opendir($folder);
  161. while ($fichier = readdir($dossier))
  162. {
  163. if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3")
  164. {
  165. $gamers = explode(".xml", $fichier);
  166. $xml = simplexml_load_file('./medias/'.$hash.'/'.$fichier);
  167. if (!isset($itemnb)) {
  168. $itemnb=0;
  169. } else {
  170. $itemnb++;
  171. }
  172. foreach($xml->entry as $entry) {
  173. $somme_ecos=$entry->ecos->verte+$entry->ecos->bleue+$entry->ecos->jaune+$entry->ecos->rouge;
  174. echo '<tr class="active">
  175. <td><a href="del.php?player='.$fichier.'" class="btn btn-danger btn-xs"><i class="ionicons ion-trash-b"></i></a>&nbsp;&nbsp;<a href="./medias/'.$hash.'/'.$fichier.'" target="_blank" class="btn btn-success btn-xs"><i class="glyphicon glyphicon-export"></i></a></td>
  176. <td>'.$entry->nom.'</td>
  177. <td>'.$entry->hp.'</td>
  178. <td>'.$entry->xp.'</td>
  179. <td>'.$entry->money.'</td>
  180. <td>'.$somme_ecos.'</td>
  181. <td>'.$entry->ecos->blanche.'</td>
  182. <td>'.$entry->ecos->noire.'</td>
  183. <td>'.substr($entry->notes, 0, 40).'...</td>
  184. </tr>';
  185. }
  186. }
  187. }
  188. closedir($dossier);
  189. ?>
  190. </tbody>
  191. </table>
  192. </div>
  193. </div>
  194. </div>
  195. <div class="col-lg-1"></div>
  196. </div>
  197. <div class="modal fade" id="modal_new_player">
  198. <div class="modal-dialog">
  199. <div class="modal-content">
  200. <form class="form-horizontal well" role="form" method="post" action="new_player.php" enctype="multipart/form-data">
  201. <div class="modal-header">
  202. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  203. <h4 class="modal-title"><i class="ionicons ion-person-add"></i>&nbsp;&nbsp;NOUVEAU JOUEUR</h4>
  204. </div>
  205. <div class="modal-body">
  206. <div class="form-group">
  207. <label class="control-label" for="focusedInput">Nom :</label>
  208. <input class="form-control" id="focusedInput" type="text" name="player_name" maxlength="12" value="Derpy">
  209. </div>
  210. <div class="form-group">
  211. <label class="control-label" for="focusedInput">Nombre d'XP</label>
  212. <div class="input-group">
  213. <span class="input-group-addon"><i class="ionicons ion-flash" style="color:#FFD700;";></i></span>
  214. <select class="form-control" id="focusedInput" name="player_xp">
  215. <option>0</option>
  216. <option>10</option>
  217. <option>50</option>
  218. <option>100</option>
  219. <option>999</option>
  220. </select>
  221. </div>
  222. </div>
  223. <div class="form-group">
  224. <label class="control-label" for="focusedInput">Nombre d'Orbes</label>
  225. <div class="input-group">
  226. <span class="input-group-addon"><i class="ionicons ion-egg" style="color:brown;";></i></span>
  227. <select class="form-control" id="focusedInput" name="player_money">
  228. <option>0</option>
  229. <option>10</option>
  230. <option>50</option>
  231. <option>100</option>
  232. <option>999</option>
  233. </select>
  234. </div>
  235. </div>
  236. </div>
  237. <div class="modal-footer">
  238. <button type="submit" class="btn btn-info">Création du joueur</button>
  239. </div>
  240. </form>
  241. </div>
  242. </div>
  243. </div>
  244. <div class="modal fade" id="modal_change_map">
  245. <div class="modal-dialog">
  246. <div class="modal-content">
  247. <form class="form-horizontal well" role="form" method="post" action="change_map.php" enctype="multipart/form-data">
  248. <div class="modal-header">
  249. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  250. <h4 class="modal-title"><i class="ionicons ion-map"></i>&nbsp;&nbsp;CHANGER LA CARTE</h4>
  251. </div>
  252. <div class="modal-body">
  253. <input type="hidden" name="MAX_FILE_SIZE" value="10048576" />
  254. <label class="control-label" for="focusedInput">Seul les fichiers <strong>.jpg</strong> (10 Mo max) sont autorisés.</label>
  255. <input class="form-control" id="focusedInput" type="file" name="userfile">
  256. </div>
  257. <div class="modal-footer">
  258. <button type="submit" class="btn btn-info">Mise à jour de la carte</button>
  259. </div>
  260. </form>
  261. </div>
  262. </div>
  263. </div>
  264. <?php elseif($status == 0): ?>
  265. <div class="container-fluid">
  266. <div class="col-lg-1"></div>
  267. <div class="col-lg-5">
  268. <h2>Présentation</h2>
  269. <p><strong>EcoMonde est un Jeu de Rôle d'aventure interactif.</strong></p>
  270. <p class="text-success">Celui-ci dispose d'une interface de jeu permettant au Maître du Jeu de contrôler la partie directement sans avoir besoin de matériel.</p>
  271. <p class="text-primary">Le jeu ne requiert qu'un PC relié à internet et de quelques dés. Tout est automatisé.</p>
  272. <p class="text-warning">Le Maître du Jeu peut ensuite créer sa partie en s'appuyant sur tous les outils existants.</p>
  273. <p class="text-danger">Un&nbsp;&nbsp;<a href="http://wiki.ecomonde.land" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;WIKI</a>&nbsp;&nbsp;est à disposition pour un plus grand partage des ressources.</p>
  274. </div>
  275. <div class="col-lg-5">
  276. <h2>Créer un compte</h2>
  277. <form class="form-horizontal well" role="form" method="post" action="register.php" enctype="multipart/form-data">
  278. <fieldset>
  279. <div class="form-group">
  280. <label for="pseudo" class="col-lg-3 control-label">Pseudo</label>
  281. <div class="col-lg-9">
  282. <input type="text" class="form-control" name="pseudo" placeholder="Pseudo">
  283. </div>
  284. </div>
  285. <div class="form-group">
  286. <label for="Email" class="col-lg-3 control-label">E-mail</label>
  287. <div class="col-lg-9">
  288. <input type="text" class="form-control" name="email" placeholder="E-mail">
  289. </div>
  290. </div>
  291. <div class="form-group">
  292. <label for="password" class="col-lg-3 control-label">Mot de passe</label>
  293. <div class="col-lg-9">
  294. <input type="password" class="form-control" name="pass" placeholder="Mot de passe">
  295. </div>
  296. </div>
  297. <div class="form-group">
  298. <div class="col-lg-9 col-lg-offset-3">
  299. <button type="submit" class="btn btn-primary"><i class="ionicons ion-checkmark"></i>&nbsp;&nbsp;OK</button>
  300. </div>
  301. </div>
  302. </fieldset>
  303. </form>
  304. </div>
  305. <div class="col-lg-1"></div>
  306. </div>
  307. <div class="modal fade" id="modal_login">
  308. <div class="modal-dialog">
  309. <div class="modal-content">
  310. <form class="form-horizontal well" role="form" method="post" action="session.php" enctype="multipart/form-data">
  311. <div class="modal-header">
  312. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  313. <h4 class="modal-title"><i class="ionicons ion-power"></i>&nbsp;&nbsp;CONNEXION</h4>
  314. </div>
  315. <div class="modal-body">
  316. <div class="form-group">
  317. <label class="control-label" for="focusedInput">Email :</label>
  318. <input class="form-control" id="focusedInput" type="text" name="email">
  319. </div>
  320. <div class="form-group">
  321. <label class="control-label" for="focusedInput">Mot de passe :</label>
  322. <input class="form-control" id="focusedInput" type="password" name="password">
  323. </div>
  324. </div>
  325. <div class="modal-footer">
  326. <a href="mailto:contact@heuzef.com?subject=Contact%20depuis%20heuzef.com" onclick="window.open('https://mail.google.com/mail/?view=cm&amp;tf=1&amp;to=contact@heuzef.com&amp;cc=&amp;bcc=&amp;su=[EcoMonde]%20Probleme%20avec%20mon%20compte&amp;body=Bonjour,','_blank');return false;">Un problème avec votre compte ?</a>
  327. &nbsp;&nbsp;<button type="submit" class="btn btn-info">Connexion</button>
  328. </div>
  329. </form>
  330. </div>
  331. </div>
  332. </div>
  333. <?php endif; ?>
  334. <script src="./js/jquery-1.10.2.min.js"></script>
  335. <script src="./js/bootstrap.min.js"></script>
  336. <script src="./js/bootswatch.js"></script>
  337. </body>
  338. </html>