XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
comment_new.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_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
31 if ($com_itemid > 0) {
32  include_once $GLOBALS['xoops']->path('header.php');
33  if (isset($com_replytitle)) {
34  if (isset($com_replytext)) {
35  echo '<table cellpadding="4" cellspacing="1" width="98%" class="outer">
36  <tr><td class="head">' . $com_replytitle . '</td></tr>
37  <tr><td><br />' . $com_replytext . '<br /></td></tr>
38  </table>';
39  }
41  $com_title = $myts->htmlSpecialChars($com_replytitle);
42  if (!preg_match("/^" . _RE . "/i", $com_title)) {
43  $com_title = _RE . " " . xoops_substr($com_title, 0, 56);
44  }
45  } else {
46  $com_title = '';
47  }
48  $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
49  if ($com_mode == '') {
50  if (is_object($xoopsUser)) {
51  $com_mode = $xoopsUser->getVar('umode');
52  } else {
53  $com_mode = $xoopsConfig['com_mode'];
54  }
55  }
56  if (!isset($_GET['com_order'])) {
57  if (is_object($xoopsUser)) {
58  $com_order = $xoopsUser->getVar('uorder');
59  } else {
60  $com_order = $xoopsConfig['com_order'];
61  }
62  } else {
63  $com_order = intval($_GET['com_order']);
64  }
65  $com_id = 0;
66  $noname = 0;
67  $dosmiley = 1;
68  $dohtml = 0;
69  $dobr = 1;
70  $doxcode = 1;
71  $com_icon = '';
72  $com_pid = 0;
73  $com_rootid = 0;
74  $com_text = '';
75  // Start Add by voltan
76  $com_user = '';
77  $com_email = '';
78  $com_url = '';
79  // End Add by voltan
80  include_once $GLOBALS['xoops']->path('include/comment_form.php');
81  include_once $GLOBALS['xoops']->path('footer.php');
82 }
83 
84 ?>