function show_add() { $content = get_edit_form(); $response = build_view($content); _show($response); }
function handle_new_or_site($op, $item_r, $status_type_r, $HTTP_VARS, &$errors) { if (is_user_granted_permission(PERM_ITEM_OWNER) && $item_r['owner_id'] == get_opendb_session_var('user_id') || is_user_granted_permission(PERM_ITEM_ADMIN)) { if (is_valid_item_type_structure($item_r['s_item_type'])) { $formContents = get_edit_form($op, $item_r, $status_type_r, $HTTP_VARS); if ($formContents != FALSE) { return $formContents; } else { $errors = array('error' => get_opendb_lang_var('undefined_error'), detail => ''); return FALSE; } } else { $errors = array('error' => get_opendb_lang_var('invalid_item_type_structure', 's_item_type', $item_r['s_item_type']), 'detail' => ''); return FALSE; } } else { $errors = array('error' => get_opendb_lang_var('operation_not_available')); opendb_logger(OPENDB_LOG_WARN, __FILE__, __FUNCTION__, 'User attempted to insert an item for another user', $item_r); return FALSE; } }
echo "<p class=\"error\">" . get_opendb_lang_var('operation_not_available') . "</p>"; } } else { if ($HTTP_VARS['op'] == 'edit') { if (get_opendb_config_var('item_review', 'update_support') !== FALSE) { if (is_review_author($review_r['sequence_number']) || is_user_granted_permission(PERM_ADMIN_REVIEWER)) { echo get_edit_form('update', $review_r, $HTTP_VARS); } else { echo "<p class=\"error\">" . get_opendb_lang_var('operation_not_available') . "</p>"; } } else { echo "<p class=\"error\">" . get_opendb_lang_var('operation_not_available') . "</p>"; } } else { if ($HTTP_VARS['op'] == 'add') { echo get_edit_form('insert', array(), $HTTP_VARS); } } } } } } else { echo _theme_header(get_opendb_lang_var('item_not_found')); echo "<h2>" . get_opendb_lang_var('item_not_found') . "</h2>"; echo "<p class=\"error\">" . get_opendb_lang_var('item_not_found') . "</p>"; } $footer_links_r[] = array(url => "item_display.php?item_id=" . $HTTP_VARS['item_id'] . "&instance_no=" . $HTTP_VARS['instance_no'], text => get_opendb_lang_var('back_to_item')); if (is_opendb_session_var('listing_url_vars')) { $footer_links_r[] = array(url => "listings.php?" . get_url_string(get_opendb_session_var('listing_url_vars')), text => get_opendb_lang_var('back_to_listing')); } echo format_footer_links($footer_links_r);
</script>'; } do_headers_dojo(get_edit_title($data), $extra); if ($config->dojo) { ?> <body class="tundra"> <?php include_once "inc/analyticstracking.php"; ?> <div dojoType="dojox.data.QueryReadStore" jsId="LocationStore" url="services/LocationQueryReadStore.php" requestMethod="post"></div> <div dojoType="dojox.data.QueryReadStore" jsId="SourceStore" url="services/SourceQueryReadStore.php" requestMethod="post"></div> <?php } ?> <table class="header" width="100%"> <tbody> <tr> <td><h2><?php echo get_edit_header($data); ?> </h2> </td> </tr> </tbody> </table> <hr /> <?php get_edit_form($data); include "inc/footer.inc.php";