Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
_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['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['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 grtovar_new set name='{$_POST['name']}', id_parent='{$_POST['id_parent']}', hint='{$_POST['hint']}', title='{$_POST['title']}', translit_name='{$_POST['translit_name']}', note='{$_POST['description']}'"); echo mysql_error(); if ( !$result ) { error(); } } else { $_POST['id'] = intval( $_POST['id'] ); if ( $_POST['id'] != $_POST['id_parent'] ) { $result = sql("update grtovar_new set name='{$_POST['name']}', id_parent='{$_POST['id_parent']}', hint='{$_POST['hint']}', title='{$_POST['title']}', translit_name='{$_POST['translit_name']}', note='{$_POST['description']}' where id = '{$_POST['id']}'"); if ( !$result ) { error(); } } } } } if ( $_GET['action'] == 'delete' && $_GET['id'] != '' ) { $_GET['id'] = intval( $_GET['id'] ); $result = sql("delete from grtovar_new where id='{$_GET['id']}'"); if (!$result) { error(); } sql("delete from rubrik where id_rubrik='{$_GET['id']}'"); } $r_section = sql ( "SELECT * FROM `grtovar_new` order by name" ); 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'] ); } ?> <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(); } } }); $('#quick_search').keyup(function(){ $('#sSection option').each(function(){ var _search_str = $('#quick_search').val(); var _haystack_str = $(this).html(); if (_haystack_str.indexOf(_search_str)!=-1) { $(this).attr('selected', 'selected'); } }); }); }); --> </script> <div align="center" class="title"><b>Редактирование каталога товаров</b></div> <div align="center"> <select id="sSection" name="id_rubrik" size="20"> <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="Удалить"> <input id="quick_search" type="text" 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> Translit Name </td> <td> <input type="text" name="translit_name" value="" size="80" /> </td> </tr> <tr> <td> Описание раздела </td> <td> <textarea name="description" 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 grtovar_new where id='{$_GET['id']}'"); if ( $row['id_parent'] != 0 ) { $row_parent = sqlval("select id, name from grtovar_new where id='{$row['id_parent']}'"); } else { $row_parent = array("id" => 0, "name" => "Корень"); } ?> <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']; ?></span> </td> </tr> <tr> <td> Название раздела </td> <td> <input type="text" name="name" value="<?php echo $row['name']; ?>" 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> 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="description" 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/tovar/
Имя
Дата
Размер
..
2026-10-02
_rubrik.php
2011-12-19
8 кб.
_rubrik2.php
2011-12-19
12 кб.
action.php
2015-04-28
3 кб.
migrate.php
2011-12-15
3 кб.
razbros_ins.php
2006-01-13
509 байт
razbros_rubrik.php
2006-01-13
1 кб.
rubrik.php
2008-01-14
1 кб.
rubrik_sql.php
2015-04-21
3 кб.
tovar_otzyv.php
2015-05-05
10 кб.
/admin/tovar
Загрузить файлы
Файл 1
Файл 2
Файл 3