0) as total_grade, (select count(pc.ask_grade) from product_comment pc where pc.c9web_region_code='$session_current_c9web_region' and pc.deleted=0 and pc.prodcode=p.prodcode and pc.pr_type='ASK' and pc.ask_grade>0) as total_grade_count, pcr.no_of_quote, (select display_name from member where cocode=pcr.monitor_member limit 1) as monitor_member_display_name, pcr.monitor_date, pcr.monitor_price, p.origin from product p inner join product_c9web_region pcr on pcr.prodcode=p.prodcode and pcr.c9web_region_code='$session_current_c9web_region' and pcr.deleted=0 left outer join product_category pc on p.prodcode=pc.prodcode where p.deleted=0 and p.rand_id='$rid'"; $sql_statement_pp = "select cat.section, pc.catcode, p.prodcode, p.brand_name, p.name as product_name, p.barcode, p.descr, p.photo1, p.redirect_rand_id, (select sum(pc.ask_grade) from product_comment pc where pc.c9web_region_code='$session_current_c9web_region' and pc.deleted=0 and pc.prodcode=p.prodcode and pc.pr_type='ASK' and pc.ask_grade>0) as total_grade, (select count(pc.ask_grade) from product_comment pc where pc.c9web_region_code='$session_current_c9web_region' and pc.deleted=0 and pc.prodcode=p.prodcode and pc.pr_type='ASK' and pc.ask_grade>0) as total_grade_count, pcr.no_of_quote, (select display_name from member where cocode=pcr.monitor_member limit 1) as monitor_member_display_name, pcr.monitor_date, pcr.monitor_price, p.origin from product p inner join product_c9web_region pcr on pcr.prodcode=p.prodcode and pcr.c9web_region_code='$session_current_c9web_region' and pcr.deleted=0 inner join product_category pc on p.prodcode=pc.prodcode inner join category cat on cat.catcode=pc.catcode where p.deleted=0 and p.rand_id='$rid'"; if(!($result_pp=cs_query($sql_statement_pp))) sql_error($sql_statement_pp); $info_pp=cs_fetch_array($result_pp); $prodcode=$info_pp[prodcode]; if ($prodcode=="") { $location = "Location: ".DOMAIN; header($location); exit; } $catcode=$info_pp[catcode]; if (strlen($info_pp[section])>0) { $c9section = $info_pp[section]; } // begin no_of_view += 1 if ($start_log_client_info==1 && 1==2) { // spider view do not count $sql_statement_view = "update product set no_of_view=coalesce(no_of_view,0)+1 where prodcode='$prodcode'"; if(!($result_view=cs_query($sql_statement_view))) sql_error($sql_statement_view); $sql_statement_view = "update category set no_of_view=coalesce(no_of_view,0)+1 where catcode= (select catcode from product_category where prodcode='$prodcode' and catcode=category.catcode)"; if(!($result_view=cs_query($sql_statement_view))) sql_error($sql_statement_view); } // end no_of_view += 1 /* $sql_statement_catcode = "select catcode from product_category where prodcode='$prodcode' order by sort limit 1"; if(!($result_catcode=cs_query($sql_statement_catcode))) sql_error($sql_statement_catcode); $info_catcode = cs_fetch_array($result_catcode); $catcode=$info_catcode[catcode]; */ if ($v=="all_q") { $no_of_review_quote = 99999; $no_of_review_ask = 99999; } else { $no_of_review_quote = 5; $no_of_review_ask = 99999; } $brand_name=strip_tags(htmlspecialchars_decode($info_pp[brand_name])); $product_name=strip_tags(htmlspecialchars_decode($info_pp[product_name])); $rand_id=$info_pp[rand_id]; $photo=$info_pp[photo1]; $product_descr=strip_tags(htmlspecialchars_decode($info_pp[descr])); $style=$product_name; $monitor_update=0; $sql_statement_auth = "select monitor_auth from member where cocode='$session_username'"; if(!($result_auth=cs_query($sql_statement_auth))) { $gocommit = -1; sql_error($sql_statement_auth); } $info_auth=cs_fetch_array($result_auth); if ($info_auth[monitor_auth]==1) { $monitor_update=1; } ?>
按此到".$info_path[name]."討論區
"; // end: section discussion ?> "; // ---------------------------------------------- // begin: textlink // ---------------------------------------------- $adcode="TLINK"; include APP_PATH."spr/spr_ad_display.php"; // ---------------------------------------------- // end: textlink // ---------------------------------------------- ?> \"小寧波湯丸xC9Web.com"; } } ?>
商品格價 "; } else { echo ""; } ?>

"; echo "
"; if ($no_of_photo>0) { $displayphoto=$info_pp[photo1]; } echo "
"; ?>
0) { $stars = number_format($info_pp[total_grade]/$info_pp[total_grade_count],2); } for ( $i=1; $i<=floor($stars/10); $i++) { echo ""; } if (floor($stars/10)!=($stars/10)) { echo ""; $i++; } while ($i<=5) { $i++; echo ""; } ?>"; echo $arr_lang[add_photo]; echo " ]
"; } else { echo "[ "; echo ""; echo $arr_lang[add_photo]; echo " ]
"; } } ?>
0) { echo $photo="\"".$brand_name.""; } else { echo $photo = ""; } ?>
='".date('Y-m-d')." 23:59:59.999999' ) or ( cp.publish_date_fr is null and cp.publish_date_to>='".date('Y-m-d')." 23:59:59.999999' )) and cp.coming_soon=0 "; if ($catcode!="") { $sql_statement_campaign_product_c = " and cp.catcode='$shopping_catcode' "; } //$sql_statement_campaign_product .= "order by RANDOM() "; $sql_statement_campaign_product_2 = "order by latest_sort, cp.mdate desc limit $shopping_pp_col "; $sql_statement_campaign_product = $sql_statement_campaign_product_1.$sql_statement_campaign_product_c.$sql_statement_campaign_product_2; if(!($result_campaign_product=cs_query($sql_statement_campaign_product))) sql_error($sql_statement_campaign_product); $sql_cat_num_of_rows=pg_num_rows($result_campaign_product); if ($sql_cat_num_of_rows==0) { // no result, change to display shopping items of other categories $sql_statement_campaign_product = $sql_statement_campaign_product_1.$sql_statement_campaign_product_2; if(!($result_campaign_product=cs_query($sql_statement_campaign_product))) sql_error($sql_statement_campaign_product); } ?> "; } //if ($row%2 == 0) echo ""; echo ""; //if ($row%2 == 1) echo ""; $row++; } echo "
"; if ($sql_cat_num_of_rows>0) { include APP_PATH."path/path_shopping.php"; echo " ( 詳情 )"; } else { echo "購物優惠 : 全部優惠"; echo " ( 詳情 )"; } echo "
"; echo display_shopping_item($info_campaign_product, 2, 1); echo "
"; // end: c9shopping ?>
"; ?> "; ?> 0 and pr.deleted=0 "; // current $sql_statement_all_quotes_current = $sql_statement_all_quotes."order by pr.cdate desc limit 2"; if(!($result_all_quotes_current=cs_query($sql_statement_all_quotes_current))) sql_error($sql_statement_all_quotes_current); $info_all_quotes_current=cs_fetch_array($result_all_quotes_current); $current_sellprx = -1; $current_sellprx = $info_all_quotes_current[sellprx]; $current_region_name = $info_all_quotes_current[region_name]; $current_supplier_coname = $info_all_quotes_current[supplier_coname]; $current_supplier_branch_coname = $info_all_quotes_current[supplier_branch_coname]; $current_cdate = $info_all_quotes_current[cdate]; $current_cuser_name = $info_all_quotes_current[cuser_name]; $current_coaddress = $info_all_quotes_current[coaddress]; $current_remark = $info_all_quotes_current[remark]; $prev_sellprx=-1; $info_all_quotes_current=cs_fetch_array($result_all_quotes_current); $prev_sellprx = $info_all_quotes_current[sellprx]; if ($current_sellprx>0) { echo ""; echo ""; } // end: latest price ?> "; ?> 0 and pr.deleted=0 and pr.cdate>='".date('Y-m-d', strtotime("-3 month"))."' "; // max $sql_statement_all_quotes_max = $sql_statement_all_quotes."order by pr.sellprx desc limit 1"; if(!($result_all_quotes_max=cs_query($sql_statement_all_quotes_max))) sql_error($sql_statement_all_quotes_max); $info_all_quotes_max=cs_fetch_array($result_all_quotes_max); $max_sellprx = $info_all_quotes_max[sellprx]; $max_region_name = $info_all_quotes_max[region_name]; $max_supplier_coname = $info_all_quotes_max[supplier_coname]; $max_supplier_branch_coname = $info_all_quotes_max[supplier_branch_coname]; $max_cdate = $info_all_quotes_max[cdate]; $max_cuser_name = $info_all_quotes_max[cuser_name]; $max_coaddress = $info_all_quotes_max[coaddress]; $max_remark = $info_all_quotes_max[remark]; // min $sql_statement_all_quotes_min = $sql_statement_all_quotes."order by pr.sellprx limit 1"; if(!($result_all_quotes_min=cs_query($sql_statement_all_quotes_min))) sql_error($sql_statement_all_quotes_min); $info_all_quotes_min=cs_fetch_array($result_all_quotes_min); $min_sellprx = $info_all_quotes_min[sellprx]; $min_region_name = $info_all_quotes_min[region_name]; $min_supplier_coname = $info_all_quotes_min[supplier_coname]; $min_supplier_branch_coname = $info_all_quotes_min[supplier_branch_coname]; $min_cdate = $info_all_quotes_min[cdate]; $min_cuser_name = $info_all_quotes_min[cuser_name]; $min_coaddress = $info_all_quotes_min[coaddress]; $min_remark = $info_all_quotes_min[remark]; if ($max_sellprx>=$min_sellprx && $min_sellprx>0) { echo ""; echo ""; echo ""; } // end: max and min price (3 months) echo ""; // begin: max and min price (all history) $sql_statement_all_quotes = "select pr.sellprx, (select name from region where region.c9web_region_code='$session_current_c9web_region' and region.regioncode=pr.regioncode limit 1) as region_name, c.coname as supplier_coname, cb.coname as supplier_branch_coname, pr.cdate, (select display_name from member where member.cocode=pr.cuser limit 1) as cuser_name, pr.coaddress, pr.remark from product_review pr left outer join company c on c.cocode=pr.supplier_cocode and c.deleted=0 left outer join company_branch cb on cb.cocode=pr.supplier_branch_cocode and cb.deleted=0 where pr.c9web_region_code='$session_current_c9web_region' and (pr.prodcode='".$prodcode."' or pr.redirect_prodcode='$prodcode') and pr.sellprx>0 and pr.deleted=0 "; // max $sql_statement_all_quotes_max = $sql_statement_all_quotes."order by pr.sellprx desc limit 1"; if(!($result_all_quotes_max=cs_query($sql_statement_all_quotes_max))) sql_error($sql_statement_all_quotes_max); $info_all_quotes_max=cs_fetch_array($result_all_quotes_max); $max_sellprx = $info_all_quotes_max[sellprx]; $max_region_name = $info_all_quotes_max[region_name]; $max_supplier_coname = $info_all_quotes_max[supplier_coname]; $max_supplier_branch_coname = $info_all_quotes_max[supplier_branch_coname]; $max_cdate = $info_all_quotes_max[cdate]; $max_cuser_name = $info_all_quotes_max[cuser_name]; $max_coaddress = $info_all_quotes_max[coaddress]; $max_remark = $info_all_quotes_max[remark]; // min $sql_statement_all_quotes_min = $sql_statement_all_quotes."order by pr.sellprx limit 1"; if(!($result_all_quotes_min=cs_query($sql_statement_all_quotes_min))) sql_error($sql_statement_all_quotes_min); $info_all_quotes_min=cs_fetch_array($result_all_quotes_min); $min_sellprx = $info_all_quotes_min[sellprx]; $min_region_name = $info_all_quotes_min[region_name]; $min_supplier_coname = $info_all_quotes_min[supplier_coname]; $min_supplier_branch_coname = $info_all_quotes_min[supplier_branch_coname]; $min_cdate = $info_all_quotes_min[cdate]; $min_cuser_name = $info_all_quotes_min[cuser_name]; $min_coaddress = $info_all_quotes_min[coaddress]; $min_remark = $info_all_quotes_min[remark]; if ($max_sellprx>=$min_sellprx && $min_sellprx>0) { echo ""; echo ""; echo ""; } // end: max and min price (all history) echo ""; // begin: product description echo ""; // end: product description echo ""; echo "
0) { echo "".$brand_name." "; }?>
商品條碼 Barcode 0 && $session_usergroup=="AM") { //echo "(original barcode - for admin use only : ".$info_pp[barcode].")"; //} ?>
Enter Barcode "; } ?>
"; echo ""; echo ""; echo $barcode_value; echo ""; echo "
我要加入新商品條碼
我要加入新商品條碼

分享至Facebook 0) { echo ""; echo ""; echo ""; } else { echo ""; } ?>
">


  抵價監察

(由抵價監察大使設定抵買價) 說明 成為抵價監察大使
抵價監察大使: (未有定價)"; else echo $info_pp[monitor_member_display_name]; ?>
定價日期: (未有定價)"; else echo substr($info_pp[monitor_date],0,10); ?>
抵買價: "; echo " "; echo " "; } else { if ($info_pp[monitor_member_display_name]=="") { echo "(未有定價)"; } else { echo $session_current_currency." ".$info_pp[monitor_price]; } } ?>

"; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo "最新報價

"; echo $session_current_currency." ".$current_sellprx; echo ""; if ($monitor_price>0 && $current_sellprx<=$monitor_price) { echo "   "; } if ($current_sellprx>-1 && $prev_sellprx>-1) { echo "
"; if ($current_sellprx < $prev_sellprx) { echo ""; echo ""; echo "$".number_format($prev_sellprx - $current_sellprx,1); echo " (".number_format((($prev_sellprx - $current_sellprx)/$current_sellprx)*100,2)."%)"; } elseif ($current_sellprx > $prev_sellprx) { echo ""; echo ""; echo " $".number_format($current_sellprx - $prev_sellprx,1); echo " (".number_format((($current_sellprx - $prev_sellprx)/$current_sellprx)*100,2)."%)"; } echo "
"; } echo "

"; if (strlen($current_region_name)>0) { echo $arr_lang[region].": "; echo $current_region_name."
"; } if (strlen($current_supplier_coname)>0) { echo $arr_lang[shop].": "; echo $current_supplier_coname."
"; } if (strlen($current_supplier_branch_coname)>0) { echo $arr_lang[branch].": "; echo $current_supplier_branch_coname."
"; } echo $arr_lang[quote_date].": "; echo format_date($current_cdate,1)."
"; echo $arr_lang[quote_member].": "; echo $current_cuser_name."
"; if (strlen($current_coaddress)>0) { echo $arr_lang[address].": "; echo display_pre_content($current_coaddress)."
"; } if (strlen($current_remark)>0) { echo "
"; echo $arr_lang[remark].": ".display_pre_content($current_remark)."
"; echo "
"; } echo "
"; // BEGIN: GRAPH $session_arr_browse[line_title]=$brand_name.$product_name; $sql_statement_product_review = "select product_review.cuser, product_review.odate, sellprx from product_review where pr_type='QUOTE' and c9web_region_code='$session_current_c9web_region' and deleted=0 and (prodcode='$prodcode' or redirect_prodcode='$prodcode') order by cdate desc limit 15"; if(!($result_product_review=cs_query($sql_statement_product_review))) sql_error($sql_statement_product_review); $i=0; $session_arr_browse[y_axis_max]=-1; $session_arr_browse[y_axis_min]=-1; $session_arr_browse[x_axis_label]=array(); $session_arr_browse[x_axis_data]=array(); while ($info_product_review = cs_fetch_array($result_product_review)){ $session_arr_browse[x_axis_label][$i] = date("j M y", mktime(0, 0, 0, substr($info_product_review[odate],5,2), substr($info_product_review[odate],8,2), substr($info_product_review[odate],0,4))); $session_arr_browse[x_axis_data][$i] = $info_product_review[sellprx]+0; if ($i==0) { $y_axis_min = $info_product_review[sellprx]+0; $y_axis_max = $info_product_review[sellprx]+0; } elseif ($info_product_review[sellprx]<$y_axis_min) { $y_axis_min = $info_product_review[sellprx]+0; } if ($info_product_review[sellprx]>=$y_axis_max) { $y_axis_max = $info_product_review[sellprx]+0; } $i++; } if ($i>1 && $y_axis_max>=$y_axis_min) { $session_arr_browse[y_axis_max]=$y_axis_max; $session_arr_browse[y_axis_min]=$y_axis_min; $session_arr_browse[x_axis_label]=array_reverse($session_arr_browse[x_axis_label]); $session_arr_browse[x_axis_data]=array_reverse($session_arr_browse[x_axis_data]); include_once APP_PATH.'includes/graph/php-ofc-library/open_flash_chart_object.php'; open_flash_chart_object( 250, 200, 'http://'. $_SERVER['SERVER_NAME'] .'/product/product_graph_line.php', true, DOMAIN."includes/graph/" ); } // END: GRAPH echo "
"; echo "
"; echo ""; echo "全民格價 (3個月波幅):"; echo "

"; echo $session_current_currency." ".$min_sellprx." - ".$session_current_currency." ".$max_sellprx; echo "
"; include APP_PATH."product/product_min_price.php"; echo ""; include APP_PATH."product/product_max_price.php"; echo "
"; echo ""; echo "全民格價 (歷史波幅):"; echo "

"; echo $session_current_currency." ".$min_sellprx." - ".$session_current_currency." ".$max_sellprx; echo "
"; include APP_PATH."product/product_min_price.php"; echo ""; include APP_PATH."product/product_max_price.php"; echo "
"; if (strlen($info_pp[origin])>0 || strlen($product_descr)>0) { echo ""; if (strlen($brand_name)>0) { echo "".$brand_name." "; } echo "".$product_name." "; echo "

"; if (strlen($info_pp[origin])>0) { echo "原產地: ".$info_pp[origin]."

"; } if (strlen($product_descr)>0) { //echo ""; //echo ""; //echo "
"; //echo ""; echo display_pre_content($product_descr); //echo ""; //echo "
"; echo "
"; } } echo "
"; ?>

各商店最新報價