Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
city.php
Содержимое
<?php $base_url = '../'; $title = 'Недвижимость управление'; require($base_url . 'inc/top.inc.php'); require_once('menu.inc.php'); require_once('config.realty.inc.php'); if ( $_SERVER['REQUEST_METHOD'] == 'POST' ) { if ($_POST['item_name'] != '' ) { if (ini_get('magic_quotes_gpc') == 0) { $_POST['item_name'] = addslashes($_POST['item_name']); } if ($_POST['id'] != '') { $_POST['id'] = (int) $_POST['id']; $_POST['parent_id'] = (int) $_POST['parent_id']; $result = sql("update `directory` set name='{$_POST['item_name']}', parent_id='{$_POST['parent_id']}' where id='{$_POST['id']}'"); if (!$result) { error(); } } else { $_POST['parent_id'] = (int) $_POST['parent_id']; $result = sql("insert into `directory` (code, name, parent_id) values ('" . REALTY_CITY_CODE . "', '{$_POST['item_name']}', '{$_POST['parent_id']}')"); if (!$result) { error(); } else { $last_id = mysql_insert_id(); sql("update directory set position='{$last_id}' where id='{$last_id}' and code='" . REALTY_CITY_CODE . "'"); } } } } if ( $_GET['action'] == 'chpos' ) { $_GET['id'] = intval( $_GET['id'] ); $item_one = sqlval("select id, parent_id, position from directory where id='{$_GET['id']}' and code='" . REALTY_CITY_CODE . "'"); if ( $_GET['dir'] == 'up' ) { $item_two = sqlval("select id, position from directory where position<'{$item_one['position']}' and code='" . REALTY_CITY_CODE . "' and parent_id='{$item_one['parent_id']}' order by position desc limit 0,1"); } if ( $_GET['dir'] == 'down' ) { $item_two = sqlval("select id, position from directory where position>'{$item_one['position']}' and code='" . REALTY_CITY_CODE . "' and parent_id='{$item_one['parent_id']}' order by position asc limit 0,1"); } if ( $item_two['position'] != '' ) { sql("update directory set position='{$item_two['position']}' where id='{$item_one['id']}'"); sql("update directory set position='{$item_one['position']}' where id='{$item_two['id']}'"); } } if ( $_GET['action'] == 'delete' && $_GET['id'] != '' ) { $_GET['id'] = (int) $_GET['id']; $result = sql("delete from `directory` where id='{$_GET['id']}' and code='" . REALTY_CITY_CODE . "'"); if (!$result) { error(); } } $r_item = sql("select * from `directory` where code='".REALTY_CITY_CODE."' order by position"); if (!$r) { error(); } while ( $rs_item = sqlget ( $r_item ) ) { $item_array [$rs_item['parent_id']] [$rs_item['id']] = array( 'name' => $rs_item ['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(); } } }); $('#up').click(function() { if ( typeof $('#sSection option:selected').val() === 'undefined' ) { alert('Выберите запись для изменения позиции'); } else { location.href = '?action=chpos&dir=up&id=' + $('#sSection option:selected').val(); } }); $('#down').click(function() { if ( typeof $('#sSection option:selected').val() === 'undefined' ) { alert('Выберите запись для изменения позиции'); } else { location.href = '?action=chpos&dir=down&id=' + $('#sSection option:selected').val(); } }); }); --> </script> <div align="center" class="blok">Города</div> <div align="center"> <select id="sSection" size="15"> <option value="0">***Корень</option> <?php ShowTree ( $item_array, 0, '', 0 ); ?> </select><br> <input type="hidden" name="del"> <input id="add" type="button" value="Добавить" /> <input id="edit" type="button" value="Редактировать" /> <input id="delete" type="button" value="Удалить" /> <input id="up" type="button" value="Вверх" /> <input id="down" type="button" value="Вниз" /> </div> <?php if ( $_GET['action'] == 'add' ) { ?> <script type="text/javascript"> <!-- $(document).ready(function(){ $('#sSection').click(function() { $('#parent_id').val($('#sSection option:selected').val()); $('#parent').html(jQuery.trim($('#sSection option:selected').text())); }); }); --> </script> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center" class="table_border"> <tr> <td> <table width="100%" cellspacing="1" cellpading="2" border="0"> <tr bgcolor="#ffffff"> <td colspan="2" align="center" class="blok">Добавить город</td> </tr> <tr bgcolor="#ffffff"> <td>Родитель</td> <td> <input id="parent_id" name="parent_id" type="hidden" value="0" /> <span id="parent">Корень</span> </td> </tr> <tr bgcolor="#ffffff"> <td>Название:</td> <td><input type="text" name="item_name" value="" size="60" /></td> </tr> <tr bgcolor="#ffffff"> <td colspan="2" align="center"><input type="submit" name="submit" value="Сохранить" /></td> </tr> </table> </td> </tr> </table> </form> <?php } elseif ( $_GET['action'] == 'edit' ) { ?> <script type="text/javascript"> <!-- $(document).ready(function(){ $('#sSection').change(function() { if ($('#sSection option:selected').val() != id) { $('#parent_id').val($('#sSection option:selected').val()); $('#parent').html(jQuery.trim($('#sSection option:selected').text())); parent_id = $('#sSection option:selected').val(); } else { alert('Запись не может быть родителем самого себя'); } }); }); --> </script> <?php $_GET['id'] = (int) $_GET['id']; $row = sqlval("select * from directory where id='{$_GET['id']}'"); if ( $row['parent_id'] != 0 ) { $row_parent = sqlval("select id, name from directory where id='{$row['parent_id']}'"); } else { $row_parent = array("id" => 0, "name" => "Корень"); } ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <input id="id" type="hidden" name="id" value="<?php echo $row['id']; ?>" /> <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center" class="table_border"> <tr> <td> <table width="100%" cellspacing="1" cellpading="2" border="0"> <tr bgcolor="#ffffff"> <td colspan="2" align="center" class="blok">Редактировать город</td> </tr> <tr bgcolor="#ffffff"> <td>Родитель</td> <td> <input id="parent_id" name="parent_id" type="hidden" value="<?php echo $row_parent['id']; ?>" /> <span id="parent"><?php echo $row_parent['name']; ?></span> </td> </tr> <tr bgcolor="#ffffff"> <td>Название:</td> <td><input type="text" name="item_name" value="<?php echo $row['name']; ?>" size="60" /></td> </tr> <tr bgcolor="#ffffff"> <td colspan="2" align="center"><input type="submit" name="submit" value="Сохранить" /></td> </tr> </table> </td> </tr> </table> </form> <?php } ?> <?php require($base_url . 'inc/bottom.inc.php'); ?>
/admin/realty/
Имя
Дата
Размер
..
2026-10-02
temp
2013-08-19
action.php
2011-11-22
8 кб.
business.php
2011-03-22
8 кб.
city.php
2011-03-22
7 кб.
config.realty.inc.php
2011-03-29
215 байт
deal_type.php
2011-03-22
8 кб.
handlers.js
2011-05-11
7 кб.
import.php
2013-03-27
10 кб.
maps.php
2012-07-12
850 байт
menu.inc.php
2011-09-09
558 байт
object_type.php
2011-03-22
8 кб.
old_import.php
2013-01-14
9 кб.
realty.php
2013-12-23
20 кб.
realty_home_type.php
2011-03-29
8 кб.
realty_link.php
2011-06-21
2 кб.
realty_type.php
2011-03-22
8 кб.
save_link.php
2011-03-25
239 байт
upload.php
2011-05-10
11 байт
user.php
2011-11-18
4 кб.
/admin/realty
Загрузить файлы
Файл 1
Файл 2
Файл 3