root/dev/common/comments.php @ 212

Revision 212, 0.9 KB (checked in by ralle030583, 16 years ago)

- replaced $config->getConfig with config::getconfig so we havent a mix in all files<br>
- added valing='top' to award boxes to make the awards nice in board with not many pilots<br>
- removed not needed includes<br>
- added event 'killmail_delete' which is called before real delete of a killmail<br>
- admin can see classified system in the killmaildetails

Line 
1<?php
2require_once('common/includes/class.comments.php');
3
4$comments = new Comments($kll_id);
5if (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?>
Note: See TracBrowser for help on using the browser.