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.
 
 
 
 

356 line
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="shortcut icon" href="./img/favicon.png" type="image/x-icon" />
  41. <link rel="stylesheet" href="./css/bootstrap.css" media="screen">
  42. <link rel="stylesheet" href="./css/bootswatch.min.css">
  43. <link rel="stylesheet" href="./css/ionicons.min.css">
  44. <link rel="stylesheet" href="./css/ecomonde.css">
  45. </head>
  46. <body>
  47. <div class="container-fluid">
  48. <div class="col-lg-1"></div>
  49. <div class="col-lg-3">
  50. <a href="index.php"><img class="img-responsive" src="./img/logo_0.png" alt="logo" /></a>
  51. </div>
  52. <div class="col-lg-6">
  53. <div class="navbar navbar-default">
  54. <div class="navbar-header">
  55. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-responsive-collapse">
  56. <span class="icon-bar"></span>
  57. <span class="icon-bar"></span>
  58. <span class="icon-bar"></span>
  59. </button>
  60. </div>
  61. <div class="navbar-collapse collapse navbar-responsive-collapse">
  62. <ul class="nav navbar-nav">
  63. <li><a href="http://wiki.ecomonde.land" target="_blank"><i class="ionicons ion-android-book"></i>&nbsp;&nbsp;WIKI</a></li>
  64. <li><a href="https://github.com/heuzef/ecomonde" target="_blank"><i class="ionicons ion-social-github"></i>&nbsp;&nbsp;GITHUB</a></li>
  65. <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>
  66. </ul>
  67. <ul class="nav navbar-nav navbar-right">
  68. <?php if($status != 0): ?>
  69. <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>
  70. &nbsp;&nbsp;
  71. <a href="logout.php" class="btn btn-danger btn-xs"><i class="ionicons ion-power"></i></a>&nbsp;&nbsp;
  72. <?php elseif($status == 0): ?>
  73. <a class="btn btn-success btn-xs" data-toggle="modal" data-target="#register"><i class="ionicons ion-plus"></i>&nbsp;&nbsp;INSCRIPTION</a>
  74. <a class="btn btn-info btn-xs" data-toggle="modal" data-target="#modal_login"><i class="ionicons ion-power"></i>&nbsp;&nbsp;CONNEXION</a>
  75. <?php endif; ?>
  76. </ul>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="col-lg-1"></div>
  81. </div>
  82. <hr />
  83. <?php if(isset($_GET["msg"])){?>
  84. <div class="container-fluid">
  85. <div class="col-lg-3"></div>
  86. <?php echo $message[$_GET["msg"]]; ?>
  87. </div>
  88. <div class="col-lg-3"></div>
  89. </div>
  90. <?php } else {} ?>
  91. <?php if($status != 0):?>
  92. <div class="container-fluid">
  93. <div class="col-lg-1"></div>
  94. <div class="col-lg-3">
  95. <div class="panel panel-default">
  96. <div class="panel-heading"><i class="ionicons ion-gear-a"></i>&nbsp;&nbsp;<strong>Configurer votre partie</strong></div>
  97. <div class="panel-body">
  98. <p>
  99. <a href="play" class="btn btn-info btn-lg" target="_blank"><i class="ionicons ion-play"></i>&nbsp;&nbsp;Lancer votre partie</a>
  100. <p>
  101. <hr />
  102. <p>
  103. <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>
  104. </p>
  105. <hr />
  106. <p>
  107. <a href="#" class="btn btn-default btn-lg disabled"><i class="glyphicon glyphicon-import"></i>&nbsp;&nbsp;Importer un joueur (.XML)</a>
  108. </p>
  109. <hr />
  110. <p>
  111. <div class="btn-group">
  112. <a href="#" class="btn btn-default btn-lg dropdown-toggle disabled" data-toggle="dropdown">
  113. <i class="ionicons ion-music-note"></i>&nbsp;&nbsp;Changer les musiques
  114. <span class="caret"></span>
  115. </a>
  116. <ul class="dropdown-menu">
  117. <li><a href="#" style="color:#CCC;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;SOFT</a></li>
  118. <li class="divider"></li>
  119. <li><a href="#" style="color:#AAA;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;TONIC</a></li>
  120. <li class="divider"></li>
  121. <li><a href="#" style="color:#000;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;HARD</a></li>
  122. <li class="divider"></li>
  123. <li><a href="#" style="color:#ADDFFF;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;LIGHT</a></li>
  124. <li class="divider"></li>
  125. <li><a href="#" style="color:#8128B5;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;DARK</a></li>
  126. </ul>
  127. </div>
  128. </p>
  129. <hr />
  130. <p>
  131. <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>
  132. </p>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="col-lg-7">
  137. <div class="panel panel-default">
  138. <div class="panel-heading"><i class="ionicons ion-person"></i>&nbsp;&nbsp;<strong>Joueurs présents dans votre partie :</strong></div>
  139. <div class="panel-body">
  140. <table class="table table-striped table-hover ">
  141. <thead>
  142. <tr>
  143. <th></th>
  144. <th>Nom</th>
  145. <th><i class="ionicons ion-heart" style="color:red;"></i></th>
  146. <th><i class="ionicons ion-flash" style="color:#FFD700;"></i></th>
  147. <th><i class="ionicons ion-egg" style="color:brown"></i></th>
  148. <th><i class="ionicons ion-fireball" style="color:grey"></i></th>
  149. <th><i class="ionicons ion-fireball" style="color:#ADDFFF"></i></th>
  150. <th><i class="ionicons ion-fireball" style="color:#8128B5"></i></th>
  151. <th><i class="ionicons ion-android-note" style="color:#000"></i></th>
  152. </tr>
  153. </thead>
  154. <tbody>
  155. <?php
  156. // nombre de gamers
  157. $f = 0;
  158. foreach(glob('*.xml') as $f) {$f+=1;}
  159. $nb_membres = count(glob('./medias/'.$hash.'/*.xml'));
  160. // liste des gamers
  161. $folder = "./medias/".$hash."/";
  162. $dossier = opendir($folder);
  163. while ($fichier = readdir($dossier))
  164. {
  165. if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3")
  166. {
  167. $gamers = explode(".xml", $fichier);
  168. $xml = simplexml_load_file('./medias/'.$hash.'/'.$fichier);
  169. if (!isset($itemnb)) {
  170. $itemnb=0;
  171. } else {
  172. $itemnb++;
  173. }
  174. foreach($xml->entry as $entry) {
  175. $somme_ecos=$entry->ecos->verte+$entry->ecos->bleue+$entry->ecos->jaune+$entry->ecos->rouge;
  176. echo '<tr class="active">
  177. <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>
  178. <td><strong>['.$entry->level.']</strong>&nbsp;'.$entry->nom.'</td>
  179. <td>'.$entry->hp.'</td>
  180. <td>'.$entry->xp.'</td>
  181. <td>'.$entry->money.'</td>
  182. <td>'.$somme_ecos.'</td>
  183. <td>'.$entry->ecos->blanche.'</td>
  184. <td>'.$entry->ecos->noire.'</td>
  185. <td>'.substr($entry->notes, 0, 40).'...</td>
  186. </tr>';
  187. }
  188. }
  189. }
  190. closedir($dossier);
  191. ?>
  192. </tbody>
  193. </table>
  194. </div>
  195. </div>
  196. </div>
  197. <div class="col-lg-1"></div>
  198. </div>
  199. <div class="modal fade" id="modal_new_player">
  200. <div class="modal-dialog">
  201. <div class="modal-content">
  202. <form class="form-horizontal well" role="form" method="post" action="new_player.php" enctype="multipart/form-data">
  203. <div class="modal-header">
  204. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  205. <h4 class="modal-title"><i class="ionicons ion-person-add"></i>&nbsp;&nbsp;NOUVEAU JOUEUR</h4>
  206. </div>
  207. <div class="modal-body">
  208. <div class="form-group">
  209. <label class="control-label" for="focusedInput">Nom :</label>
  210. <input class="form-control" id="focusedInput" type="text" name="player_name" maxlength="12" value="Derpy">
  211. </div>
  212. <div class="form-group">
  213. <label class="control-label" for="focusedInput">Nombre d'XP</label>
  214. <div class="input-group">
  215. <span class="input-group-addon"><i class="ionicons ion-flash" style="color:#FFD700;";></i></span>
  216. <select class="form-control" id="focusedInput" name="player_xp">
  217. <option>0</option>
  218. <option>10</option>
  219. <option>50</option>
  220. <option>100</option>
  221. <option>999</option>
  222. </select>
  223. </div>
  224. </div>
  225. <div class="form-group">
  226. <label class="control-label" for="focusedInput">Nombre d'Orbes</label>
  227. <div class="input-group">
  228. <span class="input-group-addon"><i class="ionicons ion-egg" style="color:brown;";></i></span>
  229. <select class="form-control" id="focusedInput" name="player_money">
  230. <option>0</option>
  231. <option>10</option>
  232. <option>50</option>
  233. <option>100</option>
  234. <option>999</option>
  235. </select>
  236. </div>
  237. </div>
  238. </div>
  239. <div class="modal-footer">
  240. <button type="submit" class="btn btn-info">Création du joueur</button>
  241. </div>
  242. </form>
  243. </div>
  244. </div>
  245. </div>
  246. <div class="modal fade" id="modal_change_map">
  247. <div class="modal-dialog">
  248. <div class="modal-content">
  249. <form class="form-horizontal well" role="form" method="post" action="change_map.php" enctype="multipart/form-data">
  250. <div class="modal-header">
  251. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  252. <h4 class="modal-title"><i class="ionicons ion-map"></i>&nbsp;&nbsp;CHANGER LA CARTE</h4>
  253. </div>
  254. <div class="modal-body">
  255. <input type="hidden" name="MAX_FILE_SIZE" value="10048576" />
  256. <label class="control-label" for="focusedInput">Seul les fichiers <strong>.jpg</strong> (10 Mo max) sont autorisés.</label>
  257. <input class="form-control" id="focusedInput" type="file" name="userfile">
  258. </div>
  259. <div class="modal-footer">
  260. <button type="submit" class="btn btn-info">Mise à jour de la carte</button>
  261. </div>
  262. </form>
  263. </div>
  264. </div>
  265. </div>
  266. <?php elseif($status == 0): ?>
  267. <div class="container-fluid">
  268. <div class="col-lg-1"></div>
  269. <div class="col-lg-5">
  270. <h2>Présentation</h2>
  271. <p><strong>EcoMonde est un Jeu de Rôle d'aventure interactif.</strong></p>
  272. <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>
  273. <p class="text-primary">Le jeu ne requiert qu'un PC relié à internet et de quelques dés. Tout est automatisé.</p>
  274. <p class="text-warning">Le Maître du Jeu peut ensuite créer sa partie en s'appuyant sur tous les outils existants.</p>
  275. <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>
  276. </div>
  277. <div class="col-lg-5">
  278. <iframe width="560" height="315" src="//www.youtube-nocookie.com/embed/yYkinIyzkww?rel=0&amp;showinfo=0" frameborder="0" allowfullscreen></iframe>
  279. </div>
  280. <div class="col-lg-1"></div>
  281. </div>
  282. <div class="modal fade" id="modal_login">
  283. <div class="modal-dialog">
  284. <div class="modal-content">
  285. <form class="form-horizontal well" role="form" method="post" action="session.php" enctype="multipart/form-data">
  286. <div class="modal-header">
  287. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  288. <h4 class="modal-title"><i class="ionicons ion-power"></i>&nbsp;&nbsp;CONNEXION</h4>
  289. </div>
  290. <div class="modal-body">
  291. <div class="form-group">
  292. <label class="control-label" for="focusedInput">Email :</label>
  293. <input class="form-control" id="focusedInput" type="text" name="email">
  294. </div>
  295. <div class="form-group">
  296. <label class="control-label" for="focusedInput">Mot de passe :</label>
  297. <input class="form-control" id="focusedInput" type="password" name="password">
  298. </div>
  299. </div>
  300. <div class="modal-footer">
  301. <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>
  302. &nbsp;&nbsp;<button type="submit" class="btn btn-info">Connexion</button>
  303. </div>
  304. </form>
  305. </div>
  306. </div>
  307. </div>
  308. <div class="modal fade" id="register">
  309. <div class="modal-dialog">
  310. <div class="modal-content">
  311. <form class="form-horizontal well" role="form" method="post" action="register.php" enctype="multipart/form-data">
  312. <div class="modal-header">
  313. <a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
  314. <h4 class="modal-title"><i class="ionicons ion-plus"></i>&nbsp;&nbsp;INSCRIPTION</h4>
  315. </div>
  316. <div class="modal-body">
  317. <div class="form-group">
  318. <label class="control-label" for="focusedInput">Pseudo :</label>
  319. <input class="form-control" id="focusedInput" type="text" name="pseudo">
  320. </div>
  321. <div class="form-group">
  322. <label class="control-label" for="focusedInput">E-mail :</label>
  323. <input class="form-control" id="focusedInput" type="text" name="email">
  324. </div>
  325. <div class="form-group">
  326. <label class="control-label" for="focusedInput">Mot de passe :</label>
  327. <input class="form-control" id="focusedInput" type="password" name="password">
  328. </div>
  329. </div>
  330. <div class="modal-footer">
  331. &nbsp;&nbsp;<button type="submit" class="btn btn-primary"><i class="ionicons ion-checkmark"></i>&nbsp;&nbsp;OK</button>
  332. </div>
  333. </form>
  334. </div>
  335. </div>
  336. </div>
  337. <?php endif; ?>
  338. <script src="./js/jquery-1.10.2.min.js"></script>
  339. <script src="./js/bootstrap.min.js"></script>
  340. <script src="./js/bootswatch.js"></script>
  341. </body>
  342. </html>