Location: PHPKode > projects > WebETB > doku/list_result.php4
<?php
/******************************************************************************/
/*	MODUL:	doku/list_result.php4         												*/
/*																										*/
/* DATUM:	27.03.2006, Version 0.1															*/
/* BESCHR.:	Auflisten der Suchergebnisse fuer Dokumentsuche                   */
/*          Subfunktion von index.php4                                        */
/*																										*/
/*	AUTOR:   Marcus Groh																			*/
/*	LIZENZ:  GPL v2 vom Juni 1991 															*/
/*																										*/
/*	AENDERUNGEN:	25.07.2005        -initiale Version								   */
/*                27.03.2006 v 0.1, -Versionskennzeichnung eingefuehrt        */
/*                                  -Code unter GPL v2 gestellt               */
/*                                  -Tabellenname dynamisiert                 */
/*																										*/
/******************************************************************************/
$allowed_groups=array("elw");
include ('../_include/header_2.php4');

   // Start inner table   
   echo "</center><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"904\">\n";
   
   // get data only if button was pressed and search-form wasn't empty   
   if ( (isset($frm_doit)) && (strlen($frm_search) != 0 ) )
   {
      $select_searchdoc="select * from $T_dokumnt where ( descr like '%$frm_search%' or keywrds like '%$frm_search%' ) and typ like '2'";
      $result_searchdoc=@mysql_db_query($database["database"],$select_searchdoc,$db);
      if ( mysql_num_rows($result_searchdoc) == 0 )
      {
         echo "<tr><td>Keine Eintr&auml;ge gefunden.</td></tr>\n";
      }
      else
      {
         while ($row=mysql_fetch_array($result_searchdoc))
         {
            // get fields
            $db_titel=$row['titel'];
            $db_descr=$row['descr'];
            $db_keywrds=$row['keywrds'];
            $db_fname=$row['f_name'];
            $doc_root=$_SERVER[DOCUMENT_ROOT];
            $path_to_file=ereg_replace($doc_root, "", $file_path);
            $file_to_open=$path_to_file . "/" . $db_fname;
            
            // print table
            echo "<tr>\n";
            echo "<td><p id=\"SW10\">&nbsp;DATEI: $db_titel&nbsp;<a href=\"$file_to_open\" style=\"text-decoration: none;\" target=\"_NEW\">(ansehen)</a></p></td>";
            echo "</tr><tr>\n";
            echo "<td><p id=\"sw10_s\">&nbsp;BESCHREIBUNG: $db_descr</p></td>\n";
            echo "</tr><tr>\n";
            echo "<td><p id=\"sw10_s\">&nbsp;Suchbegriffe: $db_keywrds</p></td>\n";
            echo "</tr>\n";
            
            // print sepparator
            echo "<tr><td width=\"904\" style=\"background-color: #999999;\" ><img src=\"../_img/spacer.gif\" height=\"1\" border=\"0\"></td></tr>\n";
         }
      }
   }
   
   // Stop inner table
   echo "</table>\n";
include ('../_include/footer_2.php4');

?>
Return current item: WebETB