36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
<?php
|
|
/* узнаем текущую категорию*/
|
|
unset($a);
|
|
$a['id']=ID;
|
|
$smarty -> assign( 'cat_name', $db -> get_val ( 'm_groupe', $a, 'naim'));
|
|
/* узнаем подкатегории */
|
|
unset($a);
|
|
unset($b);
|
|
if (ID){
|
|
$a['parent']=ID;
|
|
$b['m_groupe']=ID;
|
|
}else{
|
|
$a['parent']=0;
|
|
$b['m_groupe']=0;
|
|
}
|
|
$a['public']=1;
|
|
$b['public']=1;
|
|
$m_groupe = $db -> get_massiv ( 'm_groupe', $a);
|
|
$smarty -> assign( 'm_groupe', $m_groupe);
|
|
//print_r($m_groupe);
|
|
$m_tovar = $db -> get_massiv ( 'm_tovar', $b);
|
|
$smarty -> assign( 'm_tovar', $m_tovar);
|
|
//print_r($m_tovar);
|
|
//print_r($m_groupe);
|
|
//хлебные крошки
|
|
$p=ID;
|
|
while ($p!=0){
|
|
unset($tmp);
|
|
unset($a);
|
|
$a['id']=$p;
|
|
$tmp=$db->get_massiv('m_groupe', $a, 'id', 1);
|
|
$p=$tmp[0]['parent'];
|
|
if (ID!=$tmp[0]['id'])$breadcrumb= '<li class="breadcrumb-item"><a href="/tovar_cat/' . $tmp[0]['id'] . '" style="font-size: 10pt;">' . $tmp[0]['naim'] . '</a></li>' . $breadcrumb;
|
|
}
|
|
$smarty -> assign( 'breadcrumb', $breadcrumb);
|
|
?> |