Example #1
0
    public function getProductsByIdShop($records_per_page = null)
    {
        $pagination = new Zebra_Pagination();
        // set position of the next/previous page links
        $pagination->navigation_position(isset($_GET['navigation_position']) && in_array($_GET['navigation_position'], array('left', 'right')) ? $_GET['navigation_position'] : 'outside');
        $records_per_page = $records_per_page == null ? 25 : $records_per_page;
        $db = PDOQuery::getInstance();
        $db->connect();
        $sql = 'SELECT SQL_CALC_FOUND_ROWS DISTINCT
						product_lang.product, product.id_product, stock_available.stock_available, stock_available.price,
						product.reference
				FROM 	product_lang
				RIGHT JOIN product ON product.id_product = product_lang.id_product
				RIGHT JOIN stock_available ON product.id_product = stock_available.id_product
				WHERE stock_available.id_shop = :id_shop1
				AND product_lang.id_lang=' . _ID_LANG_ . $_SESSION['adminQuery'] . '

		UNION

		SELECT DISTINCT
				product_lang.product, product.id_product, stock_available.stock_available, stock_available.price,
				product.reference
		FROM 	product_lang
		RIGHT JOIN product ON product.id_product = product_lang.id_product
		RIGHT JOIN stock_available ON product.id_product = stock_available.id_product
		RIGHT JOIN product_tag ON product_tag.id_product = product.id_product
		RIGHT JOIN tags ON tags.id_tag = product_tag.id_tag
		WHERE 	stock_available.id_shop = :id_shop2
		AND 	product_lang.id_lang=' . _ID_LANG_ . '
		AND 	tags.tag = :tagQuery
		ORDER BY id_product asc
		LIMIT
			' . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page;
        $stmt = $db->prepareQuery($sql);
        $stmt->bindParam(':id_shop1', $_SESSION['id_shop'], PDO::PARAM_INT);
        $stmt->bindParam(':id_shop2', $_SESSION['id_shop'], PDO::PARAM_INT);
        $stmt->bindParam(':tagQuery', $_SESSION['tagQuery'], PDO::PARAM_STR);
        $stmt->execute();
        $rows = $db->query('SELECT FOUND_ROWS();')->fetch(PDO::FETCH_COLUMN);
        // pass the total number of records to the pagination class
        $pagination->records($rows);
        // records per page
        $pagination->records_per_page($records_per_page);
        $this->pagination_render = $pagination->render();
        $db->close();
        return $stmt;
    }
Example #2
0
/*
 * php code///////////**********************************************************
 */
$title = 'ระบบจัดการร้านค้า : สินค้า';
$db = new database();
$pagination = new Zebra_Pagination();
$sql_pd = "SELECT p.id, p.name as pname, p.price, p.brandname, p.created, c.name as cname FROM products p ";
$sql_pd .= "INNER JOIN product_categories c ON p.product_categorie_id = c.id WHERE 1=1 ";
$sql_pd .= isset($_GET['name']) ? "AND p.name LIKE '%{$_GET['name']}%' " : "";
$sql_pd .= isset($_GET['brandname']) ? "AND p.brandname LIKE '%{$_GET['brandname']}%' " : "";
$query_pd = $db->query($sql_pd);
$rows_pd = $db->rows($query_pd);
$per_page = 20;
$page_start = ($pagination->get_page() - 1) * $per_page;
$sql_pd .= "ORDER BY id DESC LIMIT {$page_start},{$per_page} ";
$pagination->records($rows_pd);
$pagination->records_per_page($per_page);
$pagination->base_url('', FALSE);
$query_pd_page = $db->query($sql_pd);
$page = $page_start != 0 ? $page_start : "1";
$pages = ceil($rows_pd / $per_page);
$uri = $_SERVER['REQUEST_URI'];
// url
/*
 * php code///////////**********************************************************
 */
/*
 * header***********************************************************************
 */
/*
 * header***********************************************************************
Example #3
0
<?php

include_once $fsConfig->getPath() . 'view/partial/head.php';
include_once $fsConfig->getPath() . 'libs/Zebra_Pagination.php';
$pagina = new Zebra_Pagination();
$pagina->records($objRespuesta[0]);
$pagina->records_per_page(5);
?>

<div class="container container-fluid">
  <h1>CRUD de la tabla Cargo</h1>
  <p>
    <a href="<?php 
echo $fsConfig->getUrl();
?>
index.php/cargo/nuevo" class="btn btn-success glyphicon glyphicon-plus"> Nuevo </a>
  </p>
  <?php 
if ($objcargo != NULL) {
    ?>
    <table class="table table-bordered table-striped">
      <thead>
        <tr>
          <th>Descripción</th>
          <th>Acción</th>
        </tr>
      </thead>
      <tbody>
        <?php 
    foreach ($objcargo as $cargo) {
        ?>
Example #4
0
        <?php 
} else {
    ?>
        <link rel="stylesheet" href="../public/css/zebra_pagination.css" type="text/css">
        <?php 
}
?>
        <link rel="stylesheet" href="style.css" type="text/css">
    </head>
    <body>
        <h2>Zebra_Pagination, array example</h2>
        <p>Show next/previous page links on the <a href="example1.php?navigation_position=left">left</a> or on the
        <a href="example1.php?navigation_position=right">right</a>. Or revert to the <a href="example1.php">default style</a>.<br>
        Pagination links can be shown in <a href="example1.php">natural</a> or <a href="example1.php?direction=reversed">reversed</a> order.<br>
        See the <a href="example1.php">default</a> looks or with <a href="example1.php?bootstrap=1">Bootstrap</a><br>
        <em>(when using Bootstrap you don't need to include the zebra_pagination.css file anymore)</em></p>
        <?php 
// let's paginate data from an array...
$countries = array('Afghanistan', 'Aland Islands', 'Albania', 'Algeria', 'American Samoa', 'Andorra', 'Angola', 'Anguilla', 'Antarctica', 'Antigua And Barbuda', 'Argentina', 'Armenia', 'Aruba', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas', 'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize', 'Benin', 'Bermuda', 'Bhutan', 'Bolivia', 'Bosnia And
            Herzegowina', 'Botswana', 'Bouvet Island', 'Brazil', 'British Indian Ocean Territory', 'Brunei Darussalam', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cambodia', 'Cameroon', 'Canada', 'Cape Verde', 'Cayman Islands', 'Central African
            Republic', 'Chad', 'Chile', 'China', 'Christmas Island', 'Cocos (Keeling) Islands', 'Colombia', 'Comoros', 'Congo', 'Congo, The Democratic Republic Of The', 'Cook Islands', 'Costa Rica', 'Cote D\'Ivoire', 'Croatia', 'Cuba', 'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic', 'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia', 'Ethiopia', 'Falkland Islands (Malvinas)', 'Faroe Islands', 'Fiji', 'Finland', 'France', 'French Guiana', 'French Polynesia', 'French Southern Territories', 'Gabon', 'Gambia', 'Georgia', 'Germany', 'Ghana', 'Gibraltar', 'Greece', 'Greenland', 'Grenada', 'Guadeloupe', 'Guam', 'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Heard And Mc Donald Islands', 'Holy See (Vatican City State)', 'Honduras', 'Hong
            Kong', 'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran, Islamic Republic Of', 'Iraq', 'Ireland', 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan', 'Kazakhstan', 'Kenya', 'Kiribati', 'Korea, Democratic People\'S Republic Of', 'Korea,
            Republic Of', 'Kuwait', 'Kyrgyzstan', 'Lao People\'S Democratic Republic', 'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libyan Arab Jamahiriya', 'Liechtenstein', 'Lithuania', 'Luxembourg', 'Macau', 'Macedonia, The Former Yugoslav
            Republic Of', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives', 'Mali', 'Malta', 'Marshall Islands', 'Martinique', 'Mauritania', 'Mauritius', 'Mayotte', 'Mexico', 'Micronesia, Federated States Of', 'Moldova, Republic Of', 'Monaco', 'Mongolia', 'Montserrat', 'Morocco', 'Mozambique', 'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'Netherlands', 'Netherlands
            Antilles', 'New Caledonia', 'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'Niue', 'Norfolk Island', 'Northern
            Mariana Islands', 'Norway', 'Oman', 'Pakistan', 'Palau', 'Palestinian Territory, Occupied', 'Panama', 'Papua New
            Guinea', 'Paraguay', 'Peru', 'Philippines', 'Pitcairn', 'Poland', 'Portugal', 'Puerto Rico', 'Qatar', 'Reunion', 'Romania', 'Russian Federation', 'Rwanda', 'Saint Helena', 'Saint Kitts And Nevis', 'Saint Lucia', 'Saint Pierre And
            Miquelon', 'Saint Vincent And The Grenadines', 'Samoa', 'San Marino', 'Sao Tome And Principe', 'Saudi Arabia', 'Senegal', 'Serbia And Montenegro', 'Seychelles', 'Sierra Leone', 'Singapore', 'Slovakia', 'Slovenia', 'Solomon
            Islands', 'Somalia', 'South Africa', 'South Georgia And The South Sandwich Islands', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Svalbard And Jan Mayen Islands', 'Swaziland', 'Sweden', 'Switzerland', 'Syrian Arab Republic', 'Taiwan,
            Province Of China', 'Tajikistan', 'Tanzania, United Republic Of', 'Thailand', 'Timor-Leste', 'Togo', 'Tokelau', 'Tonga', 'Trinidad And Tobago', 'Tunisia', 'Turkey', 'Turkmenistan', 'Turks And Caicos Islands', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom', 'United States', 'United States Minor Outlying Islands', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Venezuela', 'Viet Nam', 'Virgin Islands, British', 'Virgin Islands, U.S.', 'Wallis And Futuna', 'Western Sahara', 'Yemen', 'Zambia', 'Zimbabwe');
// how many records should be displayed on a page?
Example #5
0
                  <th style="width: 25%;" >Nombres</th>
                  <th style="width: 25%;">Apellidos</th>
                  <th style="width: 5%;">Email</th>
                  <th style="width: 10%;">Celular</th>
                  <th style="width: 5%;">Dirección</th>
                  <th style="width: 5%;">Editar</th>
                  <th style="width: 5%;">Eliminar</th>
                </tr>
              </thead>
              <tbody >
              <?php 
$conn = new ezSQL_mysql(DB_USER, DB_PASS, DB_NAME);
$total_usuarios = $conn->get_var('SELECT count(*) FROM user');
$resultados = 10;
$paginacion = new Zebra_Pagination();
$paginacion->records($total_usuarios);
$paginacion->records_per_page($resultados);
// Quitar ceros en numeros con 1 digito en paginacion
$paginacion->padding(false);
$usuarios = $conn->get_results('SELECT * FROM user LIMIT ' . ($paginacion->get_page() - 1) * $resultados . ', ' . $resultados);
foreach ($usuarios as $users) {
    echo ' 	<tr >
                  			<td>' . $users->names . '</td>
                 		 	<td>' . $users->last_names . '</td>
                 		 	<td>' . $users->email . '</td>
                 		 	<td>' . $users->cel_phone . '</td> 
                 		 	<td>' . $users->address . '</td> 
                  		 	
                 		 	<td><a href="?view=usuario&mode=edit&id_user='******'" class="btn btn-success" data-toggle="modal" data-target="?view=usuario"><span class="glyphicon glyphicon-pencil"></span></a>  </td> 
                 		 	<td> <a href="#" class="btn btn-danger" onclick="DeleteItem(\'¿Está seguro de eliminar este usuario?\',\'?view=usuario&mode=delete&id_user='******'\')"><span class="glyphicon glyphicon-trash"></span></a> </td>
                      
Example #6
0
<?php

session_start();
require_once '../model/products/Products.php';
require_once '../lib/Zebra_Pagination.php';
$indicatorCategory = $_GET["indicator"];
$product = new Products();
$zebraPage = new Zebra_Pagination();
$productsPerPage = 12;
$limit = ($zebraPage->get_page() - 1) * $productsPerPage;
$regProducts = $product->loadProducts($limit, $productsPerPage, $indicatorCategory);
$totalProducts = $product->totalRows($indicatorCategory);
$zebraPage->records($totalProducts);
$zebraPage->records_per_page($productsPerPage);
$b = $_SESSION["user"][0];
?>
<!DOCTYPE html>
<html lang="es">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <title>Shop | Masessa</title>
        <link href="css/bootstrap.min.css" rel="stylesheet">
        <link href="css/font-awesome.min.css" rel="stylesheet">
        <link href="css/prettyPhoto.css" rel="stylesheet">
        <link href="css/price-range.css" rel="stylesheet">
        <link href="css/animate.css" rel="stylesheet">
        <link href="css/main.css" rel="stylesheet">
        <link href="css/responsive.css" rel="stylesheet">
<a href="paginacionzebra.php"><img src="../imagenes/Actualizar.jpg" width="20" height="20"></a><br><br>
<link rel="stylesheet" href="../public/css/zebra_pagination.css" type="text/css">
<?php 
require 'Zebra_Pagination.php';
$conexion = mysqli_connect('localhost', 'root', '', 'deportes') or die("Error al conectarse a la base de datosclientes");
$query = "Select * from estadisticas";
$consulta = mysqli_query($conexion, $query);
$total_paginas = mysqli_num_rows($consulta);
$resultados = 10;
$paginacion = new Zebra_Pagination();
$paginacion->records($total_paginas);
$paginacion->records_per_page($resultados);
//quita los ceros al principio de los vinculos
$paginacion->padding(false);
$query2 = "Select jugadores.codigo, estadisticas.temporada, jugadores.Nombre, estadisticas.Puntos_por_partido as PpP, estadisticas.Rebotes_por_partido as RpP, estadisticas.Tapones_por_partido as TpP from estadisticas,jugadores limit " . ($paginacion->get_page() - 1) * $resultados . "," . $resultados . "";
echo "\n<div class='tabla'>\n\t<div class='titulo'>\n\t\t<p>Resultado consulta temporada</p>\t\t\n\t</div>\n\t<div class='fila'>\n\t\t<div class='columna'><b>Codigo</b></div>\n\t\t<div class='columna'><b>Temporada</b></div>\n\t\t<div class='columna'><b>Nombre</b></div>\n\t\t<div class='columna'><b>PpP</b></div>\n\t\t<div class='columna'><b>RpP</b></div>\n\t\t<div class='columna'><b>TpP</b></div>\n\t</div>\n";
$resultado2 = mysqli_query($conexion, $query2);
while ($fila = mysqli_fetch_array($resultado2)) {
    echo "\n\t<div class='fila'>\n\t\t<div class='columna'>" . $fila['codigo'] . "</div>\n\t\t<div class='columna'>" . $fila['temporada'] . "</div>\n\t\t<div class='columna'>" . $fila['Nombre'] . "</div>\n\t\t<div class='columna'>" . $fila['PpP'] . "</div>\n\t\t<div class='columna'>" . $fila['RpP'] . "</div>\n\t\t<div class='columna'>" . $fila['TpP'] . "</div>\n\t</div>\n";
}
echo '</div>';
$paginacion->render();
?>
<style type="text/css">
.tabla {
	background-color: #1168A8;
	border-radius: 5px;
	border: 2px solid #000;
	display: table;
	margin: 0px;
	margin-left: 20px;
$tag = date('d-m-y H-i-s');
$tag = sha1($tag);
include_once '../php/mysql.class/mysql.class.php';
include_once '../php/clases/clsUsuario.php';
$OBJ = new Usuario();
include_once '../js/zebra/Zebra_Pagination.php';
$zebra = new Zebra_Pagination();
$id = 0;
if ($_GET["id"] != '') {
    $id = $_GET["id"];
}
$estado = '';
$total = 0;
$total = $OBJ->get_count_detalle_inventario($id);
$result = 10;
$zebra->records($total);
$zebra->records_per_page($result);
#limit
$limite = ' LIMIT ' . ($zebra->get_page() - 1) * $result . ',' . $result;
if ($id != '') {
    $data_Inventarios = array();
    $data_detalle = array();
    $data_Inventarios = $OBJ->get_Inventarios(' WHERE int_IdAuto = ' . $id);
    if (is_array($data_Inventarios["data"])) {
        #
        foreach ($data_Inventarios["data"] as $key => $rs) {
            $nombre = $rs->var_Nombre;
            $fecha = $rs->fecha;
            $estado = $rs->chr_Estado;
            $Usuario = $rs->int_IdUsuario;
            $Tipo = $rs->var_Tipo;
Example #9
0
         $sql = "select * from TBLS";
         break;
     case 'partitions':
         $sql = "select * from PARTITIONS";
         break;
     case 'indexes':
         $sql = "select * from IDXS";
         break;
     default:
         echo $lang['invalidEntry'];
         break;
 }
 $arr = $meta->GetResultRow($sql);
 $records_per_page = 50;
 $pagination = new Zebra_Pagination();
 $pagination->records(count($arr));
 $pagination->records_per_page($records_per_page);
 $arr = array_slice($arr, ($pagination->get_page() - 1) * $records_per_page, $records_per_page);
 echo "<a href=metaSummury.php><i class=icon-backward></i> " . $lang['back'] . "</a><br><br>";
 echo "<table class=\"table table-bordered table-striped table-hover\">";
 $i = 0;
 foreach (@$arr as $k => $v) {
     echo "<tr>\n";
     foreach ($v as $kk => $vv) {
         echo "<td>";
         echo $vv;
         echo "</td>";
     }
     echo "</tr>";
     $i++;
 }
Example #10
0
 public function getTotalSaleList($id_order_by = null, $records_per_page = null)
 {
     $pagination = new Zebra_Pagination();
     // set position of the next/previous page links
     $pagination->navigation_position(isset($_GET['navigation_position']) && in_array($_GET['navigation_position'], array('left', 'right')) ? $_GET['navigation_position'] : 'outside');
     $records_per_page = $records_per_page == null ? 15 : $records_per_page;
     $db = PDOQuery::getInstance();
     $db->connect();
     $order_by = $this->orderBySwitcher($id_order_by);
     $asc = $this->getOrderDirection();
     $sql = "SELECT SQL_CALC_FOUND_ROWS DISTINCT  \n\t\t\t\t\tSUM(sales.amount) as total,\n\t\t\t\t\tsales.id_shop_session,\n\t\t\t\t\tshop_session.date\n\t\t\t\tFROM \tsales\n\t\t\t\t\tINNER JOIN shop_session ON shop_session.id_shop_session = sales.id_shop_session\n\t\t\t\tWHERE \tshop_session.id_shop = " . $_SESSION['id_shop'] . "\n\t\t\t\tAND \tshop_session.is_active = 0\n\t\t\t\tGROUP BY shop_session.id_shop_session\n\t\t\t\tORDER BY {$order_by} {$asc}\n\t\t\t\tLIMIT\n   \t\t\t\t" . ($pagination->get_page() - 1) * $records_per_page . ", " . $records_per_page;
     $stmt = $db->prepareQuery($sql);
     $stmt->bindParam(':id_shop', $_SESSION['id_shop'], PDO::PARAM_INT);
     $stmt->execute();
     $rows = $db->query('SELECT FOUND_ROWS();')->fetch(PDO::FETCH_COLUMN);
     // pass the total number of records to the pagination class
     $pagination->records($rows);
     // records per page
     $pagination->records_per_page($records_per_page);
     $this->pagination_render = $pagination->render();
     $db->close();
     return $stmt;
 }
Example #11
0
//totla number of records per page
$records_per_page = 3;
//instantiate the pagination object
$pagination = new Zebra_Pagination();
if (!empty($_POST['search'])) {
    $find = $_POST['search'];
    $find = preg_replace("#[^0-9a-z]#i", "", $find);
} else {
    $find = null;
}
?>

     <?php 
$fundraisers = $this->searchrepository->search_fundraiser($find);
// the number of total records is the number of records in the array
$pagination->records(count($fundraisers));
// records per page
$pagination->records_per_page($records_per_page);
if ($fundraisers == null) {
    echo "Result not found";
} else {
    //slicing the total number of records in array per the reocrds per page
    $fundraisers = array_slice($fundraisers, ($pagination->get_page() - 1) * $records_per_page, $records_per_page);
    ?>


    
     	<div class="row">
            <div class="col-lg-8 col-lg-offset-2">                      
                 <div class="row">
                  <h4>FUNDRAISERS</h4>
Example #12
0
        $pagination->navigation_position(isset($_GET['navigation_position']) && in_array($_GET['navigation_position'], array('left', 'right')) ? $_GET['navigation_position'] : 'outside');
        // the number of total records is the number of records in the array
        $pagination->records($total_products);
        // records per page
        $pagination->records_per_page($records_per_page);
        //echo "select * from product where is_active='1' and `product_category` ='".$_GET['product_category']."' and `gender` ='".$_GET['gender']."'  ORDER BY  `product_name`";
        $query = mysql_query("select * from product where is_active='1' and `product_category` ='" . $_GET['product_category'] . "' and `gender` ='" . $_GET['gender'] . "'  ORDER BY  `product_name`,model LIMIT " . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page);
    } else {
        //echo "gender not coming";
        $total_products = mysql_num_rows(mysql_query("select * from product where is_active = 1 and `product_category` ='" . $_GET['product_category'] . "'  order by order_no asc"));
        $records_per_page = 120;
        $pagination = new Zebra_Pagination();
        // set position of the next/previous page links
        $pagination->navigation_position(isset($_GET['navigation_position']) && in_array($_GET['navigation_position'], array('left', 'right')) ? $_GET['navigation_position'] : 'outside');
        // the number of total records is the number of records in the array
        $pagination->records($total_products);
        // records per page
        $pagination->records_per_page($records_per_page);
        // echo "select * from product where is_active='1' and `product_category` ='".$_GET['product_category']."' and `gender` ='".$_GET['gender']."'  ORDER BY  `product_name`".".................";
        $query = mysql_query("select * from product where is_active='1' and `product_category` ='" . $_GET['product_category'] . "' ORDER BY  `product_name`,model LIMIT " . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page);
    }
}
?>

 <div class="right_col col span_6_of_8">   

    <div class="">

        <!-- Marketing Icons Section -->

        <div class="row" id="ajax_response">
              <thead>
                <tr class="danger" >
                  <th style="width: 25%;" >ficha</th>
                  <th style="width: 25%;">cursos</th>
                  <th style="width: 25%;">Descripción</th>                 
                  <th style="width: 5%;">Editar</th>
                  <th style="width: 5%;">Eliminar</th>
                </tr>
              </thead>
              <tbody >
              <?php 
$conn = new ezSQL_mysql(DB_USER, DB_PASS, DB_NAME);
$total_cursos = $conn->get_var('SELECT count(*) FROM cursos');
$resultados = 10;
$paginacion = new Zebra_Pagination();
$paginacion->records($total_cursos);
$paginacion->records_per_page($resultados);
// Quitar ceros en numeros con 1 digito en paginacion
$paginacion->padding(false);
$lista_cursos = $conn->get_results('SELECT * FROM cursos LIMIT ' . ($paginacion->get_page() - 1) * $resultados . ', ' . $resultados);
foreach ($lista_cursos as $cursos) {
    echo '<tr >
                  			<td>' . $cursos->ficha . '</td>
                 		 	  <td>' . $cursos->nombre . '</td>
                 		 	  <td>' . $cursos->descripcion . '</td>
                 		 	
                  		 	
                 		 	<td><a href="?view=cursos&mode=edit&id_curso=' . $cursos->id_curso . '" class="btn btn-success"><span class="glyphicon glyphicon-pencil"></span></a>  </td> 
                 		 	<td> <a href="#" class="btn btn-danger" onclick="DeleteItem(\'¿Está seguro de eliminar este usuario?\',\'?view=cursos&mode=delete&id_curso=' . $cursos->id_curso . '\')"><span class="glyphicon glyphicon-trash"></span></a> </td>
                      
                 		 	             		
Example #14
0
                 }
             }
         }
     }
     $i++;
 }
 $file_array = $etc->ArrayReindex($file_array);
 closedir($dh);
 #var_dump($file_array);
 #Filename quick sort by date desc
 $file_array = $etc->QuickSortForLogFile($file_array);
 #
 #Make Pagination object
 $records_per_page = 30;
 $pagination = new Zebra_Pagination();
 $pagination->records(count($file_array));
 $pagination->records_per_page($records_per_page);
 $file_array = @array_slice($file_array, ($pagination->get_page() - 1) * $records_per_page, $records_per_page);
 echo "<table class=\"table table-bordered table-hover table-striped\">";
 echo "<tr class=\"info\">";
 echo "<td>" . $lang['filename'] . "</td><td>" . $lang['fileContent'] . "</td><td>" . $lang['filetype'] . "</td><td>" . $lang['filesize'] . "</td>";
 echo "</tr>";
 foreach (@$file_array as $index => $file) {
     echo "<tr>";
     if ($file == '.' || $file == '..') {
         continue;
     } else {
         $tmp = explode("_", $file);
         $tmp = substr($tmp[1] . "_" . $tmp[2], 0, -4);
         if (file_exists($env['output_path'] . "/hive_res." . $tmp . ".csv")) {
             if ($_SESSION['role'] == 'superadmin') {
Example #15
0
  print_r(iterator_to_array($cursor));
  echo "</pre>";*/
$records_per_page = 10;
// include pagination class
require 'Zebra_Pagination.php';
// instantiate the pagination object
$pagination = new Zebra_Pagination();
// fetch docs in db->coll with limit/skip/sort
$limit = $records_per_page;
$skip = ($pagination->get_page() - 1) * $records_per_page;
//$sort = array( 'label' => 1 );
$cursor = $coll->find()->limit($limit)->skip($skip);
// count the total number of docs
$rows = $cursor->count();
// pass the total number of records to the pagination class
$pagination->records($rows);
// records per page
$pagination->records_per_page($records_per_page);
?>
  
  <div class="page-header">
    <h1>IIIF Manifests Repository at Biblissima <small>(work-in-progress)</small></h1>
  </div>
  
  <div class="well">
    <p>This is a first test of a web interface for a <strong>manifests repository at Biblissima</strong> (<span class="text-danger">work-in-progress</span>).</p>
    <p>Initially this demo presents a selection of digital objects from <a href="http://gallica.bnf.fr">Gallica</a> available via IIIF standards. It is part of a prototype on medieval illuminations involving two existing databases: <a href="http://initiale.irht.cnrs.fr">Initiale</a> (IRHT-CNRS) and <a href="http://mandragore.bnf.fr">Mandragore</a> (BnF). The exposure of Gallica manifests is meant to be a temporary solution.</p>
    <p class="text-info">Total number of objects = <strong><?php 
echo $rows;
?>
</strong></p>
Example #16
0
//total number of records per page
$records_per_page = 3;
//instantiate the pagination object
$pagination = new Zebra_Pagination();
if (!empty($_POST['search'])) {
    $find = $_POST['search'];
    $find = preg_replace("#[^0-9a-z]#i", "", $find);
} else {
    $find = null;
}
?>

     <?php 
$users = $this->searchrepository->search_user($find);
// the number of total records is the number of records in the array
$pagination->records(count($users));
// records per page
$pagination->records_per_page($records_per_page);
?>

             <?php 
if ($users == null) {
    echo "Search not found";
} else {
    $users = array_slice($users, ($pagination->get_page() - 1) * $records_per_page, $records_per_page);
    ?>
	
             	
             	<div class="row">
                    <div class="col-lg-8 col-lg-offset-2">                      
                         <div class="row">
Example #17
0
//totla number of records per page
$records_per_page = 3;
//instantiate the pagination object
$pagination = new Zebra_Pagination();
if (!empty($_POST['search'])) {
    $find = $_POST['search'];
    $find = preg_replace("#[^0-9a-z]#i", "", $find);
} else {
    $find = null;
}
?>

     <?php 
$requirements = $this->searchrepository->search_requirement($find);
// the number of total records is the number of records in the array
$pagination->records(count($requirements));
// records per page
$pagination->records_per_page($records_per_page);
if ($requirements == null) {
    echo "Result not found";
} else {
    //slicing the total number of records in array per the reocrds per page
    $requirements = array_slice($requirements, ($pagination->get_page() - 1) * $records_per_page, $records_per_page);
    ?>


    
     	<div class="row">
            <div class="col-lg-8 col-lg-offset-2">                      
                 <div class="row">
                  <h4>requirementS</h4>
Example #18
0
$MySQL_password = '';
$MySQL_database = '';
// if could not connect to database
if (!($connection = @mysql_connect($MySQL_host, $MySQL_username, $MySQL_password))) {
    // stop execution and display error message
    die('Error connecting to the database!<br>Make sure you have specified correct values for host, username and password.');
}
// if database could not be selected
if (!@mysql_select_db($MySQL_database, $connection)) {
    // stop execution and display error message
    die('Error selecting database!<br>Make sure you have specified an existing and accessible database.');
}
// how many records should be displayed on a page?
$records_per_page = 10;
// include the pagination class
require '../Zebra_Pagination.php';
// instantiate the pagination object
$pagination = new Zebra_Pagination();
// set position of the next/previous page links
$pagination->navigation_position(isset($_GET['navigation_position']) && in_array($_GET['navigation_position'], array('left', 'right')) ? $_GET['navigation_position'] : 'outside');
// the MySQL statement to fetch the rows
// note how we build the LIMIT
// also, note the "SQL_CALC_FOUND_ROWS"
// this is to get the number of rows that would've been returned if there was no LIMIT
// see http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows
$MySQL = '
            SELECT
                SQL_CALC_FOUND_ROWS
                country
            FROM
                countries
Example #19
0
    ?>
</td>
                                        <td><?php 
    echo $row['noc'];
    ?>
</td>
                                </tr>
                                <?php 
}
?>
                        </tbody>
                </table>
            </div>
            <?php 
// pass the total number of records to the pagination class
$pagination->records($TotalRcount['country']);
// records per page
$pagination->records_per_page($records_per_page);
// render the pagination links
$pagination->render();
/* close connection */
$conn->close();
?>
        </div>
        <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
        <script type="text/javascript" src="js/zebra_pagination.js"></script>
    </body>
</html>

Example #20
0
				<thead>
					<tr>
						<th>File</th>
						<th data-hide="phone">Size</th>
						<th>Type</th>
						<th data-hide="phone,tablet">Date</th>
						<th>Action</th>
					</tr>
				</thead>
				<tbody>
<?php 
$ignored_childs = array('expimp');
$dir_files = getDirFiles(LEUPLOAD_STORE, 1, 2, $ignored_childs);
$records_per_page = $LEUPLOAD_PERPAGE_LIST;
$pagination = new Zebra_Pagination();
$pagination->records(count($dir_files));
$pagination->records_per_page($records_per_page);
$pagination->labels('<span class="glyphicon glyphicon-chevron-left"></span>', '<span class="glyphicon glyphicon-chevron-right"></span>');
$dir_files = array_slice($dir_files, ($pagination->get_page() - 1) * $records_per_page, $records_per_page);
foreach ($dir_files as $k => $v) {
    ?>
					<tr>
						<td><a href="javascript:;" class="leupload_link" data-leupload-form="<?php 
    echo $pf;
    ?>
" data-leupload-link-model="<?php 
    echo $pm;
    ?>
" data-leupload-link="<?php 
    echo set_org_resource_url . '/' . $v['file_name'];
    ?>
Example #21
0
 function getListData($qs = "", $where = "")
 {
     // how many records should be displayed on a page?
     $records_per_page = 10;
     // include the pagination class
     require 'Zebra_Pagination.php';
     // instantiate the pagination object
     $pagination = new Zebra_Pagination();
     // the MySQL statement to fetch the rows
     // note how we build the LIMIT
     // also, note the "SQL_CALC_FOUND_ROWS"
     // this is to get the number of rows that would've been returned if there was no LIMIT
     // see http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_found-rows
     //if($qs!=""){$limit='' . (($pagination->get_page() - 1) * $records_per_page) . ', ' . $records_per_page . '';}else{$limit="";}
     $limit = 'LIMIT ' . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page . '';
     if ($where != "") {
         $where = "WHERE " . $where . "";
     } else {
         $where = "";
     }
     $data = $this->db->query("SELECT * FROM table_information " . $where . " " . $limit . "");
     // pass the total number of records to the pagination class
     $pagination->records(11);
     // records per page
     $pagination->records_per_page($records_per_page);
     $out['data'] = $data->result_array();
     $out['page'] = $pagination->render();
     //echo $pagination->render(true); die();
     return $out;
 }
Example #22
0
<?php

include_once $fsConfig->getPath() . 'view/partial/head.php';
include_once $fsConfig->getPath() . 'libs/Zebra_Pagination.php';
?>

<?php 
$paginacion = new Zebra_Pagination();
$paginacion->records($objRespuesta[0]);
$paginacion->records_per_page(7);
?>
<div class="container container-fluid">
  <h1>Lista </h1>

  <p>
    <a href="<?php 
echo $fsConfig->getUrl();
?>
index.php/detalleEntradaSalidaBodega/nuevo"  class="btn btn-warning glyphicon glyphicon-plus" >Nuevo</a>
  </p>
  
  <div>
    <a href="<?php 
echo $fsConfig->getUrl();
?>
index.php/detalleEntradaSalidaBodega/reporte" target="_blank" class="btn btn-primary btn-xs">Ver Reporte</a>
  </div>
  <form id="form1" action="<?php 
echo $fsConfig->getUrl();
?>
index.php/detalleEntradaSalidaBodega/filtro" method="post">
Example #23
0
//totla number of records per page
$records_per_page = 3;
//instantiate the pagination object
$pagination = new Zebra_Pagination();
if (!empty($_POST['search'])) {
    $find = $_POST['search'];
    $find = preg_replace("#[^0-9a-z]#i", "", $find);
} else {
    $find = null;
}
?>

     <?php 
$projects = $this->searchrepository->search_project($find);
// the number of total records is the number of records in the array
$pagination->records(count($projects));
// records per page
$pagination->records_per_page($records_per_page);
if ($projects == null) {
    echo "Result not found";
} else {
    //slicing the total number of records in array per the reocrds per page
    $projects = array_slice($projects, ($pagination->get_page() - 1) * $records_per_page, $records_per_page);
    ?>


    
     	<div class="row">
            <div class="col-lg-8 col-lg-offset-2">                      
                 <div class="row">
                  <h4>PROJECTS</h4>