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


PHP Alert::show方法代码示例

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


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

示例1: defined

<?php

defined('SYSPATH') or die('No direct script access.');
echo Alert::show();
echo Form::errors();
?>

<table class="table table-bordered">
	<tr>
		
		<th><?php 
echo __('Category');
?>
</th>
		<th><?php 
echo __('Location');
?>
</th>
		<th><?php 
echo __('Min Price');
?>
</th>
		<th><?php 
echo __('Max Price');
?>
</th>
		<th><?php 
echo __('Created');
?>
</th>
		<th>
开发者ID:Wildboard,项目名称:WbWebApp,代码行数:31,代码来源:subscriptions.php

示例2: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     $args = $this->getArgs($argstr, $request);
     $user =& $request->_user;
     if (isa($request, 'MockRequest')) {
         return '';
     }
     if (!$request->isActionPage($request->getArg('pagename')) and (!isset($user->_prefs->_method) or !in_array($user->_prefs->_method, array('ADODB', 'SQL'))) or in_array($request->getArg('action'), array('zip', 'ziphtml', 'dumphtml')) or isa($user, '_ForbiddenUser')) {
         $no_args = $this->getDefaultArguments();
         // ?
         //            foreach ($no_args as $key => $value) {
         //                $no_args[$value] = false;
         //            }
         $no_args['errmsg'] = HTML(HTML::h2(_("Error: The user HomePage must be a valid WikiWord. Sorry, UserPreferences cannot be saved."), HTML::hr()));
         $no_args['isForm'] = false;
         return Template('userprefs', $no_args);
     }
     $userid = $user->UserName();
     if ($user->isAuthenticated() and !empty($userid)) {
         $pref =& $request->_prefs;
         $args['isForm'] = true;
         //trigger_error("DEBUG: reading prefs from getPreferences".print_r($pref));
         if ($request->isPost()) {
             $errmsg = '';
             $delete = $request->getArg('delete');
             if ($delete and $request->getArg('verify')) {
                 // deleting prefs, verified
                 $default_prefs = $pref->defaultPreferences();
                 $default_prefs['userid'] = $user->UserName();
                 $user->setPreferences($default_prefs);
                 $request->_setUser($user);
                 $request->setArg("verify", false);
                 $request->setArg("delete", false);
                 $alert = new Alert(_("Message"), _("Your UserPreferences have been successfully deleted."));
                 $alert->show();
                 return;
             } elseif ($delete and !$request->getArg('verify')) {
                 return HTML::form(array('action' => $request->getPostURL(), 'method' => 'post'), HiddenInputs(array('verify' => 1)), HiddenInputs($request->getArgs()), HTML::p(_("Do you really want to delete all your UserPreferences?")), HTML::p(Button('submit:delete', _("Yes"), 'delete'), HTML::Raw('&nbsp;'), Button('cancel', _("Cancel"))));
             } elseif ($rp = $request->getArg('pref')) {
                 // replace only changed prefs in $pref with those from request
                 if (!empty($rp['passwd']) and $rp['passwd2'] != $rp['passwd']) {
                     $errmsg = _("Wrong password. Try again.");
                 } else {
                     //trigger_error("DEBUG: reading prefs from request".print_r($rp));
                     //trigger_error("DEBUG: writing prefs with setPreferences".print_r($pref));
                     if (empty($rp['passwd'])) {
                         unset($rp['passwd']);
                     }
                     // fix to set system pulldown's. empty values don't get posted
                     if (empty($rp['theme'])) {
                         $rp['theme'] = '';
                     }
                     if (empty($rp['lang'])) {
                         $rp['lang'] = '';
                     }
                     $num = $user->setPreferences($rp);
                     if (!empty($rp['passwd'])) {
                         $passchanged = false;
                         if ($user->mayChangePass()) {
                             if (method_exists($user, 'storePass')) {
                                 $passchanged = $user->storePass($rp['passwd']);
                             }
                             if (!$passchanged and method_exists($user, 'changePass')) {
                                 $passchanged = $user->changePass($rp['passwd']);
                             }
                             if ($passchanged) {
                                 $errmsg = _("Password updated.");
                             } else {
                                 $errmsg = _("Password was not changed.");
                             }
                         } else {
                             $errmsg = _("Password cannot be changed.");
                         }
                     }
                     if (!$num) {
                         $errmsg .= " " . _("No changes.");
                     } else {
                         $request->_setUser($user);
                         $pref = $user->_prefs;
                         $errmsg .= sprintf(_("%d UserPreferences fields successfully updated."), $num);
                     }
                 }
                 $args['errmsg'] = HTML(HTML::h2($errmsg), HTML::hr());
             }
         }
         $args['available_themes'] = listAvailableThemes();
         $args['available_languages'] = listAvailableLanguages();
         return Template('userprefs', $args);
     } else {
         // wrong or unauthenticated user
         return $request->_notAuthorized(WIKIAUTH_BOGO);
         //return $user->PrintLoginForm ($request, $args, false, false);
     }
 }
开发者ID:pombredanne,项目名称:tuleap,代码行数:94,代码来源:UserPreferences.php

示例3:

@layout('layouts.main')
@section('content')
<?php 
//echo __('user.user_not_activated');
if ($errors->has('user_alert')) {
    $alert_message = $errors->first('user_alert');
    $alert_type = $errors->has('alert_type') ? $errors->first('alert_type') : Alert::INFO;
    echo Alert::show($alert_type, $alert_message)->block();
}
echo Former::horizontal_open()->id('resetPasswordForm')->secure()->rules(array('password' => 'required', 'repeat_password' => 'required|same:password'))->method('POST');
?>
{{Former::token();}}
{{Former::hidden("hash64", $hash64)}}
{{Former::password("password", "Password")->appendIcon('aw_key')}}
{{Former::password("repeat_password", "Repeat Password")->appendIcon('aw_key')}}
<?php 
echo \Former::actions(Former::primary_submit('Reset Password'));
?>
{{Former::close()}}
@endsection
开发者ID:rajakhoury,项目名称:laravel-skeleton,代码行数:20,代码来源:reset_password.blade.php

示例4: strtolower

 function do_action(&$request, $args)
 {
     $method = strtolower('_do_' . str_replace('-', '_', $args['action']));
     if (!method_exists($this, $method)) {
         return $this->error("Bad action");
     }
     $message = call_user_func(array(&$this, $method), $request, $args);
     // display as seperate page or as alert?
     $alert = new Alert(_("WikiAdminUtils says:"), $message, array(_("Okay") => $args['return_url']));
     $alert->show();
     // noreturn
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:12,代码来源:WikiAdminUtils.php

示例5: Alert

<?php

/**
 * Created by PhpStorm.
 * User: Julien
 * Date: 29/01/16
 * Time: 12:40
 */
?>



<div class="container">

    <?php 
//If user connects for the first time
if ($user->getUserStatus() == 2) {
    $message = new Alert("success", false);
    $message->addText('<p>Welcome ' . $user->getFirstName() . '!</p><p>Before your registration is fully completed, we need few more details...</p>');
    $message->show();
}
?>



</div>
开发者ID:JhumanJ,项目名称:Unisales,代码行数:26,代码来源:view.home.logged.php

示例6: run

 function run($dbi, $argstr, &$request, $basepage)
 {
     $args = $this->getArgs($argstr, $request);
     if (isa($request, 'MockRequest')) {
         return '';
     }
     $user =& $request->_user;
     $post_args = $request->getArg('admin_reset');
     $userid = $request->getArg('user');
     $isadmin = $user->isAdmin();
     if ($request->isPost()) {
         if (!$userid) {
             $alert = new Alert(_("Warning:"), _("You need to specify the userid!"));
             $alert->show();
             return $this->doForm($request);
         }
         @($reset = $post_args['reset']);
         if ($reset and $userid and !empty($post_args['verify'])) {
             if ($user->isAdmin()) {
                 return $this->doReset($userid);
             } else {
                 return $this->doEmail($request, $userid);
             }
         } elseif ($reset and empty($post_args['verify'])) {
             $buttons = HTML::p(Button('submit:admin_reset[reset]', $isadmin ? _("Yes") : _("Send email"), $isadmin ? 'wikiadmin' : 'button'), HTML::Raw('&nbsp;'), Button('submit:admin_reset[cancel]', _("Cancel"), 'button'));
             $header = HTML::strong("Verify");
             if (!$user->isAdmin()) {
                 // check for email
                 if ($userid == $user->UserName() and $user->isAuthenticated()) {
                     $alert = new Alert(_("Already logged in"), HTML(fmt("Changing passwords is done at "), WikiLink(_("UserPreferences"))));
                     $alert->show();
                     return;
                 }
                 $thisuser = WikiUser($userid);
                 $prefs = $thisuser->getPreferences();
                 $email = $prefs->get('email');
                 if (!$email) {
                     $alert = new Alert(_("Error"), HTML(fmt("No email stored for user %s.", $userid), HTML::br(), fmt("You need to ask an Administrator to reset this password. See below: "), HTML::br(), WikiLink(ADMIN_USER)));
                     $alert->show();
                     return;
                 }
                 $verified = $thisuser->_prefs->_prefs['email']->getraw('emailVerified');
                 if (!$verified) {
                     $header->pushContent(HTML::br(), "Warning: This users email address is unverified!");
                 }
             }
             return $this->doForm($request, $header, HTML(HTML::hr(), fmt("Do you really want to reset the password of user %s?", $userid), $isadmin ? '' : _("An email will be sent."), HiddenInputs(array('admin_reset[verify]' => 1, 'user' => $userid)), $buttons));
         } else {
             return $this->doForm($request);
         }
     } else {
         return $this->doForm($request);
     }
 }
开发者ID:neymanna,项目名称:fusionforge,代码行数:54,代码来源:PasswordReset.php


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