This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once '../wp-content/plugins/contact/custom-contact.php';
custom_contact_init();
// Button: "Delete Field"
if (isset($_POST['delete'])) {
    custom_contact_delete_field();
} else {
    if ($_POST['action'] == 'add') {
        custom_contact_add_field();
    } else {
        if ($_POST['action'] == 'update') {
            custom_contact_update_field();
        } else {
            if ($_POST['action'] == 'update_options') {
                custom_contact_update_options();
            }
        }
    }
Example #2
0
function custom_contact_get_field_defs()
{
    global $custom_contact_tbl_fields, $wpdb, $user_level;
    custom_contact_init();
    $fields = null;
    return $wpdb->get_results("SELECT * FROM {$custom_contact_tbl_fields} ORDER BY form_position");
}