function select_all_vendedores() { include '../resources/paginator.class.php'; $sql = "SELECT * FROM personal ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay personal en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); $sql = "SELECT * FROM personal "; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $id = $row['id']; $nombre = $row['nombre']; $apellido = $row['apellido']; $login = $row['login']; $role = $row['role']; $password = $row['password']; switch ($role) { case 1: $role_nombre = "Administrador"; break; case 2: $role_nombre = "Marketing"; break; case 3: $role_nombre = "Ventas"; break; } echo '<div class="item"> <div class="olive-bar"><h4>' . $nombre . ' ' . $apellido . '</h4></div> </div>'; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM categorias ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay categoria en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); $sql = "SELECT * FROM categorias ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $idCategorias = $row['idCategorias']; $strDescripcion = $row['strDescripcion']; $talles = $row['talles']; echo '<div class="item-box-cat"> <h4>' . $strDescripcion . '</h4> <div class="box-btn-cat"> <a class="cat" href="e_categoria.php?id=' . $idCategorias . '&activo=2&sub=d">ADMINISTRAR</a> <div style="width:100%;height:10px;float:left;display:block"></div> <a class="cat" href="d_categoria.php?id=' . $idCategorias . '&activo=2&sub=d">ELIMINAR</a> </div> </div> '; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM colores ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay colores en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); $sql = "SELECT * FROM colores ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $id_color = $row['id_color']; $nombre_color = $row['nombre_color']; echo '<div class="item-box-talles"> <div class="box-t"> <div class="box-dt"></div> <span>' . $nombre_color . '</span> </div> <a class="BtnTalle" href="e_color.php?id=' . $id_color . '">ADMINISTRAR</a> <a class="BtnTalle" href="d_color.php?id=' . $id_color . '">ELIMINAR</a> </div> '; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM creditos ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay credito en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); $sql = "SELECT * FROM creditos ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $idCredito = $row['idCredito']; $idUsuario = $row['idUsuario']; $idProducto = $row['idProducto']; echo '<div class="item"> <h4>[ Poner aca titulo o nombre ]</h4> <p><strong>Descripcion: </strong><p></p>[ poner aca descripcion u otro campo ]</p> <p> <a href="e_credito.php?id=' . $idCredito . '">Editar</a> <a href="d_credito.php?id=' . $idCredito . '">Borrar</a> </p> </div>'; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM novedades ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p style="margin:10px 0 0 30px;font-family:"Open sans",sans-serif",text-transform:uppercase>No hay novedad en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); $sql = "SELECT * FROM novedades ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $idNovedades = $row['idNovedades']; $titulo = $row['titulo']; $cuerpo = $row['cuerpo']; $imagen = $row['imagen']; $fecha = $row['fecha']; if ($imagen) { $item .= ' <div class="item"> <div class="olive-bar"><h4>' . $titulo . ' </h4></div> <div class="divideritem" style="width:25%; float:left; padding:.5em"> <div class="nov-img"> <img style="margin-left: 15px" src="' . BASEURLRAIZ . '../images-novedades/' . $imagen . '" alt="" width="200"/></div> </div> <div class="divideritem" style="width:45%;float:left;padding:.5em;"> <p style="margin-left: 25px">' . $cuerpo . '</p> </div> <div class="divideritem" style="width:20%;float:left;padding:.5em"> </div> <div class="opcionesitem"> <a class="btn-micuenta4" href="e_novedad.php?id=' . $idNovedades . '">Editar</a> <a class="btn-micuenta4" href="d_novedad.php?id=' . $idNovedades . '">Borrar</a> </div> </div> '; //'<p></p>'; } else { $item .= ' <div class="item"> <h4>' . $titulo . ' </h4> <div class="divideritem" style="width:25%; float:left; padding:.5em"> <div style="width:120px; height:120px; float:left; margin:.5em; background:#ccc;"></div> </div> <div class="divideritem" style="width:45%;float:left;padding:.5em"> <p>' . $cuerpo . '</p> </div> <div class="divideritem" style="width:20%;float:left;padding:.5em"> </div> <p> <a class="btn-micuenta4" href="e_novedad.php?id=' . $idNovedades . '">Editar</a> <a class="btn-micuenta4" href="d_novedad.php?id=' . $idNovedades . '">Borrar</a> </p> </div> '; } // } echo $item; echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
function manage($type = '') { include 'docroot.php'; if ($type == "country") { $queryString = "select * from coupons_country order by countryname"; $pages = new Paginator(); $pages->mid_range = 5; // Number of pages to display. Must be odd and > 3 $pages->paginate($queryString); $resultSet = $pages->rspaginate; if (mysql_num_rows($resultSet) > 0) { echo '<table cellpadding="0" cellspacing="0" class="coupon_report">'; echo '<tr class="fwb"><td>Country Name</td><td>Manage</td>'; echo '</tr>'; while ($noticia = mysql_fetch_array($resultSet)) { echo '<tr><td width="50%">' . ucfirst(html_entity_decode($noticia['countryname'], ENT_QUOTES)) . '</td><td width="50%">'; echo '<a href="' . $docroot . 'edit/country/' . $noticia['countryid'] . '/" class="edit_but" title="Edit" style="margin:5px 0 0 145px;"></a>'; if ($noticia["status"] == 'D') { echo '<a href="javascript:;" onclick="updatecountry(\'A\',\'' . $noticia["countryid"] . '\');" class="unblock" title="Unblock"></a>'; } else { echo '<a href="javascript:;" onclick="updatecountry(\'D\',\'' . $noticia["countryid"] . '\');" class="block" title="Block"></a>'; } echo '<a href="javascript:;" onclick="javascript:deletecountry(' . $noticia["countryid"] . ');" class="delete" title="Delete"></a>'; echo '</td></tr>'; } echo '</table>'; //pagination if ($pages->rspaginateTotal > 20) { echo '<table border="0" width="650" align="center" cellpadding="10">'; echo '<tr><td align="center"><div class="pagenation">'; echo $pages->display_pages(); echo '</div></td></tr>'; echo '</table>'; } } else { echo '<p class="nodata">No Country Available</p>'; } } else { if ($type == "city") { $queryString = "select coupons_cities.cityid, coupons_cities.cityname, coupons_cities.countryid, coupons_cities.status, coupons_country.countryname from coupons_cities left join coupons_country on coupons_cities.countryid = coupons_country.countryid order by coupons_cities.cityname"; $pages = new Paginator(); $pages->mid_range = 5; // Number of pages to display. Must be odd and > 3 $pages->paginate($queryString); $resultSet = $pages->rspaginate; if (mysql_num_rows($resultSet) > 0) { echo '<table cellpadding="5" cellspacing="5" class="coupon_report">'; echo '<tr class="fwb"><td>City Name</td><td>Country Name</td><td>Manage</td>'; echo '</tr>'; while ($noticia = mysql_fetch_array($resultSet)) { echo '<tr><td width="33%">' . ucfirst(html_entity_decode($noticia['cityname'], ENT_QUOTES)) . '</td><td>' . ucfirst(html_entity_decode($noticia['countryname'], ENT_QUOTES)) . '</td>'; echo '<td width="33%"><a href="' . $docroot . 'edit/city/' . $noticia['cityid'] . '/" class="edit_but" title="Edit" style="margin:5px 0 0 80px;"></a>'; if ($noticia["status"] == 'D') { echo '<a href="javascript:;" onclick="updatecity(\'A\',\'' . $noticia["cityid"] . '\');" class="unblock" title="Unblock"></a>'; } else { echo '<a href="javascript:;" onclick="updatecity(\'D\',\'' . $noticia["cityid"] . '\');" class="block" title="Block"></a>'; } echo '<a href="javascript:;" onclick="javascript:deletecity(' . $noticia["cityid"] . ');" class="delete" title="Delete"></a>'; echo '</td></tr>'; } echo '</table>'; //pagination if ($pages->rspaginateTotal > 20) { echo '<table border="0" width="650" align="center" cellpadding="10">'; echo '<tr><td align="center"><div class="pagenation">'; echo $pages->display_pages(); echo '</div></td></tr>'; echo '</table>'; } } else { echo '<p class="nodata">No City Available</p>'; } } else { if ($type == "subscriber") { //manage subscriber list $queryString = "select * from newsletter_subscribers left join coupons_cities on newsletter_subscribers.city_id = coupons_cities.cityid order by newsletter_subscribers.id"; $pages = new Paginator(); $pages->mid_range = 5; // Number of pages to display. Must be odd and > 3 $pages->paginate($queryString); $resultSet = $pages->rspaginate; if (mysql_num_rows($resultSet) > 0) { echo '<div style="float:left;width:770px;clear:both;"><div class="fr p5 mr-8"> <a href="' . DOCROOT . 'site-admin/pages/export.php?type=' . $type . '" title="Export All">Export All</a> </div></div>'; echo '<table cellpadding="5" cellspacing="5" class="coupon_report">'; echo '<tr class="fwb"><td>Email</td><td>City</td><td>Manage</td>'; echo '</tr>'; while ($noticia = mysql_fetch_array($resultSet)) { echo '<tr><td width="40%">' . ucfirst(html_entity_decode($noticia['email'], ENT_QUOTES)) . '</td><td width="40%">' . ucfirst(html_entity_decode($noticia['cityname'], ENT_QUOTES)) . '</td>'; echo '<td width="20%"><a href="javascript:;" onclick="javascript:delete_subscriber(' . $noticia["id"] . ');" class="delete" style="margin-left:60px !important;" ></a>'; echo '</td></tr>'; } echo '</table>'; //pagination if ($pages->rspaginateTotal > 20) { echo '<table border="0" width="650" align="center" cellpadding="10">'; echo '<tr><td align="center"><div class="pagenation">'; echo $pages->display_pages(); echo '</div></td></tr>'; echo '</table>'; } } else { echo '<p class="nodata">No Newsletter Subscribers Available</p>'; } } else { if ($type == "mobile-subscriber") { //manage subscriber list $queryString = "select * from mobile_subscribers left join coupons_cities on mobile_subscribers.city_id = coupons_cities.cityid order by mobile_subscribers.id"; $pages = new Paginator(); $pages->mid_range = 5; // Number of pages to display. Must be odd and > 3 $pages->paginate($queryString); $resultSet = $pages->rspaginate; if (mysql_num_rows($resultSet) > 0) { echo '<div style="float:left;width:770px;clear:both;"><div class="fr p5 mr-8"> <a href="' . DOCROOT . 'site-admin/pages/export.php?type=' . $type . '" title="' . $admin_language['exportall'] . '">Export All</a> </div></div>'; echo '<table cellpadding="5" cellspacing="5" class="coupon_report">'; echo '<tr class="fwb"><td>Mobile No</td><td>City</td><td>Manage</td>'; echo '</tr>'; while ($noticia = mysql_fetch_array($resultSet)) { echo '<tr><td>' . ucfirst(html_entity_decode($noticia['mobileno'], ENT_QUOTES)) . '</td><td>' . ucfirst(html_entity_decode($noticia['cityname'], ENT_QUOTES)) . '</td>'; echo '<td width="20%"><a href="javascript:;" onclick="javascript:delete_mobile_subscriber(' . $noticia["Id"] . ');" class="delete" style="margin-left:60px !important;"></a>'; echo '</td></tr>'; } echo '</table>'; //pagination if ($pages->rspaginateTotal > 20) { echo '<table border="0" width="650" align="center" cellpadding="10">'; echo '<tr><td align="center"><div class="pagenation">'; echo $pages->display_pages(); echo '</div></td></tr>'; echo '</table>'; } } else { echo '<p class="nodata">No Mobile Subscriber Available</p>'; } } else { if ($type == "category") { $queryString = "select * from coupons_category order by category_name"; $pages = new Paginator(); $pages->mid_range = 5; // Number of pages to display. Must be odd and > 3 $pages->paginate($queryString); $resultSet = $pages->rspaginate; if (mysql_num_rows($resultSet) > 0) { echo '<table cellpadding="5" cellspacing="5" class="coupon_report">'; echo '<tr class="fwb"><td>Category Name</td><td>Manage</td>'; echo '</tr>'; while ($noticia = mysql_fetch_array($resultSet)) { echo '<tr><td width="50%">' . ucfirst(html_entity_decode($noticia['category_name'], ENT_QUOTES)) . '</td>'; echo '<td width="50%"><a href="' . $docroot . 'edit/category/' . $noticia['category_id'] . '/" class="edit_but" title="Edit" style="margin:5px 0 0 145px;"></a>'; if ($noticia["status"] == 'D') { echo '<a href="javascript:;" onclick="updatecategory(\'A\',\'' . $noticia["category_id"] . '\');" class="unblock" title="Unblock"></a>'; } else { echo '<a href="javascript:;" onclick="updatecategory(\'D\',\'' . $noticia["category_id"] . '\');" class="block" title="Block"></a>'; } echo '<a href="javascript:;" onclick="javascript:deletecategory(' . $noticia["category_id"] . ');" class="delete" title="Delete"></a>'; echo '</td></tr>'; } echo '</table>'; //pagination if ($pages->rspaginateTotal > 20) { echo '<table border="0" width="650" align="center" cellpadding="10">'; echo '<tr><td align="center"><div class="pagenation">'; echo $pages->display_pages(); echo '</div></td></tr>'; echo '</table>'; } } else { echo '<p class="nodata">No Category Available</p>'; } } else { if ($type == "pages") { $queryString = "select * from pages order by id desc"; $pages = new Paginator(); $pages->mid_range = 5; // Number of pages to display. Must be odd and > 3 $pages->paginate($queryString); $resultSet = $pages->rspaginate; if (mysql_num_rows($resultSet) > 0) { ?> <table cellpadding="5" cellspacing="0" class="coupon_report" border="0"> <tr class="fwb"><td>Title</td><td>URL</td><td>Manage</td> </tr> <?php while ($noticia = mysql_fetch_array($resultSet)) { ?> <tr><td> <?php echo ucfirst(html_entity_decode($noticia['title'], ENT_QUOTES)); ?> </td> <td> <?php echo DOCROOT . "pages/" . $noticia["title_url"] . ".html"; ?> </td> <td width="25%"><a href="<?php echo $docroot; ?> edit/page/<?php echo $noticia['id']; ?> /" class="edit_but" title="Edit" style="margin:5px 0 0 70px;"></a> <a href="javascript:;" onclick="javascript:deletepage('<?php echo $noticia["id"]; ?> ');" class="delete" title="Delete"></a> </td></tr> <?php } ?> </table> <div class="fr mr-20 mt-10 "> <?php if ($pages->rspaginateTotal > 20) { echo $pages->display_pages(); } ?> </div> <?php } else { echo '<p class="nodata">No Data Available</p>'; //echo '<p class="nodata">No Pages Available</p>'; } } } } } } } }
/** * Return the complete HTML * * Navigation links appear before and after the table * * @return string */ public function get_html() { if (!$this->custom_html_rows) { $this->build_sql(); } if (empty($this->custom_html_rows_are_strings) or empty($this->custom_html_rows)) { // we'll just use the table helper to format a table include_helper('table'); $table = new table('sample_table'); // we need to change the headings to add the html links for sorting... if ($this->sql_results) { foreach ($this->sql_results as &$row) { $new_row = new \stdClass(); foreach ($row as $fname => $val) { $other_order = 'asc'; $current_order = ' '; // sorting? if ($this->sort_by == $fname) { if ($this->sort_ord == 'asc') { $current_order = ' ↑'; $other_order = 'desc'; } else { $current_order = ' ↓'; $other_order = 'asc'; } } if (!$this->suppress_sort and !in_array($fname, $this->do_not_allow_sort_on_these_columns)) { $key = '<a href="' . $this->base_url . '1/0/' . 'sort-' . urlencode($fname) . '-' . $other_order . '#' . $this->pager_id . '">' . esc_html_recursive($fname) . '</a>'; $key .= "<span style=\"width:2em;\">{$current_order}</span>"; } else { $key = esc_html_recursive($fname); } $new_row->{$key} = $val; } break; } $this->sql_results[0] = $new_row; reset($this->sql_results); $table->set_data($this->sql_results); $table->do_not_esc_th(TRUE); $table->do_not_esc_td(TRUE); $html_results = $table->get_html(); } else { $html_results = ''; } } else { // we have custom HTML ready to go $html_results = ''; if (!empty($this->custom_html_headings)) { $html_results .= $this->custom_html_headings; } foreach ($this->sql_results as $row) { $html_results .= $row . "\r\n"; } } $html = ''; // default if ($html_results) { $html = '<div id="' . $this->get_id() . '">' . "\r\n"; $html .= $this->get_filter_box_html(); $html .= parent::display_pages(); $html .= $html_results; $html .= parent::display_pages(); $html .= "\r\n</div>"; } return $html; }
} else { $order_by_str = " ORDER BY {$orderby_array['1']} {$sort}"; } $q_Players = "SELECT DISTINCT " . TBL_PLAYERS . ".*, " . TBL_GAMERS . ".*, " . TBL_USERS . ".*" . " FROM " . TBL_PLAYERS . ", " . TBL_GAMERS . ", " . TBL_USERS . " WHERE (" . TBL_PLAYERS . ".Event = '{$event_id}')" . " AND (" . TBL_PLAYERS . ".Gamer = " . TBL_GAMERS . ".GamerID)" . " AND (" . TBL_USERS . ".user_id = " . TBL_GAMERS . ".User)" . $order_by_str . ($paginate == true ? " {$pages->limit}" : ''); $result = $sql->db_Query($q_Players); $nbr_players = mysql_numrows($result); if (!$result || $nbr_players < 0) { $text .= EB_EVENTM_L51 . '<br />'; } else { if ($nbr_players == 0) { $text .= EB_EVENTM_L52 . '<br />'; } else { if ($paginate == true) { // Paginate $text .= '<br />'; $text .= '<span class="paginate" style="float:left;">' . $pages->display_pages() . '</span>'; $text .= '<span style="float:right">'; // Go To Page $text .= $pages->display_jump_menu(); $text .= ' '; // Items per page $text .= $pages->display_items_per_page(); $text .= '</span><br /><br />'; } /* Display table contents */ if ($can_change_seeds_players == true) { $text .= '<table class="table_left">'; $text .= '<tr>'; $text .= '<td>' . EB_EVENTM_L156 . '</td>'; $text .= '<td><form action="' . e_PLUGIN . 'ebattles/eventprocess.php?eventid=' . $event_id . '" method="post">'; $text .= ebImageTextButton('eventplayersshuffle', '', EB_EVENTM_L155);
function select_all($pagina, $orden) { $filtro_personal = $_GET['filtro_personal']; include '../resources/paginator.class.php'; if ($filtro_personal) { $sql = "SELECT * FROM personal WHERE role='{$filtro_personal}'"; } else { $sql = "SELECT * FROM personal"; } $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay personal en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); if ($filtro_personal) { $sql = "SELECT * FROM personal WHERE role='{$filtro_personal}' ORDER BY {$orden} {$pages->limit};"; } else { $sql = "SELECT * FROM personal ORDER BY {$orden} {$pages->limit};"; } $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $id = $row['id']; $nombre = $row['nombre']; $apellido = $row['apellido']; $login = $row['login']; $role = $row['role']; $password = $row['password']; switch ($role) { case 1: $role_nombre = "Administrador"; break; case 2: $role_nombre = "Marketing"; break; case 3: $role_nombre = "Ventas"; break; } echo ' <table> <tbody> <tr class=" tablaPersonal "> <td class="colA" align="center"> <div class="imagen-personal"></div> </td> <td class="colB tdBackground" align="center"> <span>' . $nombre . ' ' . $apellido . '</span> </td> <td class="colC tdBackground" align="center"> <span>Login: '******'</span> </td> <td class="colD tdBackground" align="center"> <span>' . $role_nombre . '</span> </td> <td class="colE "> <div class="botones"> <div class="item editar"> <a href="e_personal.php?id=' . $id . '&activo=2&sub=h"> <img class="imagen" src="../layout/editar.png" alt=""> </a> </div> <div class="item borrar"> <a href="d_personal.php?id=' . $id . '&activo=2&sub=h"> <img class="imagen" src="../layout/borrar.png" alt=""> </a> </div> </div> </td> </tr> </tbody> </table> '; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM productos ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay producto en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); include_once "../categorias/classes/class.categorias.php"; $sql = "SELECT * FROM productos ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $idProducto = $row['idProducto']; $strNombre = $row['strNombre']; $strDetalle = $row['strDetalle']; $intCategoria = $row['intCategoria']; $dblPrecio = $row['dblPrecio']; $intStock = $row['intStock']; $strImagen = $row['strImagen']; $strImagen2 = $row['strImagen2']; $strImagen3 = $row['strImagen3']; //veo si requiere talles $categorias = new categorias(); $categorias->select($intCategoria); $talles = $categorias->gettalles(); $stock = '<p>STOCK: ' . $intStock . '</p>'; if ($talles == 1) { include_once "../talles/classes/class.talles.php"; $tll = new talles(); $talles_disp = $tll->select_all_clean(); foreach ($talles_disp as $id_talle_m) { $talle_n = new talles(); $talle_n->select($id_talle_m); $nombre_talle = $talle_n->getnombre_talle(); $id_talle_tabla = $talle_n->getid_talle(); include_once "classes/class.talles_productos.php"; $tallprod = new talles_productos(); $tallprod->select_by_producto($idProducto, $id_talle_m); $id_talle_producto = $tallprod->getid(); #echo $id_talle = $tallprod->getid_talle(); $id_producto = $tallprod->getid_producto(); $cantidad = $tallprod->getcantidad(); if ($cantidad == "") { $cantidad = 0; } $talles_item .= '<br /> <div class="t-bg"> <p>' . $nombre_talle . ': ' . $cantidad . '</p> </div> '; $id_talle_m = ""; $stock = ''; } } else { $talles_item .= ""; } $item = ""; if ($strImagen) { $item .= ' <div class="item"> <div class="purple-bar"><h4>' . $strNombre . ' </h4></div> <div class="divideritem" style="width:20%; float:left;padding:.5em;"> <div class="sombra"></div> <div class="box-img"><img src="../../images_productos/' . $strImagen . '" alt="" width="120"/></div> </div> <div class="divideritem" style="width:45%;float:left;padding:.5em;"> <p style="margin: 8px 0 0 0">' . $strDetalle . '</p> </div> <div class="divideritem" style="width:20%;float:left;padding:.5em;"> <div class="box-pre"> <div class="box-v"><p>VALOR<p></div> <p style="color"><strong> $' . $dblPrecio . ' </strong></p> <div class="box-iva"><p>+ IVA</p></div> </div> <div class="box-detalle"><p>ID: ' . $idProducto . '</p> <p>' . $stock . '</p> ' . $talles_item . '</div> </div> <hr style="margin: 50px 0 8px 0;border-top: 1px solid #ccc"> <div class="opcionesitem"> <a href="e_producto.php?id=' . $idProducto . '">Editar</a> <a href="d_producto.php?id=' . $idProducto . '">Borrar</a> </div> </div> '; } else { $item .= ' <div class="item"> <div class="purple-bar"><h4>' . $strNombre . '</h4></div> <div class="divideritem" style="width:25%; float:left; padding:.5em"> <div style="width:120px; height:120px; float:left; margin:.5em; background:#ccc;"></div> </div> <div class="divideritem" style="width:45%;float:left;padding:.5em"> <p>' . $strDetalle . '</p> </div> <div class="divideritem" style="width:20%;float:left;padding:.5em"> <p><strong>VALOR: $' . $dblPrecio . ' </strong>+ IVA</p> <p>ID: ' . $idProducto . '</p> ' . $stock . ' <p>' . $talles_item . '</p> </div> <div class="opcionesitem"> <a href="e_producto.php?id=' . $idProducto . '">Editar</a> <a href="d_producto.php?id=' . $idProducto . '">Borrar</a> </div> </div> '; } echo $item; //'<p></p>'; $talles_item = ""; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
} if (isset($_GET['mn_tag'])) { if (isset($conf['url_tag_base']) && $conf['url_tag_base'] != '') { $mn_pagination_url = $conf['url_base'] . $conf['url_tag_base'] . '/' . $_GET['mn_tag'] . '/'; } else { $mn_pagination_url = $mn_pagination_url . 'mn_tag=' . $_GET['mn_tag'] . '&'; } } require_once MN_ROOT . 'stuff/inc/paginator.class.php'; $pages = new Paginator(); $pages->items_total = $posts_count; $pages->items_per_page = $mn_count; $pages->current_page = $_GET['mn_p']; $pages->show_path = $mn_pagination_url; $pages->paginate(); $pages_tmpl_content = $pages->display_pages(); if (isset($_GET['mn_cat']) && isset($conf['url_cat_base']) && $conf['url_cat_base'] != '') { $pages_tmpl_content = str_replace('mn_p=', '', $pages_tmpl_content); } if (isset($_GET['mn_tag']) && isset($conf['url_tag_base']) && $conf['url_tag_base'] != '') { $pages_tmpl_content = str_replace('mn_p=', '', $pages_tmpl_content); } $j = ($_GET['mn_p'] - 1) * $mn_count; $max = $posts_count - $j > $mn_count ? $j + $mn_count : $posts_count; if ($j == 0 && $max == $posts_count) { $mn_pagination = false; } } else { $j = ($_GET['mn_p'] - 1) * $mn_count; $max = $posts_count - $j > $mn_count ? $j + $mn_count : $posts_count; }
/** * displayGames - Displays the games database table */ function displayGames() { global $pref; global $sql; global $text; global $session; $pages = new Paginator(); $array = array('id' => array(EB_GAMES_L3, TBL_GAMES . '.GameID'), 'icon' => array(EB_GAMES_L4, TBL_GAMES . '.Icon'), 'game' => array(EB_GAMES_L5, TBL_GAMES . '.Name')); if (!isset($_GET['orderby'])) { $_GET['orderby'] = 'game'; } $orderby = eb_sanitize($_GET['orderby']); $sort = "ASC"; if (isset($_GET["sort"]) && !empty($_GET["sort"])) { $sort = $_GET["sort"] == "ASC" ? "DESC" : "ASC"; } $q = "SELECT count(*) " . " FROM " . TBL_GAMES; $result = $sql->db_Query($q); $numGames = mysql_result($result, 0); $totalItems = $numGames; $pages->items_total = $totalItems; $pages->mid_range = eb_PAGINATION_MIDRANGE; $pages->paginate(); $text .= '<div class="spacer">'; $text .= '<p>'; $text .= $numGames . ' ' . EB_GAMES_L6 . '<br />'; $text .= '</p>'; $text .= '</div>'; $orderby_array = $array["{$orderby}"]; $q = "SELECT " . TBL_GAMES . ".*" . " FROM " . TBL_GAMES . " ORDER BY {$orderby_array['1']} {$sort}" . " {$pages->limit}"; $result = $sql->db_Query($q); $num_rows = mysql_numrows($result); if (!$result || $num_rows < 0) { $text .= EB_GAMES_L7; return; } if ($num_rows == 0) { $text .= EB_GAMES_L8; } else { // Paginate $text .= '<br />'; $text .= '<span class="paginate" style="float:left;">' . $pages->display_pages() . '</span>'; $text .= '<span style="float:right">'; // Go To Page $text .= $pages->display_jump_menu(); $text .= ' '; // Items per page $text .= $pages->display_items_per_page(); $text .= '</span><br /><br />'; /* Display table contents */ $text .= '<form id="gamesform" action="' . e_PLUGIN . 'ebattles/gameprocess.php" method="post">'; $text .= '<table class="fborder" style="width:95%"><tbody>'; $text .= '<tr>'; $text .= '<td class="eb_td2"><input class="tbox" type="checkbox" name="sAll" onclick="selectAll(this)" /> (' . EB_GAMES_L9 . ')</td>'; foreach ($array as $opt => $opt_array) { $text .= '<td class="eb_td2"><a href="' . e_PLUGIN . 'ebattles/admin_config.php?eb_games&orderby=' . $opt . '&sort=' . $sort . '">' . $opt_array[0] . '</a></td>'; } $text .= '<td class="eb_td2">' . EB_GAMES_L10; $text .= '<input type="hidden" id="delete_game" name="delete_game" value=""/></td></tr>'; for ($i = 0; $i < $num_rows; $i++) { $gid = mysql_result($result, $i, TBL_GAMES . ".GameID"); $gname = mysql_result($result, $i, TBL_GAMES . ".Name"); $gicon = mysql_result($result, $i, TBL_GAMES . ".Icon"); $text .= '<tr>'; $text .= '<td class="forumheader3"><input class="tbox" type="checkbox" name="game_sel[]" value="' . $gid . '" /></td>'; $text .= '<td class="forumheader3">' . $gid . '</td>'; $text .= '<td class="forumheader3"><img ' . getGameIconResize($gicon) . ' title="' . $gicon . '"/></td>'; $text .= '<td class="forumheader3"><a href="' . e_PLUGIN . 'ebattles/admin_config.php?eb_games&gameid=' . $gid . '">' . $gname . '</a></td>'; $text .= '<td class="forumheader3"><a href="' . e_PLUGIN . 'ebattles/admin_config.php?eb_games&gameid=' . $gid . '"><img src="' . e_PLUGIN . 'ebattles/images/page_white_edit.png" alt="' . EB_GAMES_L11 . '" title="' . EB_GAMES_L11 . '"/></a>'; $text .= '<a href="javascript:buttonval(\'' . $gid . '\');" title="' . EB_GAMES_L12 . '" onclick="return confirm(\'' . EB_GAMES_L13 . '\')"><img src="' . e_PLUGIN . 'ebattles/images/cross.png" alt="' . EB_GAMES_L12 . '"/></a>'; $text .= '</td>'; $text .= '</tr>'; } $text .= '</tbody></table>'; $text .= '<table><tr> <td> <input class="eb_button" type="submit" name="delete_selected_games" value="' . EB_GAMES_L14 . '" onclick="return confirm(\'' . EB_GAMES_L15 . '\')"/> </td> <td> <input class="eb_button" type="submit" name="delete_all_games" value="' . EB_GAMES_L16 . '" onclick="return confirm(\'' . EB_GAMES_L17 . '\')"/> </td> <td> <input class="eb_button" type="submit" name="update_selected_games" value="' . EB_GAMES_L18 . '"/> </td> <td> <input class="eb_button" type="submit" name="update_all_games" value="' . EB_GAMES_L19 . '"/> </td> <td> <input class="eb_button" type="submit" name="add_games" value="' . EB_GAMES_L20 . '"/> </td> </tr> </table> '; $text .= '</form>'; } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $action_status = $_GET['action_status']; if ($action_status) { $sql = "SELECT * FROM propuestas WHERE estado='{$action_status}';"; } else { $sql = "SELECT * FROM propuestas"; } $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="noresult"><div class="notify-cero"> <p>SIN PROPUESTAS</p> </div></div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); if ($action_status) { $sql = "SELECT * FROM propuestas WHERE estado='{$action_status}' ORDER BY {$orden} {$pages->limit};"; } else { $sql = "SELECT * FROM propuestas ORDER BY {$orden} {$pages->limit};"; } $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $id_propuesta = $row['id_propuesta']; $id_usuario = $row['id_usuario']; $nombre_evento = $row['nombre_evento']; $lugar = $row['lugar']; $cant_invitados = $row['cant_invitados']; $fecha_estimada = $row['fecha_estimada']; $caracteristicas = $row['caracteristicas']; $monto = $row['monto']; $aprobado = $row['aprobado']; $leido = $row['leido']; $detalle_admin = $row['detalle_admin']; $aprobado_fecha = $row['aprobado_fecha']; $estado = $row['estado']; include_once '../usuarios/classes/class.usuarios.php'; $usr = new usuarios(); $usr->select($id_usuario); $nombre_usr = $usr->getstrNombre(); $apellido_usr = $usr->getstrApellido(); $email_usr = $usr->getstrEmail(); $monto_usuario = $usr->getdblCredito(); switch ($estado) { case 1: $estado = 'NO LEIDO'; break; case 2: $estado = 'PENDIENTE'; break; case 3: $estado = 'APROBADO'; break; case 4: $estado = 'NO APROBADO'; break; case 5: $estado = 'ENTREGADO'; break; } echo ' <div class="item"> <div class="olive-bar_new2"> <span class="bold">Usuario: </span>' . $nombre_usr . ' ' . $apellido_usr . '   <span class="bold">EMAIL </span>' . $email_usr . '</span>   <span class="bold">FECHA </span>' . $fecha_estimada . '</span>   </div> <div class="pubeev2"> <span class="estado">' . $estado . '</span> <span class="monto">$' . $monto . '</span> ' . utf8_decode($caracteristicas) . ' <p class="boton2"> <a href="e_propuesta.php?id=' . $id_propuesta . '&activo=1&sub=a">ADMINISTRAR</a> </p> </div> </div>'; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional – displays the page jump menu //echo $pages->display_items_per_page(); //Optional – displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM propuestas ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay propuesta en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); $sql = "SELECT * FROM propuestas ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $id_propuesta = $row['id_propuesta']; $id_usuario = $row['id_usuario']; $nombre_evento = $row['nombre_evento']; $lugar = $row['lugar']; $cant_invitados = $row['cant_invitados']; $fecha_estimada = $row['fecha_estimada']; $caracteristicas = $row['caracteristicas']; $monto = $row['monto']; $aprobado = $row['aprobado']; $leido = $row['leido']; $detalle_admin = $row['detalle_admin']; $aprobado_fecha = $row['aprobado_fecha']; $estado = $row['estado']; include_once '../usuarios/classes/class.usuarios.php'; $usr = new usuarios(); $usr->select($id_usuario); $nombre_usr = $usr->getstrNombre(); $apellido_usr = $usr->getstrApellido(); $email_usr = $usr->getstrEmail(); $monto_usuario = $usr->getdblCredito(); switch ($estado) { case 1: $estado = 'Pendiente'; break; case 2: $estado = 'En Proceso'; break; case 3: $estado = 'Aprobado'; break; case 4: $estado = 'No Aprobado'; break; case 5: $estado = 'Entregado'; break; } echo '<div class="item"> <div class="detalle_propuesta"> <span>Usuario: </strong>' . $nombre_usr . ' ' . $apellido_usr . ' - ' . $email_usr . '</span> ' . $caracteristicas . ' <p>FECHA:' . $fecha_estimada . ' | ESTADO: ' . $estado . '</p> </div> <p> <a href="e_propuesta.php?id=' . $id_propuesta . '">Administrar</a> <a href="d_propuesta.php?id=' . $id_propuesta . '">Borrar</a> </p> </div>'; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional – displays the page jump menu //echo $pages->display_items_per_page(); //Optional – displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM consultas WHERE respuesta_de = 0 "; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay consulta en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); $sql = "SELECT * FROM consultas WHERE respuesta_de = 0 ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $idConsulta = $row['idConsulta']; $idUsuario = $row['idUsuario']; $strAsunto = $row['strAsunto']; $strCampo = $row['strCampo']; $fecha = $row['fecha']; $respondido = $row['respondido']; $tipo = $row['tipo']; if ($respondido == 0) { $respondido_status = '<div class="status_purple">SIN RESPONDER <img src="../layout/item4.png" alt=""></div>'; } else { $respondido_status = '<div class="status_green">RESPONDIDA <img src="../layout/item7.png" alt=""></div>'; } include_once "../usuarios/classes/class.usuarios.php"; $user_info = new usuarios(); $user_info->select($idUsuario); $nombre_usuario = $user_info->getstrNombre(); $apellido_usuario = $user_info->getstrApellido(); $email_usuario = $user_info->getstrEmail(); $empresa_usuario = $user_info->getstrEmpresa(); echo ' <div id="content-consultas"> <div class="bar-consultas"> <span>Cliente: ' . utf8_decode($nombre_usuario) . ' ' . utf8_decode($apellido_usuario) . '</span> <span> Empresa: ' . utf8_decode($empresa_usuario) . '<div style="float:right"> ' . $fecha . ' </span> <a class="btn-consulta" href="responder_consulta.php?id=' . $idConsulta . '&activo=2&sub=f">ADMINISTRAR</a> </div> </div> <div class="box-consulta-g"> <div class="box-asunto-consulta"><span>Asunto: <h4>' . utf8_decode($strAsunto) . '</h4></span> </div> <div class="cuadro-respondido">' . $respondido_status . '</div> </div> <div class="box-consulta-campo"> <p><span>Consulta: </span>' . utf8_decode($strCampo) . '</p> </div> <div class="divisor"></div> '; echo $this->respuestas_de($idConsulta); echo '<p> <!--<form action="detail_consultas.php"> <button onclick="if(!confirm(\'Estas seguro de querer eliminar el producto?\'))return false">Eliminar</button>--> </form> </p><br /></div>'; } echo '<div class="navigate2">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
public function manageRsvp() { $content = ' <section id="content"> <div class="content-wrap"> <div class="container clearfix"> <div class="fancy-title title-border topmargin"> <h4>Manage RSVPs</h4> </div> <table class="table table-striped table-bordered table-hover" id="sample_1"> <thead> <tr> <th>ID</th> <th >Parent Name</th> <th >Telephone</th> <th >Email</th> <th >Number of Kids</th> <th >Kids Details</th> </tr> </thead> <tbody>'; $sub_sql = "SELECT COUNT(*) AS count FROM rsvp"; $result_pag_num = Database::performQuery($sub_sql); $row = $result_pag_num->fetch_assoc(); $num_rows = $row['count']; $pages = new Paginator($num_rows, 9, array(3, 5, 10, 12, 15, 20, 25, 30, 50, 100, 250, 'All')); //$content .= $pages->display_pages(); $sql = "SELECT * FROM rsvp ORDER BY id DESC LIMIT " . $pages->limit_start . "," . $pages->limit_end; $result = Database::performQuery($sql); while ($data = $result->fetch_assoc()) { $content .= '<tr class="odd gradeX"> <td>' . $data['id'] . '</td> <td >' . $data['parent'] . '</td> <td >' . $data['phone'] . '</td> <td class="center">' . $data['email'] . '</td> <td class="center">' . $data['numkids'] . '</td> <td >' . $data['kids'] . '</td> </tr>'; } $content .= '<tr><td colspan="4">' . $pages->display_pages() . '</td><td colspan="1">' . $pages->display_jump_menu() . '</td><td colspan="1">' . $pages->display_items_per_page() . '</td></tr>'; $content .= ' </tbody> </table> </div></div></section> '; return $content; }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $id_vendedor = $_GET['vendedor']; $role_login = $_SESSION['logged_role']; $id_login = $_SESSION['logged_id']; if ($role_login == 3) { $sql = "SELECT * FROM usuarios WHERE vendedor = '{$id_vendedor}' ;"; } else { if ($id_vendedor) { $sql = "SELECT * FROM usuarios WHERE vendedor = '{$id_vendedor}';"; } else { $sql = "SELECT * FROM usuarios"; } } $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo ' <a href="#">No hay usuario en el sistema!</a> '; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); include_once '../historiales/classes/class.historiales.php'; if ($role_login == 3) { $sql = "SELECT * FROM usuarios WHERE vendedor = '{$id_login}' ORDER BY {$orden} {$pages->limit};"; } else { if ($id_vendedor) { $sql = "SELECT * FROM usuarios WHERE vendedor = '{$id_vendedor}' ORDER BY {$orden} {$pages->limit};"; } else { $sql = "SELECT * FROM usuarios ORDER BY {$orden} {$pages->limit};"; } } $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $idUsuario = $row['idUsuario']; $strNombre = $row['strNombre']; $strApellido = $row['strApellido']; $strEmail = $row['strEmail']; $strEmpresa = $row['strEmpresa']; $strCargo = $row['strCargo']; $strPassword = $row['strPassword']; $dblCredito = $row['dblCredito']; $direccion = $row['direccion']; $telefono = $row['telefono']; $nombre_contacto1 = $row['nombre_contacto1']; $apellido_contacto1 = $row['apellido_contacto1']; $email_contacto1 = $row['email_contacto1']; $nombre_contacto2 = $row['nombre_contacto2']; $apellido_contacto2 = $row['apellido_contacto2']; $email_contacto2 = $row['email_contacto2']; $logo = $row['logo']; $vigencia_credito = $row['vigencia_credito']; $vendedor = $row['vendedor']; $usuarioitem = ""; //si tiene imagen if (strlen($logo) > 2) { $usuarioitem .= ' <table> <tbody> <tr class=" tablaClientes"> <td class="colA" align="center"> <img class="imagen" id="preview5" src="../../images-clientes/' . $logo . '" alt="" width="100"/> </td> <td class="colB tdBackground" align="center"> <span>' . $strEmpresa . ' <span> </td> <td class="colC tdBackground" align="center"> <span>' . $strApellido . ' ' . $strNombre . ' </span> </td> <td class="colD tdBackground" align="center"> <span>' . $strEmail . '</span> </td> <td class="colE tdBackground" align="center"> <span> ' . $dblCredito . ' </span> </td> <td class="colF "> <div class="botones"> <div class="item editar"> <a href="e_usuario.php?id=' . $idUsuario . '&activo=2&sub=e"> <img class="imagen" src="../layout/editar.png" alt=""> </a> </div> <div class="item borrar"> <a href="d_usuario.php?id=' . $idUsuario . '&activo=2&sub=e"> <img class="imagen" src="../layout/borrar.png" alt=""> </a> </div> </div> </td> </tr> </tbody> </table> '; // <div class="item"> // <div class="divideritemuno" > // <img id="preview5" src="../../images-clientes/'.$logo.'" alt="" width="100"/> // </div> // <div class="divideritemdos" > // <h5>'.$strEmpresa.' </h5><br> // <span>'.$strEmail.'</span><br> // <span>'.$strApellido.' '.$strNombre.' </span><br> // <span> '.$direccion.' - '.$telefono.' </span><br> // </div> // <div class="divideritemtres" > // <span>Credito disponible: <br /><span class="bold big">$ '.$dblCredito.' </span></span> // </div> // <p class="boton"> // <a href="e_usuario.php?id='.$idUsuario.'&activo=2&sub=e">Ver</a> // <a href="d_usuario.php?id='.$idUsuario.'&activo=2&sub=e">Borrar</a> // </p> // </div> } else { $usuarioitem .= ' <table> <tbody> <tr class=" tablaClientes"> <td class="colA" align="center"> <img id="preview5" src="../../images_productos/default.png" alt="" width="100" /> </td> <td class="colB tdBackground" align="center"> <span>' . $strEmpresa . ' <span> </td> <td class="colC tdBackground" align="center"> <span>' . $strApellido . ' ' . $strNombre . ' </span> </td> <td class="colD tdBackground" align="center"> <span>' . $strEmail . '</span> </td> <td class="colE tdBackground" align="center"> <span> ' . $dblCredito . ' </span> </td> <td class="colF "> <div class="botones"> <div class="item editar"> <a href="e_usuario.php?id=' . $idUsuario . '&activo=2&sub=e"> <img class="imagen" src="../layout/editar.png" alt=""> </a> </div> <div class="item borrar"> <a href="d_usuario.php?id=' . $idUsuario . '&activo=2&sub=e"> <img class="imagen" src="../layout/borrar.png" alt=""> </a> </div> </div> </td> </tr> </tbody> </table> '; } echo $usuarioitem; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
require_once '../conf/config.inc.php'; require 'config/database.php'; require_once 'paginator.class.php'; if (!isset($_SESSION['gold_admin'])) { echo '<script>location.href = "' . DEFAULT_ADMIN_URL . '/login.php";</script>'; exit; } $for_paging = "Select * from leads order by id desc"; $for_paging_new = mysql_query($for_paging) or die(mysql_error()); //echo mysql_num_rows($rs_sel);die; $pages = new Paginator(); $pages->items_total = mysql_num_rows($for_paging_new); $pages->mid_range = 9; $pages->paginate(); $pages->display_pages(); $sel_query = "Select * from leads order by id desc" . $pages->limit; $rs_sel = mysql_query($sel_query) or die(mysql_error()); if ($_POST) { if ($_POST['method'] == 'delete') { $sel_del_query = mysql_query("Select * from leads where id = " . $_POST['id']); $userid = mysql_fetch_object($sel_del_query); if (mysql_num_rows($sel_del_query) > 0 && $userid->user_id != '') { //$userid = mysql_fetch_object($sel_del_query); $del_query = mysql_query("delete from users where id=" . $userid->user_id); } $del_query = "delete from leads where id=" . $_POST['id'] . ";"; $rs_del = mysql_query($del_query) or die(mysql_error()); ?> <script type="text/javascript"> window.location = 'user_info.php';
<?php $num = count($data['prods']); $paginator = new Paginator($num); $pagination = $paginator->display_pages(); $itemsPerPage = $paginator->display_items_per_page(); $sortOption = $paginator->display_sort(array("" => "Default", "name_a" => "Name (A - Z)", "name_d" => "Name (Z - A)", "price_a" => "Price (Low > High)", "price_d" => "Price (High > Low)")); ?> <div class="col-md-9 col-sm-7"> <div class="row list-view-sorting clearfix"> <div class="col-md-2 col-sm-2 list-view"> <a href="#"><i class="fa fa-th-large"></i></a> <a href="#"><i class="fa fa-th-list"></i></a> </div> <div class="col-md-10 col-sm-10"> <div class="pull-right"> <?php echo $itemsPerPage; ?> </div> <div class="pull-right"> <?php echo $sortOption; ?> </div> </div> </div> <div class="row product-list"> <?php if ($num > 0) { for ($i = 1; $i <= $num; $i++) {
/** * displayEvents - Displays the events database table in * a nicely formatted html table. */ function displayPastEvents() { global $sql; global $text; global $time; $pages = new Paginator(); $array = array('latest' => array(EB_EVENTS_L4, 'EventID'), 'name' => array(EB_EVENTS_L5, TBL_EVENTS . '.Name'), 'game' => array(EB_EVENTS_L6, TBL_GAMES . '.Name'), 'type' => array(EB_EVENTS_L7, TBL_EVENTS . '.Type'), 'start' => array(EB_EVENTS_L8, TBL_EVENTS . '.StartDateTime')); if (!isset($_GET['gameid'])) { $_GET['gameid'] = "All"; } $gameid = eb_sanitize($_GET['gameid']); if (!isset($_GET['matchtype'])) { $_GET['matchtype'] = "All"; } $matchtype = eb_sanitize($_GET['matchtype']); if (!isset($_GET['orderby'])) { $_GET['orderby'] = 'game'; } $orderby = eb_sanitize($_GET['orderby']); $sort = "ASC"; if (isset($_GET["sort"]) && !empty($_GET["sort"])) { $sort = $_GET["sort"] == "ASC" ? "DESC" : "ASC"; } $game_string = $gameid == "All" ? "" : " AND (" . TBL_EVENTS . ".Game = '{$gameid}')"; $matchtype_string = $matchtype == "All" ? "" : " AND (" . TBL_GAMES . ".MatchTypes LIKE '%{$matchtype}%')"; // Drop down list to select Games to display $q_Games = "SELECT DISTINCT " . TBL_GAMES . ".*" . " FROM " . TBL_GAMES . ", " . TBL_EVENTS . " WHERE (" . TBL_EVENTS . ".Game = " . TBL_GAMES . ".GameID)" . $matchtype_string . " ORDER BY Name"; $result_Games = $sql->db_Query($q_Games); $numGames = mysql_numrows($result_Games); // Drop down list to select Match type to display $q_mt = "SELECT " . TBL_GAMES . ".*" . " FROM " . TBL_GAMES . ", " . TBL_EVENTS . " WHERE (" . TBL_EVENTS . ".Game = " . TBL_GAMES . ".GameID)" . $game_string; $result_mt = $sql->db_Query($q_mt); $num_mt = mysql_numrows($result_mt); $gmatchtypes = ''; for ($i = 0; $i < $num_mt; $i++) { $gmatchtypes .= ',' . mysql_result($result_mt, $i, TBL_GAMES . ".MatchTypes"); } $text .= '<form id="submitform" action="' . htmlspecialchars($_SERVER['PHP_SELF']) . '" method="get">'; $text .= '<div>'; $text .= '<table class="table_left">'; $text .= '<tr>'; // Games drop down $text .= '<td>' . EB_EVENTS_L9 . '<br />'; $text .= '<select class="tbox" name="gameid" onchange="this.form.submit()">'; $text .= '<option value="All" ' . ($gameid == "All" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L10 . '</option>'; for ($i = 0; $i < $numGames; $i++) { $gName = mysql_result($result_Games, $i, TBL_GAMES . ".Name"); $gid = mysql_result($result_Games, $i, TBL_GAMES . ".GameID"); $text .= '<option value="' . $gid . '" ' . ($gameid == $gid ? 'selected="selected"' : '') . '>' . htmlspecialchars($gName) . '</option>'; } $text .= '</select>'; $text .= '</td>'; // Match Types drop down $text .= '<td>' . EB_EVENTS_L32 . '<br />'; $text .= '<select class="tbox" name="matchtype" onchange="this.form.submit()">'; $text .= '<option value="All" ' . ($matchtype == "All" ? 'selected="selected"' : '') . '>' . EB_EVENTS_L10 . '</option>'; $gmatchtypes = explode(",", $gmatchtypes); $gmatchtypes = array_unique($gmatchtypes); sort($gmatchtypes); foreach ($gmatchtypes as $gmatchtype) { if ($gmatchtype != '') { $text .= '<option value="' . $gmatchtype . '" ' . ($gmatchtype == $matchtype ? 'selected="selected"' : '') . '>' . htmlspecialchars($gmatchtype) . '</option>'; } } $text .= '</select>'; $text .= '</td>'; $text .= '</tr>'; $text .= '</table>'; $game_string = $gameid == "All" ? "" : " AND (" . TBL_EVENTS . ".Game = '{$gameid}')"; $matchtype_string = $matchtype == "All" ? "" : " AND (" . TBL_EVENTS . ".MatchType = '{$matchtype}')"; $q = "SELECT count(*) " . " FROM " . TBL_EVENTS . " WHERE (" . TBL_EVENTS . ".Status = 'finished')" . $game_string . $matchtype_string; $result = $sql->db_Query($q); $totalItems = mysql_result($result, 0); $pages->items_total = $totalItems; $pages->mid_range = eb_PAGINATION_MIDRANGE; $pages->paginate(); $orderby_array = $array["{$orderby}"]; $q = "SELECT " . TBL_EVENTS . ".*, " . TBL_GAMES . ".*" . " FROM " . TBL_EVENTS . ", " . TBL_GAMES . " WHERE (" . TBL_EVENTS . ".Status = 'finished')" . " AND (" . TBL_EVENTS . ".Game = " . TBL_GAMES . ".GameID)" . $game_string . $matchtype_string . " ORDER BY {$orderby_array['1']} {$sort}, EventID DESC" . " {$pages->limit}"; $result = $sql->db_Query($q); $numEvents = mysql_numrows($result); if (!$result || $numEvents < 0) { /* Error occurred, return given name by default */ $text .= EB_EVENTS_L11 . '</div>'; $text .= '</form><br/>'; } else { if ($numEvents == 0) { $text .= EB_EVENTS_L12 . '</div>'; $text .= '</form><br/>'; } else { // Paginate & Sorting $items = ''; foreach ($array as $opt => $opt_array) { $items .= $opt == $orderby ? '<option selected="selected" value="' . $opt . '">' . $opt_array[0] . '</option>' : '<option value="' . $opt . '">' . $opt_array[0] . '</option>'; } // Paginate $text .= '<span class="paginate" style="float:left;">' . $pages->display_pages() . '</span>'; $text .= '<span style="float:right">'; // Sort By $text .= EB_PGN_L6; $text .= '<select class="tbox" name="orderby" onchange="this.form.submit()">'; $text .= $items; $text .= '</select>'; // Up/Down arrow $text .= '<input type="hidden" id="sort" name="sort" value=""/>'; if ($sort == "ASC") { $text .= '<a href="javascript:buttonval(\'ASC\');" title="Ascending"><img src="' . e_PLUGIN . 'ebattles/images/sort_asc.gif" alt="Asc" style="vertical-align:middle; border:0"/></a>'; } else { $text .= '<a href="javascript:buttonval(\'DESC\');" title="Descending"><img src="' . e_PLUGIN . 'ebattles/images/sort_desc.gif" alt="Desc" style="vertical-align:middle; border:0"/></a>'; } $text .= ' '; // Go To Page $text .= $pages->display_jump_menu(); $text .= ' '; // Items per page $text .= $pages->display_items_per_page(); $text .= '</span>'; $text .= '</div>'; $text .= '</form><br/><br/>'; /* Display table contents */ $text .= '<table class="eb_table" style="width:95%"><tbody>'; $text .= '<tr> <th class="eb_th2">' . EB_EVENTS_L13 . '</th> <th colspan="2" class="eb_th2">' . EB_EVENTS_L14 . '</th> <th class="eb_th2">' . EB_EVENTS_L15 . '</th> <th class="eb_th2">' . EB_EVENTS_L16 . '</th> <th class="eb_th2">' . EB_EVENTS_L17 . '</th> <th class="eb_th2">' . EB_EVENTS_L18 . '</th> <th class="eb_th2">' . EB_EVENTS_L19 . '</th> <th class="eb_th2">' . EB_EVENTS_L34 . '</th> </tr>'; for ($i = 0; $i < $numEvents; $i++) { $gName = mysql_result($result, $i, TBL_GAMES . ".Name"); $gIcon = mysql_result($result, $i, TBL_GAMES . ".Icon"); $event_id = mysql_result($result, $i, TBL_EVENTS . ".EventID"); $event = new Event($event_id); if ($event->getField('StartDateTime') != 0) { $startdatetime_local = $event->getField('StartDateTime') + TIMEOFFSET; $date_start = date("d M Y", $startdatetime_local); } else { $date_start = "-"; } if ($event->getField('EndDateTime') != 0) { $enddatetime_local = $event->getField('EndDateTime') + TIMEOFFSET; $date_end = date("d M Y", $enddatetime_local); } else { $date_end = "-"; } /* Nbr players */ $q_2 = "SELECT COUNT(*) as NbrPlayers" . " FROM " . TBL_PLAYERS . " WHERE (Event = '{$event_id}')"; $result_2 = $sql->db_Query($q_2); $row = mysql_fetch_array($result_2); $nbrplayers = $row['NbrPlayers']; /* Nbr Teams */ $q_2 = "SELECT COUNT(*) as NbrTeams" . " FROM " . TBL_TEAMS . " WHERE (" . TBL_TEAMS . ".Event = '{$event_id}')"; $result_2 = $sql->db_Query($q_2); $row = mysql_fetch_array($result_2); $nbrTeams = $row['NbrTeams']; /* Nbr matches */ $q_2 = "SELECT COUNT(DISTINCT " . TBL_MATCHS . ".MatchID) as NbrMatches" . " FROM " . TBL_MATCHS . ", " . TBL_SCORES . " WHERE (Event = '{$event_id}')" . " AND (" . TBL_MATCHS . ".Status = 'active')" . " AND (" . TBL_SCORES . ".MatchID = " . TBL_MATCHS . ".MatchID)"; $result_2 = $sql->db_Query($q_2); $row = mysql_fetch_array($result_2); $nbrmatches = $row['NbrMatches']; switch ($event->getField('Type')) { case "One Player Ladder": case "One Player Tournament": $nbrTeamPlayers = $nbrplayers; break; case "Team Ladder": $nbrTeamPlayers = $nbrTeams . '/' . $nbrplayers; break; case "Clan Ladder": case "Clan Tournament": $nbrTeamPlayers = $nbrTeams; break; default: } $text .= '<tr> <td class="eb_td"><a href="' . e_PLUGIN . 'ebattles/eventinfo.php?eventid=' . $event_id . '">' . $event->getField('Name') . '</a></td> <td class="eb_td"><img ' . getGameIconResize($gIcon) . '/></td> <td class="eb_td">' . $gName . '</td> <td class="eb_td">' . ($event->getField('MatchType') != '' ? $event->getField('MatchType') . ' - ' : '') . $event->eventTypeToString() . '</td> <td class="eb_td">' . $date_start . '</td> <td class="eb_td">' . $date_end . '</td> <td class="eb_td">' . $nbrTeamPlayers . '</td> <td class="eb_td">' . $nbrmatches . '</td> <td class="eb_td">' . $event->eventStatusToString() . '</td> </tr>'; } $text .= '</tbody></table><br />'; $text .= '<div>'; $text .= ebImageLink('back_to_events', '', e_PLUGIN . 'ebattles/events.php', '', 'action_back.gif', EB_EVENTP_L3 . ' ' . EB_EVENTP_L4, 'jq-button'); $text .= '</div>'; } } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $vendedor_filtro = $_GET['vendedor']; $prod_state = $_GET['prod_state']; $vendedor_asignado = $_SESSION['logged_id']; if ($_SESSION['logged_role'] == 1) { if ($vendedor_filtro >= 1) { $sql = "SELECT * FROM usuarios WHERE vendedor='{$vendedor_filtro}' "; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $clientes[] = $row['idUsuario']; } $clientes_d = implode(',', $clientes); $sql = "SELECT * FROM compra WHERE idUsuario IN ({$clientes_d}); "; } else { $sql = "SELECT * FROM usuarios "; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $clientes[] = $row['idUsuario']; } $clientes_d = implode(',', $clientes); $sql = "SELECT * FROM compra WHERE idUsuario IN ({$clientes_d}); "; } } elseif ($_SESSION['logged_role'] == 2) { $sql = "SELECT * FROM usuarios WHERE vendedor='{$vendedor_asignado}' "; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $clientes[] = $row['idUsuario']; } $clientes_d = implode(',', $clientes); $sql = "SELECT * FROM compra WHERE idUsuario IN ({$clientes_d}); "; } elseif ($_SESSION['logged_role'] == 3) { $sql = "SELECT * FROM usuarios WHERE vendedor='{$vendedor_asignado}' "; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $clientes[] = $row['idUsuario']; } $clientes_d = implode(',', $clientes); $sql = "SELECT * FROM compra WHERE idUsuario IN ({$clientes_d}); "; } $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay compra en el sistema!</p> </div>'; } else { $count = 0; include_once '../usuarios/classes/class.usuarios.php'; while ($row = mysql_fetch_array($result)) { $idCompra = $row['idCompra']; $idUsuario = $row['idUsuario']; $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); if ($_SESSION['logged_role'] == 1) { if ($vendedor_filtro >= 1) { $sql = "SELECT * FROM compra AS com INNER JOIN usuarios AS usu ON com.idUsuario=usu.idUsuario WHERE vendedor='{$vendedor_filtro}' ORDER BY {$orden} {$pages->limit};"; } elseif ($prod_state) { $sql = "SELECT * FROM compra AS com INNER JOIN detalles_compras AS det ON com.idCompra=det.id_compra WHERE det.estado_producto = '{$prod_state}' GROUP BY det.id_compra ORDER BY {$orden} {$pages->limit};"; } else { $sql = "SELECT * FROM compra ORDER BY {$orden} {$pages->limit};"; } } elseif ($_SESSION['logged_role'] == 2) { if ($vendedor_filtro >= 1) { $sql = "SELECT * FROM compra AS com INNER JOIN usuarios AS usu ON com.idUsuario=usu.idUsuario WHERE vendedor='{$vendedor_filtro}' ORDER BY {$orden} {$pages->limit};"; } elseif ($prod_state) { $sql = "SELECT * FROM compra AS com INNER JOIN detalles_compras AS det ON com.idCompra=det.id_compra WHERE det.estado_producto = '{$prod_state}' GROUP BY det.id_compra ORDER BY {$orden} {$pages->limit};"; } else { $sql = "SELECT * FROM compra ORDER BY {$orden} {$pages->limit};"; } } elseif ($_SESSION['logged_role'] == 3) { $sql = "SELECT * FROM usuarios WHERE vendedor='{$vendedor_asignado}' "; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $clientes[] = $row['idUsuario']; } $clientes_d = implode(',', $clientes); if ($prod_state) { $sql = "SELECT * FROM compra AS com INNER JOIN detalles_compras AS det ON com.idCompra=det.id_compra WHERE idUsuario IN ({$clientes_d}) AND det.estado_producto = '{$prod_state}' GROUP BY det.id_compra ORDER BY {$orden} {$pages->limit};"; } else { $sql = "SELECT * FROM compra WHERE idUsuario IN ({$clientes_d}) ORDER BY {$orden} {$pages->limit};"; } } $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $idCompra = $row['idCompra']; $idUsuario = $row['idUsuario']; $fthCompra = $row['fthCompra']; $intTipoPago = $row['intTipoPago']; $dblTotal = $row['dblTotal']; $idCredito = $row['idCredito']; $caracteristicas = $row['caracteristicas']; $monto = $row['monto']; $aprobado = $row['aprobado']; $leido = $row['leido']; $detalle = $row['detalle']; $estado = $row['estado']; include_once '../usuarios/classes/class.usuarios.php'; $usr = new usuarios(); $usr->select($idUsuario); $nombre_usr = $usr->getstrNombre(); $apellido_usr = $usr->getstrApellido(); $email_usr = $usr->getstrEmail(); $monto_usuario = $usr->getdblCredito(); $vendedor_usuario = $usr->getvendedor(); ////////////////////////////////////////////OPCIONES ESTADO PEDIDO $opciones .= ' <option value="1" '; if ($estado == 1) { $opciones .= "selected=\"selected\" "; } $opciones .= '>Pendiente</option>'; $opciones .= ' <option value="2" '; if ($estado == 2) { $opciones .= "selected=\"selected\" "; } $opciones .= '>Finalizado</option>'; ////////////////////////////////////////// PRODUCTOS CANJEADOS ITEM PEDIDO - TOTAL $item .= '<div class="item"> <!-- Compra: ' . $idCompra . ' pertenece a vendedor : ' . $vendedor_usuario . '--> <div class="olive-bar_new2"><span class="tit_pedido"><span class="bold">Usuario: ' . utf8_decode($nombre_usr) . ' ' . utf8_decode($apellido_usr) . '</span> / ' . $email_usr . '</span> <span class="fecha_tit_admin">' . $fthCompra . '</span></div> <form name="listado_productos" id="estform" action="update_proceso.php" method="post"> '; //ARRANCA EL FORM-------------------------------> ////////////////////////////////////////// SELECT ESTADO PEDIDO if ($_SESSION['logged_role'] == 1) { $item .= ' <div class="estadopedido_box"> <input type="hidden" name="id_compra" value="' . $idCompra . '" /> <select name="estado_compra" id="estado1"> ' . $opciones . ' </select> <button type="sybmit" class="button mainbtn">GUARDAR</button> </div> '; } else { $item .= ' <div class="estadopedido_box"> <input type="hidden" name="id_compra" value="' . $idCompra . '" /> <select name="estado_compra" id="estado1"> ' . $opciones . ' </select> </div> </div> '; } /////////////////////////////////////////////////// TABLA PRODUCTOS CANJEADOS ///ADMIN ///TOTALES/// $item .= ' ' . $this->bring_detalle_compra($idCompra) . ' <p> <!-- <a href="d_compra.php?id=' . $idCompra . '">Borrar</a> --> </p> <div class="total_prod_comprado"> <div> <p> <!-- TOTAL DE PUNTOS COMENTADO <span class="precio_producto_compra green_style">$' . $dblTotal . '</span> <span class="valor_total">VALOR TOTAL</span> </p> --> </div> <div class="box_1_4" > <div class="fth-c"><!--' . $fthCompra . '--></div> </div> </div> </div>'; if ($_SESSION['logged_role'] == 1) { echo $item; } elseif ($_SESSION['logged_role'] == 2) { echo $item; } else { //chequear si el cliente pertenece a ese vendedor if ($_SESSION['logged_id'] == $vendedor_usuario) { echo $item; } } $item = ""; $opciones = ""; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional – displays the page jump menu //echo $pages->display_items_per_page(); //Optional – displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } //////////////////PODUCTOS DEL PEDIDO - NOMBRE - DETALLE - CANTIDAD - PRECIO }
public function manageBlog() { $content = ' <section id="content"> <div class="content-wrap"> <div class="container clearfix"> <div class="fancy-title title-border topmargin"> <h4>Admin Dashboard</h4> </div> <div class="table-toolbar"> <div class="btn-group"> <a href="?go=addBlog"> <button id="sample_editable_1_new" class="button button-3d button-rounded button-green"> Add New Blog Post <i class="icon-plus"></i> </button></a> </div> </div> <table class="table table-striped table-bordered table-hover" id="sample_1"> <thead> <tr> <th>ID</th> <th >Photo</th> <th >Title</th> <th >Views</th> <th >Quote</th> <th >Category</th> <th >Actions</th> </tr> </thead> <tbody>'; $sub_sql = "SELECT COUNT(*) AS count FROM article WHERE trashed =0"; $result_pag_num = Database::performQuery($sub_sql); $row = $result_pag_num->fetch_assoc(); $num_rows = $row['count']; $pages = new Paginator($num_rows, 9, array(3, 5, 10, 12, 15, 20, 25, 30, 50, 100, 250, 'All')); //$content .= $pages->display_pages(); $sql = "SELECT id,title,views,quote,media,articleCat_id,published FROM article WHERE trashed=0 ORDER BY id DESC LIMIT " . $pages->limit_start . "," . $pages->limit_end; $result = Database::performQuery($sql); while ($data = $result->fetch_assoc()) { $catid = $data['articleCat_id']; $sqlcat = "SELECT name FROM articlecat WHERE id LIKE '{$catid}'"; $resultcat = Database::performQuery($sqlcat); $datacat = $resultcat->fetch_assoc(); $cat = $datacat['name']; //published status set $pub = $data['published']; if ($pub) { $actions = '<a href="./?go=editBlog&id=' . $data['id'] . '"><span class="badge badge-warning"><i class="icon-pencil"></i> Edit</span></a> <a href="./?go=unpublish&id=' . $data['id'] . '"><span class="badge badge-primary"><i class="icon-thumbs-down"></i> Unpublish</span></a> <a href="./?go=trash&id=' . $data['id'] . '"><span class="badge badge-danger"><i class="icon-trash"></i> </span></a>'; } else { $actions = '<a href="./?go=editBlog&id=' . $data['id'] . '"><span class="badge badge-warning"><i class="icon-pencil"></i> Edit</span></a> <a href="./?go=publish&id=' . $data['id'] . '"><span class="badge badge-success"><i class="icon-thumbs-up"></i> Publish</span></a> <a href="./?go=trash&id=' . $data['id'] . '"><span class="badge badge-danger"><i class="icon-trash"></i></span></a>'; } //Set actions $content .= '<tr class="odd gradeX"> <td>' . $data['id'] . '</td> <td ><img src="' . BASE_URL . '/img/' . $data['media'] . '" width="100"/></a></td> <td >' . $data['title'] . '</td> <td class="center">' . $data['views'] . '</td> <td class="center">' . $data['quote'] . '</td> <td >' . $cat . '</td> <td >' . $actions . '</td> </tr>'; } $content .= '<tr><td colspan="5">' . $pages->display_pages() . '</td><td colspan="1">' . $pages->display_jump_menu() . '</td><td colspan="1">' . $pages->display_items_per_page() . '</td></tr>'; $content .= ' </tbody> </table> </div></div></section> '; return $content; }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM historiales ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay historiales en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); $sql = "SELECT * FROM historiales ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $id_usuario = $row['id_usuario']; $fecha = $row['fecha']; $realizado_por = $row['realizado_por']; $tipo_modificacion = $row['tipo_modificacion']; $monto_modificado = $row['monto_modificado']; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional – displays the page jump menu //echo $pages->display_items_per_page(); //Optional – displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM productos ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay producto en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); include_once "../categorias/classes/class.categorias.php"; $sql = "SELECT * FROM productos ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $idProducto = $row['idProducto']; $strNombre = $row['strNombre']; $strDetalle = $row['strDetalle']; $intCategoria = $row['intCategoria']; $dblPrecio = $row['dblPrecio']; $intStock = $row['intStock']; $strImagen = $row['strImagen']; $strImagen2 = $row['strImagen2']; $strImagen3 = $row['strImagen3']; $destacado = $row['destacado']; //veo si requiere talles $categorias = new categorias(); $categorias->select($intCategoria); $talles = $categorias->gettalles(); $stock = '<p>STOCK: ' . $intStock . '</p>'; if ($talles == 1) { include_once "../talles/classes/class.talles.php"; $tll = new talles(); $talles_disp = $tll->select_all_clean(); foreach ($talles_disp as $id_talle_m) { $talle_n = new talles(); $talle_n->select($id_talle_m); $nombre_talle = $talle_n->getnombre_talle(); $id_talle_tabla = $talle_n->getid_talle(); include_once "classes/class.talles_productos.php"; $tallprod = new talles_productos(); $tallprod->select_by_producto($idProducto, $id_talle_m); $id_talle_producto = $tallprod->getid(); #echo $id_talle = $tallprod->getid_talle(); $id_producto = $tallprod->getid_producto(); $cantidad = $tallprod->getcantidad(); if ($cantidad == "" || $cantidad == 0) { $cantidad = 0; } else { $talles_item .= ' <div class="t-bg"> <p>' . $nombre_talle . ': ' . $cantidad . '</p> </div>'; $id_talle_m = ""; $stock = ''; } } } else { if ($talles == 2) { include_once "../colores/classes/class.colores.php"; $tll = new colores(); $colores_disp = $tll->select_all_clean(); foreach ($colores_disp as $id_color_m) { $color_n = new colores(); $color_n->select($id_color_m); $nombre_color = $color_n->getnombre_color(); $id_color_tabla = $color_n->getid_color(); include_once "class.colores_productos.php"; $colprod = new colores_productos(); $colprod->select_by_producto($idProducto, $id_color_m); $id_color_producto = $colprod->getid(); #echo $id_talle = $tallprod->getid_talle(); $id_producto = $colprod->getid_producto(); $cantidad = $colprod->getcantidad(); if ($cantidad == "") { $cantidad = 0; } else { $talles_item .= ' <div class="box-talle-c"> <div class="t-bg"><p>' . $nombre_color . ':' . $cantidad . '</p></div></div> '; $id_color_m = ""; $stock = ''; } } } else { $talles_item .= ""; } } $item = ""; if ($strImagen) { //////////////////////////////////////////////////////////SI ES DESTACADO LE CAMBIO EL COLOR DEL CIRCULO if ($destacado == 1 or $destacado == 2 or $destacado == 3) { //CON IMAGEN DESTACADO $item .= ' <div class="item-content-prod"> <div class="box-image-prod-item"> <img src="../../images_productos/' . $strImagen . '" alt="" /> </div> <div class="box-prod-item-2"> <div class="box-prod-item-1"> <span> $' . $dblPrecio . ' </span> </div> <div class="nom-desc"> <p style="color: #646363;text-transform: uppercase;font-weight: bold;">' . $strNombre . '</p> <p style="color:#7A7474">' . substr($strDetalle, 0, 25) . '...</p> </div> <div class="stock-detalle">' . $stock . '</div> <div class="box-detalle2"> ' . $talles_item . ' </div> <div class="box-btn-prod-edit"> <p> <a class="btn-prod-edit" href="e_producto.php?id=' . $idProducto . '&activo=2&sub=d"><span>ADMINISTRAR</span></a> <a class="btn-prod-edit" href="d_producto.php?id=' . $idProducto . '&activo=2&sub=d"><span>ELIMINAR</span></a> </p> </div> </div> </div> '; } else { //CON IMAGEN SIN DESTACADO $item .= ' <div class="item-content-prod"> <div class="box-image-prod-item"> <img src="../../images_productos/' . $strImagen . '" alt="" /> </div> <div class="box-prod-item-2"> <div class="box-prod-item-1 "> <span> $' . $dblPrecio . ' </span> </div> <div class="nom-desc"> <p style="color: #646363;text-transform: uppercase;font-weight: bold;">' . $strNombre . '</p> <p style="color:#7A7474">' . substr($strDetalle, 0, 25) . '...</p> </div> <div class="stock-detalle">' . $stock . '</div> <div class="box-detalle2"> ' . $talles_item . ' </div> <div class="box-btn-prod-edit"> <p> <a class="btn-prod-edit" href="e_producto.php?id=' . $idProducto . '&activo=2&sub=d"><span>ADMINISTRAR</span></a> <a class="btn-prod-edit" href="d_producto.php?id=' . $idProducto . '&activo=2&sub=d"><span>ELIMINAR</span></a> </p> </div> </div> </div> '; } } else { //SIN IMAGEN $item .= ' <div class="item-content-prod"> <div class="box-image-prod-item"> <img src="../../images_productos/default.png" alt="" /> </div> <div class="box-prod-item-2"> <div class="box-prod-item-1 "> <span> $' . $dblPrecio . ' </span> </div> <div class="nom-desc"> <p style="color: #646363;text-transform: uppercase;font-weight: bold;">' . $strNombre . '</p> <p style="color:#7A7474">' . substr($strDetalle, 0, 25) . '...</p> </div> <div class="stock-detalle">' . $stock . '</div> <div class="box-detalle2"> ' . $talles_item . ' </div> <div class="box-btn-prod-edit"> <p> <a class="btn-prod-edit" href="e_producto.php?id=' . $idProducto . '&activo=2&sub=d"><span>ADMINISTRAR</span></a> <a class="btn-prod-edit" href="d_producto.php?id=' . $idProducto . '&activo=2&sub=d"><span>ELIMINAR</span></a> </p> </div> </div> </div> '; } echo $item; //'<p></p>'; $talles_item = ""; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional � displays the page jump menu //echo $pages->display_items_per_page(); //Optional � displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }
case 'departement': if (!ls_get_access("leads_all", $lsuser->getVar("permissions"), LS_SUPERADMINACCESS)) { $sqlw = ' AND operatorid = "' . LS_USERID_RHINO . '"'; } $total = $lsdb->query('SELECT COUNT(*) as totalAll FROM ' . $lstable . ' WHERE department = ' . $page2 . $sqlw); $rowt = $total->fetch_assoc(); if ($rowt['totalAll'] != 0) { // Paginator $leads = new Paginator(); $leads->items_total = $rowt['totalAll']; $leads->mid_range = 10; $leads->items_per_page = 20; $leads->jak_get_page = $page4; $leads->jak_where = 'index.php?p=leads&sp=sort&ssp=' . $page2 . '&sssp=' . $page3; $leads->paginate(); $JAK_PAGINATE = $leads->display_pages(); } $result = $lsdb->query('SELECT t1.id, t1.name, t1.email, t1.department, t1.operatorid, t1.initiated, t1.ip, t1.notes, t1.countrycode, t1.country, t1.city, t2.username, t3.title FROM ' . $lstable . ' AS t1 LEFT JOIN ' . DB_PREFIX . 'user AS t2 ON (t1.operatorid = t2.id) LEFT JOIN ' . DB_PREFIX . 'departments AS t3 ON (t1.department = t3.id) WHERE department = ' . $page2 . $sqlw . ' ' . $leads->limit); while ($row = $result->fetch_assoc()) { $allLeads[] = $row; } // Ouput all leads, well with paginate of course $LEADS_ALL = $allLeads; // Call the template $template = 'leads.php'; break; case 'sort': // Leads $sqlw = ''; $rowts['total_support'] = 0; $rowtc['totalAll'] = 0;
/** * displayClans - Displays the Clans database table in * a nicely formatted html table. */ function displayClans() { global $pref; global $sql; global $text; $pages = new Paginator(); if (check_class($pref['eb_teams_create_class'])) { $text .= '<form action="' . e_PLUGIN . 'ebattles/clancreate.php" method="post">'; $text .= '<div>'; $text .= '<input type="hidden" name="userid" value="' . USERID . '"/>'; $text .= '<input type="hidden" name="username" value="' . USERNAME . '"/>'; $text .= '</div>'; $text .= ebImageTextButton('createteam', 'add.png', EB_CLANS_L7); $text .= '</form><br />'; } else { //$text .= '<div>'..'</div>'; } /* set pagination variables */ $q = "SELECT count(*) " . " FROM " . TBL_CLANS; $result = $sql->db_Query($q); $totalItems = mysql_result($result, 0); $pages->items_total = $totalItems; $pages->mid_range = eb_PAGINATION_MIDRANGE; $pages->paginate(); $q = "SELECT " . TBL_CLANS . ".*" . " FROM " . TBL_CLANS . " ORDER BY Name" . " {$pages->limit}"; $result = $sql->db_Query($q); /* Error occurred, return given name by default */ $num_rows = mysql_numrows($result); if (!$result || $num_rows < 0) { $text .= EB_CLANS_L3; return; } if ($num_rows == 0) { $text .= '<div>' . EB_CLANS_L4 . '</div>'; } else { // Paginate $text .= '<span class="paginate" style="float:left;">' . $pages->display_pages() . '</span>'; $text .= '<span style="float:right">'; // Go To Page $text .= $pages->display_jump_menu(); $text .= ' '; // Items per page $text .= $pages->display_items_per_page(); $text .= '</span><br /><br />'; /* Display table contents */ $text .= '<table class="eb_table" style="width:95%"><tbody>'; $text .= '<tr> <th class="eb_th2">' . EB_CLANS_L5 . '</th> <th class="eb_th2">' . EB_CLANS_L6 . '</th> </tr>'; for ($i = 0; $i < $num_rows; $i++) { $clan_id = mysql_result($result, $i, TBL_CLANS . ".ClanID"); $clan = new Clan($clan_id); $image = ""; if ($pref['eb_avatar_enable_teamslist'] == 1) { if ($clan->getField('Image')) { $image = '<img ' . getAvatarResize(getImagePath($clan->getField('Image'), 'team_avatars')) . '/>'; } else { if ($pref['eb_avatar_default_team_image'] != '') { $image = '<img ' . getAvatarResize(getImagePath($pref['eb_avatar_default_team_image'], 'team_avatars')) . '/>'; } } } $text .= '<tr> <td class="eb_td">' . $image . ' <a href="' . e_PLUGIN . 'ebattles/claninfo.php?clanid=' . $clan_id . '">' . $clan->getField('Name') . '</a></td> <td class="eb_td">' . $clan->getField('Tag') . '</td></tr>'; } $text .= '</tbody></table><br />'; } }
?> <div align="center"> <? $pages = new Paginator; $pages->items_total = mysql_num_rows($result); $pages->mid_range = 7; $pages->paginate(); $query = "SELECT * FROM mailinglist_messages ORDER BY created DESC $pages->limit"; $result = mysql_query($query) or die("Query failed : " . mysql_error()); if(mysql_num_rows($result) > 0) { echo "<h3>Click to show/hide a message. <a href=\"javascript:void(0);\" onclick=\"do_divs(1)\">Show All</a>/<a href=\"javascript:void(0);\" onclick=\"do_divs(0)\">Hide All</a></h3>\n"; echo "<span class=\"paginate\">Page </span><span style=\"padding:8px;border:1px dotted #999;\">"; echo $pages->display_pages(); echo $pages->display_jump_menu(); echo $pages->display_items_per_page(); echo "</span>"; } $counter = 0; while ($row = mysql_fetch_assoc($result)) { // query queue table and count addresses for this message id // divide total messgaes sent (first query) by the count and round down $queue_query = "SELECT COUNT(*) FROM mailinglist_queue WHERE message_id = '$row[id]'"; $queue_result = mysql_query($queue_query) or die("Query failed : " . mysql_error()); $queue_count = mysql_fetch_row($queue_result); $percent = @floor((($row[count]-$queue_count[0])/$row[count])*100);
public function manageEvent() { $content = ' <section id="content"> <div class="content-wrap"> <div class="container clearfix"> <div class="fancy-title title-border topmargin"> <h4>Manage Events</h4> </div> <div class="table-toolbar"> <div class="btn-group"> <a href="?go=addEvent"> <button id="sample_editable_1_new" class="button button-3d button-rounded button-green"> Add New Event <i class="icon-plus"></i> </button></a> </div> </div> <table class="table table-striped table-bordered table-hover" id="sample_1"> <thead> <tr> <th>ID</th> <th >Photo</th> <th >Title</th> <th >Target</th> <th >Day&Time</th> <th >Venue</th> <th >Cost</th> <th >Actions</th> </tr> </thead> <tbody>'; $sub_sql = "SELECT COUNT(*) AS count FROM events WHERE trashed =0"; $result_pag_num = Database::performQuery($sub_sql); $row = $result_pag_num->fetch_assoc(); $num_rows = $row['count']; $pages = new Paginator($num_rows, 9, array(3, 5, 10, 12, 15, 20, 25, 30, 50, 100, 250, 'All')); //$content .= $pages->display_pages(); $sql = "SELECT * FROM events WHERE trashed=0 ORDER BY id DESC LIMIT " . $pages->limit_start . "," . $pages->limit_end; $result = Database::performQuery($sql); while ($data = $result->fetch_assoc()) { //published status set $pub = $data['published']; if ($pub) { $actions = '<a href="./?go=editEvent&id=' . $data['id'] . '"><span class="badge badge-warning"><i class="icon-pencil"></i> Edit</span></a> <a href="./?go=unpublishEvent&id=' . $data['id'] . '"><span class="badge badge-primary"><i class="icon-thumbs-down"></i> Unpublish</span></a> <a href="./?go=trashEvent&id=' . $data['id'] . '"><span class="badge badge-danger"><i class="icon-trash"></i> </span></a>'; } else { $actions = '<a href="./?go=editEvent&id=' . $data['id'] . '"><span class="badge badge-warning"><i class="icon-pencil"></i> Edit</span></a> <a href="./?go=publishEvent&id=' . $data['id'] . '"><span class="badge badge-success"><i class="icon-thumbs-up"></i> Publish</span></a> <a href="./?go=trashEvent&id=' . $data['id'] . '"><span class="badge badge-danger"><i class="icon-trash"></i></span></a>'; } //Set actions $content .= '<tr class="odd gradeX"> <td>' . $data['id'] . '</td> <td ><img src="' . BASE_URL . '/img/' . $data['photo'] . '" width="100"/></a></td> <td >' . $data['title'] . '</td> <td class="center">' . $data['target'] . '</td> <td class="center">' . $data['daytime'] . '</td> <td class="center">' . $data['venue'] . '</td> <td class="center">' . $data['cost'] . '</td> <td >' . $actions . '</td> </tr>'; } $content .= '<tr><td colspan="6">' . $pages->display_pages() . '</td><td colspan="1">' . $pages->display_jump_menu() . '</td><td colspan="1">' . $pages->display_items_per_page() . '</td></tr>'; $content .= ' </tbody> </table> </div></div></section> '; return $content; }
<a href="posts_edit.php?id=' . $row['ID'] . '"><img src="images/icons/view.png" title="Mira tus predicciones" /></a> </td> </tr>'; } ?> </tbody> </table> <?php if ($count >= $itemspp) { echo '<div class="row"> <div class="col-xs-7 col-xs-offset-5"> <div class="dataTables_paginate paging_bootstrap"> <ul class="pagination"> ' . $pages->display_pages() . ' </ul> </div> </div> </div>'; } ?> </div> </div> <!-- END SAMPLE TABLE PORTLET--> </div> </div> <!-- end content --> </div>
function select_all($pagina, $orden) { include '../resources/paginator.class.php'; $sql = "SELECT * FROM usuarios ;"; $result = $this->database->query($sql); $result = $this->database->result; $quantity = mysql_num_rows($result); if ($quantity < 1) { echo '<div class="notify"> <p>No hay usuario en el sistema!</p> </div>'; } else { $count = 0; while ($row = mysql_fetch_array($result)) { $count++; } $pages = new Paginator(); $pages->items_total = $count; $pages->mid_range = 10; $pages->paginate(); $pages->display_pages(); include_once '../historiales/classes/class.historiales.php'; $sql = "SELECT * FROM usuarios ORDER BY {$orden} {$pages->limit};"; $result = $this->database->query($sql); $result = $this->database->result; while ($row = mysql_fetch_array($result)) { $idUsuario = $row['idUsuario']; $strNombre = $row['strNombre']; $strApellido = $row['strApellido']; $strEmail = $row['strEmail']; $strEmpresa = $row['strEmpresa']; $strCargo = $row['strCargo']; $strPassword = $row['strPassword']; $dblCredito = $row['dblCredito']; $direccion = $row['direccion']; $telefono = $row['telefono']; $nombre_contacto1 = $row['nombre_contacto1']; $apellido_contacto1 = $row['apellido_contacto1']; $email_contacto1 = $row['email_contacto1']; $nombre_contacto2 = $row['nombre_contacto2']; $apellido_contacto2 = $row['apellido_contacto2']; $email_contacto2 = $row['email_contacto2']; $logo = $row['logo']; $vigencia_credito = $row['vigencia_credito']; $vendedor = $row['vendedor']; $usuarioitem = ""; //si tiene imagen if (strlen($logo) > 2) { $usuarioitem .= ' <div class="item"> <div class="divideritemuno" > <img src="' . BASEURLRAIZ . '/images_usuarios/' . $logo . '" alt="" width="120"/> </div> <div class="divideritemdos" > <h5>' . $strEmpresa . ' </h5> <p>' . $strApellido . ' ' . $strNombre . ' </p> <p>' . $strEmail . '</p> <p> ' . $direccion . ' - ' . $telefono . ' </p> </div> <div class="divideritemtres" > <p>Credito disponible: <br />$ ' . $dblCredito . ' </p> </div> <div class="itemfull"> <a href="e_usuario.php?id=' . $idUsuario . '">Editar</a> <a href="d_usuario.php?id=' . $idUsuario . '">Borrar</a> </div> </div> '; } else { $usuarioitem .= ' <div class="item"> <div class="divideritemuno" > <div class="no_img"></div> </div> <div class="divideritemdos"> <h5>' . $strEmpresa . ' </h5> <p>' . $strApellido . ' ' . $strNombre . ' </p> <p>' . $strEmail . '</p> <p> ' . $direccion . ' - ' . $telefono . ' </p> </div> <div class="divideritemtres" >'; $hist = new historiales(); $usuarioitem .= $hist->show_by_usuario($idUsuario); $usuarioitem .= '<p>Credito disponible: <br />$ ' . $dblCredito . ' </p> </div> <div class="itemfull"> <a href="e_usuario.php?id=' . $idUsuario . '">Editar</a> <a href="d_usuario.php?id=' . $idUsuario . '">Borrar</a> </div> </div> '; } echo $usuarioitem; } echo '<div class="navigate">'; echo $pages->display_pages(); // Optional call which will display the page numbers after the results. //$pages->display_jump_menu(); // Optional Ð displays the page jump menu //echo $pages->display_items_per_page(); //Optional Ð displays the items per //echo $pages->current_page . ' of ' .$pages->num_pages.''; echo '</div>'; } }