| 1 | <?php |
|---|
| 2 | // $Id: comment_reply.php,v 1.2 2005/03/18 12:51:55 onokazu Exp $ |
|---|
| 3 | // ------------------------------------------------------------------------ // |
|---|
| 4 | // XOOPS - PHP Content Management System // |
|---|
| 5 | // Copyright (c) 2000 XOOPS.org // |
|---|
| 6 | // <http://www.xoops.org/> // |
|---|
| 7 | // ------------------------------------------------------------------------ // |
|---|
| 8 | // This program is free software; you can redistribute it and/or modify // |
|---|
| 9 | // it under the terms of the GNU General Public License as published by // |
|---|
| 10 | // the Free Software Foundation; either version 2 of the License, or // |
|---|
| 11 | // (at your option) any later version. // |
|---|
| 12 | // // |
|---|
| 13 | // You may not change or alter any portion of this comment or credits // |
|---|
| 14 | // of supporting developers from this source code or any supporting // |
|---|
| 15 | // source code which is considered copyrighted (c) material of the // |
|---|
| 16 | // original comment or credit authors. // |
|---|
| 17 | // // |
|---|
| 18 | // This program is distributed in the hope that it will be useful, // |
|---|
| 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of // |
|---|
| 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
|---|
| 21 | // GNU General Public License for more details. // |
|---|
| 22 | // // |
|---|
| 23 | // You should have received a copy of the GNU General Public License // |
|---|
| 24 | // along with this program; if not, write to the Free Software // |
|---|
| 25 | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // |
|---|
| 26 | // ------------------------------------------------------------------------ // |
|---|
| 27 | // Author: Kazumi Ono (AKA onokazu) // |
|---|
| 28 | // URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ // |
|---|
| 29 | // Project: The XOOPS Project (http://www.xoops.org/) // |
|---|
| 30 | // ------------------------------------------------------------------------- // |
|---|
| 31 | |
|---|
| 32 | if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) { |
|---|
| 33 | exit(); |
|---|
| 34 | } |
|---|
| 35 | include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php'; |
|---|
| 36 | $com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0; |
|---|
| 37 | $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : ''; |
|---|
| 38 | if ($com_mode == '') { |
|---|
| 39 | if (is_object($xoopsUser)) { |
|---|
| 40 | $com_mode = $xoopsUser->getVar('umode'); |
|---|
| 41 | } else { |
|---|
| 42 | $com_mode = $xoopsConfig['com_mode']; |
|---|
| 43 | } |
|---|
| 44 | } |
|---|
| 45 | if (!isset($_GET['com_order'])) { |
|---|
| 46 | if (is_object($xoopsUser)) { |
|---|
| 47 | $com_order = $xoopsUser->getVar('uorder'); |
|---|
| 48 | } else { |
|---|
| 49 | $com_order = $xoopsConfig['com_order']; |
|---|
| 50 | } |
|---|
| 51 | } else { |
|---|
| 52 | $com_order = intval($_GET['com_order']); |
|---|
| 53 | } |
|---|
| 54 | $comment_handler =& xoops_gethandler('comment'); |
|---|
| 55 | $comment =& $comment_handler->get($com_id); |
|---|
| 56 | $r_name = XoopsUser::getUnameFromId($comment->getVar('com_uid')); |
|---|
| 57 | |
|---|
| 58 | //added By viva !!indicated by kamagasako m(_@_)m!! (2006/06/08) ---> |
|---|
| 59 | if ($r_name == $GLOBALS['xoopsConfig']['anonymous']) { |
|---|
| 60 | $r_name = $comment->getVar('com_poster_name'); |
|---|
| 61 | } |
|---|
| 62 | //added By viva !!indicated by kamagasako m(_@_)m!! (2006/06/08) <--- |
|---|
| 63 | |
|---|
| 64 | $r_text = _CM_POSTER.': <b>'.$r_name.'</b> '._CM_POSTED.': <b>'.formatTimestamp($comment->getVar('com_created')).'</b><br /><br />'.$comment->getVar('com_text');$com_title = $comment->getVar('com_title', 'E'); |
|---|
| 65 | if (!preg_match("/^re:/i", $com_title)) { |
|---|
| 66 | $com_title = "Re: ".xoops_substr($com_title, 0, 56); |
|---|
| 67 | } |
|---|
| 68 | $com_pid = $com_id; |
|---|
| 69 | $com_text = ''; |
|---|
| 70 | $com_id = 0; |
|---|
| 71 | $dosmiley = 1; |
|---|
| 72 | $dohtml = 0; |
|---|
| 73 | $doxcode = 1; |
|---|
| 74 | $dobr = 1; |
|---|
| 75 | $doimage = 1; |
|---|
| 76 | $com_icon = ''; |
|---|
| 77 | $com_rootid = $comment->getVar('com_rootid'); |
|---|
| 78 | $com_itemid = $comment->getVar('com_itemid'); |
|---|
| 79 | //added By viva(2005/12/25) ---> |
|---|
| 80 | $com_poster_name = ''; |
|---|
| 81 | //added By viva(2005/12/25) <--- |
|---|
| 82 | include XOOPS_ROOT_PATH.'/header.php'; |
|---|
| 83 | themecenterposts($comment->getVar('com_title'), $r_text); |
|---|
| 84 | include XOOPS_ROOT_PATH.'/include/comment_form.php'; |
|---|
| 85 | include XOOPS_ROOT_PATH.'/footer.php'; |
|---|
| 86 | ?> |
|---|