.pagecell {background-color: #CCCC99; border: 1px solid #000000;'); print ('text-decoration: none;}'); print ('
'); } function printBottom(){ print ('

'); } function hyperlink($text) { //$text = preg_replace("/http:\/\/([^\/]+)[^\s]*/", "$0", $text); $text = preg_replace("/\s([a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]*\@[a-zA-Z][a-zA-Z0-9\_\.\-]*[a-zA-Z]{2,6})([\s|\.|\,])/i"," $1$2", $text); //https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?; $text = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '$1', $text); return $text; } function viewAllEvents(){ //scroll thru all event db records and create forms for each event $link = pg_connect('dbname=kapitalm user=kapitalm password=sheibooc'); $query = "SELECT * FROM calendarevents ORDER BY date DESC"; $result = pg_query($query); $referrer = $_SERVER['HTTP_REFERER']; print ('
Return To The Previous Page



'); print('
Please select an event from the list below...



'); while ($row = pg_fetch_array($result)){ $content = $row[content]; $content = trim($content); $content = substr($content, 0,150); $content = "    ".$content."......"; print (''); print ('"); print ('"); print ('
'); print ('  • '); print ("$row[title]"); print (''); print (' '); print ("$row[organization]"); print (' '); print ("$row[date]
'); print ("$content

'); }//end while pg_close($link); } function viewEvent(){ $eventID = $_REQUEST['event']; $link = pg_connect('dbname=kapitalm user=kapitalm password=sheibooc'); $query="SELECT * FROM calendarevents WHERE id=$eventID"; $result = pg_query($query); if ($result){///if query was succesfull $row = pg_fetch_array($result); //$content = nl2br($row[content]); $content = nl2br($row[content]); $find[] = '“'; // left side double smart quote $find[] = '”'; // right side double smart quote $find[] = '‘'; // left side single smart quote $find[] = '’'; // right side single smart quote $find[] = '…'; // elipsis $find[] = '—'; // em dash $find[] = '–'; // en dash $replace[] = '"'; $replace[] = '"'; $replace[] = "'"; $replace[] = "'"; $replace[] = "..."; $replace[] = "-"; $replace[] = "-"; $content = str_replace($find, $replace, $content); //$content = hyperlink($content); $content = hyperlink($content); $year = substr($row[date], 0, 4); $month = substr($row[date], 5, 2); $referrer = $_SERVER['HTTP_REFERER']; print ('View the Calendar for the Month this was posted
Return To The Previous Page



"); print (''); print (''); print ('"); print ('
'); print ('

'); print ("$row[title]"); print ('

'); print ("$row[organization]"); print ('

'); print ("$row[date]

'); print ('

'); print ("$content"); print ("
"); pg_close($link); } else{ print ('
Event Not Located In Database, Please choose from the event list below...

'); pg_close($link); viewAllEvents(); } } ?>


Event Administration Home Page
'); } if ($_REQUEST['event']){///if the correct param is present viewEvent(); }//end param else{//list all public events starting most recent..... viewAllEvents(); }//end else printBottom(); ?>
www.IsleLaMotte.org : disclaimer
contact us:email