示例#1
0
    }
    function fatalError($sM)
    {
        print "fatal error: {$sM}<br>";
    }
    function &oSharedInstance()
    {
        global $goApp;
        return $goApp;
    }
}
if (!isset($webyep_bDocumentPage)) {
    $webyep_bDocumentPage = true;
}
$goApp = new WYApplication();
WYLanguage::setup();
// check for file managers and start session only if one is present
if (webyep_bHasFilemanager() && webyep_bHasEditPermissions()) {
    session_start();
}
// caution: WYDocument's constructor needs $goApp!
$goApp->oDocument = new WYDocument(WYURL::oCurrentURL());
$goApp->bEditPermission = $goApp->bEditMode;
if ($goApp->bEditPermission && !$goApp->bAuthCheck($webyep_bDocumentPage ? $goApp->oDocument->oDocPath : WYEditor::oEditedPagesPath())) {
    $goApp->bEditPermission = false;
    $_SESSION[WY_SV_IS_AUTH] = false;
}
if ($webyep_bLiveDemo && !$webyep_sLiveDemoSlotID && $webyep_bLiveDemoLockTemplate) {
    $goApp->bEditPermission = false;
    $_SESSION[WY_SV_IS_AUTH] = false;
}
示例#2
0
 function sTranslatedString($s, $bOutputAsHTML = true)
 {
     global $webyep_iLanguageID, $webyep_dLanguageStrings, $goApp;
     if (isset($webyep_dLanguageStrings[$s]) && isset($webyep_dLanguageStrings[$s][$webyep_iLanguageID])) {
         $sT = $webyep_dLanguageStrings[$s][$webyep_iLanguageID];
     } else {
         $goApp->log("no translation for: {$s}");
         $sT = $s;
     }
     return $bOutputAsHTML ? WYLanguage::sUtf8ToNumericUnicodeEntity($sT) : WYLanguage::sUtf8ToOctalUnicodeEscape($sT);
 }