Revision 190, 0.9 KB
(checked in by exi, 15 years ago)
|
This is a big update...
Moved all admin scripts to common/admin.
Moved all includes and classes to common/includes.
Edited all include-paths to reflect the movement.
Fixed a bug with the session system allowing every registered user to access admin pages.
Replaced calls to date() to use a wrapper so gmdate can be used.
Replaced some calls to $config with calls to the static object.
Fixed a big which caused the portrait_grab to not download a new picute.
Added a classified-state to kills.
Removed the sync_server server script in this tree.
Added code to help modules find the includes to index.php.
|
Line | |
---|
1 | <?php |
---|
2 | require_once('common/includes/class.comments.php'); |
---|
3 | |
---|
4 | $comments = new Comments($kll_id); |
---|
5 | if (isset($_POST['comment'])) |
---|
6 | { |
---|
7 | $pw = false; |
---|
8 | if (!$config->getConfig('comments_pw') || $page->isAdmin()) |
---|
9 | { |
---|
10 | $pw = true; |
---|
11 | } |
---|
12 | if ($_POST['password'] == $config->getPostPassword() || $pw) |
---|
13 | { |
---|
14 | if ($_POST['comment'] == '') |
---|
15 | { |
---|
16 | $html .= 'Error: Silent type hey? good for you, bad for a comment.'; |
---|
17 | } |
---|
18 | else |
---|
19 | { |
---|
20 | $comment = $_POST['comment']; |
---|
21 | $name = $_POST['name']; |
---|
22 | if ($name == null) |
---|
23 | { |
---|
24 | $name = 'Anonymous'; |
---|
25 | } |
---|
26 | $comments->addComment($name, $comment); |
---|
27 | } |
---|
28 | } |
---|
29 | else |
---|
30 | { |
---|
31 | // Password is wrong |
---|
32 | $html .= 'Error: Wrong Password'; |
---|
33 | } |
---|
34 | } |
---|
35 | |
---|
36 | $smarty->assign_by_ref('page', $page); |
---|
37 | |
---|
38 | $comment = $comments->getComments(); |
---|
39 | ?> |
---|