Exemplo n.º 1
0
            } else {
                $value = $record[$f['name']];
            }
            $html_name = $prefix . '_' . $type . '_' . $f['name'];
            $html .= sprintf('<input type="text" size="36" name="%s" value="%s">', my_html($html_name), my_html($value));
            $html .= "</td></tr>\n";
        }
        // Input fields for longitude and latitude.
        $html .= '<tr><th>' . _p('Longitude') . '</th><td align="right">';
        $html .= sprintf('<input type="text" size="36" name="lon" value="%s">', my_html($point_lon));
        $html .= "</td></tr>\n";
        $html .= '<tr><th>' . _p('Latitude') . '</th><td align="right">';
        $html .= sprintf('<input type="text" size="36" name="lat" value="%s">', my_html($point_lat));
        $html .= "</td></tr>\n";
        $addnew_url = sprintf('?addnew=yes&lon=%f&lat=%f', $lon, $lat);
        $delete_url = sprintf('?__action=delete&__id=%d', my_html($id));
        $disabled = $new_record ? 'disabled' : '';
        $html .= "<tr><th>&nbsp;</th><td>\n";
        $html .= '<input type="button" value="' . _p('Save') . "\" onClick=\"javascript: PM.Plugin.Digitizepoints.pntSave();\" />\n";
        $html .= '<input type="button" value="' . _p('Cancel') . "\" onClick=\"javascript: PM.Plugin.Digitizepoints.closeDlg();\" />\n";
        $html .= "<p>\n";
        $html .= '<input type="button" value="' . _p('Delete point') . '" onClick="javascript: if (!confirm(\'Delete point?\')) return false; PM.Plugin.Digitizepoints.pntDelete();"' . $disabled . ">\n";
        $html .= '<input type="button" value="' . _p('Do not edit, add new') . '" onClick="javascript: PM.Plugin.Digitizepoints.pntAddNew();"' . $disabled . ">\n";
        $html .= "</td>\n";
        $html .= "</table>\n";
        $html .= "</form>\n";
        $html .= "</body>\n";
        $html .= "</html>\n";
        echo $html;
        break;
}
Exemplo n.º 2
0
function msg_and_close($msg, $color = 'green')
{
    print '<h2><font color="' . $color . '">';
    print my_html($msg) . "</font></h2>\n";
    print "<p id=\"auto_close\">\n";
}