-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
95 lines (78 loc) · 2.98 KB
/
index.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php
include('inc/header.php');
include('func.php') ;
?>
<body>
<?php include('inc/navbar.php') ?>
<!-- Page Content -->
<div class="container">
<div class="row">
<!-- Blog Entries Column -->
<div class="col-md-8">
<h1 class="page-header">
Page Heading
<small>Secondary Text</small>
</h1>
<?php include('post_blog.php') ?>
<!-- Pager -->
<ul class="pager">
<li class="previous">
<a href="#">← Older</a>
</li>
<li class="next">
<a href="#">Newer →</a>
</li>
</ul>
</div>
<!-- Blog Sidebar Widgets Column -->
<div class="col-md-4">
<!-- Blog Search Well -->
<div class="well">
<h4>Blog Search</h4>
<div class="input-group">
<form action="search.php" method="post">
<input name="search" type="text" class="form-control">
<span class="input-group-btn">
<button class="btn btn-default" type="submit" name="submit">
<span class="glyphicon glyphicon-search"></span>
</button>
</span>
</div>
</form>
<!-- /.input-group -->
</div>
<!-- Blog Categories Well -->
<div class="well">
<h4>Blog Categories</h4>
<div class="row">
<div class="col-lg-12">
<ul class="list-unstyled">
<?php
$tablename = "danhmuc"; // tabel cần get trong mysql
$tableReader = new TableReader($connectdb);
$query = "SELECT * FROM `$tablename`";
$rows = $tableReader->getAllRows($tablename , $query);
foreach ($rows as $row) {
$title_danhmuc = $row['title_danhmuc']; // Thay 'id' bằng tên cột chứa ID trong bảng
echo "<li><a href='#'>{$title_danhmuc}</a></li>";
}
?>
</ul>
</div>
</div>
<!-- /.row -->
</div>
<!-- Side Widget Well -->
<div class="well">
<h4>Side Widget Well</h4>
<p><a href="admin">AdminCP</a></p>
</div>
</div>
</div>
<!-- /.row -->
<hr>
<?php include('inc/footer.php') ?>
</div>
<!-- /.container -->
</body>
</html>