//
// Read numeric value from user formatted input
//
-function input_num($postname=null, $dflt=null)
+function input_num($postname=null, $dflt=0)
{
if (!isset($_POST[$postname]) || $_POST[$postname] == "")
return $dflt;
function submit_center($name, $value, $echo=true, $title=false, $async=false, $icon=false)
{
- echo "<center>";
+ if ($echo) echo "<center>";
submit($name, $value, $echo, $title, $async, $icon);
- echo "</center>";
+ if ($echo) echo "</center>";
}
function submit_center_first($name, $value, $title=false, $async=false, $icon=false)
function submit_js_confirm($name, $msg) {
add_js_source(
- "_validate.$name=function(){ return confirm('$msg');};");
+ "_validate.$name=function(){ return confirm('"
+ . strtr($msg, array("\n"=>'\\n')) . "');};");
};
//-----------------------------------------------------------------------------------