本文整理汇总了PHP中display_message函数的典型用法代码示例。如果您正苦于以下问题:PHP display_message函数的具体用法?PHP display_message怎么用?PHP display_message使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了display_message函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: edit_post
public function edit_post($post_id)
{
if (!$post_id) {
redirect("blog/post/");
}
$data['title'] = "Afyadata Blog";
$this->form_validation->set_rules("title", "Title", "required");
$this->form_validation->set_rules("content", "Content", "");
$this->form_validation->set_rules("status", "Status", "");
if ($this->form_validation->run() === FALSE) {
$data['post'] = $this->Post_model->find_by_id($post_id);
$this->load->view("blog/blog_header", $data);
$this->load->view("blog/edit_post", $data);
$this->load->view("blog/blog_footer");
} else {
$post_details = array("user_id" => $this->session->userdata("user_id"), "title" => $this->input->post("title"), "alias" => str_replace(array(" ", "&", "."), "-", $this->input->post("title")), "content" => $this->input->post("content"), "status" => $this->input->post("status"), "date_modified" => date("c"));
if ($this->Post_model->update($post_id, $post_details)) {
$this->session->set_flashdata("message", display_message("Posted was updated"));
} else {
$this->session->set_flashdata("message", display_message("Failed to update post"), "danger");
}
redirect("blog/post/edit_post/" . $post_id, "refresh");
}
}
示例2: zen_href_link
<div class="panel">
<h1 class="panel-heading"><?php
echo HEADING_TITLE;
?>
</h1>
<div class="panel-body page-content">
<form id="contact_us" name="contact_us" class="form-horizontal" method="post" action="<?php
echo zen_href_link(FILENAME_CONTACT_US, 'action=send');
?>
">
<?php
echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']);
?>
<?php
display_message('contact');
?>
<?php
if (CONTACT_US_STORE_NAME_ADDRESS == '1') {
?>
<?php
}
?>
<?php
if (isset($_GET['action']) && $_GET['action'] == 'success') {
?>
<div class="bg-success mainContent success"><?php
echo TEXT_SUCCESS;
?>
</div>
<a class="btn btn-default" href="<?php
示例3: display_list
case 'select-account':
case 'view-mailbox':
// if mailbox just chosen, or view mailbox chosen, show mailbox
if (isset($selected_account)) {
display_list($_SESSION['auth_user'], $_SESSION['selected_account']);
} else {
display_list($_SESSION['auth_user']);
}
break;
case 'show-headers':
case 'hide-headers':
case 'view-message':
// if we have just picked a message from the list, or were looking at
// a message and chose to hide or view headers, load a message
$fullheaders = $action == 'show-headers';
display_message($_SESSION['auth_user'], $_SESSION['selected_account'], $messageid, $fullheaders);
break;
case 'reply-all':
//set cc as old cc line
if (!$imap) {
$imap = open_mailbox($_SESSION['auth_user'], $_SESSION['selected_account']);
}
if ($imap) {
$header = imap_header($imap, $messageid);
if ($header->reply_toaddress) {
$to = $header->reply_toaddress;
} else {
$to = $header->fromaddress;
}
$cc = $header->ccaddress;
$subject = 'Re: ' . $header->subject;
示例4: display_message
// CHECK gettext extension
if (extension_loaded("gettext")) {
$message = 'The <em>gettext</em> extension is loaded.';
display_message('info_nocross', $message);
} else {
$message = "The <em>gettext</em> extension is <strong>NOT</strong> loaded.\n <a href='https://github.com/elabftw/elabftw/wiki/Troubleshooting#the-gd-extension-is-not-loaded'>Click here to read how to fix this.</a>";
display_message('error_nocross', $message);
custom_die();
}
// CHECK curl extension
if (extension_loaded("curl")) {
$message = 'The <em>curl</em> extension is loaded.';
display_message('info_nocross', $message);
} else {
$message = "The <em>curl</em> extension is <strong>NOT</strong> loaded.\n <a href='https://github.com/elabftw/elabftw/wiki/Troubleshooting#the-gd-extension-is-not-loaded'>Click here to read how to fix this.</a>";
display_message('error_nocross', $message);
custom_die();
}
?>
<br />
<br />
<h4>Configuration</h4>
<br />
<br />
<!-- MYSQL -->
<form action='install.php' method='post'>
<fieldset>
<legend><strong>MySQL</strong></legend>
<p>MySQL is the database that will store everything. eLabFTW need to connect to it with a username/password. This is <strong>NOT</strong> your account with which you'll use eLabFTW. If you followed the README you should have created a database <em>elabftw</em> with a user <em>elabftw</em> that have all the rights on it.</p>
示例5: connect
<?php
include "./config";
include "./func.php";
try {
$conn = connect();
} catch (Exception $error) {
display_message($error->getMessage(), "", "error");
exit;
}
$nickname = get_nickname($conn);
$count = get_rows($conn);
$select = "select * from article;";
$result = $conn->query($select);
?>
<!DOCTYPE html>
<html>
<head>
<title>归档</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-combined.min.css">
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<style type="text/css">
body {
background-image:url("image/theme.png");
background-size: cover;
background-repeat:no-repeat;
示例6: while
$req = $pdo->prepare($sql);
$req->bindParam(':teamid', $_SESSION['team_id'], PDO::PARAM_INT);
$req->execute();
while ($get_id = $req->fetch()) {
$results_arr[] = $get_id['id'];
}
$search_type = 'none';
}
$total_time = get_total_time();
// filter out duplicate ids
$results_arr = array_unique($results_arr);
// show number of results found
if (count($results_arr) === 0 && $search_type != 'none') {
display_message('error_nocross', _("Sorry. I couldn't find anything :("));
} elseif (count($results_arr) === 0 && $search_type === 'none') {
display_message('info', _('<strong>Welcome to eLabFTW.</strong> Select an item in the «Create new» list to begin filling your database.'));
} else {
?>
<div class='align_right'>
<a name='anchor'></a>
<p class='inline'><?php
echo _('Export this result:');
?>
</p>
<a href='make.php?what=zip&id=<?php
echo Tools::buildStringFromArray($results_arr);
?>
&type=items'>
<img src='img/zip.png' title='make a zip archive' alt='zip' />
</a>
示例7: elseif
<div class="panel">
<h1 class="panel-heading">
<?php
if (isset($_GET['edit'])) {
echo HEADING_TITLE_MODIFY_ENTRY;
} elseif (isset($_GET['delete'])) {
echo HEADING_TITLE_DELETE_ENTRY;
} else {
echo HEADING_TITLE_ADD_ENTRY;
}
?>
</h1>
<div class="panel-body page-content">
<?php
display_message('addressbook');
?>
<form id="addressbook" name="addressbook" method="post" class="form-horizontal" onsubmit="return check_form(addressbook);" action="<?php
echo zlink(FILENAME_ADDRESS_BOOK_PROCESS, isset($_GET['edit']) ? 'edit=' . $_GET['edit'] : '', 'SSL');
?>
">
<?php
echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']);
?>
<?php
if (isset($_GET['delete'])) {
?>
<h6><?php
echo DELETE_ADDRESS_DESCRIPTION;
?>
</h6>
示例8: display_message
?>
" onsubmit="submitonce();">
<?php
display_message('redemptions');
?>
<?php
display_message('checkout_confirmation');
?>
<?php
display_message('checkout');
?>
<?php
display_message('checkout_address');
?>
<?php
display_message('checkout_payment');
?>
<?php
echo zen_draw_hidden_field('securityToken', $_SESSION['securityToken']);
?>
<?php
if ($COWOA) {
?>
<div id="order_steps">
<div class="order_steps_line_2">
<span class="progressbar_active_COWOA"> </span><span
class="progressbar_active_COWOA"> </span><span
class="progressbar_active_COWOA"> </span><span
class="progressbar_active_COWOA"> </span><span
class="progressbar_inactive_COWOA"> </span>
示例9: _
/*
$validate = true;
if ($validate) {
$message_type = 'info_nocross';
$validation_note = "<img class='align_right' src='img/check.png' alt='Valid Timestamp' title='Valid Timestamp' />";
} else {
$message_type = 'error_nocross';
$validation_note = "<img class='align_right' src='img/cross-red.png' alt='Invalid Timestamp' title='Invalid Timestamp' />";
}
*/
// Until a button is implemented, don't fool the user to think the timestamp is valid
$message_type = 'info_nocross';
$validation_note = "<img class='align_right' src='img/stamp.png' alt='Unchecked timestamp' title='" . _('Unchecked timestamp') . "' />";
$date = new DateTime($data['timestampedwhen']);
display_message($message_type, _('Experiment was timestamped by') . " " . $timestamper['firstname'] . " " . $timestamper['lastname'] . " " . _('on') . " " . $date->format('Y-m-d') . " " . _('at') . " " . $date->format('H:i:s') . " " . $date->getTimezone()->getName() . " <a href='uploads/" . $uploads['long_name'] . "'><img src='img/pdf.png' class='bot5px' title='" . _('Download timestamped pdf') . "' alt='pdf' /></a>" . $validation_note);
unset($timestamper);
unset($uploads);
unset($ts);
}
// Display experiment
?>
<section class="item" style='padding:15px;border-left: 6px solid #<?php
echo $data['color'];
?>
'>
<span class='top_right_status'><img src='img/status.png'><?php
echo $data['name'];
?>
<img src='img/eye.png' alt='eye' /><?php
echo $data['visibility'];
示例10: display_message
<div class="container">
<div class="row">
<div class="col-sm-12 col-md-12 col-lg-12 main">
<h3><?php
echo $this->lang->line("create_user_heading");
?>
</h3>
<?php
if ($this->session->flashdata('message') != '') {
echo display_message($this->session->flashdata('message'));
} else {
if (isset($error_in)) {
echo display_message($error_in, "danger");
}
}
?>
<div class="col-sm-8">
<form action="<?php
echo site_url('auth/create_user');
?>
" class="form-horizontal" role="form"
method="post"
accept-charset="utf-8">
<div class="form-group">
<label for="first_name"><?php
echo $this->lang->line("create_user_fname_label");
?>
示例11: display_message
?>
<style>
#message_box a {
color:#888;
}
</style>
<div id="message_box_container" style="position:relative;z-index:1000;position:absolute;left:0px;top:0px;width:100%;height:100%;font-size:14px;background-color:rgba(255,255,255,0.5);">
<div id="message_box" style="width:350px;font-family:Arial,sans-serif;background-color:#fdfdfd;border-width:1px;border-style:solid;border-color:#ddd;padding:5px;margin:auto;margin-top:20%;">
<h1 style="font-size:20pt;margin:0px;"><?php
echo $message_title;
?>
</h1>
<p style="margin-bottom:10px;"><?php
echo $message_description;
?>
</p>
<a href="http://unify.lukebarnard.co.uk">Home</a> -
<a id="close_link" href="javascript:return false;" onclick="c = document.getElementById('message_box_container');c.parentNode.removeChild(c);event.preventDefault();">Close this message box</a>
<script>
document.getElementById("close_link").focus();
</script>
</div>
</div>
<?php
}
// var_dump($_SERVER["REQUEST_URI"]);
// var_dump($_GET);
if (isset($_GET["m"])) {
$m = $_GET["m"];
display_message($m);
}
示例12: display_message
display_message(get_string('error'), get_string('errorwhenconfirming'));
}
$dataelements = explode('/', $data, 2);
// Stop after 1st slash. Rest is username. MDL-7647
$usersecret = $dataelements[0];
$username = $dataelements[1];
$confirmed = application_user_confirm($username, $usersecret);
if ($confirmed == AUTH_CONFIRM_ALREADY) {
if (!($user = get_complete_user_data('username', $username))) {
display_message(get_string('error'), get_string('cannotfinduser') . ' ' . $username);
}
display_message(get_string('thanks') . ', ' . fullname($user), get_string('alreadyconfirmed'));
} else {
if ($confirmed == AUTH_CONFIRM_OK) {
// The user has confirmed successfully, let's log them in
if (!($user = get_complete_user_data('username', $username))) {
display_message(get_string('error'), get_string('cannotfinduser') . ' ' . $username);
}
complete_user_login($user);
if (!empty($SESSION->wantsurl)) {
// Send them where they were going
$goto = $SESSION->wantsurl;
unset($SESSION->wantsurl);
redirect($goto);
}
display_message(get_string('thanks') . ', ' . fullname($user), get_string('confirmed'));
} else {
display_message(get_string('error'), get_string('invalidconfirmdata'));
}
}
redirect($CFG->wwwroot . '/local/obu_application/');
示例13: display_system
function display_system($message, $file = '', $line = '')
{
display_message('SYSTEM: ' . $message, $file, $line, 'system');
}
示例14: _
?>
</li>
<li class='tabhandle' id='tab3'><?php
echo _('Tools');
?>
</li>
<li class='tabhandle' id='tab4'><?php
echo _('Help');
?>
</li>
</ul>
</menu>
<!-- *********************** -->
<div class='divhandle' id='tab1div'>
<?php
display_message('info_nocross', sprintf(_('You belong to the %s team.'), get_team_config('team_name')));
?>
<table id='teamtable' class='table'>
<tr>
<th><?php
echo _('Name');
?>
</th>
<th><?php
echo _('Phone');
?>
</th>
<th><?php
echo _('Mobile');
?>
</th>
示例15: _
* @copyright 2012 Nicolas CARPi
* @see http://www.elabftw.net Official website
* @license AGPL-3.0
* @package elabftw
*/
/**
* Create an account
*
*/
require_once 'inc/common.php';
$page_title = _('Register');
$selected_menu = null;
require_once 'inc/head.php';
// Check if we're logged in
if (isset($_SESSION['auth']) && $_SESSION['auth'] == 1) {
display_message('error', sprintf(_('Please %slogout%s before you register another account.'), "<a style='alert-link' href='app/logout.php'>", "</a>"));
require_once 'inc/footer.php';
exit;
}
?>
<menu class='border'><a href='login.php'><img src='img/arrow-left-blue.png' alt='' /> <?php
echo _('go back to login page');
?>
</a></menu>
<section class='center'>
<h2><?php
echo _('Create your account');
?>
</h2><br><br>
<!-- Register form -->