Beispiel #1
0
function genMainDolphinPage()
{
    performInstallLanguages();
    $sExistedAdminPass = db_value("SELECT `Password` FROM `Profiles` WHERE `ID`='1'");
    $aUrl = parse_url($GLOBALS['site']['url']);
    $sPath = isset($aUrl['path']) && !empty($aUrl['path']) ? $aUrl['path'] : '/';
    $sHost = '';
    $iCookieTime = 0;
    setcookie("memberID", 1, $iCookieTime, $sPath, $sHost);
    $_COOKIE['memberID'] = 1;
    setcookie("memberPassword", $sExistedAdminPass, $iCookieTime, $sPath, $sHost, false, true);
    $_COOKIE['memberPassword'] = $sExistedAdminPass;
    return <<<EOF
<script type="text/javascript">
    window.location = "../index.php";
</script>
EOF;
}
Beispiel #2
0
 public function compileLanguage()
 {
     global $oSysTemplate, $tmpl;
     require_once $GLOBALS['aPathInfo']['dirname'] . '/../inc/header.inc.php';
     require_once BX_DIRECTORY_PATH_INC . 'design.inc.php';
     performInstallLanguages();
     $sLang = db_value("SELECT `Name` FROM `sys_localization_languages` LIMIT 1");
     if (empty($sLang) || !file_exists($GLOBALS['aPathInfo']['dirname'] . '/../langs/lang-' . $sLang . '.php')) {
         $this->finish($this->_aReturnCodes['lang compile failed']['code'], $this->_aReturnCodes['lang compile failed']['msg']);
     }
 }