コード例 #1
0
                                                             <?php 
                         for ($x = 0; $x <= 25; $x++) {
                             if ($x < 25) {
                                 echo $archivoFinal[$x];
                             } else {
                                 echo $archivoFinal[$x];
                             }
                         }
                         ?>
                                                             <br>
                                                             <?php 
                         echo date("Y/m/d  H:i:s", fileatime($raiz . $archivoFinal));
                         ?>
                                                             <br>
                                                             <?php 
                         echo formato_tam(filesize($raiz . $archivoFinal));
                         ?>
                                                         </td>
                                                     </tr>
                                                 </table>
                                             </div>
                                         </a>
                                         <?php 
                     }
                 }
             } else {
                 echo '<label style="font-size:14px;font-family:verdana;">El nombre de los Directorios Finales no Respetan El Estandar Establecido</label>';
             }
         }
     }
 }
コード例 #2
0
        function listar_ficheros($carpeta)
        {
            require_once "ActionLaboratorio.php";
            $o_ActionLaboratorio = new ActionLaboratorio();
            $resultadoComparativo = $o_ActionLaboratorio->comparaExistentesBaseDatosConDirectorio();
            if (is_dir($carpeta)) {
                $scanarray = scandir($carpeta);
                // print_r($resultadoComparativo);
                for ($i = 0; $i < count($scanarray); $i++) {
                    if ($scanarray[$i] != "." && $scanarray[$i] != "..") {
                        if (is_file($carpeta . "/" . $scanarray[$i])) {
                            $thepath = pathinfo($carpeta . "/" . $scanarray[$i]);
                            if ($thepath['extension'] == 'xls' || $thepath['extension'] == 'xlsx') {
                                for ($array = 0; $array <= count($resultadoComparativo) - 1; $array++) {
                                    if ($resultadoComparativo[$array][1] == $scanarray[$i]) {
                                        if (date("Y-m-d H:i:s", filemtime($carpeta . "/" . $scanarray[$i])) == $resultadoComparativo[$array][2]) {
                                            // echo date("Y-m-d H:i:s", fileatime($carpeta . "/" . $scanarray[$i])) . ' - ' . $resultadoComparativo[$array][2] . '<br>';
                                            $class1 = "cuboxlsUno";
                                            $class2 = "capaUno";
                                            $color = "green";
                                        } else {
                                            if (date("Y-m-d H:i:s", filemtime($carpeta . "/" . $scanarray[$i])) != $resultadoComparativo[$array][2]) {
                                                $class1 = "cuboxlsDos";
                                                $class2 = "capaDos";
                                                $color = "red";
                                            }
                                        }
                                        $array = count($resultadoComparativo) - 1;
                                    } else {
                                        $class1 = "cuboxlsTres";
                                        $class2 = "capaTres";
                                        $color = "blue";
                                    }
                                }
                                ?>
                                <div class="<?php 
                                echo $class1;
                                ?>
" title="Seleccionar" onClick="SeleccionarArchivo('<?php 
                                echo $scanarray[$i];
                                ?>
','<?php 
                                echo date("Y-m-d H:i:s", filemtime($carpeta . "/" . $scanarray[$i]));
                                ?>
','<?php 
                                echo date("Y-m-d H:i:s", fileatime($carpeta . "/" . $scanarray[$i]));
                                ?>
','<?php 
                                echo $color;
                                ?>
');">
                                    <table border="0">
                                        <tr>
                                            <td valign="middle" width="25">
                                                <a title="Abrir Archivo Excel" href="<?php 
                                echo '../../../../carpetaDocumentos/materialesLaboratorio/microBilogiaActivo/' . $scanarray[$i];
                                ?>
"><img src="../../../imagen/icono/grid.png" style="width:25px;"></a>&nbsp;&nbsp;&nbsp;&nbsp;
                                            </td>
                                            <td>
                                                <table class="<?php 
                                echo $class2;
                                ?>
" title="Datos del Archivo">
                                                    <tr title="Nombre">
                                                        <td><b>Archivo:&nbsp;&nbsp;</b></td>
                                                        <td><?php 
                                echo $scanarray[$i];
                                ?>
</td>
                                                    </tr>
                                                    <tr title="Extencion">
                                                        <td><b>Extencion:&nbsp;&nbsp;</b></td>
                                                        <td><?php 
                                echo $thepath['extension'];
                                ?>
</td>
                                                    </tr>
                                                    <tr title="Tamaño">
                                                        <td><b>Tamaño:&nbsp;&nbsp;</b></td>
                                                        <td><?php 
                                echo formato_tam(filesize($carpeta . "/" . $scanarray[$i]));
                                ?>
</td>
                                                    </tr>
                                                    <tr title="Fecha Creacion">
                                                        <td><b>Fecha Creacion:&nbsp;&nbsp;</b></td>
                                                        <td><?php 
                                echo date("Y-m-d H:i:s", filemtime($carpeta . "/" . $scanarray[$i]));
                                ?>
</td>
                                                    </tr>
                                                    <tr title="Fecha Modificacion">
                                                        <td><b>Fecha Modificacion:&nbsp;&nbsp;</b></td>
                                                        <td><?php 
                                echo date("Y-m-d H:i:s", fileatime($carpeta . "/" . $scanarray[$i]));
                                ?>
</td>
                                                    </tr>
                                                </table>

                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <?php 
                            }
                        }
                    }
                }
            } else {
                echo "La ruta no se encuentra...";
            }
        }