当前位置: 首页>>代码示例>>PHP>>正文


PHP message_box::write_error方法代码示例

本文整理汇总了PHP中message_box::write_error方法的典型用法代码示例。如果您正苦于以下问题:PHP message_box::write_error方法的具体用法?PHP message_box::write_error怎么用?PHP message_box::write_error使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在message_box的用法示例。


在下文中一共展示了message_box::write_error方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _valid_perform

 function _valid_perform()
 {
     $this->_update_items_amount();
     $this->_update_items_notes();
     $cart =& cart::instance();
     if ($cart->count_items() == 0) {
         message_box::write_error(strings::get('no_items_in_cart', 'cart'));
         return new close_popup_response(RESPONSE_STATUS_FAILURE);
     }
     return new redirect_response(RESPONSE_STATUS_FORM_SUBMITTED, '/root/cart?action=checkout&popup=1');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:11,代码来源:send_cart_order_action.class.php

示例2: _valid_perform

 function _valid_perform()
 {
     $mail_data = $this->dataspace->export();
     $body = sprintf(strings::get('body_template', 'feedback'), $mail_data['sender_name'], $mail_data['sender_email'], $mail_data['body']);
     $body = str_replace('<br>', "\n", $body);
     $subject = sprintf(strings::get('message_subject', 'feedback'), $mail_data['subject'], $_SERVER['HTTP_HOST']);
     $recipient_email = constant('ADMINISTRATOR_EMAIL');
     if (!$recipient_email || !send_plain_mail(array($recipient_email), $mail_data['sender_email'], $subject, $body)) {
         message_box::write_error(strings::get('mail_not_sent', 'feedback'));
         return false;
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:13,代码来源:send_feedback_action.class.php

示例3: _valid_perform

 function _valid_perform()
 {
     //$html_body = $this->_get_mail_body('/cart/mail_template.html');
     $text_body = $this->_get_mail_body('/cart/mail_template.txt');
     $subject = sprintf(strings::get('message_subject', 'cart'), $_SERVER['HTTP_HOST']);
     $recipient_email = $this->_get_email();
     if (!send_plain_mail(array($recipient_email), $_SERVER['SERVER_ADMIN'] . '<' . $_SERVER['HTTP_HOST'] . '> ', $subject, $text_body)) {
         message_box::write_error(strings::get('mail_not_sent', 'cart'));
         return new close_popup_response(RESPONSE_STATUS_FAILURE);
     }
     $this->_clear_cart();
     message_box::write_error(strings::get('message_was_sent', 'cart'));
     return new close_popup_response(RESPONSE_STATUS_FORM_SUBMITTED);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:checkout_cart_order_action.class.php

示例4: _valid_perform

 function _valid_perform()
 {
     $mail_data = $this->dataspace->export();
     $body = sprintf(strings::get('body_template', 'feedback'), $mail_data['sender_name'], $mail_data['sender_email'], $mail_data['body']);
     $body = str_replace('<br>', "\n", $body);
     $subject = sprintf(strings::get('message_subject', 'feedback'), $mail_data['subject'], $_SERVER['HTTP_HOST']);
     $recipient_email = $this->_get_email();
     if (!$recipient_email || !send_plain_mail(array($recipient_email), $mail_data['sender_email'], $subject, $body)) {
         message_box::write_error(strings::get('mail_not_sent', 'feedback'));
         return new failed_response();
     }
     message_box::write_error(strings::get('message_was_sent', 'feedback'));
     return new redirect_response(RESPONSE_STATUS_FORM_SUBMITTED, PHP_SELF);
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:14,代码来源:send_feedback_action.class.php

示例5: _valid_perform

 function _valid_perform(&$request, &$response)
 {
     $this->_update_items_amount();
     $this->_update_items_notes();
     $cart =& cart::instance();
     if ($cart->count_items() == 0) {
         message_box::write_error(strings::get('no_items_in_cart', 'cart'));
         $request->set_status(REQUEST_STATUS_FAILURE);
         if ($request->has_attribute('popup')) {
             $response->write(close_popup_response($request));
         }
         return;
     }
     $request->set_status(REQUEST_STATUS_FORM_SUBMITTED);
     $response->redirect('/root/cart?action=checkout&popup=1');
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:16,代码来源:send_cart_order_action.class.php

示例6: sprintf

	function _valid_perform(&$request, &$response)
	{
		$mail_data = $this->dataspace->export();

		if(isset($mail_data['sender_name']) )
			$sender_name = $mail_data['sender_name'];
		else
			$sender_name = $mail_data['sender_firstname'] . ' ' . $mail_data['sender_lastname'];	
		
		$body = sprintf(strings :: get('body_template', 'feedback'),
										$sender_name, 
										$mail_data['sender_email'],
										$mail_data['body']);
										
		$body = str_replace('<br>', "\n", $body);

		$subject = sprintf(strings :: get('message_subject', 'feedback'), 
												$mail_data['subject'],
												$_SERVER['HTTP_HOST']);
		
		$recipient_email = $this->_get_email();
		
		if(!$recipient_email ||
			 !send_plain_mail(array($recipient_email), 
										$mail_data['sender_email'], 
										$subject,
										$body
										)
				)
		{
			message_box :: write_error(strings :: get('mail_not_sent', 'feedback'));
			
			$request->set_status(REQUEST_STATUS_FAILUER);
			return;
		}
		
		message_box :: write_error(strings :: get('message_was_sent', 'feedback'));

		$request->set_status(REQUEST_STATUS_FORM_SUBMITTED);
		$response->redirect($_SERVER['PHP_SELF']);
	}
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:41,代码来源:send_feedback_action.class.php

示例7: _valid_perform

 function _valid_perform(&$request, &$response)
 {
     //$html_body = $this->_get_mail_body('/cart/mail_template.html');
     $text_body = $this->_get_mail_body('/cart/mail_template.txt');
     $subject = sprintf(strings::get('message_subject', 'cart'), $_SERVER['HTTP_HOST']);
     $recipient_email = $this->_get_email();
     if (!send_plain_mail(array($recipient_email), $_SERVER['SERVER_ADMIN'] . '<' . $_SERVER['HTTP_HOST'] . '> ', $subject, $text_body)) {
         message_box::write_error(strings::get('mail_not_sent', 'cart'));
         $request->set_status(REQUEST_STATUS_FAILURE);
         if ($request->has_attribute('popup')) {
             $response->write(close_popup_response($request));
         }
         return;
     }
     $this->_clear_cart();
     message_box::write_error(strings::get('message_was_sent', 'cart'));
     $request->set_status(REQUEST_STATUS_FORM_SUBMITTED);
     if ($request->has_attribute('popup')) {
         $response->write(close_popup_response($request));
     }
 }
开发者ID:BackupTheBerlios,项目名称:limb-svn,代码行数:21,代码来源:checkout_cart_order_action.class.php


注:本文中的message_box::write_error方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。