collect more info for the customer-dashboard (part 1/2); check for existance of cronjob (just in case)

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-10-27 18:42:40 +01:00
parent 5d4448b659
commit b618e86512
2 changed files with 20 additions and 8 deletions

View File

@@ -61,6 +61,15 @@ if ($page == 'overview') {
$userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']);
$userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota email_autoresponder ftps tickets subdomains aps_packages');
$services_enabled = "";
$se = array();
if ($userinfo['imap'] == '1') $se[] = "IMAP";
if ($userinfo['pop3'] == '1') $se[] = "POP3";
if ($userinfo['phpenabled'] == '1') $se[] = "PHP";
if ($userinfo['perlenabled'] == '1') $se[] = "Perl/CGI";
if ($userinfo['backup_enabled'] == '1' && $userinfo['backup_allowed'] == '1') $se[] = "Backup";
$services_enabled = implode(", ", $se);
eval("echo \"" . getTemplate('index/index') . "\";");
} elseif ($page == 'change_password') {
if (isset($_POST['send']) && $_POST['send'] == 'send') {

View File

@@ -60,21 +60,24 @@ function getNextCronjobs()
function includeCronjobs($debugHandler, $pathtophpfiles)
{
global $settings, $theme;
global $settings, $theme, $cronlog;
$cronjobs = getNextCronjobs();
$jobs_to_run = array();
$cron_path = makeCorrectDir($pathtophpfiles.'/scripts/jobs/');
if($cronjobs !== false
&& is_array($cronjobs)
&& isset($cronjobs[0]))
{
foreach($cronjobs as $cronjob)
{
if ($cronjobs !== false
&& is_array($cronjobs)
&& isset($cronjobs[0])
) {
foreach ($cronjobs as $cronjob) {
$cron_file = makeCorrectFile($cron_path.$cronjob);
$jobs_to_run[] = $cron_file;
if (!file_exists($cron_file)) {
$cronlog->logAction(CRON_ACTION, LOG_ERROR, 'Wanted to include cronfile "'.$cron_file.'" but this file does not exist!!!');
} else {
$jobs_to_run[] = $cron_file;
}
}
}