Пример #1
0
         $object->userassigned[$value['id']] = array('id' => $value['id'], 'transparency' => $transparency);
         $i++;
     }
 }
 if (!$error && !empty($conf->global->AGENDA_ENABLE_DONEBY)) {
     if (GETPOST("doneby") > 0) {
         $object->userdoneid = GETPOST("doneby", "int");
     }
 }
 $object->note = trim($_POST["note"]);
 if (isset($_POST["contactid"])) {
     $object->contact = $contact;
 }
 if (GETPOST('socid', 'int') > 0) {
     $object->socid = GETPOST('socid', 'int');
     $object->fetch_thirdparty();
     $object->societe = $object->thirdparty;
     // For backward compatibility
 }
 // Special for module webcal and phenix
 // TODO external modules
 if (!empty($conf->webcalendar->enabled) && GETPOST('add_webcal') == 'on') {
     $object->use_webcal = 1;
 }
 if (!empty($conf->phenix->enabled) && GETPOST('add_phenix') == 'on') {
     $object->use_phenix = 1;
 }
 // Check parameters
 if (empty($object->userownerid) && empty($_SESSION['assignedtouser'])) {
     $error++;
     $donotclearsession = 1;
Пример #2
0
$action = GETPOST('action', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
// Security check
$socid = GETPOST('socid', 'int');
if ($user->societe_id) {
    $socid = $user->societe_id;
}
if ($user->societe_id > 0) {
    unset($_GET["action"]);
    $action = '';
}
$result = restrictedArea($user, 'agenda', $id, 'actioncomm&societe', 'myactions|allactions', 'fk_soc', 'id');
$object = new ActionComm($db);
if ($id > 0) {
    $ret = $object->fetch($id);
    $object->fetch_thirdparty();
}
// Get parameters
$sortfield = GETPOST("sortfield", 'alpha');
$sortorder = GETPOST("sortorder", 'alpha');
$page = GETPOST("page", 'int');
if ($page == -1) {
    $page = 0;
}
$offset = $conf->liste_limit * $page;
$pageprev = $page - 1;
$pagenext = $page + 1;
if (!$sortorder) {
    $sortorder = "ASC";
}
if (!$sortfield) {