2006-12-02 04:36:16 +00:00
< ? php
/*
2009-11-12 15:11:17 +00:00
* e107 website system
*
2009-11-18 01:06:08 +00:00
* Copyright ( C ) 2008 - 2009 e107 Inc ( e107 . org )
2009-11-12 15:11:17 +00:00
* Released under the terms and conditions of the
* GNU General Public License ( http :// www . gnu . org / licenses / gpl . txt )
*
*
*
* $Source : / cvs_backup / e107_0 . 8 / e107_handlers / search / search_event . php , v $
2010-02-10 18:18:01 +00:00
* $Revision $
* $Date $
* $Author $
2009-11-12 15:11:17 +00:00
*/
2006-12-02 04:36:16 +00:00
if ( ! defined ( 'e107_INIT' )) { exit ; }
$query = $tp -> toDB ( $query );
2020-12-17 05:52:54 -08:00
$results = $sql -> select ( " event " , " * " , " event_stake REGEXP(' " . $query . " ') OR event_ward REGEXP(' " . $query . " ') OR event_organisation REGEXP(' " . $query . " ') OR event_title REGEXP(' " . $query . " ')
2006-12-02 04:36:16 +00:00
OR event_location REGEXP ( '".$query."' ) OR event_details REGEXP ( '".$query."' ) OR event_thread REGEXP ( '".$query."' ) " );
2020-12-14 16:21:48 -08:00
while ( list ( $event_id , $event_stake , $event_ward , $event_organisation , $event_start , $event_end , $event_allday , , , $event_title , $event_location , $event_details , $event_author , $event_contact , $event_category , $event_url ) = $sql -> fetch ()) {
2006-12-02 04:36:16 +00:00
2020-12-17 05:52:54 -08:00
$sql2 -> select ( " event_cat " , " event_cat_name, event_cat_icon " , " event_cat_id=' " . $event_category . " ' " );
list ( $event_cat_name , $event_cat_icon ) = $sql2 -> fetch ();
2006-12-02 04:36:16 +00:00
$event_stake_ = parsesearch ( $event_stake , $query );
if ( ! $event_stake_ ) {
$event_stake_ = $event_stake ;
}
$event_ward_ = parsesearch ( $event_ward , $query );
if ( ! $event_ward_ ) {
$event_ward_ = $event_ward ;
}
$event_organisation_ = parsesearch ( $event_organisation , $query );
if ( ! $event_organisation_ ) {
$event_organisation_ = $event_organisation ;
}
$event_title_ = parsesearch ( $event_title , $query );
if ( ! $event_title_ ) {
$event_title_ = $event_title ;
}
$event_details_ = parsesearch ( $event_details , $query );
if ( ! $event_details_ ) {
$event_details_ = $event_details ;
}
$event_cat_name_ = parsesearch ( $event_cat_name , $query );
if ( ! $event_cat_name_ ) {
$event_cat_name_ = $event_cat_name ;
}
$event_threat_ = parsesearch ( $event_threat , $query );
if ( ! $event_url_ ) {
$event_threat_ = $event_threat ;
}
2009-08-23 10:57:51 +00:00
$bullet = '' ;
if ( defined ( 'BULLET' ))
{
$bullet = '<img src="' . THEME . 'images/' . BULLET . '" alt="" class="icon" />' ;
}
elseif ( file_exists ( THEME . 'images/bullet2.gif' ))
{
$bullet = '<img src="' . THEME . 'images/bullet2.gif" alt="" class="icon" />' ;
}
$text .= $bullet . " <a href= \" event.php? " . $event_start . " \" > { $event_title } </a> { $event_details } <br /> " ;
2006-12-02 04:36:16 +00:00
}
$qtype = LAN_911 ;