当前位置: 首页>>代码示例>>PHP>>正文


PHP Paginator::display_pages方法代码示例

本文整理汇总了PHP中Paginator::display_pages方法的典型用法代码示例。如果您正苦于以下问题:PHP Paginator::display_pages方法的具体用法?PHP Paginator::display_pages怎么用?PHP Paginator::display_pages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Paginator的用法示例。


在下文中一共展示了Paginator::display_pages方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: while

    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>';
        }
    }
开发者ID:EzequielDot175,项目名称:mknet,代码行数:57,代码来源:class.compras2.php

示例2: while

    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>';
        }
    }
开发者ID:EzequielDot175,项目名称:mknet,代码行数:51,代码来源:class.categorias.php

示例3: while

    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>';
        }
    }
开发者ID:EzequielDot175,项目名称:mknet,代码行数:51,代码来源:class.colores.php

示例4: while

    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>';
        }
    }
开发者ID:EzequielDot175,项目名称:mknet,代码行数:49,代码来源:class.creditos.php

示例5: while

    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>';
        }
    }
开发者ID:EzequielDot175,项目名称:mknet,代码行数:93,代码来源:class.novedades.php

示例6: manage

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>';
//.........这里部分代码省略.........
开发者ID:AdoSalkic,项目名称:personal,代码行数:101,代码来源:functions.php

示例7: get_html

 /**
  * 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 = '&nbsp;&nbsp;';
                     // sorting?
                     if ($this->sort_by == $fname) {
                         if ($this->sort_ord == 'asc') {
                             $current_order = ' &uarr;';
                             $other_order = 'desc';
                         } else {
                             $current_order = ' &darr;';
                             $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;
 }
开发者ID:RA2WP,项目名称:RA2WP,代码行数:74,代码来源:tina_mvc_pagination_helper_class.php

示例8: WHERE

 } 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 .= '&nbsp;&nbsp;&nbsp;';
             // 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);
开发者ID:testt98,项目名称:ebattles,代码行数:31,代码来源:eventmanage.php

示例9: while

    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: ' . $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>';
        }
    }
开发者ID:EzequielDot175,项目名称:mknet,代码行数:98,代码来源:class.personal.php

示例10: while

    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>
//.........这里部分代码省略.........
开发者ID:EzequielDot175,项目名称:mknet,代码行数:101,代码来源:class.productos-.php

示例11: Paginator

     }
     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'] . '&amp;';
         }
     }
     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;
 }
开发者ID:deanbrabec,项目名称:news_slider,代码行数:31,代码来源:mn-show.php

示例12: displayGames

/**
* 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 .= '&nbsp;&nbsp;&nbsp;';
        // 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 . '&amp;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>';
    }
}
开发者ID:testt98,项目名称:ebattles,代码行数:99,代码来源:admin_config.php

示例13: while

    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 . '
&nbsp;&nbsp&nbsp;&nbsp;
<span class="bold">EMAIL </span>' . $email_usr . '</span>
&nbsp;&nbsp&nbsp;&nbsp;
<span class="bold">FECHA </span>' . $fecha_estimada . '</span>
&nbsp;&nbsp&nbsp;&nbsp;
</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();
//.........这里部分代码省略.........
开发者ID:EzequielDot175,项目名称:mknet,代码行数:101,代码来源:class.propuestas.php

示例14: while

    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>';
        }
    }
开发者ID:EzequielDot175,项目名称:mknet,代码行数:88,代码来源:class.propuestas+-+copia.php

示例15: while

    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>';
        }
    }
开发者ID:EzequielDot175,项目名称:mknet,代码行数:91,代码来源:class.consultas.php


注:本文中的Paginator::display_pages方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。