auto-format all files; add table-definitions to test-bootstrap file
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -20,26 +20,31 @@
|
||||
/**
|
||||
* Prints Question on screen
|
||||
*
|
||||
* @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
|
||||
*
|
||||
* @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 <flo@syscp.org>
|
||||
* @author Froxlor team <team@froxlor.org> (2010-)
|
||||
*
|
||||
*
|
||||
* @return string outputs parsed question_yesno template
|
||||
*/
|
||||
function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_nr = 1) {
|
||||
|
||||
function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_nr = 1)
|
||||
{
|
||||
global $userinfo, $s, $header, $footer, $lng, $theme;
|
||||
|
||||
$hiddenparams = '';
|
||||
|
||||
if (is_array($params)) {
|
||||
foreach ($params as $field => $value) {
|
||||
$hiddenparams.= '<input type="hidden" name="' . htmlspecialchars($field) . '" value="' . htmlspecialchars($value) . '" />' . "\n";
|
||||
$hiddenparams .= '<input type="hidden" name="' . htmlspecialchars($field) . '" value="' . htmlspecialchars($value) . '" />' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,20 +52,22 @@ function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_n
|
||||
$text = $lng['question'][$text];
|
||||
}
|
||||
|
||||
$text = strtr($text, array('%s' => $targetname));
|
||||
$text = strtr($text, array(
|
||||
'%s' => $targetname
|
||||
));
|
||||
eval("echo \"" . getTemplate('misc/question_yesno', '1') . "\";");
|
||||
exit;
|
||||
exit();
|
||||
}
|
||||
|
||||
function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '', $show_checkbox = true) {
|
||||
|
||||
function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '', $show_checkbox = true)
|
||||
{
|
||||
global $userinfo, $s, $header, $footer, $lng, $theme;
|
||||
|
||||
$hiddenparams = '';
|
||||
|
||||
if (is_array($params)) {
|
||||
foreach ($params as $field => $value) {
|
||||
$hiddenparams.= '<input type="hidden" name="' . htmlspecialchars($field) . '" value="' . htmlspecialchars($value) . '" />' . "\n";
|
||||
$hiddenparams .= '<input type="hidden" name="' . htmlspecialchars($field) . '" value="' . htmlspecialchars($value) . '" />' . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,10 +82,13 @@ function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $
|
||||
if ($show_checkbox) {
|
||||
$checkbox = makecheckbox('delete_userfiles', $chk_text, '1', false, '0', true, true);
|
||||
} else {
|
||||
$checkbox = '<input type="hidden" name="delete_userfiles" value="0" />' . "\n";;
|
||||
$checkbox = '<input type="hidden" name="delete_userfiles" value="0" />' . "\n";
|
||||
;
|
||||
}
|
||||
|
||||
$text = strtr($text, array('%s' => $targetname));
|
||||
$text = strtr($text, array(
|
||||
'%s' => $targetname
|
||||
));
|
||||
eval("echo \"" . getTemplate('misc/question_yesno_checkbox', '1') . "\";");
|
||||
exit;
|
||||
exit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user