public function Init()
 {
     parent::Init();
     if (FBApplicationBase::IsAdminUser()) {
         //were good
     } else {
         $this->Redirect('/index.php');
     }
 }
 public static function RenderJSSettings()
 {
     $objSettings = parent::RenderJSSettings();
     return $objSettings;
 }
 public static function SetAccessTokenOverride($strAccessTokenOverride)
 {
     self::$strAccessTokenOverride = $strAccessTokenOverride;
 }
<?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);
}
 public function RenderAdminBar()
 {
     if (!is_null($this->strAdminBarTpl)) {
         if (FBApplicationBase::IsAdminUser()) {
             require $this->strAdminBarTpl;
         }
     }
 }
<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>