source: temp/trunk/html/admin/design/upload.php @ 10341

Revision 10341, 2.2 KB checked in by uehara, 20 years ago (diff)
Line 
1<?php
2/*
3 * Copyright(c) 2000-2006 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7require_once("../../require.php");
8
9class LC_Page {
10
11    function LC_Page() {
12        $this->tpl_mainpage = 'design/upload.tpl';
13        $this->tpl_subnavi = 'design/subnavi.tpl';
14        $this->tpl_subno = 'template';
15        $this->tpl_subno_template = 'upload';
16        $this->tpl_mainno = "design";
17        $this->tpl_subtitle = '¥¢¥Ã¥×¥í¡¼¥É';
18        $this->template_name = '¥¢¥Ã¥×¥í¡¼¥É';
19    }
20}
21
22$objPage = new LC_Page();
23$objView = new SC_AdminView();
24$objSess = new SC_Session();
25
26// ǧ¾Ú²ÄÈݤÎȽÄê
27$objSess = new SC_Session();
28sfIsSuccess($objSess);
29
30// ¥Õ¥¡¥¤¥ë´ÉÍý¥¯¥é¥¹
31$objUpFile = new SC_UploadFile(IMAGE_TEMP_DIR, IMAGE_SAVE_DIR);
32// ¥Õ¥¡¥¤¥ë¾ðÊó¤Î½é´ü²½
33lfInitFile();
34// ¥Ñ¥é¥á¡¼¥¿´ÉÍý¥¯¥é¥¹
35$objFormParam = new SC_FormParam();
36// ¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
37lfInitParam();
38
39switch($_POST['mode']) {
40case 'upload':
41    $objFormParam->setParam($_POST);
42    $objPage->arrErr = lfErrorCheck();
43    break;
44default:
45    break;
46}
47// ²èÌ̤Îɽ¼¨
48$objPage->arrForm = $objFormParam->getFormParamList();
49$objView->assignobj($objPage);
50$objView->display(MAIN_FRAME);
51
52//---------------------------------------------------------------------------------------------------------------------------------------------------------
53
54/*
55 * ´Ø¿ô̾¡§lfInitFile()
56 * ÀâÌÀ¡¡¡§¥Õ¥¡¥¤¥ë¾ðÊó¤Î½é´ü²½
57 */
58function lfInitFile() {
59    global $objUpFile;
60
61    $objUpFile->addFile("¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë", 'template_file', array('tar.gz', 'tgz', 'tar.bz2'), TEMPLATE_SIZE, true, 0, 0, false);
62}
63
64/*
65 * ´Ø¿ô̾¡§lfInitParam()
66 * ÀâÌÀ¡¡¡§¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
67 */
68function lfInitParam() {
69    global $objFormParam;
70       
71    $objFormParam->addParam("¥Æ¥ó¥×¥ì¡¼¥È¥³¡¼¥É", "template_code", STEXT_LEN, "KVa", array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
72    $objFormParam->addParam("¥Æ¥ó¥×¥ì¡¼¥È̾", "template_name", STEXT_LEN, "KVa", array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
73}
74
75/*
76 * ´Ø¿ô̾¡§lfErrorCheck()
77 * ÀâÌÀ¡¡¡§¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
78 */
79function lfErrorCheck() {
80
81    global $objQuery;
82    global $objFormParam;
83   
84    $arrRet = $objFormParam->getHashArray();
85    $objErr = new SC_CheckError($_POST);
86    $objErr->arrErr = $objFormParam->checkError();
87
88    return $objErr->arrErr;
89}
Note: See TracBrowser for help on using the repository browser.