Ejemplo n.º 1
0
    }
}*/
if ($_POST['form_action'] == 'submit') {
    //printf_r($_POST);
    foreach ($_POST as $key => $post_item) {
        //echo("<br> $key=$post_item");
        if ($key != 'form_action' && $key != 'new_variable' && $key != 'new_value' && !is_array($post_item)) {
            $_SESSION[$key] = $post_item;
        }
    }
    if ($_POST['new_variable'] != '') {
        $_SESSION[$_POST['new_variable']] = $_POST['new_value'];
    }
}
$input_fields = generate_html_input_r($_SESSION);
$input_fields = $smarty->compile_string_template($input_fields);
$smarty->assign('input_fields', $input_fields);
$system_message = merge_arrays($_SESSION['system_message'], $system_message);
$error_message = merge_arrays($_SESSION['error_message'], $error_message);
$smarty->assign('system_message', $system_message);
$smarty->assign('error_message', $error_message);
$_SESSION['system_message'] = '';
$_SESSION['error_message'] = '';
$smarty->display('session_edit.tpl.html');
function generate_html_input_r($array)
{
    global $smarty;
    ksort($array);
    reset($array);
    /* $strout .= "<font size=2>"; */
    $strout .= "<table>";