Орла
Области
Компаний
Пользователи
Галерея
Фиксированные новости
Орла
Отзывы о фирмах
Тарифы
Пользователи
Области
Банкоматы
Торговые точки
Доска объявлений
Курсы валют
Скидки
организации Орла
организации области
товары
сайты
сайты Орел
Данные
Разделы
Поиск
Поиск запросы
Статистика
Показы каталога организаций
Статистика клиенты
Пользователи
Сайты
Управление сайтом
Анкета
Аптеки
Афиша
Афиша новая
Баннеры
Бизнес >
Викторина
Голосование
Гость на сайте
Истории
Календарь событий
Каталоги >
Конкурс красоты
Конкурс аудио
Консультации
Меню
Новое на сайте
Новости >
Организации >
Программа ТВ
Публикации
Разделы сайта
Рассылка
Рестораны
Секрет фирмы >
Сервисы >
Ссылки
Тесты
Файловый менеджер
Форум
Фотогалерея
Обратная связь
Недвижимость
Новый год
Тексты
Пользователи
Юридический рейтинг
Отзывы на товары
Бан пользователей
Жалобы
Новые тесты
Коронавирус
Файловый менеджер
Имя файла
action.php
Содержимое
<?php require_once("../func.php"); $l = db_connect(); authorize(); ini_set("display_errors", "On"); ini_set("error_reporting", E_ALL); if ( $id_user_sess > 0 ) { require_once "Dklab/Realplexor.php"; $rpl = new Dklab_Realplexor("127.0.0.1", "10010", RPL_FRIENDS_NAMESPACE); require_once "JsHttpRequest/JsHttpRequest.php"; $JsHttpRequest =& new JsHttpRequest("windows-1251"); switch ( $_REQUEST['action'] ) { case 'add': $friend = intval( $_REQUEST['friend'] ); $im = sqlval("select id, name, avatar from user where id='{$id_user_sess}'"); $im['action'] = 'add'; $user = sqlval("select id, name from user where id='{$friend}'"); $exist = sqlval("select count(*) from friends where id_friend='{$id_user_sess}' and id_user='{$user['id']}'"); if ( $user['id'] > 0 ) { if ( $exist[0] == 0 ) { sql("insert into friends values ('{$id_user_sess}', '{$user['id']}', '1', NOW(), '1')"); sql("insert into friends values ('{$user['id']}', '{$id_user_sess}', '1', NOW(), '0')"); $channel = "u" . $user['id'] . '_' . md5( $user['name'] . SECRET_KEY ); $rpl->send( array( $channel ), $im); } else { sql("update friends set status='3' where id_friend='{$id_user_sess}' and id_user='{$user['id']}'"); sql("update friends set status='3' where id_user='{$id_user_sess}' and id_friend='{$user['id']}'"); } } $GLOBALS['_RESULT'] = array(); break; case 'delete': $friend = intval( $_REQUEST['friend'] ); $user = sqlval("select id, name from user where id='{$friend}'"); if ( $user['id'] > 0 ) { $channel = "u" . $user['id'] . '_' . md5( $user['name'] . SECRET_KEY ); $rpl->send( array( $channel ), array('action'=>'del', 'id'=>$id_user_sess ) ); sql("delete from friends where (id_user='{$id_user_sess}' and id_friend='{$user['id']}') or (id_friend='{$id_user_sess}' and id_user='{$user['id']}')"); } $GLOBALS['_RESULT'] = array( "id" => $user['id'], "name" => $user['name'] ); break; case 'make': $friend = intval( $_REQUEST['friend'] ); $user = sqlval("select id, name, avatar from user where id='{$friend}'"); if ( $user['id'] > 0 ) { $channel = "u" . $user['id'] . '_' . md5( $user['name'] . SECRET_KEY ); $im = sqlval("select id, name, avatar from user where id='{$id_user_sess}'"); $im['action'] = 'make'; $rpl->send( array( $channel ), $im ); sql("update friends set status='3' where id_friend='{$id_user_sess}' and id_user='{$user['id']}'"); sql("update friends set status='3' where id_user='{$id_user_sess}' and id_friend='{$user['id']}'"); } $GLOBALS['_RESULT'] = $user; break; case 'saveSetting': $_REQUEST['profile'] = intval( $_REQUEST['profile'] ); $_REQUEST['friends'] = intval( $_REQUEST['friends'] ); $_REQUEST['photo_comment'] = intval( $_REQUEST['photo_comment'] ); $_REQUEST['video_comment'] = intval( $_REQUEST['video_comment'] ); $_REQUEST['blog_show'] = intval( $_REQUEST['blog_show'] ); $_REQUEST['blog_comment'] = intval( $_REQUEST['blog_comment'] ); $result = sql("replace into user_setting values ('{$id_user_sess}', '{$_REQUEST['profile']}', '{$_REQUEST['friends']}', '{$_REQUEST['photo_comment']}', '{$_REQUEST['video_comment']}', '{$_REQUEST['blog_show']}', '{$_REQUEST['blog_comment']}')"); if ( !$result ) { $GLOBALS['_RESULT'] = array("error" => "1"); } else { $GLOBALS['_RESULT'] = array("error" => "0"); } break; } }
/friends/
Имя
Дата
Размер
..
2026-10-02
action.php
2016-02-16
3 кб.
index.php
2017-02-13
11 кб.
privacy.php
2017-02-13
13 кб.
/friends
Загрузить файлы
Файл 1
Файл 2
Файл 3