source: branches/beta/data/downloads/module/ebis_tag.php @ 17

Revision 17, 2.0 KB checked in by uehara, 16 years ago (diff)
Line 
1<?php
2/**
3 *
4 * @copyright   2000-2007 LOCKON CO.,LTD. All Rights Reserved.
5 * @version CVS: $Id: ebis_tag.php 7224 2006-11-19 06:38:01Z kakinaka $
6 * @link        http://www.lockon.co.jp/
7 *
8 */
9
10require_once("../../require.php");
11
12//¥Ú¡¼¥¸´ÉÍý¥¯¥é¥¹
13class LC_Page {
14    //¥³¥ó¥¹¥È¥é¥¯¥¿
15    function LC_Page() {
16        //¥á¥¤¥ó¥Æ¥ó¥×¥ì¡¼¥È¤Î»ØÄê
17        $this->tpl_mainpage = MODULE_PATH . 'ebis_tag.tpl';
18        $this->tpl_subtitle = 'EBiS¥¿¥°Ëä¤á¹þ¤ßµ¡Ç½';
19    }
20}
21$objPage = new LC_Page();
22$objView = new SC_AdminView();
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
34switch($_POST['mode']) {
35case 'edit':
36    // ÆþÎÏ¥¨¥é¡¼È½Äê
37    $objPage->arrErr = $objFormParam->checkError();
38    if(count($objPage->arrErr) == 0) {
39        $arrRet = $objFormParam->getHashArray();
40        $sqlval['sub_data'] = serialize($arrRet);
41        $objQuery = new SC_Query();
42        $objQuery->update("dtb_module", $sqlval, "module_id = ?", array(EBIS_TAG_MID));
43        // javascript¼Â¹Ô
44        $objPage->tpl_onload = "window.close();";
45    }
46    break;
47default:
48    $arrRet = $objQuery->select("sub_data", "dtb_module", "module_id = ?", array(EBIS_TAG_MID));
49    $arrSubData = unserialize($arrRet[0]['sub_data']);
50    $objFormParam->setParam($arrSubData);
51    break;
52}
53
54$objPage->arrForm = $objFormParam->getFormParamList();
55$objView->assignobj($objPage);      //ÊÑ¿ô¤ò¥Æ¥ó¥×¥ì¡¼¥È¤Ë¥¢¥µ¥¤¥ó¤¹¤ë
56$objView->display($objPage->tpl_mainpage);      //¥Æ¥ó¥×¥ì¡¼¥È¤Î½ÐÎÏ
57//-------------------------------------------------------------------------------------------------------
58/* ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½ */
59function lfInitParam($objFormParam) {
60    $objFormParam->addParam("¥æ¡¼¥¶ID", "user", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
61    $objFormParam->addParam("¥Ñ¥¹¥ï¡¼¥É", "pass", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
62    $objFormParam->addParam("¥¿¥°¼±ÊÌID", "cid", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
63    return $objFormParam;
64}
65?>
Note: See TracBrowser for help on using the repository browser.