本文整理汇总了PHP中get_message函数的典型用法代码示例。如果您正苦于以下问题:PHP get_message函数的具体用法?PHP get_message怎么用?PHP get_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_message函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
$this->load->model("access_manager_model");
$this->load->model("user_manager_model");
$this->load->model("module_manager_model");
$this->lang->load('ae_access', $this->selected_lang);
$this->data['message'] = get_message();
$this->data['users_info'] = $this->user_manager_model->get_all_users_info();
$this->data['modules_info'] = $this->module_manager_model->get_all_modules_info($this->selected_lang);
if ($this->input->post()) {
$this->lang->load('error', $this->selected_lang);
if ($this->input->post('post_type') === "user_access") {
$this->change_user_access();
}
if ($this->input->post('post_type') === "module_access") {
$this->change_module_access();
}
}
$this->data['selected_user_id'] = $this->session->flashdata('selected_user_id');
$this->data['selected_module_id'] = $this->session->flashdata('selected_module_id');
$this->data['access_info'] = array();
foreach ($this->data['users_info'] as $user) {
$user_id = $user['user_id'];
$modules = $this->access_manager_model->get_user_modules($user_id);
foreach ($modules as $module) {
$this->data['access_info'][$user_id][$module] = 1;
}
}
$this->data['lang_pages'] = get_lang_pages(get_link("admin_access", TRUE));
$this->data['header_title'] = $this->lang->line("access_levels");
$this->send_admin_output("access");
return;
}
示例2: index
public function index()
{
$this->data['message'] = get_message();
$this->lang->load('ce_home', $this->selected_lang);
$this->data['lang_pages'] = get_lang_pages(get_link("home_url", TRUE));
$this->data['header_title'] .= $this->lang->line("header_title");
$this->data['header_meta_description'] .= $this->lang->line("header_meta_description");
$this->data['header_meta_keywords'] .= $this->lang->line("header_meta_keywords");
$this->data['header_canonical_url'] = get_link("home_url");
$this->send_customer_output("home");
return;
}
示例3: get_all_javascript_messages
function get_all_javascript_messages()
{
$js_messages = ' <script type="text/javascript">' . PHP_EOL;
$js_messages .= ' var messages = new Object()' . PHP_EOL;
$js_messages .= ' messages[\'Record\']=\'' . get_message('Record<br>audio') . '\';' . PHP_EOL;
$js_messages .= ' messages[\'Rerecord\']=\'' . get_message('Re-record<br>audio') . '\';' . PHP_EOL;
$js_messages .= ' messages[\'You are doing task \']=\'' . get_message('You are doing task ') . '\';' . PHP_EOL;
$js_messages .= ' messages[\'Log out after...\']=\'' . get_message('Log out after the upload has finished and fill the feedback form!') . '\';' . PHP_EOL;
$js_messages .= ' messages[\'Thats it\']=\'' . get_message('That\'s it! Thanks for your support!') . '\';' . PHP_EOL;
$js_messages .= ' messages[\'Stop<br>and upload\']=\'' . get_message('Stop<br>and upload') . '\';' . PHP_EOL;
$js_messages .= ' messages[\'Listen\']=\'' . get_message('Listen') . '\';' . PHP_EOL;
$js_messages .= ' messages[\'Stop\']=\'' . get_message('Stop') . '\';' . PHP_EOL;
$js_messages .= '</script>' . PHP_EOL;
return $js_messages;
}
示例4: index
public function index()
{
$this->lang->load('ae_constant', $this->selected_lang);
if ($this->input->post()) {
if ($this->input->post("post_type") === "constants_list") {
return $this->modify_constants();
}
if ($this->input->post("post_type") === "add_constant") {
return $this->add_constant();
}
}
$this->data['message'] = get_message();
$this->data['constants'] = $this->constant_manager_model->get_all();
$this->data['lang_pages'] = get_lang_pages(get_link("admin_constant", TRUE));
$this->data['header_title'] = $this->lang->line("constants");
$this->send_admin_output("constant");
return;
}
示例5: get_account
function get_account()
{
if ($_POST && isset($_POST['retrieve']) && $_POST['retrieve'] == 'password') {
$this->form_validation->set_rules('username', 'Username', 'required');
} elseif ($_POST && isset($_POST['retrieve']) && $_POST['retrieve'] == 'username') {
$this->form_validation->set_rules('email', 'Email', 'required');
}
$this->form_validation->set_rules('retrieve', 'Account', 'required');
$this->form_validation->set_error_delimiters('<span class="error error_span">', '</span>');
if ($this->form_validation->run() == FALSE) {
$this->load->view('retrieve-account');
} else {
if ($user = $this->Customer_model->retrieve_account($this->input->post())) {
if ($email = get_message('forget-password')) {
if ($this->session->userdata('language') == 'french') {
$message = $email->message_text_fr;
$title = $email->message_title_fr;
} else {
$message = $email->message_text;
$title = $email->message_title;
}
$message = str_replace('{FIRSTNAME}', $user->user_firstname, $message);
$message = str_replace('{LASTNAME}', $user->user_lastname, $message);
$message = str_replace('{USERNAME}', $user->user_name, $message);
$message = str_replace('{PASSWORD}', $user->user_password, $message);
$message = str_replace("\n", '<br/>', $message);
$this->load->library('email');
$email_config['mailtype'] = 'html';
$email_config['protocol'] = 'mail';
$this->email->initialize($email_config);
$this->email->from('myaccount@memorialflowers.ca', '1-800-Flowers');
$this->email->to($user->user_email);
$this->email->subject($title);
$this->email->message($message);
$this->email->send();
$this->load->view('password-sent');
}
} else {
$data['message'] = 'Sorry this account does not exists!';
$this->load->view('retrieve-account', $data);
}
}
}
示例6: __construct
public function __construct()
{
try {
parent::__construct();
$this->data['title'] = addslashes(t("Generate MVC"));
//Browser Title
//Define Errors Here//
$this->cls_msg = array();
$this->cls_msg["no_result"] = get_message('no_result');
$this->cls_msg["save_err"] = get_message('save_failed');
$this->cls_msg["save_succ"] = get_message('save_success');
$this->cls_msg["delete_err"] = get_message('del_failed');
$this->cls_msg["delete_succ"] = get_message('del_success');
//end Define Errors Here//
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
$this->load->helper('basic_text_template');
$this->data['BREADCRUMB'] = array(addslashes(t('Generate MVC Depending on Database Table')));
} catch (Exception $err_obj) {
show_error($err_obj->getMessage());
}
}
示例7: __construct
public function __construct()
{
try {
parent::__construct();
$this->data['title'] = addslashes(t("Generate MVC"));
//Browser Title
//Define Errors Here//
$this->cls_msg = array();
$this->cls_msg["no_result"] = get_message('no_result');
$this->cls_msg["save_err"] = get_message('save_failed');
$this->cls_msg["save_succ"] = get_message('save_success');
$this->cls_msg["delete_err"] = get_message('del_failed');
$this->cls_msg["delete_succ"] = get_message('del_success');
//end Define Errors Here//
$this->pathtoclass = admin_base_url() . $this->router->fetch_class() . "/";
$this->load->helper('basic_text_template');
$this->data['BREADCRUMB'] = array(addslashes(t('Generate MVC Depending on Database Table')));
$this->form_field_type = array('text' => 'Text', 'password' => 'Password', 'textarea' => 'Textarea', 'select' => 'Drop Down', 'radio' => 'Radio', 'checkbox' => 'Checkbox', 'file' => 'File Upload');
$this->data['form_field_type'] = $this->form_field_type;
$this->tbl_prefix = $this->db->tableprefix;
} catch (Exception $err_obj) {
show_error($err_obj->getMessage());
}
}
示例8: trim
$wechat = $_POST['wechat'];
$blog = $_POST['blog'];
$github = $_POST['github'];
//$native = "西安";
$native = null;
$grade = trim($grade);
$workplace = trim($workplace);
$userObj = new UserClass();
print $userObj->update_userinfo($uid, $phone, $mail, $qq, $wechat, $blog, $github, $native, $major, $workplace, $job);
exit;
case 'refresh_activity':
$mid = $_POST['mid'];
$uid = $_POST['uid'];
$result = "";
for ($i = 0; $i < 5; ++$i) {
$b = get_message($uid, $mid, $i);
if ($b == 'false') {
if ($result == "") {
$result = 'false';
}
break;
}
$result .= $b;
}
print $result;
exit;
default:
return;
}
function get_message($uid, $mid, $start)
{
示例9: check_password
<?php
$login_message = null;
if (!isset($_SESSION['username'])) {
/* Password checking implementation left outside the project */
/* for obvious security reasons (i.e. I'm not good in this so */
/* I'd rather not publicly display specific vulnerabilities. */
/* passwords.php must include a function "check_password" */
/* that takes a username and password and returns true or false */
require 'passwords.php';
if (isset($_POST['username'])) {
if (isset($_POST['password'])) {
$user = check_password($_POST['username'], $_POST['password'], $db);
if ($user) {
$name = $user['username'];
$_SESSION['user'] = $user;
$_SESSION['username'] = $name;
$_SESSION['userclass'] = $user['class'];
$login_message = get_message('Successful login') . "<b>" . $name . "</b>. <a href=logout.php>" . get_message('Log out here.') . "</a>";
} else {
$login_message = get_message('Unsuccessful login');
}
}
}
} else {
$user = $_SESSION['user'];
$name = $_SESSION['username'];
$login_message = get_message('You\'re logged in as ') . "<b>" . $name . "</b>. <a href=logout.php>" . get_message('Log out here.') . "</a>";
}
示例10: show_message
function show_message($type, $message)
{
echo get_message($type, $message);
flush();
}
示例11: open_session
/*
* logout.php
*
* Copyright 2015 Álvaro Castillo <midgoon@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
*/
require_once __DIR__ . "/../../session.php";
require_once __DIR__ . "/../../moneyio.php";
open_session();
if (empty($_SESSION) && isset($_SESSION)) {
echo get_message("logout_not_done");
} else {
close_session();
echo get_message("logout");
}
示例12: array
$form_hidden = array(sha1("editcurriculumtype") => sha1(random_string("alnum", 5)));
echo form_open("dashboard/curriculums/settings/types/" . ($curriculumtypeinfo ? $curriculumtypeinfo->getCurriculumtypeid() : 0) . "/edit", $form_attr, $form_hidden);
?>
<div class="form-group <?php
echo has_error("curriculumType") ? "has-error" : (has_success("curriculumType") ? "has-success" : "");
?>
">
<label for="curriculumTypeinput" class="col-sm-4 control-label">Curriculum type</label>
<div class="col-sm-8">
<input name="curriculumType" type="text" id="curriculumTypeinput" class="form-control" value="<?php
echo set_value("curriculumType", $curriculumtypeinfo ? $curriculumtypeinfo->curriculum_type : "");
?>
" />
<?php
echo has_message("curriculumType") ? '<span class="help-block">' . get_message("curriculumType") . '</span>' : "";
?>
</div>
</div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4">
<button name="saveUpdatecurriculumtype" type="submit" class="btn btn-primary"> Save </button>
<a href="<?php
echo site_url("dashboard/curriculums/settings/types");
?>
" id="cancelUpdatecurriculumtype" class="btn btn-danger rounded-corners-4px"> Cancel </a>
<div>
</div>
</form>
</div>
示例13: get_message
<p><h3>Nombre</h3> <strong><?php
echo $user_info->name;
?>
</strong></p>
<p><h3>Apellidos</h3> <strong><?php
echo $user_info->surname;
?>
</strong></p>
<p><h3>Acerca de mí</h3> <strong><?php
echo $user_info->aboutme;
?>
</strong></p>
<p><h3>Número de teléfono</h3><strong> <?php
echo $user_info->phone_number;
?>
</strong></p>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<img id="default-profile-img" src="../../mio-frontend/images/<?php
echo $picture;
?>
" class="img-responsive img-circle">
</div>
</div>
</div>
<?php
} else {
echo get_message("no_session");
}
示例14: array
<?php
$username = array('name' => 'usernamefield', 'value' => set_value("usernamefield"), 'class' => 'text-center form-control', 'placeholder' => 'Username');
echo form_input($username);
?>
<span class=" input-group-btn form-field-clear-btn-group" id="username-field-clear-btn-group" >
<button disabled data-target="username" id="username-field-clear-btn" class="form-field-clear-btn btn btn-default" type="button">
<i class="fa fa-times text-danger"></i>
</button>
</span>
</div>
<span id="usernamefield-help-block" class="margin-bottom-0 padding-left-50 <?php
echo has_message("usernamefield") ? "" : "sr-only";
?>
help-block"> <i class=" fa fa-exclamation-circle"></i> <span id="usernamefield-message"><?php
echo has_message("usernamefield") ? get_message("usernamefield") : "";
?>
</span></span>
</div>
<hr class="margin-top-0 margin-left-15 margin-right-15">
<div class="margin-bottom-0 form-group form-field-form-group <?php
echo has_error("passwordfield") ? "has-error" : (has_success("passwordfield") ? "has-success" : "");
?>
" id="password-field-form-group">
<div class="input-group">
<span class="input-group-btn">
<button id="password-field-btn" class="form-field-btn btn <?php
echo has_error("passwordfield") ? "btn-danger" : (has_success("passwordfield") ? "btn-success" : "btn-default");
?>
" type="button" onclick="this.form.passwordfield.select();">
示例15: has_value
<input value="<?php
echo has_value("cssubjectUnit") ? get_value("cssubjectUnit") : set_value("cssubjectUnit", 0);
?>
" type="text" class="form-control" name="cssubjectUnit" id="subjectUnitinput" data-max="10" data-min="0" data-step="1" data-rule="quantity" />
<span class="input-group-addon add-on">
<a href="#" class="spin-up" data-spin="up">
<span class="glyphicon glyphicon-triangle-top icon-sort-up"></span>
</a>
<a href="#" class="spin-down" data-spin="down">
<span class="glyphicon glyphicon-triangle-bottom icon-sort-down"></span>
</a>
</span>
</div>
<span class="help-block"><?php
echo has_message("cssubjectUnit") ? get_message("cssubjectUnit") : "";
?>
</span>
</div>
</div>
<div class="form-group">
<div class="col-sm-3 col-sm-offset-4">
<button type="submit" class="btn btn-primary form-control"> Save </button>
</div>
<div class="col-sm-3">
<a href="<?php
echo site_url("dashboard/curriculums/" . ($curriculuminfo ? $curriculuminfo->getCurriculumid() : 0) . "/subjects/add");
?>
" class="rounded-corners-4px btn btn-danger form-control"> Reset </a>
</div>
</div>