Пример #1
0
if (!$database_exists && !$cmd_install && strcasecmp($slashlesspath, str_replace(array("\\", "/"), "", $homedir . "install")) != 0) {
    die("<br/>The queXS/LimeSurvey database does not exist. Please read the <a href='../../../README.md'>README.md</a> file for details of how to create the necessary database.");
}
// Check if the DB is up to date and access is not via install script
if ($dbexistsbutempty && !$cmd_install && strcasecmp($slashlesspath, str_replace(array("\\", "/"), "", $homedir . "install")) != 0) {
    die("<br />The queXS/LimeSurvey database does exist but it seems to be empty. Please read the <a href='../../../README.md'>README.md</a> to create the necessary tables.");
}
// Default global values that should not appear in config-defaults.php
$updateavailable = 0;
$updatebuild = '';
$updateversion = '';
$updatelastcheck = '';
$updatekey = '';
$updatekeyvaliduntil = '';
require $homedir . '/globalsettings.php';
SSL_mode();
// This really should be at the top but for it to utilise getGlobalSetting() it has to be here
$showxquestions = getGlobalSetting('showxquestions');
$showgroupinfo = getGlobalSetting('showgroupinfo');
$showqnumcode = getGlobalSetting('showqnumcode');
if ($sourcefrom == "admin") {
    require_once $homedir . '/admin_functions.php';
}
// Check if the DB is up to date
// not for queXS
//if (!$dbexistsbutempty && $sourcefrom=='admin')
//{
//    $usrow = getGlobalSetting('DBVersion');
//    if (floatval($usrow)<$dbversionnumber)
//    {
//        $action='';
Пример #2
0
 
 // Check if the DB is up to date and access is not via install script
if ($dbexistsbutempty && !$cmd_install && (strcasecmp($slashlesspath,str_replace(array("\\", "/"), "", $homedir."install")) != 0)) {
    die ("<br />The LimeSurvey database does exist but it seems to be empty. Please run the <a href='$homeurl/install/index.php'>install script</a> to create the necessary tables.");
}

// Default global values that should not appear in config-defaults.php
$updateavailable=0;
$updatebuild='';
$updateversion='';
$updatelastcheck='';
$updatekey='';
$updatekeyvaliduntil='';

require ($homedir.'/globalsettings.php');
SSL_mode();// This really should be at the top but for it to utilise getGlobalSetting() it has to be here

$showXquestions = getGlobalSetting('showXquestions');
$showgroupinfo = getGlobalSetting('showgroupinfo');
$showqnumcode = getGlobalSetting('showqnumcode');

if ($sourcefrom == "admin")
{
    require_once($homedir.'/admin_functions.php');
} 

// Check if the DB is up to date
If (!$dbexistsbutempty && $sourcefrom=='admin')
{
    $usrow = getGlobalSetting('DBVersion');
    if (intval($usrow)<$dbversionnumber)