1) { $req = explode('/', $_GET['REQ1']); $_GET['l'] = $req[0]; } if (!empty($_GET['l']) and in_array($_GET['l'], $CFG['languages'])) { $cfg['l'] = $_GET['l']; $cfg['path_l'] = '/'.$cfg['l']; } else { $cfg['l'] = $CFG['language_def']; $cfg['path_l'] = ''; } #--- ajax funkcionalas administravimui if (!empty($_GET['AJAX'])) { require(PATH.'/lib/ajax.php'); exit; } if (!empty($_GET['debug_1238j87'])) { $db->query('set profiling=1;'); $db->query('set profiling_history_size=100;'); } $tpl->lang = $cfg['l']; loadPhrases('./', 'index', $cfg['l']); initVar('m'); include(PATH.'/modules/customers/customers.php'); $customer = new customer(); $STRUCT = new Structure(true); $STRUCT->restoreQuery(); $block_mode = (bool)($m==-1); if (empty($m) or $block_mode) { $m = $STRUCT->defaultId; } $sid = $m;//ramentas. atsikratyt $href = '?l='.$cfg['l'].'&m='.$m; $ref = $STRUCT->getRef($m); //languageSelector(); $i = 0; $tmp = array(); if (sizeof($CFG['languages_enabled'])>1) { foreach ($CFG['languages_enabled'] as $a['l']) { $link = url('?l='.$a['l'].'&m='.$m); $class = $cfg['l']==$a['l'] ? ' class="active"' : ''; $tmp[] = ''.$a['l'].''; $i++; } $tpl->set('_LAN_SELECTOR', ' | '.join('', $tmp)); } include(PATH.'/menu/menu.php'); $tpl->set('LOGIN_FORM', $customer->process()); //$tpl->set('ALL_NEWS', $customer->GetAllNews()); if (isset($_GET['print']) or isset($_POST['print'])) { $tpl->need_bodyOnload('window.confirm(\''.$_0['print'].'?\')&&window.print()'); $tpl->load_file('tpl/print.tpl', '_HTML'); $tpl->need("/layout.css"); // $tpl->need("/tpl/print.css"); } elseif (isset($_GET['sendurl'])) { $tpl->need("/layout.css"); $tpl->need("/pop.css"); $tpl->need('/p.php', 'js'); ob_start(); include('modules/send_url/send_url.php'); $tpl->v['_MAIN_CONTENT'] = ob_get_clean(); $tpl->load_file('tpl/popup.tpl', '_HTML'); } elseif (isset($_GET['info']) or isset($_GET['popup'])) { $tpl->need("/layout.css"); $tpl->need('/p.php', 'js'); if (!empty($_GET['id'])) { $ids = explode('-', $_GET['id']); $id = isset($ids[1]) ? (int)$ids[1] : 1; $info = $db->getFirst(' SELECT title'.$cfg['l'].' AS title,content'.$cfg['l'].' AS content FROM site_content WHERE id='.$id.' AND sub_id='.(int)$ids[0] ); $tpl->v['_MAIN_CONTENT'] = $info['content'].' '; $tpl->setTitles($info['title']); } if (isset($_GET['info'])) { $tpl->need("/tpl/info.css"); $tpl->load_file('tpl/info.tpl', '_HTML'); } else { $tpl->need("/tpl/pop.css"); $tpl->load_file('tpl/popup.tpl', '_HTML'); } } else { #--- main template ---- $tpl->need("/layout.css"); $tpl->need('/p.php', 'js'); $not_virtual_pages = (!isset($_GET['login']) and !isset($_GET['register']) and !isset($_GET['restore']) and !isset($_GET['change_data'])); $t = ( !empty($menu->template) and $not_virtual_pages ) ? $menu->template : 'tpl/index.tpl'; // if (isset($_GET['selectedObjects']) or isset($_GET['searchObjects'])) { // $t = 'tpl/objects.tpl'; // } // v($t); $tpl->load_file($t, '_HTML'); } if (!empty($sid) and !isset($STRUCT->t[$sid])) { header("http/1.0 404 Not Found"); // echo 'Page not found.'; } //preprocessing: foreach ($tpl->modules as $MPAR) { if (file_exists($MPAR['file'])) { ob_start(); include($MPAR['file']); $tpl->vars[$MPAR['name']] = $tpl->parse(ob_get_clean()); } else err('Module %s does not exists.', $MPAR['name']); } $tpl->modules = array(); if (empty($tpl->v['_MAIN_CONTENT']) and isset($STRUCT->t[$sid])) { ob_start(); switch ($STRUCT->t[$sid]['location']) { case 'module': unset($MPAR); $_MAIN_CONTENT_BLOCK = 1; @list($MPAR['id'], $MPAR['cid']) = explode(':', $STRUCT->t[$sid]['url']); /* $r = $db->getFirst(' SELECT CONCAT(folder,file) AS module FROM modules WHERE id="'.(int)$MPAR['id'].'"' ); if (file_exists(PATH.'/'.$r['module'])) { */ if (isset($menu->modules[$MPAR['id']]) and file_exists(PATH.'/'.$menu->modules[$MPAR['id']]['file'])) { $data = readContent($sid, (isset($_GET['sub'])) ? (int)$_GET['sub'] : false); echo $data['content']; if (!empty($data['title']) and $data['title']!='----') { $tpl->set('_MENUTITLE', $data['title']); } include(PATH.'/'.$menu->modules[$MPAR['id']]['file']); } else { header("http/1.0 404 Not Found"); echo 'Page not found.'; } $_MAIN_CONTENT_BLOCK = 0; break; case 'db': $data = readContent($sid, (isset($_GET['sub'])) ? (int)$_GET['sub'] : false); echo $data['content']; if (!empty($data['title']) and $data['title']!='----') $tpl->set('_MENUTITLE', $data['title']); } $tpl->v['_MAIN_CONTENT'] .= ob_get_clean(); } include(PATH.'/modules/ads/class-ads.php'); #-- reklama if (isset($_GET['print']) or isset($_POST['print']) or empty($not_virtual_pages)) { } else { $ads = new ads(); } $menu->makeBreadcrumbs(); $tpl->load($tpl->v['_MAIN_CONTENT'], '_MAIN_CONTENT'); foreach ($tpl->modules as $MPAR) { if (file_exists($MPAR['file'])) { ob_start(); include($MPAR['file']); $tpl->vars[$MPAR['name']] = $tpl->parse(ob_get_clean()); } else err('Module %s does not exists.', $MPAR['name']); } $tpl->gp('_MAIN_CONTENT'); if (isset($_GET['print']) or isset($_POST['print'])) { $tpl->need("/tpl/print.css"); } $tpl->system_variables(); header('Content-Type: text/html; charset=UTF-8'); ?> <br /> <b>Notice</b>: Undefined variable: tpl in <b>H:\root\home\test24-001\www\realtoreuropePHP1\index.php</b> on line <b>213</b><br /> <br /> <b>Notice</b>: Trying to get property 'v' of non-object in <b>H:\root\home\test24-001\www\realtoreuropePHP1\index.php</b> on line <b>213</b><br />
Notice: Undefined variable: tpl in H:\root\home\test24-001\www\realtoreuropePHP1\index.php on line 219

Notice: Trying to get property 'v' of non-object in H:\root\home\test24-001\www\realtoreuropePHP1\index.php on line 219
Notice: Undefined variable: tpl in H:\root\home\test24-001\www\realtoreuropePHP1\index.php on line 221

Notice: Trying to get property 'v' of non-object in H:\root\home\test24-001\www\realtoreuropePHP1\index.php on line 221
>
Notice: Undefined variable: tpl in H:\root\home\test24-001\www\realtoreuropePHP1\index.php on line 221

Fatal error: Uncaught Error: Call to a member function p() on null in H:\root\home\test24-001\www\realtoreuropePHP1\index.php:221 Stack trace: #0 {main} thrown in H:\root\home\test24-001\www\realtoreuropePHP1\index.php on line 221