コード例 #1
0
             // add siteContentId into itemid2 of publishWire log entry
             $db->update("Log", "itemid2={$siteContentId}", "action='publishWire' AND itemid='{$itemid}' AND userid1=" . $userid);
         }
     } else {
         $error = true;
     }
     break;
 case 'showChallengeSubmitDialog':
     $challengeid = requestInt('challengeid');
     //require_once(PATH_CORE.'/classes/content.class.php');
     //$cObj=new content($db);
     //require_once(PATH_CORE.'/classes/utilities.class.php');
     ///$uObj=new utilities($db);
     //$story=$cObj->getById($itemid);
     require_once PATH_FACEBOOK . '/pages/pageChallenges.class.php';
     $code .= pageChallenges::fetchSubmissionDialogForm($db, $challengeid, $userid, $sessionKey);
     /*    $content = "<fb:name uid=\"".$session->fbId."\" firstnameonly=\"true\" shownetwork=\"false\"/> wants to share a story with you: <a href=\"".URL_CANVAS."?p=read&cid='.$itemid.'&referid='.$session->fbId.'\">".$story->title."</a>\n". "<fb:req-choice url=\"".URL_CANVAS."?p=read\" label=\"Read the story\"/>";
           $code='<fb:request-form action="'.URL_CANVAS.'?p=share" method="post" type="'.SITE_TITLE_SHORT.'" content="'.htmlentities($content).'" image="'.$image.'">  <fb:multi-friend-selector bypass="******" showborder="false" actiontext="Select friends you wish to share the story with below:" exclude_ids="" /> </fb:request-form> ';
           */
     /*    $code.='<form id="dialog_form" name="dialog_form">' //onsubmit="return false;">';
           $code .= '<p><strong>To:</strong> <fb:multi-friend-input width="350px" border_color="#8496ba" /></p>';
            $code.='</form>';*/
     // TODO: php redirect after submit
     break;
 case 'fetchTeamFriendsList':
     if (isset($_GET['state'])) {
         $state = $_GET['state'];
     } else {
         $state = 'collapsed';
     }
     require_once PATH_FACEBOOK . "/pages/pageTeam.class.php";
コード例 #2
0
 function fetchTeam($mode = 'fullPage', $page = '', $option = '')
 {
     // fetches team subtab via ajax
     switch ($page) {
         case 'team':
             require_once PATH_FACEBOOK . '/pages/pageTeam.class.php';
             $teamObj = new pageTeam($this);
             $code = $teamObj->fetch($mode, $option);
             break;
         case 'wall':
             require_once PATH_FACEBOOK . '/pages/pageWall.class.php';
             $wallObj = new pageWall($this);
             $code = $wallObj->fetch($mode, $option, $arg3);
             break;
         case 'rewards':
             require_once PATH_FACEBOOK . '/pages/pageRewards.class.php';
             $prizesObj = new pageRewards($this);
             $code = $prizesObj->fetch($mode);
             break;
         case 'winners':
             require_once PATH_FACEBOOK . '/pages/pageRewards.class.php';
             $prizesObj = new pageRewards($this);
             $code = $prizesObj->fetch($mode, 'winners');
             break;
         case 'challenges':
             require_once PATH_FACEBOOK . '/pages/pageChallenges.class.php';
             $challengesObj = new pageChallenges($this);
             $code = $challengesObj->fetch($mode);
             break;
         case 'challengeSubmit':
             require_once PATH_FACEBOOK . '/pages/pageChallengeSubmit.class.php';
             $challengeSubmitObj = new pageChallengeSubmit($this);
             $code = $challengeSubmitObj->fetch($mode);
             break;
         case 'leaders':
             require_once PATH_FACEBOOK . '/pages/pageLeaders.class.php';
             $leadersObj = new pageLeaders($this);
             $code = $leadersObj->fetch($mode, $option);
             break;
         case 'rules':
             require_once PATH_FACEBOOK . '/pages/pageRules.class.php';
             $rulesObj = new pageRules($this);
             $code = $rulesObj->fetch($mode);
             break;
         case 'redeem':
             // check auth for member
             require_once PATH_FACEBOOK . '/pages/pageRedeem.class.php';
             $redeemObj = new pageRedeem($this);
             $code = $redeemObj->fetch($mode);
             break;
         case 'orders':
             // check auth for member
             require_once PATH_FACEBOOK . '/pages/pageOrders.class.php';
             $ordersObj = new pageOrders($this);
             $code = $ordersObj->fetch($mode);
             break;
     }
     return $code;
 }
コード例 #3
0
 function fetch($mode = 'fullPage')
 {
     // build the prizes page
     if (isset($_GET['currentPage'])) {
         $currentPage = $_GET['currentPage'];
     } else {
         $currentPage = 1;
     }
     if (isset($_GET['id'])) {
         $id = $_GET['id'];
     } else {
         $id = NULL;
     }
     if (isset($_GET['step'])) {
         $step = $_GET['step'];
     } else {
         $step = NULL;
     }
     if (isset($_GET['message'])) {
         $message = $_GET['message'];
     } else {
         $message = '';
     }
     if ($_GET['debug']) {
         echo '<pre>' . print_r($_GET, true) . '</pre>';
     }
     require_once PATH_FACEBOOK . '/classes/actionTeam.class.php';
     $this->teamObj = new actionTeam($this->page);
     $tabs .= $this->teamObj->buildSubNav('challenges');
     $inside = '<div id="col_left"><!-- begin left side -->';
     require_once PATH_FACEBOOK . '/pages/pageChallenges.class.php';
     $challengePage = new pageChallenges($this->page);
     $inside .= $challengePage->fetchChallengeDetail($id, true);
     if (!$id) {
         $inside .= 'No challenge id found, please go back and try again.';
     } else {
         if ($message == '') {
             // challenge submit form
             $inside .= self::fetchSubmissionDialogForm($this->db, $id, $this->page->session->userid, $this->page->session->sessionKey, $fdata);
         } else {
             // repopulate form with get vars
             $fdata->embedCode = $_GET['embedCode'];
             // TODO: make names more accurate
             $fdata->photo1 = $_GET['photo1'];
             $fdata->text = $_GET['text'];
             $inside .= $this->page->buildMessage('error', "There was a problem with your submission", $message);
             $inside .= self::fetchSubmissionDialogForm($this->db, $id, $this->page->session->userid, $this->page->session->sessionKey, $fdata);
         }
     }
     $inside .= '</div><!-- end left side --><div id="col_right">';
     $inside .= $this->teamObj->fetchSidePanel('challenges');
     $inside .= '</div> <!-- end right side -->';
     //$inside.='<input type="hidden" id="pagingFunction" value="fetchChallenges">';
     if ($mode == 'teamWrap') {
         return $inside;
     }
     $inside = $tabs . '<div id="teamWrap">' . $inside . '<!-- end teamWrap --></div>';
     if ($this->page->isAjax) {
         return $inside;
     }
     $code = $this->page->constructPage('team', $inside, '');
     return $code;
 }