Пример #1
0
 *
 * @package    Mediboard
 * @subpackage System
 * @author     SARL OpenXtrem <*****@*****.**>
 * @license    GNU General Public License, see http://www.gnu.org/licenses/gpl.html
 * @version    $Revision$
 */
CCanDo::checkRead();
$message_id = CValue::get("message_id");
$update_moment = CValue::get("_update_moment");
$update_initiator = CValue::get("_update_initiator");
$update_benefits = CValue::get("_update_benefits");
// Récupération du message à ajouter/éditer
$message = new CMessage();
$message->deb = CMbDT::dateTime();
$message->load($message_id);
$message->loadRefsNotes();
// Création du possible
if ($update_moment) {
    $message->deb = CMbDT::dateTime("-8 hours", $update_moment);
    $message->fin = CMbDT::dateTime("+15 minutes", $update_moment);
    $message->titre = CAppUI::tr("CMessage-create_update-titre");
    $message->corps = CAppUI::tr("CMessage-create_update-corps", CMbDT::format($update_moment, CAppUI::conf("datetime")));
    $details = CAppUI::tr("CMessage-create_update-details", stripslashes($update_initiator), stripslashes($update_benefits));
    $message->_email_details = CMbString::br2nl($details);
}
// Etablissements disponisbles
$groups = CMediusers::loadEtablissements(PERM_EDIT);
// Source SMTP
$message_smtp = CExchangeSource::get("system-message", "smtp", true, null, false);
$message->_email_from = CAppUI::conf("system CMessage default_email_from");
Пример #2
0
 /**
  * Get all recepient user id for a message except the current userid.
  * 
  * @depreciated, use getParticipantsID instead	 	 
  */
 function &getMultiRecepientID($filter = array())
 {
     $db =& $this->getDBO();
     $my =& JFactory::getUser();
     $originalMsg = new CMessage($db);
     $originalMsg->load($filter['reply_id']);
     $RecepientMsg = $this->getRecepientMessage($filter['reply_id']);
     $recepient = array();
     if ($my->id != $originalMsg->from) {
         $recepient[] = $originalMsg->from;
         // the original sender
     }
     foreach ($RecepientMsg as $row) {
         if ($my->id != $row->to) {
             $recepient[] = $row->to;
             // the original sender
         }
     }
     return $recepient;
 }