kategori.php

<?php require_once('ayar.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
function quote_smart($value)
{
if (get_magic_quotes_gpc()) {
$value = stripslashes($value);
}
if (!is_numeric($value)) {
$value = "'" . mysql_real_escape_string($value) . "'";
}
return $value;
}
$kategoriid = quote_smart($_GET['catid']);
mysql_select_db($database_geceninrengi, $portalv1);
$query_kategoriadial = "SELECT * FROM kategoriler WHERE id='$kategoriid'";
$kategoriadial = mysql_query($query_kategoriadial, $portalv1) or die(mysql_error());
$row_kategoriadial = mysql_fetch_assoc($kategoriadial);
$totalRows_kategoriadial = mysql_num_rows($kategoriadial);

mysql_select_db($database_geceninrengi, $portalv1);
$query_kategorilistesi = "SELECT * FROM kategoriler ORDER BY kategoriadi ASC";
$kategorilistesi = mysql_query($query_kategorilistesi, $portalv1) or die(mysql_error());
$row_kategorilistesi = mysql_fetch_assoc($kategorilistesi);
$totalRows_kategorilistesi = mysql_num_rows($kategorilistesi);

$maxRows_sonyazilar = 30;
$pageNum_sonyazilar = 0;
if (isset($_GET['pageNum_sonyazilar'])) {
  $pageNum_sonyazilar = $_GET['pageNum_sonyazilar'];
}
$startRow_sonyazilar = $pageNum_sonyazilar * $maxRows_sonyazilar;
$kategoriadi = $row_kategoriadial['kategoriadi'];
mysql_select_db($database_geceninrengi, $portalv1);
$query_sonyazilar = "SELECT * FROM yazilar WHERE kategori='$kategoriadi' ORDER BY id DESC";
$query_limit_sonyazilar = sprintf("%s LIMIT %d, %d", $query_sonyazilar, $startRow_sonyazilar, $maxRows_sonyazilar);
$sonyazilar = mysql_query($query_limit_sonyazilar, $portalv1) or die(mysql_error());
$row_sonyazilar = mysql_fetch_assoc($sonyazilar);

if (isset($_GET['totalRows_sonyazilar'])) {
  $totalRows_sonyazilar = $_GET['totalRows_sonyazilar'];
} else {
  $all_sonyazilar = mysql_query($query_sonyazilar);
  $totalRows_sonyazilar = mysql_num_rows($all_sonyazilar);
}
$totalPages_sonyazilar = ceil($totalRows_sonyazilar/$maxRows_sonyazilar)-1;

$queryString_sonyazilar = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_sonyazilar") == false && 
        stristr($param, "totalRows_sonyazilar") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_sonyazilar = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_sonyazilar = sprintf("&totalRows_sonyazilar=%d%s", $totalRows_sonyazilar, $queryString_sonyazilar);
?>
<html>

<head>
<meta http-equiv="Content-Language" content="tr">
<title><?php echo $row_kategoriadial['kategoriadi']; ?></title>
<meta name="description" content="<?php echo $row_kategoriadial['kategoriadi']; ?>">
<meta name="keywords" content="<?php echo $row_kategoriadial['kategoriadi']; ?>">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<meta name="robots" content="index, follow" />
<META NAME="googlebot" CONTENT="index, follow">
<meta name="robots" content="all">
<META NAME="robots" CONTENT="index, follow">
<META NAME="REVISIT-AFTER" CONTENT="1 Days">
<link rel="stylesheet" type="text/css" media="screen" href="images/style.css">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="70%">
<tbody><tr>
<td>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="885" height="84">
        <tbody>
        <tr>
          <td width="885">
	<font color="#6BCE18"> 
	<table border="0" cellpadding="0" cellspacing="0" width="885">
		<tr>
			<td height="3">
	<font color="#6BCE18"> 
			<img border="0" src="images/aramabg.gif" width="881" height="3"></td>
		</tr>
		<tr>
			<td width="885">
			<p align="center">
			<?php include "inc/inc.ust.php"; ?>	<img border="0" src="images/aramabg.gif" width="881" height="3"></td>
		</tr>
	</table>
			</tr>
        <tr>
          <td width="885">
 <p align="center">
<?php include "inc/inc.ustmenu.php"; ?></tr>
        <tr>
          <td width="885">
 <p align="center"><?php include "inc/inc.728_90.php"; ?></tr></tbody></table>

  <table border="0" cellpadding="5" cellspacing="0" height="320" width="891">
	<tbody>
		<tr valign="top">
			<td width="173">
			<table border="0" cellpadding="0" cellspacing="0" width="173" height="437">
	<tr>
		<td height="22" width="173" background="images/yesilbuton.jpg">
		<p align="center"><font color="#FFFFFF" style="font-size: 10pt"><b>Menü</b></font></td>
		</tr>
	<tr>
		<td height="415" width="173">			
				<table bgcolor="#E3E3E3" border="0" cellspacing="1" width="100%" height="414">
                  <tr>
                    <td bgcolor="#FFFFFF" height="412" width="219">			
<?php include "inc/inc.sol.php"; ?>		</td>
                  </tr>
                	</table>
				</td>
		</tr>
	</table>
		</td>
			<td width="515">
		        <table cellspacing=0 cellpadding=0 width="514" height="113">
         <tr><td height="1" background="anaortadirek.jpg">

<p align="center"><font size="3" color="#FFFFFF"><b><?php echo $row_kategoriadial['kategoriadi']; ?></b></font></td></tr> 
         <tr><td height="112">

					<table style="border-width:0px; border-collapse:collapse;border-style:dotted" width="100%" border="1" cellspacing="2" cellpadding="2">
						<tr>
							<td style="border-style:none; border-width:medium; font-family: Verdana; font-size: 11px; color: #000000" bgcolor="#FFF8F5" height="19" width="83%"><?php if ($totalRows_sonyazilar > 0) { // Show if recordset not empty ?>
<?php do { ?>
							<p align="left"><img border="0" src="images/devami1.jpg" width="14" height="13">
							<a href="<? echo $site; ?>/<?php echo $row_sonyazilar['id']; ?>/<?php echo str_replace($find, $replace, $row_sonyazilar['baslik']); ?>" style="color:#D20000; text-decoration:none; font-weight:bold">
							<font style="font-size: 9pt">
							<?php echo $row_sonyazilar['baslik']; ?> 				
							</font> 				
							</a>
							</font></td>
							<td width="14%" style="border-style:none; border-width:medium; font-family: Verdana; font-size: 11px; color: #000000" bgcolor="#FFF8F5" height="19"><img border="0" src="images/hit.gif" width="11" height="10"> Hit: <?php echo $row_sonyazilar['okunma']; ?></td>
						</tr>
						<tr>
							<td style="border-style:none; border-width:medium; font-family: Verdana; font-size: 11px; color: #000000" bgcolor="#FFF8F5" width="83%"><?php } while ($row_sonyazilar = mysql_fetch_assoc($sonyazilar)); ?><img border="0" src="images/devami1.jpg" width="14" height="13">468*60 Reklam gelebilir
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_sonyazilar == 0) { // Show if recordset empty ?></td>
							<td width="14%" style="border-style:none; border-width:medium; font-family: Verdana; font-size: 11px; color: #000000" bgcolor="#FFF8F5">&nbsp;
							</td>
						</tr>
						<tr>
							<td style="border-style:none; border-width:medium; font-family: Verdana; font-size: 11px; color: #000000" bgcolor="#FFFFFF" width="83%" height="17">
							
							
							İçerik eklenmedi...</font>

							<font size="2" style="font-family: Verdana; font-size: 11px; color: #000000">
<?php } // Show if recordset empty ?>
</font>
						
							</td>
							<td width="14%" style="border-style:none; border-width:medium; font-family: Verdana; font-size: 11px; color: #000000" bgcolor="#FFFFFF" height="17">
							</td>
						</tr>
						<tr>
							<td style="border-style:none; border-width:medium; font-family: Verdana; font-size: 11px; color: #000000" colspan="2" bgcolor="#FFFFFF" height="49">
							<p align="right">&nbsp;
<?php if ($pageNum_sonyazilar > 0) { // Show if not first page ?></font></font><font size="5"><a href="<?php printf("%s?pageNum_sonyazilar=%d%s", $currentPage, max(0, $pageNum_sonyazilar - 1), $queryString_sonyazilar); ?>"><span style="text-decoration: none"><font color="#999999"><img border="0" src="images/geri.jpg" width="40" height="40"></font></span></a><font color="#999999"><?php } // Show if not first page ?>
  <?php if ($pageNum_sonyazilar < $totalPages_sonyazilar) { // Show if not last page ?>
    </font>
    <a href="<?php printf("%s?pageNum_sonyazilar=%d%s", $currentPage, min($totalPages_sonyazilar, $pageNum_sonyazilar + 1), $queryString_sonyazilar); ?>">
<span style="text-decoration: none"><font color="#999999">
							<img border="0" src="images/ileri.jpg" width="40" height="40"></font></span></a></font></font></font><font size="5" color="#999999">
    <?php } // Show if not last page ?> </font>
	<font color="#999999">
	</b></font></td>
						</tr>
					</table>
			</td></tr> 
         </table>
            	<p align="center"><?php include "inc/inc.468ads.php"; ?></td>
			<td width="173">
			<table border="0" cellpadding="0" cellspacing="0" width="173" height="438">
	<tr>
		<td height="19" width="173" background="images/yesilbuton.jpg">
		<p align="center"><font color="#FFFFFF" style="font-size: 10pt"><b>&nbsp;Son 
		Eklenenler</b></font></td>
		</tr>
	<tr>
		<td height="129" width="173">			
				<table bgcolor="#E3E3E3" border="0" cellspacing="1" width="100%" height="125">
                  <tr>
                    <td bgcolor="#FFF8F5" height="123" width="219">			
				<?php include "inc/inc.eklenenler.php"; ?></td>
                  </tr>
                	</table>
				</td>
		</tr>
	<tr>
		<td height="19" width="173" background="images/yesilbuton.jpg">
		<p align="center"><font color="#FFFFFF" style="font-size: 10pt"><b>
		Bakılması Gerekenler</b></font></td>
		</tr>
	<tr>
		<td height="129" width="173">			
				<table bgcolor="#E3E3E3" border="0" cellspacing="1" width="100%" height="125">
                  <tr>
                    <td bgcolor="#EEFFFF" height="123" width="219">			
			<?php include "inc/inc.rastgele.php"; ?></td>
                  </tr>
                	</table>
				</td>
		</tr>
	<tr>
		<td height="17" width="173" background="images/yesilbuton.jpg">
		<p align="center"><b><font color="#FFFFFF" style="font-size: 10pt">Top 10 Konular</font></b></td>
		</tr>
	<tr>
		<td height="125" width="173">			
				<table bgcolor="#E3E3E3" border="0" cellspacing="1" width="100%" height="125">
                  <tr>
                    <td bgcolor="#FFF8F5" height="123" width="219">			
				<?php include "inc/inc.populerkonular.php"; ?></td>
                  </tr>
                	</table>
				</td>
		</tr>
</table></td>
		</tr>
	</tbody>
</table>
</div>
</td> 
</tr>

</tbody></table>
<table align="center" border="0" cellpadding="0" cellspacing="0" height="4" width="892">
  <tbody><tr>
    <td height="4" valign="top">
	<p align="center">
	<img border="0" src="images/altcizgi.jpg" width="890" height="4"></td><tr>
    <td height="1" valign="top">
	<p align="center">
	<?php include "inc/inc.copright.php"; ?></td><html>


</html>
</html>
<?php
mysql_free_result($kategorilistesi);
mysql_free_result($sonyazilar);
mysql_close();
?>