-
Notifications
You must be signed in to change notification settings - Fork 0
/
makale_ana.php
159 lines (152 loc) · 6.44 KB
/
makale_ana.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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
<?php
session_start();
//error_reporting(0);
include "vt_baglan.php";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="tr">
<head>
<title>Yazılım Defteri</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="css/reset.css" type="text/css" media="all">
<style type="text/css">
@import url("css/style.css");
body,td,th {
font-size: 36%;
}
</style>
<script type="text/javascript" src="js/jquery-1.4.2.min.js" ></script>
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/cufon-replace.js"></script>
<script type="text/javascript" src="js/cambria.cufonfonts.js" ></script>
<script type="text/javascript" src="js/Humanst521_BT_400.font.js"></script>
<script type="text/javascript" src="js/Humanst521_Lt_BT_400.font.js"></script>
<script type="text/javascript" src="js/roundabout.js"></script>
<script type="text/javascript" src="js/roundabout_shapes.js"></script>
<script type="text/javascript" src="js/gallery_init.js"></script>
</head>
<body>
<!-- START PAGE SOURCE -->
<header class="aligncenter">
<div class="container">
<h1>Yazılım Defteri</h1>
<nav>
<ul>
<li><a href="index.php" class="current">Anasayfa</a></li>
<li><a href="arama.php">Arama</a></li>
<li><a href="makale_ana.php"> Makaleler</a></li>
<li><a href="uye.php">Üyelik işlemleri</a></li>
</ul>
</nav>
</div>
</header>
<section id="gallery">
<div class="container">
<ul id="myRoundabout">
<li><img src="images/Untitled-1.jpg" alt=""></li>
<li><img src="images/Untitled-2.jpg" alt=""></li>
<li><img src="images/Untitled-5.jpg" alt=""></li>
<li><img src="images/Untitled-3.jpg" alt=""></li>
<li><img src="images/Untitled-4.jpg" alt=""></li>
</ul>
</div>
</section>
<div class="main-box">
<div class="container">
<br /> <br /> <br /> <br />
<div class="inside">
<?php
if (isset($_SESSION['kullanici'])) {
echo " <table width=\"223\"><tr><td>
<form name=\"form2\" method=\"post\" action=\"makale_paylas.php\">
<input type=\"submit\" value=\"Yeni Makale Ekleme\" /></form></td></tr>
</table>";
} else {
echo "<h2>Makale eklemek için üye girişi yapmış olmanız gereklidir!<br /></h2>";
}
$sql="SELECT count(*) FROM makale ";
$sonuc=$vt->query($sql);
$satirsayisi = $sonuc->fetch_array();
$limit = 3;
if (isset($_GET['sekme']) AND is_numeric($_GET["sekme"]))
{
if ($_GET['sekme']<1) {
$sekme=1;
}
else
{
$sekme = $_GET["sekme"];
}
}
else
{
$sekme=1;
}
$baslangic=($sekme - 1)* $limit;
$sql="SELECT * FROM makale order by zaman DESC LIMIT $baslangic,$limit";
$sonuc=$vt->query($sql);
$toplam=ceil($satirsayisi[0]/$limit);
echo " <table border=1>\r\n";
while($satir = $sonuc->fetch_assoc())
{
$makale_id = $satir["makale_id"];
$makale_idyaz = htmlentities($satir["makale_id"], ENT_QUOTES, 'UTF-8');
$yukleyen = $satir['yukleyen'];
$yukleyenyaz = htmlentities($satir['yukleyen'], ENT_QUOTES, "UTF-8");
$konu = $satir['konu'];
$konuyaz = htmlentities($satir["konu"],ENT_QUOTES,'utf-8');
$ozeti = $satir['ozeti'];
$ozetyaz = htmlentities($satir["ozeti"],ENT_QUOTES,'utf-8');
$zaman = $satir['zaman'];
$zamanyaz = htmlentities($satir["zaman"],ENT_QUOTES,'utf-8');
$yol = $satir['yol'];
$yolyaz = htmlentities($satir["yol"], ENT_QUOTES, 'UTF-8');
echo "<tr height='80'><td>Paylaşan</td><td>$yukleyenyaz</td></tr>\r\n";
echo "<tr><td>Konu</td><td>$konuyaz</td></tr>\r\n";
echo "<tr><td>Ozeti</td><td>$ozetyaz</td></tr>\r\n";
echo "<tr><td>Makale</td><td><a href='$yol'>indir</a></td></tr>\r\n";
echo "<tr><td>Paylaşım Tarihi</td><td>$zaman</td></tr>\r\n";
echo "<tr><td></td><td>";
echo "<form method='POST' action='makale_oku.php?makale_id=$makale_id'>\r\n";
echo "<input type=\"hidden\" name=\"yol\" value='$yol' >\r\n";
echo "<input type=\"hidden\" name=\"yukleyen\" value='$yukleyen' >\r\n";
echo "<input type=\"hidden\" name=\"konu\" value='$konu' >\r\n";
echo "<input type=\"hidden\" name=\"zaman\" value='$zaman' >\r\n";
echo "<input type=\"submit\" value=\"detay\">";
echo "</form>\r\n";
echo "</td></tr>\r\n";
}
echo "</table>\r\n";
if(!empty($sekme))
{
if($sekme>1)
{
echo "<a href=\"makale_ana.php?sekme= $sekme-1 \" >Geri </a>";
}
for ($i=1; $i<=$toplam; $i++) {
echo " <a href=\"makale_ana.php?sekme=$i\" ";
if ($i==$sekme) {
echo "class=\"selected\"";
}
echo ">$i</a> " ;
}
if($sekme<$toplam){
echo "<a href=\"makale_ana.php?sekme=$sekme+1\" >İleri </a> ";
}
}?>
</div>
</div>
</div>
<footer>
<div class="container">
<div class="footerlink">
<p class="lf">Copyright © 2010 <a href="#">Domain Name</a> - All Rights Reserved</p>
<p class="rf"><a href="http://all-free-download.com/free-website-templates/">Free CSS Templates</a> by <a href="http://www.templatemonster.com/">TemplateMonster</a></p>
<div style="clear:both;"></div>
</div>
</div>
</footer>
<!-- END PAGE SOURCE -->
<div align=center>This template downloaded form <a href='http://all-free-download.com/free-website-templates/'>free website templates</a></div>
</body>
</html>