7 Star 19 Fork 7

王东祥/HongYuDSC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
affiliate.php 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
鸿宇科技 提交于 2018-03-02 02:43 . Initial commit
<?php
//zend by QQ:1527200768 鸿宇科技 禁止倒卖 一经发现停止任何服务
define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
if ((DEBUG_MODE & 2) != 2) {
$smarty->caching = true;
}
require ROOT_PATH . '/includes/lib_area.php';
$display_mode = (empty($_GET['display_mode']) ? 'javascript' : $_GET['display_mode']);
if ($display_mode == 'javascript') {
$charset_array = array('UTF8', 'GBK', 'gbk', 'utf8', 'GB2312', 'gb2312');
if (!in_array($charset, $charset_array)) {
$charset = 'UTF8';
}
header('content-type: application/x-javascript; charset=' . ($charset == 'UTF8' ? 'utf-8' : $charset));
}
$cache_id = sprintf('%X', crc32($_SERVER['QUERY_STRING']));
$goodsid = intval($_GET['gid']);
$userid = intval($_GET['u']);
$type = intval($_GET['type']);
$tpl = ROOT_PATH . DATA_DIR . '/affiliate.html';
if (!$smarty->is_cached($tpl, $cache_id)) {
$time = gmtime();
$goods_url = $ecs->url() . 'goods.php?u=' . $userid . '&id=';
$goods = get_goods_info($goodsid);
$goods['goods_thumb'] = (strpos($goods['goods_thumb'], 'http://') === false) && (strpos($goods['goods_thumb'], 'https://') === false) ? $ecs->url() . $goods['goods_thumb'] : $goods['goods_thumb'];
$goods['goods_img'] = (strpos($goods['goods_img'], 'http://') === false) && (strpos($goods['goods_img'], 'https://') === false) ? $ecs->url() . $goods['goods_img'] : $goods['goods_img'];
$goods['shop_price'] = price_format($goods['shop_price']);
$smarty->assign('goods', $goods);
$smarty->assign('userid', $userid);
$smarty->assign('type', $type);
$smarty->assign('url', $ecs->url());
$smarty->assign('goods_url', $goods_url);
}
$output = $smarty->fetch($tpl, $cache_id);
$output = str_replace("\r", '', $output);
$output = str_replace("\n", '', $output);
if ($display_mode == 'javascript') {
echo 'document.write(\'' . $output . '\');';
}
else if ($display_mode == 'iframe') {
echo $output;
}
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/doney/HongYuDSC.git
git@gitee.com:doney/HongYuDSC.git
doney
HongYuDSC
HongYuDSC
master

搜索帮助