diff --git a/admin_domains.php b/admin_domains.php index 5d5d3116..7f68c24c 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -527,6 +527,7 @@ if($page == 'domains' 'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'), 'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot)) ); + $question_nr = 1; foreach($security_questions as $question_name => $question_launch) { if($question_launch !== false) @@ -536,10 +537,11 @@ if($page == 'domains' if(!isset($_POST[$question_name]) || $_POST[$question_name] != $question_name) { - ask_yesno('admin_domain_' . $question_name, $filename, $params); + ask_yesno('admin_domain_' . $question_name, $filename, $params, $question_nr); exit; } } + $question_nr++; } $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`, `ismainbutsubto`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "', '".(int)$issubof."')"); diff --git a/lib/functions/output/function.ask_yesno.php b/lib/functions/output/function.ask_yesno.php index e11319d3..2b57ea4b 100644 --- a/lib/functions/output/function.ask_yesno.php +++ b/lib/functions/output/function.ask_yesno.php @@ -20,32 +20,22 @@ /** * Prints Question on screen * - * @param string The question - * @param string File which will be called with POST if user clicks yes - * @param array Values which will be given to $yesfile. Format: array(variable1=>value1, variable2=>value2, variable3=>value3) - * @param string Name of the target eg Domain or eMail address etc. + * @param string $text The question + * @param string $yesfile File which will be called with POST if user clicks yes + * @param array $params Values which will be given to $yesfile. Format: array(variable1=>value1, variable2=>value2, variable3=>value3) + * @param string $targetname Name of the target eg Domain or eMail address etc. + * @param int $back_nr Number of steps to go back when "No" is pressed + * * @author Florian Lippert + * @author Froxlor team (2010-) + * + * @return string outputs parsed question_yesno template */ -function ask_yesno($text, $yesfile, $params = array(), $targetname = '') +function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_nr = 1) { global $userinfo, $db, $s, $header, $footer, $lng; - /* - // For compatibility reasons (if $params contains a string like "field1=value1;field2=value2") this will convert it into a usable array - if(!is_array($params)) - { - $params_tmp=explode(';',$params); - unset($params); - $params=array(); - while(list(,$param_tmp)=each($params_tmp)) - { - $param_tmp=explode('=',$param_tmp); - $params[$param_tmp[0]]=$param_tmp[1]; - } - } -*/ - $hiddenparams = ''; if(is_array($params)) diff --git a/templates/misc/question_yesno.tpl b/templates/misc/question_yesno.tpl index a02159fc..4314db45 100644 --- a/templates/misc/question_yesno.tpl +++ b/templates/misc/question_yesno.tpl @@ -9,7 +9,7 @@ $header $text -   +