table('hs_room') . ' WHERE enable=1 and hs_id= '.$site_id; $rooms = $GLOBALS['db']->getAll($sql); $site_name=$GLOBALS['db']->getOne("SELECT cname FROM ".$GLOBALS['ecs']->table('hs_web')." WHERE hs_id=".$site_id); $smarty->assign('title',$site_name."-服務項目"); $smarty->assign('rooms',$rooms); $smarty->display('room.html'); } /*------------------------------------------------------ */ //-- 拍卖商品 --> 出价 /*------------------------------------------------------ */ elseif ($_REQUEST['act'] == 'view') { assign_template(); // assign_dynamic('room'); $sql = 'SELECT * ' . ' FROM ' . $GLOBALS['ecs']->table('hs_room') . ' WHERE id= '.$_REQUEST['id']. ' LIMIT 1'; $room = $GLOBALS['db']->getRow($sql); $smarty->assign('room',$room); $sql = 'SELECT * ' . ' FROM ' . $GLOBALS['ecs']->table('rm_gallery') . ' WHERE rm_id= '.$_REQUEST['id']. ' Order by img_desc '; $rm_gallery = $GLOBALS['db']->getAll($sql); $smarty->assign('rm_gallery_list',$rm_gallery); $site_name=$GLOBALS['db']->getOne("SELECT cname FROM ".$GLOBALS['ecs']->table('hs_web')." WHERE hs_id=".$site_id); $smarty->assign('title',$site_name."-服務項目-".$room['name']); $smarty->display('in_room.html'); }