$user = Settings::Get('phpfpm.vhost_httpuser'); $group = Settings::Get('phpfpm.vhost_httpgroup'); } // all the files and folders have to belong to the local user // now because we also use fcgid for our own vhost safe_exec('chown -R ' . $user . ':' . $group . ' ' . escapeshellarg($_mypath)); } else { // back to webserver permission $user = Settings::Get('system.httpuser'); $group = Settings::Get('system.httpgroup'); safe_exec('chown -R ' . $user . ':' . $group . ' ' . escapeshellarg($_mypath)); } // Initialize logging $cronlog = FroxlorLogger::getInstanceOf(array('loginname' => 'cronjob')); fwrite($debugHandler, 'Logger has been included' . "\n"); if (hasUpdates($version) || hasDbUpdates($dbversion)) { if (Settings::Get('system.cron_allowautoupdate') == null || Settings::Get('system.cron_allowautoupdate') == 0) { /** * Do not proceed further if the Database version is not the same as the script version */ fclose($debugHandler); unlink($lockfile); $errormessage = "Version of file doesn't match version of database. Exiting...\n\n"; $errormessage .= "Possible reason: Froxlor update\n"; $errormessage .= "Information: Current version in database: " . Settings::Get('panel.version') . " (DB: " . Settings::Get('panel.db_version') . ") - version of Froxlor files: " . $version . " (DB: " . $dbversion . ")\n"; $errormessage .= "Solution: Please visit your Foxlor admin interface for further information.\n"; dieWithMail($errormessage); } if (Settings::Get('system.cron_allowautoupdate') == 1) { /** * let's walk the walk - do the dangerous shit
case 2: $message = $lng['error']['login']; break; case 3: $message = $lng['error']['login_blocked']; break; case 4: $cmail = isset($_GET['customermail']) ? $_GET['customermail'] : 'unknown'; $message = str_replace('%s', $cmail, $lng['error']['errorsendingmail']); break; case 5: $message = $lng['error']['user_banned']; break; } $update_in_progress = ''; if (hasUpdates($version)) { $update_in_progress = $lng['update']['updateinprogress_onlyadmincanlogin']; } eval("echo \"" . getTemplate("login") . "\";"); } } if ($action == 'forgotpwd') { $adminchecked = false; $message = ''; if (isset($_POST['send']) && $_POST['send'] == 'send') { $loginname = validate($_POST['loginname'], 'loginname'); $email = validateEmail($_POST['loginemail'], 'email'); $sql = "SELECT `adminid`, `customerid`, `firstname`, `name`, `company`, `email`, `loginname`, `def_language`, `deactivated` FROM `" . TABLE_PANEL_CUSTOMERS . "`\n\t\t\t\tWHERE `loginname`='" . $db->escape($loginname) . "'\n\t\t\t\tAND `email`='" . $db->escape($email) . "'"; $result = $db->query($sql); if ($db->num_rows() == 0) { $sql = "SELECT `adminid`, `name`, `email`, `loginname`, `def_language` FROM `" . TABLE_PANEL_ADMINS . "`\n\t\t\t\tWHERE `loginname`='" . $db->escape($loginname) . "'\n\t\t\t\tAND `email`='" . $db->escape($email) . "'";