-
Notifications
You must be signed in to change notification settings - Fork 1
/
admin_pjt_cate.php
64 lines (52 loc) · 1.4 KB
/
admin_pjt_cate.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
<?php
require_once "session_inc.php";
require_once "header.inc.php";
require_once "dbconnect.php";
//set up some SQL statements
$sql["language"] = 'SELECT * from languages';
try {
$dbq = db_connect();
?>
<div id="wrapper">
<?php
include "nav_part.inc.php";
?>
<div id="page-wrapper">
<h1>Category Information</h1>
<table id="pjt_cate_tbl" class="table table-bordered table-hover table-striped tablesorter">
<thead>
<tr>
<th>Category Title</th>
<th>Category Description</th>
<th>Category Language</th>
</tr>
</thead>
<tbody>
<?php
$pre_result = $dbq->prepare("select categoryTitle, categoryDescription, categoryLanguage from category");
$pre_result->execute();
while ($row = $pre_result->fetch(PDO::FETCH_ASSOC)) {
// print_r($row);
printf('<tr><td>%s</td><td>%s</td><td>%s</td></tr>', $row['categoryTitle'],$row['categoryDescription'] ? $row['categoryDescription'] : "No information provided", "placeholder");
}
?>
</tbody>
</table>
</div>
<?
// logout form
require_once "logout_form.inc.php";
?>
</div>
<?
//close connection
$dbq = NULL;
} catch (PDOException $e) {
print ("getMessage(): " . $e->getMessage () . "\n");
}
?>
<!-- include js files -->
<?php
$active = "Category";
include "footer.inc.php";
?>