-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathshowForum.php
58 lines (56 loc) · 1.4 KB
/
showForum.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
<?php
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
$id = (int) $_GET['id'];
$forum = simplexml_load_file('forums.xml')->xpath("//forum[@id='$id']");
if ($forum) {
$name = $forum[0]->name;
$desc = $forum[0]->desc;
}
if (isset($_GET['page']) && is_numeric($_GET['page'])) {
$pageNum = $_GET['page'];
}
else {
$pageNum = 1;
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo $name; ?></title>
<?php include("../../../includes/defaultMobile.php"); ?>
<script type="text/javascript" src = "includes/ga_tracking.js"></script>
</head>
<body>
<div data-role="page">
<!--Header-->
<?php
$title = $name;
include("includes/header.php");
?>
<!--/Header-->
<!--Body-->
<div data-role="content">
<?php if ($name != "") {?>
<!--Threads-->
<ul data-role="listview">
<!--Intro -->
<li><h3><?php echo $name; ?></h3><p><?php echo $desc; ?></p></li>
<!--/Intro-->
<li data-role = "list-divider">Threads</li>
<?php include("parsers/threadListParser.php"); ?>
</ul>
<?php include('includes/paginationFooter.php'); ?>
<!--/Threads-->
<?php
}
else
{
echo "<h3>Error</h3><p>The requested forum was not found.";
}
?>
</div>
<!--/Body -->
</div>
</body>
</html>
<?php } ?>