예제 #1
0
    case 'save_custom_fields':
        if (isset($_POST['fields'])) {
            require_once $custom_fields_plugin['class_path'] . 'custom_fields.class.inc';
            $cf = new custom_fields('ab_custom_company_fields');
            $cf->update_record($company_id, $_POST['fields'], $_POST['values']);
            if ($_POST['close'] == 'true') {
                header('Location: ' . $return_to);
                exit;
            }
        }
        break;
}
//check permissions
if ($company_id > 0 && ($company = $ab->get_company($company_id))) {
    $myab = new addressbook();
    $myab->query("SELECT * FROM ab_addressbooks WHERE id='" . $ab->f('addressbook_id') . "'");
    $myab->next_record();
    $tabtable = new tabtable('company_table', $company['name'], '100%', '400', '120', '', true, 'left', 'top', 'company_form', 'vertical', $myab->f('name'));
    $tabtable->add_tab('profile', $ab_company_properties);
    if ($custom_fields_plugin) {
        require_once $custom_fields_plugin['path'] . 'classes/custom_fields.class.inc';
        $cf = new custom_fields('ab_custom_company_fields');
        if ($cf->get_catagories($GO_SECURITY->user_id) > 0) {
            while ($cf->next_record()) {
                $tabtable->add_tab($cf->f('id'), $cf->f('name'));
            }
        }
    }
    //------------------------
    $tabtable->add_tab('categories', $ab_category);
    //----------------