<?php
//
// Copyright (C) 2003-2004 Two Shoes Module Factory
// All rights reserved.
//
// This program uses parts of the original Simpleboard Application
// 0.7.0b written by Josh Levine; http://www.joshlevine.net
//
// This source file is part of the SimpleBoard Component, a Mambo 4.5
// custom Component By Jan de Graaff - http://tsmf.jigsnet.com
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// Please note that the GPL states that any headers in files and
// Copyright notices as well as credits in headers, source files
// and output (screens, prints, etc.) can not be removed.
// You can extend them with your own credits, though...
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
//
// The "GNU General Public License" (GPL) is available at
// http://www.gnu.org/copyleft/gpl.html.
//
// Dont allow direct linking
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

class search_html
{
   function openhtml( $searchword )
   {
?>
<table cellpadding="0" cellspacing="5" border="0" width="98%" class="contentpane">
  <tr>
    <td class="contentheading"><?php echo _SEARCH_TITLE; ?> </td>
  </tr>
</table>
<?php
   }
   function searchintro( $searchword )
   {
?>
<table cellpadding="3" cellspacing="0" border="0" width="98%" class="searchintro">
  <tr>
    <td colspan="3" align="left"><?php echo _PROMPT_KEYWORD; ?> <b><?php echo $searchword; ?></b>
      <?php
   }

   function message( $message ) { ?>
   <table cellpadding="3" cellspacing="0" border="0" width="98%" class="searchintro">
  <tr>
    <td colspan="3" align="left">
      <?php eval ('echo "'.$message.'";'); ?></td>
  </tr>
   </table>
<?php }

   function displaynoresult()
   {
      echo "</td></tr>";
   }

   function display( &$rows )
   {
      $c = count ($rows); eval  ('echo "'._NUM_RESULTS.'";'); ?>
    </td>
  </tr>
</table>
<br />
<?php
      $tabclass = array("sectiontableentry1", "sectiontableentry2");
      $k = 0;
      ?>
<table cellpadding="1" cellspacing="0" border="0" width="98%" class="contentpane">
  <?php
      foreach ($rows as $row)
      {
      ?>
  <tr class="<?php echo $tabclass[$k]; ?>">
    <td width="15%"><?php echo $row->created; ?></td>
    <td width="75%"><a href="<?php echo $row->href; ?>"><?php echo $row->title;?></a></td>
    <td width="10%" rowspan="2"><span class="small"><?php echo $row->section; ?></span></td>
  </tr>
  <tr class="<?php echo $tabclass[$k]; ?>">
    <td colspan="2"><?php echo $row->text;?> &#133; </td>
  </tr>
  <?php
      $k = 1 - $k;
      }
   }


   function conclusion( $totalRows, $searchword ) {
?>
  <tr>
    <td colspan="3">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="3">
      <?php eval ('echo "'._CONCLUSION.'";'); ?><a href="http://www.google.com/search?q=<?php echo $searchword; ?>" target="_blank">
      <img src="images/M_images/google.png" border="0" align="texttop" />
      </a>
    </td>
  </tr>
</table>
<?php
   }
}
?>
