當前位置: 首頁>>代碼示例>>PHP>>正文


PHP pageft函數代碼示例

本文整理匯總了PHP中pageft函數的典型用法代碼示例。如果您正苦於以下問題:PHP pageft函數的具體用法?PHP pageft怎麽用?PHP pageft使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了pageft函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: is_file

    $img_url = is_file($img_url) ? $img_url : $img_def_url;
    $post_date = substr($post->post_date, 0, 10);
    echo "<h3>[<a href='/fenlei' target='_blank'>分類</a>]<a href='/post/{$post->id}.html' target='_blank'>" . $post->post_title . "</a></h3>";
    echo "<figure><img src='" . $img_url . "'></figure>";
    echo "<ul><p>" . mb_substr(strip_tags($post->post_content), 0, 300, 'gb2312') . "</p></ul>";
    echo '<div class="dateview"><a title="' . $post->post_title . '" href="/post/' . $post->id . '.html" target="_blank" class="readmore">閱讀全文>></a><span>' . $post_date . '</span><span>閱讀(10)</span><span>評論(2)</span> <a href="javascript:(0)" class="post-like" data-pid="533" data-event="like"><i class="glyphicon glyphicon-thumbs-up"></i>讚(0)</a></span></div>';
}
//print_r($posts->lastPage());
//$cur_page = $_GET['page'];
$total = $posts->total();
//總文章數
$count_page = $posts->count();
//總頁數
$url = $_SERVER['HTTP_HOST'];
//getPageHtml($cur_page,$count_page);
echo '<div class="quotes">' . pageft($total, 5) . '</div>';
//echo '<div class="badoo">'.$posts->render().'</div>';
//echo $posts->render();
?>
@stop

@section('rank')
	<li><a href="/" title="Column 三欄布局 個人網站模板" target="_blank">Column 三欄布局 個人網站模板</a></li>
	<li><a href="/" title="with love for you 個人網站模板" target="_blank">with love for you 個人網站模板</a></li>
	<li><a href="/" title="免費收錄網站搜索引擎登錄口大全" target="_blank">免費收錄網站搜索引擎登錄口大全</a></li>
	<li><a href="/" title="做網站到底需要什麽?" target="_blank">做網站到底需要什麽?</a></li>
	<li><a href="/" title="企業做網站具體流程步驟" target="_blank">企業做網站具體流程步驟</a></li>
	<li><a href="/" title="建站流程篇——教你如何快速學會做網站" target="_blank">建站流程篇——教你如何快速學會做網站</a></li>
	<li><a href="/" title="box-shadow 陰影右下腳折邊效果" target="_blank">box-shadow 陰影右下腳折邊效果</a></li>
	<li><a href="/" title="打雷時室內、戶外應該需要注意什麽" target="_blank">打雷時室內、戶外應該需要注意什麽</a></li>
@stop
開發者ID:kubill,項目名稱:lumen,代碼行數:31,代碼來源:index.blade.php

示例2: mysqli_query

<?php 
} else {
    ?>
	  
	  
	    <ul>
<?php 
    if ($pro_class) {
        $tj = "where pro_class='{$pro_class}' order by id desc";
    } else {
        $tj = "order by id desc";
    }
    $sql = "select * from {$pro_table} {$tj} ";
    $res = mysqli_query($conn, $sql);
    $total = mysqli_num_rows($res);
    pageft($total, 16);
    $sql = "select * from {$pro_table} {$tj} limit {$firstcount},{$displaypg}";
    //echo $sql;
    $res = mysqli_query($conn, $sql);
    while ($rows = mysqli_fetch_assoc($res)) {
        $img_arr = explode('/', $rows['img']);
        $img_url = "img/" . $img_arr[0];
        ?>
		
		  <li><a href="show_details.php?id=<?php 
        echo $rows['id'];
        ?>
&pro_class=<?php 
        echo $rows['pro_class'];
        ?>
" target="_blank"><img src="<?php 
開發者ID:hedm0423,項目名稱:van,代碼行數:31,代碼來源:show.php

示例3: urlencode

        if (empty($param)) {
            $param = "keyword=" . urlencode($keyword);
        }
    }
}
if (isset($_GET[classcode]) && !empty($_GET[classcode])) {
    $classcode = $_GET[classcode];
    $where = $where . "and prod_class={$classcode} ";
}
//echo "<script>alert(keyword==='" . $_POST[keyword] . "');</script>";
$pagesize = 12;
//一頁顯示多少條
//分頁
$queryTotal = $db->query("select id from prod" . $where);
$total = $db->db_num_rows();
pageft($total, $pagesize, '', $param);
if ($firstcount < 0) {
    $firstcount = 0;
}
//列表
$prodQuery = $db->query("select * from prod " . $where . " order by create_date desc limit {$firstcount}, {$displaypg} ");
$prodList = array();
while ($row = $db->fetch_array($prodQuery)) {
    $prodList[] = $row;
}
$smarty->assign("prodList", $prodList);
//顯示分頁的內容
$smarty->assign("page", $pagenav);
//當前位置
$address = "您當前位置:首 頁 &gt; <font color='#FF3300'>產品展示</font>";
$smarty->assign("address", $address);
開發者ID:soross,項目名稱:myteashop,代碼行數:31,代碼來源:prodlist.php

示例4: utf8Substr

 */
include_once './header.php';
include_once './admin/conn/conn.php';
include_once './admin/conn/page.class.php';
// 截取中文字符
function utf8Substr($str, $from, $len)
{
    return preg_replace('#^(?:[\\x00-\\x7F]|[\\xC0-\\xFF][\\x80-\\xBF]+){0,' . $from . '}' . '((?:[\\x00-\\x7F]|[\\xC0-\\xFF][\\x80-\\xBF]+){0,' . $len . '}).*#s', '$1', $str);
}
$pageSize = 5;
// 每頁顯示的記錄數
$sql0 = "select * from  tb_people order by votes desc,name asc";
$result0 = $mysqli->query($sql0);
$total = $mysqli->affected_rows;
// 查詢總記錄!
pageft($total, $pageSize, 1, 1, 1, 9, 20, 1);
$sql = "select * from  tb_people order by votes desc,name asc limit {$firstcount},{$pageSize}";
$result = $mysqli->query($sql);
$count = $mysqli->affected_rows;
?>

<div class="votes_content" style="background-color:#FFF5D0 ">
    <!--  左   -->
    <div class="votes_left">
        <?php 
while ($row1 = $result->fetch_assoc()) {
    ?>
            <span>
                <a href="./every.php?vid=<?php 
    echo base64_encode($row1['id']);
    ?>
開發者ID:honj51,項目名稱:vote,代碼行數:31,代碼來源:ranking.php

示例5: array

<?php

require_once "../action/global_action.php";
//產品分類
$queryProdClass = $db->query("select * from prod_class");
$rowPC = array();
while ($rowProdClass = $db->fetch_array($queryProdClass)) {
    $rowPC[] = $rowProdClass;
}
$smarty->assign("prodClassList", $rowPC);
$result = @mysql_query("select id from prod where state='1'");
$total = @mysql_num_rows($result);
pageft($total, 10);
if ($firstcount < 0) {
    $firstcount = 0;
}
//列表
$query = $db->query("select a.class_name,b.* from prod_class a,prod b where a.id =b.prod_class and b.state='1' order by b.create_date desc limit {$firstcount}, {$displaypg}");
$prodList = array();
while ($row = $db->fetch_array($query)) {
    $prodList[] = $row;
}
$smarty->assign("caseList", $prodList);
$smarty->assign("cpage", $page);
$smarty->assign("page", $pagenav);
$smarty->display("case/caselist.html");
開發者ID:soross,項目名稱:myteashop,代碼行數:26,代碼來源:caselist.php

示例6: pageft

<?php

require_once "action/checkAamsLogin.php";
require_once "action/smarty_inc.php";
require_once "action/mysql.class.php";
require_once "action/page.class.aams.php";
$remark = '新增';
if (isset($_GET[remark]) && "OK" == $_GET[remark]) {
    $remark = '已處理';
}
$pagesize = 15;
//一頁顯示多少條
//分頁
$queryTotal = $db->query("select id from message where type='ADVISE' and remark='{$remark}'");
$total = $db->db_num_rows($queryTotal);
pageft($total, $pagesize);
if ($firstcount < 0) {
    $firstcount = 0;
}
//新聞列表
$newsQuery = $db->query("select * from message where type='ADVISE' and  remark='{$remark}' order by create_date desc limit {$firstcount}, {$displaypg}");
$newsRow = array();
while ($rownews = $db->fetch_array($newsQuery)) {
    $newsRow[] = $rownews;
}
$smarty->assign("messageRow", $newsRow);
//顯示分頁的內容
$smarty->assign("page", $pagenav);
$smarty->display("advise.html");
開發者ID:soross,項目名稱:myteashop,代碼行數:29,代碼來源:advise.php

示例7: while

if ($dberp->nf()) {
    while ($dberp->next_record()) {
        $suppid = $dberp->f(fd_supp_id);
        $arr_suppname[$suppid] = $dberp->f(fd_supp_name);
    }
}
//ËÑË÷
if (empty($search)) {
    $querywhere = "";
} else {
    $querywhere = "where fd_supplierlogo_id like '%{$content}%'";
}
$query = "select fd_supplierlogo_id,fd_supplogo_suppid from web_conf_supplierlogo  {$querywhere}";
$db->query($query);
$total = $db->nf();
pageft($total, 10, $str_url);
if ($firstcount < 0) {
    $firstcount = 0;
}
$query = "{$query} limit {$firstcount},{$displaypg}";
$db->query($query);
if ($db->nf()) {
    while ($db->next_record()) {
        $fd_supplierlogo_id = $db->f(fd_supplierlogo_id);
        $fd_supplogo_suppid = $db->f(fd_supplogo_suppid);
        $fd_supplogo_suppname = $arr_suppname[$fd_supplogo_suppid];
        $result = uploadshow($fd_supplogo_suppid, $scatid);
        $thum = $result["thumurl"];
        $thum = $thum ? "<img src='{$g_showpic}{$thum}' />" : "";
        $e = '<a href=javascript:supploge("' . $g_uppic . '","' . $scatid . '","' . $fd_supplogo_suppid . '"); >ÐÞ¸Ä</a>';
        $a = '<a href=javascript:deleteimg("' . $g_uppic . '","' . $scatid . '","' . $fd_supplogo_suppid . '");>ɾ³ý</a>';
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:supplogo.php

示例8: mysql_query






<div id="pro_list">
        <ul style="width:95%;">
<?php 
$tj = " ";
$sql = "select * from {$table} {$tj}";
//echo $sql;
$res = mysql_query($sql);
if ($res) {
    $total = mysql_num_rows($res);
}
pageft($total, 12);
$sql = "select * from {$table} {$tj} order by id desc limit {$firstcount},{$displaypg} ";
$res = mysql_query($sql, $conn);
if (strlen($res) == 0) {
    echo "沒有此類數據";
} else {
    while ($rows = mysql_fetch_array($res)) {
        $img_arr = explode('/', $rows['img']);
        $flod = "../img/";
        $img_url = $flod . $img_arr[0];
        ?>
		
		
          <li><a href="case_add.php?id=<?php 
        echo $rows['id'];
        ?>
開發者ID:hedm0423,項目名稱:van,代碼行數:26,代碼來源:case.php

示例9: is_file

    $img_def_url = '/images/thumbnail.png';
    $img_url = $web_url . $img_url;
    //echo $img_url;
    $img_url = is_file($img_url) ? $img_url : $img_def_url;
    $content = mb_substr(strip_tags($post->post_content), 0, 80, 'UTF-8');
    $post_date = substr($post->created_at, 0, 10);
    echo "<article class='excerpt excerpt-1'>\n\t\t<a target='_blank' class='focus' href='/post/{$post->id}.html'><img src='{$img_url}' class='thumb' style='display: inline;'/></a>\n\t\t<header><a class='cat' href='/fenlei'>分類<i></i></a> <h2><a target='_blank' href='/post/{$post->id}.html' title='{$post->post_title}'>{$post->post_title}</a></h2></header>\n\t\t<p class='meta'><time><i class='fa fa-clock-o'></i>{$post_date}</time><a target='_blank' class='pc' href='/post/{$post->id}.html#comments'><i class='fa fa-comments-o'></i><span class='ds-thread-count' data-thread-key='{$post->id}' data-count-type='comments'></span></a></p>\n\t\t<p class='note'>{$content}</p>\n\t\t<a target='_blank' href ='/post/{$post->id}.html' class='cat' style='float:right'>閱讀全文</a>\n\t\t</article>";
}
$total = $posts->total();
//總文章數
$count_page = $posts->count();
//總頁數
$total_page = $posts->total();
$url = $_SERVER['HTTP_HOST'];
//getPageHtml($cur_page,$count_page);
echo '<div class="pagination"><ul>' . pageft($total, 5) . '</ul></div>';
?>
	<script>
		function highlight(idVal, keyword) {
			var textbox = document.getElementById(idVal);
			if ("" == keyword) return;
			var temp = textbox.innerHTML;
			console.log(temp);
			var htmlReg = new RegExp("\<.*?\>", "i");
			var arr = new Array();
			for (var i = 0; true; i++) {
				var tag = htmlReg.exec(temp);
				if (tag) {
					arr[i] = tag;
				} else {
					break;
開發者ID:kubill,項目名稱:lumen,代碼行數:31,代碼來源:search.blade.php

示例10: pageft

include_once 'js/headPHP.php';
include_once 'page.php';
include_once "connect.php";
if (!$_SESSION['admin']) {
    echo "<script>alert('你不是管理員!');location.href = 'index.php'</script>";
    exit;
}
$sql = "select * from userlist";
$result = $dbh->query($sql);
/*$result = mysql_query($sql);*/
/*$cout_rows = mysql_num_rows($result);*/
$cout_rows = $result->rowCount();
//引用分頁函數
$pagecount = 3;
//每頁條數
pageft($cout_rows, $pagecount, $cout_rows);
$sql .= " limit {$firstcount}, {$displaypg}";
/*$result = mysql_query($sql);*/
$result = $dbh->query($sql);
?>
<body>
<h2 style="text-align: center;padding-bottom: 20px;">會員管理係統</h2>
<div class="container">
	<div style="height: 400px">
<table border="1" align="center" cellpadding="8" cellspacing="0" style="background-color: #fff;"  class="table table-hover table-condensed table-bordered">

	<tr align="center" style=" font-weight: bold" width="100%">
			<td width="10%">序號</td>
			<td width="20%">用戶名</td>
			<td width="30%">愛好</td>
			<td width="15%">是否管理員</td>
開發者ID:RookieCookie,項目名稱:TEST_votedSystem,代碼行數:31,代碼來源:adminList.php

示例11: mysql_query

        </tr></form>
      </table></td></tr>
</table>
  <tr><td  bgcolor="#FFFFFF"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
    <tr bgcolor="#E4E4E4">
      <td width="36%" height="25" align="center" bgcolor="#E4E4E4"><b>產品分類</b></td>
      <td width="22%" align="center" bgcolor="#E4E4E4"><b>產品名稱</b></td>
      <td width="11%" align="center" bgcolor="#E4E4E4"><b>上傳日期</b></td>
      <td width="9%" align="center" bgcolor="#E4E4E4"><b>操作</b></td>
    </tr>
<?php 
$sql = "select * from {$table} {$tj}";
//echo $sql;
$res = mysql_query($sql, $conn);
$total = mysql_num_rows($res);
pageft($total, 15);
$sql = "select * from {$table} {$tj} order by id desc limit {$firstcount},{$displaypg} ";
$res = mysql_query($sql, $conn);
if (strlen($res) == 0) {
    echo "沒有此類數據";
} else {
    while ($rows = mysql_fetch_array($res)) {
        ?>
    <tr bgcolor="#EFEFEF">
      <td height="25" align="left" style="padding-left:2px;" bgcolor="#FFFFFF">
	  <?php 
        echo "<b>" . name($nav_table, $rows['pro_class1']) . "</b>" . " <span style='font-weight:blod;color:red'>></span> ";
        ?>
	  <?php 
        if ($rows['pro_class1'] == $rows['pro_class']) {
        } else {
開發者ID:hedm0423,項目名稱:van,代碼行數:31,代碼來源:product.php

示例12: count

           <a href ="<?php 
echo $url_this . 'gty=3';
?>
" ><img src="images/female.gif"></a>
          </div>
         </div>        
		</td>
       </tr>
	   
	   
	   
<?php 
include_once "page.class.php";
$pageSize = $wpdb->get_var($wpdb->prepare("SELECT config_value FROM {$wpdb->config} where config_key='pagesize';"));
$total = count(style_display(0, 0, $_GET['style_keyword']));
pageft($total, $pageSize, 1, 0, 0, 9, 10, 0);
/* gty 0 默認排序,1, 中性排序,2, 女性排序, 3,男性排序*/
$gty = (int) $_GET['gty'];
//未傳遞參數,設置為默認排序
if (!isset($gty)) {
    $gty = 0;
}
$M_styles = style_display($firstcount, $pageSize, $_GET['style_keyword'], $gty);
?>
	   
	   <tr>
	    <td><div id="nav_pages"><?php 
echo $pagenav;
?>
</div></td>
	   </tr>
開發者ID:dalinhuang,項目名稱:styleshop,代碼行數:31,代碼來源:index.php

示例13: Template

        break;
}
$t = new Template('.', "keep");
$t->set_file("supplogo", "supplogo.html");
$t->set_block("supplogo", "BXBK", "bxbks");
$scatid = 10;
//搜索
if (empty($search)) {
    $querywhere = "";
} else {
    $querywhere = "where fd_supplogo_suppname like '%{$content}%'";
}
$query = "select fd_supplierlogo_id,fd_supplogo_suppid,fd_supplogo_suppname,fd_supplogo_tuijian from web_conf_supplierlogo \n  {$querywhere} order by fd_supplogo_tuijian desc ";
$db->query($query);
$total = $db->nf();
pageft($total, 7, $str_url);
if ($firstcount < 0) {
    $firstcount = 0;
}
$query = "{$query} limit {$firstcount},{$displaypg}";
$db->query($query);
if ($db->nf()) {
    while ($db->next_record()) {
        $fd_supplierlogo_id = $db->f(fd_supplierlogo_id);
        $fd_supplogo_suppid = $db->f(fd_supplogo_suppid);
        $fd_supplogo_suppname = $db->f(fd_supplogo_suppname);
        $fd_supplogo_tuijian = $db->f(fd_supplogo_tuijian);
        $getFileimg = new AutogetFile();
        $csp_get_img = explode("@@", $getFileimg->AutogetFileimg($scatid, $fd_supplierlogo_id));
        $thumimg = $csp_get_img[0];
        $thumimg = $thumimg ? "<img src='" . $thumimg . "' width=120 height=50/>" : "";
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:supplogo.php

示例14: pageft

         } else {
             $openidStr = "null";
             //未關注
         }
     }
     $pageSize = "5";
     $page = $_GET['page'];
     $count = C::t("#smart_vote#smart_vote")->count_all();
     if ($page == "" || !isset($page)) {
         $query = C::t("#smart_vote#smart_vote")->fetch_all('0', '5');
         pageft($count, $pageSize, 1, 0, 0, 3);
     } else {
         $firstcount = ($page - 1) * $pageSize;
         // $lastcount = $page * $pageSize;
         $query = C::t("#smart_vote#smart_vote")->fetch_all($firstcount, $pageSize);
         pageft($count, $pageSize, 1, 0, 0, 3);
     }
     // pageft($count,10);
     include template("smart_vote:index");
 } else {
     if ("value" == $_GET['model']) {
         $openid = $_COOKIE["openid"];
         //openid
         $today = time();
         $exitdate = strtotime(date('Y-m-d 23:59:59'));
         $geetest = new GeetestLib();
         $geetest->set_privatekey("465719ad89db5cbe489cc051ff81a38e");
         $voteid = $_POST['voteid'];
         if (isset($_POST['geetest_challenge']) && isset($_POST['geetest_validate']) && isset($_POST['geetest_seccode'])) {
             $result = $geetest->validate($_POST['geetest_challenge'], $_POST['geetest_validate'], $_POST['geetest_seccode']);
             if ($result == TRUE) {
開發者ID:ljhchshm,項目名稱:smart_vote,代碼行數:31,代碼來源:smart_vote.inc.php

示例15: DB_test

$db = new DB_test();
$db1 = new DB_test();
$t = new Template('.', "keep");
$t->set_file("mobilerecharge_list", "mobilerecharge_list.html");
$t->set_block("mobilerecharge_list", "HEADBXBK", "headbxbks");
$arr_state = array("請求交易", "交易成功", "交易取消", "無效狀態");
//$arr_state = auto_charset($arr_state, 'utf-8', 'gbk');
if ($msgstart < 0) {
    $msgstart = 0;
}
$all_paymoney = 0;
$query = "select *,case\n        when fd_mrclist_payrq ='01' then '" . $arr_state[0] . "'\n        when fd_mrclist_payrq ='00' then '" . $arr_state[1] . "'" . "when fd_mrclist_payrq ='03' then '" . $arr_state[2] . "'\n        else '" . $arr_state[4] . "' END  fd_mrclist_payrq,\n        fd_mrclist_ofstate,\n       case\n        when fd_mrclist_ofstate ='1' then '<font color=blue>充值成功</font>'\n        when fd_mrclist_ofstate ='-1' then '正在充值'\n        else '<font color=red>充值失敗</font>' END  ofstate\n         from  tb_mobilerechargelist\n          left join tb_author  on fd_author_id  = fd_mrclist_authorid\n          left join tb_sendcenter  on fd_sdcr_id  = fd_mrclist_sdcrid\n          where 1\n\t\t\tand  (fd_mrclist_payrq = '00') and fd_mrclist_sdcrid<100  order by fd_mrclist_id desc ";
$db->query($query);
//and fd_agpm_paytype <>'recharge'
$total = $db->num_rows($result);
pageft($total, $displaypg, $url);
if ($firstcount < 0) {
    $firstcount = 0;
}
$count = $firstcount;
$query = "{$query} limit {$firstcount},{$displaypg}";
$rows = $db->num_rows();
if ($db->execute($query)) {
    $arr_val = $db->get_all($query);
}
if (is_array($arr_val)) {
    foreach ($arr_val as $key => $arr_val) {
        $tcount++;
        if ($arr_val['fd_mrclist_ofstate'] != '1') {
            $arr_val['eidt_ofstate'] = '<a href="javascript:void(0);" name="' . $arr_val['fd_mrclist_authorid'] . '" class="eidt_ofstate" rel="' . $arr_val['fd_mrclist_bkntno'] . '">再次充值</a>';
        } else {
開發者ID:Xiaoyuyexi,項目名稱:client-server,代碼行數:31,代碼來源:mobilerecharge_list.php


注:本文中的pageft函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。