GetShopValues(); // Go to expanded search? if ( isset($_POST['exp_search_words']) > 0 ) { $location = 'dir.php?'.session_name().'='.session_id(); unset($_SESSION['exp_search']); foreach ($_POST as $key => $value) { $location .= '&'.$key.'='.urlencode($value); $_SESSION['exp_search'][$key] = $value; } echo ''; exit; } // Parse expand search from $gTpl = new FastTemplate('./'.TEMPLATES.'/_exp_search'); $gTpl->DefineTemplate(array('main' => 'main.htm')); if ( !isset($_SESSION['exp_search']) ) { $_SESSION['exp_search']['status0'] = 1; $_SESSION['exp_search']['status3'] = 1; } $gTpl->Assign(array('UNIT' => '', 'WORDS' => htmlspecialchars($_SESSION['exp_search']['exp_search_words']), 'STATUS0' => ( $_SESSION['exp_search']['status0']*1 > 0 ) ? 'checked' : '', 'STATUS1' => ( $_SESSION['exp_search']['status1']*1 > 0 ) ? 'checked' : '', 'STATUS2' => ( $_SESSION['exp_search']['status2']*1 > 0 ) ? 'checked' : '', 'STATUS3' => ( $_SESSION['exp_search']['status3']*1 > 0 ) ? 'checked' : '', 'NEW' => ( $_SESSION['exp_search']['new']*1 > 0 ) ? 'checked' : '', 'HIT' => ( $_SESSION['exp_search']['hit']*1 > 0 ) ? 'checked' : '', 'DISC' => ( $_SESSION['exp_search']['disc']*1 > 0 ) ? 'checked' : '', 'PRICEFROM' => htmlspecialchars($_SESSION['exp_search']['price_from']), 'PRICETO' => htmlspecialchars($_SESSION['exp_search']['price_to']) )); $topic = $gData->GetExpSearch(EXP_SEARCH_CAT_LEVEL); $rows = $gData->GetNumRows($topic); if ( $rows > 0 ) { for ( $i=1; $i <= EXP_SEARCH_CAT_LEVEL; $i++ ) { $gTpl->DefineTemplate(array('unit_'.$i => "unit_{$i}.htm", 'unit_'.$i.'_sel' => "unit_{$i}_sel.htm", )); } for ( $i = 1; $i <= $rows; $i++ ) { $hash = $gData->FetchRow($topic); $gTpl->Assign(array('ID' => $hash[0], 'NAME' => htmlspecialchars($hash[1]) )); if ($_SESSION['exp_search']['topic_search'] == $hash[0]) { $gTpl->Parse('UNIT', '.unit_'.($hash[2]+1).'_sel'); } else { $gTpl->Parse('UNIT', '.unit_'.($hash[2]+1)); } } } // Echo shop variables echo_shop_variables('in_techpage'); // Parse main page $gTpl->Parse('MAIN', 'main'); $gEndPoint = run_time($gStartPoint); $gTpl->FastPrint('MAIN'); // Echo page compilate time echo_page_time($gEndPoint); } ?>