True, "nonavbar" => True, "currentapp" => "addressbook", "enable_contacts_class" => True, "enable_nextmatchs_class" => True ); include("../header.inc.php"); $this = CreateObject("phpgwapi.contacts"); $extrafields = array( "ophone" => "ophone", "address2" => "address2", "address3" => "address3" ); $phpgw->preferences->read_repository(); $customfields = array(); if ($phpgw_info["user"]["preferences"]["addressbook"]) { while (list($col,$descr) = each($phpgw_info["user"]["preferences"]["addressbook"])) { if ( substr($col,0,6) == 'extra_' ) { $field = ereg_replace('extra_','',$col); $customfields[$field] = ucfirst($field); } } } $qfields = $this->stock_contact_fields + $extrafields + $customfields; if ($submit) { $totalerrors = 0; if (! count($ab_selected)) { $errors[$totalerrors++] = lang("You must select at least 1 column to display"); } if (! $totalerrors) { $phpgw->preferences->read_repository(); while (list($pref[0]) = each($qfields)) { if ($ab_selected["$pref[0]"]) { $phpgw->preferences->change("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]); } else { $phpgw->preferences->delete("addressbook",$pref[0],"addressbook_" . $ab_selected["$pref[0]"]); } } if ($mainscreen_showbirthdays) { $phpgw->preferences->delete("addressbook","mainscreen_showbirthdays"); $phpgw->preferences->add("addressbook","mainscreen_showbirthdays"); } else { $phpgw->preferences->delete("addressbook","mainscreen_showbirthdays"); } $phpgw->preferences->save_repository(True); Header("Location: " . $phpgw->link("/preferences/index.php")); } } $phpgw->common->phpgw_header(); echo parse_navbar(); if ($totalerrors) { echo "
" . lang("Addressbook preferences") . ":" . "
"; ?>
common->phpgw_footer(); ?>