-function _~form_name~_main() {<!--~opt_http_pass_2 start~-->
- # To remove password protection, just delete this block:
- if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != AUTH_USER || $_SERVER['PHP_AUTH_PW'] != AUTH_PASS) {
- header('WWW-Authenticate: Basic realm="' . AUTH_REALM . '"');
- header('HTTP/1.0 401 Unauthorized');
- echo '401 Unauthorized';
- exit;
- }
- <!--~end~--><!--~pulldowns start~-->
- pulldown('~name~', array('option 1', 'option 2', 'option 3'));
- <!--~end~--><!--~opt_db_3 start~-->
- $edit_id = format_int($_REQUEST['~form_name~_edit_id']);
- unset($_REQUEST['~form_name~_edit_id']);
- if($edit_id) {
- # add hidden field for database id of row we're editing
- tem_set('~form_name~_edit_id', $edit_id);
- tem_sub('editing');