20 lines
657 B
PHP
Executable File
20 lines
657 B
PHP
Executable File
<?php
|
|
if ($_SESSION['dostup']!=='a' && $_SESSION['dostup']!=='e')header( 'Location: /403/' );
|
|
unset($a);
|
|
if (ID){
|
|
$a['parent']=ID;
|
|
//узнаем вышестоящий каталог...
|
|
unset($b);
|
|
$b['id']=ID;
|
|
$db -> get_val('m_groupe', $b, 'parent');
|
|
$parent=$db->result;
|
|
if ($parent>0)$smarty -> assign( 'parent', $parent );
|
|
}else
|
|
$a['parent']='0';
|
|
$c['m_groupe']=$a['parent'];
|
|
$smarty -> assign( 'list', $db -> get_massiv ( 'm_groupe', $a, 'naim' ) );
|
|
//print_r($db -> get_massiv ( 'm_groupe', $a, 'naim' ));
|
|
//получаем товар
|
|
$smarty -> assign( 'tovarlist', $db -> get_massiv ( 'm_tovar', $c, 'naim' ) );
|
|
|
|
?>
|