public function removeAll($accountId)
 {
     $accountId = helper::clearInt($accountId);
     $currentTime = time();
     //current time
     $stmt = $this->db->prepare("UPDATE access_data SET removeAt = (:removeAt) WHERE accountId = (:accountId)");
     $stmt->bindParam(":accountId", $accountId, PDO::PARAM_INT);
     $stmt->bindParam(":removeAt", $currentTime, PDO::PARAM_INT);
     if ($stmt->execute()) {
         return true;
     }
     return false;
 }
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $clientId = isset($_POST['clientId']) ? $_POST['clientId'] : 0;
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : '';
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $profileId = isset($_POST['profileId']) ? $_POST['profileId'] : '';
    $chatId = isset($_POST['chatId']) ? $_POST['chatId'] : 0;
    $msgId = isset($_POST['msgId']) ? $_POST['msgId'] : 0;
    $clientId = helper::clearInt($clientId);
    $accountId = helper::clearInt($accountId);
    $profileId = helper::clearInt($profileId);
    $chatId = helper::clearInt($chatId);
    $msgId = helper::clearInt($msgId);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $messages = new messages($dbo);
    $messages->setRequestFrom($accountId);
    if ($chatId == 0) {
        $chatId = $messages->getChatId($accountId, $profileId);
    }
    if ($chatId != 0) {
        $result = $messages->getPreviousMessages($chatId, $msgId);
    }
    echo json_encode($result);
    exit;
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $clientId = isset($_POST['clientId']) ? $_POST['clientId'] : 0;
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $profileId = isset($_POST['profileId']) ? $_POST['profileId'] : 0;
    $photoId = isset($_POST['photoId']) ? $_POST['photoId'] : 0;
    $clientId = helper::clearInt($clientId);
    $accountId = helper::clearInt($accountId);
    $profileId = helper::clearInt($profileId);
    $photoId = helper::clearInt($photoId);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $photos = new photos($dbo);
    $photos->setRequestFrom($accountId);
    $accessMode = 0;
    if ($accountId == $profileId) {
        $accessMode = 1;
    }
    $result = $photos->get($profileId, $photoId, $accessMode);
    echo json_encode($result);
    exit;
}
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2015 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $allowMessages = isset($_POST['allowMessages']) ? $_POST['allowMessages'] : 0;
    $allowMessages = helper::clearInt($allowMessages);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $result = array("error" => false, "error_code" => ERROR_SUCCESS);
    $account = new account($dbo, $accountId);
    $account->setAllowMessages($allowMessages);
    $result['allowMessages'] = $account->getAllowMessages();
    echo json_encode($result);
    exit;
}
Example #5
-1
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : '';
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $query = isset($_POST['query']) ? $_POST['query'] : '';
    $userId = isset($_POST['userId']) ? $_POST['userId'] : 0;
    $gender = isset($_POST['gender']) ? $_POST['gender'] : -1;
    $online = isset($_POST['online']) ? $_POST['online'] : -1;
    $ageFrom = isset($_POST['ageFrom']) ? $_POST['ageFrom'] : 13;
    $ageTo = isset($_POST['ageTo']) ? $_POST['ageTo'] : 110;
    $query = helper::clearText($query);
    $query = helper::escapeText($query);
    $userId = helper::clearInt($userId);
    if ($gender != -1) {
        $gender = helper::clearInt($gender);
    }
    if ($online != -1) {
        $online = helper::clearInt($online);
    }
    $ageFrom = helper::clearInt($ageFrom);
    $ageTo = helper::clearInt($ageTo);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $search = new search($dbo);
    $search->setRequestFrom($accountId);
    $result = $search->query($query, $userId, $gender, $online, $ageFrom, $ageTo);
    echo json_encode($result);
    exit;
}
/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $clientId = isset($_POST['clientId']) ? $_POST['clientId'] : 0;
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $photoId = isset($_POST['photoId']) ? $_POST['photoId'] : 0;
    $abuseId = isset($_POST['abuseId']) ? $_POST['abuseId'] : 0;
    $clientId = helper::clearInt($clientId);
    $accountId = helper::clearInt($accountId);
    $photoId = helper::clearInt($photoId);
    $abuseId = helper::clearInt($abuseId);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $report = new report($dbo);
    $report->setRequestFrom($accountId);
    $result = $report->photo($photoId, $abuseId);
    echo json_encode($result);
    exit;
}
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $funds = isset($_POST['funds']) ? $_POST['funds'] : 0;
    $funds = helper::clearInt($funds);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $account = new account($dbo, $accountId);
    $result = $account->setBalance($account->getBalance() + $funds);
    if ($result['error'] === false) {
        $result['balance'] = $account->getBalance();
    }
    echo json_encode($result);
    exit;
}
/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $profileId = isset($_POST['profileId']) ? $_POST['profileId'] : 0;
    $reason = isset($_POST['reason']) ? $_POST['reason'] : 0;
    $profileId = helper::clearInt($profileId);
    $reason = helper::clearInt($reason);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $profile = new profile($dbo, $profileId);
    $profile->setRequestFrom($accountId);
    if ($reason >= 0 && $reason < 4) {
        $result = $profile->reportAbuse($reason);
    }
    echo json_encode($result);
    exit;
}
Example #9
-1
 if (!empty($_POST)) {
     $authToken = isset($_POST['authenticity_token']) ? $_POST['authenticity_token'] : '';
     $username = isset($_POST['username']) ? $_POST['username'] : '';
     $fullname = isset($_POST['fullname']) ? $_POST['fullname'] : '';
     $location = isset($_POST['location']) ? $_POST['location'] : '';
     $balance = isset($_POST['balance']) ? $_POST['balance'] : 0;
     $fb_page = isset($_POST['fb_page']) ? $_POST['fb_page'] : '';
     $instagram_page = isset($_POST['instagram_page']) ? $_POST['instagram_page'] : '';
     $email = isset($_POST['email']) ? $_POST['email'] : '';
     $username = helper::clearText($username);
     $username = helper::escapeText($username);
     $fullname = helper::clearText($fullname);
     $fullname = helper::escapeText($fullname);
     $location = helper::clearText($location);
     $location = helper::escapeText($location);
     $balance = helper::clearInt($balance);
     $fb_page = helper::clearText($fb_page);
     $fb_page = helper::escapeText($fb_page);
     $instagram_page = helper::clearText($instagram_page);
     $instagram_page = helper::escapeText($instagram_page);
     $email = helper::clearText($email);
     $email = helper::escapeText($email);
     if ($authToken === helper::getAuthenticityToken()) {
         $account->setUsername($username);
         $account->setFullname($fullname);
         $account->setLocation($location);
         $account->setBalance($balance);
         $account->setFacebookPage($fb_page);
         $account->setInstagramPage($instagram_page);
         $account->setEmail($email);
     }
 $gcm_regId = isset($_POST['gcm_regId']) ? $_POST['gcm_regId'] : '';
 $facebookId = isset($_POST['facebookId']) ? $_POST['facebookId'] : '';
 $username = isset($_POST['username']) ? $_POST['username'] : '';
 $fullname = isset($_POST['fullname']) ? $_POST['fullname'] : '';
 $password = isset($_POST['password']) ? $_POST['password'] : '';
 $email = isset($_POST['email']) ? $_POST['email'] : '';
 $user_sex = isset($_POST['sex']) ? $_POST['sex'] : 0;
 $user_year = isset($_POST['year']) ? $_POST['year'] : 0;
 $user_month = isset($_POST['month']) ? $_POST['month'] : 0;
 $user_day = isset($_POST['day']) ? $_POST['day'] : 0;
 $language = isset($_POST['language']) ? $_POST['language'] : '';
 $clientId = helper::clearInt($clientId);
 $user_sex = helper::clearInt($user_sex);
 $user_year = helper::clearInt($user_year);
 $user_month = helper::clearInt($user_month);
 $user_day = helper::clearInt($user_day);
 $facebookId = helper::clearText($facebookId);
 $gcm_regId = helper::clearText($gcm_regId);
 $username = helper::clearText($username);
 $fullname = helper::clearText($fullname);
 $password = helper::clearText($password);
 $email = helper::clearText($email);
 $language = helper::clearText($language);
 $facebookId = helper::escapeText($facebookId);
 $gcm_regId = helper::escapeText($gcm_regId);
 $username = helper::escapeText($username);
 $fullname = helper::escapeText($fullname);
 $password = helper::escapeText($password);
 $email = helper::escapeText($email);
 $language = helper::escapeText($language);
 if ($clientId != CLIENT_ID) {
Example #11
-1
            case 'remove':
                $gift->db_remove($id);
                header("Location: /admin/gifts.php");
                break;
            default:
                header("Location: /admin/gifts.php");
                break;
        }
    }
}
if (!empty($_POST)) {
    $authToken = isset($_POST['authenticity_token']) ? $_POST['authenticity_token'] : '';
    $cost = isset($_POST['cost']) ? $_POST['cost'] : 3;
    $category = isset($_POST['category']) ? $_POST['category'] : 0;
    $cost = helper::clearInt($cost);
    $category = helper::clearInt($category);
    if ($authToken === helper::getAuthenticityToken() && !APP_DEMO) {
        if (isset($_FILES['uploaded_file']['name'])) {
            $uploaded_file = $_FILES['uploaded_file']['tmp_name'];
            $uploaded_file_name = basename($_FILES['uploaded_file']['name']);
            $uploaded_file_ext = pathinfo($_FILES['uploaded_file']['name'], PATHINFO_EXTENSION);
            $gift_next_id = $gift->db_getMaxId();
            $gift_next_id++;
            if (move_uploaded_file($_FILES['uploaded_file']['tmp_name'], GIFTS_PATH . $gift_next_id . "." . $uploaded_file_ext)) {
                $gift->db_add($cost, $category, APP_URL . "/" . GIFTS_PATH . $gift_next_id . "." . $uploaded_file_ext);
            }
        }
    }
    header("Location: /admin/gifts.php");
}
helper::newAuthenticityToken();
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $allowMessagesGCM = isset($_POST['allowMessagesGCM']) ? $_POST['allowMessagesGCM'] : 0;
    $allowMessagesGCM = helper::clearInt($allowMessagesGCM);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $result = array("error" => false, "error_code" => ERROR_SUCCESS);
    $account = new account($dbo, $accountId);
    $account->setAllowMessagesGCM($allowMessagesGCM);
    $result['allowMessagesGCM'] = $account->getAllowMessagesGCM();
    echo json_encode($result);
    exit;
}
Example #13
-1
/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
if (!admin::isSession()) {
    header("Location: /admin/login.php");
}
$stats = new stats($dbo);
$admin = new admin($dbo);
$report = new report($dbo);
$photoId = 0;
$photoInfo = array();
if (isset($_GET['id'])) {
    $photoId = isset($_GET['id']) ? $_GET['id'] : 0;
    $accessToken = isset($_GET['access_token']) ? $_GET['access_token'] : '';
    $fromUserId = isset($_GET['fromUserId']) ? $_GET['fromUserId'] : 0;
    $photoId = helper::clearInt($photoId);
    $fromUserId = helper::clearInt($fromUserId);
    $photos = new photos($dbo);
    $photos->setRequestFrom($fromUserId);
    $photos->remove($photoId);
    $report->removePhotoReports($photoId);
} else {
    header("Location: /admin/main.php");
    exit;
}
 $location = helper::clearText($location);
 $location = helper::escapeText($location);
 $facebookPage = helper::clearText($facebookPage);
 $facebookPage = helper::escapeText($facebookPage);
 $instagramPage = helper::clearText($instagramPage);
 $instagramPage = helper::escapeText($instagramPage);
 $bio = helper::clearText($bio);
 $bio = preg_replace("/[\r\n]+/", " ", $bio);
 //replace all new lines to one new line
 $bio = preg_replace('/\\s+/', ' ', $bio);
 //replace all white spaces to one space
 $bio = helper::escapeText($bio);
 $sex = helper::clearInt($sex);
 $year = helper::clearInt($year);
 $month = helper::clearInt($month);
 $day = helper::clearInt($day);
 $auth = new auth($dbo);
 if (!$auth->authorize($accountId, $accessToken)) {
     api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
 }
 $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
 $account = new account($dbo, $accountId);
 $account->setLastActive();
 $account->setFullname($fullname);
 $account->setLocation($location);
 $account->setStatus($bio);
 $account->setSex($sex);
 $account->setBirth($year, $month, $day);
 $account->set_iStatus($iStatus);
 $account->set_iPoliticalViews($politicalViews);
 $account->set_iWorldView($worldViews);
Example #15
-1
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
if (!admin::isSession()) {
    header("Location: /admin/login.php");
}
$stats = new stats($dbo);
$admin = new admin($dbo);
$postId = 0;
$chatInfo = array();
if (isset($_GET['id'])) {
    $chatId = isset($_GET['id']) ? $_GET['id'] : 0;
    $accessToken = isset($_GET['access_token']) ? $_GET['access_token'] : 0;
    $act = isset($_GET['act']) ? $_GET['act'] : '';
    $chatId = helper::clearInt($chatId);
    $messages = new messages($dbo);
    $chatInfo = $messages->getFull($chatId);
    if ($chatInfo['error'] === true) {
        header("Location: /admin/main.php");
        exit;
    }
} else {
    header("Location: /admin/main.php");
    exit;
}
$page_id = "chat";
$error = false;
$error_message = '';
$css_files = array("admin.css");
$page_title = "Chat";
Example #16
-1
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
if (!admin::isSession()) {
    header("Location: /admin/login.php");
}
$accountInfo = array();
$stats = new stats($dbo);
$page_id = "messages_stream";
$messages = new messages($dbo);
$inbox_all = $messages->getMessagesCount();
$inbox_loaded = 0;
if (!empty($_POST)) {
    $itemId = isset($_POST['itemId']) ? $_POST['itemId'] : 0;
    $loaded = isset($_POST['loaded']) ? $_POST['loaded'] : '';
    $itemId = helper::clearInt($itemId);
    $loaded = helper::clearInt($loaded);
    $result = $messages->getStream($itemId);
    $inbox_loaded = count($result['messages']);
    $result['inbox_loaded'] = $inbox_loaded + $loaded;
    $result['inbox_all'] = $inbox_all;
    if ($inbox_loaded != 0) {
        ob_start();
        foreach ($result['messages'] as $key => $value) {
            draw($value, $helper);
        }
        if ($result['inbox_loaded'] < $inbox_all) {
            ?>

                <div class="more_cont">
                    <a class="more_link" href="javascript:void(0)" onclick="Stream.moreItems('<?php 
            echo $result['msgId'];
Example #17
-1
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
if (!admin::isSession()) {
    header("Location: /admin/login.php");
}
if (!empty($_POST)) {
    $authToken = isset($_POST['authenticity_token']) ? $_POST['authenticity_token'] : '';
    $message = isset($_POST['message']) ? $_POST['message'] : '';
    $type = isset($_POST['type']) ? $_POST['type'] : 1;
    $message = helper::clearText($message);
    $message = helper::escapeText($message);
    $type = helper::clearInt($type);
    if ($authToken === helper::getAuthenticityToken() && !APP_DEMO) {
        if (strlen($message) != 0) {
            $gcm = new gcm($dbo, 0);
            $gcm->setData($type, $message, 0);
            $gcm->forAll();
            $gcm->send();
        }
    }
    header("Location: /admin/gcm.php");
}
$stats = new stats($dbo);
$page_id = "gcm";
$error = false;
$error_message = '';
helper::newAuthenticityToken();
/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $notifyId = isset($_POST['notifyId']) ? $_POST['notifyId'] : 0;
    $notifyId = helper::clearInt($notifyId);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    if ($notifyId == 0) {
        $account = new account($dbo, $accountId);
        $account->setLastNotifyView();
        unset($account);
    }
    $notify = new notify($dbo);
    $notify->setRequestFrom($accountId);
    $result = $notify->getAll($notifyId);
    echo json_encode($result);
    exit;
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : '';
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $profileId = isset($_POST['profileId']) ? $_POST['profileId'] : 0;
    $accountId = helper::clearInt($accountId);
    $profileId = helper::clearInt($profileId);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $blacklist = new blacklist($dbo);
    $blacklist->setRequestFrom($accountId);
    $result = $blacklist->remove($profileId);
    echo json_encode($result);
    exit;
}
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $allowGiftsGCM = isset($_POST['allowGiftsGCM']) ? $_POST['allowGiftsGCM'] : 0;
    $allowGiftsGCM = helper::clearInt($allowGiftsGCM);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $result = array("error" => false, "error_code" => ERROR_SUCCESS);
    $account = new account($dbo, $accountId);
    $account->setAllowGiftsGCM($allowGiftsGCM);
    $result['allowGiftsGCM'] = $account->getAllowGiftsGCM();
    echo json_encode($result);
    exit;
}
Example #21
-1
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $clientId = isset($_POST['clientId']) ? $_POST['clientId'] : 0;
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $itemId = isset($_POST['itemId']) ? $_POST['itemId'] : 0;
    $clientId = helper::clearInt($clientId);
    $accountId = helper::clearInt($accountId);
    $itemId = helper::clearInt($itemId);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $gifts = new gift($dbo);
    $gifts->setRequestFrom($accountId);
    $result = $gifts->db_get($itemId);
    echo json_encode($result);
    exit;
}
/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2015 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $clientId = isset($_POST['clientId']) ? $_POST['clientId'] : 0;
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : '';
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $clientId = helper::clearInt($clientId);
    $accountId = helper::clearInt($accountId);
    $accessToken = helper::clearText($accessToken);
    $accessToken = helper::escapeText($accessToken);
    if ($clientId != CLIENT_ID) {
        api::printError(ERROR_UNKNOWN, "Error client Id.");
    }
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $account = new account($dbo, $accountId);
    $account->setFacebookId("");
    $result = array("error" => false, "error_code" => ERROR_SUCCESS);
    echo json_encode($result);
    exit;
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $friendId = isset($_POST['friendId']) ? $_POST['friendId'] : 0;
    $friendId = helper::clearInt($friendId);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $friends = new friends($dbo, $accountId);
    $friends->setRequestFrom($accountId);
    $result = $friends->remove($friendId);
    echo json_encode($result);
    exit;
}
Example #24
-1
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $clientId = isset($_POST['clientId']) ? $_POST['clientId'] : 0;
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $giftId = isset($_POST['giftId']) ? $_POST['giftId'] : 0;
    $giftAnonymous = isset($_POST['giftAnonymous']) ? $_POST['giftAnonymous'] : 0;
    $giftTo = isset($_POST['giftTo']) ? $_POST['giftTo'] : 0;
    $message = isset($_POST['message']) ? $_POST['message'] : "";
    $clientId = helper::clearInt($clientId);
    $accountId = helper::clearInt($accountId);
    $giftId = helper::clearInt($giftId);
    $giftAnonymous = helper::clearInt($giftAnonymous);
    $giftTo = helper::clearInt($giftTo);
    $message = helper::clearText($message);
    $message = preg_replace("/[\r\n]+/", "<br>", $message);
    //replace all new lines to one new line
    $message = preg_replace('/\\s+/', ' ', $message);
    //replace all white spaces to one space
    $message = helper::escapeText($message);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $gift = new gift($dbo);
    $gift->setRequestFrom($accountId);
    $giftInfo = $gift->db_info($giftId);
    if ($giftInfo['error'] === false && $giftInfo['removeAt'] == 0) {
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $cost = isset($_POST['cost']) ? $_POST['cost'] : 0;
    $cost = helper::clearInt($cost);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $account = new account($dbo, $accountId);
    $balance = $account->getBalance();
    if ($balance >= $cost) {
        $account->setBalance($account->getBalance() - $cost);
        $result = $account->setAdmob(0);
    }
    echo json_encode($result);
    exit;
}
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2015 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $clientId = isset($_POST['clientId']) ? $_POST['clientId'] : 0;
    $email = isset($_POST['email']) ? $_POST['email'] : '';
    $clientId = helper::clearInt($clientId);
    $email = helper::escapeText($email);
    if ($clientId != CLIENT_ID) {
        api::printError(ERROR_UNKNOWN, "Error client Id.");
    }
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    if (helper::isCorrectEmail($email)) {
        $accountId = $helper->getUserIdByEmail($email);
        if ($accountId != 0) {
            $account = new account($dbo, $accountId);
            $accountInfo = $account->get();
            if ($accountInfo['error'] === false && $accountInfo['state'] != ACCOUNT_STATE_BLOCKED) {
                $restorePointInfo = $account->restorePointCreate($email, $clientId);
                ob_start();
                ?>
<?php

/*!
 * ifsoft.co.uk engine v1.0
 *
 * http://ifsoft.com.ua, http://ifsoft.co.uk
 * qascript@ifsoft.co.uk
 *
 * Copyright 2012-2015 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $allowFollowersGCM = isset($_POST['allowFollowersGCM']) ? $_POST['allowFollowersGCM'] : 0;
    $allowFollowersGCM = helper::clearInt($allowFollowersGCM);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {
        api::printError(ERROR_ACCESS_TOKEN, "Error authorization.");
    }
    $result = array("error" => false, "error_code" => ERROR_SUCCESS);
    $account = new account($dbo, $accountId);
    $account->setAllowFollowersGCM($allowFollowersGCM);
    $result['allowFollowersGCM'] = $account->getAllowFollowersGCM();
    echo json_encode($result);
    exit;
}
Example #28
-1
 * Copyright 2012-2016 Demyanchuk Dmitry (https://vk.com/dmitry.demyanchuk)
 */
include_once $_SERVER['DOCUMENT_ROOT'] . "/core/init.inc.php";
include_once $_SERVER['DOCUMENT_ROOT'] . "/config/api.inc.php";
if (!empty($_POST)) {
    $clientId = isset($_POST['clientId']) ? $_POST['clientId'] : 0;
    $accountId = isset($_POST['accountId']) ? $_POST['accountId'] : 0;
    $accessToken = isset($_POST['accessToken']) ? $_POST['accessToken'] : '';
    $accessMode = isset($_POST['accessMode']) ? $_POST['accessMode'] : 0;
    $comment = isset($_POST['comment']) ? $_POST['comment'] : "";
    $originImgUrl = isset($_POST['originImgUrl']) ? $_POST['originImgUrl'] : "";
    $previewImgUrl = isset($_POST['previewImgUrl']) ? $_POST['previewImgUrl'] : "";
    $imgUrl = isset($_POST['imgUrl']) ? $_POST['imgUrl'] : "";
    $clientId = helper::clearInt($clientId);
    $accountId = helper::clearInt($accountId);
    $accessMode = helper::clearInt($accessMode);
    $comment = helper::clearText($comment);
    $comment = preg_replace("/[\r\n]+/", "<br>", $comment);
    //replace all new lines to one new line
    $comment = preg_replace('/\\s+/', ' ', $comment);
    //replace all white spaces to one space
    $comment = helper::escapeText($comment);
    $originImgUrl = helper::clearText($originImgUrl);
    $originImgUrl = helper::escapeText($originImgUrl);
    $previewImgUrl = helper::clearText($previewImgUrl);
    $previewImgUrl = helper::escapeText($previewImgUrl);
    $imgUrl = helper::clearText($imgUrl);
    $imgUrl = helper::escapeText($imgUrl);
    $result = array("error" => true, "error_code" => ERROR_UNKNOWN);
    $auth = new auth($dbo);
    if (!$auth->authorize($accountId, $accessToken)) {