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


PHP getTotalPage函数代码示例

本文整理汇总了PHP中getTotalPage函数的典型用法代码示例。如果您正苦于以下问题:PHP getTotalPage函数的具体用法?PHP getTotalPage怎么用?PHP getTotalPage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: dataAUX

 function dataAUX($tbl, $page, $cond)
 {
     //count query
     $this->db->select('COUNT(*) as TOTAL', FALSE);
     $this->db->from($tbl);
     $this->db->where($cond);
     $query = $this->db->get();
     $rows = $query->result_array();
     $totalcount = $rows[0]["TOTAL"];
     //page
     $pageno = 1;
     $pagesize = 50;
     if ($page['pageno']) {
         $pageno = $page['pageno'];
     }
     if ($page['pagesize']) {
         $pagesize = $page['pagesize'];
     }
     $totalpage = getTotalPage($totalcount, $pagesize);
     $result['totalpage'] = $totalpage;
     $result['pageno'] = $pageno;
     //query data
     $this->db->select("DATA_FILENAME,to_char(DATA_DATE,'YYYY-MM-DD HH24:MI:SS') AS DATE_STR,DATA_VERSION,DATA_FILESIZE,DATA_INTERVAL", False);
     $this->db->from($tbl);
     $this->db->where($cond);
     $snumber = getStartNumber($pageno, $pagesize);
     $this->db->limit($pagesize, $snumber);
     $query = $this->db->get();
     $result['list'] = $query->result_array();
     return $result;
 }
开发者ID:liujidong,项目名称:pre_data,代码行数:31,代码来源:product_store_model.php

示例2: get_models

 /**
  * 根据查询条件 获取组件列表 
  */
 public function get_models($page = null, $mtypecond = null, $mnamecond = null, $midcond = null, $orderBy = null, $orderstr = null)
 {
     $this->load->helper('ourpage');
     $pageno = 1;
     $pagesize = 20;
     $order = '';
     if ($page['pageno']) {
         $pageno = $page['pageno'];
     }
     $cond = "";
     if ($mtypecond) {
         if ($mtypecond != -1) {
             $cond .= " and mod.\"MTID\" ='" . $mtypecond . "'";
         }
     }
     if ($mnamecond) {
         $cond .= " and  mod.\"Name\" like '%" . $mnamecond . "%'";
     }
     if ($midcond) {
         $cond .= " and mod.\"ID\" = " . $midcond;
     }
     if ($orderstr && $orderBy) {
         $order = " order by  mod.\"" . $orderBy . "\" " . $orderstr;
     } else {
         $order = " order by mod.ID desc ";
     }
     $countsql = "select count(*) from \"T_PPC_Module\" mod where 1=1 " . $cond;
     // echo $countsql;
     $querycount = $this->db->query($countsql);
     $row = $querycount->row_array();
     $totalcount = $row["COUNT(*)"];
     if ($totalcount > 0) {
         $totalpage = getTotalPage($totalcount, $pagesize);
         $snumber = getStartNumber($pageno, $pagesize);
         $enumber = getEndNumber($pageno, $pagesize);
         $sql = "select * from (select t.*, rownum rn from ( select * from \"T_PPC_Module\"  mod where 1=1 and isview=1 " . $cond . $order . " ) t where rownum <=" . $enumber . ")  where rn > " . $snumber;
         $query = $this->db->query($sql);
         $result['list'] = $query->result_array();
         $result['totalpage'] = $totalpage;
         $result['totalcount'] = $totalcount;
         $result['pageno'] = $pageno;
     } else {
         $result['list'] = array();
         $result['totalpage'] = 0;
         $result['totalcount'] = 0;
         $result['pageno'] = 0;
     }
     $result['order'] = $orderstr;
     $result['orderBy'] = $orderBy;
     return $result;
 }
开发者ID:liujidong,项目名称:pre_data,代码行数:54,代码来源:model_model.php

示例3: get_productlines

 public function get_productlines($page = null, $cond = null, $orderBy = null, $orderstr = null)
 {
     $this->load->helper('ourpage');
     $pageno = 1;
     $pagesize = 20;
     if ($page['pageno'] == true) {
         $pageno = $page['pageno'];
     }
     $condstr = "";
     if ($cond) {
         if ($cond['scond'] && $cond['scond'] != '-1') {
             $condstr .= " and pl.\"SatCode\"='" . $cond['scond'] . "'";
         }
         if ($cond['plname']) {
             $condstr .= " and   pl.\"Alias\" like '%" . $cond['plname'] . "%'";
         }
         if ($cond['devcode'] && $cond['devcode'] != '-1') {
             $condstr .= " and pl.\"DevCode\"='" . $cond['devcode'] . "'";
         }
         // $condstr .= " and  ( mod.\"Caption\"='" . $cond . "' or mod.\"Code\" = '" . $cond . "' )";
     }
     if ($orderstr && $orderBy) {
         $order = " order by  pl.\"" . $orderBy . "\" " . $orderstr;
     } else {
         $order = " order by pl.ID desc ";
     }
     $countsql = "select count(*) from \"T_PPC_ProductLine\" pl where 1=1 " . $condstr;
     //echo $countsql;
     $totalcount = $this->getNumberCount($countsql);
     if ($totalcount > 0) {
         $totalpage = getTotalPage($totalcount, $pagesize);
         $snumber = getStartNumber($pageno, $pagesize);
         $enumber = getEndNumber($pageno, $pagesize);
         $query = null;
         $sql = "select * from (select t.*, rownum rn from (\n            select * from \"T_PPC_ProductLine\"  pl where 1=1  " . $condstr . $order . " ) t where rownum <=" . $enumber . ")\n            where rn > " . $snumber;
         $querydata = $this->db->query($sql);
         $result['list'] = $querydata->result_array();
         $result['totalpage'] = $totalpage;
         $result['pageno'] = $pageno;
     } else {
         $result['list'] = array();
         $result['totalpage'] = 0;
         $result['pageno'] = 0;
     }
     $result['order'] = $orderstr;
     $result['orderBy'] = $orderBy;
     return $result;
 }
开发者ID:liujidong,项目名称:pre_data,代码行数:48,代码来源:productline_model.php

示例4: get_cats

 public function get_cats($page = null, $cond1 = null, $orderBy = null, $orderstr = null)
 {
     $this->load->helper('ourpage');
     $pageno = 1;
     $pagesize = 10;
     $order = '';
     if ($page['pageno'] == true) {
         $pageno = $page['pageno'];
         if (!$pageno) {
             $pageszie = 1;
         }
         // print "----".$pagesize;
     }
     $cond = "";
     if ($cond1) {
         $cond .= " and  cat.\"MTName\" like  '%" . $cond1 . "%'";
     }
     if ($orderstr && $orderBy) {
         $order = " order by  cat.\"" . $orderBy . "\" " . $orderstr;
     } else {
         $order = " order by cat.id desc ";
     }
     $countsql = "select count(*) from \"T_PPC_ModuleType\" cat where 1=1 " . $cond;
     $query = $this->db->query($countsql);
     $row = $query->result_array();
     $totalcount = $row[0]["COUNT(*)"];
     $totalpage = getTotalPage($totalcount, $pagesize);
     $snumber = getStartNumber($pageno, $pagesize);
     $enumber = getEndNumber($pageno, $pagesize);
     $sql = "select * from (select t.*, rownum rn from ( select * from \"T_PPC_ModuleType\"  cat where 1=1  " . $cond . $order . " ) t where rownum < =" . $enumber . ")  where rn > " . $snumber;
     //print $sql;
     $query = $this->db->query($sql);
     $result['list'] = $query->result_array();
     $result['totalpage'] = $totalpage;
     $result['pageno'] = $pageno;
     $result['order'] = $orderstr;
     $result['orderBy'] = $orderBy;
     return $result;
 }
开发者ID:liujidong,项目名称:pre_data,代码行数:39,代码来源:compcat_model.php

示例5: substr

$day1 = $day1 ? $day1 : 1;
//substr($date['today'],6,2);
$year2 = $year2 ? $year2 : substr($date['today'], 0, 4);
$month2 = $month2 ? $month2 : substr($date['today'], 4, 2);
$day2 = $day2 ? $day2 : substr($date['today'], 6, 2);
$sort = $sort ? $sort : 'uid';
$orderby = $orderby ? $orderby : 'desc';
$recnum = $recnum && $recnum < 200 ? $recnum : 20;
$sqlque = 'mbruid=' . $my['uid'] . ' and site=' . $s;
$sqlque = $sqlque . ' and d_regis > ' . $year1 . sprintf('%02d', $month1) . sprintf('%02d', $day1) . '000000 and d_regis < ' . $year2 . sprintf('%02d', $month2) . sprintf('%02d', $day2) . '240000';
if ($where && $keyword) {
    $sqlque .= getSearchSql($where, $keyword, $ikeyword, 'or');
}
$RCD = getDbArray($table['s_referer'], $sqlque, '*', $sort, $orderby, $recnum, $p);
$NUM = getDbRows($table['s_referer'], $sqlque);
$TPG = getTotalPage($NUM, $recnum);
?>



<div id="loglist">

	<form name="bbssearchf" action="<?php 
echo $g['s'];
?>
/">
	<input type="hidden" name="r" value="<?php 
echo $r;
?>
" />
开发者ID:hoya0704,项目名称:trevia.co.kr,代码行数:30,代码来源:log.php

示例6: getCommentList

function getCommentList($theme, $parent, $_where, $recnum, $sort, $orderby1, $orderby2, $cp)
{
    global $g, $table, $_HS, $m, $my;
    include $theme . '_var.php';
    // 설정파일 인클루드
    $g['img_module_skin'] = $theme . 'image/';
    $NCD = array();
    $RCD = array();
    $cp = $cp ? $cp : 1;
    $sort = $sort ? $sort : 'uid';
    $orderby1 = $orderby1 ? $orderby1 : $d['comment']['orderby1'];
    $orderby2 = $orderby2 ? $orderby2 : $d['comment']['orderby2'];
    $recnum = $recnum ? $recnum : $d['comment']['recnum'];
    $cmentque = " and parent='" . str_replace('-', '', $parent) . "'";
    if ($_where) {
        $cmentque .= " and " . $_where;
    }
    $PCD = getDbArray($table['s_comment'], 'notice=1' . $cmentque, '*', $sort, $orderby1, 0, 0);
    $TCD = getDbArray($table['s_comment'], 'notice=0' . $cmentque, '*', $sort, $orderby2, $recnum, $cp);
    $NUM = getDbRows($table['s_comment'], 'notice=0' . $cmentque);
    $TPG = getTotalPage($NUM, $recnum);
    while ($_R = db_fetch_array($PCD)) {
        $NCD[] = $_R;
    }
    while ($_R = db_fetch_array($TCD)) {
        $RCD[] = $_R;
    }
    //echo $cmentque;
    $RCD = $NCD + $RCD;
    $i = 1;
    $namegi = $NUM - $cp * $recnum;
    if ($namegi > 0) {
        $namegi_ment = '총 <span class="text-danger namegi">' . $namegi . '</span> 개의 댓글이 더 있습니다.';
        $btn_more = 'btn-more';
        $is_namegi = 1;
    } else {
        $namegi_ment = '더이상 댓글이 없습니다.';
        $btn_more = 'disabled';
        $is_namegi = 0;
    }
    // 한줄의견 쓰는(현재 로그인한) 사용자 아바타 사진 url 세팅
    if ($my['photo']) {
        $avatar_img = $g['url_root'] . '/_var/avatar/' . $my['photo'];
    } else {
        $avatar_img = $g['url_root'] . '/_var/avatar/0.gif';
    }
    foreach ($RCD as $C) {
        $C['mobile'] = isMobileConnect($C['agent']);
        if ($C['mbruid']) {
            $M = getDbData($table['s_mbrdata'], 'memberuid=' . $C['mbruid'], '*');
        } else {
            $M = array();
        }
        $isSECRETCHECK = true;
        $JN_time = getJNTime($C['d_regis']);
        // 지난시간 얻기 함수 호출
        // 댓글 작성자 아바타 사진 url 세팅
        if ($M['photo']) {
            $avatar_img = $g['url_root'] . '/_var/avatar/' . $M['photo'];
        } else {
            $avatar_img = $g['url_root'] . '/_var/avatar/0.gif';
        }
        echo '
         <section id="pinBoot" class="rb-pinterest-grid">
		   <article class="panel panel-default panel-google-plus comment-list" id="' . $C['uid'] . '-' . $C['score1'] . '-' . $C['oneline'] . '">
             <div  id="cuid-' . $C['uid'] . '">
                 <input type="hidden" name="is_namegi" value="' . $is_namegi . '"/>
                 <input type="hidden" name="TPG" value="' . $TPG . '"/>
                 <input type="hidden" name="theme" class="theme" value="' . $theme . '" />
                 <input type="hidden" name="parent" class="parent" value="' . $parent . '" />
                 <input type="hidden" name="c_content" class="c_content" value="' . htmlspecialchars(getContents($C['content'], $C['html'], $keyword)) . '" />
                 <div class="dropdown">
                     <span class="dropdown-toggle" type="button" data-toggle="dropdown">
                         <span class="[ glyphicon glyphicon-chevron-down ]"></span>
                     </span>
                     <ul class="dropdown-menu" role="menu">
                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Action</a></li>
                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Another action</a></li>
                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Something else here</a></li>
                         <li role="presentation" class="divider"></li>
                         <li role="presentation"><a role="menuitem" tabindex="-1" href="#">Separated link</a></li>
                     </ul>
                 </div>
                 <div class="panel-google-plus-tags">
                     <ul>
                         <li>#자동차</li>
                         <li>#귀성길</li>
                     </ul>
                 </div>
                 <div class="panel-heading">
                     <img class="img-circle pull-left" src="/_core/opensrc/thumb/image.php?width=46&amp;height:46&amp;cropratio=1:1&amp;image=' . $avatar_img . '" alt="' . $M[$_HS['nametype']] . ' 아바타 " />
                     <h3>소비자와 함께</h3>
                     <h5><span>제한적으로 공유함</span> - <span>' . getDateFormat($C['d_regis'], 'Y. m. d') . '</span> </h5>
                 </div>
                 <div class="panel-body">
                     <p>' . getContents($C['content'], $C['html'], $keyword) . '</p>
                 </div>
                 <div class="panel-footer">
                     <button type="button" class="btn btn-default">+1</button>
                     <button type="button" class="btn btn-default">
//.........这里部分代码省略.........
开发者ID:kieregh,项目名称:test_comment,代码行数:101,代码来源:function.php

示例7: explode

				<p class="text-muted"><small>선택된 모듈에 대한 플러그인 정보입니다.</small></p>
			</div>
		</div>

		<hr>

	
		<?php 
include $g['path_core'] . 'function/rss.func.php';
include $g['path_module'] . 'market/var/var.php';
$_serverinfo = explode('/', $d['market']['url']);
$_updatelist = getUrlData('http://' . $_serverinfo[2] . '/__update/market/modules/' . $id . '/theme.txt', 10);
$_updatelist = explode("\n", $_updatelist);
$_updatelength = count($_updatelist) - 1;
$recnum = 10;
$TPG = getTotalPage($_updatelength, $recnum);
?>
	
		<div class="table-responsive">
			<table class="table table-hover">
				<thead>
					<tr>
						<th colspan="2">내 테마</th>
						<th>테마명(아이디)</th>
						<th>제작자</th>
						<th>마켓등록일</td>
						<th>설치일</th>
						<th>다운로드</th>
						<th>원격설치</th>
					</tr>
				</thead>
开发者ID:hanacody,项目名称:rb2,代码行数:31,代码来源:plugin.php

示例8: error_list

 public function error_list($page, $cond, $userId)
 {
     $tblName = "BUSINESS_PROCESS_DETAILED_LOG";
     $this->load->helper('ourpage');
     $pageno = 1;
     $pagesize = 10;
     if ($page['pageno']) {
         $pageno = $page['pageno'];
     }
     if ($page['pagesize']) {
         $pagesize = $page['pagesize'];
     }
     //count query
     $this->db->select('COUNT(*) as TOTAL', FALSE);
     $this->db->from($tblName);
     //ÎÀÐÇȨÏÞ
     $this->db->where("SATELLITE_ID in (select US.SATELLITE_ID from USER_SATELLITE us where US.userid = {$userId})");
     $this->db->where("DATA_RESULT != 0");
     if ($cond["type"] == "satellite") {
         $this->db->where('SATELLITE_ID', $cond["value"]);
     } else {
         if ($cond["type"] == 'flow_name') {
             $this->db->where('PROCESS_CAPTION', $cond["value"]);
         }
     }
     if ($cond["startDate"]) {
         $this->db->where("PROCESS_DATE >= to_date('" . $cond["startDate"] . "','yyyy-MM-dd')");
     }
     if ($cond["endDate"]) {
         $this->db->where("PROCESS_DATE <= to_date('" . $cond["endDate"] . " 23:59:59','yyyy-MM-dd hh24:mi:ss')");
     }
     $query = $this->db->get();
     $row = $query->result_array();
     //print_r($row);
     $totalcount = $row[0]["TOTAL"];
     $totalpage = getTotalPage($totalcount, $pagesize);
     //bulid data
     $result['totalpage'] = $totalpage;
     $result['pageno'] = $pageno;
     $this->db->select("{$tblName}.*,to_char(PROCESS_DATE,'YYYY-MM-DD HH24:MI:SS') as PROCESS_DATE_STR", false);
     $this->db->from($tblName);
     //ÎÀÐÇȨÏÞ
     $this->db->where("SATELLITE_ID in (select US.SATELLITE_ID from USER_SATELLITE us where US.userid = {$userId})");
     $this->db->where("DATA_RESULT ! = 0");
     if ($cond["type"] == "satellite") {
         $this->db->where('SATELLITE_ID', $cond["value"]);
     } else {
         if ($cond["type"] == 'flow_name') {
             $this->db->where('PROCESS_CAPTION', $cond["value"]);
         }
     }
     if ($cond["startDate"]) {
         $this->db->where("PROCESS_DATE >= to_date('" . $cond["startDate"] . "','yyyy-MM-dd')");
     }
     if ($cond["endDate"]) {
         $this->db->where("PROCESS_DATE <= to_date('" . $cond["endDate"] . " 23:59:59','yyyy-MM-dd hh24:mi:ss')");
     }
     $snumber = getStartNumber($pageno, $pagesize);
     if ($snumber == 0) {
         $snumber = 1;
     }
     $this->db->limit($pagesize, $snumber);
     $this->db->order_by("PROCESS_DATE", "desc");
     $query = $this->db->get();
     //print_r($pagesize);
     //bulid data
     $result['list'] = $query->result_array();
     return $result;
 }
开发者ID:liujidong,项目名称:pre_data,代码行数:69,代码来源:preproccess_log_model.php

示例9: getTotalPage

				</div>
				<!-- @검색결과 -->
			
				<?php 
        if ($_iscallpage) {
            ?>
					<?php 
            if ($swhere == $_key) {
                ?>
				<div class="panel-footer rb-panel-footer">
					<ul class="pagination">
						<script>getPageLink(5,<?php 
                echo $p;
                ?>
,<?php 
                echo getTotalPage($_ResultArray['num'][$_key], $d['search']['num2']);
                ?>
,'');</script>
					</ul>
				</div>
					<?php 
            } else {
                ?>
						<?php 
                if ($_ResultArray['num'][$_key] > $d['search']['num1']) {
                    ?>
				<div class="panel-footer rb-panel-footer">
					<div class="rb-more-search">
						<a href="<?php 
                    echo $g['url_where'] . $_key;
                    ?>
开发者ID:hanacody,项目名称:rb2,代码行数:31,代码来源:main.php


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