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


PHP Notify::read方法代码示例

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


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

示例1: do_private_post

function do_private_post($content, $results)
{
    global $config, $speak;
    $results = Mecha::O($results);
    $results = $config->is->post ? Get::postHeader($results->path, POST . DS . $config->page_type, '/', $config->page_type . ':') : false;
    if ($results === false) {
        return $speak->plugin_private_post->description;
    }
    $s = isset($results->fields->pass) ? $results->fields->pass : "";
    if (strpos($s, ':') !== false) {
        $s = explode(':', $s, 2);
        if (isset($s[1])) {
            $speak->plugin_private_post->hint = ltrim($s[1]);
        }
        // override password hint
        $s = $s[0];
    }
    $hash = md5($s . PRIVATE_POST_SALT);
    $html = Notify::read(false) . '<div class="overlay--' . File::B(__DIR__) . '"></div><form class="form--' . File::B(__DIR__) . '" action="' . $config->url . '/' . File::B(__DIR__) . '/do:access" method="post">' . NL;
    $html .= TAB . Form::hidden('token', Guardian::token()) . NL;
    $html .= TAB . Form::hidden('_', $hash) . NL;
    $html .= TAB . Form::hidden('kick', $config->url_current) . NL;
    $html .= TAB . '<p>' . $speak->plugin_private_post->hint . '</p>' . NL;
    $html .= TAB . '<p>' . Form::text('access', "", $speak->password . '&hellip;', array('autocomplete' => 'off')) . ' ' . Form::button($speak->submit, null, 'submit') . '</p>' . NL;
    $html .= '</form>' . O_END;
    if ($results && isset($results->fields->pass) && trim($results->fields->pass) !== "") {
        if (!Guardian::happy() && Session::get('is_allow_post_access') !== $hash) {
            return $html;
        }
    }
    return $content;
}
开发者ID:tovic,项目名称:private-post-plugin-for-mecha-cms,代码行数:32,代码来源:launch.php

示例2: cargo

 /**
  * Default Shortcut Variable(s)
  * ----------------------------
  */
 public static function cargo()
 {
     $config = Config::get();
     $token = Guardian::token();
     $results = array('config' => $config, 'speak' => $config->speak, 'articles' => $config->articles, 'article' => $config->article, 'pages' => $config->pages, 'page' => $config->page, 'pager' => $config->pagination, 'manager' => Guardian::happy(), 'token' => $token, 'messages' => Notify::read(false), 'message' => Notify::read(false));
     Session::set(Guardian::$token, $token);
     unset($config, $token);
     self::$lot = array_merge(self::$lot, $results);
     return self::$lot;
 }
开发者ID:AdeHaze,项目名称:mecha-cms,代码行数:14,代码来源:shield.php

示例3: cargo

 /**
  * Default Shortcut Variable(s)
  * ----------------------------
  */
 public static function cargo()
 {
     $config = Config::get();
     $token = Guardian::token();
     $message = Notify::read();
     $results = array('config' => $config, 'speak' => $config->speak, 'articles' => $config->articles, 'article' => $config->article, 'pages' => $config->pages, 'page' => $config->page, 'responses' => $config->responses, 'response' => $config->response, 'files' => $config->files, 'file' => $config->file, 'pager' => $config->pagination, 'manager' => Guardian::happy(), 'token' => $token, 'messages' => $message);
     Session::set(Guardian::$token, $token);
     Session::set(Notify::$message, $message);
     unset($config, $token, $message);
     return array_merge($results, self::$lot);
 }
开发者ID:razordaze,项目名称:mecha-cms,代码行数:15,代码来源:shield.php

示例4: function

         Input::flash();
         Notify::error($errors);
         return Response::redirect('admin/users/edit/' . $id);
     }
     if ($password_reset) {
         $input['password'] = Hash::make($input['password']);
     }
     User::update($id, $input);
     Notify::success(__('users.updated'));
     return Response::redirect('admin/users/edit/' . $id);
 });
 /*
 	Add user
 */
 Route::get('admin/users/add', function () {
     $vars['messages'] = Notify::read();
     $vars['token'] = Csrf::token();
     $vars['statuses'] = array('inactive' => __('global.inactive'), 'active' => __('global.active'));
     $vars['roles'] = array('administrator' => __('global.administrator'), 'editor' => __('global.editor'), 'user' => __('global.user'));
     return View::create('users/add', $vars)->partial('header', 'partials/header')->partial('footer', 'partials/footer');
 });
 Route::post('admin/users/add', function () {
     $input = Input::get(array('username', 'email', 'real_name', 'password', 'bio', 'status', 'role'));
     $validator = new Validator($input);
     $validator->check('username')->is_max(3, __('users.username_missing', 2));
     $validator->check('email')->is_email(__('users.email_missing'));
     $validator->check('password')->is_max(6, __('users.password_too_short', 6));
     if ($errors = $validator->errors()) {
         Input::flash();
         Notify::error($errors);
         return Response::redirect('admin/users/add');
开发者ID:pmachowski,项目名称:pm-cms,代码行数:31,代码来源:users.php

示例5: uri_to

<?php

echo $header;
?>

<section class="content">
	<article>
		<h1>Hello. Willkommen. Bonjour. Croeso.</h1>

		<p>If you were looking for a truly lightweight blogging experience, you&rsquo;ve
		found the right place. Simply fill in the details below, and you&rsquo;ll have your
		new blog set up in no time.</p>

		<?php 
echo Notify::read();
?>
	</article>

	<form method="post" action="<?php 
echo uri_to('start');
?>
" autocomplete="off">

		<fieldset>
			<p>
				<label for="lang">
					<strong>Language</strong>
					<span class="info">Anchor's language.</span>
				</label>
				<select id="lang" class="chosen-select" name="language">
					<?php 
开发者ID:anchorcms,项目名称:anchor-cms,代码行数:31,代码来源:start.php

示例6: comment_form_notifications

function comment_form_notifications()
{
    return Notify::read();
}
开发者ID:silviuu,项目名称:blg,代码行数:4,代码来源:comments.php


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