<?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'] : ''; $itemId = isset($_POST['itemId']) ? $_POST['itemId'] : 0; $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."); } $blacklist = new blacklist($dbo); $blacklist->setRequestFrom($accountId); $result = $blacklist->get($itemId); echo json_encode($result); exit; }
$message = $ui['wrongPassword']; } } else { $message = $ui['insufficientData']; } break; } } $flags = flags::get('id'); $flagNames = ''; $flagValues = array(); foreach ($flags as $key => $flag) { $flagNames .= '<option value="' . $flag['name'] . '">' . $ui[$flag['name']] . '</option>'; $flagValues[$key] = '"' . $flag['value'] . '"'; } $blacklist = array('ip' => blacklist::get('ip'), 'email' => blacklist::get('email')); $temp = ''; foreach ($blacklist['ip'] as $item) { $temp .= '<option value="' . $item['value'] . '">' . $item['value'] . '</option>'; } $blacklist['ip'] = $temp; $temp = ''; foreach ($blacklist['email'] as $item) { $temp .= '<option value="' . $item['value'] . '">' . $item['value'] . '</option>'; } $blacklist['email'] = $temp; } else { header('Location: logout.php'); } if (isset($status) && $status == 'error') { $db->query('rollback');