Browse Source

ajout change music soft (pas fonctionnel)

master
heuzef 10 years ago
parent
commit
5aa625c9d6
7 changed files with 68 additions and 48 deletions
  1. +1
    -1
      change_map.php
  2. +26
    -0
      change_music_soft.php
  3. +38
    -3
      index.php
  4. +0
    -21
      medias/c0f08ae603e364cb554fe71c9fc94ffd/Derpy.xml
  5. +0
    -21
      medias/c0f08ae603e364cb554fe71c9fc94ffd/prout.xml
  6. BIN
      medias/c0f08ae603e364cb554fe71c9fc94ffd/soft.mp3
  7. +3
    -2
      play/index.php

+ 1
- 1
change_map.php View File

@@ -23,4 +23,4 @@ else {
header("location:index.php?msg=6");
}

?>
?>

+ 26
- 0
change_music_soft.php View File

@@ -0,0 +1,26 @@
<?php
include "header.php";
$nom = "soft.mp3";

$uploaddir = './medias/'.$hash.'/';
$uploadfile = $uploaddir . basename($nom);

$extensions_valides = array( 'mp3' );
$extension_upload = strtolower( substr( strrchr($_FILES['userfile']['name'], '.') ,1) );

if ( in_array($extension_upload,$extensions_valides) ) {

$resultat = move_uploaded_file($_FILES['userfile']['tmp_name'],$uploadfile);

if ($resultat) header("location:index.php?msg=9");
else {
header("location:index.php?msg=10");
}

}

else {
header("location:index.php?msg=10");
}

?>

+ 38
- 3
index.php View File

@@ -1,5 +1,9 @@
<?php include "header.php";
$message[0]='';
$message[0]='
<div class="col-lg-6 alert alert-dismissable alert-danger">
<button type="button" class="close" data-dismiss="alert">X</button>
<h4>Erreur !</h4>
<p>Erreur !</p>';
$message[1]='
<div class="col-lg-6 alert alert-dismissable alert-success">
<button type="button" class="close" data-dismiss="alert">X</button>
@@ -40,6 +44,16 @@ $message[8]='
<button type="button" class="close" data-dismiss="alert">X</button>
<h4>ERREUR !</h4>
<p>Echec à l\'importation du joueur. Seul les fichiers <strong>.xml</strong> (10 M max) sont autorisés.</p>';
$message[9]='
<div class="col-lg-6 alert alert-dismissable alert-success">
<button type="button" class="close" data-dismiss="alert">X</button>
<h4>OK !</h4>
<p>Musique importé !</p>';
$message[10]='
<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 à l\'importation de la musique. Seul les fichiers <strong>.mp3</strong> (10 M max) sont autorisés.</p>';
?>
<!DOCTYPE html>
<html lang="fr">
@@ -121,12 +135,12 @@ $message[8]='
<hr />
<p>
<div class="btn-group">
<a href="#" class="btn btn-default btn-lg dropdown-toggle disabled" data-toggle="dropdown">
<a href="#" class="btn btn-default btn-lg dropdown-toggle" data-toggle="dropdown">
<i class="ionicons ion-music-note"></i>&nbsp;&nbsp;Changer les musiques
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="#" style="color:#CCC;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;SOFT</a></li>
<li><a data-toggle="modal" data-target="#modal_change_music_soft" style="color:#CCC;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;SOFT</a></li>
<li class="divider"></li>
<li><a href="#" style="color:#AAA;"><i class="ionicons ion-music-note"></i>&nbsp;&nbsp;TONIC</a></li>
<li class="divider"></li>
@@ -302,6 +316,27 @@ $message[8]='
</div>
</div>

<div class="modal fade" id="modal_change_music_soft">
<div class="modal-dialog">
<div class="modal-content">
<form class="form-horizontal well" role="form" method="post" action="change_music_soft.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="ionicons ion-map"></i>&nbsp;&nbsp;Changer la musique SOFT</h4>
</div>
<div class="modal-body">
<input type="hidden" name="MAX_FILE_SIZE" value="10048576" />
<label class="control-label" for="focusedInput">Seul les fichiers <strong>.mp3</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">Changer la musique SOFT</button>
</div>
</form>
</div>
</div>
</div>

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

<div class="container-fluid">


+ 0
- 21
medias/c0f08ae603e364cb554fe71c9fc94ffd/Derpy.xml View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<response>
<entry>
<nom>Derpy</nom>
<level>0</level>
<hp>10</hp>
<xp>0</xp>
<money>0</money>
<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>
<gift>10</gift>
</entry>
</response>

+ 0
- 21
medias/c0f08ae603e364cb554fe71c9fc94ffd/prout.xml View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<response>
<entry>
<nom>prout</nom>
<level>0</level>
<hp>10</hp>
<xp>0</xp>
<money>0</money>
<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>
<gift>10</gift>
</entry>
</response>

BIN
medias/c0f08ae603e364cb554fe71c9fc94ffd/soft.mp3 View File


+ 3
- 2
play/index.php View File

@@ -7,6 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>EcoMonde</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="../img/favicon.png" type="image/x-icon" />
<link rel="stylesheet" href="../css/bootstrap.css" media="screen">
<link rel="stylesheet" href="../css/bootswatch.min.css">
<link rel="stylesheet" href="../css/ionicons.min.css">
@@ -161,6 +162,6 @@
</body>
</html>

<?php elseif($status == 0):
<?php elseif($status == 0):
header("location:../index.php?msg=4");
endif; ?>
endif; ?>

Loading…
Cancel
Save