Browse Source

icon off

master
heuzef 10 years ago
parent
commit
c8234bdbe2
5 changed files with 80 additions and 2 deletions
  1. +24
    -0
      change_map.php
  2. +38
    -2
      index.php
  3. +18
    -0
      medias/c0f08ae603e364cb554fe71c9fc94ffd/.xml
  4. BIN
      medias/c0f08ae603e364cb554fe71c9fc94ffd/map.jpg
  5. +0
    -0
      medias/map.jpg

+ 24
- 0
change_map.php View File

@@ -0,0 +1,24 @@
<?php

if($_GET){
$url = $_GET['url'];
$name = basename($url);
list($txt, $ext) = explode(".", $name);
$name = "map.jpg";

if($ext == "jpg" or $ext == "png"){
$upload = file_put_contents("uploads/$name",file_get_contents($url));

if($upload)
echo "Success: <a href='uploads/".$name."' target='_blank'>Check Uploaded</a>"; else "Erreur !";
}
else{
echo "Erreur !";
}
}
?>

<!-- <h3>Paste the url and hit enter!</h3>
<form action="" method="post">
Your URL: <input type="text" name="url" />
</form> -->

+ 38
- 2
index.php View File

@@ -20,6 +20,11 @@ $message[4]='
<button type="button" class="close" data-dismiss="alert">X</button>
<h4>Oups !</h4>
<p>Vous devez vous connecter pour pouvoir jouer ;)</p>';
$message[5]='
<div class="col-lg-6 alert alert-dismissable alert-success">
<button type="button" class="close" data-dismiss="alert">X</button>
<h4>OK !</h4>
<p>Votre carte est à jour !</p>';
?>
<!DOCTYPE html>
<html lang="fr">
@@ -54,7 +59,7 @@ $message[4]='
<ul class="nav navbar-nav navbar-right">
<?php if($status != 0): ?>
<li><?php echo '<img class="img-circle" src="http://gravatar.com/avatar/'.$hash.'?s=50" alt="gravatar" />'; ?>&nbsp;&nbsp;<strong><?php echo strtoupper($pseudo); ?></strong></li>
<li><a href="logout.php"><i class="glyphicon glyphicon-log-out"></i>&nbsp;&nbsp;DECONNEXION</a></li>
<li><a href="logout.php"><i class="glyphicon glyphicon-off"></i>&nbsp;&nbsp;DECONNEXION</a></li>
<?php elseif($status == 0): ?>
<li><a data-toggle="modal" data-target="#modal_login"><i class="glyphicon glyphicon-log-in"></i>&nbsp;&nbsp;CONNEXION</a></li>
<?php endif; ?>
@@ -125,7 +130,7 @@ $message[4]='
</p>
<hr />
<p>
<a href="#" class="btn btn-default btn-lg disabled"><i class="glyphicon glyphicon-map-marker"></i>&nbsp;&nbsp;Changer la carte</a>
<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>
</p>
</div>
</div>
@@ -233,6 +238,37 @@ $message[4]='
</div>
</div>

<div class="modal fade" id="modal_change_map">
<div class="modal-dialog">
<div class="modal-content">
<form class="form-horizontal well" role="form" method="post" action="" enctype="multipart/form-data">
<div class="modal-header">
<a type="button" class="close" data-dismiss="modal" aria-hidden="true" style="color:black;">X</a>
<h4 class="modal-title"><i class="glyphicon glyphicon-map-marker"></i>&nbsp;&nbsp;CHANGER LA CARTE</h4>
</div>
<div class="modal-body">
<?php
if($_POST){
$url_map = $_POST['url_map'];
$name = basename($url_map);
list($txt, $ext) = explode(".", $name);
$name = "map.jpg";
if($ext == "jpg"){
$upload = file_put_contents("./medias/".$name,file_get_contents($url_map));}}
?>
<h4>Entrez le lien du fichier. Seul les fichiers <strong>.jpg</strong> sont autorisés.</h4>
<label class="control-label" for="focusedInput">URL :</label>
<input class="form-control" id="focusedInput" type="text" name="url_map" value="http://ecomonde/medias/default/map.jpg">
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-info">Mise à jour de la carte</button>
</div>
</form>
</form>
</div>
</div>
</div>

<?php elseif($status == 0): ?>

<div class="container-fluid">


+ 18
- 0
medias/c0f08ae603e364cb554fe71c9fc94ffd/.xml View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<response>
<entry>
<nom></nom>
<hp>10</hp>
<xp></xp>
<ecos>
<verte>0</verte>
<bleue>0</bleue>
<jaune>0</jaune>
<rouge>0</rouge>
<blanche>0</blanche>
<noire>0</noire>
</ecos>
<trans>default</trans>
<notes>...</notes>
</entry>
</response>

BIN
medias/c0f08ae603e364cb554fe71c9fc94ffd/map.jpg View File

Before After
Width: 2000  |  Height: 1400  |  Size: 1.0 MiB

+ 0
- 0
medias/map.jpg View File


Loading…
Cancel
Save