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

Revision 10331, 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    $objPage->arrErr = lfErrorCheck();
42    break;
43default:
44    break;
45}
46// ²èÌ̤Îɽ¼¨
47$objPage->arrForm = $objFormParam->getFormParamList();
48$objView->assignobj($objPage);
49$objView->display(MAIN_FRAME);
50
51//---------------------------------------------------------------------------------------------------------------------------------------------------------
52
53/*
54 * ´Ø¿ô̾¡§lfInitFile()
55 * ÀâÌÀ¡¡¡§¥Õ¥¡¥¤¥ë¾ðÊó¤Î½é´ü²½
56 */
57function lfInitFile() {
58    global $objUpFile;
59
60    $objUpFile->addFile("¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë", 'template_file', array('tar.gz', 'tgz', 'tar.bz2'), TEMPLATE_SIZE, true, 0, 0, false);
61}
62
63/*
64 * ´Ø¿ô̾¡§lfInitParam()
65 * ÀâÌÀ¡¡¡§¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
66 */
67function lfInitParam() {
68    global $objFormParam;
69       
70    $objFormParam->addParam("¥Æ¥ó¥×¥ì¡¼¥È¥³¡¼¥É", "template_code", STEXT_LEN, "KVa", array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
71    $objFormParam->addParam("¥Æ¥ó¥×¥ì¡¼¥È̾", "template_name", STEXT_LEN, "KVa", array("EXIST_CHECK","SPTAB_CHECK","MAX_LENGTH_CHECK"));
72}
73
74/*
75 * ´Ø¿ô̾¡§lfErrorCheck()
76 * ÀâÌÀ¡¡¡§¥Ñ¥é¥á¡¼¥¿¾ðÊó¤Î½é´ü²½
77 */
78function lfErrorCheck() {
79
80    global $objQuery;
81    global $objFormParam;
82   
83    $arrRet = $objFormParam->getHashArray();
84    $objErr = new SC_CheckError($arrRet);
85    $objErr->arrErr = $objFormParam->checkError();
86
87    return $objErr->arrErr;
88}
Note: See TracBrowser for help on using the repository browser.