source: branches/comu/html/mobile/guide/kiyaku.php @ 11982

Revision 11982, 1.6 KB checked in by uehara, 17 years ago (diff)
  • Property svn:eol-style set to native
Line 
1<?php
2/**
3 *
4 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
5 *
6 * http://www.lockon.co.jp/
7 *
8 *
9 * ¥â¥Ð¥¤¥ë¥µ¥¤¥È/¤´ÍøÍѵ¬Ìó
10 */
11
12require_once('../require.php');
13
14class LC_Page {
15    function LC_Page() {
16        /** ɬ¤ºÊѹ¹¤¹¤ë **/
17        $this->tpl_mainpage = 'guide/kiyaku.tpl';   // ¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È
18        $this->tpl_title = '¤´ÍøÍѵ¬Ìó';
19    }
20}
21
22$objPage = new LC_Page();
23
24// ¥ì¥¤¥¢¥¦¥È¥Ç¥¶¥¤¥ó¤ò¼èÆÀ
25$objPage = sfGetPageLayout($objPage, false, DEF_LAYOUT);
26
27// ÍøÍѵ¬Ìó¤ò¼èÆÀ¤¹¤ë¡£
28lfGetKiyaku(intval(@$_GET['page']), $objPage);
29
30$objView = new SC_MobileView();
31$objView->assignobj($objPage);
32$objView->display(SITE_FRAME);
33
34//-----------------------------------------------------------------------------------------------------------------------------------
35
36/**
37 * ÍøÍѵ¬Ìó¤ò¼èÆÀ¤·¡¢¥Ú¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È¤Ë³ÊǼ¤¹¤ë¡£
38 *
39 * @param integer $index µ¬Ìó¤Î¥¤¥ó¥Ç¥Ã¥¯¥¹
40 * @param object &$objPage ¥Ú¡¼¥¸¥ª¥Ö¥¸¥§¥¯¥È
41 * @return void
42 */
43function lfGetKiyaku($index, &$objPage)
44{
45    $objQuery = new SC_Query();
46    $objQuery->setorder('rank DESC');
47    $arrRet = $objQuery->select('kiyaku_title, kiyaku_text', 'dtb_kiyaku', 'del_flg <> 1');
48
49    $number = count($arrRet);
50    if ($number > 0) {
51        $last = $number - 1;
52    } else {
53        $last = 0;
54    }
55
56    if ($index < 0) {
57        $index = 0;
58    } elseif ($index > $last) {
59        $index = $last;
60    }
61
62    $objPage->tpl_kiyaku_title = @$arrRet[$index]['kiyaku_title'];
63    $objPage->tpl_kiyaku_text = @$arrRet[$index]['kiyaku_text'];
64    $objPage->tpl_kiyaku_index = $index;
65    $objPage->tpl_kiyaku_last_index = $last;
66    $objPage->tpl_kiyaku_is_first = $index <= 0;
67    $objPage->tpl_kiyaku_is_last = $index >= $last;
68}
69?>
Note: See TracBrowser for help on using the repository browser.