XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
comment_reply.php
Go to the documentation of this file.
1 <?php
20 defined('XOOPS_ROOT_PATH') or die('Restricted access');
21 
22 include_once $GLOBALS['xoops']->path('include/comment_constants.php');
23 
24 if (('system' != $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) || (! is_object($xoopsUser) && ! $xoopsModuleConfig['com_anonpost']) || ! is_object($xoopsModule)) {
25  redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM);
26 }
27 
28 xoops_loadLanguage('comment');
29 
30 $com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
31 $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
32 if ($com_mode == '') {
33  if (is_object($xoopsUser)) {
34  $com_mode = $xoopsUser->getVar('umode');
35  } else {
36  $com_mode = $xoopsConfig['com_mode'];
37  }
38 }
39 if (!isset($_GET['com_order'])) {
40  if (is_object($xoopsUser)) {
41  $com_order = $xoopsUser->getVar('uorder');
42  } else {
43  $com_order = $xoopsConfig['com_order'];
44  }
45 } else {
46  $com_order = intval($_GET['com_order']);
47 }
50 
51 // Start edit by voltan
52 if($comment->getVar('com_uid') == 0 && $comment->getVar('com_user') != '') {
53  $r_name = $comment->getVar('com_user');
54 } else {
55  $r_name = XoopsUser::getUnameFromId($comment->getVar('com_uid'));
56 }
57 // End edit by voltan
58 
59 $r_text = _CM_POSTER . ': <strong>' . $r_name . '</strong>&nbsp;&nbsp;' . _CM_POSTED . ': <strong>' . formatTimestamp($comment->getVar('com_created')) . '</strong><br /><br />' . $comment->getVar('com_text');
60 $com_title = $comment->getVar('com_title', 'E');
61 if (!preg_match("/^" . _RE . "/i", $com_title)) {
62  $com_title = _RE . " " . xoops_substr($com_title, 0, 56);
63 }
65 $com_text = '';
66 $com_id = 0;
68 $dohtml = 0;
70 $dobr = 1;
72 $com_icon = '';
73 $com_rootid = $comment->getVar('com_rootid');
74 $com_itemid = $comment->getVar('com_itemid');
75 // Start Add by voltan
76 $com_user = '';
78 $com_url = '';
79 // End Add by voltan
80 
81 include_once $GLOBALS['xoops']->path('header.php');
82 echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer">
83  <tr><td class="head">' . $comment->getVar('com_title') . '</td></tr>
84  <tr><td><br />' . $r_text . '<br /></td></tr>
85  </table>';
86 include_once $GLOBALS['xoops']->path('include/comment_form.php');
87 include_once $GLOBALS['xoops']->path('footer.php');
88 ?>