|
|
@@ -25,6 +25,11 @@ $message[5]=' |
|
|
|
<button type="button" class="close" data-dismiss="alert">X</button> |
|
|
|
<h4>OK !</h4> |
|
|
|
<p>Votre carte est à jour !</p>'; |
|
|
|
$message[6]=' |
|
|
|
<div class="col-lg-6 alert alert-dismissable alert-danger"> |
|
|
|
<button type="button" class="close" data-dismiss="alert">X</button> |
|
|
|
<h4>ERREUR !</h4> |
|
|
|
<p>Echec de mise à jour de votre carte. Seul les fichiers <strong>.jpg</strong> (10 Mo max) sont autorisés.</p>'; |
|
|
|
?> |
|
|
|
<!DOCTYPE html> |
|
|
|
<html lang="fr"> |
|
|
@@ -241,30 +246,20 @@ $message[5]=' |
|
|
|
<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"> |
|
|
|
<form class="form-horizontal well" role="form" method="post" action="change_map.php" 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> 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"> |
|
|
|
<input type="hidden" name="MAX_FILE_SIZE" value="10048576" /> |
|
|
|
<label class="control-label" for="focusedInput">Seul les fichiers <strong>.jpg</strong> (10 Mo max) sont autorisés.</label> |
|
|
|
<input class="form-control" id="focusedInput" type="file" name="userfile"> |
|
|
|
</div> |
|
|
|
<div class="modal-footer"> |
|
|
|
<button type="submit" class="btn btn-info">Mise à jour de la carte</button> |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|