コード例 #1
0
    }
    if (!isset($printablesurveyoutput) && $subaction != 'export' && substr($action, 0, 4) != 'ajax') {
        if (!isset($_SESSION['metaHeader'])) {
            $_SESSION['metaHeader'] = '';
        }
        $adminoutput = getAdminHeader($_SESSION['metaHeader']) . $adminoutput;
        // All future output is written into this and then outputted at the end of file
        unset($_SESSION['metaHeader']);
        $adminoutput .= "</div>\n";
        if (!isset($_SESSION['checksessionpost'])) {
            $_SESSION['checksessionpost'] = '';
        }
        $adminoutput .= "<script type=\"text/javascript\">\n" . "<!--\n" . "\tfor(i=0; i<document.forms.length; i++)\n" . "\t{\n" . "var el = document.createElement('input');\n" . "el.type = 'hidden';\n" . "el.name = 'checksessionbypost';\n" . "el.value = '" . $_SESSION['checksessionpost'] . "';\n" . "document.forms[i].appendChild(el);\n" . "\t}\n" . "\n" . "\tfunction addHiddenElement(theform,thename,thevalue)\n" . "\t{\n" . "var myel = document.createElement('input');\n" . "myel.type = 'hidden';\n" . "myel.name = thename;\n" . "theform.appendChild(myel);\n" . "myel.value = thevalue;\n" . "return myel;\n" . "\t}\n" . "\n" . "\tfunction sendPost(myaction,checkcode,arrayparam,arrayval)\n" . "\t{\n" . "var myform = document.createElement('form');\n" . "document.body.appendChild(myform);\n" . "myform.action =myaction;\n" . "myform.method = 'POST';\n" . "for (i=0;i<arrayparam.length;i++)\n" . "{\n" . "\taddHiddenElement(myform,arrayparam[i],arrayval[i])\n" . "}\n" . "addHiddenElement(myform,'checksessionbypost',checkcode)\n" . "myform.submit();\n" . "\t}\n" . "\n" . "//-->\n" . "</script>\n";
        $adminoutput .= getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey online manual"));
    }
} else {
    //not logged in
    sendcacheheaders();
    if (!isset($_SESSION['metaHeader'])) {
        $_SESSION['metaHeader'] = '';
    }
    $adminoutput = getAdminHeader($_SESSION['metaHeader']) . $adminoutput . $loginsummary;
    // All future output is written into this and then outputted at the end of file
    unset($_SESSION['metaHeader']);
    $adminoutput .= "</div>\n" . getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey online manual"));
}
if ($action == 'showphpinfo' && $_SESSION['USER_RIGHT_CONFIGURATOR'] == 1) {
    phpinfo();
} else {
    echo $adminoutput;
}
コード例 #2
0
ファイル: common.php プロジェクト: nmklong/limesurvey-cdio3
        require_once($rootdir.'/classes/core/language.php');
        $clang = new limesurvey_lang($defaultlang);
        include_once($homedir.'/update/updater.php');
        if(isset($_GET['continue']) && $_GET['continue']==1) 
        {
            echo getAdminHeader();
            CheckForDBUpgrades();
            echo "<br /><a href='$homeurl'>".$clang->gT("Back to main menu")."</a></div>";
            updatecheck();
            echo getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey online manual"));                         
        }
        else
        {   
            echo getAdminHeader(),
                 '<div class="messagebox">',CheckForDBUpgrades(),'</div>', 
                 getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey online manual"))
                 ;
        }        
        die;
    }

      if (is_dir($homedir."/install") && $debug<2)
       {
        die ("<p style='text-align: center; margin-left: auto; margin-right: auto; width: 500px; margin-top: 50px;'><img src='../images/limecursor-handle.png' /><strong>Congratulations</strong><br /><br />Your installation is now complete. The final step is to remove or rename the LimeSurvey installation directory (admin/install) on your server since it may be a security risk.<br /><br />Once this directory has been removed or renamed you will be able to log in to your new LimeSurvey Installation.<br /><br /><a href='admin.php'>Try again</a></p>");
       }  
}

//Admin menus and standards
//IF THIS IS AN ADMIN SCRIPT, RUN THE SESSIONCONTROL SCRIPT
if ($sourcefrom == "admin")
{
コード例 #3
0
function doAdminFooter()
{
    echo getAdminFooter();
}
コード例 #4
0
// Check if the DB is up to date
if (!$dbexistsbutempty && $sourcefrom == 'admin') {
    $usrow = getGlobalSetting('DBVersion');
    if (intval($usrow) < $dbversionnumber) {
        $action = '';
        require_once $rootdir . '/classes/core/language.php';
        $clang = new limesurvey_lang($defaultlang);
        include_once $homedir . '/update/updater.php';
        if (isset($_GET['continue']) && $_GET['continue'] == 1) {
            echo getAdminHeader();
            CheckForDBUpgrades();
            echo "<br /><a href='{$homeurl}'>" . $clang->gT("Back to main menu") . "</a></div>";
            updatecheck();
            echo getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey online manual"));
        } else {
            echo getAdminHeader(), '<div class="messagebox">', CheckForDBUpgrades(), '</div>', getAdminFooter("http://docs.limesurvey.org", $clang->gT("LimeSurvey online manual"));
        }
        die;
    }
    if (is_dir($homedir . "/install") && $debug < 2) {
        die("<p style='text-align: center; margin-left: auto; margin-right: auto; width: 500px; margin-top: 50px;'><img src='../images/limecursor-handle.png' /><strong>Congratulations</strong><br /><br />Your installation is now complete. The final step is to remove or rename the LimeSurvey installation directory (admin/install) on your server since it may be a security risk.<br /><br />Once this directory has been removed or renamed you will be able to log in to your new LimeSurvey Installation.<br /><br /><a href='admin.php'>Try again</a></p>");
    }
}
//Admin menus and standards
//IF THIS IS AN ADMIN SCRIPT, RUN THE SESSIONCONTROL SCRIPT
if ($sourcefrom == "admin") {
    include $homedir . "/sessioncontrol.php";
    /**
     * @param string $htmlheader
     * This is the html header text for all administration pages
     *