source: branches/feature-module-combz/data/downloads/module/mdl_combz/mdl_combz.php @ 16603

Revision 16603, 2.7 KB checked in by naka, 15 years ago (diff)

コンビーズ中間アップ

Line 
1<?php
2/**
3 *
4 * @copyright    2000-2007 LOCKON CO.,LTD. All Rights Reserved.
5 * @version CVS: $Id: 1.0 2006-06-04 06:38:01Z kakinaka $
6 * @link        http://www.lockon.co.jp/
7 *
8 */
9require_once(MODULE_PATH . "mdl_combz/mdl_combz.inc");
10
11//¥Ú¡¼¥¸´ÉÍý¥¯¥é¥¹
12class LC_Page {
13    //¥³¥ó¥¹¥È¥é¥¯¥¿
14    function LC_Page() {
15        //¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È¤Î»ØÄê
16        $this->tpl_mainpage = MODULE_PATH . 'mdl_combz/mdl_combz.tpl';
17        $this->tpl_subtitle = MODULE_NAME;
18    }
19}
20$objPage = new LC_Page();
21$objView = new SC_AdminView();
22$objQuery = new SC_Query();
23
24// ǧ¾Ú³Îǧ
25$objSess = new SC_Session();
26sfIsSuccess($objSess);
27
28// ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹
29$objFormParam = new SC_FormParam();
30$objFormParam = lfInitParam($objFormParam);
31// POSTÃͤμèÆÀ
32$objFormParam->setParam($_POST);
33
34// ÈÆÍѹàÌܤòÄɲÃ(ɬ¿Ü¡ª¡ª)
35sfAlterMemo();
36
37switch($_POST['mode']) {
38case 'edit':
39    // ÆþÎÏ¥¨¥é¡¼È½Äê
40    $objPage->arrErr = lfCheckError();
41   
42    // ¥¨¥é¡¼¤Ê¤·¤Î¾ì¹ç¤Ë¤Ï¥Ç¡¼¥¿¤ò¹¹¿·   
43    if(count($objPage->arrErr) == 0) {
44        // ¥Ç¡¼¥¿¹¹¿·
45        sfSetModuleDB(MODULE_ID, $objFormParam);
46        // javascript¼Â¹Ô
47        $objPage->tpl_onload = 'alert("ÅÐÏ¿´°Î»¤·¤Þ¤·¤¿¡£"); window.close();';
48    }
49   
50    break;
51case 'module_del':
52    // ÈÆÍѹàÌܤθºß¥Á¥§¥Ã¥¯
53    if(sfColumnExists("dtb_payment", "memo01")){
54        // ¥Ç¡¼¥¿¤Îºï½ü¥Õ¥é¥°¤ò¤¿¤Æ¤ë
55        $objQuery->query("UPDATE dtb_payment SET del_flg = 1 WHERE module_id = ?", array(MDL_COMBZ_ID));
56    }
57    break;
58default:
59    // ¥Ç¡¼¥¿¤Î¥í¡¼¥É
60    lfLoadData();   
61    break;
62}
63
64$objPage->arrForm = $objFormParam->getFormParamList();
65
66$objView->assignobj($objPage);                    //ÊÑ¿ô¤ò¥Æ¥ó¥×¥ì¡¼¥È¤Ë¥¢¥µ¥¤¥ó¤¹¤ë
67$objView->display($objPage->tpl_mainpage);        //¥Æ¥ó¥×¥ì¡¼¥È¤Î½ÐÎÏ
68//-------------------------------------------------------------------------------------------------------
69/* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */
70function lfInitParam($objFormParam) {
71    $objFormParam->addParam("ȯ¹Ô¼ÔID", "pubid", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "SPTAB_CHECK"));   
72    $objFormParam->addParam("¥Ñ¥¹¥ï¡¼¥É", "pw", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "SPTAB_CHECK"));
73    $objFormParam->addParam("¥á¥ë¥Þ¥¬ID", "magid", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "SPTAB_CHECK")); 
74    return $objFormParam;
75}
76
77// ¥¨¥é¡¼¥Á¥§¥Ã¥¯¤ò¹Ô¤¦
78function lfCheckError(){
79    global $objFormParam;
80    $arrErr = $objFormParam->checkError();
81    return $arrErr;
82}
83
84// ÅÐÏ¿¥Ç¡¼¥¿¤òÆɤ߹þ¤à
85function lfLoadData(){
86    global $objFormParam;
87    //¥Ç¡¼¥¿¤ò¼èÆÀ
88    $arrRet = sfGetModuleDB(MODULE_ID);
89    // Ãͤò¥»¥Ã¥È
90    $objFormParam->setParam($arrRet);
91}
92?>
Note: See TracBrowser for help on using the repository browser.