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


PHP page::getPage方法代码示例

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


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

示例1: show

 public function show()
 {
     //if (!$this->QX[$this->get['open']][$this->get['action']]) $this->fun->Msg('你没有此权限');
     if (is_numeric($this->get['weight'])) {
         $this->default_value();
         $start = (double) $this->get['weight'] / 10;
         $stop = $start + 0.09;
         switch ($this->get['weight']) {
             case '03':
                 $weight = "and weight<={$stop}";
                 break;
             case '010':
                 $weight = "and weight>={$start}";
                 break;
             default:
                 $weight = "and weight>={$start} and weight<={$stop}";
         }
         $this->get['px'] = $this->get['px'] ? $this->get['px'] : 'agio';
         $this->get['orders'] = $this->get['orders'] ? $this->get['orders'] : 'asc';
         $ORDER = $this->get['px'] . ' ' . $this->get['orders'];
         $this->sma->assign('get', $this->get);
         $promotion_dot = $_SESSION['proxy']['is_offer'] == 'Y' ? 'promotion_dot' : $_SESSION['proxy']['rebate'];
         require_once BASEPATH . '../Class/page.php';
         $list = new page();
         $list->db = $this->db;
         $list->pageNS = 50;
         $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
         $list->SQL = "select id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,INTbid,(agio+baseAgio+{$promotion_dot}) as agio from product where  status='up' {$weight} and amount>0 and is_promotion='Y' and promotion_start<=UNIX_TIMESTAMP() and promotion_stop>=UNIX_TIMESTAMP() order by {$ORDER}";
         //$list->SQL = "select id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,INTbid,(agio+baseAgio+{$promotion_dot}) as agio from product where  status='up' {$weight} and amount>0 and proSource='self' order by {$ORDER}";
         $this->sma->assign('list_page', $list->getPage(true));
         $this->sma->assign('list_text', $list->getText());
     } else {
         $this->default_value();
         //$start = (float)$this->get['weight'] / 10;
         //$stop = $start + 0.09;
         //switch($this->get['weight'])
         //{
         //	case '03':$weight = "and weight<={$stop}";break;
         //	case '010':$weight = "and weight>={$start}";break;
         //	default:$weight = "and weight>={$start} and weight<={$stop}";
         //}
         $weight = "and weight>=0.3";
         $this->get['px'] = $this->get['px'] ? $this->get['px'] : 'agio';
         $this->get['orders'] = $this->get['orders'] ? $this->get['orders'] : 'asc';
         $ORDER = $this->get['px'] . ' ' . $this->get['orders'];
         $this->sma->assign('get', $this->get);
         $promotion_dot = $_SESSION['proxy']['is_offer'] == 'Y' ? 'promotion_dot' : $_SESSION['proxy']['rebate'];
         require_once BASEPATH . '../Class/page.php';
         $list = new page();
         $list->db = $this->db;
         $list->pageNS = 50;
         $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
         $list->SQL = "select id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,INTbid,(agio+baseAgio+{$promotion_dot}) as agio from product where  status='up' {$weight} and amount>0 and is_promotion='Y' and promotion_start<=UNIX_TIMESTAMP() and promotion_stop>=UNIX_TIMESTAMP() order by {$ORDER}";
         //$list->SQL = "select id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,INTbid,(agio+baseAgio+{$promotion_dot}) as agio from product where  status='up' {$weight} and amount>0 and proSource='self' order by {$ORDER}";
         $this->sma->assign('list_page', $list->getPage(true));
         $this->sma->assign('list_text', $list->getText());
     }
     $this->sma->display('SP');
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:59,代码来源:SP.php

示例2: show

 public function show()
 {
     //if (!$this->QX[$this->get['open']][$this->get['action']]) $this->fun->Msg('你没有此权限');
     require_once BASEPATH . '../Class/page.php';
     $list = new page();
     $list->db = $this->db;
     $list->pageNS = 5;
     $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
     $list->SQL = "select id,title,uptime,bewrite from news where is_view='Y' order by taxis desc";
     $this->sma->assign('list_page', $list->getPage());
     $this->sma->assign('list_text', $list->getText());
     $this->sma->display('news_list');
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:13,代码来源:news.php

示例3: show

 public function show()
 {
     $ORDER = array('time_UP' => 'time asc', 'time_Dn' => 'time desc', 'open_UP' => 'open asc', 'open_Dn' => 'open desc');
     $this->get['ORDER'] = $ors = $this->get['ORDER'] ? $this->get['ORDER'] : 'open_Dn';
     $this->sma->assign('get', $this->get);
     require_once BASEPATH . '../Class/page.php';
     $list = new page();
     $list->db = $this->db;
     $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
     $list->SQL = "select * from purview order by {$ORDER[$ors]}";
     $this->sma->assign('list_page', $list->getPage());
     $this->sma->assign('list_text', $list->getText());
     $this->sma->display($this->get['open']);
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:14,代码来源:purview.php

示例4: log

 public function log()
 {
     if (!$this->BTP[$this->get['open']][$this->get['action']]) {
         $this->fun->Msg($this->BTP_Words);
     }
     $ORDER = array('time_UP' => 'log.year asc,log.month asc', 'time_Dn' => 'log.year desc,log.month desc');
     $this->get['ORDER'] = $ors = $this->get['ORDER'] ? $this->get['ORDER'] : 'time_Dn';
     $this->sma->assign('get', $this->get);
     require_once BASEPATH . '../Class/page.php';
     $list = new page();
     $list->db = $this->db;
     $list->pageNS = is_numeric($this->get['PNS']) ? $this->get['PNS'] : 14;
     $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
     $list->SQL = "select log.*,a.name from api_log as log join api_user as a on a.key=log.api_key order by {$ORDER[$ors]}";
     $this->sma->assign('list_page', $list->getPage());
     $this->sma->assign('list_text', $list->getText());
     $this->sma->display('API_log');
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:18,代码来源:API.php

示例5: show

 public function show()
 {
     if (!$this->BTP[$this->get['open']][$this->get['action']]) {
         $this->fun->Msg($this->BTP_Words);
     }
     $ORDER = array('Wt_UP' => 'weight_start asc', 'Wt_Dn' => 'weight_start desc', 'Cy_UP' => 'clarity asc', 'Cy_Dn' => 'clarity desc', 'Cr_UP' => 'color asc', 'Cr_Dn' => 'color desc', 'Pe_UP' => 'price asc', 'Pe_Dn' => 'price desc');
     $this->get['ORDER'] = $ors = $this->get['ORDER'] ? $this->get['ORDER'] : 'Wt_Dn';
     $this->sma->assign('get', $this->get);
     require_once BASEPATH . '../Class/page.php';
     $list = new page();
     $list->db = $this->db;
     $list->pageNS = is_numeric($this->get['PNS']) ? $this->get['PNS'] : 14;
     $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
     $list->SQL = "select * from bid order by {$ORDER[$ors]}";
     $this->sma->assign('list_page', $list->getPage());
     $this->sma->assign('list_text', $list->getText());
     $this->sma->display($this->get['open']);
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:18,代码来源:bid.php

示例6: show

 public function show()
 {
     if (!$this->BTP[$this->get['open']][$this->get['action']]) {
         $this->fun->Msg($this->BTP_Words);
     }
     $ORDER = array('time_UP' => 'time asc', 'time_Dn' => 'time desc', 'name_UP' => 'title asc', 'name_Dn' => 'title desc');
     $this->get['ORDER'] = $ors = $this->get['ORDER'] ? $this->get['ORDER'] : 'time_Dn';
     $this->sma->assign('get', $this->get);
     require_once BASEPATH . '../Class/page.php';
     $list = new page();
     $list->db = $this->db;
     $list->pageNS = is_numeric($this->get['PNS']) ? $this->get['PNS'] : 14;
     $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
     $list->SQL = "select id,title,taxis,uptime,is_view from news order by {$ORDER[$ors]}";
     $this->sma->assign('list_page', $list->getPage());
     $this->sma->assign('list_text', $list->getText());
     $this->sma->display($this->get['open']);
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:18,代码来源:news.php

示例7: appx_show

 public function appx_show()
 {
     if (!$this->BTP[$this->get['open']][$this->get['action']]) {
         $this->fun->Msg($this->BTP_Words);
     }
     $this->_appendix_public();
     $ORDER = array('time_UP' => 'time asc', 'time_Dn' => 'time desc', 'type_UP' => 'type asc', 'type_Dn' => 'type desc');
     $this->get['ORDER'] = $ors = $this->get['ORDER'] ? $this->get['ORDER'] : 'time_Dn';
     $this->sma->assign('get', $this->get);
     require_once BASEPATH . '../Class/page.php';
     $list = new page();
     $list->db = $this->db;
     $list->pageNS = is_numeric($this->get['PNS']) ? $this->get['PNS'] : 14;
     $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
     $list->SQL = "select id,type,name,`into`,time from service_appendix where service_id='{$this->get['id']}' order by {$ORDER[$ors]}";
     $this->sma->assign('list_page', $list->getPage());
     $this->sma->assign('list_text', $list->getText());
     $this->sma->display('service_appx_show');
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:19,代码来源:service.php

示例8: page

<?php

require_once 'asset/smarty-3.1.28/libs/Smarty.class.php';
require_once 'common/config/conf.php';
require_once 'vendor/mysql.php';
require_once 'vendor/page.php';
require_once 'common/smarty.inc.php';
isset($_COOKIE['username']) ? $username = $_COOKIE['username'] : ($username = null);
//每页默认数据量
$num = 5;
$page = new page('blog_posts', [], $num, 'create_time');
isset($_GET['page']) ? $p = $_GET['page'] : ($p = 1);
$list = $page->getPage($p);
$smarty->assign('username', $username);
$smarty->assign('url', $_SERVER['PHP_SELF']);
$smarty->assign('page', $p);
$smarty->assign('tag', $page->getTag($p));
//$page->getData());
$smarty->assign('list', $list);
$smarty->assign('total', $total = $page->tt());
$smarty->display('layout.html');
//print_r($list);
//$smarty->display('test.tpl');
开发者ID:ztaoge,项目名称:blog,代码行数:23,代码来源:index.php

示例9: page

		<tfoot>
			<tr>
				<td colspan="6">
					<div class="bulk-actions align-left">
						<select name="dropdown">
							<option value="option3">删除</option>
						</select>
						<a class="button" href="javascript:void(0);" id="c_chose">适用于所选</a>
					</div>
					
					<div class="pagination">
					<?php 
$page = new page("{$number}", "{$pagesize}");
//实例化page类
$str = $page->getPage();
//调用getPage类
echo $str;
?>
						
					</div> <!-- End .pagination -->
					<div class="clear"></div>
				</td>
			</tr>
		</tfoot>
		
	</table>
</div>

			<!-- End Notifications -->
<?php 
开发者ID:Mapleth,项目名称:blog,代码行数:30,代码来源:comments.php

示例10: show

 public function show()
 {
     if (!$this->BTP[$this->get['open']][$this->get['action']]) {
         $this->fun->Msg($this->BTP_Words);
     }
     $this->default_value();
     $ORDER = array('time_UP' => 'o.time asc', 'time_Dn' => 'o.time desc', 'prxy_UP' => 'o.proxy_id asc', 'prxy_Dn' => 'o.proxy_id desc');
     $this->get['ORDER'] = $ors = $this->get['ORDER'] ? $this->get['ORDER'] : 'time_Dn';
     //查询
     if ($this->get['go'] == 'query') {
         $query = "and o.orders_id like '%{$this->get['info']}%' \n\t\t\t \tor p.account like '%{$this->get['info']}%' or p.name like '%{$this->get['info']}%' or p.number like '%{$this->get['info']}%'\n\t\t\t \tor s.account like '%{$this->get['info']}%' or s.name like '%{$this->get['info']}%' or s.number like '%{$this->get['info']}%'\n\t\t\t \tor ps.account like '%{$this->get['info']}%' or ps.name like '%{$this->get['info']}%' or ps.number like '%{$this->get['info']}%'\n\t\t\t \t";
     }
     //订单状态
     switch ($this->get['status']) {
         //下订单 -> 审核
         case 'null':
             $status = "and o.status is null";
             break;
             //通过审核
         //通过审核
         case 'audit':
             $status = "and o.status='audit' and o.earnest is null";
             break;
             //通过审核 -> 付定金
         //通过审核 -> 付定金
         case 'earnest':
             $status = "and o.status='earnest' and o.earnest>0 and o.gotten_money is null";
             break;
             //付定金 -> 调货
         //付定金 -> 调货
         case 'deploy':
             $status = "and o.status='deploy' and o.earnest=o.gotten_money";
             break;
             //调货 -> 付余款
         //调货 -> 付余款
         case 'balance':
             $status = "and o.status='balance' and o.earnest=o.gotten_money";
             break;
             //付余款 -> 发货
         //付余款 -> 发货
         case 'dispatch':
             $status = "and o.status='dispatch' and o.price=o.gotten_money";
             break;
             //收到货物
         //收到货物
         case 'receiving':
             $status = "and o.status='receiving'";
             break;
             //取消订单
         //取消订单
         case 'returned':
             $status = "and o.status='returned'";
             break;
     }
     $this->sma->assign('get', $this->get);
     require_once BASEPATH . '../Class/page.php';
     $list = new page();
     $list->db = $this->db;
     $list->pageNS = is_numeric($this->get['PNS']) ? $this->get['PNS'] : 14;
     $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
     $list->SQL = "select o.proxy_id,o.orders_id,o.time,o.earnest,o.price,o.gotten_money,o.status,p.account,s.name as service_name,ps.name as salesman_name\n\t\t\t\t\t\t\tfrom orders as o join proxy as p on p.id=o.proxy_id\tjoin service as s on s.id=o.service_id \n\t\t\t\t\t\t\tjoin proxy as ps on ps.id=o.salesman_id where 1 {$query} {$status} order by {$ORDER[$ors]}";
     $info = $list->getText();
     if ($info) {
         foreach ($info as $key => $val) {
             $info[$key]['status'] = $this->get_status($val);
         }
     }
     //print_r($info);
     $this->sma->assign('list_page', $list->getPage());
     $this->sma->assign('list_text', $info);
     $this->sma->display($this->get['open']);
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:72,代码来源:orders.php

示例11: show

 public function show()
 {
     $user = $this->get_user();
     if ($this->db->update('api_log', array('amount' => '+++1'), "api_key='{$this->get['key']}' and type='product' and year=EXTRACT(YEAR FROM CURDATE()) and month=EXTRACT(MONTH FROM CURDATE())") == false) {
         $this->db->insert('api_log', array('api_key' => $this->get['key'], 'type' => 'product', 'year' => date('Y'), 'month' => date('m'), 'amount' => 1));
     }
     if ($this->get['shape']) {
         $shape = "and shape in ('" . implode("','", explode(',', $this->get['shape'])) . "')";
     }
     if ($this->get['color']) {
         $color = "and color in ('" . implode("','", explode(',', $this->get['color'])) . "')";
     }
     if ($this->get['clarity']) {
         $clarity = "and clarity in ('" . implode("','", explode(',', $this->get['clarity'])) . "')";
     }
     if ($this->get['cut']) {
         $cut = "and cut in ('" . implode("','", explode(',', $this->get['cut'])) . "')";
     }
     if ($this->get['polish']) {
         $polish = "and buffing in ('" . implode("','", explode(',', $this->get['polish'])) . "')";
     }
     if ($this->get['symmetry']) {
         $symmetry = "and symmetry in ('" . implode("','", explode(',', $this->get['symmetry'])) . "')";
     }
     if ($this->get['FLR']) {
         $FLR = "and Fent_Isity in ('" . implode("','", explode(',', $this->get['FLR'])) . "')";
     }
     if ($this->get['cert']) {
         $cert = "and diploma in ('" . implode("','", explode(',', $this->get['cert'])) . "')";
     }
     switch ($this->get['is_promotion']) {
         case 'Y':
             $is_promotion = "and is_promotion='Y' and promotion_start<=UNIX_TIMESTAMP() and promotion_stop>=UNIX_TIMESTAMP()";
             break;
         case 'N':
             $is_promotion = "and (is_promotion='N' or promotion_start>UNIX_TIMESTAMP() and promotion_stop<UNIX_TIMESTAMP())";
     }
     if ($this->get['weight'] || $this->get['weight'] === '0') {
         $weight = explode(',', $this->get['weight']);
         if (count($weight) > 1) {
             $weight[0] = $weight[0] ? $weight[0] : 0;
             $weight[1] = $weight[1] ? $weight[1] : 100;
             if (is_numeric($weight[0]) && is_numeric($weight[1])) {
                 $weight = 'and weight>=' . $weight[0] . ' and weight<=' . $weight[1];
             } else {
                 $this->{make_ . $this->get['R']}(array('error' => array('code' => 1, 'info' => '重量错误')));
             }
         } else {
             if (is_numeric($weight[0])) {
                 $weight = 'and weight=' . $weight[0];
             } else {
                 $this->{make_ . $this->get['R']}(array('error' => array('code' => 1, 'info' => '重量错误')));
             }
         }
     }
     if (!$this->get['view']) {
         $this->{make_ . $this->get['R']}(array('error' => array('code' => -2, 'info' => '显示的参数不能为空')));
     }
     if ($this->get['list']) {
         $list = explode(',', $this->get['list']);
         foreach ($list as $val) {
             $val = explode('/', $val);
             if (!$val[0]) {
                 $this->{make_ . $this->get['R']}(array('error' => array('code' => 2, 'info' => '排序字段为空')));
             }
             $val[1] = $val[1] ? $val[1] : 'asc';
             if (!in_array($val[1], array('asc', 'desc'))) {
                 $this->{make_ . $this->get['R']}(array('error' => array('code' => 3, 'info' => '排序格式错误')));
             }
             $ORDER .= ",{$val[0]} {$val[1]}";
         }
         $ORDER = 'order by ' . substr($ORDER, 1);
     }
     require_once BASEPATH . '../Class/page.php';
     $list = new page();
     $list->db = $this->db;
     $list->pageNS = is_numeric($this->get['page_amount']) ? $this->get['page_amount'] : 100;
     $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
     $list->SQL = "select INTbid,ProID,shape,weight,color,clarity,cut,buffing as polish,symmetry,Fent_Isity as FLR,scalar_value,body_ratio as depth,table_width as `table`,diploma as cert,diplomaNO as certNO,infml from product where status='up' {$is_promotion} {$weight} {$shape} {$color} {$clarity} {$cut} {$polish} {$symmetry} {$FLR} {$cert} {$ORDER}";
     if (count($DATA = $list->getText())) {
         $DATA = $this->make_data($DATA, $user);
         $info['data'] = $list->getPage();
         $info['source'] = '广利珠宝网';
         $info['home_page'] = 'www.GLDHK.com';
         $info['author'] = 'simon';
         $info['time'] = date('Y-m-d H:i:s');
         $info['view'] = $this->get['view'];
         $info['amount'] = $info['data']['Record'];
         $info['page'] = $info['data']['count'];
         $info['now_page'] = $info['data']['NowPage'];
         $info['page_amount'] = $info['data']['PNS'];
         unset($info['data']);
         $DATA = $this->get_new_array('info', $info, $DATA);
         $this->{make_ . $this->get['R']}($DATA);
     } else {
         $this->{make_ . $this->get['R']}(array('error' => array('code' => 0, 'info' => '没有产品')));
     }
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:98,代码来源:product_bid.php

示例12: advanced


//.........这里部分代码省略.........
         if ($post['clarity'] && count($post['clarity'])) {
             $clarity = "and clarity in ('" . join("','", $post['clarity']) . "')";
         }
         //切工
         if ($post['cut'] && count($post['cut'])) {
             $cut = "and cut in ('" . join("','", $post['cut']) . "')";
         }
         //抛光
         if ($post['buffing'] && count($post['buffing'])) {
             $buffing = "and buffing in ('" . join("','", $post['buffing']) . "')";
         }
         //对称
         if ($post['symmetry'] && count($post['symmetry'])) {
             $symmetry = "and symmetry in ('" . join("','", $post['symmetry']) . "')";
         }
         //荧光强度
         if ($post['Fent_Isity'] && count($post['Fent_Isity'])) {
             $Fent_Isity = "and Fent_Isity in ('" . join("','", $post['Fent_Isity']) . "')";
         }
         //荧光颜色
         if ($post['Fent_color'] && count($post['Fent_color'])) {
             $Fent_color = "and Fent_color in ('" . join("','", $post['Fent_color']) . "')";
         }
         //证书
         if ($post['diploma'] && count($post['diploma'])) {
             $diploma = "and diploma in ('" . join("','", $post['diploma']) . "')";
         }
         //产品来源
         if ($post['proSource'] && count($post['proSource'])) {
             $proSource = "and proSource in ('" . join("','", $post['proSource']) . "')";
         }
         //促销
         if ($post['promotion_start'] && $post['promotion_stop']) {
             $st = strtotime($post['promotion_start']);
             $sp = strtotime($post['promotion_stop']);
             if ($st > $sp) {
                 $sp = $st + $sp;
                 $st = $sp - $st;
                 $sp = $sp - $st;
             }
             $promotion = "and '{$sp}'>=promotion_start and '{$st}'<=promotion_stop";
         }
         //退点
         if (is_numeric($post['agio'][0]) && is_numeric($post['agio'][1]) && ($post['agio'][0] || $post['agio'][1])) {
             $s = $post['agio'][0];
             $p = $post['agio'][1];
             if ($s > $p) {
                 $p = $s + $p;
                 $s = $p - $s;
                 $p = $p - $s;
             }
             $agio = "and agio>={$s} and agio<={$p}";
         }
         //重量
         if (is_numeric($post['weight'][0]) && is_numeric($post['weight'][1]) && ($post['weight'][0] || $post['weight'][1])) {
             $s = $post['weight'][0];
             $p = $post['weight'][1];
             if ($s > $p) {
                 $p = $s + $p;
                 $s = $p - $s;
                 $p = $p - $s;
             }
             $weight = "and weight>={$s} and weight<={$p}";
         }
         //全身比
         if (is_numeric($post['body_ratio'][0]) && is_numeric($post['body_ratio'][1]) && ($post['body_ratio'][0] || $post['body_ratio'][1])) {
             $s = $post['body_ratio'][0];
             $p = $post['body_ratio'][1];
             if ($s > $p) {
                 $p = $s + $p;
                 $s = $p - $s;
                 $p = $p - $s;
             }
             $body_ratio = "and body_ratio>={$s} and body_ratio<={$p}";
         }
         //台宽比
         if (is_numeric($post['table_width'][0]) && is_numeric($post['table_width'][1]) && ($post['table_width'][0] || $post['table_width'][1])) {
             $s = $post['table_width'][0];
             $p = $post['table_width'][1];
             if ($s > $p) {
                 $p = $s + $p;
                 $s = $p - $s;
                 $p = $p - $s;
             }
             $table_width = "and table_width>={$s} and table_width<={$p}";
         }
         $this->default_value();
         require_once BASEPATH . '../Class/page.php';
         $list = new page();
         $list->db = $this->db;
         $list->pageNS = is_numeric($this->get['PNS']) ? $this->get['PNS'] : 14;
         $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
         $list->SQL = "select INTbid,id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,agio,baseAgio,infml,is_promotion,promotion_start,promotion_stop,promotion_dot \n\t\t\t\t\t\t\t\tfrom product where 1 {$status} {$shape} {$color} {$clarity} {$cut} {$buffing} {$symmetry} {$Fent_Isity} {$Fent_color} \n\t\t\t\t\t\t\t\t{$diploma} {$proSource} {$promotion} {$agio} {$weight} {$body_ratio} {$table_width} order by {$ORDER[$ors]}";
         $this->sma->assign('list_page', $list->getPage());
         $this->sma->assign('list_text', $list->getText());
     } else {
         $this->default_value(true);
     }
     $this->sma->display($this->get['open'] . '_advanced');
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:101,代码来源:product.php

示例13: getTag

 public function getTag()
 {
     $page = new page('blog_posts', ['post_author_id' => $this->id], $num, 'create_time');
     return $page->getPage(1);
 }
开发者ID:ztaoge,项目名称:blog,代码行数:5,代码来源:user.php

示例14: show

 public function show()
 {
     if (!$this->QX[$this->get['open']][$this->get['action']]) {
         $this->fun->Msg('你没有此权限');
     }
     $this->get['st'] = $this->get['st'] ? $this->get['st'] : 'l';
     $this->sma->assign('get', $this->get);
     $post = $this->fun->pars_all('post', true);
     if ($post && count($post)) {
         //把搜索条件存储进cookie中去
         setcookie('Query', serialize($post));
     } else {
         if (get_magic_quotes_gpc()) {
             $post = unserialize(stripslashes($_COOKIE['Query']));
         } else {
             $post = unserialize($_COOKIE['Query']);
         }
     }
     //echo $this->get['open'];die;
     if ($this->get['go'] == 'query') {
         $this->get['px'] = $this->get['px'] ? $this->get['px'] : 'agio';
         $this->get['orders'] = $this->get['orders'] ? $this->get['orders'] : 'asc';
         $ORDER = $this->get['px'] . ' ' . $this->get['orders'];
         //形状
         $this->st_array(&$post['shape']);
         $shape = $post['shape'] && count($post['shape']) ? "and shape in ('" . join("','", $post['shape']) . "')" : '';
         //颜色
         $this->st_array(&$post['color']);
         $color = $post['color'] && count($post['color']) ? "and color in ('" . join("','", $post['color']) . "')" : '';
         //净度
         $this->st_array(&$post['clarity']);
         $clarity = $post['clarity'] && count($post['clarity']) ? "and clarity in ('" . join("','", $post['clarity']) . "')" : '';
         //切工
         $this->st_array(&$post['cut']);
         $cut = $post['cut'] && count($post['cut']) ? "and cut in ('" . join("','", $post['cut']) . "')" : '';
         //抛光
         $this->st_array(&$post['buffing']);
         $buffing = $post['buffing'] && count($post['buffing']) ? "and buffing in ('" . join("','", $post['buffing']) . "')" : '';
         //对称
         $this->st_array(&$post['symmetry']);
         $symmetry = $post['symmetry'] && count($post['symmetry']) ? "and symmetry in ('" . join("','", $post['symmetry']) . "')" : '';
         //荧光强度
         $this->st_array(&$post['Fent_Isity']);
         $Fent_Isity = $post['Fent_Isity'] && count($post['Fent_Isity']) ? "and Fent_Isity in ('" . join("','", $post['Fent_Isity']) . "')" : '';
         //荧光颜色
         $this->st_array(&$post['Fent_color']);
         $Fent_color = $post['Fent_color'] && count($post['Fent_color']) ? "and Fent_color in ('" . join("','", $post['Fent_color']) . "')" : '';
         //证书
         $this->st_array(&$post['diploma']);
         $diploma = $post['diploma'] && count($post['diploma']) ? "and diploma in ('" . join("','", $post['diploma']) . "')" : '';
         //重量
         if (is_numeric($post['weight'][0]) && is_numeric($post['weight'][1]) && ($post['weight'][0] || $post['weight'][1])) {
             $s = $post['weight'][0];
             $p = $post['weight'][1];
             if ($s > $p) {
                 $p = $s + $p;
                 $s = $p - $s;
                 $p = $p - $s;
             }
             $weight = "and weight>={$s} and weight<={$p}";
         }
         $this->default_value();
         require_once BASEPATH . '../Class/page.php';
         $list = new page();
         $list->db = $this->db;
         $list->pageNS = is_numeric($this->get['PNS']) ? $this->get['PNS'] : 50;
         $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
         $list->SQL = "select INTbid,id,ProID,shape,weight,color,clarity,cut,buffing,symmetry,Fent_Isity,scalar_value,diploma,diplomaNO,agio,baseAgio,infml,is_promotion,promotion_start,promotion_stop,promotion_dot \n\t\t\t\t\t\t\t\tfrom product where amount>0 and agio>-100 and baseAgio !=9 and status='up' {$shape} {$color} {$clarity} {$cut} {$buffing} {$symmetry} {$Fent_Isity} {$Fent_color} \n\t\t\t\t\t\t\t\t{$diploma} {$weight} order by {$ORDER}";
         $this->sma->assign('list_page', $list->getPage(true));
         $this->sma->assign('list_text', $list->getText());
     } else {
         $this->default_value();
         //$this->sma->assign('post' , $post);
     }
     $this->sma->assign('post', $post);
     if ($this->get['st'] == 'l') {
         $this->sma->display('search_letter');
     } else {
         $this->sma->display('search_button');
     }
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:81,代码来源:Query.php

示例15: log

 public function log()
 {
     if (!$this->QX[$this->get['open']][$this->get['action']]) {
         $this->fun->Msg('你没有此权限');
     }
     require_once BASEPATH . '../Class/page.php';
     $list = new page();
     $list->db = $this->db;
     $list->pageNS = 20;
     $list->NowPage = empty($this->get['page']) | $this->get['page'] < 1 | !is_numeric($this->get['page']) ? 1 : $this->get['page'];
     $list->SQL = "select id,`show`,time from log where `type`='money' and who_id='{$_SESSION['proxy']['id']}' order by time desc";
     $this->sma->assign('list_page', $list->getPage());
     $this->sma->assign('list_text', $list->getText());
     $this->sma->display('me_log');
 }
开发者ID:Capitalwang,项目名称:shehuahk,代码行数:15,代码来源:me.php


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