예제 #1
0
  if(OBM_Acl::areAllowed($obm['uid'], 'calendar',array($params['entity_id']), 'admin' ) || check_calendar_update_rights($params)) {
    run_query_calendar_delete_token($params['entity_id'],$params['entity_type'],$params['type']);
    json_ok_msg("$l_share_calendar : $l_reinit_ok");
  } else {
    json_error_msg("$l_rights : $l_of_right_err_user");
  }
  echo "({".$display['json'].",$msg})";
  exit();

} elseif ($action == 'send_url') {
///////////////////////////////////////////////////////////////////////////////
  if(OBM_Acl::areAllowed($obm['uid'], 'calendar',array($params['entity_id']), 'admin' ) || check_calendar_update_rights($params)) {
    $format = $params['format'];
    $params['others_attendees'][]=$params['mail'];
    $entity = get_user_info($params['entity_id']);
    $entity['token'] = get_calendar_entity_share($params['entity_id'],$params['entity_type'],$params['type']);
    run_query_insert_others_attendees($params);
    $sharemail = new shareCalendarMailer();
    $sharemail->addRecipient($params['mail']);
    $sharemail->send("userShare$format",array($entity));
    json_ok_msg("$l_share_calendar : $l_mail_ok");
  } else {
    json_error_msg("$l_rights : $l_of_right_err_user");
  }
  echo "({".$display['json'].",$msg})";
  exit();

}

display_page($display);
예제 #2
0
파일: OBM.php 프로젝트: Kervinou/OBM
 function addDocument(&$vevent, $document_id) {
   $vevent->set('attach', $GLOBALS['cgp_host'].'calendar/calendar_render.php?action=download_document&externalToken='.get_calendar_entity_share($document_id, 'document', 'private').'&document_id='.$document_id);
 }