PHP - no muestra paginacion con Zebrapagination

 
Vista:

no muestra paginacion con Zebrapagination

Publicado por tony rengifo del castillo (1 intervención) el 17/04/2016 23:33:46
Hola amigos espero que me ayuden con este problema no me muestra los botones de paginacion solo me muestra el filtro y la cantidad e registros indicado en la variable $result=10, osea solo 10 registros pero no puedo desplazarme a los siguientes registros porque no hay los botones. Aplique <?php $pagination->render();?> esto lo aplique de diferentes formas y nada, ahi les publico el codigo:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!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">
<head>
<title>Registrar notas</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="styles.css" rel="stylesheet" type="text/css" />
  <script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
   <script src="script.js"></script>
<LINK rel="stylesheet" href="Zebra_Pagination/public/css/zebra_pagination.css" type="text/css" />
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<?php
include "modulos/conexion.php";
$query="select * from semestre";
$sem=$mysqli->query($query);
?>
<body>
<div id="wrap">
  <div id="masthead">
   <table width="533">
  <tr>
  <td width="63">
    <img src="images/logo_solo.png" width="61" height="59">
   </td>
  <td width="502"><h1>COMPUTACION E INFORMATICA | IESTP-SUIZA</h1>
   </td>
   </tr>
   </table>
    <div id="menucontainer">
      <div id="menunav">
        <?php
		include "modulos/menu.php";
		/*muestra menu horizontal*/
	?>
 
      </div>
    </div>
  </div>
	<div id="container">
 
    <div id="sidebar">
    <h2 align="left">REGISTRAR NOTAS</h2>
<form method="POST" action="registrar_notas.php">
    <table width="200" border="0">
  <tr>
    <td>Ciclo</td>
    <td width="59"><select name="ciclo" class="combo" size="1">
		  <option value="I">I</option>
		  <option value="II">II</option>
		  <option value="III">III</option>
		  <option value="IV">IV</option>
		  <option value="V">V</option>
		  <option value="VI">VI</option>
		</select></td>
    <td>Semestre</td>
    <td>
   		 <?php if(count($sem)>0):?>
             <select name="semestre1" class="combo">
              <option value="">--Semestre--</option>
                <?php foreach($sem as $carrera):?>
                   <option value="<?php echo $carrera["semest"]; ?>"><?php echo $carrera["semest"]; ?> </option>
                <?php endforeach; ?>
              </select>
 
            <?php endif; ?>
 
    <td><button type="submit" class="button">Buscar</button></td>
 
  </tr>
</table>
 
<?php
require_once'zebra_pagination/zebra_pagination.php';
include "modulos/conexion.php";
@$ciclo=$_POST['ciclo'];
 @$semestre=$_POST['semestre1'];
 $query=("select * from matriculas where ciclo='$ciclo' and semestre=$semestre");
$resultado=$mysqli->query($query);
$total_reg = (count($resultado));
$result=10;
$pagination= new Zebra_Pagination();
$pagination->records($total_reg);
$pagination->records_per_page($result);
$query=("select * from matriculas where ciclo='$ciclo' and semestre='$semestre' limit ".(($pagination->get_page()-1)*$result).','.$result);
$a=$mysqli->query($query);
?>
<table  id="tabla1" width=100% border="0" align="left">
<caption>RELACION DE ALUMNOS MATRICULADOS  <?php echo"ciclo: ".$ciclo?>, <?php echo" semestre ".$semestre?></caption>
   <tr>
    <td bgcolor="#CCCCCC" align="center">Id</td>
    <td bgcolor="#CCCCCC" align="center">Cod alumno</td>
    <td bgcolor="#CCCCCC" align="center">Dni</td>
    <td bgcolor="#CCCCCC" align="center">Ape. Pate</td>
    <td bgcolor="#CCCCCC" align="center">Ape. Mate</td>
    <td bgcolor="#CCCCCC" align="center">Nombres</td>
    <td bgcolor="#CCCCCC" align="center">Semestre</td>
     <td bgcolor="#CCCCCC" align="center">Ciclo</td>
      <td bgcolor="#CCCCCC" align="center"></td>
     </tr>
 <?php while($row=$a->fetch_assoc()){?>
	<tr>
    <td bgcolor="#FFFFFF"><?php echo$row['id'];?></td>
    <td bgcolor="#FFFFFF"><?php echo$row['cod_alumno'];?></td>
    <td bgcolor="#FFFFFF"><?php echo$row['dni'];?></td>
    <td bgcolor="#FFFFFF"><?php echo$row['ape_pate'];?></td>
    <td bgcolor="#FFFFFF"><?php echo$row['ape_mate'];?></td>
    <td bgcolor="#FFFFFF"><?php echo$row['nombres'];?></td>
    <td bgcolor="#FFFFFF"><?php echo$row['semestre'];?></td>
     <td bgcolor="#FFFFFF"><?php echo$row['ciclo'];?></td>
         <td bgcolor="#FFFFFF"><a href="pre_notas.php?idn=<?php echo $row['id'];?>" ><img src="images/accept.png" title="Modificar" /></a></td>
     </tr>
   <?php }?>
</table>
</form>
	  <?php $pagination->render();?>
  </div>
   </div>
  	<div id="content">
    <div id='cssmenu'>
 
	<?php		include "modulos/menu_notas.php";
	/*muestra menu vertical al lado izuqierdo de la pantalla*/
	?>
 
    </div>
    </div>
    </div>
 
</div><!-- fin contenido-->
 
 
<section class="main-content"></section>
 
	<div id="footer">  @ Todos los derechos reservados 2016 | Pucallpa-Peru </div>
 
</body>
</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder