-
Notifications
You must be signed in to change notification settings - Fork 1
/
news.php
78 lines (58 loc) · 1.82 KB
/
news.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
require 'config.php';
require 'classes/Session.class.php';
require 'classes/Player.class.php';
require 'classes/Storyline.class.php';
require 'classes/News.class.php';
$session = new Session();
$system = new System();
ob_start();
require 'template/contentStart.php';
$news = new News();
$newsStr = 'active';
$titleStr = '';
$gotNew = 0;
if($system->issetGet('id')){
$idInfo = $system->verifyNumericGet('id');
if($idInfo['IS_NUMERIC'] == 0){
$system->handleError('Invalid ID', 'news.php');
}
if(!$news->newsIsset($idInfo['GET_VALUE'])){
$system->handleError('This news does not exists.', 'news.php');
}
$titleStr = 'active';
$newsStr = '';
$gotNew = 1;
}
?>
<div class="span12">
<div class="widget-box">
<div class="widget-title">
<ul class="nav nav-tabs">
<li class="link <?php echo $newsStr; ?>"><a href="news.php"><span class="he16-news icon-tab"></span>News</a></li>
<?php
if($gotNew == 1){
?>
<li class="link <?php echo $titleStr; ?>"><a href="news?id=<?php echo $idInfo['GET_VALUE']; ?>"><span class="he16-news_list icon-tab"></span><?php echo $news->getTitle(); ?></a></li>
<?php
}
?>
<a href="#"><span class="label label-info"><?php echo _("Help"); ?></span></a>
</ul>
</div>
<div class="widget-content padding noborder">
<?php
if($gotNew == 0){
$news->news_list();
} else {
$news->show();
}
?>
</div>
<div style="clear: both;" class="nav nav-tabs"> </div>
<?php
ob_end_flush();
ob_start();
require 'template/contentEnd.php';
ob_end_flush();
?>