ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMailFormCall Class Reference

Statically used helper class for generating links to the mail form user interface. More...

+ Collaboration diagram for ilMailFormCall:

Static Public Member Functions

static getLinkTarget ($gui, $cmd, Array $gui_params=array(), Array $mail_params=array())
 
static getRedirectTarget ($gui, $cmd, Array $gui_params=array(), Array $mail_params=array())
 
static storeReferer ($request_params)
 
static getSignature ()
 Get preset signature. More...
 
static getRefererRedirectUrl ()
 
static isRefererStored ()
 
static setRecipients (array $recipients)
 
static getRecipients ()
 

Data Fields

const SESSION_KEY = 'mail_transport'
 
const REFERER_KEY = 'r'
 HTTP-GET parameter for the referer url. More...
 
const SIGNATURE_KEY = 'sig'
 Session parameter for the hash. More...
 

Detailed Description

Statically used helper class for generating links to the mail form user interface.

Version
: $Id$
Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de

Definition at line 10 of file class.ilMailFormCall.php.

Member Function Documentation

◆ getLinkTarget()

static ilMailFormCall::getLinkTarget (   $gui,
  $cmd,
Array  $gui_params = array(),
Array  $mail_params = array() 
)
static
Parameters
mixed$gui
string$cmd
array$gui_params
array$mail_params
Returns
string

Definition at line 35 of file class.ilMailFormCall.php.

References $cmd.

Referenced by ilAssignedUsersTableGUI\fillRow(), ilUsersOnlineBlockGUI\fillRow(), ilPublicUserProfileGUI\getEmbeddable(), ilObjCourseGUI\infoScreen(), ilObjiLincCourseGUI\mailMembersObject(), ilObjGroupGUI\mailMembersObject(), ilObjCourseGUI\mailMembersObject(), ilObjiLincCourseGUI\membersObject(), and ilPaymentTrusteeGUI\showTrustees().

36  {
37  return self::getTargetUrl('&', $gui, $cmd, $gui_params, $mail_params);
38  }
$cmd
Definition: sahs_server.php:35
+ Here is the caller graph for this function:

◆ getRecipients()

static ilMailFormCall::getRecipients ( )
static
Returns
array

Definition at line 175 of file class.ilMailFormCall.php.

References ilSession\get().

Referenced by ilMailGUI\executeCommand().

176  {
177  $session = ilSession::get(self::SESSION_KEY);
178  return (array)$session['rcp_to'];
179  }
static get($a_var)
Get a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRedirectTarget()

static ilMailFormCall::getRedirectTarget (   $gui,
  $cmd,
Array  $gui_params = array(),
Array  $mail_params = array() 
)
static
Parameters
mixed$gui
string$cmd
array$gui_params
array$mail_params
Returns
string

Definition at line 48 of file class.ilMailFormCall.php.

References $cmd, and $ilCtrl.

Referenced by ilObjRoleGUI\mailToRoleObject(), ilObjExerciseGUI\redirectFeedbackMailObject(), ilBookmarkAdministrationGUI\sendmail(), ilObjContentObjectGUI\sendMailToBlockedUsers(), ilMembershipGUI\sendMailToSelectedUsers(), ilObjCourseGUI\sendMailToSelectedUsersObject(), and ilObjGroupGUI\sendMailToSelectedUsersObject().

49  {
50  return self::getTargetUrl('&', $gui, $cmd, $gui_params, $mail_params);
51  }
$cmd
Definition: sahs_server.php:35
+ Here is the caller graph for this function:

◆ getRefererRedirectUrl()

static ilMailFormCall::getRefererRedirectUrl ( )
static
Returns
string

Definition at line 131 of file class.ilMailFormCall.php.

References $_SESSION.

Referenced by ilMailFormGUI\cancelMail(), ilMailFormGUI\saveDraft(), and ilMailFormGUI\sendMessage().

132  {
133  $url = $_SESSION[self::REFERER_KEY];
134 
135  if(strlen($url))
136  {
137  $parts = parse_url($url);
138  if(isset($parts['query']) && strlen($parts['query']))
139  {
140  $url .= '&returned_from_mail=1';
141  }
142  else
143  {
144  $url .= '?returned_from_mail=1';
145  }
146  }
147 
148  unset($_SESSION[self::REFERER_KEY]);
149 
150  return $url;
151  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
+ Here is the caller graph for this function:

◆ getSignature()

static ilMailFormCall::getSignature ( )
static

Get preset signature.

Returns
string signature

Definition at line 118 of file class.ilMailFormCall.php.

References $_SESSION.

Referenced by ilMailFormGUI\showForm().

119  {
120  $sig = $_SESSION[self::SIGNATURE_KEY];
121 
122  unset($_SESSION[self::SIGNATURE_KEY]);
123 
124  return $sig;
125  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
+ Here is the caller graph for this function:

◆ isRefererStored()

static ilMailFormCall::isRefererStored ( )
static
Returns
bool

Definition at line 157 of file class.ilMailFormCall.php.

References $_SESSION.

Referenced by ilMailFormGUI\cancelMail(), ilMailFormGUI\saveDraft(), ilMailFormGUI\sendMessage(), and ilMailFormGUI\showForm().

158  {
159  return isset($_SESSION[self::REFERER_KEY]) && strlen($_SESSION[self::REFERER_KEY]) ? true : false;
160  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
+ Here is the caller graph for this function:

◆ setRecipients()

static ilMailFormCall::setRecipients ( array  $recipients)
static
Parameters
array$recipients

Definition at line 165 of file class.ilMailFormCall.php.

References ilSession\get(), and ilSession\set().

Referenced by ilMailGUI\executeCommand(), ilObjCourseGUI\sendMailToSelectedUsersObject(), and ilObjGroupGUI\sendMailToSelectedUsersObject().

166  {
167  $session = ilSession::get(self::SESSION_KEY);
168  $session['rcp_to'] = $recipients;
169  ilSession::set(self::SESSION_KEY, $session);
170  }
static get($a_var)
Get a value.
static set($a_var, $a_val)
Set a value.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ storeReferer()

static ilMailFormCall::storeReferer (   $request_params)
static
Parameters
array$request_params

Definition at line 99 of file class.ilMailFormCall.php.

References $_SESSION.

Referenced by ilMailGUI\executeCommand().

100  {
101  if(isset($request_params[self::REFERER_KEY]))
102  {
103  $_SESSION[self::REFERER_KEY] = base64_decode(rawurldecode($request_params[self::REFERER_KEY]));
104  $_SESSION[self::SIGNATURE_KEY] = base64_decode(rawurldecode($request_params[self::SIGNATURE_KEY]));
105  }
106  else
107  {
108  unset($_SESSION[self::REFERER_KEY]);
109  unset($_SESSION[self::SIGNATURE_KEY]);
110  }
111  }
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
+ Here is the caller graph for this function:

Field Documentation

◆ REFERER_KEY

const ilMailFormCall::REFERER_KEY = 'r'

HTTP-GET parameter for the referer url.

Definition at line 20 of file class.ilMailFormCall.php.

◆ SESSION_KEY

const ilMailFormCall::SESSION_KEY = 'mail_transport'

Definition at line 15 of file class.ilMailFormCall.php.

◆ SIGNATURE_KEY

const ilMailFormCall::SIGNATURE_KEY = 'sig'

Session parameter for the hash.

Definition at line 25 of file class.ilMailFormCall.php.


The documentation for this class was generated from the following file: