24 lines
998 B
PHP
Executable File
24 lines
998 B
PHP
Executable File
<?php
|
|
if ($_SESSION['dostup']!=='a' && $_SESSION['dostup']!=='e')header( 'Location: /403/' );
|
|
unset($a);
|
|
$a['mod'] = 'set_rekv';
|
|
if ($_POST['ok']){
|
|
$id = $db -> get_val( 'settings', $a, 'id' );
|
|
if (!$xml['xml']){
|
|
$db->free_sql("INSERT INTO `settings` (`mod`, `xml`, `site`) VALUES ('set_rekv', '<org>Заполните правильное название</org>', '');");
|
|
$id = $db -> get_val( 'settings', $a, 'id' );
|
|
}
|
|
$db->update_xml('settings', $id, $_POST);
|
|
header( 'Location: /set_rekv/' );
|
|
}
|
|
$xml = $db -> get_val( 'settings', $a, 'xml' );
|
|
if (!$xml['xml']){$db->free_sql("INSERT INTO `settings` (`mod`, `xml`, `site`)
|
|
VALUES ('set_rekv', '<org>Заполните правильное название</org>', '');");
|
|
$xml = $db -> get_val( 'settings', $a, 'xml' );
|
|
}
|
|
require_once MYDIR . '/api/php/parsexml.php';
|
|
$parce -> make_massiv ( $xml );
|
|
$arr = $parce -> res;
|
|
foreach ( $arr as $key => $value ) $rekv[$key] = $value;
|
|
$smarty->assign('rekv', $rekv);
|
|
?>
|