Ejemplo n.º 1
0
 public static function EditCron()
 {
     $xtpl = self::$xtpl;
     $xtpl->assign('SETCURR', 'current');
     $xtpl->assign('CRONCURR', 'current');
     $setting = Settings::getInstance();
     $ini = ini_manager::getInstance();
     $xtpl->assign('INTCRON', 'php -q ' . $ini->get_entry('system', 'path') . '/cron.php');
     $xtpl->assign('EXTCRON', 'wget -O /dev/null http://' . $_SERVER["HTTP_HOST"] . '/cron.php');
     $xtpl->assign('DAYSTONEWINV', $setting->Get('system.cron.daystonewinv'));
     $xtpl->assign('TERMDAYS', $setting->Get('system.cron.daystoterminate'));
     $xtpl->assign('SUSPDAYS', $setting->Get('system.cron.daystosuspend'));
     $xtpl->assign('AUTOSUSP' . $setting->Get('system.cron.autosuspend'), 'checked');
     $xtpl->assign('AUTOTERM' . $setting->Get('system.cron.autoterminate'), 'checked');
     $xtpl->parse('main.editcron.cron');
     $xtpl->parse('main.editcron');
     $xtpl->parse('main');
     $xtpl->out('main');
 }
Ejemplo n.º 2
0
     }
     if (!preg_match('/(^(\\/{1}[^\\/]+)+$)|(^[A-Za-z]:{1}(\\\\{1}[^\\\\]+)+$)/', $_POST['wwwpath'])) {
         $error++;
         Page::message('attention', 'Path to WWW directory in wrong format');
     }
     if ($error > 0) {
         Page::Paths();
     } else {
         //$ini->set_entry('system','path',$_POST['wwwpath']);
         $config->set('SYSTEM_PATH', $_POST['wwwpath']);
         $config->set('SYSTEM_DOMAIN', $_POST['domain']);
         Page::Database();
     }
     break;
 case 4:
     $ini = ini_manager::getInstance();
     if (!preg_match('/^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$/', $_POST['host']) || !preg_match('/^[0-9a-zA-Z_]+$/', $_POST['dbname']) || !preg_match('/^[0-9a-zA-Z_]+$/', $_POST['dbuser']) || strlen($_POST['dbpassword']) < 3) {
         Page::message('attention', 'Wrong data entered. Try again');
         Page::Database();
     } else {
         $config->set('DATABASE_HOST', $_POST['host']);
         $config->set('DATABASE_USER', $_POST['dbuser']);
         $config->set('DATABASE_PASSWORD', $_POST['dbpassword']);
         $config->set('DATABASE_NAME', $_POST['dbname']);
         Page::PerformDBinstall();
     }
     break;
 case 5:
     Page::AddAdmin();
     break;
 case 6: