XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
comment_edit.php
Go to the documentation of this file.
1 <?php
20 if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
21  die('Restricted access');
22 }
23 
24 include_once $GLOBALS['xoops']->path('include/comment_constants.php');
25 
26 if (('system' != $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) || (! is_object($xoopsUser) && ! $xoopsModuleConfig['com_anonpost']) || ! is_object($xoopsModule)) {
27  redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM);
28 }
29 
30 xoops_loadLanguage('comment');
31 
32 $com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
33 $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
34 
35 if ($com_mode == '') {
36  if (is_object($xoopsUser)) {
37  $com_mode = $xoopsUser->getVar('umode');
38  } else {
39  $com_mode = $xoopsConfig['com_mode'];
40  }
41 }
42 
43 if (!isset($_GET['com_order'])) {
44  if (is_object($xoopsUser)) {
45  $com_order = $xoopsUser->getVar('uorder');
46  } else {
47  $com_order = $xoopsConfig['com_order'];
48  }
49 } else {
50  $com_order = intval($_GET['com_order']);
51 }
52 
57 $dohtml = $comment->getVar('dohtml');
58 $dosmiley = $comment->getVar('dosmiley');
59 $dobr = $comment->getVar('dobr');
60 $doxcode = $comment->getVar('doxcode');
61 $com_icon = $comment->getVar('com_icon');
62 $com_itemid = $comment->getVar('com_itemid');
63 $com_title = $comment->getVar('com_title', 'e');
64 $com_text = $comment->getVar('com_text', 'e');
65 $com_pid = $comment->getVar('com_pid');
66 $com_status = $comment->getVar('com_status');
67 $com_rootid = $comment->getVar('com_rootid');
68 // Start Add by voltan
69 $com_user = $comment->getVar('com_user');
70 $com_email = $comment->getVar('com_email');
71 $com_url = $comment->getVar('com_url');
72 // End Add by voltan
73 
74 if ($xoopsModule->getVar('dirname') != 'system') {
75  include $GLOBALS['xoops']->path('header.php');
76  include $GLOBALS['xoops']->path('include/comment_form.php');
77  include $GLOBALS['xoops']->path('footer.php');
78 } else {
80  include $GLOBALS['xoops']->path('include/comment_form.php');
82 }
83 
84 ?>