?> Sold<b>]</b> | <img src='images/actions/user.png' style="vertical-align: middle; margin-bottom: 3px;" /> <a href='user.php'>My Profile</a> | <img src='images/actions/add.png' style="vertical-align: middle; margin-bottom: 3px;" /> <a href='add.php'>Add Steam Account</a> | <img src='images/actions/cart.png' style='vertical-align: middle; margin-bottom: 3px' /> <a href='store.php'>Store</a> | <img src='images/actions/message.png' style="vertical-align: middle; margin-bottom: 3px;" /> <a href='updatemsg.php'>Set/Disable Message</a> | <img src='images/actions/stats.png' style="vertical-align: middle; margin-bottom: 3px;" /> <a href='stats.php'>Sale Statistics</a> | <img src='images/actions/out.png' style="vertical-align: middle; margin-bottom: 3px;" /> <a href='?logout'>Logout</a></span><br /> <!-- END MENU --> <img src="images/style/login_logo.png" style="margin-left: 25px" /> <b><div class='motd'><div class='motdbackground'><div class='motdinner'><span style='color: white'>Store</span></b><br /><br /> <b>Welcome to the store! Here you can buy cool stuff for your profile and other stuff!</b> </span> </div> <b><!--<div class='motd' style='width: 100%'><div class='motdbackground'><div class='motdinner' style='height: 480px;'><span style='color: white'>Products</span>--> <?php require 'classes/paginator.php'; // Limit Search Results Per Page $records_per_page = dnPageLimit; // Define Pagination Class $pagination = new Zebra_Pagination(); $MySQL = 'SELECT SQL_CALC_FOUND_ROWS * FROM store LIMIT ' . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page . ''; if (!($result = @mysql_query($MySQL))) { // stop execution and display error message die(mysql_error()); } // fetch the total number of records in the table $rows = mysql_fetch_assoc(mysql_query('SELECT FOUND_ROWS() AS rows')); // pass the total number of records to the pagination class $pagination->records($rows['rows']); // records per page $pagination->records_per_page($records_per_page); ?> <div class='acctable' style='margin-top: 0.5%'> <table style='width: 100%'>
public function execute() { $config = $this->getConfig(); $turno = new turnoTable($config); $paginacion = new Zebra_Pagination(); $this->objRespuesta = $turno->total(); $resultado = 5; $pagina = ($paginacion->get_page() - 1) * $resultado; $this->objturno = $turno->getAll($resultado, $pagina); $this->defineView('turno', 'index', 'html'); }
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; }
public function execute() { $config = $this->getConfig(); $implemento = new implementoTable($config); $paginacion = new Zebra_Pagination(); $this->objRespuesta = $implemento->total(); $respuesta = $this->objRespuesta[0]; $resultado = 5; $pagina = ($paginacion->get_page() - 1) * $resultado; $indicio = filter_input(INPUT_POST, 'filtro'); if (empty($indicio)) { $this->objImplemento = $implemento->getAll($resultado, $pagina); } else { $this->objFiltro = $implemento->filtro($indicio); $this->objImplemento = $this->objFiltro; } $this->defineView('implemento', 'index', 'html'); }
public function execute() { $config = $this->getConfig(); $cargo = new cargoTable($config); $this->objcargo = $cargo->getAll(); $tipoId = new tipoIdTable($config); $this->objTipoId = $tipoId->getAll(); $tipoTercero = new tipoTerceroTable($config); $this->objTipoTercero = $tipoTercero->getAll(); $metodo = new terceroTable($config); $paginacion = new Zebra_Pagination(); $this->objRespuesta = $metodo->total(); $respuesta = $this->objRespuesta[0]; $resultado = 5; $pagina = ($paginacion->get_page() - 1) * $resultado; $indicio = filter_input(INPUT_POST, 'filtro'); if (empty($indicio)) { $this->objMetodo = $metodo->pager($resultado, $pagina); } else { $this->objFiltro = $metodo->filtro($indicio); $this->objMetodo = $this->objFiltro; } $this->defineView('tercero', 'index', 'html'); }
<?php // ezSQL require_once 'libs/ez_sql_core.php'; require_once 'libs/ez_sql_mysql.php'; // Zebra Pagination require_once 'libs/Zebra_Pagination.php'; $conn = new ezSQL_mysql('root', '', 'jvs_tutoriales'); $total_paises = $conn->get_var('SELECT count(*) FROM paises'); $resultados = 6; $paginacion = new Zebra_Pagination(); $paginacion->records($total_paises); $paginacion->records_per_page($resultados); // Quitar ceros en numeros con 1 digito en paginacion $paginacion->padding(false); $paises = $conn->get_results('SELECT * FROM paises LIMIT ' . ($paginacion->get_page() - 1) * $resultados . ', ' . $resultados); ?> <!DOCTYPE html> <html lang="es"> <head> <meta charset="utf-8"> <title>JV Software | Tutorial 14</title> <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <style> .mostrar-mas { text-align: center; background-color: #D9EDF7; border: 1px solid #BCE8F1; } .mostrar-mas a {
<?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? $records_per_page = 10; // include the pagination class require '../Zebra_Pagination.php'; // instantiate the pagination object
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; }
} } $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') { echo "<td><a href=getResult.php?str=" . $file . ">{$file}</a></td>\n"; } else {
<img src="images/style/login_logo.png" style="margin-left: 25px" /> <b><div class='motd' style='margin-bottom: -1.5%'><div class='motdbackground'><div class='motdinner'><span style='color: white'>Payment Details</span></b><br /><br /><b>j0rpi<br /><br /><div style='width: 50%; background: rgba(0,0,0,0.2); padding: 5px; border-radius: 6px;'>PayPal: stempunksf@gmail.com<br />BTC: 1FuBA8wdSLmEJNo1mR2gDkACfa7c9QXobo</div><br />FallbackeN<br /><br /><div style='width: 50%; background: rgba(0,0,0,0.2); padding: 5px; border-radius: 6px;'>PayPal: puresavage99@gmail.com</b><br /></div></div></div></div><br /><br /><br /><br /><br /><br /><br /><br /> <div style='margin-bottom: 40%'> <?php // Message Box if ($functions->GetMessageBeta() == '') { echo ''; } else { echo $functions->GetMessageBeta(); } echo '</div>'; // Limit Search Results Per Page $records_per_page = dnPageLimit; // Define Pagination Class $pagination = new Zebra_Pagination(); $MySQL = 'SELECT SQL_CALC_FOUND_ROWS * FROM accs WHERE status="Not Sold" LIMIT ' . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page . ''; if (!($result = @mysql_query($MySQL))) { // stop execution and display error message die(mysql_error()); } // fetch the total number of records in the table $rows = mysql_fetch_assoc(mysql_query('SELECT FOUND_ROWS() AS rows')); // pass the total number of records to the pagination class $pagination->records($rows['rows']); // records per page $pagination->records_per_page($records_per_page); ?> <div class='acctable'> <table>
<p>Show next/previous page links on the <a href="example2.php?navigation_position=left">left</a> or on the <a href="example2.php?navigation_position=right">right</a>. Or revert to the <a href="example2.php">default style</a>.<br> Pagination links can be shown in <a href="example2.php">natural</a> or <a href="example2.php?direction=reversed">reversed</a> order.<br> See the <a href="example2.php">default</a> looks or with <a href="example2.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 // database connection details $MySQL_host = ''; $MySQL_username = ''; $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
} ?> <?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"> <h4>USERS</h4> <?php foreach ($users as $index => $user) { ?> <div class="col-md-4"> <a href="<?php echo BASE_URL; ?> profile/index.php?id=<?php
<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> </tr>'; } ?>
// include the pagination class require '../../Zebra_Pagination.php'; // instantiate the pagination object $pagination = new Zebra_Pagination(); // how many records should be displayed on a page? $records_per_page = 10; //Establish connection using mysqli api $conn = mysqli_connect('localhost', '', '', ''); $sql = 'SELECT * FROM countries ORDER BY country LIMIT ' . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page . ''; $result = $conn->query($sql); $sql2 = "SELECT COUNT(*) AS country FROM countries"; $result2 = $conn->query($sql2); $TotalRcount = $result2->fetch_assoc(); // set position of the next/previous page links // OPTIONAL $pagination->navigation_position(isset($_GET['navigation_position']) && in_array($_GET['navigation_position'], array('left', 'right')) ? $_GET['navigation_position'] : 'outside'); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
} 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> <?php foreach ($requirements as $index => $require) { ?> <div class="col-md-4" > <a href="<?php echo BASE_URL;
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++; } echo "</table>"; $pagination->render();
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; }
* include file start*********************************************************** */ /* * 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*********************************************************************** */
<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']; ?> " data-leupload-file-type="<?php echo $v['file_type'] ? 'img' : 'doc'; ?>
<?php // select Mongo collection $coll = $db->selectCollection("prototype_IM"); //echo "Collection de travail : " . $coll->getName() . ".\n"; /*echo "<pre>"; 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">
<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> </tr>'; } ?>
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; $Valor = $rs->int_ValorTipo; } #
echo $functions->GetUserAwards($_SESSION['user_name']); ?> </span> <br /> </div> <b><!--div class='motd' style='width: 100%'><div class='motdbackground'><div class='motdinner' ><span style='color: white'><?php echo $_SESSION['user_name']; ?> :: Selling/Sold</span>--> <?php require 'classes/paginator.php'; // Limit Search Results Per Page $records_per_page = dnPageLimit; // Define Pagination Class $pagination = new Zebra_Pagination(); $MySQL = 'SELECT SQL_CALC_FOUND_ROWS * FROM accs WHERE seller="' . $_SESSION['user_name'] . '" LIMIT ' . ($pagination->get_page() - 1) * $records_per_page . ', ' . $records_per_page . ''; if (!($result = @mysql_query($MySQL))) { // stop execution and display error message die(mysql_error()); } // fetch the total number of records in the table $rows = mysql_fetch_assoc(mysql_query('SELECT FOUND_ROWS() AS rows')); // pass the total number of records to the pagination class $pagination->records($rows['rows']); // records per page $pagination->records_per_page($records_per_page); ?> <br /> <div class='acctable' style='margin-top: -1.0%'> <table style='width: 100%'>
<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;
$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"> <?php
<?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">
} 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> <?php foreach ($projects as $index => $project) { ?> <div class="col-md-4" > <a href="<?php echo BASE_URL;