<?php
include_once 'config.php';
include_once 'user_head.php';
include_once 'ad_head.php';
include_once 'search_head.php';
include_once 'user_right.php';
include_once 'foot.php';
header ("Content-Type: text/html; charset=UTF-8");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
error_reporting(E_ERROR | E_WARNING | E_PARSE);
$client = new SoapClient($GLOBAL_REMOTE_API);
$xml = '';
//首页轮播
$Show_result = $client->PD_getFactoryShow($xml);
$PD_getFactoryShowResult = $Show_result->PD_getFactoryShowResult;
$PD_getFactoryShowResultArray = json_decode($PD_getFactoryShowResult, TRUE);
//开始解析
$Show_totalCount = $PD_getFactoryShowResultArray[0]['totalCount'];
$Show_success = $PD_getFactoryShowResultArray[0]['success'];
$Show_data = $PD_getFactoryShowResultArray[0]['data'];
$Showhtml = '';
foreach($Show_data as $key=>$d){
$factoryId = $Show_data[$key]['factoryId'];
$picUrl = $Show_data[$key]['picUrl'];
$linkUrl = $Show_data[$key]['linkUrl'];
$linkUrl = ($linkUrl != '') ? $linkUrl : 'store.php?id=' .$factoryId;
$slogan = $Show_data[$key]['slogan'];
$showhtmlArr[] = '
' .$slogan. '
';}
$Showhtml = implode('', $showhtmlArr);
//首页翻滚广告
$adtype = 1;
$ADTypes = array("type"=>$adtype);
$ADList_result = $client->getADList($ADTypes);
$getADListResult = $ADList_result->getADListResult;
$getADListResultArray = json_decode($getADListResult, TRUE);
//开始解析
$ADList_totalCount = $getADListResultArray[0]['totalCount'];
$ADList_success = $getADListResultArray[0]['success'];
$ADList_data = $getADListResultArray[0]['data'];
$ADListhtml = '';
foreach($ADList_data as $key=>$d){
$factoryId = $ADList_data[$key]['factoryId'];
$picUrl = $ADList_data[$key]['picUrl'];
$linkUrl = $ADList_data[$key]['linkUrl'];
$linkUrl = ($linkUrl != '') ? $linkUrl : 'store.php?id=' .$factoryId;
$adlisthtmlArr[] = '
}
$ADListhtml = implode('', $adlisthtmlArr);
//热门厂家
$hotF_result = $client->PD_hotFactory($xml);
$PD_hotFactoryResult = $hotF_result->PD_hotFactoryResult;
$PD_hotFactoryResultArray = json_decode($PD_hotFactoryResult, TRUE);
//开始解析
$hotF_totalCount = $PD_hotFactoryResultArray[0]['totalCount'];
$hotF_success = $PD_hotFactoryResultArray[0]['success'];
$hotF_data = $PD_hotFactoryResultArray[0]['data'];
if ($hotF_totalCount > 0 && $hotF_success == true)
{
$hotFactoryhtml = '';
foreach($hotF_data as $key=>$d){
// $factoryId = $data[$key]['factoryId'];
$factoryName = $hotF_data[$key]['factoryName'];
$factoryId = $hotF_data[$key]['factoryId'];
// $ListPic = $data[$key]['ListPic'];
$hotFactoryhtmlArr[] = '' .$factoryName. '';
}
$hotFactoryhtml = implode('', $hotFactoryhtmlArr);
}
//根据市获取区域列表
$citys = array("city"=>$city);
$getDistrictByCity_result = $client->PD_getDistrictByCity($citys);
$PD_getDistrictByCityResult = $getDistrictByCity_result->PD_getDistrictByCityResult;
$PD_getDistrictByCityResultArray = json_decode($PD_getDistrictByCityResult, TRUE);
//解析区域
$City_totalCount = $PD_getDistrictByCityResultArray[0]['totalCount'];
$City_success = $PD_getDistrictByCityResultArray[0]['success'];
$City_data = $PD_getDistrictByCityResultArray[0]['data'];
//全部区域
$Cityhtml = '';
foreach($City_data as $key=>$d){
$district = $City_data[$key]['district'];
$CityhtmlArr[] = ' ' .$SeriesName. '
$TypeNamehtml = '';
$TypeNamehtmlArr = '';
$ProductTypehtml = implode('', $ProductTypehtmlArr);
}
else{
$ProductTypehtmlArr[] = '
';}
}
$ProductTypehtml = implode('', $ProductTypehtmlArr);
//产品分类
$ProductTypeindexhtml = '';
foreach($ProductType_data as $key=>$d){
$ff = $ProductType_data[0]['SeriesName'];
$sf = $ProductType_data[1]['SeriesName'];
$tf = $ProductType_data[2]['SeriesName'];
$fof = $ProductType_data[3]['SeriesName'];
$ff_id = $ProductType_data[0]['SeriesId'];
$sf_id = $ProductType_data[1]['SeriesId'];
$tf_id = $ProductType_data[2]['SeriesId'];
$fof_id = $ProductType_data[3]['SeriesId'];
}
if($user_id > 0 && $ProxyName == ''){
$right_user = '
}
else if($user_id > 0 && $ProxyName != ''){
$right_user = '
}
else{
$right_user = '
登录 注册';}
//新闻信息展示
$pageIndex=1;
$pageSize=20;
$parms = array("pageIndex"=>$pageIndex,"pageSize"=>$pageSize);
$result = $client->getIndexFInfo($parms);
if(!is_soap_fault($result)) {
//获取用户信息
$getIndexFInfoResult = $result->getIndexFInfoResult;
$getIndexFInfoResultArray = json_decode($getIndexFInfoResult, TRUE);
//开始解析
//获取用户信息
$getIndexFInfo_totalCount = $getIndexFInfoResultArray[0]['totalCount'];
$getIndexFInfo_success = $getIndexFInfoResultArray[0]['success'];
$getIndexFInfo_data = $getIndexFInfoResultArray[0]['data'];
if ($getIndexFInfo_totalCount > 0 && $getIndexFInfo_success == true)
{
$NewsListhtml = '';
foreach($getIndexFInfo_data as $item){
$fId = $item['factoryId'];
$InfoId = $item['InfoId'];
$InfoTitle = $item['InfoTitle'];
$NewsList_htmlArr[] = '
$file = @fopen($filename,"r");
if ($file) {
$contents = @fread($file, filesize($filename));
$contents = str_replace("{\$hotFactoryhtml}", $hotFactoryhtml, $contents);
$contents = str_replace("{\$Showhtml}", $Showhtml, $contents);
$contents = str_replace("{\$ADListhtml}", $ADListhtml, $contents);
$contents = str_replace("{\$NewsListhtml}", $NewsListhtml, $contents);
$contents = str_replace("{\$user_head_html}", $user_head_html, $contents);
$contents = str_replace("{\$Cityhtml}", $Cityhtml, $contents);
$contents = str_replace("{\$ProductTypehtml}", $ProductTypehtml, $contents);
$contents = str_replace("{\$ad_head_html}", $ad_head_html, $contents);
$contents = str_replace("{\$search_head_html}", $search_head_html, $contents);
$contents = str_replace("{\$right_user}", $right_user, $contents);
$contents = str_replace("{\$userright_html}", $userright_html, $contents);
$contents = str_replace("{\$foot_html}", $foot_html, $contents);
$contents = str_replace("{\$1f}", $ff, $contents);
$contents = str_replace("{\$2f}", $sf, $contents);
$contents = str_replace("{\$3f}", $tf, $contents);
$contents = str_replace("{\$4f}", $fof, $contents);
$contents = str_replace("{\$1f_id}", $ff_id, $contents);
$contents = str_replace("{\$2f_id}", $sf_id, $contents);
$contents = str_replace("{\$3f_id}", $tf_id, $contents);
$contents = str_replace("{\$4f_id}", $fof_id, $contents);
echo $contents;
fclose($file);
}
?>
一键复制
编辑
Web IDE
原始数据
按行查看
历史