linea21-core
[ class tree: linea21-core ] [ index: linea21-core ] [ all elements ]

Source for file mail_actions.php

Documentation is available at mail_actions.php

  1. <?php
  2. /**
  3.  * @package linea21.core
  4.  * @subpackage workshop
  5.  * @author Simon Georget <simon@linea21.com>
  6.  * @version $id SVN
  7.  * @access public
  8.  * @license http://opensource.org/licenses/gpl-3.0.html
  9.  */
  10.  
  11. //////////// Check Inclusion de pages ////////////
  12. if (!function_exists('AuthenthificationProcess')) {
  13.   include_once("../lib/lib_common.php");
  14.   ReloadIndex('admin');
  15. }
  16. ////////////
  17.  
  18. /** PrĂ©paration du mail
  19.  * $email_html_body
  20.  * $email_text_body
  21.  * $email_subject
  22.  * $email_dest
  23.  **/
  24.  
  25. switch($a['action']{
  26.   case 'moderate_comment':
  27.     $email_html_body  "<p>"sprintf(_t('comment','mail_body1')$a['name']"<a href=\"".$a['item_link']."\">".$a['item_title']."</a> (" .$a['item_type']")"." : </p>".END_LINE;
  28.     $email_html_body .= "<p><em>"formatText($a['body']'2HTML'."</em></p>".END_LINE;
  29.     $email_html_body .= "<p><a href=" $a['moderate_link'">" ucfirst(_t('comment''mail_body2'))"</a> ";
  30.     $email_html_body .= "("._t('comment','mail_body_auth'")</p>".END_LINE;
  31.  
  32.     $email_text_body  sprintf(_t('comment','mail_body1')$a['name']$a['item_title'' ('.$a['item_type'].') : ').END_LINE;
  33.     $email_text_body .= " - "$a['item_link'].END_LINE.END_LINE;
  34.     $email_text_body .= formatText($a['body']'2HTML').END_LINE.END_LINE;
  35.     $email_text_body .= ucfirst(_t('comment''mail_body2')) ' : '$a['moderate_link'].END_LINE;
  36.     $email_text_body .= "("._t('comment','mail_body_auth'")".END_LINE;
  37.     
  38.     $email_subject sprintf(_t('comment','mail_subject_moderate')SITE_NAME);
  39.     $email_dest $a['recipient'];
  40.     break;
  41.   case 'notify_comment':
  42.     $unsubscribe_link $a['unsubscribe_link']'&email='.$a['recipient'];
  43.     $email_html_body  "<p>"sprintf(_t('comment','mail_body1')$a['name']"<a href=\"".$a['item_link']."\">".$a['item_title']."</a> (" .$a['item_type']")"." : </p>".END_LINE;
  44.     $email_html_body .= "<p><em>"formatText($a['body']'2HTML'."</em></p>".END_LINE;
  45.     if(!isset($a['adminuser'])) {
  46.       $email_html_body .= "<p>" ucfirst(_t('comment''mail_body3')) "<a href=\"".$unsubscribe_link."\">" $unsubscribe_link "</a></p>".END_LINE;
  47.     }
  48.     
  49.     $email_text_body  sprintf(_t('comment','mail_body1')$a['name']$a['item_title'' ('.$a['item_type'].') : ').END_LINE;
  50.     $email_text_body .= " - "$a['item_link'].END_LINE.END_LINE;
  51.     $email_text_body .= formatText($a['body']'2HTML').END_LINE.END_LINE;
  52.     if(!isset($a['adminuser'])) {
  53.       $email_text_body .= ucfirst(_t('comment''mail_body3')) $unsubscribe_link .END_LINE;
  54.     }
  55.     $email_subject sprintf(_t('comment','mail_subject_newcomment')SITE_NAME);
  56.     $email_dest $a['recipient'];
  57.     break;
  58.   default:
  59.     exit();
  60. }
  61.  
  62. ?>

Documentation generated on Thu, 03 May 2012 15:06:05 +0200 by phpDocumentor 1.4.1