Exemple #1
0
 */
require '../../include/easyscp-lib.php';
check_login(__FILE__);
$cfg = EasySCP_Registry::get('Config');
$tpl = EasySCP_TemplateEngine::getInstance();
$template = 'reseller/user_add2.tpl';
// check if we have only hosting plans for admins - reseller should not edit them
if (isset($cfg->HOSTING_PLANS_LEVEL) && $cfg->HOSTING_PLANS_LEVEL === 'admin') {
    user_goto('users.php?psi=last');
}
// static page messages.
gen_logged_from($tpl);
$tpl->assign(array('TR_PAGE_TITLE' => tr('EasySCP - User/Add user(step2)'), 'TR_ADD_USER' => tr('Add user'), 'TR_HOSTING_PLAN_PROPERTIES' => tr('Hosting plan properties'), 'TR_TEMPLATE_NAME' => tr('Template name'), 'TR_MAX_DOMAIN' => tr('Max domains<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_SUBDOMAIN' => tr('Max subdomains<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_DOMAIN_ALIAS' => tr('Max aliases<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_MAIL_COUNT' => tr('Mail accounts limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_FTP' => tr('FTP accounts limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_SQL_DB' => tr('SQL databases limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_SQL_USERS' => tr('SQL users limit<br /><em>(-1 disabled, 0 unlimited)</em>'), 'TR_MAX_TRAFFIC' => tr('Traffic limit [MB]<br /><em>(0 unlimited)</em>'), 'TR_MAX_DISK_USAGE' => tr('Disk limit [MB]<br /><em>(0 unlimited)</em>'), 'TR_PHP' => tr('PHP'), 'TR_PHP_EDIT' => tr('PHP editor'), 'TR_CGI' => tr('CGI / Perl'), 'TR_SSL' => tr('SSL support'), 'TR_BACKUP' => tr('Backup'), 'TR_BACKUP_DOMAIN' => tr('Domain'), 'TR_BACKUP_SQL' => tr('SQL'), 'TR_BACKUP_FULL' => tr('Full'), 'TR_BACKUP_NO' => tr('No'), 'TR_BACKUP_COUNT' => tr('Count backups to disk usage'), 'TR_DNS' => tr('Manual DNS support'), 'TR_YES' => tr('Yes'), 'TR_NO' => tr('No'), 'TR_NEXT_STEP' => tr('Next step')));
gen_reseller_mainmenu($tpl, 'reseller/main_menu_users_manage.tpl');
gen_reseller_menu($tpl, 'reseller/menu_users_manage.tpl');
if (!get_pageone_param()) {
    set_page_message(tr("Domain data has been altered. Please enter again."), 'warning');
    unset_messages();
    user_goto('user_add1.php');
}
if (isset($_POST['uaction']) && "user_add2_nxt" === $_POST['uaction'] && !isset($_SESSION['step_one'])) {
    if (check_user_data()) {
        $_SESSION["step_two_data"] = "{$dmn_name};0;";
        $newProps = array('allow_php' => $hp_php, 'allow_phpe' => $hp_phpe, 'allow_cgi' => $hp_cgi, 'subdomain_cnt' => $hp_sub, 'alias_cnt' => $hp_als, 'mail_cnt' => $hp_mail, 'ftp_cnt' => $hp_ftp, 'db_cnt' => $hp_sql_db, 'sqluser_cnt' => $hp_sql_user, 'traffic' => $hp_traff, 'disk' => $hp_disk, 'disk_countbackup' => $hp_countbackup, 'allow_backup' => $hp_backup, 'allow_dns' => $hp_dns, 'allow_ssl' => $hp_ssl);
        $_SESSION["ch_hpprops"] = $newProps;
        if (reseller_limits_check($sql, $ehp_error, $_SESSION['user_id'], 0, $_SESSION["ch_hpprops"])) {
            user_goto('user_add3.php');
        }
    }
} else {
    unset($_SESSION['step_one']);
Exemple #2
0
$theme_color = $cfg['USER_INITIAL_THEME'];
// check if we have only hosting plans for admins - ressseler shoul not can edit them
if (isset($cfg['HOSTING_PLANS_LEVEL']) && $cfg['HOSTING_PLANS_LEVEL'] === 'admin') {
    Header("Location: users.php");
    die;
}
$tpl->assign(array('TR_CLIENT_CHANGE_PERSONAL_DATA_PAGE_TITLE' => tr('VHCS - User/Add user(step2)'), 'THEME_COLOR_PATH' => "../themes/{$theme_color}", 'THEME_CHARSET' => tr('encoding'), 'VHCS_LICENSE' => $cfg['VHCS_LICENSE'], 'ISP_LOGO' => get_logo($_SESSION['user_id'])));
/*
 *
 * static page messages.
 *
 */
gen_reseller_menu($tpl);
gen_logged_from($tpl);
$tpl->assign(array('TR_ADD_USER' => tr('Add user'), 'TR_HOSTING_PLAN_PROPERTIES' => tr('Hosting plan properties'), 'TR_TEMPLATE_NAME' => tr('Template name'), 'TR_MAX_DOMAIN' => tr('Max domain count<br><i>(0 unlimited)</i>'), 'TR_MAX_SUBDOMAIN' => tr('Max subdomain count<br><i>(0 unlimited)'), 'TR_MAX_DOMAIN_ALIAS' => tr('Max aliases count<br><i>(0 unlimited)</i>'), 'TR_MAX_MAIL_COUNT' => tr('Max mail users count<br><i>(0 unlimited)</i>'), 'TR_MAX_FTP' => tr('Max FTP users count<br><i>(0 unlimited)</i>'), 'TR_MAX_SQL_DB' => tr('Max SQL databases count<br><i>(-1 disabled, 0 unlimited)</i>'), 'TR_MAX_SQL_USERS' => tr('Max SQL users count<br><i>(-1 disabled, 0 unlimited)</i>'), 'TR_MAX_TRAFFIC' => tr('Max traffic amount [MB]<br><i>(0 unlimited)</i>'), 'TR_MAX_DISK_USAGE' => tr('Max disk amount [MB]<br><i>(0 unlimited)</i>'), 'TR_PHP' => tr('PHP'), 'TR_CGI' => tr('CGI / Perl'), 'TR_YES' => tr('yes'), 'TR_NO' => tr('no'), 'TR_NEXT_STEP' => tr('Next step'), 'TR_BACKUP_RESTORE' => tr('Backup / Restore'), 'TR_APACHE_LOGS' => tr('Apache logs'), 'TR_AWSTATS' => tr('Awstats')));
get_pageone_param();
if (isset($_POST['uaction']) && "rau2_nxt" === $_POST['uaction'] && !isset($_SESSION['step_one_data'])) {
    if (check_user_data($tpl)) {
        update_hp_data($_SESSION['user_id']);
    }
} else {
    unset($_SESSION['step_one_data']);
    global $dmn_chp;
    get_hp_data($dmn_chp, $_SESSION['user_id']);
    $tpl->assign('MESSAGE', "");
}
get_init_au2_page($tpl);
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
$tpl->prnt();
if (isset($cfg['DUMP_GUI_DEBUG'])) {