Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
action.php
Содержимое
<?php $base_url = '../'; require_once( $base_url . '../func.php' ); $conn = db_connect(); require_once( $base_url . 'lib/php/JsHttpRequest.php' ); $JsHttpRequest =& new JsHttpRequest("windows-1251"); /*ini_set('error_reporting', E_ALL); ini_set('display_errors', 'On');*/ switch ( $_REQUEST['action']) { case 'ChSection': foreach ( $_REQUEST['items'] as $item ) { $item = intval( $item ); $result = sql("update newyear set id_razdel='{$_REQUEST['section']}' WHERE id='{$item}'"); } break; case 'ChStatus': foreach ( $_REQUEST['items'] as $item ) { $item = intval( $item ); $result = sql("update newyear set status='{$_REQUEST['status']}' WHERE id='{$item}'"); } break; case 'Delete': foreach ( $_REQUEST['items'] as $item ) { $item = intval( $item ); $rs_image = sqlval("select img_index from newyear where id='{$item}'"); if (!$rs_image) { error(); } if ( $rs_image['img_index'] != '' ) { if ( file_exists( $base_url."../".$rs_image['img_index'] ) ) { unlink($base_url."../".$rs_image['img_index']); } if ( file_exists( $base_url."../".str_replace('.', '_sm.', $rs_image['img_index'] ) ) ) { unlink($base_url."../".str_replace('.', '_sm.', $rs_image['img_index'] )); } } $result = sql("delete from newyear where id='{$item}'"); if (!$result) { error(); } } break; case 'DeleteOne': $_REQUEST['item'] = intval( $_REQUEST['item'] ); $rs_image = sqlval("select img_index from newyear where id='{$_REQUEST['item']}'"); if (!$rs_image) { error(); } if ( $rs_image['img_index'] != '' ) { if ( file_exists( $base_url."../".$rs_image['img_index'] ) ) { unlink($base_url."../".$rs_image['img_index']); } if ( file_exists( $base_url."../".str_replace('.', '_sm.', $rs_image['img_index'] ) ) ) { unlink($base_url."../".str_replace('.', '_sm.', $rs_image['img_index'] )); } } $result = sql("delete from newyear where id='{$_REQUEST['item']}'"); if (!$result) { error(); } break; case 'add': if (ini_get('magic_quotes_gpc') == 1) { $_POST['name'] = stripslashes($_POST['name']); $_POST['note'] = stripslashes($_POST['note']); $_POST['person'] = stripslashes($_POST['person']); $_POST['organization'] = stripslashes($_POST['organization']); $_POST['phone_or_email'] = stripslashes($_POST['phone_or_email']); } $_POST['name'] = mysql_real_escape_string($_POST['name']); $_POST['note'] = mysql_real_escape_string($_POST['note']); $_POST['person'] = mysql_real_escape_string($_POST['person']); $_POST['organization'] = mysql_real_escape_string($_POST['organization']); $_POST['phone_or_email'] = mysql_real_escape_string($_POST['phone_or_email']); $_POST['id_razdel'] = intval( $_POST['id_razdel'] ); $_POST['status'] = intval( $_POST['status'] ); $_POST['paid'] = intval( $_POST['paid'] ); //upload image $img_index = ''; if ($_FILES['img_foto']['tmp_name'] != '' ) { if (is_uploaded_file($_FILES['img_foto']['tmp_name'])) { $img_index=upload_foto($_FILES['img_foto']['tmp_name'],80,500,1,1,$base_url."../user_foto/newyear"); $img_index="user_foto/newyear/".$img_index; } } $result = sql("insert into newyear set data='{$_POST['data']}', name='{$_POST['name']}', note='{$_POST['note']}', person='{$_POST['person']}', organization='{$_POST['organization']}', phone_or_email='{$_POST['phone_or_email']}', status='{$_POST['status']}', id_razdel='{$_POST['id_razdel']}', paid='{$_POST['paid']}', img_index='{$img_index}' "); if (!$result) { error(); } header('location: newyear.php?id_razdel=' . $_POST['id_razdel']); break; case 'edit': if (ini_get('magic_quotes_gpc') == 1) { $_POST['name'] = stripslashes($_POST['name']); } $_POST['name'] = mysql_real_escape_string($_POST['name']); $_POST['id_razdel'] = intval( $_POST['id_razdel'] ); $_POST['status'] = intval( $_POST['status'] ); //upload image if ($_FILES['img_foto']['tmp_name'] != '' ) { if (is_uploaded_file($_FILES['img_foto']['tmp_name'])) { //delete old image if exists $r_img_old=sqlval("select img_index from newyear where id='{$_POST['id']}'"); if ( $rs_image['img_index'] != '' ) { if ( file_exists( $base_url."../".$rs_image['img_index'] ) ) { unlink($base_url."../".$rs_image['img_index']); } if ( file_exists( $base_url."../".str_replace('.', '_sm.', $rs_image['img_index'] ) ) ) { unlink($base_url."../".str_replace('.', '_sm.', $rs_image['img_index'] )); } } $img_index=upload_foto($_FILES['img_foto']['tmp_name'],80,500,1,1,$base_url."../user_foto/newyear"); $img_index="user_foto/newyear/".$img_index; $sql_img = ",img_index='{$img_index}'"; } } else { $sql_img = ''; } $result=sql("update newyear set data='{$_POST['data']}', name='{$_POST['name']}', note='{$_POST['note']}', person='{$_POST['person']}', organization='{$_POST['organization']}', phone_or_email='{$_POST['phone_or_email']}', status='{$_POST['status']}', id_razdel='{$_POST['id_razdel']}', paid='{$_POST['paid']}' {$sql_img} where id='{$_POST['id']}'"); if (!$result) { error(); } header('location: newyear.php?id_razdel=' . $_POST['id_razdel']); break; }
/admin/newyear/
Имя
Дата
Размер
..
2026-10-02
action.php
2011-11-14
6 кб.
newyear.php
2011-11-14
17 кб.
razdel.php
2011-11-21
8 кб.
/admin/newyear
Загрузить файлы
Файл 1
Файл 2
Файл 3