|
1234567891011121314151617181920212223242526 |
- <?php
- include "header.php";
- $nom = "map.jpg";
-
- $uploaddir = './medias/'.$hash.'/';
- $uploadfile = $uploaddir . basename($nom);
-
- $extensions_valides = array( 'jpg' , 'jpeg' );
- $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=5");
- else {
- header("location:index.php?msg=6");
- }
-
- }
-
- else {
- header("location:index.php?msg=6");
- }
-
- ?>
|