Event & Activities
Inside. * Retrieve Events, loop to show. * Coding: July 02, 2010 */ ?>

Event & Activities

Calendar of upcomming event & activities at Takolaburi

Sort by Date: date('Y') && $year!='all'){ $lyear = $year - 1; $lmonth = 12; echo "«"; }elseif($month=='all' && $year > date('Y') && $year!='all'){ $lyear = $year - 1; $lmonth = 'all'; echo "«"; }elseif($month!='01' && $month!='all'){ $lyear = $year; $lmonth = substr($month+99,1,2); echo "«"; }else{ echo "«"; } ?> »"; }elseif($month=='all' && $year < date('Y')+5 && $year!='all'){ $gyear = $year + 1; $gmonth = 'all'; echo "»"; }elseif($month!='12' && $month!='all'){ $gyear = $year; $gmonth = substr($month+101,1,2); echo "»"; }else{ echo "»"; } ?>
    \" AND event_content_{$lang}!=\"\"\r\n"; if($year=='all'){ $sql.= ($month!='all')?" AND (event_start LIKE '%-{$month}-%' OR event_to LIKE '%-{$month}-%') \r\n":""; }else{ $sql.= ($month!='all')?" AND (event_start <= '{$year}-".substr($month+101,1,2)."-00 23:59:59') \r\n":" AND (event_start <= '{$year}-12-31 23:59:59') \r\n"; $sql.= ($month!='all')?" AND (event_to >= '{$year}-{$month}-01 00:00:00') \r\n":" AND (event_to >= '{$year}-01-01 00:00:00') \r\n"; } $sql.= "ORDER BY event_start DESC,event_id DESC"; $que = $db->query($sql); $nums = $db->num_rows($que); if($nums==0){ ?>
  • Sorry, no event & activities on this month | Please select another month

    Sorry, no event & activities on this month

    Please select another month

  • fetch_array($que)){ $event_id = $rec["event_id"]; $event_title = ($rec["event_title_{$lang}"])?$rec["event_title_{$lang}"]:$rec["event_title_en"]; $event_from = ($rec["event_from_{$lang}"])?$rec["event_from_{$lang}"]:$rec["event_from_en"]; $event_detail = ($rec["event_detail_{$lang}"])?$rec["event_detail_{$lang}"]:$rec["event_detail_en"]; $sql2 = "SELECT * FROM event_img WHERE event_id = '{$event_id}' AND event_img_main = 1"; $que2 = $db->query($sql2); $rec2 = $db->fetch_array($que2); $event_img_name = $rec2['event_img_name']; $img = ($event_img_name)?"event/event-{$event_id}/{$event_img_name}":"event/event-{$event_id}/thumb_1.jpg"; $html_link = "{$rec["event_title_en"]}-event-{$lang}.html"; $html_link = strtolower(str_replace(" ","-",$html_link)); ?>
  • <?php echo $event_title; ?>

Sort by Date: date('Y') && $year!='all'){ $lyear = $year - 1; $lmonth = 12; echo "«"; }elseif($month=='all' && $year > date('Y') && $year!='all'){ $lyear = $year - 1; $lmonth = 'all'; echo "«"; }elseif($month!='01' && $month!='all'){ $lyear = $year; $lmonth = substr($month+99,1,2); echo "«"; }else{ echo "«"; } ?> »"; }elseif($month=='all' && $year < date('Y')+5 && $year!='all'){ $gyear = $year + 1; $gmonth = 'all'; echo "»"; }elseif($month!='12' && $month!='all'){ $gyear = $year; $gmonth = substr($month+101,1,2); echo "»"; }else{ echo "»"; } ?>

= '{$q_s} 00:00:00')\r\n"; $sql.= "ORDER BY event_id DESC"; $que = $db->query($sql); while($rec = $db->fetch_array($que)){ $event_title = ($rec["event_title_{$lang}"])?$rec["event_title_{$lang}"]:$rec["event_title_en"]; $data_s = ($rec['event_start']<$q_s)?$q_s:$rec['event_start']; $data_t = ($rec['event_to']>$q_t)?$q_t:$rec['event_to']; list($data_s_year,$data_s_month,$data_s_date) = explode("-",$data_s); list($data_t_year,$data_t_month,$data_t_date) = explode("-",$data_t); for($i=substr($data_s_date,0,2)*1;$i<=substr($data_t_date,0,2)*1 ;$i++){ $html_link = "{$rec["event_title_en"]}-event-{$lang}.html"; $html_link = strtolower(str_replace(" ","-",$html_link)); $datas[$i][] = array($rec['event_id'],$event_title,$html_link); } } if($wk_s>$wk_t){$wk_s=1;} for($i=$wk_s; $i<= ($wk_s+6); $i++){ echo ""; for($j=0;$j<=6;$j++){ if(($i==$wk_s&&$j< $w_s) ||$d >= $d_t){ echo ""; }else{ $d++; echo ""; } } echo ""; ?>
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
"; echo "$d"; if(count($datas[$d])>0){ foreach($datas[$d] as $data_key => $data_val){ echo "

{$data_val[1]}

"; } } echo "