$cls,"ck_code"=>$cd_key))); $class_result = urldecode(curl_exec($ch)); $class_list=explode("t8+8t",$class_result); curl_close($ch); $row['id']=$class_list[0]; $row['sortname']=$class_list[1]; //丟得類別資料 if($row['id']==""){ toindex(); } $order_link="order=".$_GET['order']."&"; if($_GET['order']=="time_desc"){ $order_str="ORDER BY `sortshow` ASC,`sno` DESC "; }else if($_GET['order']=="time_asc"){ $order_str="ORDER BY `sortshow` ASC,`sno` ASC"; }else if($_GET['order']=="money_desc"){ $order_str="ORDER BY `money` DESC"; }else if($_GET['order']=="money_asc"){ $order_str="ORDER BY `money` ASC"; }else{ $order_link=""; $order_str="ORDER BY `sortshow` ASC,`sno` DESC "; } if(($equipment=="smarty" and $_SESSION['computer_flag']!="true") or ($equipment=="computer" and $_SESSION['mobile_flag']=="true")){ $read_num=10; }else{ $read_num=80; } $moviepage=$_GET['p']; if($moviepage>0){ $page_title_str=" - 第(".$moviepage.")頁"; } $searchLink.=$order_link; $class_title=trim(strip_tags($row['sortname'])); if(empty($moviepage)) $moviepage=1; //丟得產品資料 $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "https://www.sxs.tw/xml/show_data.php"); curl_setopt($ch, CURLOPT_POST, true); // 啟用POST curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //可以使用 result curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query( array( "search_str"=>" and `sortid`='".$cls."' ","order_sql_str"=>$order_str,"moviepage"=>$moviepage,"read_num"=>$read_num,"ck_code"=>$cd_key))); $order_result = urldecode(curl_exec($ch)); $one_order=explode("t8+8t",$order_result); curl_close($ch); $allpage=$one_order[0]; $all_product_str=$one_order[1]; ?> -

"; $i=1; $a_p_n=count($all_product_list=explode("sxstw",$all_product_str)); if($a_p_n>=1){ foreach($all_product_list as $key=>$val){ $o_p_list=explode("ipgotw",$val); if($i%5==1 && $i!=1){ $str.="
"; } $str.="
\"".$o_p_list[1]."\"
".$o_p_list[1]."
特價".$o_p_list[2]."元
"; $i++; } } $str.="
"; echo $str; if($allpage>=2){ echo "
"; if($moviepage>3){ echo "|< "; } for( $i=1;$i<=$allpage ; $i++){ if($i>$moviepage-4 and $i<$moviepage+4){ if($i==$moviepage){ echo "".$i." "; }else{ echo "".$i." "; } } } if($allpage>4 and $moviepage!=$allpage){ echo ">| "; } echo "
"; } ?>
目前分類:
0

熱門商品

=1){ foreach($all_product_list as $key=>$val){ $o_p_list=explode("ipgotw",$val); $sp_money=ceil($o_p_list[2]*1.6); ?>
$  特價$0
=4){ $Bagspagestr=$Bagspagestr."|< "; } if($allpage>=2){ for( $i=1;$i<=$allpage ; $i++){ if($i>$moviepage-3 and $i<$moviepage+3){ if($i==$moviepage){ $Bagspagestr=$Bagspagestr."".$i.""." "; }else{ $Bagspagestr=$Bagspagestr."".$i." "; } } } } if($allpage>=4 and $allpage-$moviepage>2){ $Bagspagestr=$Bagspagestr.">| "; } /**頁籤*/ ?>