コード例 #1
0
 public function Init()
 {
     parent::Init();
     if (FBApplicationBase::IsAdminUser()) {
         //were good
     } else {
         $this->Redirect('/index.php');
     }
 }
 public static function RenderJSSettings()
 {
     $objSettings = parent::RenderJSSettings();
     return $objSettings;
 }
コード例 #3
0
 public static function SetAccessTokenOverride($strAccessTokenOverride)
 {
     self::$strAccessTokenOverride = $strAccessTokenOverride;
 }
コード例 #4
0
<?php

if (!array_key_exists('MFBFile', $_FILES)) {
    if (array_key_exists('fieldName', $_POST) && array_key_exists('signed_request', $_POST)) {
        $strFieldName = $_POST['fieldName'];
        $strSignedRequest = $_POST['signed_request'];
    }
    require __FRMWK_CORE_PHP_ASSETS__ . '/upload/tpl/uploadForm.tpl.php';
} else {
    $arrJSON = array();
    $arrJSON['success'] = 'false';
    $objAttachment = FBApplicationBase::UploadFile($_FILES['MFBFile']);
    if (!is_null($objAttachment)) {
        $arrJSON['success'] = 'true';
        $arrJSON['idAttachment'] = $objAttachment->idAttachment;
        $arrJSON['value'] = $objAttachment->fileLoc;
        $arrJSON['fieldName'] = $_POST['fieldName'];
    }
    echo json_encode($arrJSON);
}
コード例 #5
0
 public function RenderAdminBar()
 {
     if (!is_null($this->strAdminBarTpl)) {
         if (FBApplicationBase::IsAdminUser()) {
             require $this->strAdminBarTpl;
         }
     }
 }
コード例 #6
0
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<script language='javascript' src='<?php 
echo __FRMWK_CORE_PUB_JS_ASSETS__;
?>
/jquery-1.6.3.js'></script>
<script language='javascript' src='<?php 
echo __FRMWK_CORE_PUB_JS_ASSETS__;
?>
/app.js'></script>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<?php 
$this->RenderHeaderAssets();
require __APP_CORE_TPL_ASSETS__ . '/_meta_header.inc.php';
if (file_exists(__APP_TPL_ASSETS__ . '/_custom_meta.tpl.php')) {
    require __APP_TPL_ASSETS__ . '/_custom_meta.tpl.php';
}
?>
<script language='javascript'>
	$(function(){		 
		 <?php 
FBApplicationBase::RenderJSInit();
?>
 
	});
</script>