Ver Mensaje Individual
  #5 (permalink)  
Antiguo 27/06/2011, 14:32
darkfire65
 
Fecha de Ingreso: marzo-2011
Mensajes: 10
Antigüedad: 14 años
Puntos: 0
Respuesta: Tengo un problema con la paginacion

hola no no me da, me sale error....


Código PHP:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  5. <title>TuPortalGuia.com</title>
  6. <link href="css/style.css" rel="stylesheet" type="text/css" />
  7. <style type="text/css">
  8. <!--
  9. .Estilo1 {color: #000000}
  10. .style7 {font-size: 0.7em}
  11. .Estilo2 {color: #FF0000}
  12. -->
  13. </style>
  14.  
  15.  
  16.  
  17.     <style type="text/css">
  18. <!--
  19. .style17 {font-size: 12px}
  20. -->
  21.     </style>
  22.    
  23.    
  24.     <script>
  25. var miPopup;
  26. function abreVentana(valor)
  27. {
  28.     miPopup = window.open("ver_detalles.php?id=" + valor,"miwin","width=600,height=500,scrollbars=yes,target='_black'");
  29.     miPopup.focus();
  30.     }
  31. </script>
  32. </head>
  33. <body>
  34. <?php
  35. include "conex.php";
  36.  $link=Conectarse();
  37.   $Categoria = $_GET['term'];  
  38. ?>
  39. <div id="botBody">
  40.   <table width="65%" border="0" align="center" bgcolor="#FFFFFF">
  41.     <tr>
  42.       <th height="124" bgcolor="#FFFFFF"><p class="style7"><img src="oferta.jpg" alt="Gestor Busquedas" width="118" height="119" border="0" class="logo" title="Gestor Busquedas" /></a></p>
  43.       <p class="style7">Resultados de la b&uacute;squeda para: <?php echo $Categoria; ?></p></th>
  44.     </tr>
  45.   </table>
  46.   <br />
  47. <?PHP
  48. $consulta="SELECT Autor, Titulo, Descripcion, Imagen From Ofertas WHERE TipoEmpresa='$Categoria'";
  49. $result=mysql_query($consulta,$link);
  50.   while ($row1 = mysql_fetch_array($result))
  51.    {
  52. ?>
  53.  
  54.  
  55.   <table width="90%" border="0" align="center" class="primeralineaizquierda">
  56.     <tr>
  57.       <td width="590" bgcolor="#FFFFFF"><strong><span class="Estilo3"><?php echo $row1[1] ?>:</span></strong></td>
  58.       <td width="200" rowspan="3" align="center" valign="middle" bgcolor="#FFFFFF"><div align="center"><span class="style7">
  59.         <?php
  60.            if ($row1[3])
  61.               {
  62.                 echo "<img src='Logos/$row1[3]' width=\"80\" height=\"60\">";
  63.               }
  64.         ?>
  65.       </span></div>
  66. </td>
  67.      
  68.     <tr>
  69.       <td bgcolor="#A9D0F5"><span class="style17"> Descripci&oacute;n:<?php echo $row1[2] ?> <br>
  70.            Servicio Ofrecido Por: <?php echo $row1[0] ?> </span></td>
  71.     </tr>
  72.    
  73.   </table>
  74.  
  75. <?php    
  76.   }
  77. ?>
  78. <?php
  79.  
  80. $link1=Conectarse();
  81.   $Categoria = $_GET['term'];
  82. $sql2 = "select Autor, Titulo, Descripcion, Imagen From Ofertas WHERE TipoEmpresa='$Categoria' order by id DESC";
  83. $link1->consulta($sql2);
  84. $NroRegistros = $link1->numregistros();
  85. $PagAnt=$PagAct-1;
  86. $PagSig=$PagAct+1;
  87. $PagUlt=$NroRegistros/$RegistrosAMostrar;
  88. $Res=$NroRegistros%$RegistrosAMostrar;
  89. if($Res>0) $PagUlt=floor($PagUlt)+1;
  90. if ($NroRegistros > 0)
  91. {
  92. ?>
  93. <div class="paginacion" >
  94. <a href="<?php echo $_SERVER['PHP_SELF'];?>?pag=1">&nbsp; &laquo;</a>
  95. <?php
  96. for ($i = 1; $i <= $PagUlt; $i++)
  97. {
  98. if ($PagAct == $i)
  99. echo '<span class="pagina_actual">'.$i.'</span>';
  100. else
  101. echo '<a href="'.$_SERVER['PHP_SELF'].'?pag='.$i.'">'.$i.'</a>';
  102. }
  103. ?>
  104. <a href="<?php echo $_SERVER['PHP_SELF'];?>?pag=<?php echo $PagUlt;?>"> &nbsp; &raquo;</a>
  105. </div>
  106. <?php
  107. }
  108. ?>
  109.  
  110. </div>
  111. </body>
  112. </html>

Fatal error: Call to a member function consulta() on a non-object in C:\wamp\www\joomla\busqueda_ofertas.php on line 83

la linea es

Código PHP:
Ver original
  1. $link1->consulta($sql2);