2 Star 1 Fork 2

徐子玉 / 品贷网

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
store_info.php 7.02 KB
一键复制 编辑 原始数据 按行查看 历史
徐子玉 提交于 2017-07-05 11:21 . + pdw
<?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);
$id = isset($_GET["id"]) ? $_GET["id"] : "0";
$factoryInfo = array("factoryId"=>$id);
$factoryInfo_result = $client->PD_getFactoryInfoById($factoryInfo);
if(!is_soap_fault($factoryInfo_result))
{
//根据厂商id获取厂商产品类型
$factoryInfoResult = $factoryInfo_result->PD_getFactoryInfoByIdResult;
$factoryInfoResultArray = json_decode($factoryInfoResult, TRUE);
//开始解析
//产品类型
$factoryInfo_totalCount = $factoryInfoResultArray[0]['totalCount'];
$factoryInfo_success = $factoryInfoResultArray[0]['success'];
$factoryInfo_data = $factoryInfoResultArray[0]['data'];
foreach($factoryInfo_data as $i=>$fi){
$Abbreviation = $factoryInfo_data[$i]['Abbreviation'];
$Slogan = $factoryInfo_data[$i]['Slogan'];
$Address = $factoryInfo_data[$i]['Address'];
$Telphone = $factoryInfo_data[$i]['Telphone'];
$Logo = $factoryInfo_data[$i]['Logo'];
$Banner = $factoryInfo_data[$i]['Banner'];
$Email = $factoryInfo_data[$i]['Email'];
$Website = $factoryInfo_data[$i]['Website'];
$HomeAD = $factoryInfo_data[$i]['HomeAD'];
if($HomeAD != ""){
$factoryInfohtml = '<a class="dp-logo" href="store.php?id=' . $id . '"><img src="' . $Logo . '"></a><div class="dp-img"><img src="' . $HomeAD . '"></div>';
}
else{
$factoryInfohtml = '<a class="dp-logo" href="store.php?id=' . $id . '"><img src="' . $Logo . '"></a><div class="dp-img"><img src="images/storedd.png"></div>';
}
$factoryInfoBannerhtml = '<img width="1000" height="350" src="'.$Banner.'">';
$factoryInfoMemohtml = base64_decode($factoryInfo_data[$i]['Memo']);
$factoryAbbreviation = $Abbreviation;
}
$typeCert = 0;
$factoryCertificate = array("factoryId"=>$id, "type"=>$typeCert);
$factoryCertificate_result = $client->PD_getCertificateByFid($factoryCertificate);
$factoryCertificateResult = $factoryCertificate_result->PD_getCertificateByFidResult;
$factoryCertificateResultArray = json_decode($factoryCertificateResult, TRUE);
$factoryCertificate_totalCount = $factoryCertificateResultArray[0]['totalCount'];
$factoryCertificate_success = $factoryCertificateResultArray[0]['success'];
$factoryCertificate_data = $factoryCertificateResultArray[0]['data'];
if ($factoryCertificate_totalCount > 0 && $factoryCertificate_success == true)
{
if ($factoryCertificate_data)
{
foreach($factoryCertificate_data as $i=>$fi){
$picUrl = $factoryCertificate_data[$i]['picUrl'];
$description = $factoryCertificate_data[$i]['description'];
$factoryCartificatehtmlArr[] = '<li><a href="' . $picUrl . '" class="fancybox" rel="gallery" title="' . $description . '"><img src="' . $picUrl . '" /><p>' . $description . '</p></a></li>';
}
$factoryCartificatehtml = implode('', $factoryCartificatehtmlArr);
}
}
$typeShow = 1;
$factoryShow = array("factoryId"=>$id, "type"=>$typeShow);
$factoryShow_result = $client->PD_getCertificateByFid($factoryShow);
$factoryShowResult = $factoryShow_result->PD_getCertificateByFidResult;
$factoryShowResultArray = json_decode($factoryShowResult, TRUE);
$factoryShow_totalCount = $factoryShowResultArray[0]['totalCount'];
$factoryShow_success = $factoryShowResultArray[0]['success'];
$factoryShow_data = $factoryShowResultArray[0]['data'];
if ($factoryShow_totalCount > 0 && $factoryShow_success == true)
{
if ($factoryShow_data)
{
foreach($factoryShow_data as $i=>$fi){
$picUrl = $factoryShow_data[$i]['picUrl'];
$description = $factoryShow_data[$i]['description'];
$factoryShowhtmlArr[] = '<li><a href="' . $picUrl . '" class="fancybox" rel="gallery" title="' . $description . '"><img src="' . $picUrl . '" /><p>' . $description . '</p></a></li>';
}
$factoryShowhtml = implode('', $factoryShowhtmlArr);
}
}
//获取商品标题
$pageIndex=1;
$pageSize=20;
$getFactoryInfo=array("factoryId"=>$id,"pageIdex"=>$pageIndex,"pageSize"=>$pageSize);
$getFactoryInfo_result = $client->PD_getFactoryInfo($getFactoryInfo);
$getFactoryInfoResult = $getFactoryInfo_result->PD_getFactoryInfoResult;
$getFactoryInfoResultArray = json_decode($getFactoryInfoResult, TRUE);
$getFactoryInfo_totalCount = $getFactoryInfoResultArray[0]['totalCount'];
$getFactoryInfo_success = $getFactoryInfoResultArray[0]['success'];
$getFactoryInfo_data = $getFactoryInfoResultArray[0]['data'];
if ($getFactoryInfo_totalCount > 0 && $getFactoryInfo_success == true)
{
if ($getFactoryInfo_data)
{
$getFactoryInfohtmlArr[] = '<ul>';
foreach($getFactoryInfo_data as $item){
$recordCount = $item['recordCount'];
$InfoId = $item['InfoId'];
$InfoTitle = $item['InfoTitle'];
$AddDate = $item['AddDate'];
$getFactoryInfohtmlArr[]='<li><a href="store_newspage.php?factoryId=' . $id . '&id=' . $InfoId . '">' . $InfoTitle . '</a></li>';
}
$getFactoryInfohtmlArr[] = '</ul>';
$getFactoryInfohtml = implode('', $getFactoryInfohtmlArr);
}
}
else {
$getFactoryInfohtml = '<ul><li><a href="store_info.php?id=' . $id . '">没有更多内容.</a></li></ul>';
}
//输出模板
$filename = "store_info.html";
$file = @fopen($filename,"r");
if ($file) {
$contents = @fread($file, filesize($filename));
$contents = str_replace("{\$factoryId}", $id, $contents);
$contents = str_replace("{\$userId}", $user_id, $contents);
$contents = str_replace("{\$factoryAbbreviation}", $factoryAbbreviation, $contents);
$contents = str_replace("{\$factoryInfohtml}", $factoryInfohtml, $contents);
$contents = str_replace("{\$factoryInfoBannerhtml}", $factoryInfoBannerhtml, $contents);
$contents = str_replace("{\$factoryInfoMemohtml}", $factoryInfoMemohtml, $contents);
$contents = str_replace("{\$factoryCartificatehtml}", $factoryCartificatehtml, $contents);
$contents = str_replace("{\$getFactoryInfohtml}", $getFactoryInfohtml, $contents);
$contents = str_replace("{\$user_head_html}", $user_head_html, $contents);
$contents = str_replace("{\$ad_head_html}", $ad_head_html, $contents);
$contents = str_replace("{\$search_head_html}", $search_head_html, $contents);
$contents = str_replace("{\$userright_html}", $userright_html, $contents);
$contents = str_replace("{\$foot_html}", $foot_html, $contents);
$contents = str_replace("{\$factoryShowhtml}", $factoryShowhtml, $contents);
echo $contents;
fclose($file);
}
}
?>
1
https://gitee.com/xuqipeter/pdw.git
git@gitee.com:xuqipeter/pdw.git
xuqipeter
pdw
品贷网
master

搜索帮助