本文整理汇总了PHP中flashMessage函数的典型用法代码示例。如果您正苦于以下问题:PHP flashMessage函数的具体用法?PHP flashMessage怎么用?PHP flashMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了flashMessage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: catch
$errors[] = 'Your username or password is incorrect';
}
} catch (Exception $e) {
die($e->getMessage());
}
}
}
}
include 'includes/header.php';
?>
<div class="row">
<div class="large-12 columns">
<?php
if (Session::exists('login')) {
flashMessage(Session::flash('login'));
}
if (Session::exists('alert')) {
flashAlert(Session::flash('alert'));
}
?>
</div>
</div>
<div class="register-card">
<h3>Log In</h3>
<div class="row">
<div class="large-12 columns">
<form action="" method="POST">
<label for="username"><h5>Username <span class="required">*</span></h5>
<input type="text" id="username" name="username">
开发者ID:lamwin,项目名称:bloggr,代码行数:31,代码来源:login.php
示例17: reassigncategory
/**
* Reassigns products and deletes selected categories.
*
* @return void
**/
public function reassigncategory()
{
// Sanitise input.
$newCat = (int) $_POST['parentCat'];
$categories = array();
foreach ($_POST['categories'] as $c) {
$categories[(int) $c] = '';
}
$res = true;
$reassign = false;
if ($_POST['reassign'] == 'true') {
$reassign = true;
}
if ($reassign) {
// Reassign exclusive products to new category.
foreach ($_POST['products'] as $p) {
$values = array(
'productid' => (int) $p,
'categoryid' => $newCat,
);
$res = $this->db->insertQuery("categoryassociations", $values);
if ($res == false) {
break;
}
}
}
if ($res) {
// Delete selected categories.
$res = $this->deleteCategory($categories, false);
}
if ($res) {
if ($reassign) {
flashMessage(getLang('ReassignSuccessFlashMsg'), MSG_SUCCESS);
} else {
flashMessage(getLang('CatDeletedSuccessfully'), MSG_SUCCESS);
}
} else {
flashMessage(getLang('ReassignErrorFlashMsg'), MSG_ERROR);
}
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:49,代码来源:class.category.php
示例18: session_start
<?php
require_once "./includes/initialize.php";
session_start();
$tf_id = $_SESSION['taskforce'];
$doctor = tf_doc::list_doctor($tf_id);
if (isset($_GET['delete_doc'])) {
$field_array = array('doc_id' => $_GET['delete_doc']);
// $field_array = array('id' => $id);
$del_doc = new tf_doc();
$del_doc->delete($field_array, 'tf_doc');
flashMessage(' Deleted Successfully.', 'Success');
}
require_once './header.php';
if (isset($_SESSION['message'])) {
echo $_SESSION['message'];
unset($_SESSION['message']);
}
?>
<style>
.bgc-fff {
background-color: #9DC7E0!important;
}
.box-shad {
-webkit-box-shadow: 1px 1px 0 rgba(0,0,0,.2);
box-shadow: 1px 1px 0 rgba(0,0,0,.2);
}
.brdr {
border: 1px solid #ededed;
}
开发者ID:Akshayf444,项目名称:jardiance,代码行数:31,代码来源:tf_view.php
示例19: User
$user = new User();
require_once 'core/checkLogin.php';
include 'includes/header.php';
$blogger = $user->blogger();
$posts = $blogger->getPost();
?>
<div class="header-wrapper">
<div class="header-container">
<h3>Dashboard</h3>
</div>
</div>
<div class="row">
<div class="large-12 columns">
<?php
if (Session::exists('home')) {
flashMessage(Session::flash('home'));
}
?>
<div class="row">
<div class="large-2 columns">
<?php
include 'includes/Menu/sidebar.php';
?>
</div>
<div class="large-10 columns">
<?php
if (empty($posts)) {
echo '<h5>You currently don\'t have any post!</h5>';
} else {
foreach ($posts as $post) {
?>
开发者ID:lamwin,项目名称:bloggr,代码行数:31,代码来源:dashboard.php
示例20: restoreGiftCertificate
private function restoreGiftCertificate()
{
$id = !empty($_REQUEST['id']) ? $_REQUEST['id'] : null;
$editGiftCertificateUrl = 'index.php?ToDo=viewTemplates&forceTab=7';
if(!$theme = ISC_GIFTCERTIFICATE_THEME::findById($id)) {
$message = getLang('GiftCertificateRestoreErrorInvalid');
flashMessage($message, MSG_ERROR, $editGiftCertificateUrl);
return;
}
// Replacements for the success and fail messages
$replacements = array('name' => $theme->name);
if($theme->restoreFromMaster()) {
$message = getLang('GiftCertificateRestored', $replacements);
flashMessage($message, MSG_SUCCESS, $editGiftCertificateUrl);
return;
}
$message = getLang('GiftCertificateRestoreError', $replacements);
flashMessage($message, MSG_ERROR, $editGiftCertificateUrl);
}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:24,代码来源:class.giftcertificates.php
注:本文中的flashMessage函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论