core/api/modules/cat/index.php

24 lines
869 B
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
@mkdir(MYDIR . '/img/pages_cat', 0700);
@mkdir(MYDIR . '/img/pages_cat/slider', 0700);
@mkdir(MYDIR . '/img/pages_cat/slider/' . ID, 0700);
//подключаем инсталлятор
if (file_exists(MYDIR . '/api/modules/' . MOD . '/install.php'))
include MYDIR . '/api/modules/' . MOD . '/install.php';
/*
модуль отображает список страниц определенной категории
*/
$mod = new main(BD_NAME, BD_TYPE, BD_HOST, BD_USER, BD_PWD);
$mod->db=$db;
$smarty->assign('page_info', @$mod->get_info(ID));//получаем инфо о категории
$smarty->assign('list', @$mod->get_pages(ID));
//print_r( @$mod->get_pages(ID));
@include_once(MYDIR . '/api/php/list_file.php');
$sliders=list_file(MYDIR . '/img/pages_cat/slider/' . ID);
$smarty -> assign( 'sliders', $sliders );
?>