$cf->update_record($contact_id, $_POST['fields'], $_POST['values']); if ($_POST['close'] == 'true') { header('Location: ' . $return_to); exit; } } break; case 'start_timer': $active_tab = 1; break; default: $require = 'edit_contact.inc'; break; } if ($contact_id > 0) { $contact = $ab->get_contact($contact_id); $write_permission = $GO_SECURITY->has_permission($GO_SECURITY->user_id, $contact["acl_write"]); if (!$write_permission && !$GO_SECURITY->has_permission($GO_SECURITY->user_id, $contact["acl_read"])) { Header("Location: " . $GO_CONFIG->host . "error_docs/403.php"); exit; } if (!$write_permission) { $require = 'show_contact.inc'; } $birthday = $contact['birthday'] > 0 ? db_date_to_date($contact['birthday']) : ''; $addressbook_id = isset($_POST['addressbook_id']) ? $_POST['addressbook_id'] : $contact['addressbook_id']; } if (isset($_REQUEST['user_id']) && $_REQUEST['user_id'] > 0) { $contact = $GO_USERS->get_user($_REQUEST['user_id']); if ($ab->user_is_contact($GO_SECURITY->user_id, $_REQUEST['user_id'])) { $feedback = "<p class='Error'>" . $contact_exist_warning . "</p>";
Copyright Intermesh 2003 Author: Merijn Schering <*****@*****.**> Version: 1.0 Release date: 08 July 2003 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. */ require "../../Group-Office.php"; $ab_module = $GO_MODULES->get_module('addressbook'); //TODO: Check if user has access to addressbook. require $ab_module['class_path'] . "addressbook.class.inc"; $ab = new addressbook(); if (isset($_REQUEST['clicked_contact'])) { $contact = $ab->get_contact($_REQUEST['clicked_contact']); } unset($_SESSION['GO_HANDLER']); ?> <html> <body> <script language="javascript" type="text/javascript"> //opener.document.forms[0].contact_id.value = '<?php echo $contact['id']; ?> '; //opener.document.forms[0].contact_name.value = "<?php echo $contact['name']; ?> "; opener.document.forms[0].t_from.value = "<?php
} else { if ($name == '') { $feedback = '<p class="Error">' . $error_missing_field . '</p>'; } elseif ($notes->get_note_by_name($name)) { $feedback = '<p class="Error">' . $pm_note_exists . '</p>'; } else { $acl_read = $GO_SECURITY->get_new_acl('note read'); $acl_write = $GO_SECURITY->get_new_acl('note write'); if ($acl_read > 0 && $acl_write > 0) { if (!($note_id = $notes->add_note($_POST['user_id'], $_POST['contact_id'], $_POST['project_id'], addslashes($_POST['file_path']), $_POST['catagory_id'], $_POST['responsible_user_id'], $due_date, $name, smart_addslashes($_POST['content']), $acl_read, $acl_write))) { $GO_SECURITY->delete_acl($acl_read); $GO_SECURITY->delete_acl($acl_write); $feedback = '<p class="Error">' . $strSaveError . '</p>'; } else { if ($_POST['contact_id'] > 0) { $addressbook = $ab->get_contact($_POST['contact_id']); $GO_SECURITY->copy_acl($addressbook['acl_read'], $acl_read); $GO_SECURITY->copy_acl($addressbook['acl_write'], $acl_write); } elseif ($_POST['project_id'] > 0) { $projects = new projects(); $project = $projects->get_project($_POST['project_id']); $GO_SECURITY->copy_acl($project['acl_read'], $acl_read); $GO_SECURITY->copy_acl($project['acl_write'], $acl_write); } elseif ($_POST['file_path'] != '') { require_once $GO_CONFIG->class_path . 'filesystem.class.inc'; $fs = new filesystem(); if ($share = $fs->find_share($_POST['file_path'])) { $GO_SECURITY->copy_acl($share['acl_read'], $acl_read); $GO_SECURITY->copy_acl($share['acl_write'], $acl_write); } $GO_SECURITY->add_user_to_acl($GO_SECURITY->user_id, $acl_write);
option) any later version. */ require "../../Group-Office.php"; $GO_SECURITY->authenticate(); $GO_MODULES->authenticate('addressbook'); require $GO_MODULES->class_path . "addressbook.class.inc"; $ab = new addressbook(); if (isset($_REQUEST['company_id']) && $_REQUEST['company_id'] > 0) { if (isset($_REQUEST['clicked_value']) && $_REQUEST['clicked_value'] != '') { $contacts[] = $_REQUEST['clicked_value']; } else { $contacts = isset($_REQUEST['contacts']) ? $_REQUEST['contacts'] : array(); } if (isset($contacts)) { for ($i = 0; $i < sizeof($contacts); $i++) { $contact = $ab->get_contact($contacts[$i]); if ($GO_SECURITY->has_permission($GO_SECURITY->user_id, $contact['acl_write'])) { $ab->add_contact_to_company($contacts[$i], $_REQUEST['company_id']); } } } } ?> <html> <body> <script language="javascript" type="text/javascript"> opener.document.company_form.submit(); window.close(); </script> </body> </html>