shind']); $pysikliendihind = parse_tpl($tplPysikliendihind); } else { $pysikliendihind = ''; } $tmpSuurus = unserialize($t['suurus']); if(is_array($tmpSuurus)) { $tmpSizeListbox = suuruse_listbox($t['id'], $t['hind'], $tmpSuurus); } $t['suurus_loend'] = (isSet($tmpSizeListbox)) ? $tmpSizeListbox : ''; $tooted[] = parse_tpl($tplToode); unset($tmpSizeListbox); } if($result->_numrows) { #$teade = parse_tpl(load_tpl('inc/info/uudised.htm')); $sisuosa .=implode(parse_tpl(load_tpl(tpl_path.'tooted_eraldaja.htm')), $tooted); } else { $sisuosa=parse_tpl(load_tpl(tpl_path.'toode_polegi.htm')); } } else if (isset($_GET['sooduspakkumised'])) { $tplPages = load_tpl(tpl_path.'lehed.htm'); $totalProducts = SQL::get("SELECT count(*) FROM ".tbl_products." WHERE soodushind > 0 AND aktiivne='y'"); $pagination = grojsus($totalProducts, $p, max_tooteid_ekraanil, 0, '', "p",true,"SENP",10,true); $numeric_navbar = strlen($pagination[1]) ? parse_tpl($tplPages) : ''; # $result = SQodushind'] > 0 ? $t['soodushind'] : $t['hind']-($t['hind'] * $discount / 100); $t['soodushind'] = $t['hind']-($t['hind'] * $discount / 100); $t['soodushind'] = round_price($t['soodushind']); $pysikliendihind = parse_tpl($tplPysikliendihind); } else { $pysikliendihind = ''; } $tmpSuurus = unserialize($t['suurus']); if(is_array($tmpSuurus)) { $tmpSizeListbox = suuruse_listbox($t['id'], $t['hind'], $t['soodushind'], $tmpSuurus); } $t['suurus_loend'] = (isSet($tmpSizeListbox)) ? $tmpSizeListbox : ''; $tooted[] = parse_tpl($tplToode); unset($tmpSizeListbox); } if($result->_numrows) $sisuosa=implode(parse_tpl(load_tpl(tpl_path.'tooted_eraldaja.htm')), $tooted); else $sisuosa=parse_tpl(load_tpl(tpl_path.'toode_polegi.htm')); } else { header('Location: infolehed.php?id=1'); exit; } /* else { $teade = parse_tpl(load_tpl('inc/info/uudised.htm')); #$sisuosa =implode(parse_tpl(load_tpl(tpl_path.'tooted_eraldaja.htm')), $tooted); } */ if (strlen($cat_navbar)||strlen($numeric_navbar)) { $numeric_navbar = '          ' . $numeric_navbar; $navbar = parse_tpl(load_tpl(tpl_path.'menyy_mainpage_navbar.htm')); } $sisuosa = $teade. $navbar.'
'.$sisuosa.'
'.$navbar; $total=get_time()-$start; print parse_tpl($tplPage); ?>