/
blog_listesi.php
104 lines (102 loc) · 7.43 KB
/
blog_listesi.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
96
97
98
99
100
101
102
103
104
<?
defined('_ADMIN_GIRDI') or die('Erişim engellendi.');
if(canUserAccessAdminArea()) {
?>
<h1 class="page-title"></h1>
<div class="row">
<div class="col-md-12">
<div class="portlet light portlet-fit bordered">
<div class="portlet-title">
<div class="caption">
<span class="caption-subject font-dark bold uppercase">Blog Listesi</span>
</div>
</div>
<div class="portlet-body">
<? require("islemsonucu.php"); ?>
<table class="table table-striped table-bordered table-hover table-checkable order-column" id="sample_1">
<thead>
<tr>
<th width="5%">
<label>
<span>#</span>
</label>
</th>
<th width="15%">Resim</th>
<th width="30%">Blog Başlık</th>
<th width="15%">Blog Tarih</th>
<th width="10%">Durum</th>
<th width="15%">İşlemler</th>
</tr>
</thead>
<tbody>
<?php
$blog_x=0;
$sql="SELECT * from blog order by sira asc";
$blogler = $db->get_results($sql,ARRAY_A);
if($db->num_rows > 0)
{
foreach ($blogler as $blog)
{
?>
<tr>
<!-- <td></td> -->
<td style="vertical-align: middle;"><?=($blog_x+1);?></td>
<td>
<?
if (($blog["resim_kucuk"]!="") and file_exists("../upload/".$blog["resim_kucuk"]))
{
$boyut=getimagesize("../upload/".$blog["resim_kucuk"]);
$width=$boyut[0];
$height=$boyut[1];
$w=100;
$h=floor($w*$height/$width);
echo '<img width="'.$w.'" height="'.$h.'" src="../upload/'.$blog["resim_kucuk"].'" class="img" />';
}
?>
</td>
<td style="vertical-align: middle;">
<?=$blog["blog_baslik_tr"];?>
</td>
<td style="vertical-align: middle;">
<?=$blog["blog_tarih"];?>
</td>
<td style="vertical-align: middle;">
<?php
if ($blog["blog_aktif"]=="1") {
$durum="Aktif";
$color="green-meadow";
} else{
$durum="Pasif";
$color="red";
}
?>
<a href="blog_durum.php?blog_id=<?=$blog["blog_id"]?>&blog_aktif=<?=$blog["blog_aktif"]?>" class="btn btn-sm <?=$color?>" title="Aktif/Pasif"><?=$durum?></a>
</td>
<td style="vertical-align: middle;">
<a href="admin.php?cmd=blog_guncelle&blog_id=<?=$blog["blog_id"]?>" class="btn btn-sm orange" title="Düzenle">
<i class="fa fa-edit"></i> Düzenle
</a>
<!-- <a href="admin.php?cmd=resim&tablo=blog&tablo_id=<?=$blog["blog_id"]?>" class="btn btn-sm blue" title="blog Resimleri">
<i class="fa fa-image"></i>
</a> -->
<a href="blog_sil.php?blog_id=<?=$blog["blog_id"]?>" class="btn btn-sm red" title="Sil" onclick="return confirmDel();">
<i class="fa fa-trash"></i> Sil
</a>
</td>
</tr>
<?php
$blog_x++;
}
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<?php } ?>