ここの情報は古いです。ご理解頂いた上でお取り扱いください。
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | class portal_page_portal_user_top_ktai extends OpenPNE_Action |
---|
4 | { |
---|
5 | function isSecure() |
---|
6 | { |
---|
7 | return false; |
---|
8 | } |
---|
9 | |
---|
10 | function execute($requests) |
---|
11 | { |
---|
12 | $this->set('SNS_NAME', SNS_NAME); |
---|
13 | $this->set('IS_CLOSED_SNS', IS_CLOSED_SNS); |
---|
14 | |
---|
15 | $top = array(); |
---|
16 | $bottom = array(); |
---|
17 | |
---|
18 | $layout_list = db_portal_layout_ktai_order_by_position(); |
---|
19 | |
---|
20 | foreach ($layout_list as $layout) { |
---|
21 | $pos = $layout['position']; |
---|
22 | $name = $layout['content_name']; |
---|
23 | |
---|
24 | $content = $this->get_contents($name); |
---|
25 | |
---|
26 | if ($pos == 10 || $pos == 11) { |
---|
27 | $top[] = $content; |
---|
28 | } else if($pos == 20 || $pos == 21) { |
---|
29 | $bottom[] = $content; |
---|
30 | } |
---|
31 | } |
---|
32 | |
---|
33 | $this->set('top', $top); |
---|
34 | $this->set('bottom', $bottom); |
---|
35 | |
---|
36 | // inc_entry_point |
---|
37 | $this->set('inc_ktai_entry_point', fetch_inc_entry_point($this->getView(), 'ktai_o_login')); |
---|
38 | |
---|
39 | return 'success'; |
---|
40 | } |
---|
41 | |
---|
42 | function get_contents($name) |
---|
43 | { |
---|
44 | $config = array(); |
---|
45 | |
---|
46 | switch ($name) { |
---|
47 | case 'FREE1': |
---|
48 | $config['contents'] = db_portal_portal_free_area_ktai(1); |
---|
49 | break; |
---|
50 | case 'FREE2': |
---|
51 | $config['contents'] = db_portal_portal_free_area_ktai(2); |
---|
52 | break; |
---|
53 | case 'FREE3': |
---|
54 | $config['contents'] = db_portal_portal_free_area_ktai(3); |
---|
55 | break; |
---|
56 | case 'FREE4': |
---|
57 | $config['contents'] = db_portal_portal_free_area_ktai(4); |
---|
58 | break; |
---|
59 | default: |
---|
60 | $name = null; |
---|
61 | break; |
---|
62 | } |
---|
63 | |
---|
64 | if (!is_null($name)) { |
---|
65 | $config['kind'] = $name; |
---|
66 | } |
---|
67 | |
---|
68 | return $config; |
---|
69 | } |
---|
70 | } |
---|
71 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.
Download in other formats: