include_once($publicpath.'/util/db_conn.php'); function displaypagecontent($pageid){ $getpagedata = "select * from `ctCMS_Pages` where id = '". $pageid ."'"; $getpagedq = mysql_query($getpagedata); $pd = mysql_fetch_assoc($getpagedq); return $pd['data']; } function displaypage_headertitle($pageid){ $getpagedata = "select * from `ctCMS_Pages` where id = '". $pageid ."'"; $getpagedq = mysql_query($getpagedata); $pd = mysql_fetch_assoc($getpagedq); return $pd['title']; } function display_pagerightcolumn($pageid, $sortorder = ""){ $getpagedata = "select * from `ctCMS_Pages` where id = '". $pageid ."'"; $getpagedq = mysql_query($getpagedata); $pd = mysql_fetch_assoc($getpagedq); //add in ability to do sorting later in this funciton if($pd['column_right_localfss'] == "Yes"){ include_once("/home/bflojg/public_html/views/includes/local_first_slideshow.php"); } if($pd['column_right_bannerr'] == "Yes"){ include_once("/home/bflojg/public_html/views/includes/members_sponsors_slideshow.php"); } if($pd['column_right_enews'] == "Yes"){ include_once("/home/bflojg/public_html/views/includes/subscribe_enews.php"); } if($pd['column_right_featmem'] == "Yes"){ include_once("/home/bflojg/public_html/views/includes/featured_member.php"); } if($pd['column_right_buylocal'] == "Yes"){ include_once("/home/bflojg/public_html/views/includes/store_side_info.php"); } } ?> include_once($publicpath.'/util/db_conn.php'); function get_event_info($evid){ $geteventsql = "select * from `ctCMS_Events` inner join `ctCMS_Events_properties` on `ctCMS_Events`.`ID` = `ctCMS_Events_properties`.`event_id` where `ctCMS_Events`.`ID` = '". $evid ."' and `removed` = 'N' "; $eventq = mysql_query($geteventsql); $eventinfo = mysql_fetch_assoc($eventq); return $eventinfo; } function get_upcoming_events(){ $get_sql = "SELECT * FROM `ctCMS_Events` WHERE `StartDate` >= '". date("Y")."-". date("m") ."-".date("d")."' AND `removed` != 'Y' ORDER BY `ctCMS_Events`.`StartDate`, `StartTime` ASC "; $get_q = mysql_query($get_sql); return $get_q; } function get_upcoming_events_limit($limit_num = 3){ $get_sql = "SELECT * FROM `ctCMS_Events` WHERE `StartDate` >= '". date("Y")."-". date("m") ."-".date("d")."' AND `removed` != 'Y' ORDER BY `ctCMS_Events`.`StartDate`, `StartTime` ASC LIMIT 0, $limit_num "; $get_q = mysql_query($get_sql); return $get_q; } function get_upcoming_events_filter($type, $department){ if($type != "all" && $department != "all"){ $get_sql = "SELECT * FROM `ctCMS_Events` WHERE `StartDate` >= '". date("Y")."-". date("m") ."-".date("d")."' AND `removed` != 'Y' and `Category` = '". $type. "' and `Department` LIKE '%". $department. "%' ORDER BY `ctCMS_Events`.`StartDate`, `StartTime` ASC "; } if($type != "all" && $department == "all"){ $get_sql = "SELECT * FROM `ctCMS_Events` WHERE `StartDate` >= '". date("Y")."-". date("m") ."-".date("d")."' AND `removed` != 'Y' and `Category` = '". $type. "' ORDER BY `ctCMS_Events`.`StartDate`, `StartTime` ASC "; } if($type == "all" && $department != "all"){ $get_sql = "SELECT * FROM `ctCMS_Events` WHERE `StartDate` >= '". date("Y")."-". date("m") ."-".date("d")."' AND `removed` != 'Y' and `Department` LIKE '%". $department. "%' ORDER BY `ctCMS_Events`.`StartDate`, `StartTime` ASC "; } //echo $get_sql; if($type == "all" && $department == "all"){ return get_upcoming_events(); } $get_q = mysql_query($get_sql) or die(mysql_error()); return $get_q; } function get_upcoming_events_bydept($department, $limit_num = 3){ $get_sql = "SELECT * FROM `ctCMS_Events` WHERE `StartDate` >= '". date("Y")."-". date("m") ."-".date("d")."' AND `removed` != 'Y' "; if($department != ""){ $get_sql .= "and `Department` LIKE '%". $department. "%' "; } $get_sql .= " ORDER BY `ctCMS_Events`.`StartDate`, `StartTime` ASC LIMIT 0, $limit_num "; $get_q = mysql_query($get_sql); return $get_q; } ?>