@@ -293,7 +293,7 @@ class Webservice_model extends CI_Model {
/******************* END PAGINATION *********************/
$result=$this->db->query("SELECT events.seat_pricing,venue.location_lat AS latitude,venue.location_lng AS longitude,events.event_id AS event_id, events.event_name AS name,`event_gallery`.`media_url` AS image, COUNT(booking.id) AS attendees, event_category.category, AVG(review.rate) AS rating, venue.location, IF(events.avg_price = 0, '100','150') AS rate, IF(events.provider_id = 1,'true','false') AS is_editors_choice, IF(favourite.status = 1, 'true','false') AS is_favorite FROM events INNER JOIN event_date_time ON events.event_id = event_date_time.event_id ".$case." LEFT JOIN `event_gallery` ON `events`.`event_id` = `event_gallery`.`event_id` AND `event_gallery`.`media_type` = 0 LEFT JOIN booking ON booking.event_id = events.event_id LEFT JOIN event_category ON events.category_id = event_category.cat_id LEFT JOIN review ON review.event_id = events.event_id INNER JOIN venue ON venue.id = events.venue_id LEFT JOIN favourite ON favourite.event_id = events.event_id AND favourite.user_id = ".$user_id." AND favourite.status = 1 WHERE events.status = 1 ".$where." GROUP BY events.event_id")->result();
$result=$this->db->query("SELECT events.seat_pricing,venue.location_lat AS latitude,venue.location_lng AS longitude,events.event_id AS event_id, events.event_name AS name,`event_gallery`.`media_url` AS image, COUNT(booking.id) AS attendees, event_category.category, AVG(review.rate) AS rating, venue.location, IF(events.avg_price = 0, '100','150') AS rate, IF(events.provider_id = 1,'true','false') AS is_editors_choice, IF(favourite.is_favorite = 1, 'true','false') AS is_favorite FROM events INNER JOIN event_date_time ON events.event_id = event_date_time.event_id ".$case." LEFT JOIN `event_gallery` ON `events`.`event_id` = `event_gallery`.`event_id` AND `event_gallery`.`media_type` = 0 LEFT JOIN booking ON booking.event_id = events.event_id LEFT JOIN event_category ON events.category_id = event_category.cat_id LEFT JOIN review ON review.event_id = events.event_id INNER JOIN venue ON venue.id = events.venue_id LEFT JOIN favourite ON favourite.event_id = events.event_id AND favourite.user_id = ".$user_id." AND favourite.status = 1 WHERE events.status = 1 ".$where." GROUP BY events.event_id")->result();
// Set the current directory correctly for CLI requests
if(defined('STDIN'))
{
chdir(dirname(__FILE__));
}
if(($_temp=realpath($system_path))!==FALSE)
{
$system_path=$_temp.'/';
}
else
{
// Ensure there's a trailing slash
$system_path=rtrim($system_path,'/').'/';
}
// Is the system path correct?
if(!is_dir($system_path))
{
header('HTTP/1.1 503 Service Unavailable.',TRUE,503);
echo'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__,PATHINFO_BASENAME);