您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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