source: temp/test-xoops.ec-cube.net/html/include/comment_new.php @ 405

Revision 405, 3.9 KB checked in by root, 20 years ago (diff)
Line 
1<?php
2// $Id: comment_new.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
32if (!defined('XOOPS_ROOT_PATH') || !is_object($xoopsModule)) {
33    exit();
34}
35
36include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
37if ('system' != $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) {
38    exit();
39}
40
41include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
42$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
43
44if ($com_itemid > 0) {
45    include XOOPS_ROOT_PATH.'/header.php';
46    if (isset($com_replytitle)) {
47        if (isset($com_replytext)) {
48            themecenterposts($com_replytitle, $com_replytext);
49        }
50        $myts =& MyTextSanitizer::getInstance();
51        $com_title = $myts->htmlSpecialChars($com_replytitle);
52        if (!preg_match("/^re:/i", $com_title)) {
53            $com_title = "Re: ".xoops_substr($com_title, 0, 56);
54        }
55    } else {
56        $com_title = '';
57    }
58    $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
59    if ($com_mode == '') {
60        if (is_object($xoopsUser)) {
61            $com_mode = $xoopsUser->getVar('umode');
62        } else {
63            $com_mode = $xoopsConfig['com_mode'];
64        }
65    }
66   
67    if (!isset($_GET['com_order'])) {
68        if (is_object($xoopsUser)) {
69            $com_order = $xoopsUser->getVar('uorder');
70        } else {
71            $com_order = $xoopsConfig['com_order'];
72        }
73    } else {
74        $com_order = intval($_GET['com_order']);
75    }
76    $com_id = 0;
77    $noname = 0;
78    $dosmiley = 1;
79    $dohtml = 0;
80    $dobr = 1;
81    $doxcode = 1;
82    $com_icon = '';
83    $com_pid = 0;
84    $com_rootid = 0;
85    $com_text = '';
86
87    //Modified By viva(2005/12/25) --->
88    $com_poster_name = '';
89    //Modified By viva(2005/12/25) <---
90
91    include XOOPS_ROOT_PATH.'/include/comment_form.php';
92    include XOOPS_ROOT_PATH.'/footer.php';
93}
94?>
Note: See TracBrowser for help on using the repository browser.