本文整理汇总了PHP中isOption函数的典型用法代码示例。如果您正苦于以下问题:PHP isOption函数的具体用法?PHP isOption怎么用?PHP isOption使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isOption函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
$form = $this->_class_factory->getClass(ACCOUNT_MERGE_FORM, array('environment' => $this->_environment));
// Load form data from postvars
if (!empty($this->_post_vars) and isOption($this->_command, $this->_translator->getMessage('ACCOUNT_MERGE_BUTTON'))) {
$form->setFormPost($this->_post_vars);
}
$form->prepareForm();
$form->loadValues();
// cancel
if (!empty($this->_command) and isOption($this->_command, $this->_translator->getMessage('COMMON_CANCEL_BUTTON'))) {
$this->_redirect_back();
}
// Save item
if (!empty($this->_command) and isOption($this->_command, $this->_translator->getMessage('ACCOUNT_MERGE_BUTTON'))) {
$correct = $form->check();
if ($correct) {
$authentication = $this->_environment->getAuthenticationObject();
$current_user = $this->_environment->getCurrentUserItem();
if (isset($this->_post_vars['auth_source']) and !empty($this->_post_vars['auth_source'])) {
$auth_source_old = $this->_post_vars['auth_source'];
} else {
$current_context = $this->_environment->getCurrentContextItem();
$auth_source_old = $current_context->getAuthDefault();
}
$authentication->mergeAccount($current_user->getUserID(), $current_user->getAuthSource(), $this->_post_vars['user_id'], $auth_source_old);
$this->_redirect_back();
}
}
return $this->_show_form($form);
}
示例2: execute
function execute()
{
$success = false;
$class_params = array();
$class_params['environment'] = $this->_environment;
$form = $this->_class_factory->getClass(PASSWORD_CHANGE_FORM, $class_params);
unset($class_params);
// Load form data from postvars
if (!empty($this->_post_vars)) {
$form->setFormPost($this->_post_vars);
}
$form->prepareForm();
$form->loadValues();
// cancel
if (!empty($this->_command) and isOption($this->_command, $this->_translator->getMessage('COMMON_CANCEL_BUTTON'))) {
$this->_redirect_back();
}
// Save item
if (!empty($this->_command) and isOption($this->_command, $this->_translator->getMessage('PASSWORD_CHANGE_BUTTON'))) {
$correct = $form->check();
if ($correct) {
$current_user = $this->_environment->getCurrentUserItem();
$authentication = $this->_environment->getAuthenticationObject();
if (!$current_user->isRoot()) {
$session_item = $this->_environment->getSessionItem();
$auth_manager = $authentication->getAuthManager($current_user->getAuthSource());
} else {
$server_item = $this->_environment->getServerItem();
$auth_manager = $authentication->getAuthManagerByAuthSourceItem($server_item->getDefaultAuthSourceItem());
}
$auth_manager->changePassword($current_user->getUserID(), $this->_post_vars['password']);
$error_number = $auth_manager->getErrorNumber();
if (empty($error_number)) {
$success = true;
$session = $this->_environment->getSessionItem();
if ($session->issetValue('password_forget_ip')) {
$session->unsetValue('password_forget_ip');
$session->unsetValue('password_forget_time');
}
}
}
}
if (!$success) {
return $this->_show_form($form);
} else {
$this->_redirect_back();
}
}
示例3: _initForm
/** init data for form, INTERNAL
* this methods init the data for the form, for example groups
*/
function _initForm()
{
// auth source
$current_portal = $this->_environment->getCurrentPortalItem();
$auth_source_list = $current_portal->getAuthSourceListEnabled();
$this->_count_auth_source_list_add_account = 0;
if (isset($auth_source_list) and !$auth_source_list->isEmpty()) {
$this->_count_auth_source_list_enabled = $auth_source_list->getCount();
$auth_source_item = $auth_source_list->getFirst();
while ($auth_source_item) {
$temp_array = array();
if ($auth_source_item->isCommSyDefault() and $auth_source_item->allowChangePassword() or $auth_source_item->allowAddAccount() or $auth_source_item->getContactFon() != '' or $auth_source_item->getContactEMail() != '' or $auth_source_item->getPasswordChangeLink() != '') {
$temp_array['value'] = $auth_source_item->getItemID();
$this->_count_auth_source_list_add_account++;
} else {
$this->_count_auth_source_list_add_account++;
$temp_array['value'] = 'disabled';
}
$temp_array['text'] = $auth_source_item->getTitle();
$this->_auth_source_array[] = $temp_array;
unset($temp_array);
$auth_source_item = $auth_source_list->getNext();
}
} else {
$this->_count_auth_source_list_enabled = 0;
}
if ($this->_count_auth_source_list_add_account == 1) {
$this->_default_auth_source_entry = $this->_auth_source_array[0]['value'];
}
if (!empty($this->_form_post) and isOption($this->_form_post['option'], $this->_translator->getMessage('PASSWORD_CHOOSE_BUTTON')) and !empty($this->_form_post['auth_source'])) {
$this->_default_auth_source_entry = $this->_form_post['auth_source'];
$this->_count_auth_source_list_add_account = 1;
}
if (empty($this->_default_auth_source_entry)) {
$this->_default_auth_source_entry = $current_portal->getAuthDefault();
}
}
示例4: redirect
if (isset($get_params['search'])){
$params['search'] = $get_params['search'];
}
if (isset($get_params['seltime'])){
$params['seltime'] = $get_params['seltime'];
}
if (isset($get_params['selroom'])){
$params['selroom'] = $get_params['selroom'];
}
if (isset($get_params['sel_archive_room'])){
$params['sel_archive_room'] = $get_params['sel_archive_room'];
}
redirect($environment->getCurrentContextID(), 'home', 'index', $params);
}
if (isOption($option, $translator->getMessage('ACCOUNT_GET_MEMBERSHIP_BUTTON'))) {
include_once('classes/cs_mail.php');
$room_manager = $environment->getRoomManager();
$room_item = $room_manager->getItem($current_item_id);
$portal_item = $environment->getCurrentPortalItem();
if($portal_item->withAGBDatasecurity() and $room_item->getAGBStatus() == 1){
$agb_acceptance = false;
if($room_item->getAGBStatus() == 1 AND isset($_POST['agb_acceptance']) and $_POST['agb_acceptance'] == 1){
$agb_acceptance = true;
} else {
$error = 'agb';
$account_mode = 'member';
}
} else {
$agb_acceptance = true;
示例5: include_once
else {
include_once('functions/error_functions.php');
trigger_error('annotation_edit was called in an unknown manner', E_USER_ERROR);
}
if ($session->issetValue($environment->getCurrentModule().'_add_files')) {
$form->setSessionFileArray($session->getValue($environment->getCurrentModule().'_add_files'));
}
$form->prepareForm();
$form->loadValues();
// Save item
if ( !empty($command) and
(isOption($command, $translator->getMessage('ANNOTATION_SAVE_BUTTON'))
or isOption($command, $translator->getMessage('ANNOTATION_CHANGE_BUTTON'))
or isOption($command, $translator->getMessage('ANNOTATION_ADD_NEW_BUTTON'))
)
) {
$correct = $form->check();
if ( $correct ) {
// Create new item
if ( !isset($annotation_item) ) {
$annotation_manager = $environment->getAnnotationManager();
$annotation_item = $annotation_manager->getNewItem();
$annotation_item->setContextID($environment->getCurrentContextID());
$user = $environment->getCurrentUserItem();
$annotation_item->setCreatorItem($user);
$annotation_item->setCreationDate(getCurrentDateTimeInMySQL());
}
// Set modificator and modification date
示例6: array
$command = '';
}
// Initialize the form
$form = $class_factory->getClass(CONFIGURATION_LISTVIEW_FORM,array('environment' => $environment));
// Display form
$params = array();
$params['environment'] = $environment;
$params['with_modifying_actions'] = true;
$form_view = $class_factory->getClass(CONFIGURATION_FORM_VIEW,$params);
unset($params);
// Save item
if ( !empty($command) and isOption($command, $translator->getMessage('PREFERENCES_SAVE_BUTTON')) ) {
$correct = $form->check();
if ( $correct and isOption($command, $translator->getMessage('PREFERENCES_SAVE_BUTTON')) ) {
if (!empty($_POST['length'])){
$length = $_POST['length'];
if ($length =='3'){
$value = '50';
}elseif ($length =='4'){
$value = 'all';
}else {
$value = '20';
}
$room_item->setListLength($value);
$session_item = $environment->getSessionItem();
$session_item->unsetValue('interval');
$environment->setSessionItem($session_item);
}
示例7: elseif
} elseif(!empty($iid) and $iid == $delete_id) {
$context_item = $environment->getCurrentContextItem();
$status_array = $context_item->getExtraToDoStatusArray();
unset($status_array[$iid]);
$context_item->setExtraToDoStatusArray($status_array);
$context_item->save();
}
}
}
$params = array();
if (empty($delete_id)) {
$params['focus_element_onload'] = $change_id;
}
redirect($environment->getCurrentContextID(),'configuration', 'rubric_extras', $params);
}elseif (!empty($command) and isOption($command, $translator->getMessage('CONFIGURATION_TODO_NEW_STATUS_BUTTON'))){
if (isset($_POST['new_status']) and !empty($_POST['new_status'])){
$context_item = $environment->getCurrentContextItem();
$status_array = $context_item->getExtraToDoStatusArray();
$status_number = 5;
foreach ($status_array as $key => $value){
if ($key >= $status_number){
$status_number = $key+1;
}
}
$status_array[$status_number] = $_POST['new_status'];
$context_item->setExtraToDoStatusArray($status_array);
$context_item->save();
$params = array();
$params['focus_element_onload'] = 'new_status';
redirect($environment->getCurrentContextID(),
示例8: array
$params = array();
$params['environment'] = $environment;
$params['with_modifying_actions'] = true;
$errorbox = $class_factory->getClass(ERRORBOX_VIEW,$params);
unset($params);
$errorbox->setText($translator->getMessage('MEMBER_EDIT_ERROR_ID'));
$page->add($errorbox);
$command = 'error';
}
}
else {
if ( isOption($command_delete,$translator->getMessage('COMMON_USER_REJECT_BUTTON')) ) {
$_POST['status'] = 'close';
} else {
$params = array();
$params['environment'] = $environment;
$params['with_modifying_actions'] = true;
$form_view = $class_factory->getClass(CONFIGURATION_FORM_VIEW,$params);
unset($params);
$form_view->setAction(curl($environment->getCurrentContextID(),'account','assignroom',''));
$form_view->setForm($form);
if ( $environment->inServer() or $environment->inPortal() ) {
$page->addForm($form_view);
} else {
$page->add($form_view);
}
示例9: actionAction
public function actionAction()
{
$environment = $this->_environment;
$class_factory = $environment->getClassFactory();
$translator = $environment->getTranslationObject();
$session_item = $environment->getSessionItem();
$action_array = $session_item->getValue('index_action');
#pr($action_array);
// option contains the name of the submit button, if this
// script is called as result of a form post
if (!empty($_POST['option'])) {
$command = $_POST['option'];
} else {
$command = '';
}
if ($command != 'error') {
#pr(1);
if (isOption($command, $translator->getMessage('COMMON_CANCEL_BUTTON'))) {
redirect($action_array['backlink']['cid'], $action_array['backlink']['mod'], $action_array['backlink']['fct'], $action_array['backlink']['par']);
} else {
#pr(2);
$form = $class_factory->getClass(ACCOUNT_ACTION_FORM, array('environment' => $environment));
// init display data
if (!empty($_POST)) {
// second call of form: set post data
$form->setFormPost($_POST);
}
$form->setActionArray($action_array);
$form->prepareForm();
$form->loadValues();
$temp = $action_array['action'];
$tempMessage = "";
switch ($temp) {
case 'USER_ACCOUNT_DELETE':
$tempMessage = $translator->getMessage('INDEX_ACTION_PERFORM_USER_ACCOUNT_DELETE_BUTTON');
break;
case 'USER_ACCOUNT_FREE':
$tempMessage = $translator->getMessage('INDEX_ACTION_PERFORM_USER_ACCOUNT_FREE_BUTTON');
break;
case 'USER_ACCOUNT_LOCK':
$tempMessage = $translator->getMessage('INDEX_ACTION_PERFORM_USER_ACCOUNT_LOCK_BUTTON');
break;
case 'USER_MAKE_CONTACT_PERSON':
$tempMessage = $translator->getMessage('INDEX_ACTION_PERFORM_USER_MAKE_CONTACT_PERSON_BUTTON');
break;
case 'USER_STATUS_MODERATOR':
$tempMessage = $translator->getMessage('INDEX_ACTION_PERFORM_USER_STATUS_MODERATOR_BUTTON');
break;
case 'USER_STATUS_USER':
$tempMessage = $translator->getMessage('INDEX_ACTION_PERFORM_USER_STATUS_USER_BUTTON');
break;
case 'USER_UNMAKE_CONTACT_PERSON':
$tempMessage = $translator->getMessage('INDEX_ACTION_PERFORM_USER_UNMAKE_CONTACT_PERSON_BUTTON');
break;
default:
$tempMessage = $translator->getMessage('COMMON_MESSAGETAG_ERROR');
break;
}
if (!empty($command) and (isOption($command, $tempMessage) or isOption(strtolower($command), strtolower($translator->getMessage('INDEX_ACTION_SEND_MAIL_BUTTON'))))) {
#pr(4);
$correct = $form->check();
if ($correct or !isset($_POST['with_mail'])) {
$this->performAction($environment, $action_array, $_POST);
if ($environment->getCurrentModule() != 'user') {
redirect($action_array['backlink']['cid'], $action_array['backlink']['mod'], $action_array['backlink']['fct'], $action_array['backlink']['par']);
} else {
if ($mail_success) {
$params = array();
$params['environment'] = $environment;
$params['with_modifying_actions'] = false;
$detail_view = $class_factory->getClass(MAIL_VIEW, $params);
unset($params);
$detail_view->setFormalData($formal_data);
### $page->add($detail_view);
} else {
$params = array();
$params['environment'] = $environment;
$params['with_modifying_actions'] = true;
$errorbox = $class_factory->getClass(ERRORBOX_VIEW, $params);
unset($params);
if (!empty($mail_error_array)) {
$error_string = $translator->getMessage('ERROR_SEND_EMAIL_TO');
foreach ($mail_error_array as $error) {
$error = htmlentities($error, ENT_NOQUOTES, 'UTF-8');
$error = str_replace(',', BRLF, $error);
$error_string .= BRLF . $error;
}
} else {
$error_string = $translator->getMessage('ERROR_SEND_MAIL');
}
$params = array();
$params['environment'] = $environment;
$params['with_modifying_actions'] = false;
$detail_view = $class_factory->getClass(MAIL_VIEW, $params);
unset($params);
$detail_view->setFormalData($formal_data);
$errorbox->setText($error_string);
### $page->add($errorbox);
### $page->add($detail_view);
}
//.........这里部分代码省略.........
示例10: array_search
}
} else {
$idx = array_search($shown_key, $selected_ids);
if ( $idx !== false ) {
unset($selected_ids[$idx]);
}
}
}
}
///////////////////////////////////////
// perform list actions //
///////////////////////////////////////
#pr($_POST);
if ( isOption($option,$translator->getMessage('COMMON_LIST_ACTION_BUTTON_GO'))
and $_POST['index_view_action'] != '-1'
and !empty($selected_ids)
) {
// prepare action process
switch ($_POST['index_view_action']) {
case 1:
$action = 'ENTRY_MARK_AS_READ';
$error = false;
$user_manager = $environment->getUserManager();
$noticed_manager = $environment->getNoticedManager();
foreach ($selected_ids as $id) {
$user_item = $user_manager->getItem($id);
$version_id = $user_item->getVersionID();
// Nur die UserItemID in die noticed DB einfügen??
$noticed_manager->markNoticed($id, $version_id );
示例11: elseif
} elseif ($status == 'moderator') {
$subject = $translator->getMessage('MAIL_SUBJECT_USER_STATUS_MODERATOR',$context_item->getTitle());
$body = $translator->getEmailMessage('MAIL_BODY_HELLO',$user->getFullname());
$body .= LF.LF;
$body .= $translator->getEmailMessage('MAIL_BODY_USER_STATUS_MODERATOR',$userid,$context_item->getTitle());
$body .= LF.LF;
$body .= $translator->getEmailMessage('MAIL_BODY_CIAO',$current_user->getFullname(),$context_item->getTitle());
} else {
include_once('functions/error_functions.php');trigger_error('lost change status',E_USER_ERROR);
}
$url = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].'?cid='.$environment->getCurrentContextID();
$body .= LF.LF.$url;
$_POST['content'] = $body;
}
if ( !empty($command) AND isOption($command,$translator->getMessage('MAIL_SEND_BUTTON')) ) {
$correct = $form->check();
if ( $correct ) {
include_once('classes/cs_mail.php');
$mail = new cs_mail();
$mail->set_from_email($_POST['senderAddress']);
$mail->set_from_name($_POST['senderName']);
$mail->set_reply_to_email($_POST['senderAddress']);
$mail->set_reply_to_name($_POST['senderName']);
$mail->set_subject($_POST['subject']);
$mail->set_message($_POST['content']);
if ( is_array($_POST['receivers']) ) {
$receivers = implode(",",$_POST['receivers']);
} else {
$receivers = $_POST['receivers'];
}
示例12: isOption
}elseif (!empty($command) and isOption($command, $translator->getMessage('BUZZWORDS_NEW_BUTTON'))){
if (isset($_POST['new_buzzword']) and !empty($_POST['new_buzzword'])){
$buzzword_manager = $environment->getLabelManager();
$buzzword_item = $buzzword_manager->getNewItem();
$buzzword_item->setLabelType('buzzword');
$buzzword_item->setName($_POST['new_buzzword']);
$buzzword_item->setContextID($environment->getCurrentContextID());
$user = $environment->getCurrentUserItem();
$buzzword_item->setCreatorItem($user);
$buzzword_item->setCreationDate(getCurrentDateTimeInMySQL());
$buzzword_item->save();
$params = array();
$params['focus_element_onload'] = 'new_buzzword';
redirect($environment->getCurrentContextID(), 'buzzwords', 'edit', $params);
}
}elseif (!empty($command) and isOption($command, $translator->getMessage('BUZZWORDS_COMBINE_BUTTON'))){
if ( (isset($_POST['sel1']) and !empty($_POST['sel1'])) and
(isset($_POST['sel2']) and !empty($_POST['sel2'])) and
(isset($_POST['sel1']) and isset($_POST['sel2']) and $_POST['sel1'] !=$_POST['sel2'])
){
$link_manager = $environment->getLinkManager();
$link_manager->combineBuzzwords($_POST['sel1'],$_POST['sel2']);
$buzzword_manager = $environment->getLabelManager();
$buzzword_item1 = $buzzword_manager->getItem($_POST['sel1']);
$buzzword_item2 = $buzzword_manager->getItem($_POST['sel2']);
$buzzword_item1->setName($buzzword_item1->getName().'/'.$buzzword_item2->getName());
$buzzword_item1->setModificationDate(getCurrentDateTimeInMySQL());
$buzzword_item1->save();
$buzzword_item2->delete();
$params = array();
示例13: array_merge
$session_item->setValue($environment->getCurrentContextID().'_dates_'.$current_iid.'_upload_name',$_FILES['dates_upload']['name']);
}
}
$values = array_merge($_POST,$_FILES);
} else {
$values = $_POST;
}
$form->setFormPost($values);
}
$form->prepareForm();
$form->loadValues();
// Save item
if ( !empty($command)
and isOption($command, $translator->getMessage('CONFIGURATION_AUTOACCOUNTS_UPLOAD_FILE_BUTTON'))
) {
$correct = $form->check();
if ( $correct
and empty($_FILES['dates_upload']['tmp_name'])
and !empty($_POST['hidden_dates_upload_name'])
) {
$session_item = $environment->getSessionItem();
if ( isset($session_item) ) {
$current_iid = $environment->getCurrentContextID();
$_FILES['dates_upload']['tmp_name'] = $session_item->getValue($environment->getCurrentContextID().'_dates_'.$current_iid.'_upload_temp_name');
$_FILES['dates_upload']['name'] = $session_item->getValue($environment->getCurrentContextID().'_dates_'.$current_iid.'_upload_name');
$session_item->unsetValue($environment->getCurrentContextID().'_dates_'.$current_iid.'_upload_temp_name');
$session_item->unsetValue($environment->getCurrentContextID().'_dates_'.$current_iid.'_upload_name');
示例14: elseif
} else {
$from = 1;
}
// Find current browsing interval
// The browsing interval is applied to all rubrics!
if ( isset($_GET['interval']) ) {
$interval = $_GET['interval'];
} elseif ( isset($_POST['interval']) ) {
$interval = $_POST['interval'];
} else {
$interval = CS_LIST_INTERVAL;
}
if ( !empty($option)
and (isOption($option, $translator->getMessage('COMMON_ITEM_ATTACH')))
) {
$entry_array = array();
$entry_new_array = array();
if ($session->issetValue('cid'.$environment->getCurrentContextID().
'_linked_items_index_selected_ids')) {
$entry_array = $session->getValue('cid'.$environment->getCurrentContextID().
'_linked_items_index_selected_ids');
}
if (isset($_POST['itemlist'])){
$selected_id_array = $_POST['itemlist'];
foreach($selected_id_array as $id => $value){
$entry_new_array[] = $id;
}
}
$entry_array = array_merge($entry_array,$entry_new_array);
示例15: execute
function execute()
{
$success = false;
$form = $this->_class_factory->getClass(ACCOUNT_FORGET_FORM, array('environment' => $this->_environment));
// Load form data from postvars
if (!empty($this->_post_vars)) {
$form->setFormPost($this->_post_vars);
}
$form->prepareForm();
$form->loadValues();
// cancel
if (!empty($this->_command) and (isOption($this->_command, $this->_translator->getMessage('COMMON_CANCEL_BUTTON')) or isOption($this->_command, $this->_translator->getMessage('COMMON_FORWARD_BUTTON')))) {
$this->_redirect_back();
}
// get accounts
if (!empty($this->_command) and isOption($this->_command, $this->_translator->getMessage('ACCOUNT_SEND_BUTTON'))) {
$correct = $form->check();
if ($correct) {
$user_manager = $this->_environment->getUserManager();
$user_manager->resetLimits();
$user_manager->setContextLimit($this->_environment->getCurrentPortalID());
/*
* email must match(not only be like) database entry to avoid finding to much identifications
*/
//$user_manager->setSearchLimit($this->_post_vars['email']);
$user_manager->setEmailLimit($this->_post_vars['email']);
$user_manager->select();
$user_list = $user_manager->get();
$account_text = '';
$user_fullname = ' ';
$portal_item = $this->_environment->getCurrentPortalItem();
$user_item = $user_list->getFirst();
$show_auth_source = false;
while ($user_item) {
if (isset($auth_source_id) and $auth_source_id != $user_item->getAuthSource()) {
$show_auth_source = true;
break;
} else {
$auth_source_id = $user_item->getAuthSource();
}
$user_item = $user_list->getNext();
}
$first = true;
$user_item = $user_list->getFirst();
while ($user_item) {
if ($first) {
$first = false;
} else {
$account_text .= LF;
}
$account_text .= $user_item->getUserID();
if ($show_auth_source) {
$auth_souce_item = $portal_item->getAuthSource($user_item->getAuthSource());
$account_text .= ' (' . $auth_souce_item->getTitle() . ')';
}
$user_fullname = $user_item->getFullname();
$user_item = $user_list->getNext();
}
$user_email = $this->_post_vars['email'];
// send email
$context_item = $this->_environment->getCurrentPortalItem();
$mod_text = '';
$mod_list = $context_item->getContactModeratorList();
if (!$mod_list->isEmpty()) {
$mod_item = $mod_list->getFirst();
$contact_moderator = $mod_item;
while ($mod_item) {
if (!empty($mod_text)) {
$mod_text .= ',' . LF;
}
$mod_text .= $mod_item->getFullname();
$mod_text .= ' (' . $mod_item->getEmail() . ')';
$mod_item = $mod_list->getNext();
}
}
$translator = $this->_environment->getTranslationObject();
include_once 'classes/cs_mail.php';
$mail = new cs_mail();
$mail->set_to($user_email);
$server_item = $this->_environment->getServerItem();
$default_sender_address = $server_item->getDefaultSenderAddress();
if (!empty($default_sender_address)) {
$mail->set_from_email($default_sender_address);
} else {
$mail->set_from_email('@');
}
if (isset($contact_moderator)) {
$mail->set_reply_to_email($contact_moderator->getEmail());
$mail->set_reply_to_name($contact_moderator->getFullname());
}
$mail->set_from_name($this->_translator->getMessage('SYSTEM_MAIL_MESSAGE', $context_item->getTitle()));
$mail->set_subject($translator->getMessage('USER_ACCOUNT_FORGET_MAIL_SUBJECT', $context_item->getTitle()));
$body = $translator->getMessage('MAIL_AUTO', $translator->getDateInLang(getCurrentDateTimeInMySQL()), $translator->getTimeInLang(getCurrentDateTimeInMySQL()));
$body .= LF . LF;
$body .= $translator->getEmailMessage('MAIL_BODY_HELLO', $user_fullname);
$body .= LF . LF;
$body .= $this->_translator->getMessage('USER_ACCOUNT_FORGET_MAIL_BODY', $context_item->getTitle(), $account_text);
$body .= LF . LF;
if (empty($contact_moderator)) {
$body .= $translator->getMessage('SYSTEM_MAIL_REPLY_INFO') . LF;
//.........这里部分代码省略.........