Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
event_sql.php
Содержимое
<?php /* This file has been created on Tue Apr 28 17:05:38 MSD 2009 */ $base_url="../"; ini_set("error_reporting", "1024"); ini_set("display_error", "On"); require_once($base_url."../func.php"); $l = db_connect_afisha(); //коннектимся к базе mysql_select_db("infostrana"); if($_REQUEST['id'] == ''){ if($_POST['id_grp']==2){ $append = "<p><strong>Время сеансов уточняйте по телефонам кинотеатров.</strong></p>"; }else{ $append = ""; } }else{ $append = ""; } if (ini_get('magic_quotes_gpc') == 0) { $_POST['text_document']=addslashes($_POST['text_document']); $_POST['name']=addslashes(str_replace("'","",$_POST['name'])); $_POST['note_small']=addslashes($_POST['note_small'].$append); $_POST['description'] = addslashes($_POST['description']); } $_POST['description'] = mysql_real_escape_string($_POST['description']); $note = $_POST['text_document']; if ($_REQUEST['id'] == '') { if (is_uploaded_file($_FILES['anons_image']['tmp_name'])) { $img_index=upload_foto($_FILES['anons_image']['tmp_name'], 90, 80, 0, 1, "../../user_foto/afisha"); $img_index="user_foto/afisha/".$img_index; } elseif ($_POST['anons_image_url'] != '') { $tmp_name = md5(microtime()); if (($file = file_get_contents($_POST['anons_image_url'])) !== false) { file_put_contents('/tmp/'.$tmp_name, $file); $img_index=upload_foto('/tmp/'.$tmp_name, 90, 80, 0, 1, "../../user_foto/afisha"); $img_index="user_foto/afisha/".$img_index; unlink('/tmp/'.$tmp_name); } } if (is_uploaded_file($_FILES['image_big']['tmp_name'])) { //$image_big=upload_foto($_FILES['image_big']['tmp_name'], 150, 260, 0, 1, "../../user_foto/afisha"); $image_big=upload_foto($_FILES['image_big']['tmp_name'], 250, 400, 0, 1, "../../user_foto/afisha"); $img_big="user_foto/afisha/".$image_big; } elseif ($_POST['image_big_url'] != '') { $tmp_name = md5(microtime()); if (($file = file_get_contents($_POST['image_big_url'])) !== false) { file_put_contents('/tmp/'.$tmp_name, $file); //$image_big=upload_foto('/tmp/'.$tmp_name, 150, 260, 0, 1, "../../user_foto/afisha"); $image_big=upload_foto('/tmp/'.$tmp_name, 250, 400, 0, 1, "../../user_foto/afisha"); $img_big="user_foto/afisha/".$image_big; unlink('/tmp/'.$tmp_name); } } if (is_uploaded_file($_FILES['image_orig']['tmp_name'])) { $image_orig=upload_foto($_FILES['image_orig']['tmp_name'], 1024, 1024, 0, 1, "../../user_foto/afisha"); $img_orig="user_foto/afisha/".$image_orig; } elseif ($_POST['image_orig_url'] != '') { $tmp_name = md5(microtime()); if (($file = file_get_contents($_POST['image_orig_url'])) !== false) { file_put_contents('/tmp/'.$tmp_name, $file); $image_orig=upload_foto('/tmp/'.$tmp_name, 1024, 1024, 0, 1, "../../user_foto/afisha"); $img_orig="user_foto/afisha/".$image_orig; unlink('/tmp/'.$tmp_name); } } $urlFragmentNumber = null; $_url = $_POST['url']; $numberI = 0; while (true) { $existAfisha = sqlval(' SELECT COUNT(id) as total FROM afisha_event WHERE url = "' . $_url . '" '); if ($existAfisha['total'] > 0) { $numberI = $numberI + 1; $_url = $_POST['url'] . '-' . $numberI; } else { break; } } $_POST['url'] = $_url; $r = sql("insert into afisha_event values (NULL, '{$_POST['id_grp']}', NULL, '{$_POST['name']}', '{$_POST['keywords']}', '{$_POST['description']}', '{$_POST['note_small']}','{$_POST['text_document']}','".$img_index."', '".$img_big."', '".$img_orig."', '{$_POST['url']}', '{$_POST['age']}', '')"); if (!$r) { error(); } else { header("Location: index.php"); } } //================================================================================================================= if ($_REQUEST['id'] != '') { if ($_POST['chkdelimg'] == 1) { $image_del=sqlval("select image from afisha_event where id='".$_POST['id']."'"); unlink("../../user_foto/afisha/".$image_del[0]); $image=""; } if ($_POST['chkdelimg_big'] == 1) { $image_del=sqlval("select image_big from afisha_event where id='".$_POST['id']."'"); unlink("../../user_foto/afisha/".$image_del[0]); $image_big=""; } if ($_POST['chkdelimg_big'] == 1) { $image_del=sqlval("select image_orig from afisha_event where id='".$_POST['id']."'"); unlink("../../user_foto/afisha/".$image_del[0]); $image_orig=""; } if (is_uploaded_file($_FILES['anons_image']['tmp_name'])) { $img_index=upload_foto($_FILES['anons_image']['tmp_name'], 90, 80, 0, 1, "../../user_foto/afisha"); $img_index="user_foto/afisha/".$img_index; } elseif ($_POST['anons_image_url'] != '') { $tmp_name = md5(microtime()); if (($file = file_get_contents($_POST['anons_image_url'])) !== false) { file_put_contents('/tmp/'.$tmp_name, $file); $img_index=upload_foto('/tmp/'.$tmp_name, 90, 80, 0, 1, "../../user_foto/afisha"); $img_index="user_foto/afisha/".$img_index; unlink('/tmp/'.$tmp_name); } } if (is_uploaded_file($_FILES['image_big']['tmp_name'])) { //$image_big1=upload_foto($_FILES['image_big']['tmp_name'], 150, 260, 0, 1, "../../user_foto/afisha"); $image_big1=upload_foto($_FILES['image_big']['tmp_name'], 250, 400, 0, 1, "../../user_foto/afisha"); $image_big="user_foto/afisha/".$image_big1; } elseif ($_POST['image_big_url'] != '') { $tmp_name = md5(microtime()); if (($file = file_get_contents($_POST['image_big_url'])) !== false) { file_put_contents('/tmp/'.$tmp_name, $file); //$image_big1=upload_foto('/tmp/'.$tmp_name, 150, 260, 0, 1, "../../user_foto/afisha"); $image_big1=upload_foto('/tmp/'.$tmp_name, 250, 400, 0, 1, "../../user_foto/afisha"); $image_big="user_foto/afisha/".$image_big1; unlink('/tmp/'.$tmp_name); } } if (is_uploaded_file($_FILES['image_orig']['tmp_name'])) { $image_orig=upload_foto($_FILES['image_orig']['tmp_name'], 1024, 1024, 0, 1, "../../user_foto/afisha"); $image_orig="user_foto/afisha/".$image_orig; } elseif ($_POST['image_orig_url'] != '') { $tmp_name = md5(microtime()); if (($file = file_get_contents($_POST['image_orig_url'])) !== false) { file_put_contents('/tmp/'.$tmp_name, $file); $image_orig=upload_foto('/tmp/'.$tmp_name, 1024, 1024, 0, 1, "../../user_foto/afisha"); $image_orig="user_foto/afisha/".$image_orig; unlink('/tmp/'.$tmp_name); } } $note=addslashes($note); $urlFragmentNumber = null; $_url = $_POST['url']; $numberI = 0; while (true) { $existAfisha = sqlval(' SELECT COUNT(id) as total FROM afisha_event WHERE url = "' . $_url . '" AND id != '.$_POST['id'].' '); if ($existAfisha['total'] > 0) { $numberI = $numberI + 1; $_url = $_POST['url'] . '-' . $numberI; } else { break; } } $_POST['url'] = $_url; if (empty($archiv)) $archiv='0'; $sql="update afisha_event set id_grp='{$id_grp}', name='{$_POST['name']}', keywords = '{$_POST['keywords']}', description = '{$_POST['description']}', url = '{$_POST['url']}', note_small='{$_POST['note_small']}', note='{$_POST['text_document']}', age = '{$_POST['age']}'"; if ((!is_array($img_index) and $img_index != "") or $_POST['chkdelimg'] == 1) $sql.=", image='".$img_index."' "; if ((!is_array($image_big) and $image_big != "") or $_POST['chkdelimg_big'] == 1) $sql.=", image_big='".$image_big."' "; if ((!is_array($image_orig) and $image_orig != "") or $_POST['chkdelimg_orig'] == 1) $sql.=", image_orig='".$image_orig."' "; $sql.=" where id='{$_POST['id']}'"; $r=sql($sql); if (!$r) error(); else { //afisha_indexator($id, $l); Header("Location: index.php"); } } //================================================================================================================= if ( $delete != '' ) { $image_del=sqlval("select image, image_big, image_orig from afisha_event where id='{$_GET['id']}'"); if ( $image_del['image'] != '' && file_exists("../../" . $image_del['image']) ) { unlink("../../".$image_del['image']); } if ( $image_del['image_big'] != '' && file_exists("../../" . $image_del['image_big']) ) { unlink("../../".$image_del['image_big']); } if ( $image_del['image_orig'] != '' && file_exists("../../" . $image_del['image_orig']) ) { unlink("../../".$image_del['image_orig']); } $r=sql( "delete from afisha_event where id='{$_REQUEST['id']}'" ); if (!$r) error(); else { header("Location: index.php"); } } ?>
/admin/afisha2/
Имя
Дата
Размер
..
2026-10-02
.htaccess
2015-04-04
59 байт
action.php
2012-11-16
354 байт
activity.php
2019-03-04
5 кб.
activity_back.php
2017-09-12
5 кб.
activity_modif.php
2020-10-14
13 кб.
activity_modif_back.php
2020-03-19
13 кб.
activity_modif_back_old.php
2019-03-13
5 кб.
activity_sql.php
2020-03-19
8 кб.
activity_sql_back.php
2017-09-12
2 кб.
category.php
2012-11-16
2 кб.
category_modif.php
2009-05-14
1 кб.
category_sql.php
2009-05-14
1011 байт
event_modif.php
2020-03-19
10 кб.
event_sql.php
2020-03-20
9 кб.
event_video.php
2012-05-25
2 кб.
event_video_modif.php
2012-05-25
2 кб.
event_video_sql.php
2012-05-28
2 кб.
flvplayer.swf
2008-06-02
34 кб.
index.php
2019-01-22
5 кб.
swfobject.js
2008-06-02
7 кб.
/admin/afisha2
Загрузить файлы
Файл 1
Файл 2
Файл 3