示例#1
0
     break;
 case 'fetchDynamicDialog':
     require_once PATH_CORE . "/classes/template.class.php";
     $tObj = new template();
     $tObj->registerTemplates(MODULE_ACTIVE, $_GET['t']);
     $code = $tObj->templates[$_GET['d']];
     break;
 case 'fetchChallenges':
     if (isset($_GET['sort'])) {
         $sort = $_GET['sort'];
     } else {
         $sort = 'default';
     }
     require_once PATH_CORE . "/classes/challenges.class.php";
     $chObj = new challenges();
     $code = $chObj->fetchChallenges($sort, $currentPage, true);
     break;
 case 'fetchLeaders':
     if (isset($_GET['view'])) {
         $view = $_GET['view'];
     } else {
         $view = 'alltime';
     }
     if (isset($_GET['filter'])) {
         $filter = $_GET['filter'];
     } else {
         $filter = 'inside';
     }
     require_once PATH_FACEBOOK . '/classes/pages.class.php';
     $pagesObj = new pages($app, 0, false);
     require_once PATH_FACEBOOK . '/pages/pageLeaders.class.php';
    function fetchChallengeList($currentPage = 1)
    {
        require_once PATH_CORE . '/classes/challenges.class.php';
        $challenges = new challenges($this->db);
        $code .= '<div id="ajaxFeed" class="panel_1">
					<h2>' . $this->templateObj->templates['ChallengesTitle'] . '</h2>';
        // do I need to keep this id?
        $code .= $challenges->fetchChallenges('pointValue', $currentPage, false);
        $code .= '</div><!--end "ajaxFeed" "panel_1"-->';
        return $code;
    }