core/api/modules/bib/index.php

14 lines
769 B
PHP
Raw Permalink Normal View History

2023-08-14 09:15:58 +05:00
<?php
ini_set('display_errors', 0 );
//if ( $_SESSION['dostup'] != 'a' && $_SESSION['dostup'] != 'e' && $_SESSION['dostup'] != 'c' ) header( 'Location: /login/' );// && $dostup!='m'
/* ----------------------------------------------------------------------
26.07.2023
Получаем список категорий
---------------------------------------------------------------------- */
$parent=($_GET['id'])?$_GET['id']:0;
$list_cat=\DB::getAll("SELECT * FROM `bib_category` WHERE `category`=?", $parent);
$smarty -> assign( 'list_cat', $list_cat );
$list_books=\DB::getAll("SELECT * FROM `bib` WHERE `category`=?", $parent);
$smarty -> assign( 'list_books', $list_books );
$smarty -> assign( 'list', 'api/modules/' . MOD . '/list.html' );
?>