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


PHP flashMessage函数代码示例

本文整理汇总了PHP中flashMessage函数的典型用法代码示例。如果您正苦于以下问题:PHP flashMessage函数的具体用法?PHP flashMessage怎么用?PHP flashMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: standings

 public function standings(Request $request)
 {
     $year = $request->input('year');
     $player = $request->input('player');
     if ($year) {
         return redirect('teams/standings/' . $year);
     } elseif ($player) {
         return redirect('players/list/' . $player);
     } else {
         flashMessage("Error.", "alert-danger");
         return back();
     }
 }
开发者ID:BobHumphrey,项目名称:baseball,代码行数:13,代码来源:NavBarFormController.php

示例2: setPanelSettings

	public function setPanelSettings()
	{
		$discountRules = getCustomerQuote()->getAppliedDiscountRules();
		foreach($discountRules as $discountRule) {
			if(!empty($discountRule['banners'])) {
				foreach($discountRule['banners'] as $banner) {
					flashMessage(getLang('DiscountCongratulations').' '.$banner, MSG_INFO);
				}
			}
		}

		$messages = getFlashMessageBoxes();
		if(!$messages) {
			$this->DontDisplay = true;
			return;
		}

		$GLOBALS['CartStatusMessage'] = $messages;
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:19,代码来源:CartStatusMessage.php

示例3: EditUserStep2

	private function EditUserStep2()
	{
		// Get the information from the form and add it to the database
		$userId = $_POST['userId'];
		$arrData = array();
		$arrPerms = array();
		$err = "";
		$arrUserData = array();

		$this->_GetUserData($userId, $arrUserData);

		// Does this user have permission to edit this user?
		if($GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId() && $arrUserData['uservendorid'] != $GLOBALS['ISC_CLASS_ADMIN_AUTH']->GetVendorId()) {
			FlashMessage(GetLang('Unauthorized'), MSG_ERROR, 'index.php?ToDo=viewUsers');
		}

		$this->_GetUserData(0, $arrData);
		if($arrUserData['pk_userid'] == 1 || $arrUserData['username'] == "admin") {
			$arrData['username'] = "admin";
		}

		$arrPerms = $this->_GetPermissionData(0);

		// Commit the values to the database
		if($this->_CommitUser($userId, $arrData, $arrPerms, $err)) {
			// Log this action
			if(!isset($arrData['username'])) {
				$arrData['username'] = 'admin';
			}

			$GLOBALS['ISC_CLASS_LOG']->LogAdminAction($userId, $arrData['username']);

			if($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Users)) {
				$this->ManageUsers(GetLang('UserUpdatedSuccessfully'), MSG_SUCCESS);
			} else {
				$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(GetLang('UserUpdatedSuccessfully'), MSG_SUCCESS);
			}
		}
		else {
			if($GLOBALS['ISC_CLASS_ADMIN_AUTH']->HasPermission(AUTH_Manage_Users)) {
				flashMessage(sprintf(GetLang('ErrUserNotUpdated'), $err), MSG_ERROR, 'index.php?ToDo=editUser&userId='.$userId);
			} else {
				$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->DoHomePage(sprintf(GetLang('ErrUserNotUpdated'), $err), MSG_ERROR);
			}
		}
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:46,代码来源:class.user.php

示例4: copyTaxRateAction

	/**
	 * Handle the ability to copy a tax rate.
	 */
	public function copyTaxRateAction()
	{
		if(empty($_POST['id'])) {
			flashMessage(getLang('InvalidTaxZone'), MSG_ERROR,
				'index.php?ToDo=viewTaxSettings'
			);
		}

		$taxRate = $this->getTaxRateById($_POST['id'], true);
		if(empty($taxRate)) {
			flashMessage(getLang('InvalidTaxRate'), MSG_ERROR,
				'index.php?ToDo=viewTaxSettings'
			);
		}

		// Update the name
		$newName = getLang('TaxRateCopyName', array(
			'name' => $taxRate['name']
		));

		// Save the tax rate with a new ID
		$taxRateId = $this->copyTaxRate($taxRate['id'], $newName);
		if(!$taxRateId) {
			flashMessage(getLang('ProblemSavingTaxRate'), MSG_ERROR);
			$this->handleToDo('editTaxRate');
			return;
		}

		// Log this action
		$this->log->logAdminAction($taxRateId, $taxRate['name'], $newName);

		flashMessage(getLang('TaxRateCopied'), MSG_SUCCESS,
			'index.php?ToDo=editTaxRate&id='.$taxRateId
		);
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:38,代码来源:class.settings.tax.php

示例5: toggleNotificacion

 public function toggleNotificacion($id)
 {
     $notificacion = Notificacion::find($id);
     if ($notificacion->user_id != Auth::user()->id) {
         Response::make('No Permitido', 403);
     }
     $notificacion->leido = $notificacion->leido == 0 ? 1 : 0;
     $notificacion->save();
     if (Request::ajax()) {
         return Response::json($notificacion, 200);
     } else {
         flashMessage('Listo');
         return Redirect::back();
     }
 }
开发者ID:seedgabo,项目名称:condominio,代码行数:15,代码来源:AjaxController.php

示例6: flashMessage

        echo $chemistErr;
        echo $msg2;
        ?>
                                </div>

                                <div class="form-group">
                                    <input type="number" class="form-control" name="strips" placeholder=" Strips Sold At Above Chemist" required="">
                                    <?php 
        echo $stripsErr;
        echo $msg2;
        ?>
                                </div>
                                <div class="form-group">
                                    <?php 
        if (!empty($exit)) {
            flashMessage('Already Submitted For The Day ', 'error');
            ?>
        <?php 
        } else {
            ?>
                                        <div class="form-group">
                                            <input type="submit" class="btn btn-primary "  name="save" value="Submit" placeholder="No of Rx">
                                        </div>

                                        <?php 
        }
        ?>
                                </div>
                            </div>
                        </form>
开发者ID:Akshayf444,项目名称:jardiance,代码行数:30,代码来源:tf_addrx.php

示例7: flashError

function flashError($message)
{
    return flashMessage($message, FLASH_ERROR);
}
开发者ID:manGoweb,项目名称:MangoPressTemplating,代码行数:4,代码来源:flashes.php

示例8: LoadChooseTemplateTab

	public function LoadChooseTemplateTab()
	{
		$installedTemplates = $this->getInstalledTemplates();
		$downloadableTemplates = $this->getDownloadableTemplates();
		if($downloadableTemplates === false) {
			flashMessage(getLang('UnableRetrieveDownloadableTemplates'), MSG_ERROR);
		}

		$templateList = $installedTemplates;
		if(is_array($downloadableTemplates)) {
			$templateList = array_merge($templateList, $downloadableTemplates);
		}
		uasort($templateList, array($this, 'sortTemplateCallback'));

		$GLOBALS['TemplateListMap'] = '';
		foreach($templateList as $template) {
			if(GetConfig('template') == $template['template'] && strtolower($template['templateColor']) == GetConfig('SiteColor')) {
				$GLOBALS['CurrentTemplateImage'] = $template['preview'];
			}

			if($template['installed']) {
				$GLOBALS['TemplateInstalledClass'] = '';
			}
			else {
				$GLOBALS['TemplateInstalledClass'] = 'Installable';
			}

			if(GetConfig('template') == $template['template'] && strtolower($template['templateColor']) == GetConfig('SiteColor')) {
				$GLOBALS['CurrentTemplateClass'] = 'TemplateBoxOn';
			}
			else {
				$GLOBALS['CurrentTemplateClass'] = '';
			}

			if($_SERVER['HTTPS'] == 'on') {
				$template['preview'] = str_replace('http://', 'https://', $template['preview']);
				$template['previewFull'] = str_replace('http://', 'https://', $template['previewFull']);
			}

			$GLOBALS['TemplateId'] = $template['template'];
			$GLOBALS['TemplateName'] = $template['templateName'];
			$GLOBALS['TemplateColor'] = $template['templateColor'];
			$GLOBALS['TemplatePreviewThumb'] = $template['preview'];
			$GLOBALS['TemplatePreviewFull'] = $template['previewFull'];

			$GLOBALS['TemplateListMap'] .= $this->template->render('layout.choosetemplate.row.tpl');
		}
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:48,代码来源:class.layout.php

示例9: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $gallery = Gallery::findOrFail($id);
     $name = $gallery->name;
     $gallery->delete();
     flashMessage("'{$name}' has been deleted.", "alert-success");
     return redirect('galleries');
 }
开发者ID:BobHumphrey,项目名称:tumblr-photos,代码行数:14,代码来源:GalleriesController.php

示例10: SendPasswordEmail

		/**
		*	Send the email to confirm the change
		*/
		private function SendPasswordEmail()
		{
			/*
				Include the email API class
			*/

			if (isset($_POST['email'])) {
				$email = $_POST['email'];

				// Does an account with the email address exist?
				if ($this->AccountWithEmailAlreadyExists($email)) {
					// Is the current password right?
					$query = sprintf("select customerid, customertoken from [|PREFIX|]customers where custconemail='%s'", $GLOBALS['ISC_CLASS_DB']->Quote($email));
					$result = $GLOBALS['ISC_CLASS_DB']->Query($query);

					if ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {

						// The account exists, let's create a new temporary token to be used to verify the email that will be sent
						$customer_id = $row['customerid'];
						$storeRandom = md5(uniqid(mt_rand(), true) . $_SERVER['HTTP_USER_AGENT'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['REQUEST_TIME']);
						$linkRandom = $this->generateCustomerHash($storeRandom, $customer_id);
						$UpdatedCustomer = array(
							"customerpasswordresettoken" => $storeRandom,
							"customerpasswordresetemail" => $email,
						);

						if ($GLOBALS['ISC_CLASS_DB']->UpdateQuery("customers", $UpdatedCustomer, "customerid='".$GLOBALS['ISC_CLASS_DB']->Quote($customer_id)."'")) {
							// Send the email
							$data = sprintf("c=%d&t=%s", $customer_id, $linkRandom);
							$link = sprintf("%s/login.php?action=change_password&%s", $GLOBALS['ShopPath'], $data);
							$store_name = GetConfig('StoreName');
							$email_message = sprintf(GetLang('ForgotPassEmailMessage'), $store_name, $link, $link);

							// Create a new email API object to send the email
							require_once(ISC_BASE_PATH . "/lib/email.php");
							$obj_email = GetEmailClass();
							$obj_email->Set('CharSet', GetConfig('CharacterSet'));
							$obj_email->From(GetConfig('OrderEmail'), $store_name);
							$obj_email->Set("Subject", sprintf(GetLang('ForgotPassEmailSubject'), $store_name));
							$obj_email->AddBody("html", $email_message);
							$obj_email->AddRecipient($email, "", "h");
							$email_result = $obj_email->Send();

							// If the email was sent ok, show a confirmation message
							if ($email_result['success']) {
								flashMessage(getLang('ForgotPassEmailSent'), MSG_SUCCESS, 'login.php#login');
							}
							else {
								// Email error
								$this->ResetPassword("internal_error");
							}
						}
						else {
							// Database error
							$this->ResetPassword("internal_error");
						}
					}
					else {
						// Bad password
						$this->ResetPassword("bad_password");
					}
				}
				else {
					// No account with that email address
					$this->ResetPassword("bad_email");
				}
			}
			else {
				$this->ResetPassword();
			}
		}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:74,代码来源:class.customer.php

示例11: flashMessage

$public->getCategory();
$categories = $public->dataCategory();
$posts = $public->getPost();
?>

	<div class="header-wrapper">
			<div class="header-container">
				<h3>Home</h3>
			</div>
		</div>

	<div class="row">
		<div class="large-12 columns">
		<?php 
if (Session::exists('index')) {
    flashMessage(Session::flash('index'));
}
?>
		<div class="row">
			<div class="large-2 columns">
				<?php 
include 'includes/Menu/categorySidebar.php';
?>
			</div>
			<div class="row">
				<div class="large-8 columns">
			<?php 
if (!Input::exists('get')) {
    echo '<h3>Articles</h3><hr>';
    $posts = $public->getPost();
    if (empty($posts)) {
开发者ID:lamwin,项目名称:bloggr,代码行数:31,代码来源:index.php

示例12: flashMessage

include 'includes/header.php';
$admin = $user->admin();
$users = $admin->allUsers();
?>

	<div class="header-wrapper">
		<div class="header-container">
			<h3>Admin Panel</h3>
		</div>
	</div>

	<div class="row">
		<div class="large-12 columns">
			<?php 
if (Session::exists('admin')) {
    flashMessage(Session::flash('admin'));
}
?>
			<div class="row">
				<div class="large-12 columns">
					<table class="hover" style="width: 100%;">
					  <thead>
					    <tr>
					      <th>Username</th>
					      <th>Email</th>
					      <th>Full Name</th>
					      <th>Location</th>
					      <th>Date Joined</th>
					      <th>Account Status</th>
					      <th></th>
					    </tr>
开发者ID:lamwin,项目名称:bloggr,代码行数:31,代码来源:adminPanel.php

示例13: editarResidencia

 public function editarResidencia()
 {
     $residencias = Residencias::lists('nombre', 'id');
     if (Input::has('nombre')) {
         $rules = array('nombre' => 'required|min:4|max:50', 'cant_personas' => 'required|numeric|min:0', 'persona_id_propietario' => 'required|numeric|exists:personas,id');
         $validation = Validator::make(Input::except('_token'), $rules);
         if ($validation->fails()) {
             return Redirect::to('perfil')->withResidencias($residencias)->withErrors($validation);
         } else {
             Residencias::find(Auth::user()->residencia_id)->Update(Input::except('_token'));
             flashMessage("Residencia Actualizada Correctamente");
             return Redirect::to("ver-residencia");
         }
     }
 }
开发者ID:seedgabo,项目名称:condominio,代码行数:15,代码来源:HomeController.php

示例14: destroy

 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $photo = Photo::findOrFail($id);
     $id = $photo->id;
     $photo->delete();
     flashMessage("Photo with ID {$id} has been deleted.", "alert-success");
     return redirect('photos/list');
 }
开发者ID:BobHumphrey,项目名称:tumblr-photos,代码行数:14,代码来源:PhotosController.php

示例15: AddReorderItems

	private function AddReorderItems()
	{
		$this->ValidateReorder();
		if (isset($_REQUEST['reorderitem'])) {
			$OrdProdIds = implode(',', array_keys($_REQUEST['reorderitem']));
			$QueryWhere = "op.orderprodid IN (".$GLOBALS['ISC_CLASS_DB']->Quote($OrdProdIds).")";
		} else if (isset($_REQUEST['orderid'])) {
			$QueryWhere = "op.orderorderid = ".(int)$_REQUEST['orderid'];
		}

		$orderItems = array();

		// Grab any configurable fields
		$configurableFields = array();
		$query = "
			SELECT ocf.*, op.orderprodid
			FROM [|PREFIX|]order_configurable_fields ocf
			JOIN [|PREFIX|]order_products op ON (op.orderprodid = ocf.ordprodid)
		";
		$result = $GLOBALS['ISC_CLASS_DB']->query($query);
		while($field = $GLOBALS['ISC_CLASS_DB']->fetch($result)) {
			if(!isset($configurableFields['ordprodid'])) {
				$configurableFields[$field['orderprodid']] = array();
			}

			$configurableFields[$field['orderprodid']][] = $field;
		}

		$query = "
			SELECT *
			FROM [|PREFIX|]order_products op
			WHERE ".$QueryWhere;
		$result = $GLOBALS['ISC_CLASS_DB']->query($query);
		while($row = $GLOBALS['ISC_CLASS_DB']->fetch($result)) {
			try {
				$quote = getCustomerQuote();
				$item = new ISC_QUOTE_ITEM;
				$item
					->setQuote($quote)
					->setProductId($row['ordprodid'])
					->setQuantity($row['ordprodqty'])
					->setVariation($row['ordprodvariationid'])
				;
				if($row['ordprodeventdate']) {
					$item
						->setEventDate($row['ordprodeventdate'])
						->setEventName($row['ordprodeventname']);
				}

				if($row['ordprodwrapid']) {
					$wrappingOptions = array(
						'all' => $row['ordprodwrapid']
					);
					$wrappingMessage = array(
						'all' => $row['ordprodwrapmessage']
					);
					$item->applyGiftWrapping('same', $wrappingOptions, $wrappingMessage);
				}

				$configuredFields = array();
				if(!empty($configurableFields[$row['orderprodid']])) {
					$configuration = $configurableFields[$row['orderprodid']];
					foreach($configuration as $field) {
						if($field['fieldtype'] == 'file') {
							$filePath = ISC_BASE_PATH.'/'.getConfig('ImageDirectory').'/configured_products/'.$field['filename'];
							$fileTmpPath = ISC_BASE_PATH.'/'.GetConfig('ImageDirectory').'/configured_products_tmp/'.$field['filename'];

							// Copy the field to the temp directory
							if(!@copy($filePath, $fileTmpPath)) {
								flashMessage(getLang('ConfigurableFileCantBeMoved'), MSG_ERROR, 'cart.php');
							}

							// Add it to the configuration
							$configuredFields[$field['fieldid']] = array(
								'name' => $field['originalfilename'],
								'type' => $field['filetype'],
								'size' => filesize($filePath),
								'existingPath' => $fileTmpPath,
							);
						}
						else {
							$configuredFields[$field['fieldid']] = $field['textcontents'];
						}
					}

					$item->applyConfiguration($configuredFields);
				}

				$quote->addItem($item);
			}
			catch(ISC_QUOTE_EXCEPTION $e) {
				flashMessage($e->getMessage(), MSG_ERROR);
				$hasErrors = true;
			}
		}

		redirect('cart.php');
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:98,代码来源:class.cart.php


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