A PHP Error was encountered

Severity: Notice

Message: Only variables should be assigned by reference

Filename: core/Controller.php

Line Number: 51

12){$hours -= 12; $ampm = 'PM';} return($hours.':'.$minutes.' '.$ampm); } function urlKey($text){ $clean = preg_replace('/[^\w\d_ -]/si', '', $text);///remove any special character $clean = preg_replace('/\s\s+/', ' ', $clean);///replacing multiple spaces to signle $clean = strtolower(str_replace(" ","-",$clean));///replace space with dash and making lower case return $clean; } function randString($number){ $chars = "abcdefghijkmnopqrstuvwxyz023456789"; srand((double)microtime()*1000000); $i = 0; $pass = '' ; while ($i <= $number) { $num = rand() % 33; $tmp = substr($chars, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; } function getTwitterText($job_id, $job_name){ //$short_url = getBitlyShortURL(site_url()."/front/register/referby/".$this->session->userdata('user_id'), 'zahidsardar99', 'R_6522c4eeaf8cbc88b674ef569707b4b9'); $short_url = getBitlyShortURL(site_url()."/job/job_detail/".$job_id, 'zahidsardar99', 'R_6522c4eeaf8cbc88b674ef569707b4b9'); return $twitter_text = "Earn great cashback at ".SITE_NAME." @ ".$job_name." Visit and earn on ".$short_url; } function getTwitterTextDeal($deal_id, $deal_title, $url_key){ $short_url = getBitlyShortURL(site_url()."/product-detail/".$url_key."/".$deal_id, 'zahidsardar99', 'R_6522c4eeaf8cbc88b674ef569707b4b9'); return $twitter_text = $deal_title." ".$short_url; } function getTwitterTextStore($store_id, $store_title, $url_key){ $short_url = getBitlyShortURL(site_url()."/store-detail/".$url_key."/".$store_id, 'zahidsardar99', 'R_6522c4eeaf8cbc88b674ef569707b4b9'); return $twitter_text = $store_title." ".$short_url; } function getTwitterTextBlog($blog_id, $blog_title){ $short_url = getBitlyShortURL(site_url()."/blog/blog_detail/".$blog_id, 'zahidsardar99', 'R_6522c4eeaf8cbc88b674ef569707b4b9'); return $twitter_text = $blog_title." ".$short_url; } function getBitlyShortURL($url,$login,$appkey,$format='txt') { $connectURL = 'http://api.bit.ly/v3/shorten?login='.$login.'&apiKey='.$appkey.'&uri='.urlencode($url).'&format='.$format; return curl_get_result($connectURL); } /* returns a result form url */ function curl_get_result($url) { $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); $data = curl_exec($ch); curl_close($ch); return $data; } function showRemainingTime($remaining_days, $remaining_time, $expiry_date, $deal_id){ // Define your target date here //2011-02-28 14:27:21 if($expiry_date==''){$expiry_date='2011-04-28 14:27:21';} $arr = explode(" ",$expiry_date); $rmdate = explode("-",$arr[0]); $rmtime = explode(":",$arr[1]); $targetYear = $rmdate[0]; $targetMonth = $rmdate[1]; $targetDay = $rmdate[2]; $targetHour = $rmtime[0]; $targetMinute= $rmtime[1]; $targetSecond= $rmtime[2]; // End target date definition // Define date format $dateFormat = "Y-m-d H:i:s"; $targetDate = mktime($targetHour,$targetMinute,$targetSecond,$targetMonth,$targetDay,$targetYear); $actualDate = time(); $secondsDiff = $targetDate - $actualDate; $remainingDay = floor($secondsDiff/60/60/24); $remainingHour = floor(($secondsDiff-($remainingDay*60*60*24))/60/60); $remainingMinutes = floor(($secondsDiff-($remainingDay*60*60*24)-($remainingHour*60*60))/60); $remainingSeconds = floor(($secondsDiff-($remainingDay*60*60*24)-($remainingHour*60*60))-($remainingMinutes*60)); $targetDateDisplay = date($dateFormat,$targetDate); $actualDateDisplay = date($dateFormat,$actualDate); ?>

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: deal_id

Filename: helpers/common_helper.php

Line Number: 150

">

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: remainingDay

Filename: helpers/common_helper.php

Line Number: 153

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: remainingHour

Filename: helpers/common_helper.php

Line Number: 154

A PHP Error was encountered

Severity: Notice

Message: Undefined variable: remainingMinutes

Filename: helpers/common_helper.php

Line Number: 155

D H M load->model('main_model'); if($CI->uri->segment(2)=='deal_city'){ $current_city_id = $CI->main_model->getCurrentCity(array('current_city_id' =>$CI->uri->segment(3), 'ip_address' =>$_SERVER['REMOTE_ADDR'])); }else{ $current_city_id = $CI->main_model->getIfCityExists($_SERVER['REMOTE_ADDR']); if($current_city_id==0){ $city_id_from_id = getCityIdFromIP(); $current_city_id = $CI->main_model->getCurrentCity(array('current_city_id' =>$city_id_from_id ,'ip_address' =>$_SERVER['REMOTE_ADDR'])); } } //$current_city_id = $CI->main_model->getIfCityExists($_SERVER['REMOTE_ADDR']); return $current_city_id; } function getCityIdFromIP(){ $string = file_get_contents("http://api.ipinfodb.com/v3/ip-city/?key=89797aead3c19c2c968fc065d6a10dc83ab8ee9cc61d0f8dbccfbea85566bcfc&ip=".$_SERVER['REMOTE_ADDR']."&format=xml"); $start = ""; $end = ""; $string = " ".$string; $ini = strpos($string,$start); if ($ini == 0) return ""; $ini += strlen($start); $len = strpos($string,$end,$ini) - $ini; $city_name = substr($string,$ini,$len); $CI =& get_instance(); $CI->load->model('main_model'); return $city_id = $CI->main_model->getCityId($city_name); } function defaultCurrency(){ $CI =& get_instance(); $CI->load->model('main_model'); return $CI->main_model->getDefaultCurrency(); } function getSettingValue($identifier){ $CI =& get_instance(); $CI->load->model('main_model'); return $CI->main_model->getSettingValueDB($identifier); } function getCategoryName($language_id, $category_id, $title){ $CI =& get_instance(); $CI->load->model('adds_model'); //return $CI->main_model->getDefaultCurrency(); if($language_id==1){ $job_category_name = $title; }else{ $job_category_language = $CI->adds_model->getJobCategoryLanguage($language_id, $category_id); if($job_category_language!='empty'){ $job_category_name = $job_category_language->title; }else{ $job_category_name = $title; } } return stripslashes($job_category_name); } function getJobName($language_id, $job_id, $name){ $CI =& get_instance(); $CI->load->model('adds_model'); $job_language = $CI->adds_model->getJobLanguage($language_id, $job_id); if($job_language!='empty'){ $job_name = $job_language->name; }else{ $job_name = $name; } return stripslashes($job_name); } function getJobDescription($language_id, $job_id, $long_description){ $CI =& get_instance(); $CI->load->model('adds_model'); $job_language = $CI->adds_model->getJobLanguage($language_id, $job_id); if($job_language!='empty'){ $job_description = $job_language->long_description; }else{ $job_description = $long_description; } return stripslashes($job_description); } function getDealORVoucherTitle($language_id, $deal_id, $title){ $CI =& get_instance(); $CI->load->model('deals_model'); $deal_language = $CI->deals_model->getDealLanguage($language_id, $deal_id); if($deal_language!='empty'){ $deal_title = $deal_language->title; }else{ $deal_title = $title; } return stripslashes($deal_title); } function getDealORVoucherDescription($language_id, $deal_id, $description){ $CI =& get_instance(); $CI->load->model('deals_model'); $deal_language = $CI->deals_model->getDealLanguage($language_id, $deal_id); if($deal_language!='empty'){ $deal_description = $deal_language->description; }else{ $deal_description = $description; } return stripslashes($deal_description); } function getFlatHouseSearchData(){ $CI =& get_instance(); $query = $CI->db->query("SELECT flat_house_id, title from flat_house where status='active'"); if($query->num_rows() > 0){ $data = $query->result(); foreach($data as $row){ $flat_house_title = substr($row->title,0,39); $response[] = array('id'=>$row->flat_house_id, 'text'=>$flat_house_title); } return json_encode($response); } } function getVehicleSearchData(){ $CI =& get_instance(); $query = $CI->db->query("SELECT vehicle_id, title from vehicle where status='active'"); if($query->num_rows() > 0){ $data = $query->result(); foreach($data as $row){ $vehicle_title = substr($row->title,0,39); $response[] = array('id'=>$row->vehicle_id, 'text'=>$vehicle_title); } return json_encode($response); } } function getJobSearchData(){ $CI =& get_instance(); $query = $CI->db->query("SELECT job_id, title from job where status='active'"); if($query->num_rows() > 0){ $data = $query->result(); foreach($data as $row){ $job_title = substr($row->title,0,39); $response[] = array('id'=>$row->job_id, 'text'=>$job_title); } return json_encode($response); } } function getSearchData(){ $CI =& get_instance(); $CI->load->model('deals_model'); $return_val=''; $cashback_var=''; $query = $CI->db->query("SELECT d.deal_id, d.title, d.price from deal d, deal_minimum m where d.deal_id = m.deal_id and d.status='active' limit 10000"); if($query->num_rows() > 0){ $data = $query->result(); foreach($data as $row){ $title = substr($row->title,0,50); $response[] = array('id'=>$row->deal_id,'text'=>$title, 'extra'=>' Price : '.defaultCurrency().$row->price); } return json_encode($response); //$store_data = json_encode($response); } } function numberFormat_value($value){ return number_format($value, 0, '.', ''); } ?>

A PHP Error was encountered

Severity: 8192

Message: Methods with the same name as their class will not be constructors in a future version of PHP; CI_DB_driver has a deprecated constructor

Filename: database/DB_driver.php

Line Number: 31