-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathnews.php
56 lines (47 loc) · 1.4 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
<?php
//Check if the config.php file has already been created.
//If so, include it, otherwise display an error message
if (file_exists('config.php')) {
include_once('config.php');
} else {
$_SESSION['errors']['general'] = $lang['error']['config'];
}
//If the system is installed, proceed
//'INSTALLED' is defined in the config.php file
//If the system is not installed, navigate to the install page
if (defined('INSTALLED')) {
//includes.php
include_once('includes/includes.php');
include_once('includes/functions.php');
} else {
// If the config file exists, but the system is not installed, throw an error and redirect to the install directory
$_SESSION['errors']['install'] = $lang['error']['install']['not_installed'];
header("Location: install/index.php");
}
$newsID = $_GET['newsID'];
$newsTitle = '';
$newsDetails = '';
switch($newsID){
case 1:{
$newsTitle = $newsTitle1;
$newsDetails = $newsDetails1;
break;
}
case 2:{
$newsTitle = $newsTitle2;
$newsDetails = $newsDetails2;
break;
}
case 3:{
$newsTitle = $newsTitle3;
$newsDetails = $newsDetails3;
break;
}
}
//These php files generate the html content to display
include_once('themes/'.$theme.'/views/header.php');
include_once('themes/'.$theme.'/views/navbar.php');
include_once('themes/'.$theme.'/views/news.php');
include_once('themes/'.$theme.'/views/footer.php');
echo $output;
?>