home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / admin / indexer.php < prev    next >
Encoding:
PHP Script  |  2004-03-25  |  19.3 KB  |  284 lines

  1. <?
  2.  
  3. /****************************** LICENSE/LICEN╟A ********************************
  4.  
  5.  PHP Directory Indexer Version 0.2
  6.  Copyright (C) 2002-2003  Projecto Adamastor  (info@adamastor.org)
  7.  
  8.  This program is free software; you can redistribute it and/or
  9.  modify it under the terms of the GNU General Public License
  10.  as published by the Free Software Foundation; either version 2
  11.  of the License, or (at your option) any later version.
  12.  
  13.  This program is distributed in the hope that it will be useful,
  14.  but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  GNU General Public License for more details.
  17.  
  18.  You should have received a copy of the GNU General Public License
  19.  along with this program; if not, write to the Free Software
  20.  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  21.  
  22.  
  23.  More Info About The Licence At http://www.gnu.org/copyleft/gpl.html
  24.  
  25. *******************************************************************************/
  26.  
  27. $import_style = $_REQUEST["estilo"];
  28. $import_ordenar = $_REQUEST["ordenar"];
  29. $import_vista = $_REQUEST["showmode"];
  30.  
  31. if ($import_style != $null) { setcookie("devile-list_style", $import_style, time()+36000*60, "/", ""); }
  32. if ($import_ordenar != $null) { setcookie("devile-list_ordenar", $import_ordenar, time()+36000*60, "/", ""); }
  33. if ($import_vista != $null) { setcookie("devile-list_vista", $import_vista, time()+36000*60, "/", ""); }
  34.  
  35. error_reporting(0);
  36.  
  37. $directoria = urldecode($_SERVER["REQUEST_URI"]);
  38. $stringA = $directoria;
  39. $stringA = strrev($stringA);
  40. $result = strchr($stringA,"/");
  41. $subhost = strrev($result);
  42. /*if(strchr($directoria,"?")) { Header("Location: http://" . $_SERVER["HTTP_HOST"] . $subhost); exit; }
  43. if ($directoria=="/") { die("<b><center>Permission Denied!</center></b>"); }
  44. else if ($directoria=="/indexer.php") { die("<b><center>Permission Denied!</center></b>"); }*/
  45. /*echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n";*/
  46. echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
  47. require "inc_indexer.php";
  48. global $opcao;
  49.  
  50. ?>
  51.  
  52. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="PT" lang="PT">
  53. <head>
  54. <?
  55. echo "<title>".$opcao['titulo']."</title>\n";
  56. ?>
  57. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  58. <style type="text/css" media="screen">
  59. <!--
  60. <? put_style(); ?>
  61. -->
  62. </style>
  63. </head>
  64. <body>
  65. <?
  66. put_form();
  67. if (($opcao['texto-mostrar']==1)&&($vista==0)) { echo "<h1 align=\"center\">".$opcao['texto']."</h1>"; }
  68. echo "<div class=\"dirview-group\">";
  69.  
  70. $alias_found=0;
  71. for($i=0;$i<count($user_alias);$i++) {
  72.     if ($size_alias[$i]!=0) {
  73.         if (strncmp($directoria, $user_alias[$i], $size_alias[$i]) == 0) {
  74. //            $directoria=str_replace($user_alias[$i], $disk_alias[$i], $directoria);
  75.             $directoria=substr_replace($directoria, $disk_alias[$i], 0, $size_alias[$i]);
  76.             $alias_found=1;
  77.             break;
  78.         }
  79.     }
  80. }
  81. if($alias_found==0) {
  82.     if (strncmp($directoria, "/~", 2) == 0) {
  83.         $directoria = str_replace("/~", "", $directoria);
  84.         $home = explode("/", $directoria);
  85.         $directoria = "/home/" . $home[0] . "/public_html/";
  86.         $i = 1;
  87.         while($home[$i] != $null) { $directoria = $directoria . "$home[$i]" . "/"; $i++; }
  88.     }
  89.     else { $directoria = $_SERVER["DOCUMENT_ROOT"] . "$directoria"; }
  90. }
  91. $dir = @opendir($directoria) or die("Ocorreu Um Erro Ao Tentar Abrir a Directoria: $directoria");
  92. $i=0;
  93.   while ($file = readdir($dir)) {
  94.     if(is_dir("$directoria$file")) {
  95.      if((strncmp($file,".",1) && ($file!=".."))) {
  96.       $dirs[0][$i]="$file";
  97.       $dirs[1][$i]=date($opcao['data-formato'], filemtime("$directoria$file"));
  98.       $shellfile = str_replace(" ", "\ ", "$directoria$file");
  99.       $shellfile = str_replace(")", "\)", "$shellfile");
  100.       $shellfile = str_replace("(", "\(", "$shellfile");
  101.       $dirs[2][$i]=exec("ls -1 $shellfile | wc -l");
  102.       $i++;
  103.       }
  104.     }
  105.   }
  106. closedir($dir);
  107. $i=0;
  108. $dir = @opendir($directoria) or die("Ocorreu Um Erro Ao Tentar Abrir a Directoria: $directoria");
  109.   while ($file = readdir($dir)) {
  110.       if( is_file("$directoria$file") ) {
  111.         if(strncmp($file,".",1)) {
  112.         $files[0][$i]="$file";
  113. //        $files[1][$i]=date($opcao['data-formato'], filemtime("$directoria$file"));
  114.     $files[1][$i] = filemtime("$directoria$file");
  115.         $files[2][$i]=filesize("$directoria$file");
  116.         if( ($vista == 1) && ($opcao['tipo'] == 1) ) {
  117.          if(is_readable("$directoria$file")) {
  118.           $shellfile = str_replace(")", "\)", "$directoria$file");
  119.           $shellfile = str_replace("(", "\(", "$shellfile");
  120.           $shellfile = str_replace(" ", "\ ", "$shellfile");
  121.           $shellfile = str_replace("'", "\'", "$shellfile");
  122.           $shellfile = str_replace("&", "\&", "$shellfile");
  123.           $files[3][$i]=exec("file -b $shellfile | cut -f 1 -d \",\"");
  124.          }
  125.          else {
  126.           //$files[3][$i]="Cannot Read The File";
  127.          }
  128.         }
  129.         $i++;
  130.         }
  131.       }
  132.   }
  133. closedir($dir);
  134. global $ord;
  135. if($files) {
  136. //    asort($files[$ord], SORT_STRING);
  137.     uasort($files[$ord], 'strnatcasecmp');
  138.     reset ($files);
  139. }
  140. if($dirs) {
  141. uasort($dirs[$ord], 'strnatcasecmp');
  142. reset ($dirs);
  143. }
  144. $i=0;
  145. if($vista==0) {
  146.  echo "<div class=\"dirview-item\"><div class=\"dirview-info\"><a href=\"../\"><img src=\"$directoria_file\" width=\"".$opcao['icon-width']."\" height=\"".$opcao['icon-height']."\" border=\"0\" alt=\"".$opcao['icon-dir']."\" /><br />../</a></div><div class=\"dirview-extinfo\"> </div></div>\n";
  147. }
  148. else if($vista==1) {
  149.  echo "<br /><table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\" style=\"background-color: #CCCCDD; padding: 1px 1px 1px 1px; margin-top: 0; margin-bottom: 0;\">
  150.         <tr style=\"font: 13px verdana, arial, helvetica, sans-serif; font-weight: bold; background-color: #CCCCDD; text-align: center; margin-top: 0; margin-bottom: 0; padding: 1px 1px 1px 1px;\">
  151.          <td> </td>
  152.          <td nowrap=\"nowrap\"><b>".$opcao['texto']."</b></td>
  153.          <td> </td>
  154.         </tr>
  155.         <tr><td colspan=\"3\">
  156.         <table border=\"2\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\" style=\"border-color: #ECECEC; background-color: #FFFFFF; border-top-width: 1px; border-left-width: 0px; border-right-width: 0px; border-bottom-width: 0px;\">
  157.         <tr>
  158.          <td width=\"".$opcao['icon-small-width']."\" style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:center; color: #000000;\" > </td>
  159.          <td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\"><b>".$opcao['lang-nome']."</b></td>";
  160.         if ($opcao['tamanho']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:right; color: #000000;\" nowrap=\"nowrap\"><b>".$opcao['lang-tamanho']."</b></td>"; }
  161.         if($opcao['itens']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:right; color: #000000;\" nowrap=\"nowrap\"><b>".$opcao['lang-itens']."  </b></td>"; }
  162.         if ($opcao['data']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\"><b>".$opcao['lang-modificado']."</b></td>"; }
  163.         if($opcao['tipo'] == 1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\"><b>".$opcao['lang-tipo']."</b></td>"; }
  164.         echo "</tr>
  165.         <tr>
  166.          <td width=\"".$opcao['icon-small-width']."\" style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:center; color: #000000;\"><img src=\"$small_directoria_file\" width=\"".$opcao['icon-small-width']."\" height=\"".$opcao['icon-small-height']."\" border=\"0\" alt=\"".$opcao['icon-dir']."\" /></td>
  167.          <td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" align=\"left\" nowrap=\"nowrap\"><a href=\"../\">../</a></td>";
  168.         if ($opcao['tamanho']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" align=\"right\" nowrap=\"nowrap\"> </td>"; }
  169.         if($opcao['itens']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\"> </td>"; }
  170.         if ($opcao['data']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\"> </td>"; }
  171.         if($opcao['tipo'] == 1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\">".$opcao['icon-dir']."</td>"; }
  172.         echo "</tr>\n";
  173. }
  174. //while($dirs[$i]!=$null) {
  175. if($dirs[0][0]!=$null) {
  176. while (list($i) = each($dirs[$ord])) {
  177.     if (strlen($dirs[0][$i])<$opcao['max-size']) {$dirs2[$i]=$dirs[0][$i]; }
  178.     else { $dirs2[$i]=substr($dirs[0][$i], 0, $opcao['max-size']-3) . "..."; }
  179.     $date= $dirs[1][$i];
  180.     $items = $dirs[2][$i];
  181.     if($vista==0) {
  182.       echo "<div class=\"dirview-item\"><div class=\"dirview-info\"><a href=\"".$dirs[0][$i]."/\"><img src=\"$directoria_file\" width=\"".$opcao['icon-width']."\" height=\"".$opcao['icon-height']."\" border=\"0\" alt=\"".$opcao['icon-dir']."\" /><br />".$dirs2[$i]."/</a></div><div class=\"dirview-extinfo\"> </div>";
  183.       if (($dirs[0][$i]!="..") && ($opcao['itens']==1)) { echo "<div class=\"dirview-info\">$items Itens</div>";}
  184.       if ($opcao['data']==1) {echo "<div class=\"dirview-date\">$date</div>";}
  185.       echo "</div>\n";
  186.     }
  187.     else if($vista==1) {
  188.       echo "<tr>
  189.          <td width=\"".$opcao['icon-small-width']."\" style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:center; color: #000000;\"><img src=\"$small_directoria_file\" width=\"".$opcao['icon-small-width']."\" height=\"".$opcao['icon-small-height']."\" border=\"0\" alt=\"".$opcao['icon-dir']."\" /></td>
  190.          <td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\"><a href=\"".$dirs[0][$i]."/\">".$dirs2[$i]."/</a></td>";
  191.          if ($opcao['tamanho']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\"> </td>"; }
  192.          if (($dirs[0][$i]!="..") && ($opcao['itens']==1)) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:right; color: #000000;\" nowrap=\"nowrap\">$items ".$opcao['lang-itens']."  </td>"; }
  193.          if ($opcao['data']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\">$date</td>";}
  194.          if($opcao['tipo'] == 1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\">".$opcao['icon-dir']."</td></tr>"; }
  195.     }
  196.     $i++;
  197. }
  198. }
  199. $i=0;
  200.  
  201. //while($files[$i][0]!=$null) {
  202. if($files[0][0]!=$null) {
  203. while (list($i) = each($files[$ord])) {
  204.     $_max_size=$opcao['max-size']+($vista*$opcao['max-size']);
  205.     if (strlen($files[0][$i])<$_max_size) {
  206.         $files2[$i]=$files[0][$i];
  207.         $files2[$i]=str_replace("&", "&", $files2[$i]);
  208.     }
  209.     else {
  210.         $files2[$i]=substr($files[0][$i], 0, $opcao['max-size']-3) . "...";
  211.         $files2[$i]=str_replace("&", "&", $files2[$i]);
  212.     }
  213.     $files[0][$i]=str_replace("&", "&", $files[0][$i]);
  214.     $size=$files[2][$i];
  215.     if ($size<1024) { $unidade="B"; }
  216.         else {
  217.       $size=$size/1024;
  218.           if ($size<1024) { $unidade="KB"; }
  219.           else {
  220.         $size=$size/1024;
  221.             if ($size<1024) { $unidade="MB"; }
  222.             else { $size=$size/1024;
  223.               $unidade="GB";
  224.             }
  225.           }
  226.         }
  227.         $size=round($size,1);
  228.         $tamanho=(strlen("$size") + 12)*6;
  229.         $date=$files[1][$i];
  230.         $extencao = strtolower(substr(strrchr($files[0][$i], "."), 1 ));
  231.         $extencao = "." . $extencao;
  232.     $imagem = "";
  233.     $small_imagem = "";
  234.         if (in_array("imagens", $exts)) { if (in_array ($extencao, $imagens)) { $imagem = $imagens_file; } }
  235.         if (in_array("comprimido", $exts)) { if (in_array ($extencao, $comprimido)) { $imagem = $comprimido_file; } }
  236.         if (in_array("midi", $exts)) { if (in_array ($extencao, $midi)) { $imagem = $midi_file; } }
  237.         if (in_array("html", $exts)) { if (in_array ($extencao, $html)) { $imagem = $html_file; } }
  238.         if (in_array("executavel", $exts)) { if (in_array ($extencao, $executavel)) { $imagem = $executavel_file; } }
  239.         if (in_array("ttf", $exts)) { if (in_array ($extencao, $ttf)) { $imagem = $ttf_file; } }
  240.         if (in_array("php", $exts)) { if (in_array ($extencao, $php)) { $imagem = $php_file; } }
  241.         if (in_array("js", $exts)) { if (in_array ($extencao, $js)) { $imagem = $js_file; } }
  242.         if (in_array("musica", $exts)) { if (in_array ($extencao, $musica)) { $imagem = $musica_file; } }
  243.         if (in_array("video", $exts)) { if (in_array ($extencao, $video)) { $imagem = $video_file; } }
  244.         if (in_array("texto", $exts)) { if (in_array ($extencao, $texto)) { $imagem = $texto_file; } }
  245.         if ( $imagem == "" ) { $imagem = $unknown_file; }
  246.         if (in_array("imagens", $exts)) { if (in_array ($extencao, $imagens)) { $small_imagem = $small_imagens_file; } }
  247.         if (in_array("comprimido", $exts)) { if (in_array ($extencao, $comprimido)) { $small_imagem = $small_comprimido_file; } }
  248.         if (in_array("midi", $exts)) { if (in_array ($extencao, $midi)) { $small_imagem = $small_midi_file; } }
  249.         if (in_array("html", $exts)) { if (in_array ($extencao, $html)) { $small_imagem = $small_html_file; } }
  250.         if (in_array("executavel", $exts)) { if (in_array ($extencao, $executavel)) { $small_imagem = $small_executavel_file; } }
  251.         if (in_array("ttf", $exts)) { if (in_array ($extencao, $ttf)) { $small_imagem = $small_ttf_file; } }
  252.         if (in_array("php", $exts)) { if (in_array ($extencao, $php)) { $small_imagem = $small_php_file; } }
  253.         if (in_array("js", $exts)) { if (in_array ($extencao, $js)) { $small_imagem = $small_js_file; } }
  254.         if (in_array("musica", $exts)) { if (in_array ($extencao, $musica)) { $small_imagem = $small_musica_file; } }
  255.         if (in_array("video", $exts)) { if (in_array ($extencao, $video)) { $small_imagem = $small_video_file; } }
  256.         if (in_array("texto", $exts)) { if (in_array ($extencao, $texto)) { $small_imagem = $small_texto_file; } }
  257.         if ( $small_imagem == "" ) { $small_imagem = $small_unknown_file; }
  258.  
  259.      if($vista==0) {
  260.         echo "<div class=\"dirview-item\"><div class=\"dirview-info\"><a href=\"" . $files[0][$i] . "\"><img src=\"$imagem\" width=\"".$opcao['icon-width']."\" height=\"".$opcao['icon-height']."\" border=\"0\" alt=\"".$opcao['icon-file']."\" /><br />$files2[$i]</a></div>";
  261.         if ($opcao['tamanho']==1) {echo "<div class=\"dirview-info\">$size $unidade</div>"; }
  262.         if ($opcao['data']==1) {echo"<div class=\"dirview-date\">". date($opcao['data-formato'],$date) . "</div>";}
  263.         echo "</div>\n";
  264.      }
  265.      else if($vista==1) {
  266.       echo "<tr>
  267.          <td width=\"".$opcao['icon-small-width']."\" style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:right; color: #000000;\"><img src=\"$small_imagem\" width=\"".$opcao['icon-small-width']."\" height=\"".$opcao['icon-small-height']."\" border=\"0\" alt=\"".$opcao['icon-file']."\" /></td>
  268.          <td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\"><a href=\"" . $files[0][$i] . "\">".$files2[$i]."</a></td>";
  269.       if ($opcao['tamanho']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:right; color: #000000;\" nowrap=\"nowrap\">$size $unidade</td>\n"; }
  270.       if (($dirs[0][$i]!="..") && ($opcao['itens']==1)) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\"> </td>"; }
  271.       if ($opcao['data']==1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\">". date($opcao['data-formato'],$date) . "</td>"; }
  272.       if($opcao['tipo'] == 1) { echo "<td style=\"border-color: #ECECEC; border-left-width: 0px; border-right-width: 1px; border-top-width: 0px; border-bottom-width: 1px; padding: 1px 1px 1px 1px; font: 11px verdana, arial, helvetica, sans-serif; text-align:left; color: #000000;\" nowrap=\"nowrap\">".$files[3][$i]."</td></tr>"; }
  273.  
  274.      }
  275.  
  276.         $i++;
  277. }
  278. }
  279. if ($vista==1) { echo "</table></td></tr></table><br />"; }
  280. ?>
  281. </div>
  282. </body>
  283. </html>
  284.