source: branches/comu-utf8/html/products/detail_image.php @ 15099

Revision 15099, 1.5 KB checked in by Yammy, 17 years ago (diff)

UTF-8変換済みファイルインポート
1.3.4ベース

Line 
1<?php
2/*
3 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
4 *
5 * http://www.lockon.co.jp/
6 */
7
8require_once("../require.php");
9
10class LC_Page {
11    function LC_Page() {
12        /** 必ず指定する **/
13        $this->tpl_mainpage = 'products/detail_image.tpl';          // メインテンプレート
14    }
15}
16
17$objPage = new LC_Page();
18$objView = new SC_SiteView();
19$objCartSess = new SC_CartSession("", false);
20
21// 管理ページからの確認の場合は、非公開の商品も表示する。
22if($_GET['admin'] == 'on') {
23    $where = "del_flg = 0";
24} else {
25    $where = "del_flg = 0 AND status = 1";
26}
27
28// 値の正当性チェック
29if(!sfIsInt($_GET['product_id']) || !sfIsRecord("dtb_products", "product_id", $_GET['product_id'], $where)) {
30    sfDispSiteError(PRODUCT_NOT_FOUND);
31}
32
33
34$image_key = $_GET['image'];
35
36$objQuery = new SC_Query();
37$col = "name, $image_key";
38$arrRet = $objQuery->select($col, "dtb_products", "product_id = ?", array($_GET['product_id']));
39
40list($width, $height) = getimagesize(IMAGE_SAVE_DIR . $arrRet[0][$image_key]);
41$objPage->tpl_width = $width;
42$objPage->tpl_height = $height;
43
44$objPage->tpl_table_width = $objPage->tpl_width + 20;
45$objPage->tpl_table_height = $objPage->tpl_height + 20;
46
47$objPage->tpl_image = $arrRet[0][$image_key];
48$objPage->tpl_name = $arrRet[0]['name'];
49
50$objView->assignobj($objPage);
51$objView->display($objPage->tpl_mainpage);
52//-----------------------------------------------------------------------------------------------------------------------------------
53?>
Note: See TracBrowser for help on using the repository browser.