16 lines
467 B
PHP
Executable File
16 lines
467 B
PHP
Executable File
<?php
|
|
|
|
if ($_SESSION['dostup']!=='a' && $_SESSION['dostup']!=='e')header( 'Location: /403/' );
|
|
//$db -> debug = 1;
|
|
if ( @$_POST['txt'] ){
|
|
//Узнаем, есть ли категория
|
|
unset($a);
|
|
$a['txt']=$_POST['txt'];
|
|
$id = $db -> get_val('page_cat', $a, 'id');
|
|
if (!$id)$db -> add( 'page_cat', $_POST );
|
|
header( 'Location: /page_cat/' );
|
|
}
|
|
$db -> get_massiv ( 'page_cat', '', 'txt' );
|
|
$smarty -> assign( 'list', $db -> result );
|
|
|
|
?>
|