3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.4 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2013 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
31 * @copyright CiviCRM LLC (c) 2004-2013
37 * Dummy page for details of SMS
40 class CRM_Contact_Page_View_SMS
extends CRM_Core_Page
{
45 * This method is called after the page is created.
52 // get the callback, module and activity id
53 $action = CRM_Utils_Request
::retrieve('action', 'String',
54 $this, FALSE, 'browse'
56 $id = CRM_Utils_Request
::retrieve('id', 'Positive',
60 $dao = new CRM_Core_DAO_ActivityHistory();
61 $dao->activity_id
= $id;
62 $dao->activity_type
= ts('SMS Sent');
63 if ($dao->find(TRUE)) {
64 $cid = $dao->entity_id
;
67 $dao = new CRM_SMS_DAO_History();
70 if ($dao->find(TRUE)) {
71 $this->assign('fromName',
72 CRM_Core_DAO
::getFieldValue('CRM_Contact_DAO_Contact',
77 $this->assign('toName',
78 CRM_Core_DAO
::getFieldValue('CRM_Contact_DAO_Contact',
83 $this->assign('sentDate', $dao->sent_date
);
84 $this->assign('message', $dao->message
);
86 // get the display name and images for the contact
87 list($displayName, $contactImage) = CRM_Contact_BAO_Contact
::getDisplayAndImage($dao->contact_id
);
89 CRM_Utils_System
::setTitle($contactImage . ' ' . $displayName);
91 // also add the cid params to the Menu array
92 CRM_Core_Menu
::addParam('cid', $cid);