[8] | 1 | <?php |
---|
| 2 | /* |
---|
[17] | 3 | * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved. |
---|
[8] | 4 | * |
---|
| 5 | * http://www.lockon.co.jp/ |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | require_once("../require.php"); |
---|
| 9 | |
---|
| 10 | class 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 | // ´ÉÍý¥Ú¡¼¥¸¤«¤é¤Î³Îǧ¤Î¾ì¹ç¤Ï¡¢Èó¸ø³«¤Î¾¦Éʤâɽ¼¨¤¹¤ë¡£ |
---|
| 22 | if($_GET['admin'] == 'on') { |
---|
| 23 | $where = "del_flg = 0"; |
---|
| 24 | } else { |
---|
| 25 | $where = "del_flg = 0 AND status = 1"; |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | // ÃͤÎÀµÅöÀ¥Á¥§¥Ã¥¯ |
---|
| 29 | if(!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 | |
---|
| 40 | list($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 | ?> |
---|