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 . '…', 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; }
/** * 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; }
/** * 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); }
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');
<?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’ve found the right place. Simply fill in the details below, and you’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
function comment_form_notifications() { return Notify::read(); }