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


PHP table_class::paginate方法代码示例

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


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

示例1: paginate

 public function paginate($param = 'all', $option = null, $page_count = 10, $page_var = 'page')
 {
     $this->thumb_names = explode('|', $this->thumb_name);
     $result = parent::paginate($param, $option, $page_count, $page_var);
     if (is_array($result)) {
         foreach ($result as $v) {
             $v->thumb_names = explode('|', $v->thumb_name);
         }
     } else {
         if (is_object($result)) {
             $result->thumb_names = explode('|', $result->thumb_name);
         }
     }
     return $result;
 }
开发者ID:sauger,项目名称:forbes_front,代码行数:15,代码来源:table_images_class.php

示例2: array

?>
</head>

<body>
	<?php 
$list = new table_class('fb_custom_list_type');
if ($_REQUEST['s_text']) {
    $conditions[] = "name like '%{$_REQUEST['s_text']}%'";
}
$conditions[] = "list_type=5";
if ($conditions) {
    $conditions = array('conditions' => implode(' and ', $conditions));
}
$order = ' priority asc, created_at desc';
$conditions['order'] = $order;
$record = $list->paginate("all", $conditions);
$count = count($record);
?>
<div id=icaption>
    <div id=title>文章榜单</div>
	  <a href="file_list_edit.php" id=btn_add></a>
</div>
<div id=isearch>
		<input id="s_text" type="text" value="<?php 
echo $_REQUEST['s_text'];
?>
">
		<input type="button" value="搜索" id="search_button">
		<input type="hidden" id="file" value="file_list_list">
</div>
<div id=itable>
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:file_list_list.php

示例3: trim

if ($title != '') {
    array_push($c, "title like '%" . trim($title) . "%' or keywords like '%" . trim($title) . "%' or description like '%" . trim($title) . "%' or author like '%{$title}%'");
}
if ($category_id > 0) {
    $cate_ids = implode(',', $category->children_map($category_id));
    array_push($c, "category_id in({$cate_ids})");
}
array_push($c, "is_adopt=0");
if ($up != '') {
    array_push($c, "set_up={$up}");
}
if (role_name() == 'column_editor' || role_name() == 'column_writer') {
    $c[] = "publisher={$_SESSION['admin_user_id']}";
}
$news = new table_class($tb_news);
$record = $news->paginate('all', array('conditions' => implode(' and ', $c), 'order' => 'created_at desc,category_id'), 30);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta http-equiv=Content-Language content=zh-CN>
	<title>发布新闻</title>
	<?php 
css_include_tag('admin');
use_jquery();
js_include_tag('admin_pub', 'category_class', 'admin/pub/search', 'admin/news/news_list');
$category->echo_jsdata();
?>
</head>
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:news_list2.php

示例4: array

echo $_REQUEST['key1'];
?>
">&nbsp;&nbsp留言内容&nbsp;&nbsp;<input id=comment type="text" value="<?php 
echo $_REQUEST['key2'];
?>
"></span>
				<input type="button" value="搜索" id="search" style="border:1px solid #0000ff; height:21px">
				</td>
			</tr>
			<tr class="tr2">
				<td width="150">留言人</td><td width="350">留言内容</td><td width="150">留言时间</td><td width="150">操作</td>
			</tr>
			<?php 
$comment = new table_class("fb_comment");
$comment->echo_sql = true;
$record = $comment->paginate("all", array('conditions' => $conditions, 'order' => 'created_at desc'), 18);
$count_record = count($record);
//--------------------
for ($i = 0; $i < $count_record; $i++) {
    ?>
					<tr class=tr3 id=<?php 
    echo $record[$i]->id;
    ?>
 >
						<td><?php 
    echo $record[$i]->nick_name;
    ?>
</td>
						<td><?php 
    echo $record[$i]->comment;
    ?>
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:index.php

示例5: array

	<table width="795" border="0" id="list">
		<tr class="tr1">
			<td colspan="6"><?php 
echo $category_name;
?>
类别管理 <a href="category_edit.php?type=<?php 
echo $type;
?>
">添加类别</a></td>
		</tr>
		<tr class="tr2">
			<td width="260">类别名称</td><td width="100">优先级</td><td width="260">父类</td><td width="175">操作</td>
		</tr>
		<?php 
$category = new table_class($tb_category);
$record = $category->paginate("all", array('conditions' => 'category_type="' . $type . '"', 'order' => 'parent_id,priority'), 20);
$count_record = count($record);
$record2 = $category->find("all", array('conditions' => 'category_type="' . $type . '"', 'order' => 'priority'));
$count_record2 = count($record2);
//--------------------
for ($i = 0; $i < $count_record; $i++) {
    ?>
				<tr class=tr3 id=<?php 
    echo $record[$i]->id;
    ?>
 >
					<td><?php 
    echo $record[$i]->name;
    ?>
</td>
					<td><input type="text" class="priority" name="<?php 
开发者ID:justin1986,项目名称:frame2,代码行数:31,代码来源:category_list.php

示例6: array

<?php

$s_text = $_REQUEST['s_text'];
include_once '../../frame.php';
if ($s_text) {
    $conditons = array('conditions' => " name like '%{$s_text}%' or stock_code like '%{$s_text}%'");
}
$db = get_db();
$table = new table_class('fb_company');
$record = $table->paginate('all', $conditons, '30');
?>
<div id=isearch>
	<input id="s_text" type="text" value="<?php 
echo $_REQUEST['s_text'];
?>
">
	<input type="button" value="搜索" id="search_button">
</div>
<div id=itable>
	<table cellspacing="1" align="center">
		<tr class="itable_title">
			<td width="40%">名称</td><td width="30%">股票代码</td><td width="30%">操作</td>
		</tr>
		<?php 
$len = count($record);
for ($i = 0; $i < $len; $i++) {
    ?>
				<tr class="tr3" id=<?php 
    echo $record[$i]->id;
    ?>
 >
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:filter_company.php

示例7: count

<table cellspacing="1">
		<tr class="itable_title">
			<td width="8%">留言人</td><td width="10%">IP</td><td width="15%">文章标题</td><td width="%10">杂志刊号</td><td width="30%">留言内容</td><td width="12%">留言时间</td><td width="5%">操作</td>
		</tr>
		<?php 
$comment = new table_class("fb_comment");
$record = $comment->paginate("all", $conditions, 30);
$db = get_db();
$count_record = count($record);
//--------------------
for ($i = 0; $i < $count_record; $i++) {
    ?>
				<tr class=tr3 id=<?php 
    echo $record[$i]->id;
    ?>
 >
					<td><?php 
    echo $record[$i]->nick_name;
    ?>
</td>
					<td><?php 
    echo $record[$i]->ip;
    ?>
</td>
					<td><?php 
    echo $record[$i]->title;
    ?>
</td>		
					<td><?php 
    echo $record[$i]->magzine_number;
    ?>
开发者ID:sauger,项目名称:forbes_old,代码行数:31,代码来源:_magazine.php

示例8: array

$title = $_REQUEST['title'];
$category_id = $_REQUEST['category'] ? $_REQUEST['category'] : -1;
$is_adopt = $_REQUEST['adopt'];
$db = get_db();
$c = array();
if ($title != '') {
    array_push($c, "title like '%" . trim($title) . "%' or keywords like '%" . trim($title) . "%' or description like '%" . trim($title) . "%'");
}
if ($category_id > 0) {
    array_push($c, "category_id={$category_id}");
}
if ($is_adopt != '') {
    array_push($c, "is_adopt={$is_adopt}");
}
$news = new table_class($tb_news);
$record = $news->paginate('all', array('conditions' => implode(' and ', $c), 'order' => 'priority asc,created_at desc'), 20);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta http-equiv=Content-Language content=zh-CN>
	<title>迅傲信息</title>
	<?php 
css_include_tag('admin');
use_jquery();
js_include_tag('admin_pub', 'category_class');
$category = new category_class('news');
$category->echo_jsdata();
?>
开发者ID:justin1986,项目名称:frame2,代码行数:31,代码来源:news_list.php

示例9:

<?php

session_start();
include_once '../../frame.php';
judge_role();
$news = new table_class('fb_seo');
$record = $news->paginate('all', '', 30);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta http-equiv=Content-Language content=zh-CN>
	<title>发布seo</title>
	<?php 
css_include_tag('admin');
use_jquery();
js_include_tag('admin_pub');
?>
</head>
<body>
<div id=icaption>
    <div id=title>seo管理</div>
	  <a href="seo_edit.php" id=btn_add></a>
</div>

<div id=itable>
	<table cellspacing="1" align="center">
		<tr class=itable_title>
			<td width=15%>名称</td><td width="20%">标题</td><td width="20%">关键词</td><td width="35%">说明</td><td width="10%">操作</td>
开发者ID:sauger,项目名称:forbes,代码行数:31,代码来源:index.php

示例10: array

$table = new table_class($table_name);
if ($_REQUEST['s_text']) {
    $search_fields = array();
    if ($_REQUEST['s_field'] != '0') {
        $search_fields[] = "{$_REQUEST['s_field']} like '%{$_REQUEST['s_text']}%'";
    } else {
        foreach ($table->fields as $field) {
            if ($field->name == 'id') {
                continue;
            }
            $search_fields[] = "{$field->name} like '%{$_REQUEST['s_text']}%'";
        }
    }
    $condition = array('conditions' => implode(' or ', $search_fields));
}
$record = $table->paginate("all", $condition);
?>
</head>

<body>
	<table width="795" border="0" id="list">
		<tr class="tr1">
			<td colspan="20">
				<span style="color:red;"><?php 
echo $list_name;
?>
</span>
				<a href="custom_list_item_edit.php?list_id=<?php 
echo $id;
?>
">添加榜单项</a>
开发者ID:sauger,项目名称:forbes_old,代码行数:31,代码来源:custom_list_item_list.php

示例11: array

selected="selected"<?php 
}
?>
>反馈</option>
		</select>
		<input class="sau_search" id="search_category" name ="category" type="hidden"></input>
		<input type="button" value="搜索" id="search_button">
	</div>
<div id=itable>
<table cellspacing="1">
		<tr class="itable_title">
			<td width="8%">留言人</td><td width="10%">IP</td><td width="15%">标题</td><td width="%10">类别</td><td width="25%">留言内容</td><td width="12%">留言时间</td><td width="10%">操作</td>
		</tr>
		<?php 
$comment = new table_class("eb_comment");
$record = $comment->paginate("all", array('conditions' => implode(' and ', $c), 'order' => 'created_at desc'), 30);
$count_record = count($record);
//--------------------
for ($i = 0; $i < $count_record; $i++) {
    if ($record[$i]->resource_type == news) {
        $result = $db->query("select short_title from eb_news where id={$record[$i]->resource_id}");
    } elseif ($record[$i]->resource_type == assistant) {
        $result = $db->query("select short_title from eb_assistant where id={$record[$i]->resource_id}");
    }
    $result = $result[0]->short_title;
    ?>
				<tr class=tr3 id=<?php 
    echo $record[$i]->id;
    ?>
 >
					<td>
开发者ID:justin1986,项目名称:eachbb,代码行数:31,代码来源:index.php

示例12: array

	$db = get_db();
	$title = $_REQUEST['title'];
	$type=$_REQUEST['type'];
	$is_adopt = $_REQUEST['adopt'];
	$db = get_db();
	$c = array();
	array_push($c,"type='".$type."'");
	if($title!= ''){
		array_push($c, "title like '%".trim($title)."%'");
	}
	$news = $db->query("select * from fb_life_flash where type='".$type."'");
	$news_count = count($news);
	
	
	$image = new table_class('fb_life_flash');
	$images = $image->paginate('all',array('conditions' => implode(' and ', $c),'order' => 'priority asc,created_at desc'),12);
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv=Content-Type content="text/html; charset=utf-8">
	<meta http-equiv=Content-Language content=zh-CN>
	<title>迅傲信息</title>
	<?php
		css_include_tag('admin');
		use_jquery();
		js_include_tag('category_class','admin_pub','admin/flash.js');
		$category = new category_class('image');
		$category->echo_jsdata();		
	?>
开发者ID:sauger,项目名称:forbes_old,代码行数:31,代码来源:list.php


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