UNDER CONSTRUCTION

"; $content.="

Your links

"; # page value $pv=$_REQUEST['pv']; if ($pv == "") { $pv=1; } if ($pv<1) { $pv=1; } ##################################### SUBROUTINES ###################################### function create_list($searchword,$pv) { global $startPage; global $EntryID; $wText=$_SESSION['wText']; $selection="WHERE LOCATE('$searchword',EventDescription)>0 "; $allrecords=get_specific_userowned_records("events",$selection,""); $FoundOne=mysql_num_rows($allrecords); if ($FoundOne==0) { $foundStr="No links found!"; } if ($FoundOne==1) { $foundStr="1 link found!"; } if ($FoundOne>0) { if ($wText=="1") { # allow to turn off $switchtextsetting="hide full description"; } else { #allow to turn on $switchtextsetting="show full description"; } } $startPage=1; $buttonbar=""; if ($FoundOne>1) { $foundStr="${FoundOne} links found!"; if ($FoundOne>10) { $buttonbar=make_buttonbar("/agenda/events-search.php?frmSearchStr=${searchword}&pv=",$FoundOne,$pv); } } # report number of links found in new LOCAL content $content="${foundStr} ${switchtextsetting}
\n"; $content.=$buttonbar."
\n"; # show the results if ($FoundOne>0) { # collect the records ordered and limited to 10 $entrycount=$startPage-1; $allrecords=get_specific_userowned_records("events",$selection,"ORDER BY EventDateFrom DESC LIMIT $entrycount,10"); # set some initial values before starting the loop $entrycount=$startPage-1; while ($data=mysql_fetch_array($allrecords)) { $content.=make_event_sample($data,$wText,0,"#ccffff"); } } $content.=$buttonbar."
\n"; return $content; } function create_form($frmSearchStr) { $form=<<
Search the chemistry related events database.

Enter your searchstring (a single word but partial text is OK), then press submit to start the search.

FORM; return $form; } ##################################### MAIN PROGRAM ###################################### $frmSearchStr=$_REQUEST['frmSearchStr']; $content=create_form($frmSearchStr); $content.=create_list($frmSearchStr,$pv); layout_show($layoutpage,$content,$googlecode,$title,$keywords,$description); ?>