<input class="upload_file" id="upload_photo_input" name="uploaded_file" type="file"> </div> <div class="ticket_controls"> <button class="primary_btn big_btn">Add</button> </div> </form> <div class="header" style="margin-top: 30px;"> <div class="title"> <span>Gifts</span> </div> </div> <?php $result = $gift->db_get(0, 100); $inbox_loaded = count($result['items']); if ($inbox_loaded != 0) { ?> <table class="admin_table"> <tr> <th class="text-left">Id</th> <th>Gift Image</th> <th>Cost</th> <th>Category</th> <th>Date</th> <th>Action</th> </tr> <?php
<?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; }