'); ini_set('error_append_string', '

'); ini_set('display_errors', 'On'); error_reporting (E_ALL ^ E_NOTICE); //echo 123; session_start(); /* if ($_COOKIE['allow_access'] == '') { header("location:/beta/"); //echo 123; die; } */ //error_reporting (E_ALL); header("Content-type: text/html; charset=utf-8"); if ($_GET['d_s'] != "") { session_start(); // include("_core/_init.markas.inc.php"); // Array ( [] => 3c312788e64db8dd346f2c5435e530d5 [PHPSESSID] => 9a82508ed4b2b3c37b52a5a86402684d [ses_id] => 8,Markas ,c4ca4238a0b923820dcc509a6f75849b,7f7620ce57f0cf04dabe06f7c6a7fc6a [cookie_lng] => 1 ) SetCookie("PHPSESSID", 'sess', (time() - 1800)); session_destroy(); //Unset($_COOKIE['PHPSESSID']); header("Location: " . base64_decode($_GET['d_s'])); //echo 123; exit; } //echo 123; ob_start(); // if ($url_decoder['sid'] == "") { $url_decoder['sid'] = session_id(); } foreach ($_GET as $track_key => $track_val) { $$track_key = $track_val; } foreach ($_POST as $track_key => $track_val) { if (is_string($track_val)) { $$track_key = htmlspecialchars(str_replace('\\', '', $track_val), ENT_QUOTES); } else { $$track_key = $track_val; } } foreach ($_SERVER as $track_key => $track_val) { $$track_key = $track_val; } //echo 12; include("config.php"); //Echo 123; // checks access $addon = ''; list ( $request ) = explode("?", $_SERVER['REQUEST_URI']); list ($empty, $error_linkname) = end(explode("/", $request)); $file_extension = end(explode(".", $request)); if ($error_linkname != '' && $file_extension != 'php') { //$show_404 = TRUE; //print $error_linkname; header("HTTP/1.0 404 OK"); $SQL = "SELECT * FROM `{$pr_code}_pages` WHERE `linkname` = '$error_linkname' "; $row = mysql_fetch_array(mysql_query($SQL)); $db_page = $row; if ($row['id'] == '') { include("include/page_error.php"); exit; } } else { header("HTTP/1.0 200 OK"); } /* $result = mysql_query("SELECT * FROM `{$pr_code}_temp_texts` "); while ($row = mysql_fetch_array($result)) { $row['text'] = str_replace("vedrana.lt/beta", "vedrana.lt", $row['text']); mysql_query("UPDATE `{$pr_code}_temp_texts` SET `text` = '{$row['text']}' WHERE `id` = '{$row['id']}'"); } */ //echo 123; $site_result = mysql_query("select value from $sb_config where page_id=0 and name='site_works'"); $site_row = mysql_fetch_row($site_result) or die(mysql_error()); if (!isset($site_row[0]) || $site_row[0] != 'true') { if ((!in_array($_SERVER["REMOTE_ADDR"],$admin_ip)) && ($_COOKIE["allow_access"] != md5($pr_code))) { $uc_result = mysql_query("select text from $sb_texts where page_id=0 and area=401"); $uc_row = mysql_fetch_row($uc_result); $text = (isset($uc_row[0])) ? $uc_row[0] : 'The web-site is under construction.'; echo << {$company_name} {$text} HTML_TEXT; exit; $addon = ''; } else { $addon = "PUSLAPIS MATOMAS TIK JUMS"; } } ////////////////////////////// if ($sb_new_link) { include("include/head.php"); } include("{$cms_dir}/stat/include/new-visitor.inc.php3"); @include("include/standart.php"); include("include/var_users.php"); if (!isset($page_id) || $page_id == 0) { $result = mysql_query("select $sb_page.id, $sb_languages.id, $sb_languages.trumpiau, $sb_languages.codeshort from $sb_page, $sb_languages where $sb_languages.id=$sb_page.language order by $sb_page.defaultas desc, $sb_languages.defaultas desc limit 1"); $pago = @mysql_fetch_row($result); $page_id = $pago[0]; $language = $pago[1]; $lngshort = $pago[2]; $codeshort = $pago[3]; $pirmas_puslapis = true; } else { $page_id = intval($page_id); $result = mysql_query("select $sb_page.disabled, $sb_page.language, $sb_languages.trumpiau, $sb_languages.codeshort, $sb_page.defaultas from $sb_page, $sb_languages where $sb_page.id=$page_id and $sb_page.language=$sb_languages.id"); if (mysql_num_rows($result) == 0) { include("include/page_error.php"); } $pago = mysql_fetch_row($result); if ($pago[0] == 2 && (!(in_array($page_id,$var_users_arr)))) { include("include/page_error.php"); } $language = $pago[1]; $lngshort = $pago[2]; $codeshort = $pago[3]; $page_id = intval($page_id); if ($pago[4]) { $pirmas_puslapis = true; } } # --------------------------------------------- Markas CORE --------------------------------------------------- $db_class_url = "_core/lib"; include("_core/_init.markas.inc.php"); $lapo_id = $page_id; # --- Chekinamamas useris jeigu yra SID -- list ($x, $y, $server_name) = explode("/", $_SERVER['HTTP_REFERER']); //print $server_name; if ($url_decoder['sid'] == "" || session_id() != $url_decoder['sid'] && $server_name == $pr_url || $_SERVER['HTTP_REFERER'] == "") { // $url_decoder['sid'] = session_id(); } if ($url_decoder['sid'] != "" && strlen($url_decoder['sid']) == 32) { $url_decoder['sid'] = addslashes($url_decoder['sid']); $db_session = $db_mysql->fetch_array($db_mysql->query("SELECT * FROM `{$pr_code}_a_session` WHERE `ses_id` = '{$url_decoder['sid']}' AND `a_ip` = '" . $_SERVER['REMOTE_ADDR'] . "'")); $db_user = $db_mysql->fetch_array($db_mysql->query("SELECT * FROM `{$pr_code}_users_contacts` WHERE `id` = '{$db_session['a_user_id']}'")); } # -- Paimama preke i krepseli -- $shop = new shop(); $shop->product_cart(); # --------------------------------------------- Markas CORE END --------------------------------------------------- //default settings of web-site $sets = array( 'divs_articles_newest_size' => 6, 'divs_articles_first_size' => 3, 'divs_articles_page_size' => 20, 'divs_news_newest_size' => 8, 'divs_news_page_size' => 20, 'divs_news_block_size' => 8, 'divs_comments_page_size' => 20, 'divs_comments_show_ip' => 0, 'divs_mag_list_size' => 6, // kol-vo statej rjadom s foto (statji bez kartinok) 'divs_mag_hot_size' => 3, // pokazyvajutsja s kartinkoj 'divs_news_cover_size' => 20, // kol-vo novostej na titul'noj stranice 'divs_news_glob_page_size' => 20, // kol-vo novostej v stranice pri puslapiavimase 'divs_spec_list_size' => 3, 'divs_spec_hot_size' => 1 ); $sql = "SELECT * FROM {$sb_config} WHERE page_id = 0 AND name LIKE 'divs_%'"; $q = mysql_query($sql); while ($line = mysql_fetch_assoc($q)) { $sets[$line['name']] = (isset($sets[$line['name']])) ? intval($line['value']) : $line['value']; } mysql_free_result($q); //********************************* //include('adv/phpadsnew.inc.php'); include("include/page_counter.php"); $result = @mysql_query("select $sb_page.template, $sb_page.title, $sb_page.parent_id, $sb_page.admin_group, $sb_page.intmenu, $sb_page.contentof, $sb_page.up_date from $sb_page, $sb_templates where $sb_page.id=$page_id and ($sb_page.disabled<>2 $var_implode) and $sb_page.template=$sb_templates.id limit 1"); if (!$result) { include("include/page_error.php"); } else { $pago = @mysql_fetch_row($result); $page_name = $pago[1]; $parent_id = $pago[2]; $temp_nr = $pago[0]; $show_path = $pago[3]; $show_intm = $pago[4]; $contentof = $pago[5]; $pageUpDate = $pago[6]; if (!$temp_nr) { // @header("Location: $absolute_path"); } $parentarr = get_parent($page_id); $howdeep = count($parentarr); $result = @mysql_query("select $sb_languages.trumpiau, $sb_languages.code from $sb_templates, $sb_languages where $sb_templates.id=$temp_nr and $sb_templates.language=$sb_languages.id"); $pago = @mysql_fetch_row($result); $encoding = $pago[1]; if ($action == "spausdinti") { $real_temp_nr = $temp_nr; $temp_nr = 0; } $dtResult = mysql_query("select max(up_date) from $sb_texts where page_id= '".preg_replace('/\D+/', '', $page_id)."'"); $dtPago = @mysql_fetch_row($dtResult); $pageUpDate = (isset($dtPago[0]) && (strcmp($dtPago[0], $pageUpDate) > 0)) ? $dtPago[0] : $pageUpDate; //header('Last-Modified: ' . $pageUpDate); // search meta $searchKeywords1 = ''; $searchDescription1 = ''; $searchTitle1 = ''; $searchAdditional1 = ''; if ($page_id && preg_match('/\d+/', $page_id)) { $dbResult = mysql_query("select defaultas, parent_id, search_keywords, search_description, search_title, search_additional from $sb_page where (defaultas=1 and language={$language}) or id = '{$page_id}' limit 2"); $isMain = true; while ($row = mysql_fetch_array($dbResult)) { if ($row['defaultas'] == 1) { $searchKeywords0 = $row['search_keywords']; $searchDescription0 = $row['search_description']; $searchTitle0 = $row['search_title']; $searchAdditional0 = $row['search_additional']; } else { $isMain = false; $searchKeywords1 = $row['search_keywords']; $searchDescription1 = $row['search_description']; $searchTitle1 = $row['search_title']; $searchAdditional1 = $row['search_additional']; } } $searchKeywords1 = ($searchKeywords1) ? $searchKeywords1 : $searchKeywords0; $searchDescription1 = ($searchDescription1) ? $searchDescription1 : $searchDescription0; if ($isMain) { $searchKeywords1 = $searchKeywords0; $searchDescription1 = $searchDescription0; $searchTitle1 = $searchTitle0; $searchAdditional1 = $searchAdditional0; } $searchTitle1 = ($searchTitle1) ? $searchTitle1 : ''; $searchAdditional1 = ($searchAdditional1) ? $searchAdditional1 : $searchAdditional0; mysql_free_result($dbResult); } $searchTitle1 = ($searchTitle1) ? $searchTitle1 : $page_name; if (($pr_code == 'drainvac') && ($liekana[0] != '')) { $query_11 = "SELECT `meta_title` FROM `infol_products` WHERE `linkname`='$liekana[0]'"; $result_11 = mysql_query($query_11) or die(mysql_error()); if (mysql_num_rows($result_11) > 0) { $row_11 = mysql_fetch_array($result_11); //$page_name = $row_11['meta_title']; $searchTitle1 = $row_11['meta_title']; } } //////////////// if ($page_id == 134) { if ($liekana[0] != "") { if (is_numeric($liekana[0])) { $SQL = "`id` = '{$liekana[0]}'"; } else { $SQL = "`link_name` = '{$liekana[0]}'"; } $stulpeliai = mysql_fetch_array(mysql_query("SELECT * FROM `{$pr_code}_shop_category` WHERE $SQL AND `show` = 1 ORDER BY `position` ASC")); if ($stulpeliai['meniu_name'] != "") { $stulpeliai['name'] = $stulpeliai['meniu_name']; } $searchTitle1 = $stulpeliai['name']; $page_name = $stulpeliai['name']; } list ($id_x, $value_x) = explode("-", $liekana[1]); if ($liekana[1] != "" && $id_x != "g" && !is_numeric($value_x) && !$value_x > 0) { if (is_numeric($liekana[1])) { $SQL = "`id` = '{$liekana[1]}'"; } else { $SQL = "`link_name` = '{$liekana[1]}'"; } $stulpeliai = mysql_fetch_array(mysql_query("SELECT * FROM `{$pr_code}_shop_products` WHERE $SQL AND `show` = 1 ORDER BY `position` ASC")); $searchTitle1 = $stulpeliai['name']; $page_name = $stulpeliai['name']; } } $db_page = mysql_fetch_array(mysql_query("SELECT * FROM `{$pr_code}_pages` WHERE `id` = '{$page_id}'")); if ($liekana[0] != '' && $db_page['modul_file'] == 'invetor_kond_product_list.php') { $row = mysql_fetch_array(mysql_query(" SELECT * FROM `{$sb_page}` WHERE `linkname` = '{$liekana[0]}' ")); $searchTitle1 = $row['title']; $page_name = $row['title']; } if ((($url_decoder['f'] == 'history') || ($url_decoder['f'] == 's_history')) && $page_id == 142) { $searchTitle1 = 'Užsakymų istorija'; $page_name = 'Užsakymų istorija'; } // if ($searchTitle1 == "" || $page_name == "") { header("Location: /"); exit; } @include("include/lang/".$lngshort.".".$codeshort.".php"); // Next line is from Oleg: initiate core require_once('./_core/_init.core.inc.php'); @include("include/events.php"); // print $template_dir.$pr_dirlogin."_".$temp_nr."_".$pago[0].".php"; mysql_query("SET NAMES `utf8`"); if ($pr_code == 'n_pittsdaz' && $page_id >= 146 && $temp_nr == 3) { $temp_nr = 5; } include($template_dir.$pr_dirlogin."_".$temp_nr."_".$pago[0].".php"); } echo $addon; ob_end_flush(); //by Oleg: //print "\n"; // print '
' . db_sql_grazinimui() . '
'; ?>