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()."/news-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 getDealCategoryName($language_id, $deal_category_id, $title){ $CI =& get_instance(); $CI->load->model('deals_model'); //return $CI->main_model->getDefaultCurrency(); $deal_category_language = $CI->deals_model->getDealCategoryLanguage($language_id, $deal_category_id); if($deal_category_language!='empty'){ $store_category_name = $deal_category_language->title; }else{ $store_category_name = $title; } return stripslashes($store_category_name); } function getBrandTitle($language_id, $deal_brand_id, $title){ $CI =& get_instance(); $CI->load->model('deals_model'); $language = $CI->deals_model->getBrandLanguage($language_id, $deal_brand_id); if($language!='empty'){ $brand_title = $language->title; }else{ $brand_title = $title; } return stripslashes($brand_title); } function getBrandDescription($language_id, $brand_id, $description){ $CI =& get_instance(); $CI->load->model('deals_model'); $language = $CI->deals_model->getBrandLanguage($language_id, $deal_brand_id); if($language!='empty'){ $brand_description = $language->description; }else{ $brand_description = $description; } return stripslashes($brand_description); } function getStoreName($language_id, $store_id, $name){ $CI =& get_instance(); $CI->load->model('stores_model'); $language = $CI->stores_model->getStoreLanguage($language_id, $store_id); if($language!='empty'){ $store_name = $language->name; }else{ $store_name = $name; } return stripslashes($store_name); } function getStoreDescription($language_id, $store_id, $long_description){ $CI =& get_instance(); $CI->load->model('stores_model'); $language = $CI->stores_model->getStoreLanguage($language_id, $store_id); if($language!='empty'){ $store_description = $language->long_description; }else{ $store_description = $long_description; } return stripslashes($store_description); } function getDealTitle($language_id, $deal_id, $title){ $CI =& get_instance(); $CI->load->model('deals_model'); $language = $CI->deals_model->getDealLanguage($language_id, $deal_id); if($language!='empty'){ $deal_title = $language->title; }else{ $deal_title = $title; } return stripslashes($deal_title); } function getDealDescription($language_id, $deal_id, $description){ $CI =& get_instance(); $CI->load->model('deals_model'); $language = $CI->deals_model->getDealLanguage($language_id, $deal_id); if($language!='empty'){ $deal_description = $language->description; }else{ $deal_description = $description; } return stripslashes($deal_description); } function getSearchData_2(){ $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 where 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); } } ?>

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