Exemplo n.º 1
0
];
			var folder = <?php 
print $folder;
?>
;
			
			// print.
			$('.mail-print').click(function(e) {
				$('#message-full-box').printThis({ 
					loadCSS: [
						"<?php 
print \creamy\CRMUtils::creamyBaseURL();
?>
/css/creamycrm.css",
						"<?php 
print \creamy\CRMUtils::creamyBaseURL();
?>
/css/printpage.css"
					], 
					pageTitle: "<?php 
print $message["subject"];
?>
",
					header: '<div class="print-logo"><img src="http://creamycrm.com/img/logo.png" width="32" height="32"> Creamy</div>'
					});
			});

			<?php 
// delete
$successURL = "messages.php?folder={$folder}&message=" . urlencode($lh->translationFor("message_successfully_deleted"));
print $ui->mailboxAction("mail-delete", "php/DeleteMessages.php", $ui->newLocationJS($successURL), $ui->showCustomErrorMessageAlertJS($lh->translationFor("unable_delete_messages")), null, true, true);
Exemplo n.º 2
0
 /** Datatables */
 public function urlForDatatablesTranslation()
 {
     if ($language = $this->getDisplayLanguage()) {
         $fileindisk = \creamy\CRMUtils::creamyBaseDirectoryPath(false) . CRM_LANGUAGE_BASE_DIR . "datatables" . DIRECTORY_SEPARATOR . $language . ".json";
         if (file_exists($fileindisk)) {
             require_once './php/CRMUtils.php';
             $langurl = \creamy\CRMUtils::creamyBaseURL() . "/lang/datatables/" . $language . ".json";
             return $langurl;
         }
     }
     return null;
 }
Exemplo n.º 3
0
 /**
  * Sends an email warning the user of an event for today.
  * @param Array $event Associative array containing the event data.
  * @return Bool true if the email was successfully sent, false otherwise.
  */
 public function sendNewEventMailToUser($event)
 {
     if (!isset($event) || !isset($event["user_id"])) {
         return false;
     }
     $eventUser = $this->db->getDataForUser($event["user_id"]);
     if (empty($eventUser)) {
         return false;
     }
     // prepare values.
     $lh = \creamy\LanguageHandler::getInstance();
     $baseURL = \creamy\CRMUtils::creamyBaseURL();
     // mail parameters
     $title = $lh->translationFor("event_for_today");
     $text = $lh->translationFor("you_have_an_event") . $event["title"];
     $linkURL = "{$baseURL}/events.php?initial_date=" . urlencode($event["start_date"]);
     $linkTitle = $lh->translationFor("see_event");
     return $this->sendCreamyEmailWithValues($title, $text, $linkURL, $linkTitle, $title, $eventUser["email"]);
 }
Exemplo n.º 4
0
 /** 
  * Returns the custom action page for a module. This page is used by the module to perform custom
  * actions, like adjusting database records, CRUD operations and such. This module page will call 
  * the module custom hook contained in the parameter hook_name, with the parameters received in
  * $_POST. For more 
  */
 public function customActionModulePageURL()
 {
     $baseURL = \creamy\CRMUtils::creamyBaseURL();
     return $baseURL . "/php/" . CRM_MODULE_CUSTOM_ACTION_PAGE;
 }