Created
          March 10, 2010 18:29 
        
      - 
      
 - 
        
Save juananruiz/328177 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| $autorizados = array(jjmc,jmsb,juanan); | |
| //comprueba si se esta autorizado para esta página | |
| foreach ($autorizados as $value) | |
| { | |
| if ($value == $_SESSION["usuario"]) | |
| {$smarty->assign('autorizado', 'si');} | |
| } | |
| //directorio de trabajo | |
| $dir = "uploads/calidad/GE_excelencia"; | |
| //subir archivos | |
| if ($_POST) | |
| { | |
| move_uploaded_file ( $_FILES [ 'archivo' ][ 'tmp_name' ], $dir . '/' . $_FILES [ 'archivo' ][ 'name' ]); | |
| } | |
| //Creamos el array con nuestros ficheros | |
| $directorio = opendir($dir); | |
| $archivosGE = array(); | |
| while ($archivo = readdir($directorio)) | |
| $archivosGE[] = array($archivo,date ("d-m-Y", filemtime($dir."/".$archivo))); | |
| closedir($directorio); | |
| $smarty->assign('archivosGE',$archivosGE); | |
| ?> | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment