コード例 #1
0
 }
 if (isset($_GET['sessionKey'])) {
     $sessionKey = $_GET['sessionKey'];
 } else {
     $sessionKey = 'noSessionKey';
 }
 $app = setupAppFramework();
 if ($session->validateSession($userid, $sessionKey) !== false) {
     switch ($method) {
         case 'askPostAnswer':
             if (isset($_GET['id'])) {
                 $id = $_GET['id'];
                 require_once PATH_FACEBOOK . "/classes/ask.class.php";
                 $askObj = new ask($db);
                 $askObj->setAppLink($app);
                 $code = $askObj->ajaxAskPostAnswer($userid, $id);
             }
             break;
         case 'fetchRewards':
             if (isset($_GET['sort'])) {
                 $sort = $_GET['sort'];
             } else {
                 $sort = 'default';
             }
             if (isset($_GET['filter'])) {
                 $filter = $_GET['filter'];
             } else {
                 $filter = 'redeemable';
             }
             require_once PATH_CORE . "/classes/prizes.class.php";
             $rwObj = new rewards();