***************
*** 41,46 ****
$tpl->define_dynamic('page', Config::get('RESELLER_TEMPLATE_PATH') . '/hosting_plan_add.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
$theme_color = Config::get('USER_INITIAL_THEME');
--- 41,47 ----
$tpl->define_dynamic('page', Config::get('RESELLER_TEMPLATE_PATH') . '/hosting_plan_add.tpl');
$tpl->define_dynamic('page_message', 'page');
$tpl->define_dynamic('logged_from', 'page');
+ $tpl->define_dynamic('t_software_support', 'page');
$theme_color = Config::get('USER_INITIAL_THEME');
***************
*** 78,83 ****
'TR_MAX_TRAFFIC' => tr('Traffic limit [MB]<br><i>(0 unlimited)</i>'),
'TR_DISK_LIMIT' => tr('Disk limit [MB]<br><i>(0 unlimited)</i>'),
'TR_PHP' => tr('PHP'),
'TR_CGI' => tr('CGI / Perl'),
'TR_DNS' => tr('Allow adding records to DNS zone (EXPERIMENTAL)'),
'TR_BACKUP' => tr('Backup'),
--- 79,85 ----
'TR_MAX_TRAFFIC' => tr('Traffic limit [MB]<br><i>(0 unlimited)</i>'),
'TR_DISK_LIMIT' => tr('Disk limit [MB]<br><i>(0 unlimited)</i>'),
'TR_PHP' => tr('PHP'),
+ 'TR_SOFTWARE_SUPP' => tr('Software installation'),
'TR_CGI' => tr('CGI / Perl'),
'TR_DNS' => tr('Allow adding records to DNS zone (EXPERIMENTAL)'),
'TR_BACKUP' => tr('Backup'),
***************
*** 111,117 ****
} else {
gen_empty_ahp_page($tpl);
}
-
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
--- 113,119 ----
} else {
gen_empty_ahp_page($tpl);
}
+ get_reseller_software_permission (&$tpl,&$sql,$_SESSION['user_id']);
gen_page_message($tpl);
$tpl->parse('PAGE', 'page');
***************
*** 145,150 ****
'HP_DESCRIPTION_VALUE' => '',
'TR_PHP_YES' => '',
'TR_PHP_NO' => 'checked="checked"',
'TR_CGI_YES' => '',
'TR_CGI_NO' => 'checked="checked"',
'VL_BACKUPD' => '',
--- 147,154 ----
'HP_DESCRIPTION_VALUE' => '',
'TR_PHP_YES' => '',
'TR_PHP_NO' => 'checked="checked"',
+ 'VL_SOFTWAREY' => '',
+ 'VL_SOFTWAREN' => 'checked="checked"',
'TR_CGI_YES' => '',
'TR_CGI_NO' => 'checked="checked"',
'VL_BACKUPD' => '',
***************
*** 172,178 ****
global $hp_ftp, $hp_sql_db, $hp_sql_user;
global $hp_traff, $hp_disk;
global $price, $setup_fee, $value, $payment, $status;
- global $hp_backup, $hp_dns;
$tpl->assign(
array(
--- 176,182 ----
global $hp_ftp, $hp_sql_db, $hp_sql_user;
global $hp_traff, $hp_disk;
global $price, $setup_fee, $value, $payment, $status;
+ global $hp_backup, $hp_dns, $hp_allowsoftware;
$tpl->assign(
array(
***************
*** 197,202 ****
array(
'TR_PHP_YES' => ($hp_php == '_yes_') ? 'checked="checked"' : '',
'TR_PHP_NO' => ($hp_php == '_no_') ? 'checked="checked"' : '',
'TR_CGI_YES' => ($hp_cgi == '_yes_') ? 'checked="checked"' : '',
'TR_CGI_NO' => ($hp_cgi == '_no_') ? 'checked="checked"' : '',
'VL_BACKUPD' => ($hp_backup == '_dmn_') ? 'checked="checked"' : '',
--- 201,208 ----
array(
'TR_PHP_YES' => ($hp_php == '_yes_') ? 'checked="checked"' : '',
'TR_PHP_NO' => ($hp_php == '_no_') ? 'checked="checked"' : '',
+ 'VL_SOFTWAREY' => ($hp_allowsoftware == '_yes_') ? 'checked="checked"' : '',
+ 'VL_SOFTWAREN' => ($hp_allowsoftware == '_no_') ? 'checked="checked"' : '',
'TR_CGI_YES' => ($hp_cgi == '_yes_') ? 'checked="checked"' : '',
'TR_CGI_NO' => ($hp_cgi == '_no_') ? 'checked="checked"' : '',
'VL_BACKUPD' => ($hp_backup == '_dmn_') ? 'checked="checked"' : '',
***************
*** 222,228 ****
global $hp_ftp, $hp_sql_db, $hp_sql_user;
global $hp_traff, $hp_disk;
global $price, $setup_fee, $value, $payment, $status;
- global $hp_backup, $hp_dns;
$ahp_error = array();
--- 228,234 ----
global $hp_ftp, $hp_sql_db, $hp_sql_user;
global $hp_traff, $hp_disk;
global $price, $setup_fee, $value, $payment, $status;
+ global $hp_backup, $hp_dns, $hp_allowsoftware;
$ahp_error = array();
***************
*** 268,274 ****
if (isset($_POST['backup'])) {
$hp_backup = $_POST['backup'];
}
-
if ($hp_name == '') {
$ahp_error[] = tr('Incorrect template name length!');
}
--- 274,285 ----
if (isset($_POST['backup'])) {
$hp_backup = $_POST['backup'];
}
+
+ (isset($_POST['software_allowed'])) ? $hp_allowsoftware = $_POST['software_allowed'] : $hp_allowsoftware = "_no_";
+
+ if($hp_php == "_no_" && $hp_allowsoftware == "_yes_") {
+ $ahp_error[] = tr('The software installer needs PHP to enable it!');
+ }
if ($hp_name == '') {
$ahp_error[] = tr('Incorrect template name length!');
}
***************
*** 325,331 ****
global $hp_ftp, $hp_sql_db, $hp_sql_user;
global $hp_traff, $hp_disk;
global $price, $setup_fee, $value, $payment, $status;
- global $hp_backup, $hp_dns;
$sql = Database::getInstance();
$err_msg = '';
--- 336,342 ----
global $hp_ftp, $hp_sql_db, $hp_sql_user;
global $hp_traff, $hp_disk;
global $price, $setup_fee, $value, $payment, $status;
+ global $hp_backup, $hp_dns, $hp_allowsoftware;
$sql = Database::getInstance();
$err_msg = '';
***************
*** 337,343 ****
$tpl->assign('MESSAGE', tr('Hosting plan with entered name already exists!'));
// $tpl->parse('AHP_MESSAGE', 'ahp_message');
} else {
- $hp_props = "$hp_php;$hp_cgi;$hp_sub;$hp_als;$hp_mail;$hp_ftp;$hp_sql_db;$hp_sql_user;$hp_traff;$hp_disk;$hp_backup;$hp_dns";
// this id is just for fake and is not used in reseller_limits_check.
$hpid = 0;
--- 348,354 ----
$tpl->assign('MESSAGE', tr('Hosting plan with entered name already exists!'));
// $tpl->parse('AHP_MESSAGE', 'ahp_message');
} else {
+ $hp_props = "$hp_php;$hp_cgi;$hp_sub;$hp_als;$hp_mail;$hp_ftp;$hp_sql_db;$hp_sql_user;$hp_traff;$hp_disk;$hp_backup;$hp_dns;$hp_allowsoftware";
// this id is just for fake and is not used in reseller_limits_check.
$hpid = 0;