• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_messages函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_messages函数的典型用法代码示例。如果您正苦于以下问题:PHP get_messages函数的具体用法?PHP get_messages怎么用?PHP get_messages使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: get_all

function get_all($mysqli, $friend_ids)
{
    if (!isset($_SESSION)) {
        session_start();
    }
    if (!isset($_SESSION["id"]) || !valid_friends($friend_ids)) {
        die("[]");
    }
    $my_id = $_SESSION["id"];
    $friend_ids[] = $my_id;
    $ids = $friend_ids;
    sort($ids);
    $room_id = get_room_id($mysqli, $ids);
    return get_messages($mysqli, $room_id);
}
开发者ID:nwestbury,项目名称:AngularJS-VaporChat,代码行数:15,代码来源:update.php


示例2: draw_message_box

function draw_message_box() {
	$messages = get_messages();
	while ($message = $messages->fetch_array()){
		?><div class="mssg_text"><b>
		<?php
		echo '<div class=';
		if ($message['user_id']==$_SESSION['user_id'])
			echo 'mssg-self';
		else if ($message['user_id']==get_team_leader())
			echo 'mssg-tl';
		echo '>';
		echo ucfirst($message['fname']).' ';
		echo ucfirst($message['lname']);
		echo '</div>';
		?></b>
		<?php
		echo '<BR>'.$message['message'];
		echo '<BR></div><P>';
	}

}
开发者ID:rogerapras,项目名称:php_timeclock,代码行数:21,代码来源:messaging.php


示例3: mysql_query

            mysql_query($sql);
            break;
        case "list":
            $password = $_GET["password"];
            if (empty($password)) {
                break;
            }
            #Check password.
            $password = mysql_real_escape_string($password);
            $node = get_node($node_id);
            if ($node == FALSE) {
                break;
            }
            if ($node["password"] != $password) {
                break;
            }
            #Get messages.
            $messages = get_messages($node_id);
            #Delete old messages.
            $node_id = mysql_real_escape_string($node_id);
            $sql = "DELETE FROM `messages` WHERE `node_id`='{$node_id}'";
            mysql_query($sql);
            #Return messages as JSON.
            echo json_encode($messages);
            break;
        default:
            break;
    }
}
//All done.
mysql_close($con);
开发者ID:F483,项目名称:pyp2p,代码行数:31,代码来源:dht_msg.php


示例4: forgot

 /**
  * The forgot password page
  */
 public function forgot()
 {
     //Redirect if  logged in
     $this->load->model('User_model');
     if ($this->User_model->checkSession()) {
         redirect('user/index');
     }
     //Check for post
     if ($this->input->post()) {
         $form = $this->input->post(NULL, TRUE);
         //Check if email is unique
         $this->load->helper('email');
         //Check email
         if (!valid_email($form['email'])) {
             set_message("The email that you have entered is not Invalid", 'error');
         } else {
             $email = check_plain($form['email']);
             //Based on email generate new login url token
             $this->load->model('User_model');
             $this->load->model('Mail_model');
             $user = $this->User_model->loadFromMail($email);
             if ($user && $user->uid) {
                 //Generate new token and add to system
                 $token = $this->User_model->addUrlToken($user);
                 //Send email
                 $this->Mail_model->forgotMail($user, array('token' => $token));
                 set_message("Check your mail to Reset your password");
             } else {
                 set_message("We dont have records for the email that you have given", 'error');
             }
         }
     }
     $this->load->view('include/header', array('scripts' => array('assets/js/register.js')));
     $data['messages'] = get_messages();
     $this->load->view('templates/forgot', $data);
     //Show Footer
     $this->load->view('include/footer');
 }
开发者ID:rajarju,项目名称:ZORL,代码行数:41,代码来源:user.php


示例5: header

<?php

$max = 5;
if (!isset($_SESSION['pseudo'])) {
    header('location: ../');
} else {
    include_once 'model/messagerie/get_messages.php';
    include_once 'model/messagerie/get_nb_messages.php';
    if (array_key_exists('goto', $_GET)) {
        if ($_GET['goto'] < 1) {
            $pageact = 1;
        } else {
            $pageact = $_GET['goto'];
        }
    } else {
        $pageact = 1;
    }
    $messages = get_messages($_SESSION['pseudo'], $pageact, $max);
    $nb_total = get_nb_messages($_SESSION['pseudo']);
    include 'view/messagerie/index.php';
}
开发者ID:YannBertrand,项目名称:CovoiturageENIB,代码行数:21,代码来源:index.php


示例6: in

$delete = in('delete');
$message_sent_to = null;
// Sending mail section.
if ($message && $messenger) {
    if ($to_clan && $has_clan) {
        $message_sent_to = message_to_clan($message);
    } elseif (!!$target_id) {
        send_message($user_id, $target_id, $message);
        $message_sent_to = $to;
        // (
    }
}
if ($delete) {
    delete_messages();
}
$messages = get_messages($user_id, $limit, $offset);
$message_count = message_count();
$pages = ceil($message_count / $limit);
// Total pages.
//$current_page = floor(($message_count/$limit) - $limit); //
$nav = render_message_nav($page, $pages, $limit);
read_messages($user_id);
// mark messages as read for next viewing.
// TODO: Handle "send" and "deletion";
$message_list = '';
if (!empty($messages)) {
    foreach ($messages as $loop_message) {
        $loop_message['message'] = out($loop_message['message']);
        $message_list .= render_template('single_message.tpl', array('message' => $loop_message));
    }
}
开发者ID:ninjajerry,项目名称:ninjawars,代码行数:31,代码来源:messages.php


示例7: define

define("context", "weblog");
// You must be logged on to view this!
protect(1);
templates_page_setup();
cleanup_messages(time() - 86400 * 30);
$title = run("profile:display:name") . " :: " . __gettext("Recent activity");
// If we haven't specified a start time, start time = 1 day ago
$starttime = optional_param('starttime', time() - 86400, PARAM_INT);
$body = "<p>" . __gettext("Currently viewing recent activity since ") . gmstrftime("%B %d, %Y", $starttime) . ".</p>";
$body .= "<p>" . __gettext("You may view recent activity during the following time-frames:") . "</p>";
$body .= "<ul><li><a href=\"index.php?starttime=" . (time() - 86400) . "\">" . __gettext("The last 24 hours") . "</a></li>";
$body .= "<li><a href=\"index.php?starttime=" . (time() - 86400 * 2) . "\">" . __gettext("The last 48 hours") . "</a></li>";
$body .= "<li><a href=\"index.php?starttime=" . (time() - 86400 * 7) . "\">" . __gettext("The last week") . "</a></li>";
$body .= "<li><a href=\"index.php?starttime=" . (time() - 86400 * 30) . "\">" . __gettext("The last month") . "</a></li></ul>";
$body .= "<h2>" . __gettext("Your recent messages") . "</h2>";
$user_messages = get_messages($page_owner, null, time() - $starttime);
if (is_array($user_messages) && !empty($user_messages)) {
    foreach ($user_messages as $user_message) {
        $body .= "<div class=\"user_message\">" . display_message($user_message) . "</div>";
    }
}
$body .= "<h2>" . __gettext("Activity on weblog posts you have marked as interesting") . "</h2>";
if ($activities = get_records_sql('SELECT wc.*, u.username, u.name as weblogname, wp.weblog, wp.ident AS weblogpost, wp.title AS weblogtitle, wp.weblog AS weblog 
                                    FROM ' . $CFG->prefix . 'weblog_comments wc 
                                    LEFT JOIN ' . $CFG->prefix . 'weblog_watchlist wl ON wl.weblog_post = wc.post_id 
                                    LEFT JOIN ' . $CFG->prefix . 'weblog_posts wp ON wp.ident = wc.post_id 
                                    LEFT JOIN ' . $CFG->prefix . 'users u ON u.ident = wp.weblog 
                                    WHERE wc.posted > ? AND wl.owner = ?
                                    ORDER BY wc.posted DESC', array($starttime, $page_owner))) {
    foreach ($activities as $activity) {
        $commentbody = stripslashes($activity->body);
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:31,代码来源:index.php


示例8: startup

<?php

//Подключение модулей
include 'startup.php';
include 'model.php';
//Подготовка
startup();
//Была отправка формы?
if (!empty($_POST)) {
    send_message($_POST['category'], $_POST['link'], $_POST['description'], $_POST['comment']);
    //header('Location: index.php'); /* Если убрать эту строчку то вы дублируете запрос методом пост при перезагрузке. т.е. при перезагрузке страницы постоянно будут идти последние сообщения пользователя */
    //exit();
}
$messages = get_messages();
?>
<!-- //<?php 
/* Файл с этого сайта = http://objectone.ru/ */
?>
 -->
<!DOCTYPE html>
<html lang="ru">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>Минимальный каркас странички</title>
	<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body> 
	<div class="container">
		<div class="row">
开发者ID:EvgeniUPS,项目名称:project,代码行数:31,代码来源:add.php


示例9: insert_message

<?php

include "../model/msgdb.php";
if ($_POST['method'] == "insert") {
    insert_message();
}
if ($_POST['method'] == "getall") {
    get_messages();
}
开发者ID:Karanki,项目名称:ChitChat,代码行数:9,代码来源:message.php


示例10: database_init

</head>
<body>
<h1>Pompiedom</h1>
<div style="width:600px">
<p style="float:left">What are you doing?</p><span style="color:#888;float:right;font-size:33pt" id="counter"></span>

<form action="/status/admin/post.php" method="post">
    <textarea name='message' rows='2' cols='55' id='status'></textarea><br/>
    <input type='submit' value='Update' />
</form>


<? 
require_once '../../../inc/database.inc.php';
$link = database_init();
$messages = get_messages($link);

foreach ($messages as $message) {
?>
<p><?php 
echo $message['message'];
?>
</p>
<p class="info">Posted by <? echo USERNAME ?> on <span class="created"><?php 
echo $message['created'];
?>
</p>
<? } ?>

</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>
开发者ID:pstuifzand,项目名称:pompiedom,代码行数:31,代码来源:index.php


示例11: round

if (isset($ltime)) {
    $time_diff = round($ltime / 1000) - $_SERVER['REQUEST_TIME'];
    $c['time_diff'] = $time_diff;
    set_timediff($time_diff, $username);
} else {
    $time_diff = $c['time_diff'];
}
if (isset($message)) {
    $message = mysql_real_escape_string($message);
    $recepient = mysql_real_escape_string($recepient);
    send_message($recepient, $message, $username);
}
if (isset($solution)) {
    send_solution($solution, $username);
}
$c['messages'] = get_messages($self);
$usersonline = userlist($username);
$c['usersonline'] = $usersonline;
$cond = give_conditions($username);
$c['cond'] = $cond;
/// Stop changing the session variable, compare it to the old state, generate a response and save in DB
$c['md5_hash'] = '';
$c_old['md5_hash'] = '';
$old_session_hash = md5(serialize($c_old));
$new_session_hash = md5(serialize($c));
//if (isset($_GET['last_seen_session_hash']) and $_GET['last_seen_session_hash'] != $old_session_hash) {
//    $sql = "select ses_value from session_buffer where ses_hash = '".$_GET['last_seen_session_hash']."'";
//    $q = mysql_query($sql);
//    if (mysql_num_rows($q)>0) $c_old = mysql_result($q,0);
//}
$c_old['md5_hash'] = $old_session_hash;
开发者ID:vviro,项目名称:robot-control,代码行数:31,代码来源:c.php


示例12: url

    ?>
        <div class="row margin-bottom-20">
            <div class="col-md-12 text-right">
                <a href="<?php 
    echo url();
    ?>
/logout" class="btn btn-primary btn-sm" id="js-link-logout">logout</a>
            </div>
        </div>
    <?php 
}
?>

    <?php 
if (has_messages()) {
    foreach (get_messages() as $message) {
        ?>
        <div class="row">
            <div class="col-md-12">
                <div class="alert alert-info alert-dismissible fade in" role="alert">
                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                    <strong>Message:</strong> <?php 
        echo $message;
        ?>
                </div>
            </div>
        </div>
    <?php 
    }
开发者ID:petrofcikmatus,项目名称:simple-todo,代码行数:31,代码来源:header.php


示例13: define

define("USER_FILE", "user.txt");
// define icon set directory
//define("ICON_SET", "smiley_fuge_icons");
//define("ICON_SET", "smiley_onigiri_riceballs");
define("ICON_SET", "smiley_the_glassy");
$icons = array(":-)" => array("file" => "smiley.png", "tooltip" => "Lächeln"), ":)" => array("file" => "smiley.png", "tooltip" => "Lächeln"), ";-)" => array("file" => "smiley-wink.png", "tooltip" => "Zwinkern"), ";)" => array("file" => "smiley-wink.png", "tooltip" => "Zwinkern"), ":-D" => array("file" => "smiley-grin.png", "tooltip" => "Grinsen"), ":D" => array("file" => "smiley-grin.png", "tooltip" => "Grinsen"), ":-(" => array("file" => "smiley-sad.png", "tooltip" => "Traurig"), ":(" => array("file" => "smiley-sad.png", "tooltip" => "Traurig"), ";-(" => array("file" => "smiley-cry.png", "tooltip" => "Weinen"), ";(" => array("file" => "smiley-cry.png", "tooltip" => "Weinen"), ":-O" => array("file" => "smiley-yell.png", "tooltip" => "Schreien"), ":O" => array("file" => "smiley-yell.png", "tooltip" => "Schreien"), "&gt;-(" => array("file" => "smiley-mad.png", "tooltip" => "Sauer"), "&gt;(" => array("file" => "smiley-mad.png", "tooltip" => "Sauer"), ":-@" => array("file" => "smiley-evil.png", "tooltip" => "Wütend"), ":@" => array("file" => "smiley-evil.png", "tooltip" => "Wütend"), "&gt;-@" => array("file" => "smiley-twist.png", "tooltip" => "Zornig"), "&gt;@" => array("file" => "smiley-twist.png", "tooltip" => "Zornig"), ":-o" => array("file" => "smiley-frighten.png", "tooltip" => "Erschrocken"), ":o" => array("file" => "smiley-frighten.png", "tooltip" => "Erschrocken"), ":-P" => array("file" => "smiley-razz.png", "tooltip" => "Zunge raustrecken"), ":P" => array("file" => "smiley-razz.png", "tooltip" => "Zunge raustrecken"), ":-X" => array("file" => "smiley-kiss.png", "tooltip" => "Küssen"), ":X" => array("file" => "smiley-kiss.png", "tooltip" => "Küssen"), "8-|" => array("file" => "smiley-roll.png", "tooltip" => "Ironisch"), "8|" => array("file" => "smiley-roll.png", "tooltip" => "Ironisch"), "B-)" => array("file" => "smiley-cool.png", "tooltip" => "Cool"), "B)" => array("file" => "smiley-cool.png", "tooltip" => "Cool"), ":-#" => array("file" => "smiley-zipper.png", "tooltip" => "Schweigen"), ":#" => array("file" => "smiley-zipper.png", "tooltip" => "Schweigen"), ":-§" => array("file" => "smiley-red.png", "tooltip" => "Verlegen"), ":§" => array("file" => "smiley-red.png", "tooltip" => "Verlegen"), "O:)" => array("file" => "smiley-angel.png", "tooltip" => "Unschuldig"), "O)" => array("file" => "smiley-angel.png", "tooltip" => "Unschuldig"), ":-Z" => array("file" => "smiley-sleep.png", "tooltip" => "Schlafen"), ":Z" => array("file" => "smiley-sleep.png", "tooltip" => "Schlafen"), ":-/" => array("file" => "smiley-confuse.png", "tooltip" => "Verwirrt"), ":/" => array("file" => "smiley-confuse.png", "tooltip" => "Verwirrt"), "\$-)" => array("file" => "smiley-money.png", "tooltip" => "Geldgierig"), "\$)" => array("file" => "smiley-money.png", "tooltip" => "Geldgierig"), "ccd" => array("file" => "thumb-up.png", "tooltip" => "Daumen hoch"), "cd" => array("file" => "thumb-up.png", "tooltip" => "Daumen hoch"), "ccq" => array("file" => "thumb-down.png", "tooltip" => "Daumen runter"), "cq" => array("file" => "thumb-down.png", "tooltip" => "Daumen runter"));
// perform as requested by GET
if ($_GET['action'] && $_SESSION['auth'] == true) {
    switch ($_GET['action']) {
        case 'logout':
            remove_user($_SESSION['name']);
            session_destroy();
            header("Location: " . $_SERVER['PHP_SELF']);
            break;
        case 'get_messages':
            echo get_messages($_SESSION['last_action']);
            die;
            break;
            /*case 'get_userlist':
              echo get_userlist();
              die;
              break;*/
    }
}
// message was sent, write to file
if ($_POST['msg'] && $_SESSION['auth'] == true) {
    write_message(microtime_float(), $_SESSION['name'], htmlspecialchars($_POST['msg']));
    die;
}
// check if login is valid
if ($_GET['name'] && $_GET['password'] && $_SESSION['auth'] != true) {
开发者ID:rsclg,项目名称:SimpleChat,代码行数:31,代码来源:index.php


示例14: get_message_preview

function get_message_preview($binding, $id)
{
    $messages = get_messages($binding, $id, false, true);
    if ($messages) {
        return $messages[0]->preview_url;
    } else {
        return null;
    }
}
开发者ID:nysenate,项目名称:T-Reqs,代码行数:9,代码来源:bronto_funcs.php


示例15: EST

										Date
									</th>
								</tr>
							</thead>
							<tfoot>
								<tr>
									<td colspan="3">All times are in EST (UTC-05:00)</td>
								</tr>
							</tfoot>
							<tbody>
								<?php 
$Alert_Id = '';
if (isset($_GET['Alert_Id'])) {
    $Alert_Id = $_GET['Alert_Id'];
}
$posts = get_messages($params, $Alert_Id);
foreach ($posts as $post) {
    $Extra_Classes = '';
    $Alerts_Id = get_post_meta($post->ID, 'Edd_Alert_Id', true);
    if (isset($_GET['Alert_Id']) && $_GET['Alert_Id'] == $Alerts_Id) {
        $Extra_Classes = 'active_alert';
        $Alert_Post_Id = get_alert_id_by_meta_value($Alerts_Id);
        if (get_post_meta($Alert_Post_Id, 'Is_Alert_Read', true) == '') {
            echo "<script>\$(function(){ Edd.collaboration.Alerts.Read('" . $Alert_Post_Id . "'); });</script>";
            update_post_meta($Alert_Post_Id, 'Is_Alert_Read', 'YES', false);
        }
    }
    ?>
									<tr class="odd <?php 
    echo $Extra_Classes;
    ?>
开发者ID:alexsharma68,项目名称:EddCollaborationPlugin,代码行数:31,代码来源:frontend-collaboration-workroom.php


示例16: add_message

<?php

require_once "messaging.php";
if ($_POST) {
    add_message($_POST['username'], $_POST['text'], $dbh);
    echo '[]';
} else {
    echo json_encode(get_messages($_GET['next'], $dbh));
}
开发者ID:bolivarez9193,项目名称:Brandons_Repo,代码行数:9,代码来源:server.php


示例17: format_entry

function format_entry($r)
{
    if (!is_array($r)) {
        return;
    }
    extract($r);
    if (!$time) {
        list($date, $time) = explode(' ', $date);
    }
    list($hour, $minute, $second) = explode(':', $time);
    list($year, $month, $day) = explode('-', $date);
    $timestamp = timezone_mktime($timezone, $hour, $minute, $second, $month, $day, $year);
    $data = handle_content($data, $contenttype);
    $date_f = format_date($timestamp, $timezone);
    $time_f = format_time($timestamp, $timezone);
    if ($date and $time) {
        $n = get_message_sum("{$date} {$time}");
        $messages = get_messages(array("entrydate = '{$date} {$time}'", "entryuser = '" . JOURNAL_USERNAME . "'", 'messages.messageid = entrymessages.messageid'), 'entrymessages');
    }
    if (defined("JOURNAL_USECSS")) {
        return "<div class='journal'" . ($friend ? "" : " id='" . JOURNAL_USERNAME . "'") . "><div class='date'>{$date_f}</div>" . row_to_td($r) . "</div><div class='messages'>" . (is_array($messages) ? format_messages($messages) : "") . "</div>";
    } else {
        return "<table><tr><td><h1>{$date_f}</h1></td>" . "<th>{$subject}</th>" . "<td align='right'><h1>{$time_f}</h1></td></tr>" . "<tr><td colspan='3'>{$data}</td></tr></table>" . (is_array($messages) ? format_messages($messages) : "");
    }
}
开发者ID:nbtscommunity,项目名称:phpfnlib,代码行数:25,代码来源:row_to_html.php


示例18: get_messages

<?php

////////////////////////////////////////////////////////////////////////////////
//   Copyright (C) ReloadCMS Development Team                                 //
//   http://reloadcms.com                                                     //
//   This product released under GNU General Public License v2                //
////////////////////////////////////////////////////////////////////////////////
$messages = get_messages(0, true);
foreach ($messages as $id => $message) {
    $feed->addItem(__('Message by') . ' ' . $message['nickname'], htmlspecialchars($message['text']), 'http://' . $_SERVER['HTTP_HOST'] . '?module=' . $module, $message['time']);
}
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:11,代码来源:rss.php


示例19: print_thread_messages

function print_thread_messages($thread, $token, $lastid, $isuser, $format, $agentid = null)
{
    global $webim_encoding, $webimroot, $connection_timeout, $settings;
    $threadid = $thread['threadid'];
    $istyping = abs($thread['current'] - $thread[$isuser ? "lpagent" : "lpuser"]) < $connection_timeout && $thread[$isuser ? "agentTyping" : "userTyping"] == "1" ? "1" : "0";
    if ($format == "xml") {
        $output = get_messages($threadid, "xml", $isuser, $lastid);
        start_xml_output();
        print "<thread lastid=\"{$lastid}\" typing=\"" . $istyping . "\" canpost=\"" . ($isuser || $agentid != null && $agentid == $thread['agentId'] ? 1 : 0) . "\">";
        foreach ($output as $msg) {
            print $msg;
        }
        print "</thread>";
    } else {
        if ($format == "html") {
            loadsettings();
            $output = get_messages($threadid, "html", $isuser, $lastid);
            start_html_output();
            $url = "{$webimroot}/thread.php?act=refresh&amp;thread={$threadid}&amp;token={$token}&amp;html=on&amp;user=" . ($isuser ? "true" : "false");
            print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">" . "<html>\n<head>\n" . "<link href=\"{$webimroot}/styles/default/chat.css\" rel=\"stylesheet\" type=\"text/css\">\n" . "<meta http-equiv=\"Refresh\" content=\"" . $settings['updatefrequency_oldchat'] . "; URL={$url}&amp;sn=11\">\n" . "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n" . "<title>chat</title>\n" . "</head>\n" . "<body bgcolor='#FFFFFF' text='#000000' link='#C28400' vlink='#C28400' alink='#C28400' onload=\"if( location.hash != '#aend' ){location.hash='#aend';}\">" . "<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td valign='top' class='message'>";
            foreach ($output as $msg) {
                print $msg;
            }
            print "</td></tr></table><a name='aend'></a>" . "</body></html>";
        }
    }
}
开发者ID:laiello,项目名称:cartonbank,代码行数:27,代码来源:chat.php


示例20: post_message

            $intcapt = $_POST['captcheckout'];
            if ($defcatp == $intcapt) {
                post_message($system->user['username'], $system->user['nickname'], $_POST['comtext'], RCMS_GB_DEFAULT_FILE, 'guestbook.ini');
                rcms_redirect('');
            } else {
                show_window(__('Error'), __('Invalid form data'));
            }
        } else {
            post_message($system->user['username'], $system->user['nickname'], $_POST['comtext'], RCMS_GB_DEFAULT_FILE, 'guestbook.ini');
            rcms_redirect('');
        }
    }
}
if (isset($_POST['gbd']) && $system->checkForRight('GUESTBOOK')) {
    post_remove($_POST['gbd'], RCMS_GB_DEFAULT_FILE);
    rcms_redirect('');
}
if (!(isset($system->config['guestbook-guest']) and !LOGGED_IN)) {
    show_window(__('Post message'), rcms_parse_module_template('gb-form.tpl', array()), 'center');
} else {
    show_window(__('Error'), __('You are not logined!'), 'center');
}
$messages = get_messages($page, true, false, RCMS_GB_DEFAULT_FILE, 'guestbook.ini');
if (!empty($pagination)) {
    show_window('', $pagination, 'center');
}
foreach ($messages as $id => $message) {
    $message['id'] = $id;
    show_window('', rcms_parse_module_template('gb-mesg.tpl', $message), 'center');
}
$system->config['pagename'] = __('Guest book');
开发者ID:Parashutik,项目名称:ReloadCMS,代码行数:31,代码来源:index.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_meta函数代码示例发布时间:2022-05-15
下一篇:
PHP get_message_processors函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap