PageRenderTime 17ms CodeModel.GetById 13ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/webapp/modules/pc/page/c_member_list.php

https://github.com/openpne/OpenPNE2
PHP | 51 lines | 31 code | 11 blank | 9 comment | 1 complexity | d1da378346eff6963eb065bfc0a000fb MD5 | raw file
 1<?php
 2/**
 3 * @copyright 2005-2008 OpenPNE Project
 4 * @license   http://www.php.net/license/3_01.txt PHP License 3.01
 5 */
 6
 7class pc_page_c_member_list extends OpenPNE_Action
 8{
 9    function execute($requests)
10    {
11        $u = $GLOBALS['AUTH']->uid();
12
13        // --- リクエスト変数
14        $target_c_commu_id = $requests['target_c_commu_id'];
15        $page = $requests['page'];
16        // ----------
17
18        $this->set('inc_navi', fetch_inc_navi("c", $target_c_commu_id));
19
20        //メンバー情報
21        $this->set("member", db_member_c_member4c_member_id($u));
22
23        //コミュニティID
24        $this->set("c_commu_id", $target_c_commu_id);
25        $this->set("c_commu", db_commu_c_commu4c_commu_id($target_c_commu_id));
26        $this->set("c_commu_num", db_commu_count_c_commu_member_list4c_commu_id($target_c_commu_id));
27
28        $page_size = 50;
29
30        //コミュニティメンバーリスト
31        list($c_member_list, $is_prev, $is_next, $total_num, $start_num, $end_num)
32            = db_commu_c_members4c_commu_id($target_c_commu_id, $page_size, $page);
33
34        $this->set("c_member_list", $c_member_list);
35        $this->set("is_prev", $is_prev);
36        $this->set("is_next", $is_next);
37        $this->set("page", $page);
38        $this->set("total_num", $total_num);
39        $this->set('start_num', $start_num);
40        $this->set('end_num', $end_num);
41
42        for ($i=1; $i <= ceil($total_num / $page_size); $i++) {
43            $page_num[] = $i;
44        }
45        $this->set("page_num", $page_num);
46
47        return 'success';
48    }
49}
50
51?>