$bSuccess = false; $oPageURL = od_nil; $bDoLogon = $goApp->sFormFieldValue(WY_QK_ACTION) == WY_QV_LOGON; $oHFPageURL = new WYHiddenField(WY_QK_LOGON_PAGE_URL); if ($oHFPageURL->sValue()) { $oPageURL = new WYURL($oHFPageURL->sValue()); $oPageURL->dQuery[WY_QK_EDITMODE] = "yes" . mt_rand(1000, 9999); unset($oPageURL->dQuery[WY_QK_LOGOUT]); } $oTFUsername = new WYTextField("USERNAME"); $oTFPassword = new WYTextField("PASSWORD"); $oTFPassword->makePasswordField(); if ($bDoLogon) { $bSuccess = $goApp->bAuthenticate($oTFUsername->sValue(), $oTFPassword->sValue()); webyep_checkDataFolderIntegrity(); if (webyep_bHasFilemanager()) { session_start(); $_SESSION[WY_SV_IS_AUTH] = $bSuccess; } } if (!$bDoLogon) { $sOnLoadScript = 'document.forms[0].USERNAME.focus();'; } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><!-- InstanceBegin template="/Templates/panels.dwt.php" codeOutsideHTMLIsLocked="false" --> <head> <!-- InstanceBeginEditable name="HeadPHPCode" --> <?php ?> <!-- InstanceEndEditable -->
} 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; }