| 
      1
     | 
    
      <?php
 
     | 
  
  
    | 
      2
     | 
    
      /**
 
     | 
  
  
    | 
      3
     | 
    
       *
 
     | 
  
  
    | 
      4
     | 
    
       * @category        modules
 
     | 
  
  
    | 
      5
     | 
    
       * @package         news
 
     | 
  
  
    | 
      6
     | 
    
       * @author          WebsiteBaker Project
 
     | 
  
  
    | 
      7
     | 
    
       * @copyright       WebsiteBaker Org. e.V.
 
     | 
  
  
    | 
      8
     | 
    
       * @link            http://websitebaker.org/
 
     | 
  
  
    | 
      9
     | 
    
       * @license         http://www.gnu.org/licenses/gpl.html
 
     | 
  
  
    | 
      10
     | 
    
       * @platform        WebsiteBaker 2.8.3
 
     | 
  
  
    | 
      11
     | 
    
       * @requirements    PHP 5.3.6 and higher
 
     | 
  
  
    | 
      12
     | 
    
       * @version         $Id: add.php 2 2017-07-02 15:14:29Z Manuela $
 
     | 
  
  
    | 
      13
     | 
    
       * @filesource      $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/trunk/modules/news/add.php $
 
     | 
  
  
    | 
      14
     | 
    
       * @lastmodified    $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
 
     | 
  
  
    | 
      15
     | 
    
       *
 
     | 
  
  
    | 
      16
     | 
    
       */
 
     | 
  
  
    | 
      17
     | 
    
      /* -------------------------------------------------------- */
 
     | 
  
  
    | 
      18
     | 
    
      // Must include code to stop this file being accessed directly
 
     | 
  
  
    | 
      19
     | 
    
      if(!defined('WB_PATH')) {
     | 
  
  
    | 
      20
     | 
    
          require_once(dirname(dirname(dirname(__FILE__))).'/framework/globalExceptionHandler.php');
 
     | 
  
  
    | 
      21
     | 
    
          throw new IllegalFileException();
 
     | 
  
  
    | 
      22
     | 
    
      } else {
     | 
  
  
    | 
      23
     | 
    
          $header = '<table class="loop-header">'."\n";
 
     | 
  
  
    | 
      24
     | 
    
          $post_loop = '<tr class="post-top">
 
     | 
  
  
    | 
      25
     | 
    
          <td class="post-title"><a href="[LINK]">[TITLE]</a></td>
 
     | 
  
  
    | 
      26
     | 
    
          <td class="post-date">[PUBLISHED_DATE], [PUBLISHED_TIME]</td>
 
     | 
  
  
    | 
      27
     | 
    
          </tr>
 
     | 
  
  
    | 
      28
     | 
    
          <tr>
 
     | 
  
  
    | 
      29
     | 
    
          <td class="post-short" colspan="2">
 
     | 
  
  
    | 
      30
     | 
    
          [SHORT]
 
     | 
  
  
    | 
      31
     | 
    
          <h3 style="visibility:[SHOW_READ_MORE];"><a href="[LINK]">[TEXT_READ_MORE]</a></h3>
 
     | 
  
  
    | 
      32
     | 
    
          </td>
 
     | 
  
  
    | 
      33
     | 
    
          </tr>';
 
     | 
  
  
    | 
      34
     | 
    
          $footer = '</table>
 
     | 
  
  
    | 
      35
     | 
    
          <table  class="page-header" style="display: [DISPLAY_PREVIOUS_NEXT_LINKS]">
 
     | 
  
  
    | 
      36
     | 
    
          <tr>
 
     | 
  
  
    | 
      37
     | 
    
          <td class="page-left">[PREVIOUS_PAGE_LINK]</td>
 
     | 
  
  
    | 
      38
     | 
    
          <td class="page-center">[OF]</td>
 
     | 
  
  
    | 
      39
     | 
    
          <td class="page-right">[NEXT_PAGE_LINK]</td>
 
     | 
  
  
    | 
      40
     | 
    
          </tr>
 
     | 
  
  
    | 
      41
     | 
    
          </table>';
 
     | 
  
  
    | 
      42
     | 
    
          $post_header = ('<table  class="post-header">
     | 
  
  
    | 
      43
     | 
    
          <tr>
 
     | 
  
  
    | 
      44
     | 
    
          <td><h1>[TITLE]</h1></td>
 
     | 
  
  
    | 
      45
     | 
    
          <td rowspan="3" style="display: [DISPLAY_IMAGE]">[GROUP_IMAGE]</td>
 
     | 
  
  
    | 
      46
     | 
    
          </tr>
 
     | 
  
  
    | 
      47
     | 
    
          <tr>
 
     | 
  
  
    | 
      48
     | 
    
          <td class="public-info"><b>[TEXT_POSTED_BY] [DISPLAY_NAME] [TEXT_ON] [PUBLISHED_DATE]</b></td>
 
     | 
  
  
    | 
      49
     | 
    
          </tr>
 
     | 
  
  
    | 
      50
     | 
    
          <tr style="display: [DISPLAY_GROUP]">
 
     | 
  
  
    | 
      51
     | 
    
          <td class="group-page"><a href="[BACK]">[PAGE_TITLE]</a> >> <a href="[BACK]?g=[GROUP_ID]">[GROUP_TITLE]</a></td>
 
     | 
  
  
    | 
      52
     | 
    
          </tr>
 
     | 
  
  
    | 
      53
     | 
    
          </table>');
 
     | 
  
  
    | 
      54
     | 
    
          $post_footer = '<p>[TEXT_LAST_CHANGED]: [MODI_DATE] [TEXT_AT] [MODI_TIME]</p>
 
     | 
  
  
    | 
      55
     | 
    
          <a href="[BACK]">[TEXT_BACK]</a>';
 
     | 
  
  
    | 
      56
     | 
    
          $comments_header = ('<br /><br />
     | 
  
  
    | 
      57
     | 
    
          <h2>[TEXT_COMMENTS]</h2>
 
     | 
  
  
    | 
      58
     | 
    
          <table cellpadding="2" cellspacing="0" class="comment-header">');
 
     | 
  
  
    | 
      59
     | 
    
          $comments_loop = ('<tr>
     | 
  
  
    | 
      60
     | 
    
          <td class="comment_title">[TITLE]</td>
 
     | 
  
  
    | 
      61
     | 
    
          <td class="comment_info">[TEXT_BY] [DISPLAY_NAME] [TEXT_ON] [DATE] [TEXT_AT] [TIME]</td>
 
     | 
  
  
    | 
      62
     | 
    
          </tr>
 
     | 
  
  
    | 
      63
     | 
    
          <tr>
 
     | 
  
  
    | 
      64
     | 
    
          <td colspan="2" class="comment-text">[COMMENT]</td>
 
     | 
  
  
    | 
      65
     | 
    
          </tr>');
 
     | 
  
  
    | 
      66
     | 
    
          $comments_footer = '</table>
 
     | 
  
  
    | 
      67
     | 
    
          <br /><a href="[ADD_COMMENT_URL]">[TEXT_ADD_COMMENT]</a>';
 
     | 
  
  
    | 
      68
     | 
    
          $comments_page = '<h2>[TEXT_COMMENT]</h2>
 
     | 
  
  
    | 
      69
     | 
    
          <h2>[POST_TITLE]</h2>
 
     | 
  
  
    | 
      70
     | 
    
          <br />';
 
     | 
  
  
    | 
      71
     | 
    
          $commenting = 'none';
 
     | 
  
  
    | 
      72
     | 
    
          $use_captcha = true;
 
     | 
  
  
    | 
      73
     | 
    
          $sql = 'INSERT INTO `'.TABLE_PREFIX.'mod_news_settings` SET '
 
     | 
  
  
    | 
      74
     | 
    
               . '`section_id`='.$database->escapeString($section_id).', '
 
     | 
  
  
    | 
      75
     | 
    
               . '`page_id`='.$database->escapeString($page_id).', '
 
     | 
  
  
    | 
      76
     | 
    
               . '`header`=\''.$database->escapeString($header).'\', '
 
     | 
  
  
    | 
      77
     | 
    
               . '`post_loop`=\''.$database->escapeString($post_loop).'\', '
 
     | 
  
  
    | 
      78
     | 
    
               . '`footer`=\''.$database->escapeString($footer).'\', '
 
     | 
  
  
    | 
      79
     | 
    
               . '`posts_per_page`=5, '
 
     | 
  
  
    | 
      80
     | 
    
               . '`post_header`=\''.$database->escapeString($post_header).'\', '
 
     | 
  
  
    | 
      81
     | 
    
               . '`post_footer`=\''.$database->escapeString($post_footer).'\', '
 
     | 
  
  
    | 
      82
     | 
    
               . '`comments_header`=\''.$database->escapeString($comments_header).'\', '
 
     | 
  
  
    | 
      83
     | 
    
               . '`comments_loop`=\''.$database->escapeString($comments_loop).'\', '
 
     | 
  
  
    | 
      84
     | 
    
               . '`comments_footer`=\''.$database->escapeString($comments_footer).'\', '
 
     | 
  
  
    | 
      85
     | 
    
               . '`comments_page`=\''.$database->escapeString($comments_page).'\', '
 
     | 
  
  
    | 
      86
     | 
    
               . '`commenting`=\''.$database->escapeString($commenting).'\', '
 
     | 
  
  
    | 
      87
     | 
    
               . '`resize`=0, '
 
     | 
  
  
    | 
      88
     | 
    
               . '`use_captcha`='.$database->escapeString($use_captcha).' '
 
     | 
  
  
    | 
      89
     | 
    
               . ''.'';
 
     | 
  
  
    | 
      90
     | 
    
          $database->query( $sql );
 
     | 
  
  
    | 
      91
     | 
    
          }
 
     |