home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / CMS / xoops-2.0.18.1.exe / xoops-2.0.18.1 / htdocs / include / comment_new.php < prev    next >
Encoding:
PHP Script  |  2007-10-24  |  4.0 KB  |  89 lines

  1. <?php
  2. // $Id: comment_new.php 1130 2007-10-24 10:16:06Z dugris $
  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')) {
  33.     die("XOOPS root path not defined");
  34. }
  35. include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
  36. if ( ('system' != $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) || (!is_object($xoopsUser) && !$xoopsModuleConfig['com_anonpost']) || !is_object($xoopsModule) ) {
  37.     redirect_header(XOOPS_URL . '/user.php', 1, _NOPERM);
  38. }
  39.  
  40. include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
  41. $com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
  42.  
  43. if ($com_itemid > 0) {
  44.     include XOOPS_ROOT_PATH.'/header.php';
  45.     if (isset($com_replytitle)) {
  46.         if (isset($com_replytext)) {
  47.             themecenterposts($com_replytitle, $com_replytext);
  48.         }
  49.         $myts =& MyTextSanitizer::getInstance();
  50.         $com_title = $myts->htmlSpecialChars($com_replytitle);
  51.         if (!preg_match("/^(Re|"._CM_RE."):/i", $com_title)) {
  52.             $com_title = _CM_RE.": ".xoops_substr($com_title, 0, 56);
  53.         }
  54.     } else {
  55.         $com_title = '';
  56.     }
  57.     $com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
  58.     if ($com_mode == '') {
  59.         if (is_object($xoopsUser)) {
  60.             $com_mode = $xoopsUser->getVar('umode');
  61.         } else {
  62.             $com_mode = $xoopsConfig['com_mode'];
  63.         }
  64.     }
  65.  
  66.     if (!isset($_GET['com_order'])) {
  67.         if (is_object($xoopsUser)) {
  68.             $com_order = $xoopsUser->getVar('uorder');
  69.         } else {
  70.             $com_order = $xoopsConfig['com_order'];
  71.         }
  72.     } else {
  73.         $com_order = intval($_GET['com_order']);
  74.     }
  75.     $com_id = 0;
  76.     $noname = 0;
  77.     $dosmiley = 1;
  78.     $dohtml = 0;
  79.     $dobr = 1;
  80.     $doxcode = 1;
  81.     $com_icon = '';
  82.     $com_pid = 0;
  83.     $com_rootid = 0;
  84.     $com_text = '';
  85.  
  86.     include XOOPS_ROOT_PATH.'/include/comment_form.php';
  87.     include XOOPS_ROOT_PATH.'/footer.php';
  88. }
  89. ?>