GetShopValues(); if ($_SESSION['payment']['multiplex'] > 0) { $gOptions['main_base_curr'] = $_SESSION['payment']['curr_name']; $gOptions['main_prec'] = $_SESSION['payment']['curr_prec']; } // Request topic & goods $topic = $gData->GetCatFull(); $rows = $gData->GetNumRows($topic); if ( $rows == 0 ) { header("Location: ./"); exit; } // Init templates $gTpl = new FastTemplate('./'.TEMPLATES); $gTpl->DefineTemplate(array('blank' => 'blank.htm', 'main' => '_map/main.htm', 'unit' => '_map/unit.htm', 'elem_folder' => '_map/elem_folder.htm', 'elem_file' => '_map/elem_file.htm', 'page_title' => '_map/page_title.htm' )); // Start to parse sections tree for ( $n = 1; $n <= $rows; $n++ ) { $hash = $gData->FetchRow($topic); if ( $hash[5] == 2 ) { $link = $hash[6]; } else { if ( strlen($hash[8]) == 0 ) { $link = "dir.php?id=".$hash[0]; } else { $link = 'dir_'.urlencode($hash[8]).'.htm'; } } $gTpl->Assign(array('NAME' => htmlspecialchars($hash[1]), 'LINK' => $link, 'LEVEL' => $hash[2] )); $gTpl->Parse('ELEMENT', 'elem_folder'); $gTpl->Parse('UNIT', '.unit'); if ( isset($_GET['nogoods']) ) continue; // Parse Goods $total_goods = $gData->MakeDirGoods($hash[0], false, false, false, false); $goods = $gData->GetMainGoods(false, ''); $goods_rows = $gData->GetNumRows($goods); for ( $i = 1; $i <= $goods_rows; $i++ ) { $g_hash = $gData->FetchRow($goods); $link = ( strlen($g_hash[29]) > 0 ) ? 'goods_'.urlencode($g_hash[29]).'.htm' : 'goods.php?id='.$g_hash[0]; $gTpl->Assign(array('NAME' => htmlspecialchars($g_hash[3]), 'LINK' => $link, 'LEVEL' => $hash[2] )); $gTpl->Parse('ELEMENT', 'elem_file'); $gTpl->Parse('UNIT', '.unit'); } } // Parse content $gTpl->Parse('CONTENT', 'main'); // Echo shop variables echo_shop_variables('in_techpage', true); // Additional modules use_php_mod('other'); $gTpl->Parse('PAGETITLE', 'page_title'); // Parse main page $gTpl->Parse('BLANK', 'blank'); $gEndPoint = run_time($gStartPoint); $gTpl->FastPrint('BLANK'); // Echo page compilate time echo_page_time($gEndPoint); } ?>