A PHP Error was encountered
Severity: Notice
Message: Only variable references should be returned by reference
Filename: core/Common.php
Line Number: 257
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_URI::$config is deprecated
Filename: core/URI.php
Line Number: 72
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_Router::$uri is deprecated
Filename: core/Router.php
Line Number: 89
/****** adatbázisból generált route-ok ********/
/***********************/
/****** felfoldi.ie ******/
/***********************/
if(CURRENT_DOMAIN==0){
/****** főoldal *****/
$route['default_controller'] = 'articles_controller/article_list/1';
$route[''] = 'articles_controller/article_list/1';
/****** aloldalak *****/
$route['home'] = 'articles_controller/article_list/1';
$route['home/category/(.*)'] = 'articles_controller/category/1/$1';
$route['home/(.*)'] = 'articles_controller/article/1/$1';
$route['news'] = 'articles_controller/article_list/2';
$route['news/category/(.*)'] = 'articles_controller/category/2/$1';
$route['news/tag/(.*)'] = 'articles_controller/tag/2/$1';
$route['news/archive/(.*)'] = 'articles_controller/archive/2/$1/$2';
$route['news/(.*)'] = 'articles_controller/article/2/$1';
$route['partners'] = 'articles_controller/article_list/4';
$route['partners/category/(.*)'] = 'articles_controller/category/4/$1';
$route['partners/(.*)'] = 'articles_controller/article/4/$1';
$route['contact'] = 'contact_controller/index/5';
$route['contact/post_handler'] = 'contact_controller/post_handler/5';
$route['contact/get_contacts/(.*)'] = 'contact_controller/get_contacts/5/$1';
$route['gallery'] = 'articles_controller/article_list/7';
$route['competitions'] = 'articles_controller/article_list/9';
$route['competitions/category/(.*)'] = 'articles_controller/category/9/$1';
$route['competitions/(.*)'] = 'articles_controller/article/9/$1';
$route['privacy'] = 'articles_controller/article_list/10';
$route['privacy/category/(.*)'] = 'articles_controller/category/10/$1';
$route['privacy/(.*)'] = 'articles_controller/article/10/$1';
$route['quick-milk'] = 'articles_controller/article_list/13';
$route['quick-milk/category/(.*)'] = 'articles_controller/category/13/$1';
$route['quick-milk/(.*)'] = 'articles_controller/article/13/$1';
/****** szolgáltatási terület aloldal és városok *****/
/****** kereső oldal *****/
/****** galéria oldal *****/
$route['gallery/photo'] = 'media_controller/gallery';
$route['gallery/photo/(.*)'] = 'media_controller/gallery/$1';
/****** videó oldal *****/
$route['gallery/video'] = 'media_controller/video';
/****** Reklámanyag oldal *****/
$route['gallery/advertisements'] = 'media_controller/reklamanyagok';
$route['gallery/advertisements/(.*)'] = 'media_controller/reklamanyagok/$1';
/****** dokumentum oldal *****/
/****** termék oldal, kategóriák, termékek *****/
$route['products'] = 'product_controller/categories';
$route['products/snacks'] = 'product_controller/category/2';
$route['products/snacks/cornstixx'] = 'product_controller/product/7';
$route['products/snacks/corn-bread'] = 'product_controller/product/34';
$route['products/snacks/rice-bread'] = 'product_controller/product/35';
$route['products/snacks/apple-balls'] = 'product_controller/product/36';
$route['products/snacks/chocolate-crunch-cake'] = 'product_controller/product/39';
$route['products/snacks/muesli-pop'] = 'product_controller/product/40';
$route['products/snacks/corn-balls'] = 'product_controller/product/50';
$route['products/snacks/corn-spiral'] = 'product_controller/product/51';
$route['products/snacks/spicy-popcorn'] = 'product_controller/product/52';
$route['products/snacks/krunch-pop'] = 'product_controller/product/53';
$route['products/cake-decorations'] = 'product_controller/category/6';
$route['products/cake-decorations/candy-numbers'] = 'product_controller/product/1';
$route['products/cake-decorations/sugar-stifts'] = 'product_controller/product/2';
$route['products/cake-decorations/sugar-pearls'] = 'product_controller/product/3';
$route['products/cake-decorations/candy-numbers-stand'] = 'product_controller/product/6';
$route['products/cake-decorations/sugar-stifts-neon'] = 'product_controller/product/68';
$route['products/innovative-sweets'] = 'product_controller/category/7';
$route['products/innovative-sweets/thriller-pop'] = 'product_controller/product/11';
$route['products/innovative-sweets/graffiti-pop'] = 'product_controller/product/12';
$route['products/innovative-sweets/candy-spray'] = 'product_controller/product/13';
$route['products/innovative-sweets/frutta-spray'] = 'product_controller/product/14';
$route['products/innovative-sweets/funny-gum'] = 'product_controller/product/15';
$route['products/innovative-sweets/sweetalini-party-pizza'] = 'product_controller/product/26';
$route['products/innovative-sweets/pen-jam'] = 'product_controller/product/27';
$route['products/innovative-sweets/candy-spray-anti-hangover'] = 'product_controller/product/28';
$route['products/innovative-sweets/candy-spray-green-tea'] = 'product_controller/product/29';
$route['products/innovative-sweets/candy-spray-ice-tea'] = 'product_controller/product/30';
$route['products/innovative-sweets/after-death-energy-spray'] = 'product_controller/product/31';
$route['products/innovative-sweets/door-hanger'] = 'product_controller/product/37';
$route['products/innovative-sweets/candy-spray-juice'] = 'product_controller/product/54';
$route['products/innovative-sweets/choco-mint'] = 'product_controller/product/55';
$route['products/innovative-sweets/energy-of-sun'] = 'product_controller/product/56';
$route['products/innovative-sweets/forest-fruits'] = 'product_controller/product/57';
$route['products/innovative-sweets/jolly-gems'] = 'product_controller/product/72';
$route['products/quick-milk-products'] = 'product_controller/category/8';
$route['products/quick-milk-products/quick-milk-straws'] = 'product_controller/product/18';
$route['products/quick-milk-products/quick-ice-cream'] = 'product_controller/product/19';
$route['products/quick-milk-products/quick-hot-chocolate-powder'] = 'product_controller/product/20';
$route['products/quick-milk-products/quick-milk-green-tea'] = 'product_controller/product/24';
$route['products/quick-milk-products/tea-wizard'] = 'product_controller/product/25';
$route['products/quick-milk-products/baby-muesli'] = 'product_controller/product/32';
$route['products/quick-milk-products/bixmix'] = 'product_controller/product/33';
$route['products/quick-milk-products/quick-milk-straws-5'] = 'product_controller/product/64';
$route['products/quick-milk-products/quick-milk-straws-1'] = 'product_controller/product/65';
$route['products/quick-milk-products/quick-milk-straws-10'] = 'product_controller/product/66';
$route['products/quick-milk-products/quickn-milk-stand-160'] = 'product_controller/product/67';
$route['products/quick-milk-products/quick-milk-hot-chocolate'] = 'product_controller/product/70';
$route['products/quick-milk-products/pressed-milk-powder-tablet'] = 'product_controller/product/71';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow'] = 'product_controller/category/9';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/apple-balls'] = 'product_controller/product/38';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/sunflower-seeds'] = 'product_controller/product/41';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/apple-cubes'] = 'product_controller/product/42';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/cranberry'] = 'product_controller/product/43';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/marshmallow'] = 'product_controller/product/44';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/olochoc-apple-cubes'] = 'product_controller/product/58';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/olochoc-cranberry'] = 'product_controller/product/59';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/olochoc-marshmallow'] = 'product_controller/product/60';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/olochoc-sunflower-seeds'] = 'product_controller/product/61';
$route['products/chocolate-coated-fruits-nuts-and-marshmallow/olochoc-apple-balls'] = 'product_controller/product/69';
$route['products/classic-kitchen'] = 'product_controller/category/10';
$route['products/classic-kitchen/brownie'] = 'product_controller/product/46';
$route['products/classic-kitchen/cookies'] = 'product_controller/product/47';
$route['products/classic-kitchen/muffin'] = 'product_controller/product/48';
$route['products/classic-kitchen/rice-pudding'] = 'product_controller/product/49';
$route['products/classic-kitchen/breadcrumb'] = 'product_controller/product/73';
$route['products/classic-kitchen/classic-kitchen-rice'] = 'product_controller/product/74';
$route['products/classic-kitchen/risotto'] = 'product_controller/product/75';
$route['products/classic-kitchen/salad'] = 'product_controller/product/76';
$route['products/classic-kitchen/soup'] = 'product_controller/product/77';
$route['products/classic-kitchen/meals'] = 'product_controller/product/78';
}
?>
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_Input::$security is deprecated
Filename: core/Input.php
Line Number: 93
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_Input::$uni is deprecated
Filename: core/Input.php
Line Number: 99
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$exceptions is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$benchmark is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$hooks is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$config is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$utf8 is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$uri is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$router is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$output is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$security is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$input is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$lang is deprecated
Filename: core/Controller.php
Line Number: 46
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$load is deprecated
Filename: core/Controller.php
Line Number: 49
//page_url meghívja a jelenlegi nyelvi beállításokkal a get_site_url-t
if( !function_exists('page_url')){
function page_url($site_id){
$CI = & get_instance();
$url_arr = get_site_url($site_id, $CI->session->userdata('lang'));
return $url_arr['url'];
}
}
//page_url_by_lang meghívja a megadott nyelvi beállításokkal a get_site_url-t
if( !function_exists('page_url_by_lang')){
function page_url_by_lang($site_id, $lang){
$CI = & get_instance();
$url_arr = get_site_url($site_id, $lang);
return $url_arr['url'];
}
}
//get_site_url visszaadja az oldal ID-ját
if( ! function_exists('get_site_url'))
{
function get_site_url($site_id, $lang){
$CI = & get_instance();
$CI->load->model('admin/admin_site');
$CI->load->library('admin/MY_Admin_seo');
$site = $CI->admin_site->get_object_from_table('sites', "site_id = '$site_id'");
$url = "";
$success = TRUE;
if(!is_null($site)){ //ha létezik az aloldal
if(!is_null($site->parent)){//ha van szülő oldala
$parent = $CI->admin_site->get_object_from_table('sites', array('site_id' => $site->parent, 'domain' => $site->domain, 'deleted' => 0/*, 'content_id' => $site->content_id*/));
if(!is_null($parent)){//ha léteizk a szülő oldal
$url_array = get_site_url($parent->site_id, $lang);
$seo = $CI->my_admin_seo->get_seo_item('site',$site_id,$lang,'url');
$url .= $url_array['url'].$seo."/";
if(!$url_array['success'] || !$seo) $success = FALSE;
}
}else{//ha nincs szülő oldala
$seo = $CI->my_admin_seo->get_seo_item('site',$site_id,$lang,'url');
$url .= ($CI->config->item('lang_in_url') ? $lang.'/' : '').$seo.'/';
if(!$seo) $success = FALSE;
}
}else $success = FALSE;
return array('url' => $url, 'success' => $success);
}
}
if( !function_exists('product_category_url')){
function product_category_url($category_id){
$CI = & get_instance();
$tmp_url = "";
$cat_array = get_category_routing($category_id, $CI->session->userdata('lang'));
if(!is_null($cat_array) && $cat_array){
for($i=(count($cat_array)-1); $i>=0; $i--){
$tmp_url .= $cat_array[$i]['url'].'/';
}
}
return $tmp_url;
}
}
if( !function_exists('product_url')){
function product_url($prouct_id){
$CI = & get_instance();
$CI->load->library("MY_Seo");
$seo = $CI->my_seo->get_seo('product', $prouct_id, $CI->session->userdata('lang'));
return is_null($seo) ? '' : ($seo['url'] ? $seo['url']."/" : "");
}
}
if( !function_exists('media_url')){
function media_url($media_id){
$CI = & get_instance();
$CI->load->library("MY_Seo");
$seo = $CI->my_seo->get_seo('media_cat', $media_id, $CI->session->userdata('lang'));
return is_null($seo) ? '' : ($seo['url'] ? $seo['url']."/" : "");
}
}
if( !function_exists('article_url')){
function article_url($article_id){
$CI = & get_instance();
$CI->load->library("MY_Seo");
$seo = $CI->my_seo->get_seo('article', $article_id, $CI->session->userdata('lang'));
return is_null($seo) ? '' : ($seo['url'] ? $seo['url']."/" : "");
}
}
if( !function_exists('send_mail')){
function send_mail($from_name, $from_email, $to_emails, $subject, $message){
/*$CI = & get_instance();
$CI->load->library('email', $CI->config->item('pwsmtp'));
$CI->email->clear();
$CI->email->to($to_email);
$CI->email->from($from_email, $from_name);
$CI->email->subject($subject);
$CI->email->message(EMAIL_HEADER.$message.EMAIL_FOOTER);
return $CI->email->send();
*/
require_once './application/etc/lib/phpmailer/class.phpmailer.php';
$mail = new PHPMailer();
try {
$mail->Mailer = "smtp";
$mail->IsSMTP();
$mail->Host = "smtp.integrity.hu";
$mail->Hostname = "smtp.integrity.hu";
$mail->SMTPSecure="ssl";
$mail->Port="465";
$mail->SMTPAuth = true;
$mail->SMTPKeepAlive=true;
$mail->Username = "noreply@pwstudio.hu";
$mail->Password = "ahriedoh7I";
$mail->CharSet='utf-8';
$mail->From = "$from_email";
$mail->FromName = "$from_name";
//$mail->AddAddress("$to_email","$to_name");
if($to_emails)
foreach ($to_emails as $cimzettMail){
$mail->AddAddress($cimzettMail,"");
//echo $cimzettMail."hozzáadva ";
}
$mail->WordWrap = 50; // set word wrap
//$mail->AddAttachment("/var/tmp/file.tar.gz"); // attachment
$mail->IsHTML(true); // send as HTML
$mail->Subject = "$subject";
$mail->Body = EMAIL_HEADER."$message".EMAIL_FOOTER;
//$mail->AltBody = $tartalom2;
$mail->Send();
return TRUE;
} catch (phpmailerException $e) {
return FALSE;
} catch (Exception $e) {
return FALSE;
}
}
}
if( !function_exists('get_category_routing')){
function get_category_routing($category_id, $lang){
$CI = & get_instance();
$CI->load->library('admin/MY_Admin_webshop');
$CI->load->library('admin/MY_Admin_seo');
$result = array();
$category = $CI->my_admin_webshop->get_webshop_category($category_id);
if(!is_null($category)){
$category_url = $CI->my_admin_seo->get_seo_item('webshop_cat' ,$category_id, $lang, 'url');
if($category_url != ''){
$result[] = array('url' => $category_url, 'category_id' => $category_id, 'seq' => $category->seq);
if(is_null($category->parent))
return $result;
else{
$tmp_result = get_category_routing($category->parent, $lang);
if($result && $tmp_result)
return array_merge($result, $tmp_result);
elseif(!$result)
return $tmp_result;
else
return $result;
}
}else return NULL; //ha egyetlen kategóriánál nincs url, akkor NULL-al tér vissza
}else return NULL; //ha egyetlen törölt kategória is van a szülők között, akkor NULL-al tér vissza
}
}
if( !function_exists('get_img_mask')){
function get_img_mask($mask_w, $mask_h, $img_w, $img_h){
$img_tag = array();
$style = '';
$arany_w = $img_w / $mask_w;
$arany_h = $img_h / $mask_h;
if($arany_w < $arany_h){ //ha a szélesség lesz a mask mérete
$resizedx = $mask_w;
$resizedy = ($img_h * $resizedx)/$img_w;
$y = $resizedy>$mask_h ? floor(($resizedy-$mask_h)/2) : 0;
$style = 'position: absolute; top:-'.$y.'px;left:0px;';
$img_tag['width'] = $mask_w;
}else{//ha a magasság lesz a maszk mérete
$resizedy = $mask_h;
$resizedx = ($img_w * $resizedy)/$img_h;
$x = $resizedx>$mask_w ? floor(($resizedx-$mask_w)/2) : 0;
$style = 'position: absolute; left:-'.$x.'px;top:0px;';
$img_tag['height'] = $mask_h;
}
return array('img_tag' => $img_tag, 'style' => $style);
}
}
//ezzel a függvénnyel csinálok egy stringból url-t (kiszedem az ékezetes betűket, és a speciális karaktereket)
if ( ! function_exists('str_to_url'))
{
function str_to_url($str, $separator = '-', $lowercase = TRUE){
$str = replaceAccents($str);
if ($separator == 'dash')
{
$separator = '-';
}
else if ($separator == 'underscore')
{
$separator = '_';
}
$q_separator = preg_quote($separator);
$trans = array(
'&.+?;' => '',
'[^a-z0-9 _-]' => '',
'\s+' => $separator,
'('.$q_separator.')+' => $separator
);
$str = strip_tags($str);
foreach ($trans as $key => $val)
{
$str = preg_replace("#".$key."#i", $val, $str);
}
if ($lowercase === TRUE)
{
$str = strtolower($str);
}
return trim($str, $separator);
}
}
//ez a függvény szedi le az ékezeteket
if ( ! function_exists('replaceAccents'))
{
function replaceAccents($str)
{
$normalizeChars = array(
"\xC3\x80" => "A", "\xC3\x81" => "A", "\xC3\x82" => "A", "\xC3\x83" => "A", "\xC3\x84" => "A",
"\xC3\x85" => "A", "\xC3\x86" => "AE", "\xC3\x87" => "C", "\xC3\x88" => "E", "\xC3\x89" => "E",
"\xC3\x8A" => "E", "\xC3\x8B" => "E", "\xC3\x8C" => "I", "\xC3\x8D" => "I", "\xC3\x8E" => "I",
"\xC3\x8F" => "I", "\xC3\x90" => "D", "\xC3\x91" => "N", "\xC3\x92" => "O", "\xC3\x93" => "O",
"\xC3\x94" => "O", "\xC3\x95" => "O", "\xC3\x96" => "O", "\xC3\x98" => "O", "\xC3\x99" => "U",
"\xC3\x9A" => "U", "\xC3\x9B" => "U", "\xC3\x9C" => "U", "\xC3\x9D" => "Y", "\xC3\x9E" => "P",
"\xC3\x9F" => "ss", "\xC3\xA0" => "a", "\xC3\xA1" => "a", "\xC3\xA2" => "a", "\xC3\xA3" => "a",
"\xC3\xA4" => "a", "\xC3\xA5" => "a", "\xC3\xA6" => "ae", "\xC3\xA7" => "c", "\xC3\xA8" => "e",
"\xC3\xA9" => "e", "\xC3\xAA" => "e", "\xC3\xAB" => "e", "\xC3\xAC" => "i", "\xC3\xAD" => "i",
"\xC3\xAE" => "i", "\xC3\xAF" => "i", "\xC3\xB0" => "o", "\xC3\xB1" => "n", "\xC3\xB2" => "o",
"\xC3\xB3" => "o", "\xC3\xB4" => "o", "\xC3\xB5" => "o", "\xC3\xB6" => "o", "\xC3\xB8" => "o",
"\xC3\xB9" => "u", "\xC3\xBA" => "u", "\xC3\xBB" => "u", "\xC3\xBC" => "u", "\xC3\xBD" => "y",
"\xC3\xBE" => "p", "\xC3\xBF" => "y", "\xC4\x80" => "A", "\xC4\x81" => "a", "\xC4\x82" => "A",
"\xC4\x83" => "a", "\xC4\x84" => "A", "\xC4\x85" => "a", "\xC4\x86" => "C", "\xC4\x87" => "c",
"\xC4\x88" => "C", "\xC4\x89" => "c", "\xC4\x8A" => "C", "\xC4\x8B" => "c", "\xC4\x8C" => "C",
"\xC4\x8D" => "c", "\xC4\x8E" => "D", "\xC4\x8F" => "d", "\xC4\x90" => "D", "\xC4\x91" => "d",
"\xC4\x92" => "E", "\xC4\x93" => "e", "\xC4\x94" => "E", "\xC4\x95" => "e", "\xC4\x96" => "E",
"\xC4\x97" => "e", "\xC4\x98" => "E", "\xC4\x99" => "e", "\xC4\x9A" => "E", "\xC4\x9B" => "e",
"\xC4\x9C" => "G", "\xC4\x9D" => "g", "\xC4\x9E" => "G", "\xC4\x9F" => "g", "\xC4\xA0" => "G",
"\xC4\xA1" => "g", "\xC4\xA2" => "G", "\xC4\xA3" => "g", "\xC4\xA4" => "H", "\xC4\xA5" => "h",
"\xC4\xA6" => "H", "\xC4\xA7" => "h", "\xC4\xA8" => "I", "\xC4\xA9" => "i", "\xC4\xAA" => "I",
"\xC4\xAB" => "i", "\xC4\xAC" => "I", "\xC4\xAD" => "i", "\xC4\xAE" => "I", "\xC4\xAF" => "i",
"\xC4\xB0" => "I", "\xC4\xB1" => "i", "\xC4\xB2" => "IJ", "\xC4\xB3" => "ij", "\xC4\xB4" => "J",
"\xC4\xB5" => "j", "\xC4\xB6" => "K", "\xC4\xB7" => "k", "\xC4\xB8" => "k", "\xC4\xB9" => "L",
"\xC4\xBA" => "l", "\xC4\xBB" => "L", "\xC4\xBC" => "l", "\xC4\xBD" => "L", "\xC4\xBE" => "l",
"\xC4\xBF" => "L", "\xC5\x80" => "l", "\xC5\x81" => "L", "\xC5\x82" => "l", "\xC5\x83" => "N",
"\xC5\x84" => "n", "\xC5\x85" => "N", "\xC5\x86" => "n", "\xC5\x87" => "N", "\xC5\x88" => "n",
"\xC5\x89" => "n", "\xC5\x8A" => "N", "\xC5\x8B" => "n", "\xC5\x8C" => "O", "\xC5\x8D" => "o",
"\xC5\x8E" => "O", "\xC5\x8F" => "o", "\xC5\x90" => "O", "\xC5\x91" => "o", "\xC5\x92" => "CE",
"\xC5\x93" => "ce", "\xC5\x94" => "R", "\xC5\x95" => "r", "\xC5\x96" => "R", "\xC5\x97" => "r",
"\xC5\x98" => "R", "\xC5\x99" => "r", "\xC5\x9A" => "S", "\xC5\x9B" => "s", "\xC5\x9C" => "S",
"\xC5\x9D" => "s", "\xC5\x9E" => "S", "\xC5\x9F" => "s", "\xC5\xA0" => "S", "\xC5\xA1" => "s",
"\xC5\xA2" => "T", "\xC5\xA3" => "t", "\xC5\xA4" => "T", "\xC5\xA5" => "t", "\xC5\xA6" => "T",
"\xC5\xA7" => "t", "\xC5\xA8" => "U", "\xC5\xA9" => "u", "\xC5\xAA" => "U", "\xC5\xAB" => "u",
"\xC5\xAC" => "U", "\xC5\xAD" => "u", "\xC5\xAE" => "U", "\xC5\xAF" => "u", "\xC5\xB0" => "U",
"\xC5\xB1" => "u", "\xC5\xB2" => "U", "\xC5\xB3" => "u", "\xC5\xB4" => "W", "\xC5\xB5" => "w",
"\xC5\xB6" => "Y", "\xC5\xB7" => "y", "\xC5\xB8" => "Y", "\xC5\xB9" => "Z", "\xC5\xBA" => "z",
"\xC5\xBB" => "Z", "\xC5\xBC" => "z", "\xC5\xBD" => "Z", "\xC5\xBE" => "z", "\xC6\x8F" => "E",
"\xC6\xA0" => "O", "\xC6\xA1" => "o", "\xC6\xAF" => "U", "\xC6\xB0" => "u", "\xC7\x8D" => "A",
"\xC7\x8E" => "a", "\xC7\x8F" => "I", "\xC7\x90" => "i", "\xC7\x91" => "O", "\xC7\x92" => "o",
"\xC7\x93" => "U", "\xC7\x94" => "u", "\xC7\x95" => "U", "\xC7\x96" => "u", "\xC7\x97" => "U",
"\xC7\x98" => "u", "\xC7\x99" => "U", "\xC7\x9A" => "u", "\xC7\x9B" => "U", "\xC7\x9C" => "u",
"\xC7\xBA" => "A", "\xC7\xBB" => "a", "\xC7\xBC" => "AE", "\xC7\xBD" => "ae", "\xC7\xBE" => "O",
"\xC7\xBF" => "o", "\xC9\x99" => "e",
);
$str = strtr($str, $normalizeChars);
$str = trim(preg_replace('/[^\w\d_ -]/si', '', $str)); //remove all illegal chars
$str = preg_replace('/\s+/', ' ', $str);
return $str;
}
}
//egy címhez tartozó koordinátákat kéri le
if( !function_exists('get_address_coords'))
{
function get_address_coords($param){
$lat = NULL;
$lng = NULL;
$CI = & get_instance();
// SET ADDRESS
$address = urlencode("$param Magyarország");
$status = 'REQUEST_DENIED';
while($status == 'REQUEST_DENIED'){
// URL TO HTTP REQUEST
$link = "https://maps.googleapis.com/maps/api/geocode/json?address=$address&sensor=false&key=".$CI->config->item('google_api_key');
// WE GET FILE CONTENT
$page = json_decode(file_get_contents($link),TRUE);
if($page){
$status = $page['status'];
if($status == 'OK'){
$result = reset($page['results']);
$lat = $result['geometry']['location']['lat'];
$lng = $result['geometry']['location']['lng'];
}
}else $status = 'ERROR';
}
return array('lat' => $lat, 'lng' => $lng);
}
}
if( !function_exists('geoCodeAllEmpty'))
{
function geoCodeAllEmpty($tablanev){
define("MAPS_HOST", "maps.google.com");
define("KEY", "ABQIAAAAC4MAUvASotZn2y_4FeBm7xS-Lkigx9oEUJnkTfjVSyFbQFsDpxRaZOBTHaA_vTVy9qgztvtsznAuBA");
// Select all the rows in the markers table
$query = "SELECT * FROM $tablanev WHERE address != ''";
$result = mysql_query($query);
if (!$result) {
die("Invalid query: " . mysql_error());
}
// Initialize delay in geocode speed
$delay = 0;
$base_url = "http://" . MAPS_HOST . "/maps/geo?output=xml" . "&key=" . KEY;
// Iterate through the rows, geocoding each address
while ($row = @mysql_fetch_assoc($result)) {
$geocode_pending = true;
while ($geocode_pending) {
$address = $row["address"];
$id = $row["city_id"];
$request_url = $base_url . "&q=" . urlencode($address);
$xml = simplexml_load_file($request_url) or die("url not loading");
$status = $xml->Response->Status->code;
//echo $status;
if (strcmp($status, "200") == 0) {
// Successful geocode
$geocode_pending = false;
$coordinates = $xml->Response->Placemark->Point->coordinates;
$coordinatesSplit = explode(",", $coordinates);
// Format: Longitude, Latitude, Altitude
$lat = $coordinatesSplit[1];
$lng = $coordinatesSplit[0];
echo "$address: $lat,$lng
";
/*$query = sprintf("UPDATE $tablanev " .
" SET lat = '%s', lng = '%s' " .
" WHERE id = '%s' LIMIT 1;",
mysql_real_escape_string($lat),
mysql_real_escape_string($lng),
mysql_real_escape_string($id));
$update_result = mysql_query($query);
if (!$update_result) {
die("Invalid query: " . mysql_error());
}*/
} else if (strcmp($status, "620") == 0) {
// sent geocodes too fast
$delay += 100000;
} else {
// failure to geocode
$geocode_pending = false;
//echo "Address " . $address . " failed to geocoded. ";
//echo "Received status " . $status . " \n";
}
usleep($delay);
}
}
}
}
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property home::$db is deprecated
Filename: core/Loader.php
Line Number: 343
A PHP Error was encountered
Severity: 8192
Message: Creation of dynamic property CI_DB_mysql_driver::$stricton is deprecated
Filename: database/DB_driver.php
Line Number: 87