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


PHP pagestring函數代碼示例

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


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

示例1: index

 public function index()
 {
     $order = $this->_param("order");
     if ($order) {
         $order = explode("|", $order);
     }
     foreach (array_keys($this->data['all_columns']) as $v) {
         $value = trim(htmlspecialchars($this->_get($v)));
         if (!$value) {
             continue;
         }
         $filter[$v] = array('like', '%' . $value . '%');
     }
     // hack, 在全部的搜索中filter錯了
     $status = $this->_get('status');
     if ('all' == $status) {
         unset($filter['status']);
     }
     $count = D('Projects')->getProjectsCount($filter);
     list($pagesize, $page_num, $pagestring) = pagestring($count, 20);
     $projects = D('Projects')->getProjects($filter, $page_num, $pagesize, $order);
     $this->data['projects'] = $projects;
     $this->data['pagestring'] = $pagestring;
     $this->assign($this->data);
     D('AdminVisits')->saveVisit('project_list', $page_num);
     $this->display('index');
 }
開發者ID:Germey,項目名稱:yinxingpm,代碼行數:27,代碼來源:ProjectAction.class.php

示例2: index

 public function index()
 {
     $this->skey = $skey = I('skey');
     $stag_id = I('stag_id');
     if (!$skey && !$stag_id) {
         redirect('/');
     }
     $pages = array();
     if ($skey) {
         $pages = D('Search')->searchContent($skey, 'page');
         $search_result = $pages;
         // $search_result = array_sort($search_result, 'create_time', 'desc');
         $count = count($search_result);
         list($pagesize, $page_num, $pagestring) = pagestring($count, 10);
         $search_result = array_slice($search_result, ($page_num - 1) * $pagesize, $pagesize);
         $data['replace'] = "<font color='red'>{$skey}</font>";
         $data['pagestring'] = $pagestring;
     } elseif ($stag_id) {
         $ids = M('TagMapping')->where(array('tag_id' => $stag_id))->getField('object_id', true);
         $filter['id'] = array('in', $ids);
         $pages = D('Content')->getPages($filter, 0, 0);
         $count = count($pages);
         $search_result = $pages;
     }
     $data['skey'] = $skey;
     $data['stag_id'] = $stag_id;
     $data['search_result'] = $search_result;
     $data['all_count'] = intval($count);
     $this->assign($data);
     $this->display('search/index');
 }
開發者ID:Germey,項目名稱:SimpleCMS,代碼行數:31,代碼來源:SearchController.class.php

示例3: index

 public function index()
 {
     $type = $this->type;
     $order = $this->_param("order");
     if ($order) {
         $tmp = explode('|', $order);
         if ($this->all_columns[$tmp[0]]['order']) {
             $tmp[0] = $this->all_columns[$tmp[0]]['order'];
         }
         $order = implode(' ', $tmp);
     }
     $filter = array();
     foreach (array_keys($this->all_columns) as $v) {
         $value = trim(htmlspecialchars($this->_get($v)));
         if (!$value) {
             continue;
         }
         $filter[$v] = array('like', '%' . $value . '%');
     }
     $count = D(ucfirst($type) . 'Attachments')->where($filter)->count();
     list($pagesize, $page_num, $this->pagestring) = pagestring($count, 20);
     $this->attachments = D("Attachments")->getModuleAttachments($type, $filter, $page_num, $pagesize, $order);
     // var_dump($attachments);
     $this->display();
 }
開發者ID:Germey,項目名稱:yinxingpm,代碼行數:25,代碼來源:AttachmentAction.class.php

示例4: lists

 public function lists()
 {
     $filter['status'] = '1';
     $count = D('Message')->where($filter)->count();
     list($pagesize, $page_num, $pagestring) = pagestring($count, 10);
     $this->pagestring = $pagestring;
     $this->messages = D('Message')->page($page_num, $pagesize)->where($filter)->order('id desc')->select();
     $this->display();
 }
開發者ID:Germey,項目名稱:SimpleCMS,代碼行數:9,代碼來源:MessageController.class.php

示例5: user_list

 function user_list()
 {
     $this->admin_allowed();
     $group_id = $this->_param("group_id");
     if ($group_id) {
         $group_ids = $group_id;
         $this->assign("group_id", $group_id);
     } else {
         $groups = D("UserGroups")->getTeamGroups($this->login_user['team_id']);
         $group_ids = Utility::GetColumn($groups);
     }
     $users = D("Users")->getGroupUsers($group_ids);
     $count = count($users);
     list($pagesize, $page_num, $pagestring) = pagestring($count, 20);
     $users = D("Users")->getGroupUsers($group_ids, $page_num, $pagesize);
     $this->assign("users", $users);
     $this->assign("pagestring", $pagestring);
     $all_team_groups = D("UserGroups")->getTeamGroups($this->login_user['team_id']);
     $this->assign("groups", $all_team_groups);
     $this->display();
 }
開發者ID:Germey,項目名稱:yinxingpm,代碼行數:21,代碼來源:SettingAction.class.php

示例6: index

 public function index()
 {
     $data['module_maps'] = array('contact_list' => '聯係人列表', 'contact_detail' => '聯係人詳情', 'organization_list' => '機構列表', 'organization_detail' => '機構詳情', 'event_list' => '活動列表', 'event_detail' => '活動詳情', 'home' => '首頁', 'mail_index' => '郵件首頁', 'sms_index' => '短信首頁');
     $raw_users = D("Users")->getGroupUsers($this->login_user['manage_group_ids']);
     foreach ($raw_users as $u) {
         $users[$u['id']] = $u['realname'];
     }
     $data['all_columns'] = array('user_id' => array('display_name' => '用戶', 'type' => 'select', 'options' => $users), 'module' => array('display_name' => '操作模塊', 'type' => 'select', 'options' => $data['module_maps']), 'module_id' => array('display_name' => '關聯ID'), 'ipaddress' => array('display_name' => 'IP Address'), 'extra_data' => array('display_name' => '關聯數據'));
     $data['list_views'] = array('user_id', 'module', 'module_id', 'extra_data', 'ipaddress');
     foreach ($data['list_views'] as $v) {
         $value = trim(htmlspecialchars($this->_get($v)));
         if (!$value) {
             continue;
         }
         $filter[$v] = array('like', '%' . $value . '%');
     }
     $filter['user_group_id'] = array('in', $this->login_user['manage_group_ids']);
     list($pagesize, $page_num, $pagestring) = pagestring(D('AdminVisits')->where($filter)->count(), 20);
     $data['visits'] = D('AdminVisits')->getVisits($filter, $page_num, $pagesize);
     $data['pagestring'] = $pagestring;
     $this->assign($data);
     $this->display();
 }
開發者ID:Germey,項目名稱:yinxingpm,代碼行數:23,代碼來源:VisitAction.class.php

示例7: index

 public function index()
 {
     $data['module_maps'] = array('project' => '資助項目', 'project_status_change' => '資助項目狀態變更', 'project_manager_change' => '資助項目官員更換', 'project_grant_record' => '資助項目撥款記錄', 'partner' => '機構', 'contact_note' => '聯係人備注', 'partner_note' => '活動備注', 'contact_attachment' => '聯係人附件', 'partner_attachment' => '活動附件');
     $raw_users = D("Users")->getGroupUsers($this->login_user['manage_group_ids']);
     foreach ($raw_users as $u) {
         $users[$u['id']] = $u['realname'];
     }
     $data['all_columns'] = array('user_id' => array('display_name' => '用戶', 'type' => 'select', 'options' => $users), 'module' => array('display_name' => '操作模塊', 'type' => 'select', 'options' => $data['module_maps']), 'operation' => array('display_name' => '操作'), 'module_id' => array('display_name' => '關聯ID'), 'module_name' => array('display_name' => '關聯數據'));
     $data['list_views'] = array('user_id', 'module', 'module_id', 'module_name', 'operation');
     foreach ($data['list_views'] as $v) {
         $value = trim(htmlspecialchars($this->_get($v)));
         if (!$value) {
             continue;
         }
         $filter[$v] = array('like', '%' . $value . '%');
     }
     $filter['user_group_id'] = array('in', $this->login_user['manage_group_ids']);
     list($pagesize, $page_num, $pagestring) = pagestring(D('AdminLogs')->where($filter)->count(), 20);
     $data['visits'] = D('AdminLogs')->getAdminLogs($filter, $page_num, $pagesize);
     $data['pagestring'] = $pagestring;
     $this->assign($data);
     $this->display();
 }
開發者ID:Germey,項目名稱:yinxingpm,代碼行數:23,代碼來源:AdminlogAction.class.php

示例8: index

 public function index()
 {
     $filter = null;
     $order = $this->_param("order");
     if ($order) {
         $order = str_replace("|", ' ', $order);
     }
     foreach (array_keys($this->data['all_columns']) as $v) {
         $value = trim(htmlspecialchars($this->_get($v)));
         if (!$value) {
             continue;
         }
         $filter[$v] = array('like', '%' . $value . '%');
     }
     $count = D('Schools')->getSchoolsCount($filter);
     list($pagesize, $page_num, $pagestring) = pagestring($count, 20);
     $schools = D('Schools')->getSchools($filter, $page_num, $pagesize, $order);
     $this->data['schools'] = $schools;
     $this->data['pagestring'] = $pagestring;
     $this->data['school_user_count'] = D('Schools')->getSchoolUserCount(Utility::GetColumn($schools, 'id'));
     $this->assign($this->data);
     D('AdminVisits')->saveVisit('school_list', $page_num);
     $this->display();
 }
開發者ID:Germey,項目名稱:yinxingpm,代碼行數:24,代碼來源:SchoolAction.class.php

示例9: dirname

<?php

/**
 * 我的抽獎列表
 * @author abei <abei1982@qq.com>
 */
require_once dirname(dirname(__FILE__)) . '/app.php';
need_login();
$sql = "SELECT count(a.id) FROM `activity` a,`activity_record` ar WHERE ar.user_id = " . $login_user_id . " AND ar.activity_id = a.id GROUP BY ar.activity_id";
$list = DB::GetQueryResult($sql, false);
list($pagesize, $offset, $pagestring) = pagestring(count($list), 10);
$sql = "SELECT a.title,a.id,a.begin_time,a.end_time,a.state FROM `activity` a,`activity_record` ar WHERE ar.user_id = " . $login_user_id . " AND ar.activity_id = a.id GROUP BY ar.activity_id LIMIT {$offset},{$pagesize}";
$itemList = DB::GetQueryResult($sql, false);
$pagetitle = '我的活動';
include template('account_activity_index');
開發者ID:noikiy,項目名稱:mdwp,代碼行數:15,代碼來源:activity.php

示例10: dirname

<?php

require_once dirname(dirname(__FILE__)) . '/app.php';
need_login(true);
$condition = array('user_id' => $login_user_id, 'team_id > 0');
$selector = strval($_GET['s']);
if ($selector == 'unpay') {
    $condition['state'] = 'unpay';
    $suffix = '_unpay';
} else {
    $condition['state'] = 'pay';
}
$count = Table::Count('order', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 10, true);
$orders = DB::LimitQuery('order', array('condition' => $condition, 'order' => 'ORDER BY id DESC, team_id DESC', 'size' => $pagesize, 'offset' => $offset));
$team_ids = Utility::GetColumn($orders, 'team_id');
$teams = Table::Fetch('team', $team_ids);
foreach ($teams as $tid => $one) {
    team_state($one);
    $teams[$tid] = $one;
}
$pagetitle = '我的訂單';
include template("wap_myorder{$suffix}");
開發者ID:norain2050,項目名稱:zuituware,代碼行數:23,代碼來源:myorder.php

示例11: date

        $cbtime = $team['begin_time'];
    } else {
        //$cbtime = $daytime-86400*7;
    }
    $ocbday = date('Y-m-d H:i:s', $cbtime);
    $condition[] = "consume_time >= '{$cbtime}'";
}
if ($ceday) {
    $cetime = strtotime($ceday);
    $oceday = date('Y-m-d H:i:s', $cetime);
    $condition[] = "consume_time <= '{$cetime}'";
} else {
    $cetime = $daytime;
    $oceday = $ceday = date('Y-m-d H:i:s', $cetime);
    $condition[] = "consume_time <= '{$daytime}'";
}
$condition['consume'] = 'Y';
$condition['doer_id'] = $partner_id;
$condition['team_id'] = $search_team_id;
$count = Table::Count('coupon', $condition);
/* filter */
$sql = "SELECT \r\r\n\tFROM_UNIXTIME(consume_time, '%Y-%m-%d') ts,  \r\r\n\tFROM_UNIXTIME(consume_time, '%w') we, \r\r\n\tcount(id) ids  \r\r\n\tFROM coupon \r\r\n\tWHERE \t\t\r\r\n\t\t`consume_time` >= {$cbtime} \r\r\n\t\tAND `consume_time` < {$cetime} \r\r\n\t\tAND `team_id` = {$search_team_id}  \t\t\r\r\n\t\tAND `doer_id` = {$partner_id} \r\r\n\t\tAND `consume` = 'Y' \r\r\n\t\tAND {$sql_verifytype_str} \r\r\n\tGROUP BY ts";
$coupons = DB::GetQueryResult($sql, false);
$coupons_count = count($coupons);
list($pagesize, $offset, $pagestring) = pagestring($coupons_count, 100);
$sql .= ' LIMIT ' . $offset . ',' . $pagesize;
$coupons = DB::GetQueryResult($sql, false);
$current_store = Table::Fetch('store', $login_partner['store_id']);
//	該店員店鋪所運行的項目
$teams = DB::LimitQuery('team', array('condition' => array('store_ids LIKE "%@' . $login_partner['store_id'] . '@%"')));
include template('biz_coupon_consume_doer');
開發者ID:noikiy,項目名稱:mdwp,代碼行數:31,代碼來源:coupon_consumed_doer.php

示例12: index

 public function index()
 {
     $filter = null;
     $status = $filter['status'] = intval($this->_get('status'));
     $order = $this->_param("order");
     if ($order) {
         $order = str_replace("|", ' ', $order);
     }
     foreach (array_keys($this->data['all_columns']) as $v) {
         $value = trim(htmlspecialchars($this->_get($v)));
         if (!$value) {
             continue;
         }
         $filter["user_info." . $v] = array('like', '%' . $value . '%');
     }
     $count = D('UserInfo')->getUserInfoCount($filter);
     list($pagesize, $page_num, $this->pagestring) = pagestring($count, 20);
     $this->users = D('UserInfo')->getUserInfos($filter, $page_num, $pagesize, $order);
     $this->assign($this->data);
     D('AdminVisits')->saveVisit('userinfo_list', $page_num);
     $this->display('index');
 }
開發者ID:Germey,項目名稱:yinxingpm,代碼行數:22,代碼來源:UserAction.class.php

示例13: mail_invitation

if ($_POST['recipients'] && $_POST['invitation_content']) {
    $emails = $_POST['recipients'];
    ($name = $_POST['real_name']) || ($name = $login_user['username']);
    $content = $_POST['invitation_content'];
    mail_invitation($emails, $content, $name);
    Session::Set('notice', '邀請發送成功');
    redirect(WEB_ROOT . '/account/invite.php');
}
$condition = array('user_id' => $login_user_id, 'credit > 0', 'pay' => 'Y');
$money = Table::Count('invite', $condition, 'credit');
$count = Table::Count('invite', $condition);
$team = current_team($city['id']);
$condition = array('city_id' => array(0, abs(intval($city['id']))), 'team_type' => 'normal', "begin_time <= '{$daytime}'", "end_time > '{$daytime}'", "audit" => 1);
$tcount = Table::Count('team', $condition);
if ($tcount > 1) {
    list($pagesize, $offset, $pagestring) = pagestring($tcount, 6);
    $teams = DB::LimitQuery('team', array('condition' => $condition, 'order' => 'ORDER BY  sort_order DESC, begin_time DESC, id DESC', 'size' => $pagesize, 'offset' => $offset));
    foreach ($teams as $id => $one) {
        team_state($one);
        if (!$one['close_time']) {
            $one['picclass'] = 'isopen';
        }
        if ($one['state'] == 'soldout') {
            $one['picclass'] = 'soldout';
        }
        $one['discount_price'] = $one['market_price'] - $one['team_price'];
        $left = array();
        if ($one['end_time'] < $one['begin_time']) {
            $one['end_time'] = $one['begin_time'];
        }
        $diff_time = $left_time = $one['end_time'] - $now;
開發者ID:hhdem,項目名稱:tuangala_v2,代碼行數:31,代碼來源:invite.php

示例14: get_contents_by_userid

 function get_contents_by_userid($id)
 {
     $id = intval($id);
     $filter['update_user_id|create_user_id'] = $id;
     // $filter['category_id'] = 200;
     $this->current_user = D('User')->field('password', true)->where('id = %d', $filter['update_user_id|create_user_id'])->find();
     $filter['status'] = 2;
     $filter['parent_id'] = array('gt', 0);
     $filter['model_id'] = 1;
     //累積監測
     $this->monitor_total = D('Content')->listCount($filter);
     list($pagesize, $page_num, $pagestring) = pagestring($this->monitor_total);
     $this->pagestring = $pagestring;
     $this->contents = D('Content')->getPages($filter, 0, 0, 'update_time desc', true, false, true);
     //監測點
     $filter['status'] = array('lt', 10);
     $filter['category_id'] = array('gt', 0);
     $filter['parent_id'] = array('gt', 0);
     $filter['create_user_id'] = $id;
     $this->monitor_parent_ids = D('Content')->distinct(true)->field('parent_id, category_id')->where($filter)->select();
     $this->display('article:user_article_lists');
 }
開發者ID:Germey,項目名稱:SimpleCMS,代碼行數:22,代碼來源:ContentController.class.php

示例15: current_partner_sum_money

function current_partner_sum_money($partner_id, $size = 20)
{
    $today = strtotime(date('Y-m-d'));
    $condition = array('partner_id' => $partner_id, "end_time < {$today}", "now_number >= min_number");
    if ($size != 0) {
        $count = Table::Count('team', $condition);
        list($pagesize, $offset, $pagestring) = pagestring($count, 20);
        $teams = DB::LimitQuery('team', array('condition' => $condition, 'order' => 'ORDER BY id DESC', 'offset' => $offset, 'size' => $pagesize));
    } else {
        $teams = DB::LimitQuery('team', array('condition' => $condition, 'order' => 'ORDER BY id DESC'));
    }
    foreach ($teams as $id => $one) {
        $onlinepay = Table::Count('order', array('state' => 'pay', 'team_id' => $one['id']), 'money');
        $creditpay = Table::Count('order', array('state' => 'pay', 'team_id' => $one['id']), 'credit');
        $buycount = Table::Count('order', array('state' => 'pay', 'team_id' => $one['id']), 'quantity');
        /*$c1 = array( 'team_id'=> $$one['id'], );
        		$orders = DB::LimitQuery('order', array(
        			'condition' => $c1,
        		));*/
        $sumonlinepay += $onlinepay;
        $sumcreditpay += $creditpay;
    }
    return $sumonlinepay + $sumcreditpay;
}
開發者ID:hhdem,項目名稱:tuangala_v2,代碼行數:24,代碼來源:common.php


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