如何从链接浏览器中删除totalRows? [英] How to remove totalRows from the link Browser?

查看:61
本文介绍了如何从链接浏览器中删除totalRows?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从链接浏览器中删除totalRows,我不想sombody可以看到我有多么奇怪的行,使用Dreamweaver和代码是由recordset.dease自动生成的代码sombody可以帮助我吗?Tnks和这里是我的代码...







i want to remove totalRows from link browser ,i dont want to sombody can see how meny rows i have,imm working with dreamweaver and the code was auto generated by recordset.please sombody can help me with this?Tnks and here is my code...



<?php require_once('Connections/filmconnexion.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_DataCategoria = 12;

$pagina = 0;

if (isset($_GET['pagina'])) {

  $pagina = $_GET['pagina'];

}

$startRow_DataCategoria = $pagina * $maxRows_DataCategoria;



$varCategoria_DataCategoria = "0";

if (isset($_GET["cat"])) {

  $varCategoria_DataCategoria = $_GET["cat"];

}

mysql_select_db($database_filmconnexion, $filmconnexion);

$query_DataCategoria = sprintf("SELECT * FROM tbl_film WHERE tbl_film.intCategoria = %s ", GetSQLValueString($varCategoria_DataCategoria, "int"));

$query_limit_DataCategoria = sprintf("%s LIMIT %d, %d", $query_DataCategoria, $startRow_DataCategoria, $maxRows_DataCategoria);

$DataCategoria = mysql_query($query_limit_DataCategoria, $filmconnexion) or die(mysql_error());

$row_DataCategoria = mysql_fetch_assoc($DataCategoria);



if (isset($_GET['totalRows_DataCategoria'])) {

  $totalRows_DataCategoria = $_GET['totalRows_DataCategoria'];

} else {

  $all_DataCategoria = mysql_query($query_DataCategoria);

  $totalRows_DataCategoria = mysql_num_rows($all_DataCategoria);

}

$totalPages_DataCategoria = ceil($totalRows_DataCategoria/$maxRows_DataCategoria)-1;



$queryString_DataCategoria = "";

if (!empty($_SERVER['QUERY_STRING'])) {

  $params = explode("&", $_SERVER['QUERY_STRING']);

  $newParams = array();

  foreach ($params as $param) {

    if (stristr($param, "pagina") == false && 

        stristr($param, "totalRows_DataCategoria") == false) {

      array_push($newParams, $param);

    }

  }

  if (count($newParams) != 0) {

    $queryString_DataCategoria = "&" . htmlentities(implode("&", $newParams));

  }

}

$queryString_DataCategoria = sprintf("&totalRows_DataCategoria=%d%s", $totalRows_DataCategoria, $queryString_DataCategoria);

    ?>




<div class="rezultfilm">
          <?php if ($totalRows_DataCategoria ?> 0) { // Show if recordset not empty ?>
  <?php do { ??>
    <div class="Filminitaliano"><a href="filminstreamingitalia.php?recordID=<?php echo $row_DataCategoria['id']; ?>"><img src="Imag/Cop/<?php echo $row_DataCategoria['imagine']; ??>" width="160" height="190" alt="filminitaliano.com|Film gratis in italiano|Italia Streaming Online Gratis"></a>
      <p><?php echo $row_DataCategoria['nome']; ??></p></div>
      <?php } while ($row_DataCategoria = mysql_fetch_assoc($DataCategoria)); ??>

            <?php } // Show if recordset not empty ??>
            <?php if ($totalRows_DataCategoria == 0) { // Show if recordset empty ??>
              Per questo momento non essiste nessun film in questa categoria!
  <?php } // Show if recordset empty ??>
  </div>
  ....................................
  <div>
    <table border="0">
      <tr>
        <td><?php if ($pagina ?> 0) { // Show if not first page ?>
            <a href="<?php printf(">">Prima pagina</a>
            <?php } // Show if not first page ??></td>
        <td><?php if ($pagina ?> 0) { // Show if not first page ?>
            <a href="<?php printf(" -="">">Preccedente</a>
            <?php } // Show if not first page ??></td>
        <td><?php if ($pagina < $totalPages_DataCategoria) { // Show if not last page ??>
            <a href="<?php printf(">">Prossima</a>
            <?php } // Show if not last page ??></td>
        <td><?php if ($pagina < $totalPages_DataCategoria) { // Show if not last page ??>
            <a href="<?php printf(">">Ultima</a>
            <?php } // Show if not last page ??></td>
      </tr>
    </table>
  </div><div class="rezultfilm">
          <?php if ($totalRows_DataCategoria ?> 0) { // Show if recordset not empty ?>
  <?php do { ??>
    <div class="Filminitaliano"><a href="filminstreamingitalia.php?recordID=<?php echo $row_DataCategoria['id']; ?>"><img src="Imag/Cop/<?php echo $row_DataCategoria['imagine']; ??>" width="160" height="190" alt="filminitaliano.com|Film gratis in italiano|Italia Streaming Online Gratis"></a>
      <p><?php echo $row_DataCategoria['nome']; ??></p></div>
      <?php } while ($row_DataCategoria = mysql_fetch_assoc($DataCategoria)); ??>

            <?php } // Show if recordset not empty ??>
            <?php if ($totalRows_DataCategoria == 0) { // Show if recordset empty ??>
              Per questo momento non essiste nessun film in questa categoria!
  <?php } // Show if recordset empty ??>
  </div>
  ....................................
  <div>
    <table border="0">
      <tr>
        <td><?php if ($pagina ?> 0) { // Show if not first page ?>
            <a href="<?php printf(">">Prima pagina</a>
            <?php } // Show if not first page ??></td>
        <td><?php if ($pagina ?> 0) { // Show if not first page ?>
            <a href="<?php printf(" -="">">Preccedente</a>
            <?php } // Show if not first page ??></td>
        <td><?php if ($pagina < $totalPages_DataCategoria) { // Show if not last page ??>
            <a href="<?php printf(">">Prossima</a>
            <?php } // Show if not last page ??></td>
        <td><?php if ($pagina < $totalPages_DataCategoria) { // Show if not last page ??>
            <a href="<?php printf(">">Ultima</a>
            <?php } // Show if not last page ??></td>
      </tr>
    </table>
  </div>


mysql_free_result($DataCategoria);
?>

推荐答案

theValue,


theType,


theDefinedValue = \"\",
theDefinedValue = "",


这篇关于如何从链接浏览器中删除totalRows?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆