-   
- <? 
- require('includes/application_top.php');  
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : ''); 
- if (tep_not_null($action)) {  
- error_reporting(0); 
- $d = dir('C:\imagenesasubir');  
- $PathServer="images";    
- $id_con = ftp_connect("www.misitio.com"); 
- // inicio de sesion con nombre de usuario y contrasenya 
-    
- $resultado_login = ftp_login($id_con, "usuarioftp", "contraseña"); 
- if ((!$id_con) || (!$resultado_login)) { 
-        echo "¡La conexión FTP ha fallado!"; 
-        echo "Se ha intentado la conexion con blablabla para el " . 
-              "usuario php_ftp"; 
-        exit; 
-    } else { 
-        echo "Conectado con psico libros, para el usuario php_ftp"; 
-     echo "<ul>"; 
-         while($file = $d->read()) { 
-             if ($file != "." && $file != "..") { 
-          echo "<li>".$d->path.$file . "\n<br />"; 
-   
-           $remoto=$PathServer."\\".$file; 
-           $local=$d->path.$file; 
-   
-           $upload = ftp_put($id_con, $remoto,$local, FTP_BINARY); 
-   
-           if ($upload)  
-             { 
-               echo "Subido: $file \n"; 
-             } 
-           else  
-             { 
-               echo "Hubo un problema con :$file\n"; 
-             } 
-           echo "</li><br /><br />"; 
-           } 
-             } 
-        @ftp_close($id_con); 
-        $d->close(); 
-      echo "</ul>";  
-   }    
-   
- } 
-   else { 
- ?> 
- <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> 
- <html <?php echo HTML_PARAMS; ?>> 
- <head> 
- <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> 
- <title><?php echo TITLE; ?></title> 
- <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> 
- <script language="javascript" src="includes/general.js"></script> 
- </head> 
- <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();"> 
- <div id="spiffycalendar" class="text"></div> 
- <!-- header //--> 
- <?php require(DIR_WS_INCLUDES . 'header.php'); ?> 
- <!-- header_eof //--> 
-   
- <!-- body //--> 
- <table border="0" width="100%" cellspacing="2" cellpadding="2"> 
-   <tr> 
-     <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft"> 
- <!-- left_navigation //--> 
- <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> 
- <!-- left_navigation_eof //--> 
-     </table></td> 
- <!-- body_text //--> 
-     <td width="100%" valign="top"> 
-        Presione el botón para subir las imágenes... 
-        <h3>LAS IMAGENES TIENEN QUE ESTAR EN <B>C:\IMAGENESASUBIR</B> !!! </h3> 
- <? 
-   echo tep_draw_form('subirimg','subirimg.php','action=subir', 'post', 'enctype="multipart/form-data"');  
- //  echo 'Archivo categoria: ' . tep_draw_file_field('categoria',true); 
-   echo '<br>       ' . tep_image_submit('button_save.gif', IMAGE_SAVE); 
- ?> 
-        </td> 
- <!-- body_text_eof //--> 
-   </tr> 
- </table> 
- <!-- body_eof //--> 
-   
- <!-- footer //--> 
- <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> 
- <!-- footer_eof //--> 
- <br> 
- </body> 
- </html> 
- <?php require(DIR_WS_INCLUDES . 'application_bottom.php');  
-  } 
-  ?> 
-   
-   
-