include("stil.php"); $ip = getenv("REMOTE_ADDR"); $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } $blogid=" where kategori='4'"; $kackayit = 16; // sayfalda gösterilecek içerik miktarını belirtiyoruz. $sorgu11 = "SELECT count(id) as id FROM icerik ".$blogid." "; $baglanti11 = @mysql_query($sorgu11, $baglan) or die(mysql_error()); $satir11 = @mysql_fetch_assoc($baglanti11); $sayi11 =@mysql_num_rows($baglanti11); $toplam_icerik = $satir11['id']; $sayfalsayisi = ceil($toplam_icerik / $kackayit); $sayfal = isset($_GET['sayfal']) ? (int) $_GET['sayfal'] : 1; if($sayfal < 1) {$sayfal = 1; } if($sayfal > $sayfalsayisi) {$sayfal = $sayfalsayisi; } $limit = ($sayfal - 1) * $kackayit; $sayfalicerik="&kayitsayi=".$kackayit."&blogid=".$_GET['blogid']."&id=".$_GET['id'].""; $sorgu = "SELECT * FROM icerik ".$blogid." LIMIT ".$limit.", ". $kackayit." "; $baglanti = @mysql_query($sorgu, $baglan) or die(mysql_error()); $satir = @mysql_fetch_assoc($baglanti); $sayi =@mysql_num_rows($baglanti); ?> if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { if (PHP_VERSION < 6) { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; } $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? doubleval($theValue) : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } ?>
$geri=$sayfal-1?> if ($sayfal>1) {?> | } ?> | for ($i = 1; $i <= $sayfalsayisi; ++$i) if ($i == $sayfal) { ?> " title=" echo $i?>"> echo $i?> " title=" echo $i?>">Sayfa No: echo $i?> " title="Son">Toplam Sayfa: echo $sayfalsayisi;?> } ?> | $ileri=$sayfal+1?> if ($ileri <= $sayfalsayisi) {?> | } ?> |
---|