Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
rubrik.php
Содержимое
<?php $base_url="../"; require_once $base_url."inc/top.inc.php"; if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) { if ( $_POST['name'] != '' ) { if (ini_get('magic_quotes_gpc') == 1) { $_POST['name'] = stripslashes($_POST['name']); $_POST['note'] = stripslashes($_POST['note']); $_POST['description'] = stripslashes($_POST['description']); $_POST['title'] = stripslashes($_POST['title']); $_POST['translit_name'] = stripslashes($_POST['translit_name']); } if ($_POST['translit_name'] == '') $_POST['translit_name'] = translit( str_replace(".", "", str_replace(",", "", $_POST['name'] ))); $_POST['name'] = mysql_real_escape_string( $_POST['name'] ); $_POST['description'] = mysql_real_escape_string( $_POST['description'] ); $_POST['title'] = mysql_real_escape_string( $_POST['title'] ); $_POST['note'] = mysql_real_escape_string( $_POST['note'] ); $_POST['translit_name'] = mysql_real_escape_string( $_POST['translit_name'] ); $_POST['hint'] = mysql_real_escape_string( $_POST['hint'] ); $_POST['id_parent'] = intval( $_POST['id_parent'] ); if ( $_POST['id'] == '' ) { $result = sql("insert into otrasl2 set name_otrsl='{$_POST['name']}', id_parent='{$_POST['id_parent']}', hint='{$_POST['hint']}', title='{$_POST['title']}', description='{$_POST['description']}', translit_name='{$_POST['translit_name']}', note='{$_POST['note']}'"); echo mysql_error(); if ( !$result ) { error(); } } else { $_POST['id'] = intval( $_POST['id'] ); if ( $_POST['id'] != $_POST['id_parent'] ) { $result = sql("update otrasl2 set name_otrsl='{$_POST['name']}', id_parent='{$_POST['id_parent']}', hint='{$_POST['hint']}', title='{$_POST['title']}', description='{$_POST['description']}', translit_name='{$_POST['translit_name']}', note='{$_POST['note']}' where id = '{$_POST['id']}'"); if ( !$result ) { error(); } } } } } if ( $_GET['action'] == 'delete' && $_GET['id'] != '' ) { $_GET['id'] = intval( $_GET['id'] ); $result = sql("delete from otrasl2 where id='{$_GET['id']}'"); if (!$result) { error(); } sql("delete from rubrik2 where id_rubrik='{$_GET['id']}'"); } $r_section = sql ( "SELECT * FROM `otrasl2` ORDER BY name_otrsl" ); if (!$r_section) { error(); } while ( $rs_section = sqlget ( $r_section ) ) { //$section_array [$rs_section['id_parent']] [$rs_section['id']] = array( 'name' => $rs_section ['id'] . ' ' . $rs_section ['name_otrsl'] ); $section_array [$rs_section['id_parent']] [$rs_section['id']] = array( 'name' => $rs_section ['name_otrsl'] ); } ?> <script type="text/javascript"> <!-- $(document).ready(function(){ $('#add').click(function() { location.href = '?action=add'; }); $('#edit').click(function() { if ( typeof $('#sSection option:selected').val() === 'undefined' ) { alert('Выберите раздел для редактирования'); } else { location.href = '?action=edit&id=' + $('#sSection option:selected').val(); } }); $('#delete').click(function() { if ( typeof $('#sSection option:selected').val() === 'undefined' ) { alert('Выберите раздел для удаления'); } else { if ( confirm('Удалить раздел ' + jQuery.trim($('#sSection option:selected').text()) + ' ?') ) { location.href = '?action=delete&id=' + $('#sSection option:selected').val(); } } }); }); --> </script> <div align="center" class="title"><b>Редактирование каталога организаций Орла</b></div> <div align="center"> <select id="sSection" name="id_rubrik" size="25"> <option value="0">===КОРЕНЬ===</option> <?php ShowTree ( $section_array, 0, '', $rubrik_array ); ?> </select> <br /> <input id="add" type="button" value="Добавить"> <input id="edit" type="button" value="Изменить"> <INPUT id="delete" type="button" value="Удалить"> <?php if ( $_GET['action'] == 'add' ) { ?> <script type="text/javascript"> <!-- $(document).ready(function(){ $('#sSection').click(function() { $('#id_parent').val($('#sSection option:selected').val()); $('#parent').html(jQuery.trim($('#sSection option:selected').text())); }); }); --> </script> <div class="clear-block bord-mn bgh2" > <table cellpadding="0" cellspacing="0" class="toptable"> <tr><td ><h3>добавить раздел каталога</h3></td> </tr> </table> </div> <div class="clear-block" > <form action="<?php $_SERVER['PHP_SELF']; ?>" method="POST"> <table cellpadding="0" cellspacing="0" class="tbmain" > <tr class="tdwhite"> <td>Родитель</td> <td> <input id="id_parent" name="id_parent" type="hidden" value="0" /> <span id="parent">Корень</span> </td> </tr> <tr> <td> Название раздела </td> <td> <input type="text" name="name" value="" size="80" /> </td> </tr> <tr> <td> Подсказка </td> <td> <input type="text" name="hint" value="" size="80" /> </td> </tr> <tr> <td> Title </td> <td> <input type="text" name="title" value="" size="80" /> </td> </tr> <tr> <td> Description </td> <td> <textarea name="description" rows="10" cols="60"></textarea> </td> </tr> <tr> <td> Translit Name </td> <td> <input type="text" name="translit_name" value="" size="80" /> </td> </tr> <tr> <td> Описание раздела </td> <td> <textarea name="note" rows="20" cols="60"></textarea> </td> </tr> <tr > <td class="bn"> </td> <td class="bn"><input type="submit" name="submit2" value="Добавить" /></td> </tr> </table> </form> </div> <?php } elseif ( $_GET['action'] == 'edit' ) { ?> <script type="text/javascript"> <!-- $(document).ready(function(){ var id = $('#id').val(); $('#sSection').change(function() { if ($('#sSection option:selected').val() != id) { $('#id_parent').val($('#sSection option:selected').val()); $('#parent').html(jQuery.trim($('#sSection option:selected').text())); id_parent = $('#sSection option:selected').val(); } else { alert('Раздел не может быть родителем самого себя'); } }); }); --> </script> <div class="clear-block bord-mn bgh2" > <table cellpadding="0" cellspacing="0" class="toptable"> <tr><td ><h3>редактировать раздел каталога</h3></td> </tr> </table> </div> <div class="clear-block" > <?php $_GET['id'] = intval( $_GET['id'] ); $row = sqlval("select * from otrasl2 where id='{$_GET['id']}'"); if ( $row['id_parent'] != 0 ) { $row_parent = sqlval("select id, name_otrsl from otrasl2 where id='{$row['id_parent']}'"); } else { $row_parent = array("id" => 0, "name_otrsl" => "Корень"); } ?> <form action="<?php $_SERVER['PHP_SELF']; ?>" method="POST" enctype="multipart/form-data"> <input id="id" type="hidden" name="id" value="<?php echo $row['id']; ?>" /> <table cellpadding="0" cellspacing="0" class="tbmain" > <tr class="tdwhite"> <td> Родитель </td> <td> <input id="id_parent" name="id_parent" type="hidden" value="<?php echo $row_parent['id']; ?>" /> <span id="parent"><?php echo $row_parent['name_otrsl']; ?></span> </td> </tr> <tr> <td> Название раздела </td> <td> <input type="text" name="name" value="<?php echo $row['name_otrsl']; ?>" size="80" /> </td> </tr> <tr> <td> Подсказка </td> <td> <input type="text" name="hint" value="<?php echo $row['hint']; ?>" size="80" /> </td> </tr> <tr> <td> Title </td> <td> <input type="text" name="title" value="<?php echo $row['title']; ?>" size="80" /> </td> </tr> <tr> <td> Description </td> <td> <textarea name="description" rows="10" cols="60"><?php echo $row['description']; ?></textarea> </td> </tr> <tr> <td> Translit Name </td> <td> <input type="text" name="translit_name" value="<?php echo $row['translit_name']; ?>" size="80" /> </td> </tr> <tr> <td> Описание раздела </td> <td> <textarea name="note" rows="20" cols="60"><?php echo $row['note']; ?></textarea> </td> </tr> <tr> <td class="bn"> </td> <td class="bn"><input type="submit" name="submit" value="Изменить" /></td> </tr> </table> </form> </div> <?php } ?> </div> <?php require_once $base_url."inc/bottom.inc.php"; ?>
/admin/katalog/
Имя
Дата
Размер
..
2026-10-02
_rubrik.php
2011-08-23
8 кб.
_rubrik2.php
2011-08-25
12 кб.
action.php
2011-08-25
2 кб.
locality.php
2012-06-05
6 кб.
rubrik.php
2019-02-25
8 кб.
rubrik2.php
2011-08-22
10 кб.
rubrik_1.php
2011-08-18
8 кб.
sub_admn_area.php
2011-08-18
8 кб.
/admin/katalog
Загрузить файлы
Файл 1
Файл 2
Файл 3