1<?php 2/** 3 * XOOPS comment reply 4 * 5 * You may not change or alter any portion of this comment or credits 6 * of supporting developers from this source code or any supporting source code 7 * which is considered copyrighted (c) material of the original comment or credit authors. 8 * This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 11 * 12 * @copyright (c) 2000-2016 XOOPS Project (www.xoops.org) 13 * @license GNU GPL 2 (http://www.gnu.org/licenses/gpl-2.0.html) 14 * @package kernel 15 * @since 2.0.0 16 * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ 17 */ 18/* @var XoopsUser $xoopsUser */ 19/* @var XoopsModule $xoopsModule */ 20/* @var XoopsConfigItem $xoopsConfig */ 21 22 23defined('XOOPS_ROOT_PATH') || exit('Restricted access'); 24 25include_once $GLOBALS['xoops']->path('include/comment_constants.php'); 26 27if (('system' !== $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) || (!is_object($xoopsUser) && !$xoopsModuleConfig['com_anonpost']) || !is_object($xoopsModule)) { 28 redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM); 29} 30 31xoops_loadLanguage('comment'); 32$com_id = isset($_GET['com_id']) ? (int)$_GET['com_id'] : 0; 33$com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : ''; 34if ($com_mode == '') { 35 if (is_object($xoopsUser)) { 36 $com_mode = $xoopsUser->getVar('umode'); 37 } else { 38 $com_mode = $xoopsConfig['com_mode']; 39 } 40} 41if (!isset($_GET['com_order'])) { 42 if (is_object($xoopsUser)) { 43 $com_order = $xoopsUser->getVar('uorder'); 44 } else { 45 $com_order = $xoopsConfig['com_order']; 46 } 47} else { 48 $com_order = (int)$_GET['com_order']; 49} 50$comment_handler = xoops_getHandler('comment'); 51$comment = $comment_handler->get($com_id); 52 53// Start edit by voltan 54if ($comment->getVar('com_uid') == 0 && $comment->getVar('com_user') != '') { 55 $r_name = $comment->getVar('com_user'); 56} else { 57 $r_name = XoopsUser::getUnameFromId($comment->getVar('com_uid')); 58} 59// End edit by voltan 60 61$r_text = _CM_POSTER . ': <strong>' . $r_name . '</strong> ' . _CM_POSTED . ': <strong>' . formatTimestamp($comment->getVar('com_created')) . '</strong><br><br>' . $comment->getVar('com_text'); 62$com_title = $comment->getVar('com_title', 'E'); 63if (!preg_match('/^' . _RE . '/i', $com_title)) { 64 $com_title = _RE . ' ' . xoops_substr($com_title, 0, 56); 65} 66$com_pid = $com_id; 67$com_text = ''; 68$com_id = 0; 69$dosmiley = 1; 70$dohtml = 0; 71$doxcode = 1; 72$dobr = 1; 73$doimage = 1; 74$com_icon = ''; 75$com_rootid = $comment->getVar('com_rootid'); 76$com_itemid = $comment->getVar('com_itemid'); 77// Start Add by voltan 78$com_user = ''; 79$com_email = ''; 80$com_url = ''; 81// End Add by voltan 82 83include_once $GLOBALS['xoops']->path('header.php'); 84echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer"> 85 <tr><td class="head">' . $comment->getVar('com_title') . '</td></tr> 86 <tr><td><br>' . $r_text . '<br></td></tr> 87 </table>'; 88include_once $GLOBALS['xoops']->path('include/comment_form.php'); 89include_once $GLOBALS['xoops']->path('footer.php'); 90