2 Star 1 Fork 2

徐子玉 / 品贷网

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
unproxy.php 3.59 KB
一键复制 编辑 原始数据 按行查看 历史
徐子玉 提交于 2017-07-05 11:21 . + pdw
<?php
include_once 'config.php';
include_once 'user_head.php';
include_once 'userinfo_head.php';
include_once 'user_right.php';
include_once 'indent_left.php';
include_once 'sidebar.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);
if ($user_id > 0)
{
$status = isset($_GET["status"]) ? $_GET["status"] : "0";
$client = new SoapClient($GLOBAL_REMOTE_API);
$ProxyApply = array("userProxyId"=>$user_id, "status"=>$status, "pageIndex"=>"1", "pageSize"=>"10");
$ProxyApply_result = $client->CRM_getProxyApply($ProxyApply);
if(!is_soap_fault($ProxyApply_result))
{
$ProxyApplyResult = $ProxyApply_result->CRM_getProxyApplyResult;
$ProxyApplyResultArray = json_decode($ProxyApplyResult, TRUE);
//开始解析
$ProxyApply_totalCount = $ProxyApplyResultArray[0]['totalCount'];
$ProxyApply_success = $ProxyApplyResultArray[0]['success'];
$ProxyApply_data = $ProxyApplyResultArray[0]['data'];
//获取产品列表
$ProxyApplyhtml = '';
$filename = "unproxy_temp.html";
$file = @fopen($filename,"r");
if ($file) {
$contents = @fread($file, filesize($filename));
if(isset($ProxyApply_data)){
foreach($ProxyApply_data as $key=>$p){
// $factoryId = $data[$key]['factoryId'];
$userProxyId = $ProxyApply_data[$key]['userProxyId'];
$userName = $ProxyApply_data[$key]['userName'];
$phoneNumber = $ProxyApply_data[$key]['phoneNumber'];
$email = $ProxyApply_data[$key]['email'];
$address = $ProxyApply_data[$key]['address'];
$state = $ProxyApply_data[$key]['state'];
if($state == 0 ){
$state_html = '<a href="javascript:;" class="chuli_btn" id="tongyi" uid="'.$userProxyId.'">同意</a><a href="javascript:;" class="chuli_btn" id="butongyi" uid="'.$userProxyId.'">不同意</a>';
}
else if($state == 1){
$state_html = '<p>通过</p>';
}
else if($state == 4){
$state_html = '<p>未通过</p>';
}
$ProxyApply_html = str_replace("{\$userName}", $userName, $contents);
$ProxyApply_html = str_replace("{\$phoneNumber}", $phoneNumber, $ProxyApply_html);
$ProxyApply_html = str_replace("{\$email}", $email, $ProxyApply_html);
$ProxyApply_html = str_replace("{\$address}", $address, $ProxyApply_html);
$ProxyApply_html = str_replace("{\$state_html}", $state_html, $ProxyApply_html);
$ProxyApply_htmlArr[] = $ProxyApply_html;
}
}
fclose($file);
}
if(isset($ProxyApply_htmlArr)){
$ProxyApplyhtml = implode('', $ProxyApply_htmlArr);
}
//输出模板
$filename = "unproxy.html";
$file = @fopen($filename,"r");
if ($file) {
$contents = @fread($file, filesize($filename));
$contents = str_replace("{\$ProxyApplyhtml}", $ProxyApplyhtml, $contents);
$contents = str_replace("{\$indentleft_html}", $indentleft_html, $contents);
$contents = str_replace("{\$user_head_html}", $user_head_html, $contents);
$contents = str_replace("{\$userinfo_head_html}", $userinfo_head_html, $contents);
$contents = str_replace("{\$sidebar_html}", $sidebar_html, $contents);
// $contents = str_replace("{\$userright_html}", $userright_html, $contents);
$contents = str_replace("{\$foot_html}", $foot_html, $contents);
echo $contents;
fclose($file);
}
}
}
else
{
header("Location: login.html");
}
?>
1
https://gitee.com/xuqipeter/pdw.git
git@gitee.com:xuqipeter/pdw.git
xuqipeter
pdw
品贷网
master

搜索帮助