source: branches/dev/html/admin/contents/campaign_preview.php @ 17

Revision 17, 1.0 KB checked in by uehara, 17 years ago (diff)
Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7require_once("../require.php");
8
9//---- ¥Ú¡¼¥¸É½¼¨¥¯¥é¥¹
10class LC_Page {
11   
12    function LC_Page() {
13    }
14}
15
16$objPage = new LC_Page();
17$objView = new SC_SiteView(false);
18$objQuery = new SC_Query();
19
20// Àµ¤·¤¯Ãͤ¬¼èÆÀ¤Ç¤­¤Ê¤¤¾ì¹ç¤Ï¥­¥ã¥ó¥Ú¡¼¥óTOP¤Ø
21if($_GET['campaign_id'] == "" || $_GET['status'] == "") {
22    header("location: ".URL_CAMPAIGN_TOP);
23}
24
25// status¤ÎȽÊÌ
26switch($_GET['status']) {
27    case 'active':
28        $status = CAMPAIGN_TEMPLATE_ACTIVE;
29        break;
30    case 'end':
31        $status = CAMPAIGN_TEMPLATE_END;
32        break;
33    default:
34        $status = CAMPAIGN_TEMPLATE_ACTIVE;
35        break;
36}
37
38// ¥Ç¥£¥ì¥¯¥È¥ê̾¤ò¼èÆÀ̾       
39$directory_name = $objQuery->get("dtb_campaign", "directory_name", "campaign_id = ?", array($_GET['campaign_id']));
40
41$template_dir = CAMPAIGN_TEMPLATE_PATH . $directory_name  . "/" . $status . "preview.tpl";
42
43//----¡¡¥Ú¡¼¥¸É½¼¨
44$objView->assignobj($objPage);
45$objView->display($template_dir);
Note: See TracBrowser for help on using the repository browser.