Example #1
0
<?php

// show messages file
// $Id: message.php,v 1.28 2012/01/21 16:55:15 nobu Exp $
include "../../mainfile.php";
include "functions.php";
$myts =& MyTextSanitizer::getInstance();
$xoopsOption['template_main'] = "ccenter_message.html";
$uid = is_object($xoopsUser) ? $xoopsUser->getVar('uid') : 0;
$msgid = intval($_GET['id']);
$data = cc_get_message($msgid);
// change to accept status when change user access
if ($uid && $uid == $data['touid'] && $data['status'] == _STATUS_NONE) {
    change_message_status($msgid, $uid, _STATUS_ACCEPT);
    $data['status'] = _STATUS_ACCEPT;
}
// recording contactee access time
$now = time();
if ($uid == $data['uid'] && $now > $data['atime']) {
    $xoopsDB->queryF("UPDATE " . CCMES . " SET atime={$now} WHERE msgid={$msgid}");
}
include XOOPS_ROOT_PATH . "/header.php";
$breadcrumbs = new XoopsBreadcrumbs(_MD_CCENTER_RECEPTION, 'reception.php');
$pass = isset($_GET['p']) ? $_GET['p'] : '';
$add = $pass ? "p=" . urlencode($pass) : "";
$to_uname = XoopsUser::getUnameFromId($data['touid']);
$res = $xoopsDB->query("SELECT * FROM " . FORMS . " WHERE formid=" . $data['fidref']);
$form = $xoopsDB->fetchArray($res);
$items = get_form_attribute($form['defs']);
$raws = unserialize_text($data['body']);
$values = cc_display_values($raws, $items, $data['msgid'], $add);
// $Id: comment_reply.php,v 1.5 2011/03/15 13:50:36 nobu Exp $
//  ------------------------------------------------------------------------ //
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  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.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
include '../../mainfile.php';
include 'functions.php';
$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
$com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
cc_get_message(cc_check_comment($com_itemid, $com_id));
include XOOPS_ROOT_PATH . '/include/comment_reply.php';
//                XOOPS - PHP Content Management System                      //
//                    Copyright (c) 2000 XOOPS.org                           //
//                       <http://www.xoops.org/>                             //
//  ------------------------------------------------------------------------ //
//  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.                                      //
//                                                                           //
//  You may not change or alter any portion of this comment or credits       //
//  of supporting developers from this source code or any supporting         //
//  source code which is considered copyrighted (c) material of the          //
//  original comment or credit authors.                                      //
//                                                                           //
//  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., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
include '../../mainfile.php';
include 'functions.php';
$myts =& MyTextSanitizer::getInstance();
$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
$data = cc_get_message($com_itemid);
$com_replytext = _POSTEDBY . '&nbsp;<b>' . xoops_getLinkedUnameFromId($data['uid']) . '</b>&nbsp;' . _DATE . '&nbsp;<b>' . formatTimestamp($data['mtime']) . '</b>
<br /><br />' . $myts->displayTarea($data['body']) . "<br/><br/>" . ($com_replytitle = $data['title']);
include XOOPS_ROOT_PATH . '/include/comment_new.php';