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