| version 1.2, 2002/11/27 22:25:39 |
version 1.3, 2003/01/05 01:34:41 |
|
|
| /** common/misc/fnc.write_origvars_html.php - creates HTML hidden |
/** common/misc/fnc.write_origvars_html.php - creates HTML hidden |
| * form fields for passed GET variables |
* form fields for passed GET variables |
| */ |
*/ |
| function write_origvars_html($origvars, $default_value = null) /* {{{ */ |
function write_origvars_html($origvars, $default_value = null, $method = 'POST') /* {{{ */ |
| { |
{ |
| foreach (explode('&', $origvars) as $param) { |
if (! is_array($origvars)) { |
| $parts = explode('=', $param, 2); |
foreach (explode('&', $origvars) as $param) { |
| if (! isset($parts[1]) && isset($default_value)) { |
$parts = explode('=', $param, 2); |
| $parts[1] = $default_value; |
if (! isset($parts[1])) { |
| } |
$parts[1] = $default_value; |
| if (strlen($parts[0]) <= 0) { |
} |
| continue; |
if (strlen($parts[0]) <= 0) { |
| } |
continue; |
| echo '<input type="hidden" name="' . $parts[0] . '"'; |
} |
| if (isset($parts[1])) { |
$origvars[$parts[0]] = $parts[1]; |
| echo ' value="' . $parts[1] . '"'; |
} |
| } |
} |
| echo ">\n"; |
if (! strncasecmp('GET', $method, 3)) { |
| } |
if ($method[strlen($method) - 1] == '+' && count($origvars) > 0) { |
| return true; |
echo '?'; |
| } /* }}} */ |
} |
| |
foreach ($origvars as $key => $val) { |
| |
echo htmlspecialchars(rawurlencode($key).'='.rawurlencode($val)); |
| |
} |
| |
} else { |
| |
foreach ($origvars as $key => $val) { |
| |
echo '<input type="hidden" name="'.htmlspecialchars($key).'"'; |
| |
if (isset($val)) { |
| |
echo ' value="'.htmlspecialchars($val).'"'; |
| |
} |
| |
echo ">\n"; |
| |
} |
| |
} |
| |
return true; |
| |
} /* }}} */ |
| |
|
| /** common/rand/fnc.rand_pass.php - returns pronounceable random key |
/** common/rand/fnc.rand_pass.php - returns pronounceable random key |
| * Note: You may edit the $num_letters and $array variables |
* Note: You may edit the $num_letters and $array variables |