//
// 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')) . "');};");
};
//-----------------------------------------------------------------------------------
label_cell("<a href='mailto:$label'>$label</a>", $params, $id);
}
+function amount_decimal_cell($label, $params="", $id=null)
+{
+ $dec = 0;
+ label_cell(price_decimal_format($label, $dec), "nowrap align=right ".$params, $id);
+}
+
function amount_cell($label, $bold=false, $params="", $id=null)
{
if ($bold)