<?php

define("__ROOT__", __DIR__ . "/../");
require_once __ROOT__ . 'config/constants.php';
require_once __ROOT__ . 'utils/Functions.php';
require_once __ROOT__ . "models/GameFbProductLanguage.class.php";
require_once __ROOT__ . "models/GameFbProductPrices.class.php";
require_once __ROOT__ . "models/GameFbProducts.class.php";
$result = new FunctionResult();
$result->success = false;
if (isset($_POST["sessionId"]) && !empty($_POST["sessionId"])) {
    session_id($_POST["sessionId"]);
} else {
    if (isset($_GET["sessionId"]) && !empty($_GET["sessionId"])) {
        session_id($_GET["sessionId"]);
    }
}
session_start();
session_write_close();
try {
    $resp = GameFbProducts::getAllProducts();
    $result->result = new stdClass();
    $result->result->products = $resp;
    $result->success = true;
} catch (Exception $exc) {
    $result->success = false;
    $result->result = $exc->getTraceAsString();
}
echo json_encode($result);
exit(1);
Beispiel #2
0
<?php

define("__ROOT__", __DIR__ . "/../");
require_once __ROOT__ . 'config/constants.php';
require_once __ROOT__ . 'utils/Queue.php';
require_once __ROOT__ . "models/GameLeaderboardDaily.class.php";
require_once __ROOT__ . "models/GameLeaderboardWeekly.class.php";
require_once __ROOT__ . "models/GameFbProducts.class.php";
require_once __ROOT__ . "models/GameFbProductLanguage.class.php";
require_once __ROOT__ . "models/GameFbProductPrices.class.php";
require_once __ROOT__ . "models/GameUsers.class.php";
require_once __ROOT__ . 'utils/Functions.php';
require_once __ROOT__ . 'utils/FriendFunctions.php';
require_once __ROOT__ . 'utils/FacebookRequestFunctions.php';
require_once __ROOT__ . 'vendors/KLogger.php';
require_once __ROOT__ . 'processor/user.class.php';
var_dump(GameFbProducts::getProductById(1));
$list = GameFbProducts::getAllProducts();
$value = new GameFbProducts();
foreach ($list as $value) {
    var_dump($value->languages);
    var_dump($value->prices);
}