-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchives.php
More file actions
127 lines (87 loc) · 3.6 KB
/
archives.php
File metadata and controls
127 lines (87 loc) · 3.6 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php include_once "header.php" ?>
<!-- Content
================================================== -->
<div id="content-wrap">
<div class="row">
<div id="main" class="eight columns">
<section class="page">
<h2>Arsivler</h2>
<p class="lead">Blogla ilgili arsivler asagida bulunmaktadır.</p>
<div class="row archive-list">
<div class="twelve columns">
<h4>Son Eklenen 10 gönderi</h4>
<ul>
<?php
$sorgu = $db->query("SELECT id, yazi_baslik FROM main WHERE gosterim=1 ORDER BY yazi_tarih DESC LIMIT 0,10" , PDO::FETCH_ASSOC);
if($sorgu -> rowCount()){
foreach ($sorgu as $row) {
?>
<li><a href="single.php?gonderi=<?php echo $row['id'] ?>"><?php echo $row['yazi_baslik'] ?></a></li>
<?php } } ?>
</ul>
</div>
<div class="twelve columns">
<h4>Aylara göre arsiv</h4>
<ul>
<?php
$degisken;
$sorgu = $db ->query("SELECT yazi_tarih FROM main ORDER BY yazi_tarih DESC ",PDO::FETCH_ASSOC);
if($sorgu -> rowCount()){
foreach ($sorgu as $row) {
$tarih = substr($row['yazi_tarih'],0,7);
if (empty($degisken) OR $degisken != $tarih){
print "<li><a href='index.php?tarih=".$tarih."'>$tarih</a></li>";
}
$degisken=$tarih;
?>
<?php
}
}
?>
</ul>
</div>
</div> <!-- end row -->
<div class="row archive-list">
<div class="twelve columns">
<h4>Kategori Arsivleri</h4>
<?php
$sorgu = $db->query("SELECT kategoriler.id , kategoriler.Kategori_Adi,COUNT(*) as sayi
FROM kategoriler INNER JOIN main ON
kategoriler.id=main.kategori_id
GROUP BY main.kategori_id ORDER BY sayi DESC" , PDO::FETCH_ASSOC);
if($sorgu -> rowCount()){
foreach ($sorgu as $row) {
?>
<li><a href="index.php?kategori=<?php echo $row['id'] ?>" title=""><?php echo $row['Kategori_Adi'] ?></a> (<?php echo $row['sayi'] ?>)</li>
<?php
}
}
?>
</div>
<div class="twelve columns">
<br>
<h4>Site Haritası</h4>
<ul>
<li><a href="index.php">Home</a></li>
<li><a href="blog.php">Blog</a></li>
<li><a href="archives.php">Archives</a></li>
<li><a href="page.php">Page</a></li>
</ul>
</div>
</div>
</section> <!-- End page -->
</div> <!-- End main -->
<?php include_once "sidebar.php" ?>
</div> <!-- end row -->
</div> <!-- end content-wrap -->
<!-- Footer
================================================== -->
<?php include_once "footer.php" ?>
<!-- Java Script
================================================== -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/jquery-1.10.2.min.js"><\/script>')</script>
<script type="text/javascript" src="js/jquery-migrate-1.2.1.min.js"></script>
<script src="js/main.js"></script>
</body>
</html>