<?php require_once('Connections/admin.php'); ?>
<?php
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;
}
}

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
  $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_admin, $admin);
$query_Recordset1 = "SELECT * FROM haber";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $admin) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
  $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
  $all_Recordset1 = mysql_query($query_Recordset1);
  $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

mysql_select_db($database_admin, $admin);
$query_Recordset2 = "SELECT defterno FROM defter";
$Recordset2 = mysql_query($query_Recordset2, $admin) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);

$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
  $params = explode("&", $_SERVER['QUERY_STRING']);
  $newParams = array();
  foreach ($params as $param) {
    if (stristr($param, "pageNum_Recordset1") == false && 
        stristr($param, "totalRows_Recordset1") == false) {
      array_push($newParams, $param);
    }
  }
  if (count($newParams) != 0) {
    $queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
  }
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/index.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<?php $baskin= "Baskindan Selamlar"; ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Ya Sensizlik Başıma Musallat Olursa?</title>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
body {
	background-color: #000;
}
.altkisim {
	font-family: Verdana, Geneva, sans-serif;
	font-weight: bold;
	text-align: center;
}
.altustorta {
	border: medium solid #333;
	text-align: center;
}
-->
</style>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_effectShake(targetElement)
{
	Spry.Effect.DoShake(targetElement);
}
//-->
</script>
<!-- InstanceBeginEditable name="head" -->
<style type="text/css">
<!--
.baslikmesaj {
	font-weight: bold;
	font-family: Verdana, Geneva, sans-serif;
	color: #FFF;
	text-decoration: none;
	font-size: 16px;
	font-style: normal;
	font-variant: normal;
	text-transform: none;
}
.kenarlik {
	border: medium dashed #333;
}
.baskin {
	border: thin dotted #000;
	font-weight: bold;
}
.bebegim {
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 14px;
	font-style: normal;
	text-decoration: none;
	font-weight: bold;
	color: #000;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_effectAppearFade(targetElement, duration, from, to, toggle)
{
	Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
//-->
</script>
<!-- InstanceEndEditable -->
<style type="text/css">
<!--
a:link {
	color: #FFF;
	text-decoration: none;
}
a:visited {
	color: #FFF;
	text-decoration: none;
}
a:hover {
	color: #999;
	text-decoration: none;
}
a:active {
	color: #999;
	text-decoration: none;
}
-->
</style></head>

<body>
<blockquote>&nbsp;</blockquote>
<table width="812" border="0" align="center" class="altustorta">
  <tr>
    <td width="798" height="202" bgcolor="#8C6CAF"><img src="cemg.jpg" width="791" height="200" onclick="MM_effectShake(this)" /></td>
  </tr>
  <tr>
    <td bgcolor="#333333"><ul id="MenuBar1" class="MenuBarHorizontal">
      <li><a href="index.php">Ana Sayfa</a></li>
      <li><a href="#" class="MenuBarItemSubmenu">Bizden</a>
        <ul>
          <li><a href="videolar.php">Videolar</a></li>
          <li><a href="zoneler.php">Zoneler</a></li>
          <li><a href="resimler.php">Resimler</a></li>
        </ul>
      </li>
      <li><a href="defter.php">Hatira Defteri</a>        </li>
      <li><a href="dostlar.php">Dostlar</a></li>
    </ul></td>
  </tr>
  <tr>
    <td bgcolor="#CCCCCC"><!-- InstanceBeginEditable name="orta" -->
      <?php do { ?>
        <table width="692" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td colspan="4" background="ust.gif" class="baslikmesaj"><img src="arrow-follow.gif" width="11" height="11" />Mesaj:<a href="detaylar.php?haberid=<?php echo $row_Recordset1['haberid']; ?>"><?php echo $row_Recordset1['baslik']; ?></a></td>
          </tr>
          <tr>
            <td width="163" rowspan="2" bgcolor="#666666" onclick="MM_effectAppearFade(this, 1000, 100, 0, false)"><?php echo $row_Recordset1['haberresmi']; ?></td>
            <td width="13" background="sss.gif"><p class="baslikmesaj">&nbsp;</p>
            <p class="baslikmesaj">&nbsp;</p></td>
            <td width="507" bgcolor="#666666"><span class="bebegim"><?php echo $row_Recordset1['haberkonu']; ?></span><a href="detaylar.php?haberid=<?php echo $row_Recordset1['haberid']; ?>"><a href="index.php"></a></td>
            <td width="9" background="sss.gif">&nbsp;</td>
          </tr>
          <tr>
            <td colspan="3" background="backtotop.gif">&nbsp;</td>
          </tr>
        </table>
        <p><a href="index.php"><img src="yenile.JPG" alt="Yenile" width="23" height="20" border="0" align="top" class="kenarlik" /></a><a href="detaylar.php?haberid=<?php echo $row_Recordset1['haberid']; ?>"><img src="numberone.gif" alt="Devami" width="23" height="20" align="top" class="kenarlik" /></a></p>
        <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
    <!-- InstanceEndEditable --><!-- InstanceBeginEditable name="alt" -->
   <center> <table width="549" border="0" cellpadding="1" cellspacing="1" class="baskin">
      <tr>
        <td width="247" height="21" bgcolor="#999999"><strong>Security Shield.</strong></td>
        <td width="288" bgcolor="#7A756B">Online.</td>
        </tr>
      <tr>
        <td height="21" bgcolor="#999999"><strong>Your İp Number Saving to System.</strong></td>
        <td bgcolor="#7A756B"><strong>[<?php echo $_SERVER['REMOTE_ADDR']; ?>]&nbsp;</strong></td>
        </tr>
      <tr>
        <td height="21" bgcolor="#999999">Toplam Duyuru:</td>
        <td bgcolor="#7A756B"><?php echo $totalRows_Recordset1 ?></td>
      </tr>
      <tr>
        <td height="21" bgcolor="#999999">Toplam GB Yazan:</td>
        <td bgcolor="#7A756B"><?php echo $totalRows_Recordset2 ?></td>
      </tr>
    </table></center>
    <p><strong><img src="kalkan.png" width="62" height="40" alt="Güvenlik Kalkani" /></strong>
    <table border="0">
      <tr>
        <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
            <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>">First</a>
            <?php } // Show if not first page ?></td>
        <td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
            <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>">Previous</a>
            <?php } // Show if not first page ?></td>
        <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
            <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>">Next</a>
            <?php } // Show if not last page ?></td>
        <td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
            <a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>">Last</a>
            <?php } // Show if not last page ?></td>
      </tr>
    </table>
    </p>
    <!-- InstanceEndEditable -->
      <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p></td>
  </tr>
  <tr>
    <td bgcolor="#8C6CAD" class="altkisim"><?php echo $baskin; ?></td>
  </tr>
</table>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($Recordset1);

mysql_free_result($Recordset2);
?>
merhaba arkadaşlar index.phpden sitem sql yiyiyor uptade edilebiliyor haber. acaba ne yapilmali kapatilmak için.. yardimci olabilirseniz sevinirim.