Commit 530386e9 authored by 杨培's avatar 杨培

Merge remote-tracking branch 'origin/master'

parents 3afa8154 eaf79a6d
.idea
/e/data
/e/data/dbcache
/e/data/fc
/e/data/filecache
/e/data/html
/e/data/LoadTemp
/e/data/tmp
/testdata
/d
/build/
......@@ -16,4 +21,7 @@
/t
/changshang
index.html
!/appdownload/index.html
/init.zip
/composer.json
/composer.lock
This diff is collapsed.
@charset "utf-8";
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/*Html5*/
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
audio,
canvas,
video {
display: inline-block;
}
audio:not([controls]) {
display: none;
height: 0;
}
/*Base*/
html {
font-family: "-apple-system-font","Microsoft YaHei","Helvetica Neue","Hiragino Sans GB","\9ED1\4F53",Arial,sans-serif;
color: #666;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%; /*修正手持设备字体变化*/
}
* {
margin: 0;
padding: 0;
}
a {
text-decoration: none;
background: transparent; /*修正win8系统IE连接灰色背景*/
outline:none;
blr:expression(this.onFocus=this.blur());
}
a:focus {
outline: thin dotted;
-webkit-tap-highlight-color: transparent;
}
a:active,
a:hover {
outline: 0;
-webkit-tap-highlight-color: transparent;
/*transition:text-shadow 500ms ease-in 0ms, color 500ms ease-in 0ms;*/
}
img {
border: 0;
-ms-interpolation-mode:bicubic
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
button,
input,
select,
textarea {
font-family: inherit;
font-size: 100%;
margin: 0;
}
button,
input {
line-height: normal;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
}
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input.submit {
border: 0;
margin: 0;
cursor: pointer;
}
input.radio,
input.checkbox{
float: left;
display: inline;
}
textarea {
overflow: auto;
vertical-align: top;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
i,em {
font-style: normal;
}
/*清除浮动*/
.clearfix:after {
content: "\200B";
display: block;
height: 0;
clear: both;
}
.clearfix {
*zoom: 1;
*width: 100%;
*line-height: 0;
}
.fl {
float:left;
}
.fr {
float:right;
}
@charset "utf-8";
.dw-head {
height: 485px;
background-color: #fff;
border-bottom: 1px solid #f3f3f3;
}
.warp {
width: 1000px;
margin: 0 auto;
}
.dw-head .about-banshou {
position: relative;
width: 65%;
min-height: 485px;
}
.dw-head .about-banshou h2 {
font-size: 36px;
}
.dw-head .about-banshou p {
line-height: 28px;
padding-top: 20px;
color: #333;
}
.dw-head .bs-home {
width: 35%;
}
.xy-center {
position: absolute;
width: 100%;
top: 50%;
transform: translateY(-50%);
text-align: left;
}
.banshou-logo {
position: fixed;
display: block;
width: 100%;
padding: 20px 0;
border-bottom: 1px solid #f3f3f3;
background-color: #fff;
z-index: 2;
}
.banshou-logo img {
vertical-align: top;
}
.service-intro {
background-color: #f9f9f9;
}
.service-intro .tit {
text-align: center;
padding: 40px 0 0;
}
.service-intro .tit h1 {
font-size: 24px;
font-weight: normal;
}
.service-intro .tit p {
padding-top: 10px;
text-transform: uppercase;
font-size: 18px;
color: #64cd08;
}
.kuaicha {
background-color: #f9f9f9;
border-bottom: 1px solid #f3f3f3;
}
.bbs {
min-height: 485px;
background-color: #fff;
border-bottom: 1px solid #f3f3f3;
}
.pic-main {
width: 50%;
height: 100%;
}
.pic-main img {
vertical-align: bottom;
}
.text-main {
position: relative;
width: 30%;
height: 485px;
padding-left: 60px;
}
.text-main h3 {
font-size: 24px;
padding-bottom: 30px;
color: #333;
}
.text-main b {
display: block;
font-size: 16px;
padding-bottom: 10px;
}
.text-main p {
color: #999;
line-height: 24px;
}
.foot {
height: 60px;
text-align: center;
line-height: 60px;
font-size: 12px;
color: #999;
background-color: #f9f9f9;
border-top: 1px solid #f3f3f3;
}
.foot-bar {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 150px;
background-color: #fff;
z-index: 20;
}
.warp {
position: relative;
width: 1000px;
margin: 0 auto;
height: 100%;
}
.pic-hand {
position: absolute;
left: 50%;
margin-left: -350px;
bottom: 0;
z-index: 5;
}
.pic-text {
position: absolute;
right: 0;
top: 50%;
z-index: 4;
margin-top: -100px;
}
.logo {
padding-top: 45px;
}
.logo img {
vertical-align: top;
}
.download-group {
position: relative;
margin-top: 30px;
}
.download-group a {
float: left;
}
.download-group a.dw-btn {
display: inline-block;
border-radius: 44px;
height: 44px;
padding: 0 30px;
line-height: 44px;
color: #64cd08;
border: 3px solid #64cd08;
font-size: 14px;
margin-right: 10px;
transition: all .2s;
}
.download-group a.ewm-btn {
position: relative;
display: inline-block;
border-radius: 44px;
height: 44px;
width: 44px;
text-align: center;
line-height: 44px;
color: #64cd08;
border: 3px solid #64cd08;
font-size: 14px;
margin-right: 10px;
transition: all .2s;
}
.download-group a.ewm-btn:hover {
background-color: #64cd08;
color: #fff;
}
.download-group a.ewm-btn i {
font-size: 24px;
}
.download-group a.dw-btn:hover {
background-color: #64cd08;
color: #fff;
}
.download-group a.dw-btn i {
padding-right: 5px;
}
.download-group .qrcode {
position: absolute;
right: 0;
bottom: 0;
text-align: center;
font-size: 14px;
line-height: 24px;
}
.download-group .qrcode img {
width: 200px;
}
.download-group a.ewm-btn span.tip {
display: none;
position: absolute;
top: -250px;
left: 50%;
margin-left: -80px;
padding: 5px;
background-color: #fff;
box-shadow: 0 0 15px 0 rgba(0,0,0,0.2);
transition: all .5s;
opacity: 0;
}
.download-group a.ewm-btn span.tip img {
vertical-align: top;
width: 150px;
}
.download-group a.ewm-btn span.tip:after {
content: '';
position: absolute;
top: 100%;
left: 50%;
height: 0;
width: 0;
margin-left: -6px;
border: solid transparent;
border-top-color: #ffffff;
border-width: 8px 6px;
pointer-events: none;
}
.download-group a.ewm-btn:hover span.tip {
display: inline-block;
opacity: 1;
top: -180px;
}
.download-group a.top-need span.tip {
top: auto;
bottom: -250px;
}
.download-group a.top-need:hover span.tip {
display: inline-block;
top: auto;
bottom: -180px;
}
.download-group a.top-need span.tip:after {
top: auto;
bottom: 100%;
border-top-color: transparent;
border-bottom-color: #fff;
}
.phone-box {
display: none;
position: relative;
width: 100%;
height: 100%;
}
.center-box {
width: 100%;
position: absolute;
top: 50%;
transform: translateY(-50%);
text-align: center;
}
.center-box img {
width: 80px;
vertical-align: top;
}
.center-box h3 {
font-size: 24px;
padding-top: 20px;
font-weight: normal;
color: #333;
}
.center-box p {
font-size: 14px;
padding-top: 5px;
color: #999;
}
.center-box a {
display: inline-block;
width: 140px;
height: 44px;
line-height: 42px;
text-align: center;
border-radius: 44px;
background-color: #32B2A7;
color: #fff;
margin-top: 30px;
font-size: 14px;
}
.center-box span.warn {
display: block;
margin-top: 30px;
padding: 0 20px;
text-align: center;
line-height: 24px;
font-size: 16px;
}
.center-box span.warn b {
width: 70%;
font-weight: normal;
display: inline-block;
margin-bottom: 15px;
background-color: #0088ff;
border-radius: 6px;
padding: 20px 0;
color: #fff;
font-size: 14px;
}
.oie-tip {
display: inline-block;
position: absolute;
width: 160px;
line-height: 22px;
background: #666;
color: #fff;
font-size: 14px;
border-radius: 6px;
top: 16px;
text-align: center;
right: 10px;
padding: 10px;
}
.oie-tip:after {
content: '';
right: 20px;
top: -10px;
margin-right: -10px;
display: inline-block;
position: absolute;
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-bottom: 12px solid #666;
z-index: 1;
}
.close {
position: absolute;
left: 0;
top: 0;
display: inline-block;
padding: 0 20px;
height: 50px;
line-height: 50px;
font-size: 12px;
color: #333;
}
@media screen and (max-width:450px){
html,body {
background: none;
height: 100%;
width: 100%;
}
.warp,.foot-bar,.web {
display: none;
}
.phone-box {
display: block;
}
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta id="viewport" name="viewport"
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0">
<meta name="format-detection" content="telephone=no">
<title>扳手APP下载,扳手APP官方网站 - 扳手</title>
<meta name="keywords" content="扳手,扳手app,扳手快查,扳手app官网">
<meta name="description" content="用扳手APP,和百万家维人在一起。扳手app为家电维修从业人员提供了扳手快查、问题互助、互动交流、接单赚钱等服务。">
<!--Font Icon-->
<link href="//at.alicdn.com/t/font_386523_2cql1vjt51m7vi.css" rel="stylesheet">
<!-- Css -->
<link rel="stylesheet" href="css/basic.css">
<link rel="stylesheet" href="css/style.css">
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?59926961b935e067a1cb86d52ce44500";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<body>
<div class="web">
<div class="banshou-logo">
<div class="warp clearfix">
<img src="img/banshouApp.png">
<div class="download-group clearfix fr" style="margin-top: 5px; display: none" id="downloadBtn">
<a href="https://itunes.apple.com/cn/app/wei-xiu-hui-shi-fu-ban/id1034283227?mt=8" class="dw-btn"><i
class="iconfont icon-ios"></i>iPhone版下载</a>
<a href="https://pub-cdn.ibanshou.cn/banshou-0315.apk" class="dw-btn"><i
class="iconfont icon-android"></i>Android版下载</a>
<a href="#" class="ewm-btn top-need">
<i class="iconfont icon-erweima"></i>
<span class="tip"><img src="img/qrcode.png"></span>
</a>
</div>
</div>
</div>
<div style="height: 100px;"></div>
<div class="dw-head">
<div class="warp clearfix">
<div class="about-banshou fl">
<div class="xy-center">
<h2>扳手APP</h2>
<p>
用扳手APP,和百万家维人在一起<br/>
除了工单,我们还有扳手快查、扳手互助<br/>
扳手快查,提升在维修过程中「定位问题」的效率<br/>
扳手互助,提升在维修过程中「解决问题」的效率
</p>
<div class="download-group clearfix">
<a href="https://itunes.apple.com/cn/app/wei-xiu-hui-shi-fu-ban/id1034283227?mt=8"
class="dw-btn"><i class="iconfont icon-ios"></i>iPhone版下载</a>
<a href="https://pub-cdn.ibanshou.cn/banshou-0131.apk" class="dw-btn"><i
class="iconfont icon-android"></i>Android版下载</a>
<a href="#" class="ewm-btn">
<i class="iconfont icon-erweima"></i>
<span class="tip">
<img src="img/qrcode.png">
</span>
</a>
</div>
</div>
</div>
<div class="bs-home fl">
<img src="img/topbanner.png">
</div>
</div>
</div>
<div class="service-intro">
<div class="warp">
<div class="tit">
<h1>扳手APP服务介绍</h1>
<p>service</p>
</div>
</div>
</div>
<div class="kuaicha">
<div class="warp clearfix">
<div class="pic-main fl">
<img src="img/kuaicha.png">
</div>
<div class="text-main fl">
<div class="xy-center">
<h3>扳手快查</h3>
<b>提升10倍的故障码查询效率</b>
<p>涵盖124个家电品牌,故障码总数5万多条</p>
</div>
</div>
</div>
</div>
<div class="bbs">
<div class="warp clearfix">
<div class="text-main fl">
<div class="xy-center">
<h3>扳手学院</h3>
<b>提供专业的、系统的家电维修技术资料</b>
<p>24位行业专家讲座,86本专业书籍,满足初、中、高级家维人对提升技能的渴望</p>
</div>
</div>
<div class="pic-main fr">
<img src="img/xueyuan.png">
</div>
</div>
</div>
<div class="kuaicha">
<div class="warp clearfix">
<div class="pic-main fl">
<img src="img/bbs.png">
</div>
<div class="text-main fl">
<div class="xy-center">
<h3>扳手社区</h3>
<b>数万名家维人在这里等你</b>
<p>在这里没有不理解、不尊重,只有众人抱团所带来的温度</p>
</div>
</div>
</div>
</div>
<div class="bbs">
<div class="warp clearfix">
<div class="text-main fl">
<div class="xy-center">
<h3>扳手工单</h3>
<b>点点手机,轻松接单</b>
<p>18个合作品牌,30%的保外工单</p>
</div>
</div>
<div class="pic-main fr">
<img src="img/gd.png">
</div>
</div>
</div>
<div class="foot"> © Copyright 2014 - 2018 weixiuhui. All rights reserved. 深圳唯修汇科技有限公司 版权所有</div>
</div>
<div class="phone-box">
<div class="center-box">
<img src="img/logo_banshou.png">
<h3>扳手</h3>
<p>和百万家维人在一起</p>
<!--微信里显示 -->
<span class="warn" id="wechat-warn" style="display: none">微信/QQ 内无法下载APP</span>
<!--浏览器中打开显示 安卓浏览器打开 ios不显示-->
<span class="warn" id="no-wechat-warn" style="display: none">
<b>
请在通知栏中安装 <br/>已下载完成的扳手APP
</b>
<b style="background-color: #ff4858">
如果安装失败 <br/> 请卸载扳手APP后重新安装
</b>
</span>
<!--安卓 扳手APP中 显示-->
<span class="warn" id="app-warn" style="display: none">
<p>请复制下面链接在浏览器中打开</p>
<p style="word-wrap: break-word;">https://s.ibanshou.cn/appdownload</p>
</span>
</div>
<a href="https://s.ibanshou.cn" id="app-close" style="display: none" class="close">关闭</a>
<!--微信里显示-->
<div class="oie-tip" id="oie-tip" style="display: none">请点击右上角 <br/> 选择“浏览器中打开”</div>
<!--<a href="javascript:location.reload();">
<img src="img/download_phone_img.jpg">
<span class="download-now">立即下载</span>
</a>
<span class="tip-expore" id="tip-expore" style="display: none"><img src="img/up-tip.png"></span>-->
</div>
<script type="application/javascript" src="js/mobile-detect.min.js"></script>
<script type="application/javascript" src="js/index.js?20180314"></script>
<script type='text/javascript' src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script type='text/javascript'>
$(function () {
$(window).scroll(function () {
var winTop = $(window).scrollTop();
if (winTop > $(".service-intro").offset().top - 48) {
$("#downloadBtn").show();
} else {
$("#downloadBtn").hide();
}
});
})
</script>
</body>
</html>
\ No newline at end of file
(function (global) {
function inWechat() {
var ua = navigator.userAgent.toLowerCase();
return (/micromessenger/.test(ua) ? true : false);
}
function inApp() {
return (/BanShou/.test(navigator.userAgent) ? true : false);
}
global.onload = function () {
var md = new MobileDetect(window.navigator.userAgent);
var appStoreUrl = 'https://itunes.apple.com/cn/app/wei-xiu-hui-shi-fu-ban/id1034283227?mt=8';
var yingYongBaoUrl = 'http://a.app.qq.com/o/simple.jsp?pkgname=com.wxhkj.weixiuhui';
var urgency = false;
if (urgency) {
yingYongBaoUrl = 'https://pub-cdn.ibanshou.cn/banshou-0131.apk';
if (inApp()) {
$('#app-warn').show();
$('#app-close').show();
} else {
if (inWechat()) {
if (md.is('AndroidOS')) {
$('#wechat-warn').show();
//显示遮罩
$('#oie-tip').show();
return false;
}
} else {
if (md.is('AndroidOS')) {
$('#no-wechat-warn').show();
}
}
}
}
//判断是否为移动端
if (md.mobile()) {
setTimeout(function () {
if (md.is('iPhone') || md.is('iPad')) {
window.location.href = appStoreUrl;
} else {
window.location.href = yingYongBaoUrl;
}
}, 1000);
}
};
})(window);
\ No newline at end of file
This diff is collapsed.
<project name="zuiketang" default="all" basedir="./">
<project name="s_ibanshou" default="all" basedir="./">
<echo message="platform ${platform}"/>
<if>
<isset property="env"/>
<then>
<echo message="env ${env}"/>
</then>
<else>
<fail message="env not set!"/>
</else>
</if>
<if>
<equals arg1="${platform}" arg2="win"/>
<then>
......@@ -23,22 +31,34 @@
<!-- 初始化框架 -->
<target name="init" depends="prepare">
<echo message="copy to build start"/>
<!--copy common -->
<copy todir="${dir.output}/">
<fileset dir="./">
<patternset>
<exclude name="e/config/"/>
<exclude name="e/back_conf/"/>
<exclude name="index.html"/>
<include name="**/**"/>
<include name="e/**"/>
<include name="appdownload/**"/>
<include name="skin/**" />
<include name="environments/**" />
<include name="vendor/**" />
<include name="appdownload/**" />
<include name="sendbook/**" />
</patternset>
</fileset>
<filelist dir="." files="init,build.xml,build.properties,build_win.properties"/>
</copy>
<delete file="${dir.output}/build.xml" />
<delete file="${dir.output}/build.properties" />
<delete file="${dir.output}/build_win.properties" />
<echo message="init start"/>
<exec command="${php.bin} ${dir.output}/init --env=${env} --overwrite=y" passthru="true"/>
<echo message="init end"/>
<delete file="${dir.output}/init"/>
<delete dir="${dir.output}/environments"/>
<delete file="${dir.output}/build.xml"/>
<delete file="${dir.output}/build_win.properties"/>
<delete file="${dir.output}/build.properties"/>
<echo message="copy to build end"/>
......
......@@ -12,11 +12,6 @@ node=node
webpack=webpack
npm=cnpm
cnpm=cnpm
ftp.host=114.112.81.8
ftp.port=40021
ftp.username=pp_pro
ftp.password=8XFX`kAox4j_or1&m=$q0d87bx
ftp.dir=
php.bin=php
defaultpear.bin=pear
{
"require": {
"overtrue/wechat":"~3.1"
},
"repositories": {
"packagist": {
"type": "composer",
"url": "https://packagist.phpcomposer.com"
}
}
}
\ No newline at end of file
This diff is collapsed.
<?php
use internalApi\ucenter\Credit;
require(__DIR__ . '/../extend/internalApi/autoload.php');
require(__DIR__ . "/../class/connect.php");
require(__DIR__ . "/../class/db_sql.php");
require(__DIR__ . "/../member/class/user.php");
require(__DIR__ . "/../class/q_functions.php");
require __DIR__.'/../config/config_ibanshou.php';
\internalApi\base\Client::config($config['wxh.internal']['client']);
$link=db_connect();
$empire=new mysqlquery();
$mod = isset($_GET['mod']) ? $_GET['mod']: '';
$type = isset($_GET['type'])?$_GET['type']:'';
$user = islogin();
$typeMap = [
'share' => 1,
];
if($mod == 'credit'){
$userId = $user['ucid'];
if (isset($typeMap[$type])) {
$creditRuleId = $typeMap[$type];
} else {
echo json_encode(['status'=>false,'message'=>'type 字段错误']);
}
$creditRule = Credit::addCreditLog($userId, $creditRuleId);
if ($creditRule) {
$creditInfo = array('title'=>$creditRule['operation_name'],'desc'=>$creditRule['operation_details'],'number'=>$creditRule['number']);
setcookie('creditNotice',json_encode($creditInfo),0,'/');
echo json_encode(['status'=>true,'message'=>'ok','creditRule'=>$creditRule]);
} else {
echo json_encode(['status'=>false]);
}
}
\ No newline at end of file
<?php
require(__DIR__ . '/../../extend/internalApi/autoload.php');
require(__DIR__ . "/../../class/connect.php");
require(__DIR__ . "/../../class/db_sql.php");
require(__DIR__ . "/../../member/class/user.php");
require(__DIR__ . "/../../class/q_functions.php");
require __DIR__.'/../../config/config_ibanshou.php';
\internalApi\base\Client::config($config['wxh.internal']['client']);
$link=db_connect();
$empire=new mysqlquery();
......@@ -84,7 +87,7 @@ function createComment($newsid, $content) {
//回复评论
function replyComment($plid, $content) {
global $empire,$dbtbpre;
global $empire,$dbtbpre,$ecms_config;
$table = $dbtbpre.'ecms_comments';
$user = islogin();
......@@ -108,6 +111,20 @@ function replyComment($plid, $content) {
$tablenews = $dbtbpre.'ecms_news';
$sql = "update {$tablenews} set plnum=plnum+1 where id={$comment['newsid']}";
$empire->query($sql);
//添加消息
$tablenews = $dbtbpre . 'ecms_news';
$newsid = $comment['newsid'];
$sql = "select * from {$tablenews} where id={$newsid}";
$news = $empire->fetchassoc1($sql);
$userId = getucidbyuid($comment['user_id']);
$title = $comment['content'];
$sourceUrl = $ecms_config['site_url'] . $news['titleurl'];
$type = 'comment';
$commentId = $id;
$replyUserId = $user['ucid'];
$replyedComment = $content;
\internalApi\ucenter\Message::addComment($userId, $title, $sourceUrl, 's', $type, $commentId, $replyUserId, $replyedComment);
returnmsg(true, '回复成功', comment($id));
}
}
......@@ -115,6 +132,7 @@ function replyComment($plid, $content) {
//评论列表
function comments($newsid, $plid=0, $num=10) {
global $empire,$dbtbpre;
$tablecomment = $dbtbpre.'ecms_comments';
$tablemember = $dbtbpre.'enewsmember';
......@@ -123,7 +141,7 @@ function comments($newsid, $plid=0, $num=10) {
$where = "c.id<{$plid} and ";
}
$sql = "select c.*,u.avatar,u.nickname,u.username from $tablecomment c left join {$tablemember} u on c.user_id=u.userid where {$where} c.newsid={$newsid} and c.reply_id=0 order by c.id desc limit {$num}";
$sql = "select c.*,u.nickname,u.username,u.ucid from $tablecomment c left join {$tablemember} u on c.user_id=u.userid where {$where} c.newsid={$newsid} and c.reply_id=0 order by c.id desc limit {$num}";
$query = $empire->query($sql);
$list = [];
......@@ -168,7 +186,7 @@ function replyComments($plid) {
$tablecomment = $dbtbpre.'ecms_comments';
$tablemember = $dbtbpre.'enewsmember';
$sql = "select c.content,c.created_at,u.nickname,u.username from $tablecomment c left join {$tablemember} u on c.user_id=u.userid where reply_id={$plid}";
$sql = "select c.content,c.created_at,u.nickname,u.username,u.ucid from $tablecomment c left join {$tablemember} u on c.user_id=u.userid where reply_id={$plid}";
$query = $empire->query($sql);
$list = [];
......@@ -185,7 +203,7 @@ function comment($id) {
$tablecomment = $dbtbpre.'ecms_comments';
$tablemember = $dbtbpre.'enewsmember';
$sql = "select c.*,u.avatar,u.nickname,u.username from $tablecomment c left join {$tablemember} u on c.user_id=u.userid where c.id={$id} limit 1";
$sql = "select c.*,u.nickname,u.username,u.ucid from $tablecomment c left join {$tablemember} u on c.user_id=u.userid where c.id={$id} limit 1";
$comment = $empire->fetchassoc1($sql);
return handelcomment($comment);
......@@ -193,7 +211,7 @@ function comment($id) {
//点赞
function likeComment($plid) {
global $empire,$dbtbpre;
global $empire,$dbtbpre,$ecms_config;
$tablecomment = $dbtbpre.'ecms_comments';
$tablecommentlike = $dbtbpre.'ecms_comments_likenum';
......@@ -218,6 +236,21 @@ function likeComment($plid) {
if ($id) {
$sql = "update {$tablecomment} set like_num=like_num+1 where id={$plid}";
$empire->query($sql);
//添加消息
$tablenews = $dbtbpre . 'ecms_news';
$newsid = $comment['newsid'];
$sql = "select * from {$tablenews} where id={$newsid}";
$news = $empire->fetchassoc1($sql);
$userId = getucidbyuid($comment['user_id']);
$title = $news['title'];
$sourceUrl = $ecms_config['site_url'] . $news['titleurl'];
$sourceId = $newsid;
$type = 'comment';
$likeUserId = $user['ucid'];
$likedComment = $comment['content'];
\internalApi\ucenter\Message::addLike($userId, $title, $sourceUrl, 's', $type, $sourceId, $likeUserId,$likedComment);
returnmsg(true, '点赞成功');
} else {
returnmsg(false, '点赞失败');
......@@ -226,6 +259,8 @@ function likeComment($plid) {
}
function handelcomment($comment) {
global $config;
$comment['avatar'] = $config['wxhpro']['ucenter'].'/avatar/'.$comment['ucid'].'/m';
$comment['created_at'] = date('Y-m-d H:i', $comment['created_at']);
return $comment;
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 07/02/2018
* Time: 11:46 AM
*/
require(__DIR__ . '/../extend/internalApi/autoload.php');
require(__DIR__ . '/../config/config_ibanshou.php');
\internalApi\base\Client::config($config['wxh.internal']['client']);
$num = isset($_GET['num']) ? $_GET['num'] : 3;
echo json_encode(internalApi\bbs\Tcptuan::getGoods($num));
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 20/11/2017
* Time: 5:04 PM
*/
require(__DIR__ . '/../extend/internalApi/autoload.php');
require(__DIR__ . '/../config/config_ibanshou.php');
\internalApi\base\Client::config($config['wxh.internal']['client']);
echo \internalApi\bbs\Thread::getUnresolveQustion();
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 02/08/2017
* Time: 5:11 PM
*/
require_once '../../../vendor/autoload.php';
require_once '../../config/config_ibanshou.php';
$actualLink = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$url = !empty($_GET['url']) ? $_GET['url'] : $actualLink;
$debug = !empty($_GET['debug']) ? TRUE : FALSE;
$callback = !empty($_GET['callback']) ? $_GET['callback'] : 'callback';
$options = $config['wechat'];
$app = new \EasyWeChat\Foundation\Application($options);
$js = $app->js;
$js->setUrl($url);
$jsApi = [
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'onMenuShareQZone',
'startRecord',
'stopRecord',
'onVoiceRecordEnd',
'playVoice',
'pauseVoice',
'stopVoice',
'onVoicePlayEnd',
'uploadVoice',
'downloadVoice',
'chooseImage',
'previewImage',
'uploadImage',
'downloadImage',
'translateVoice',
'getNetworkType',
'openLocation',
'getLocation',
'hideOptionMenu',
'showOptionMenu',
'hideMenuItems',
'showMenuItems',
'hideAllNonBaseMenuItem',
'showAllNonBaseMenuItem',
'closeWindow',
'scanQRCode',
'chooseWXPay',
'openProductSpecificView',
'addCard',
'chooseCard',
'openCard'
];
$jsconfig = $js->config($jsApi);
echo $callback . '(' . $jsconfig . ')';
\ No newline at end of file
......@@ -108,3 +108,13 @@ p, ul, li
font-family: 'Courier New' , Monospace;
background-color: #ff9933;
}
.FCK__Lecloud
{
border: #a9a9a9 1px solid;
background-position: center center;
background-image: url(images/play.png);
background-repeat: no-repeat;
width: 80px;
height: 80px;
}
/**
* Created by pader on 2017/9/29.
*/
(function() {
var path = FCKPlugins.Items['lecloud'].Path;
function getElementsByClassName(className, tagName, doc) {
tagName = tagName || "*";
doc = doc || document;
var elements = doc.getElementsByTagName(tagName);
var matchElements = [];
for (var i=0,el; el=elements[i]; i++) {
if (el.className && el.className.split(" ").indexOf(className) != -1) {
matchElements.push(el);
}
}
return matchElements;
}
//注册
FCKCommands.RegisterCommand('lecloud',
new FCKDialogCommand('lecloud', FCKLang.LecloudTitle, path + "lecloud_insert.html", 300, 150));
//定义工具栏
var Lecloud = new FCKToolbarButton('lecloud', FCKLang.LecloudTitle);
Lecloud.IconPath = path + 'play.gif';
FCKToolbarItems.RegisterItem('lecloud', Lecloud);
// 定义占位元素
FCKDocumentProcessor.AppendNew().ProcessDocument = function(document) {
var matching = getElementsByClassName('lecloud-video', 'div', document);
var oMatch;
var i = matching.length - 1;
while (i>= 0 && (oMatch = matching[i--])) {
// Create the new FakeImage (looks like an image in the editor, but contains our div)
var oImg = FCKDocumentProcessor_CreateFakeImage('FCK__Lecloud', oMatch.cloneNode(true));
oImg.setAttribute('_fck_lecloud', true);
// Place the FakeImage right where the div used to be
oMatch.parentNode.insertBefore(oImg, oMatch);
oMatch.parentNode.removeChild(oMatch);
}
};
})();
\ No newline at end of file
/**
* Created by pader on 2017/9/29.
*/
FCKLang.LecloudTitle = "插入乐视云视频";
FCKLang.videoId = "视频ID";
FCKLang.videoVU = "视频VU";
\ No newline at end of file
<!DOCTYPE HTML>
<html>
<head>
<title>Anchor Properties</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta content="noindex, nofollow" name="robots">
<script type="text/javascript">
var dialog = window.parent ;
var oEditor = dialog.InnerDialogLoaded() ;
var FCK = oEditor.FCK ;
var FCKBrowserInfo = oEditor.FCKBrowserInfo ;
var FCKTools = oEditor.FCKTools ;
var FCKRegexLib = oEditor.FCKRegexLib ;
var oDOM = FCK.EditorDocument ;
var oFakeImage = oEditor.FCKSelection.GetSelectedElement();
var oVideo;
if (oFakeImage) {
if (oFakeImage.tagName == 'IMG' && oFakeImage.getAttribute('_fck_lecloud'))
oVideo = FCK.GetRealElement(oFakeImage) ;
else
oFakeImage = null ;
}
window.onload = function() {
// First of all, translate the dialog box texts
oEditor.FCKLanguageManager.TranslatePage(document);
if (oVideo) {
$('videoVU').value = oVideo.getAttribute("vu");
}
window.parent.SetOkButton(true) ;
window.parent.SetAutoSize(true) ;
};
function Ok() {
var vu = $('videoVU').value;
oEditor.FCKUndo.SaveUndoStep() ;
if (!oVideo) {
oVideo = FCK.EditorDocument.createElement('div');
oVideo.setAttribute("class", "lecloud-video");
oFakeImage = null;
}
oVideo.setAttribute("vu", vu);
if (!oFakeImage) {
oFakeImage = oEditor.FCKDocumentProcessor_CreateFakeImage('FCK__Lecloud', oVideo) ;
oFakeImage.setAttribute('_fck_lecloud', 'true') ;
oFakeImage = FCK.InsertElement(oFakeImage) ;
}
oEditor.FCKEmbedAndObjectProcessor.RefreshView(oFakeImage, oVideo) ;
return true ;
}
function $(id) {
return document.getElementById(id);
}
</script>
</head>
<body>
<table cellspacing="3" cellpadding="2" width="100%" border="0">
<tbody>
<tr>
<td valign="top" nowrap="nowrap">
<label for="videoVU" fcklang="videoVU">Video VU:</label>
</td>
<td valign="top">
<input id="videoVU" style="width: 100%" tabindex="2" type="text">
</td>
</tr>
</tbody>
</table>
</body>
</html>
......@@ -49,6 +49,7 @@ FCKConfig.SkinDialogCSS = '' ; // FCKConfig.SkinPath + "|<minified css>" ;
FCKConfig.PreloadImages = [ FCKConfig.SkinPath + 'images/toolbar.start.gif', FCKConfig.SkinPath + 'images/toolbar.buttonarrow.gif' ] ;
FCKConfig.PluginsPath = FCKConfig.BasePath + 'plugins/' ;
FCKConfig.Plugins.Add('lecloud', 'zh-cn');
// FCKConfig.Plugins.Add( 'autogrow' ) ;
// FCKConfig.Plugins.Add( 'dragresizetable' );
......@@ -111,7 +112,7 @@ FCKConfig.ToolbarSets["Default"] = [
['Subscript','Superscript'],
'/',
['Bold','Italic','Underline','StrikeThrough'],
['Link','Unlink','Anchor'],
['Link','Unlink','Anchor','lecloud'],
['Image','InsertMImage','Flash','InsertMedia','InsertFile','-','Table','Rule','SpecialChar','InsertQuote','InsertPageExp','InsertTBr'] // No comma for the last row.
] ;
......
<?php
/**
* Check if browser is compatible with FCKeditor.
* Return true if is compatible.
*
* @return boolean
*/
function FCKeditor_IsCompatibleBrowser()
{
if ( isset( $_SERVER ) ) {
$sAgent = $_SERVER['HTTP_USER_AGENT'] ;
}
else {
global $HTTP_SERVER_VARS ;
if ( isset( $HTTP_SERVER_VARS ) ) {
$sAgent = $HTTP_SERVER_VARS['HTTP_USER_AGENT'] ;
}
else {
global $HTTP_USER_AGENT ;
$sAgent = $HTTP_USER_AGENT ;
}
}
if ( strpos($sAgent, 'MSIE') !== false && strpos($sAgent, 'mac') === false && strpos($sAgent, 'Opera') === false )
{
$iVersion = (float)substr($sAgent, strpos($sAgent, 'MSIE') + 5, 3) ;
return ($iVersion >= 5.5) ;
}
else if ( strpos($sAgent, 'Gecko/') !== false )
{
$iVersion = (int)substr($sAgent, strpos($sAgent, 'Gecko/') + 6, 8) ;
return ($iVersion >= 20030210) ;
}
else if ( strpos($sAgent, 'Trident/') !== false )
{
$iVersion = (float)substr($sAgent, strpos($sAgent, 'rv:') + 3, 2) ;
return ($iVersion >= 11) ;
}
else if ( strpos($sAgent, 'Opera/') !== false )
{
$fVersion = (float)substr($sAgent, strpos($sAgent, 'Opera/') + 6, 4) ;
return ($fVersion >= 9.5) ;
}
else if ( preg_match( "|AppleWebKit/(\d+)|i", $sAgent, $matches ) )
{
$iVersion = $matches[1] ;
return ( $matches[1] >= 522 ) ;
}
else
return false ;
}
class FCKeditor
{
/**
* Name of the FCKeditor instance.
*
* @access protected
* @var string
*/
var $InstanceName ;
/**
* Path to FCKeditor relative to the document root.
*
* @var string
*/
var $BasePath ;
/**
* Width of the FCKeditor.
* Examples: 100%, 600
*
* @var mixed
*/
var $Width ;
/**
* Height of the FCKeditor.
* Examples: 400, 50%
*
* @var mixed
*/
var $Height ;
/**
* Name of the toolbar to load.
*
* @var string
*/
var $ToolbarSet ;
/**
* Initial value.
*
* @var string
*/
var $Value ;
/**
* This is where additional configuration can be passed.
* Example:
* $oFCKeditor->Config['EnterMode'] = 'br';
*
* @var array
*/
var $Config ;
/**
* Main Constructor.
* Refer to the _samples/php directory for examples.
*
* @param string $instanceName
*/
function FCKeditor( $instanceName )
{
$this->InstanceName = $instanceName ;
$this->BasePath = '/fckeditor/' ;
$this->Width = '100%' ;
$this->Height = '200' ;
$this->ToolbarSet = 'Default' ;
$this->Value = '' ;
$this->Config = array() ;
}
/**
* Display FCKeditor.
*
*/
function Create()
{
echo $this->CreateHtml() ;
}
/**
* Return the HTML code required to run FCKeditor.
*
* @return string
*/
function CreateHtml()
{
$HtmlValue = ehtmlspecialchars( $this->Value ) ;
$Html = '' ;
if ( !isset( $_GET ) ) {
global $HTTP_GET_VARS ;
$_GET = $HTTP_GET_VARS ;
}
if ( $this->IsCompatible() )
{
if ( isset( $_GET['fcksource'] ) && $_GET['fcksource'] == "true" )
$File = 'fckeditor.original.html' ;
else
$File = 'fckeditor.html' ;
$Link = "{$this->BasePath}editor/{$File}?InstanceName={$this->InstanceName}".ECMS_ReturnEditorCx() ;
if ( $this->ToolbarSet != '' )
$Link .= "&amp;Toolbar={$this->ToolbarSet}" ;
// Render the linked hidden field.
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}\" name=\"{$this->InstanceName}\" value=\"{$HtmlValue}\" style=\"display:none\" />" ;
// Render the configurations hidden field.
$Html .= "<input type=\"hidden\" id=\"{$this->InstanceName}___Config\" value=\"" . $this->GetConfigFieldString() . "\" style=\"display:none\" />" ;
// Render the editor IFRAME.
$Html .= "<iframe id=\"{$this->InstanceName}___Frame\" src=\"{$Link}\" width=\"{$this->Width}\" height=\"{$this->Height}\" frameborder=\"0\" scrolling=\"no\"></iframe>" ;
}
else
{
if ( strpos( $this->Width, '%' ) === false )
$WidthCSS = $this->Width . 'px' ;
else
$WidthCSS = $this->Width ;
if ( strpos( $this->Height, '%' ) === false )
$HeightCSS = $this->Height . 'px' ;
else
$HeightCSS = $this->Height ;
$Html .= "<textarea name=\"{$this->InstanceName}\" rows=\"4\" cols=\"40\" style=\"width: {$WidthCSS}; height: {$HeightCSS}\">{$HtmlValue}</textarea>" ;
}
return $Html ;
}
/**
* Returns true if browser is compatible with FCKeditor.
*
* @return boolean
*/
function IsCompatible()
{
return FCKeditor_IsCompatibleBrowser() ;
}
/**
* Get settings from Config array as a single string.
*
* @access protected
* @return string
*/
function GetConfigFieldString()
{
$sParams = '' ;
$bFirst = true ;
foreach ( $this->Config as $sKey => $sValue )
{
if ( $bFirst == false )
$sParams .= '&amp;' ;
else
$bFirst = false ;
if ( $sValue === true )
$sParams .= $this->EncodeConfig( $sKey ) . '=true' ;
else if ( $sValue === false )
$sParams .= $this->EncodeConfig( $sKey ) . '=false' ;
else
$sParams .= $this->EncodeConfig( $sKey ) . '=' . $this->EncodeConfig( $sValue ) ;
}
return $sParams ;
}
/**
* Encode characters that may break the configuration string
* generated by GetConfigFieldString().
*
* @access protected
* @param string $valueToEncode
* @return string
*/
function EncodeConfig( $valueToEncode )
{
$chars = array(
'&' => '%26',
'=' => '%3D',
'"' => '%22' ) ;
return strtr( $valueToEncode, $chars ) ;
}
}
?>
\ No newline at end of file
......@@ -9,6 +9,11 @@ require("../class/copypath.php");
require("../class/t_functions.php");
require("../data/dbcache/class.php");
require("../data/dbcache/MemberLevel.php");
require '../config/config_ibanshou.php';
require '../extend/internalApi/autoload.php';
\internalApi\base\Client::config($config['wxh.internal']['client']);
$link=db_connect();
$empire=new mysqlquery();
$enews=$_POST['enews'];
......
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/8/22
* Time: 18:07
*/
require '../class/connect.php';
require '../class/db_sql.php';
require '../class/q_functions.php';
require '../extend/internalApi/autoload.php';
require '../config/config_ibanshou.php';
$link = db_connect();
$empire = new mysqlquery();
class InternalApiWrap {
/**
* 同步更新用户信息
*
* @param int $uid
* @param array $data 用户中心传递来的信息可能包括以下字段 nickname, avatar, phone_number, updated_at
* @return bool
*/
public static function userUpdateSync($uid, $data)
{
global $empire, $link;
require_once '../member/class/user.php';
$member = $empire->fetch1("SELECT ".eReturnSelectMemberF('*')." FROM ".eReturnMemberTable()." WHERE ".egetmf('ucid')."={$uid} limit 1");
if (!$member) {
return false;
}
$updateSql = '';
foreach ($data as $k => $v) {
switch ($k) {
case 'avatar': $updateSql .= "`avatar`=".$empire->quote($v).","; break;
case 'nickname': $updateSql .= "`nickname`=".$empire->quote($v).","; break;
}
}
if ($updateSql) {
$updateSql = substr($updateSql, 0, -1);
$empire->query("UPDATE ".eReturnMemberTable()." SET $updateSql WHERE ".egetmf('userid')."='".$member['userid']."'");
return true;
}
return true;
}
}
$server = new \internalApi\base\Server($config['wxh.internal']['server_secret']);
$server->setApiMap([
'user' => [
'updateSync' => ['InternalApiWrap::userUpdateSync', 'uid', 'data']
]
]);
$server->invoke();
......@@ -37,7 +37,7 @@ class mysqlquery
return $this->sql;
}
//执行mysqli_fetch_array()
function fetch($sql)//此方法的参数是$sql就是sql语句执行结果
function fetch($sql)//此方法的参数是$sql就是sql语句执行结果
{
$this->r=mysqli_fetch_array($sql);
return $this->r;
......@@ -110,5 +110,16 @@ class mysqlquery
{
return mysqli_affected_rows($GLOBALS['link']);
}
/**
* 转义并包裹指定字符串以使其可安全用于查询
*
* @param string $str
* @return string
*/
function quote($str)
{
return '\''.mysqli_real_escape_string($GLOBALS['link'], $str).'\'';
}
}
?>
\ No newline at end of file
......@@ -239,7 +239,7 @@ function AddNews($add,$userid,$username){
//主表
$infosql=$empire->query("insert into ".$infotbr['tbname']."(id,classid,ttid,onclick,plnum,totaldown,newspath,filename,userid,username,firsttitle,isgood,ispic,istop,isqf,ismember,isurl,truetime,lastdotime,havehtml,groupid,userfen,titlefont,titleurl,stb,fstb,restb,keyboard".$ret_r['fields'].") values('$id','$add[classid]','$add[ttid]','$add[onclick]',0,'$add[totaldown]','$newspath','$filename','$userid','".addslashes($username)."','$add[firsttitle]','$add[isgood]','$add[ispic]','$add[istop]','$isqf',0,'$add[isurl]','$truetime','$lastdotime','$havehtml','$add[groupid]','$add[userfen]','".addslashes($add[my_titlefont])."','".addslashes($add[titleurl])."','$ret_r[tb]','$public_r[filedeftb]','$public_r[pldeftb]','".addslashes($add[keyboard])."'".$ret_r['values'].");");
//副表
$finfosql=$empire->query("insert into ".$infotbr['datatbname']."(id,classid,keyid,dokey,newstempid,closepl,haveaddfen,infotags".$ret_r['datafields'].") values('$id','$add[classid]','$keyid','$add[dokey]','$add[newstempid]','$add[closepl]',0,'".addslashes($add[infotags])."'".$ret_r['datavalues'].");");
$finfosql=$empire->query("insert into ".$infotbr['datatbname']."(id,classid,keyid,dokey,newstempid,closepl,haveaddfen,infotags".$ret_r['datafields'].") values('$id','$add[classid]','$keyid','$add[dokey]','$add[newstempid]','$add[closepl]',0,'".addslashes($add[infotags])."'".$ret_r['datavalues'].");");
//更新栏目信息数
AddClassInfos($add['classid'],'+1','+1',$add['checked']);
//更新新信息数
......@@ -336,7 +336,40 @@ function AddNews($add,$userid,$username){
}
$GLOBALS['ecmsadderrorurl']=$ecmsfrom.$addecmscheck;
insert_dolog("classid=$add[classid]<br>id=".$id."<br>title=".$add[title],$pubid);//操作日志
printerror("AddNewsSuccess","AddNews.php?enews=AddNews&ecmsnfrom=$add[ecmsnfrom]&bclassid=$add[bclassid]&classid=$add[classid]".$addecmscheck.hReturnEcmsHashStrHref2(0));
//添加es数据
if(empty(!empty($add['checked']))){
global $dbtbpre,$ecms_config;
$tablenews = "{$dbtbpre}ecms_news";
$tableDatas = "{$dbtbpre}ecms_news_data_1";
$sql = "select $tableDatas.newstext,$tablenews.* from $tablenews left JOIN $tableDatas on $tablenews.id = $tableDatas.id where $tablenews.id = $id ";
$data = $empire->fetch1($sql);
$content = cutstr_html($data['newstext']);
$id = $data['id'];
$title = $data['title'];
$from = 's';
$createAt = $data['newstime'];
$url = $ecms_config['site_url'].$data['titleurl'];
//获取图片
$img = $data['titlepic'];
if (!$img) {
$newstext = stripslashes($data['newstext']);
preg_match('/src="([^"]+?)"/i', $newstext, $match);
$img = isset($match[1]) ? $match[1] : '';
}
if ($img && !preg_match('/^https?:/', $img)) {
$img = $ecms_config['site_url'] . $img;
}
$extra = [
'classid'=>$data['classid'],
];
\internalApi\ucenter\ElasContent::replace($id,$title,$content,$img,$url,$from,$createAt,$extra);
}
printerror("AddNewsSuccess","AddNews.php?enews=AddNews&ecmsnfrom=$add[ecmsnfrom]&bclassid=$add[bclassid]&classid=$add[classid]".$addecmscheck.hReturnEcmsHashStrHref2(0));
}
else
{
......@@ -344,6 +377,20 @@ function AddNews($add,$userid,$username){
}
}
function cutstr_html($string)
{
$string = strip_tags($string);
$string = trim($string);
$string = mb_ereg_replace("\t", "", $string);
$string = mb_ereg_replace("\r\n", "", $string);
$string = mb_ereg_replace("\r", "", $string);
$string = mb_ereg_replace("\n", "", $string);
$string = mb_ereg_replace(" ", "", $string);
return trim($string);
}
//修改信息
function EditNews($add,$userid,$username){
global $empire,$class_r,$class_zr,$bclassid,$public_r,$dbtbpre,$emod_r;
......@@ -589,7 +636,47 @@ function EditNews($add,$userid,$username){
{
$ecmsfrom="ListNews.php?bclassid=$add[bclassid]&classid=$add[classid]".hReturnEcmsHashStrHref2(0);
}
insert_dolog("classid=$add[classid]<br>id=".$add[id]."<br>title=".$add[title],$pubid);//操作日志
//添加elas
$from = 's';
$id = $index_checkr['id'];
if(empty($newchecked)){
//删除
\internalApi\ucenter\ElasContent::delete($id,$from);
}else{
//修改
global $dbtbpre,$ecms_config;
$tablenews = "{$dbtbpre}ecms_news";
$tableDatas = "{$dbtbpre}ecms_news_data_1";
$sql = "select $tableDatas.newstext,$tablenews.* from $tablenews left JOIN $tableDatas on $tablenews.id = $tableDatas.id where $tablenews.id = $id ";
$data = $empire->fetch1($sql);
$content = cutstr_html($data['newstext']);
$id = $data['id'];
$title = $data['title'];
$createAt = $data['newstime'];
$url = $ecms_config['site_url'].$data['titleurl'];
//获取图片
$img = $data['titlepic'];
if (!$img) {
$newstext = stripslashes($data['newstext']);
preg_match('/src="([^"]+?)"/i', $newstext, $match);
$img = isset($match[1]) ? $match[1] : '';
}
if ($img && !preg_match('/^https?:/', $img)) {
$img = $ecms_config['site_url'] . $img;
}
$extra = [
'classid'=>$data['classid'],
];
\internalApi\ucenter\ElasContent::replace($id,$title,$content,$img,$url,$from,$createAt,$extra);
}
insert_dolog("classid=$add[classid]<br>id=".$add[id]."<br>title=".$add[title],$pubid);//操作日志
printerror("EditNewsSuccess",$ecmsfrom.$addecmscheck);
}
else
......@@ -756,6 +843,45 @@ function EditInfoSimple($add,$userid,$username){
$ecmsfrom="ListNews.php?bclassid=$add[bclassid]&classid=$add[classid]".hReturnEcmsHashStrHref2(0);
}
$ecmsfrom=$ecmsfrom.$addecmscheck;
//添加elas
$from = 's';
$id = $index_checkr['id'];
if(empty($newchecked)){
//删除
\internalApi\ucenter\ElasContent::delete($id,$from);
}else{
//修改
global $dbtbpre,$ecms_config;
$tablenews = "{$dbtbpre}ecms_news";
$tableDatas = "{$dbtbpre}ecms_news_data_1";
$sql = "select $tableDatas.newstext,$tablenews.* from $tablenews left JOIN $tableDatas on $tablenews.id = $tableDatas.id where $tablenews.id = $id ";
$data = $empire->fetch1($sql);
$content = cutstr_html($data['newstext']);
$id = $data['id'];
$title = $data['title'];
$createAt = $data['newstime'];
$url = $ecms_config['site_url'].$data['titleurl'];
//获取图片
$img = $data['titlepic'];
if (!$img) {
$newstext = stripslashes($data['newstext']);
preg_match('/src="([^"]+?)"/i', $newstext, $match);
$img = isset($match[1]) ? $match[1] : '';
}
if ($img && !preg_match('/^https?:/', $img)) {
$img = $ecms_config['site_url'] . $img;
}
$extra = [
'classid'=>$data['classid'],
];
\internalApi\ucenter\ElasContent::replace($id,$title,$content,$img,$url,$from,$createAt,$extra);
}
insert_dolog("classid=$add[classid]<br>id=".$add[id]."<br>title=".$add[title],$pubid);//操作日志
printerror("EditNewsSuccess",$closeurl,8);
}
......@@ -878,7 +1004,12 @@ function DelNews($id,$classid,$userid,$username){
$returl="ListNews.php?bclassid=$adddatar[bclassid]&classid=$adddatar[classid]".$addecmscheck.hReturnEcmsHashStrHref2(0);
}
}
insert_dolog("classid=$classid<br>id=".$id."<br>title=".$r[title],$pubid);//操作日志
//添加es
$from = 's';
\internalApi\ucenter\ElasContent::delete($id,$from);
insert_dolog("classid=$classid<br>id=".$id."<br>title=".$r[title],$pubid);//操作日志
printerror("DelNewsSuccess",$returl);
}
else
......
......@@ -306,4 +306,17 @@ function returnmsg($status=false, $msg='', $data='') {
exit();
}
function getucidbyuid($uid){
global $empire;
require_once __DIR__.'/../member/class/user.php';
$member = $empire->fetch1("SELECT ".eReturnSelectMemberF('*')." FROM ".eReturnMemberTable()." WHERE ".egetmf('userid')."={$uid} limit 1");
if (!$member) {
return false;
}
return $member['ucid'];
}
?>
\ No newline at end of file
......@@ -5,44 +5,107 @@ use internalApi\xue\CourseList;
function user_ibanshou($num)
{
require __DIR__.'/../extend/internalApi/autoload.php';
require __DIR__.'/../config/config_ibanshou.php';
require __DIR__ . '/../extend/internalApi/autoload.php';
require __DIR__ . '/../config/config_ibanshou.php';
\internalApi\base\Client::config($config['wxh.internal']['client']);
$thread = Thread::getHotThreads($num);
$list = CourseList::getRecommendList($num);
$str = '<div clas=\"recommend-info\">';
$str = '<div class="learnning-course newest">
<div class="tit">推荐课程<span></span><a href="'.$config['wxhpro']['xue'].'/home/all-course">全部课程</a></div>
<div class="newest-list clearfix">';
foreach ($list as $val) {
//自适应 http, https
$val['url'] = str_replace('http://', '//', $val['url']);
if ($val['homework'] == 4) {
if ($val['liveStatus'] == 0) {
$str .= <<<EOD
<div class="tuan-list">
<a href="{$val['url']}">
<img src="{$val['preview_pic']}-ym.preview\">
<h3>{$val['name']}</h3>
<p class="clearfix">
<span class="price">{$val['liveReservationNum']}<b>人已预约</b></span>
<span class="go-buy-btn">预约报名<i class="iconfont icon-xiangyou1"></i></span>
</p>
</a>
</div>
EOD;
} else {
foreach ($list as $val) {
$str .= "<div class=\"learn-course-box\">
<div class=\"lc-img\"><a href=\"{$val['url']}\"><img
src=\"{$val['preview_pic']}-ym.preview\"></a></div>
<h3><a href=\"{$val['url']}\">{$val['name']}</a></h3>
<p><span>{$val['favorite_count']}人已学</span><span>{$val['comment_count']}人评论</span></p>
</div>";
}
$str .= <<<EOD
<div class="tuan-list">
<a href="{$val['url']}">
<img src="{$val['preview_pic']}-ym.preview\">
<h3>{$val['name']}</h3>
<p class="clearfix">
<span class="price">{$val['liveWatchNum']}<b>人观看中</b></span>
<span class="go-buy-btn">正在直播<i class="iconfont icon-xiangyou1"></i></span>
</p>
</a>
</div>
EOD;
}
} else {
$str .= <<<EOD
<div class=\"news-item portal-course\">
<a href=\"{$val['url']}\" class=\"content pb-none\">
<div class=\"tit\">{$val['name']}</div>
$str .= '</div></div><div class="latest-news">
<div class="common-tit-index">热门互动<a href="'.$config['wxhpro']['bbs'].'">参与互动</a></div>
<ul class="news-list">';
<div class=\"img-item-box\">
<div class=\"img-item\"><img src=\"{$val['preview_pic']}-ym.preview\" alt=\"\"></div>
</div>
</a>
<div class=\"portal-news-info clearfix\">
<span class=\"time fl\">来自扳手学院</span>
<span class=\"fr\">{$val['view_count']}人阅读</span>
</div>
</div>
EOD;
}
}
foreach ($thread as $val) {
$val['image'] = $val['image'] ? : '/skin/default/images/notimg.gif';
$str .= "<li>
<a href=\"{$val['url']}\">
<h3>{$val['subject']}</h3>
<p>{$val['views']}人已参与</p>
<img src=\"{$val['image']}\">
</a>
</li>";
//自适应 http, https
$val['image'] = $val['image'] ? str_replace('http://', '//', $val['image']) : '/skin/default/images/notimg.gif';
$val['url'] = str_replace('http://', '//', $val['url']);
$str .= <<<EOD
<div class=\"news-item has-pic one-picture\">
<a href=\"{$val['url']}\" class=\"content pb-none\" style=\"min-height: 80px;\">
<div class=\"tit\">{$val['subject']}</div>
<div class=\"img-item-box clearfix\">
<div class=\"img-item\"><img src=\"{$val['image']}\" alt=\"\"></div>
</div>
</a>
<div class=\"portal-news-info clearfix\">
<span class=\"time fl\">来自扳手社区</span>
<span class=\"fr\">{$val['views']}人已参与</span>
</div>
</div>
EOD;
}
echo $str . '</ul></div>';
echo $str . '</div>';
}
function user_ago($tm, $rcs = 0)
{
$cur_tm = time();
$dif = $cur_tm - $tm;
$pds = array('秒', '分钟', '小时', '天', '周', '个月', '年');
$lngh = array(1, 60, 3600, 86400, 604800, 2630880, 31570560);
for ($v = sizeof($lngh) - 1; ($v >= 0) && (($no = $dif / $lngh[$v]) <= 1); $v--) ;
if ($v < 0) $v = 0;
$_tm = $cur_tm - ($dif % $lngh[$v]);
$no = floor($no);
//if($no <> 1) $pds[$v] .='s'; //+s
$x = sprintf("%d %s", $no, $pds[$v]);
if (($rcs == 1) && ($v >= 1) && (($cur_tm - $_tm) > 0)) $x .= time_ago($_tm);
return $x . "前";
}
?>
\ No newline at end of file
......@@ -17,8 +17,8 @@ $ecms_config['db']['dbport']='3306'; //端口,不填为按默认
$ecms_config['db']['dbusername']='integration'; //数据库用户名
$ecms_config['db']['dbpassword']=''; //数据库密码
$ecms_config['db']['dbname']='wxh_cms'; //数据库名
$ecms_config['db']['setchar']='utf8'; //设置默认编码
$ecms_config['db']['dbchar']='utf8'; //数据库默认编码
$ecms_config['db']['setchar']='utf8mb4'; //设置默认编码
$ecms_config['db']['dbchar']='utf8mb4'; //数据库默认编码
$ecms_config['db']['dbtbpre']='phome_'; //数据表前缀
$dbtbpre=$ecms_config['db']['dbtbpre']; //数据表前缀
$ecms_config['db']['showerror']=1; //显示SQL错误提示(0为不显示,1为显示)
......@@ -132,7 +132,7 @@ $ecms_config['sets']['realplayertype']=',.rm,.ra,.rmvb,.mp4,.mov,.avi,.wav,.ram,
//------------e_public
$public_r=array('sitename'=>'扳手 - 征集slogan',
'newsurl'=>'/',
'filetype'=>'|.gif|.jpg|.swf|.rar|.zip|.mp3|.wmv|.txt|.doc|',
'filetype'=>'|.gif|.jpg|.swf|.rar|.zip|.mp3|.mp4|.wmv|.txt|.doc|',
'filesize'=>2048,
'relistnum'=>8,
'renewsnum'=>100,
......@@ -242,7 +242,7 @@ $public_r=array('sitename'=>'扳手 - 征集slogan',
'gbkey_ok'=>0,
'fbkey_ok'=>0,
'newaddinfotime'=>0,
'classnavs'=>'<a href=\"/news/\">新闻</a>&nbsp;|&nbsp;<a href=\"/pinlei/\">品类</a>&nbsp;|&nbsp;<a href=\"/pinpai/\">品牌</a>&nbsp;|&nbsp;<a href=\"/huandeng/\">首页幻灯</a>',
'classnavs'=>'<a href=\"/news/\">新闻</a>&nbsp;|&nbsp;<a href=\"/pinlei/\">品类</a>&nbsp;|&nbsp;<a href=\"/pinpai/\">品牌</a>&nbsp;|&nbsp;<a href=\"/huandeng/\">首页幻灯</a>&nbsp;|&nbsp;<a href=\"/ceshi/\">测试</a>',
'adminstyle'=>',1,2,',
'docnewsnum'=>300,
'openschall'=>1,
......@@ -408,7 +408,7 @@ $emod_r[1]=Array('mid'=>1,
'qeditdofunf'=>'||',
'definfovoteid'=>0,
'orderf'=>'',
'sonclass'=>'|2|3|10|28|11|12|13|14|15|16|29|',
'sonclass'=>'|',
'tid'=>1,
'tbname'=>'news');
$emod_r[2]=Array('mid'=>2,
......
......@@ -2,7 +2,7 @@
$config = [
//是否使用用户中心
'isUseUcenter' => true,
'isUseUcenter' => TRUE,
//sso api config
'sso.apiurl' => 'http://u.yunya.com/api/',
......@@ -15,7 +15,7 @@ $config = [
'context' => '/cas',
'port' => 443,
'server_ca_cert_path' => '',
'debug' => true,
'debug' => TRUE,
'server_ip' => ['54.222.158.174'],
'logs' => 'e/data/phpcas.log',
'uc_base_url' => 'http://u.yunya.com/',
......@@ -31,9 +31,7 @@ $config = [
//wxh_internal_api
'wxh.internal' => [
'server' => [
'secret' => 'U2FsdGVkX19ZiutUoO6F',
],
'server_secret' => 'TveYDczsq7LTllIUlM5t',
'client' => [
'ucenter' => [
'apiUrl' => 'http://u.yunya.com/api/server',
......@@ -57,4 +55,52 @@ $config = [
],
],
],
'wechat' => [
/**
* Debug 模式,bool 值:true/false
*
* 当值为 false 时,所有的日志都不会记录
*/
'debug' => TRUE,
/**
* 账号基本信息,请从微信公众平台/开放平台获取
*/
'app_id' => 'wx1863a43cb12dea4f', // xiabin dev
'secret' => 'b708adbaecdecb89fdf73051197edcf2', // AppSecret
'token' => 'your-token', // Token
'aes_key' => '', // EncodingAESKey,安全模式下请一定要填写!!!
/**
* 日志配置
*
* level: 日志级别, 可选为:
* debug/info/notice/warning/error/critical/alert/emergency
* permission:日志文件权限(可选),默认为null(若为null值,monolog会取0644)
* file:日志文件位置(绝对路径!!!),要求可写权限
*/
'log' => [
'level' => 'debug',
'permission' => 0777,
'file' => '/tmp/easywechat.log',
],
/**
* OAuth 配置
*
* scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login
* callback:OAuth授权完成后的回调页地址
*/
'oauth' => [
'scopes' => ['snsapi_base'],
'callback' => '',
],
/**
* Guzzle 全局设置
*
* 更多请参考: http://docs.guzzlephp.org/en/latest/request-options.html
*/
'guzzle' => [
'timeout' => 8.0, // 超时时间(秒)
'verify' => FALSE, // 关掉 SSL 认证(强烈不建议!!!)
],
]
];
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>帝国CMS-视频播放器集合插件</title>
<style type=text/css>
<!--
{ font-family: 宋体; font-size: 12px; line-height: 19px; color: #333333;text-decoration: none} a:hover { color: #FF0000}a:hover { text-decoration: none}a:hover { line-height: 19px}a:link { font-family: 宋体; font-size: 14px; line-height: 19px; color: #333333;text-decoration: none} a:visited { text-decoration: none; }Table{ font-family: 宋体; font-size: 13px; color: #000000; line-height: 21px; text-decoration: none } }
.box {border: 1px solid #333333;height: 10px;width: 10px;font-size:1px;cursor:hand;filter:blur(add=ture,direction=135,strength=2);}
.STYLE1 {color: #666666}
-->
</Style>
</head>
<body>
<table width="800" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#4FB4DE">
<tr>
<td height="38"><div align="center"><strong><font color="#FFFFFF" size="4">帝国CMS-视频播放器集合插件使用说明</font></strong></div></td>
</tr>
<tr>
<td height="30" bgcolor="#FFFFFF"> <div align="center"><a href="http://www.phome.net/OpenSource/" target="_blank"><font color="#FF0000"><strong>帝国CMS - 最安全、最稳定的开源CMS系统</strong></font></a></div></td>
</tr>
<tr>
<td height="23" bgcolor="#C9F1FF"><strong>一、显示效果:</strong></td>
</tr>
<tr>
<td height="30" bgcolor="#FFFFFF"> <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td height="23"><div align="center"><img src="doc/demopic.jpg" width="600" height="404"></div></td>
</tr>
</table>
<br></td>
</tr>
<tr>
<td height="23" bgcolor="#C9F1FF"><strong>二、使用语法说明</strong></td>
</tr>
<tr>
<td height="30" bgcolor="#FFFFFF"> <table width="99%" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td height="25"><strong><font color="#0000FF">(一)、【显示视频播放器JS函数语法说明】</font></strong></td>
</tr>
<tr>
<td height="25"><strong>1、格式:</strong></td>
</tr>
<tr>
<td height="25"><textarea name="textarea" cols="60" rows="5" wrap="off" style="WIDTH:100%">&lt;script src=&quot;/e/data/modadd/moreplayer/empirecmsplayer.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
EmpireCMSPlayVideo('播放器类型','视频地址','显示宽度','显示高度',是否自动播放,'帝国CMS网站地址');
&lt;/script&gt;</textarea></td>
</tr>
<tr>
<td height="25">参数说明:</td>
</tr>
<tr>
<td height="25"><table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<td width="22%" bgcolor="#FFFFFF">播放器类型:</td>
<td width="78%" bgcolor="#FFFFFF">设为空''或'auto'为自动识别<br>
设为'flash'为采用flash播放器<br>
设为'jwplayer'为采用jwplayer播放器<br>
设为'realplayer'为采用realplayer播放器<br>
设为'mediaplayer'为采用mediaplayer播放器</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">视频地址:</td>
<td bgcolor="#FFFFFF">填要播放的视频地址,比如:http://localhost/file/movie.flv</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">显示宽度:</td>
<td bgcolor="#FFFFFF">视频显示的宽度。</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">显示高度:</td>
<td bgcolor="#FFFFFF">视频显示的高度。</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">是否自动播放:</td>
<td bgcolor="#FFFFFF">0为不自动播放,1为自动播放。</td>
</tr>
<tr>
<td bgcolor="#FFFFFF">帝国CMS网站地址:</td>
<td bgcolor="#FFFFFF">要以“/”结尾,也就是后台系统参数设置的网站地址,模板中用“[!--news.url--]”即可。</td>
</tr>
</table></td>
</tr>
<tr>
<td height="25">&nbsp;</td>
</tr>
<tr>
<td height="25"><strong>2、使用范例1:</strong></td>
</tr>
<tr>
<td height="25"><textarea name="textarea2" cols="80" rows="5" wrap="off" style="WIDTH:100%">&lt;script src=&quot;[!--news.url--]e/data/modadd/moreplayer/empirecmsplayer.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
EmpireCMSPlayVideo('auto','[!--movieurl--]','600','400',0,'[!--news.url--]');
&lt;/script&gt;</textarea></td>
</tr>
<tr>
<td height="25"><font color="#666666">(其中例子中的“[!--movieurl--]”是假设视频地址字段名是movieurl,“[!--news.url--]”为网站地址。)</font></td>
</tr>
<tr>
<td height="25"><strong>3、使用范例2:</strong>(不加到模板,直接在html页面中播放视频)</td>
</tr>
<tr>
<td height="25"><textarea name="textarea3" cols="80" rows="5" wrap="off" style="WIDTH:100%">&lt;script src=&quot;/e/data/modadd/moreplayer/empirecmsplayer.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
EmpireCMSPlayVideo('auto','http://localhost/file/movie.flv','600','400',0,'/');
&lt;/script&gt;</textarea></td>
</tr>
<tr>
<td height="25"><strong>4、使用范例3:</strong>(播放电影系统模型中的第一个视频地址)</td>
</tr>
<tr>
<td height="25"><textarea name="textarea5" cols="80" rows="10" wrap="off" style="WIDTH:100%">&lt;?php
$onlinepath=$navinfor['onlinepath'];//取得onlinepath字段内容
$olr=explode(egetzy('rn'),$onlinepath);
$olfr=explode('::::::',$olr[0]);
?&gt;
&lt;script src=&quot;[!--news.url--]e/data/modadd/moreplayer/empirecmsplayer.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
EmpireCMSPlayVideo('auto','&lt;?=$olfr[1]?&gt;','600','400',0,'[!--news.url--]');
&lt;/script&gt;</textarea></td>
</tr>
<tr>
<td height="25">&nbsp;</td>
</tr>
<tr>
<td height="25"><strong><font color="#0000FF">(二)、【完整范例】</font></strong></td>
</tr>
<tr>
<td height="25">
<textarea name="textarea4" cols="80" rows="22" wrap="off" style="WIDTH:100%">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=gb2312&quot;&gt;
&lt;title&gt;视频播放&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;table&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;script src=&quot;/e/data/modadd/moreplayer/empirecmsplayer.js&quot;&gt;&lt;/script&gt;
&lt;script&gt;
EmpireCMSPlayVideo('auto','http://localhost/file/movie.flv','600','400',0,'/');
&lt;/script&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/body&gt;
&lt;/html&gt;</textarea></td>
</tr>
<tr>
<td height="25">&nbsp;</td>
</tr>
</table></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<hr>
<table width="100%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td height="25">
<div align="center"><a href="http://www.phome.net" target="_blank">官方网站</a> |
<a href="http://bbs.phome.net" target="_blank">论坛交流</a> | <a href="http://www.phome.net/product/" target="_blank">产品中心</a>
| <a href="http://www.phome.net/download/" target="_blank">产品下载中心</a></div></td>
</tr>
</table>
</body>
</html>
//show
function EmpireCMSPlayVideo(vtype,furl,width,height,autostart,baseurl){
var filetype;
var cfiletype;
var playstr='';
var filetypeflash='|.swf|';
var filetypeflv='|.flv|';
var filetypemediaplayer='|.wmv|.asf|.wma|.mp3|.asx|.mid|.midi|';
var filetyperealplayer='|.rm|.ra|.rmvb|.mp4|.mov|.avi|.wav|.ram|.mpg|.mpeg|';
var filetypejwplayer='|.flv|.mp4|';
if(vtype=='auto'||vtype=='')
{
filetype=EmpireCMSPlayerGetFiletype(furl);
cfiletype='|'+filetype+'|';
if(filetypejwplayer.indexOf(cfiletype)!=-1)//jwplayer
{
playstr=EmpireCMSShowJwplayer(furl,width,height,autostart,baseurl);
}
else if(filetypeflash.indexOf(cfiletype)!=-1)//flash
{
playstr=EmpireCMSShowFlash(furl,width,height,autostart,baseurl);
}
else if(filetyperealplayer.indexOf(cfiletype)!=-1)//realplayer
{
playstr=EmpireCMSShowRealPlayer(furl,width,height,autostart,baseurl);
}
else//mediaplayer
{
playstr=EmpireCMSShowMediaPlayer(furl,width,height,autostart,baseurl);
}
}
else
{
if(vtype=='jwplayer')//jwplayer
{
playstr=EmpireCMSShowJwplayer(furl,width,height,autostart,baseurl);
}
else if(vtype=='flash')//flash
{
playstr=EmpireCMSShowFlash(furl,width,height,autostart,baseurl);
}
else if(vtype=='realplayer')//realplayer
{
playstr=EmpireCMSShowRealPlayer(furl,width,height,autostart,baseurl);
}
else//mediaplayer
{
playstr=EmpireCMSShowMediaPlayer(furl,width,height,autostart,baseurl);
}
}
document.write(playstr);
}
//filetype
function EmpireCMSPlayerGetFiletype(sfile){
var filetype,s;
s=sfile.lastIndexOf(".");
filetype=sfile.substring(s+1).toLowerCase();
return '.'+filetype;
}
//flash
function EmpireCMSShowFlash(furl,width,height,autostart,baseurl){
var str='';
str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+furl+'"><param name="quality" value="high"><embed src="'+furl+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'" autostart="'+autostart+'"></embed></object>';
return str;
}
//flv
function EmpireCMSShowFlv(furl,width,height,autostart,baseurl){
var str='';
var fname='';
str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'"><param name="movie" value="'+baseurl+'e/data/modadd/moreplayer/flv/flvplayer.swf?vcastr_file='+furl+'&vcastr_title='+fname+'&BarColor=0xFF6600&BarPosition=1&IsAutoPlay='+autostart+'"><param name="quality" value="high"><param name="allowFullScreen" value="true" /><embed src="flv/flvplayer.swf?vcastr_file='+furl+'&vcastr_title='+fname+'&BarColor=0xFF6600&BarPosition=1&IsAutoPlay='+autostart+'" allowFullScreen="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+width+'" height="'+height+'"></embed></object>';
return str;
}
//mediaplayer
function EmpireCMSShowMediaPlayer(furl,width,height,autostart,baseurl){
var str='';
str='<object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer" width="'+width+'" height="'+height+'"><PARAM NAME="AUTOSTART" VALUE="'+autostart+'"><param name="ShowStatusBar" value="-1"><param name="Filename" value="'+furl+'"><embed type="application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp" src="'+furl+'" width="'+width+'" height="'+height+'"></embed></object>';
return str;
}
//realplayer
function EmpireCMSShowRealPlayer(furl,width,height,autostart,baseurl){
var str='';
str='<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT="'+height+'" ID="Player" WIDTH="'+width+'" VIEWASTEXT><param NAME="_ExtentX" VALUE="12726"><param NAME="_ExtentY" VALUE="8520"><param NAME="AUTOSTART" VALUE="'+autostart+'"><param NAME="SHUFFLE" VALUE="0"><param NAME="PREFETCH" VALUE="0"><param NAME="NOLABELS" VALUE=0><param NAME=CONTROLS VALUE=ImageWindow><param NAME=CONSOLE VALUE=_master><param NAME=LOOP VALUE=0><param NAME=NUMLOOP VALUE=0><param NAME=CENTER VALUE=0><param NAME=MAINTAINASPECT VALUE="'+furl+'"><param NAME=BACKGROUNDCOLOR VALUE="#000000"></object><br><object CLASSID="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" HEIGHT=32 ID="Player" WIDTH="'+width+'" VIEWASTEXT><param NAME=_ExtentX VALUE=18256><param NAME=_ExtentY VALUE=794><param NAME=AUTOSTART VALUE="'+autostart+'"><param NAME=SHUFFLE VALUE=0><param NAME=PREFETCH VALUE=0><param NAME=NOLABELS VALUE=0><param NAME=CONTROLS VALUE=controlpanel><param NAME=CONSOLE VALUE=_master><param NAME=LOOP VALUE=0><param NAME=NUMLOOP VALUE=0><param NAME=CENTER VALUE=0><param NAME=MAINTAINASPECT VALUE=0><param NAME=BACKGROUNDCOLOR VALUE="#000000"><param NAME=SRC VALUE="'+furl+'"></object>';
return str;
}
//jwplayer
function EmpireCMSShowJwplayer(furl,width,height,autostart,baseurl){
var str='';
str='<scri'+'pt type="text/javascript" src="'+baseurl+'e/data/modadd/moreplayer/jwplayer/jwplayer.js"></scri'+'pt><div id="EmpireCMSmyElement">Loading the player...</div><scri'+'pt type="text/javascript">jwplayer("EmpireCMSmyElement").setup({ autostart:'+autostart+',file: "'+furl+'",height:'+height+',width:'+width+' });</scri'+'pt>';
return str;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -76,7 +76,7 @@ class ClientCas
}
phpCAS::client(CAS_VERSION_2_0, $this->host, $this->port, $this->context);
phpCAS::setNoCasServerValidation();
phpCAS::handleLogoutRequests(true, $this->serverIp);
phpCAS::handleLogoutRequests(FALSE, $this->serverIp);
phpCAS::forceAuthentication();
}
......
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/7/6
* Time: 11:46
*/
namespace internalApi\base;
/**
* 接口异常
*
* 本异常为目标接口业务异常
* 所的目标接口抛出的异常到客户端后均抛出为本异常
*
* @package internalApi\base
*/
class ApiException extends \Exception
{
}
\ No newline at end of file
This diff is collapsed.
......@@ -8,7 +8,14 @@
namespace internalApi\base;
class ClientException extends \ErrorException
/**
* 客户端异常
*
* 本异常为非业务异常
* 如调用请求发送失败,数据异常,网络异常,接口参数不一致等程序和服务器环境导致的无法正常发送和解析接口的请求问题
*
* @package internalApi\base
*/
class ClientException extends \Exception
{
}
\ No newline at end of file
......@@ -94,7 +94,11 @@ class Server
}
}
$data = call_user_func_array($callable, $params);
try {
$data = call_user_func_array($callable, $params);
} catch (\Exception $e) {
$this->responseException($e);
}
if ($return) {
return $data;
......@@ -104,6 +108,24 @@ class Server
}
}
/**
* @param \Exception $e
*/
public function responseException($e)
{
header('HTTP/1.0 500 Internal Server Error');
$exception = [
'class' => get_class($e),
'code' => $e->getCode(),
'message' => $e->getMessage(),
'line' => $e->getFile(),
'file' => $e->getFile(),
'traceString' => $e->getTraceAsString()
];
echo 'exception:'.json_encode($exception, JSON_UNESCAPED_UNICODE);
exit;
}
public function responseError($message)
{
header('HTTP/1.0 403 Forbidden');
......
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/27
* Time: 16:44
*/
namespace internalApi\base;
class ServerException extends \Exception
{
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 07/02/2018
* Time: 10:47 AM
*/
namespace internalApi\bbs;
use internalApi\base\Client;
class Tcptuan extends Client
{
public static function getGoods($num = 3)
{
return self::call('tcptuan.getGoods',compact('num'));
}
}
\ No newline at end of file
......@@ -13,13 +13,38 @@ use internalApi\base\Client;
class Thread extends Client
{
public static function getHotThreads($num=1)
public static function getHotThreads($num = 1)
{
return self::call('thread.getHotThreads', compact('num'));
}
/**
* 获取指定用户发表的帖子的数量
* @param int $uid
* @return int
*/
public static function countThreads($uid)
{
return self::call('thread.countThreads', compact('uid'));
}
/**
* 根据帖子ID获取帖子信息
* @param int $tid
* @return array|null
*/
public static function info($tid)
{
return self::call('thread.info', compact('tid'));
}
/**
* 获取未解决问题数量
* @return mixed
*/
public static function getUnresolveQustion()
{
return self::call('thread.getUnresolveQustion');
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/8/23
* Time: 11:28
*/
namespace internalApi\bbs;
use internalApi\base\Client;
class User extends Client
{
/**
* 同步更新用户基本信息
*
* @param int $uid
* @param array $data
* @return bool
*/
public static function updateSync($uid, $data)
{
return self::call('user.updateSync', compact('uid', 'data'));
}
/**
* 获取金币
* @param $uid
* @return mixed
*/
public static function getGoldCoin($uid)
{
return self::call('user.getGoldCoin', compact('uid'));
}
/**
* @param string $telephone 手机号
* @param int $num 加减的数量 +-num
* @param string $title 记录标题 例如 完工奖励
* @param string $text 记录内容 例如 完成工单奖励金钱+<span>5<span>
* @return mixed
*/
public static function updateGoldCoin($telephone,$num,$title,$text){
return self::call('user.updateGoldCoin', compact('telephone','num','title','text'));
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/4/8
* Time: 9:56
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
class Credit extends Client
{
/**
* 添加积分
* @param $userId
* @param $creditRuleId
* @return mixed
*/
public static function addCreditLog($userId,$creditRuleId)
{
return self::call('credit.addCreditLog',compact('userId','creditRuleId'));
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 11/10/2017
* Time: 5:03 PM
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
class ElasContent extends Client
{
/**
* @param $id //数据id
* @param $title //标题
* @param $contentData //纯文本内容
* @param $pic //图片 没有预览图去文本第一章
* @param $url
* @param $from bbs xue s
* @param $createdAt //创建时间
* @param $extra //额外属性 array
* @return mixed
*/
public static function replace($id, $title, $contentData, $pic,$url,$from, $createdAt, $extra){
return self::call('elasContent.replace',compact('id','title','contentData','pic','url','from','createdAt','extra'));
}
/**
* delete
* @param $id
* @param $from bbs xue s
* @return mixed
*/
public static function delete($id,$from){
return self::call('elasContent.delete',compact('id','from'));
}
}
\ No newline at end of file
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/30
* Time: 15:08
*/
namespace internalApi\ucenter;
use internalApi\base\Client;
/**
* 用户中心消息服务
*
* @package internalApi\ucenter
*/
class Message extends Client
{
/**
* 向指定号码发送短信
*
* @param string $tel
* @param string $content
* @param string $signature 短信签名,中括号【】中的内容
* @return bool|string 成功返回 true,失败返回错误文本
*/
public static function sendSms($tel, $content, $signature)
{
return self::call('message.sendSms', compact('tel', 'content', 'signature'));
}
/**
* 向指定用户发送短信
*
* @param int $uid
* @param string $content
* @param string $signature 短信签名,中括号【】中的内容
* @return bool|string 成功返回 true,失败返回错误文本
*/
public static function sendSmsByUid($uid, $content, $signature)
{
return self::call('message.sendSmsByUid', compact('uid', 'content', 'signature'));
}
/***
* @param $userId
* @param $title
* @param $sourceUrl
* @param $from 0:xue 1:bbs 2:s
* @param $type 0:评论 1:帖子
* @param $commentId
* @param $replyUserId
* @param string $replyedComment
* @param string $extra
* @return mixed
*/
public static function addComment($userId, $title, $sourceUrl, $from, $type, $commentId, $replyUserId, $replyedComment = '',$extra = '')
{
return self::call('message.addComment', compact('userId', 'title', 'sourceUrl', 'from', 'type', 'commentId', 'replyUserId', 'replyedComment','extra'));
}
/**
* @param $userId
* @param $title
* @param $sourceUrl
* @param $from
* @param $type
* @param $sourceId 点赞的评论id
* @param $likeUserId
* @param $likedComment
* @return mixed
*/
public static function addLike($userId, $title, $sourceUrl, $from, $type, $sourceId, $likeUserId, $likedComment = '')
{
return self::call('message.addLike', compact('userId', 'title', 'sourceUrl', 'from', 'type', 'sourceId', 'likeUserId', 'likedComment'));
}
/**
* @param $userId
* @param $title
* @param $desc
* @param $from
* @param $type
* @param string $content
* @param int $toUser 0系统消息其它为用户id,多个用户id数组
* @return mixed
*/
public static function add($userId, $title, $desc, $from, $type, $content = '', $toUser = 0)
{
return self::call('message.add', compact('userId', 'title', 'desc', 'from', 'type', 'content', 'toUser'));
}
/**
* 删除评论消息
* @param $userId
* @param $from
* @param $type
* @param $commentId
* @return mixed
*/
public static function deleteComment($userId, $from, $type, $commentId)
{
return self::call('message.deleteComment', compact('userId', 'from', 'type', 'commentId'));
}
/**
* 删除点赞
* @param $userId
* @param $from
* @param $type
* @param $sourceId
* @return mixed
*/
public static function deleteLiked($userId, $from, $type, $sourceId)
{
return self::call('message.deleteLiked', compact('userId', 'from', 'type', 'sourceId'));
}
}
\ No newline at end of file
......@@ -22,7 +22,7 @@ if ($mod == 'login') {
$ssoapi = new ClientUser();
$result = $ssoapi->cas($phpcas['id']);
if ($result['status'] == 'fail' || !$result['data']) {
printerrortourl('/',"CAS接口错误", 3);
printerrortourl('/',"CAS接口错误".json_encode($result['data']), 3);
}
$member = $result['data'];
......
......@@ -5,6 +5,14 @@ if(!defined('InEmpireCMS'))
}
define('InEmpireCMSUser',TRUE);
//set session expiration
ini_set('session.gc_maxlifetime', 1296000);
// each client should remember their session id for EXACTLY 1 hour
session_set_cookie_params(1296000);
session_start();
//--------------- 扩展函数 ---------------
//登录附加cookie
......
<?php
require("../../class/connect.php");
require(__DIR__ . "/../../class/db_sql.php");
require(__DIR__ . "/../../member/class/user.php");
require(__DIR__ . "/../../class/q_functions.php");
$iscas = getcvar('mlcas');
if($iscas){
$link=db_connect();
$empire=new mysqlquery();
$user = islogin();
$ucid = $user['ucid'];
}
?>
<?php if (!$iscas) { ?>
$(function(){
$(".books").attr("href", "/e/member/login");
$("#loginGits").attr("style", "display:block;");
});
<?php }else { ?>
var zhugeCheckRunHandler = false;
function zhugeCheckRun(){
if(!window.zhuge){
zhugeCheckRunHandler = setTimeout(zhugeCheckRun,500);
}else{
clearTimeout(zhugeCheckRunHandler);
window.zhuge.identify("<?=$ucid?>");
}
}
zhugeCheckRun();
<?php } ?>
<?php
require("../../class/connect.php");
require(__DIR__ . "/../../class/db_sql.php");
require(__DIR__ . "/../../member/class/user.php");
require(__DIR__ . "/../../class/q_functions.php");
$iscas = getcvar('mlcas');
if($iscas){
$link=db_connect();
$empire=new mysqlquery();
$user = islogin();
$ucid = $user['ucid'];
}
?>
<?php if (!$iscas) { ?>
$(".send-comment").attr("href", "/e/member/login");
<?php }else { ?>
var zhugeCheckRunHandler = false;
function zhugeCheckRun(){
if(!window.zhuge){
zhugeCheckRunHandler = setTimeout(zhugeCheckRun,500);
}else{
clearTimeout(zhugeCheckRunHandler);
window.zhuge.identify("<?=$ucid?>");
}
}
zhugeCheckRun();
<?php } ?>
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 14/10/2017
* Time: 4:52 PM
*/
require '../class/connect.php';
require '../class/db_sql.php';
require '../class/q_functions.php';
require '../extend/internalApi/autoload.php';
require '../config/config_ibanshou.php';
\internalApi\base\Client::config($config['wxh.internal']['client']);
$link = db_connect();
$empire = new mysqlquery();
$tablenews = "{$dbtbpre}ecms_news";
$tableDatas = "{$dbtbpre}ecms_news_data_1";
$offset = 0;
$limit = 100;
$start = 0;
$count = 0;
while($start == 0 or $count >= $limit ){
$sql = "select $tableDatas.newstext,$tablenews.* from $tablenews left JOIN $tableDatas on $tablenews.id = $tableDatas.id where $tablenews.id > $start limit $limit offset $offset ";
$query = $empire->query($sql);
$count = $empire->num1($query);
while($data = $empire->fetch($query)){
$content = cutstr_html($data['newstext']);
$id = $data['id'];
$title = $data['title'];
$from = 's';
$createAt = $data['newstime'];
$url = $ecms_config['site_url'].$data['titleurl'];
//获取图片
$img = $data['titlepic'];
if (!$img) {
$newstext = stripslashes($data['newstext']);
preg_match('/src="([^"]+?)"/i', $newstext, $match);
$img = isset($match[1]) ? $match[1] : '';
}
if ($img && !preg_match('/^https?:/', $img)) {
$img = $ecms_config['site_url'] . $img;
}
$extra = [
'classid'=>$data['classid'],
];
\internalApi\ucenter\ElasContent::replace($id,$title,$content,$img,$url,$from,$createAt,$extra);
echo "{$data['id']} {$data['title']}\n";
$start = $data['id'];
}
}
function cutstr_html($string)
{
$string = strip_tags($string);
$string = trim($string);
$string = mb_ereg_replace("\t", "", $string);
$string = mb_ereg_replace("\r\n", "", $string);
$string = mb_ereg_replace("\r", "", $string);
$string = mb_ereg_replace("\n", "", $string);
$string = mb_ereg_replace(" ", "", $string);
return trim($string);
}
This diff is collapsed.
<?php
$config = [
//是否使用用户中心
'isUseUcenter' => TRUE,
//sso api config
'sso.apiurl' => 'http://u.yunya.com/api/',
'sso.appid' => '10001',
'sso.appkey' => 'oY4@1f0#Io1u!Cd4@NJ#9YJFj1s@EGfDI@VA#vvRbqO',
//cas configs
'cas.configs' => [
'host' => 'sso.weixiuhui.cn',
'context' => '/cas',
'port' => 443,
'server_ca_cert_path' => '',
'debug' => TRUE,
'server_ip' => ['54.222.158.174'],
'logs' => 'e/data/phpcas.log',
'uc_base_url' => 'http://u.yunya.com/',
],
//产品
'wxhpro' => [
'ucenter' => 'http://u.yunya.com',
'xue' => 'http://xue.yunya.com',
's' => 'http://s.yunya.com',
'bbs' => 'http://bbs.yunya.com',
],
//wxh_internal_api
'wxh.internal' => [
'server_secret' => 'TveYDczsq7LTllIUlM5t',
'client' => [
'ucenter' => [
'apiUrl' => 'http://u.yunya.com/api/server',
'clientId' => 'common',
'clientSecret' => 'Kuy2dVHKRWKAFRXX2l6k'
],
'xue' => [
'apiUrl' => 'http://xue.yunya.com/api',
'clientId' => 'common',
'clientSecret' => 'Z2oKgZYYc8mznesYMf1o'
],
'code' => [
'apiUrl' => 'http://dev.wxherr.com/site/api-server',
'clientId' => 'common',
'clientSecret' => '1BO1WQwnpjc2GfjzrOuq'
],
'bbs' => [
'apiUrl' => 'http://bbs.yunya.com/api/server.php',
'clientId' => 'common',
'clientSecret' => 'U2FsdGVkX19ZiutUoO6F'
],
],
],
'wechat' => [
/**
* Debug 模式,bool 值:true/false
*
* 当值为 false 时,所有的日志都不会记录
*/
'debug' => TRUE,
/**
* 账号基本信息,请从微信公众平台/开放平台获取
*/
'app_id' => 'wx1863a43cb12dea4f', // xiabin dev
'secret' => 'b708adbaecdecb89fdf73051197edcf2', // AppSecret
'token' => 'your-token', // Token
'aes_key' => '', // EncodingAESKey,安全模式下请一定要填写!!!
/**
* 日志配置
*
* level: 日志级别, 可选为:
* debug/info/notice/warning/error/critical/alert/emergency
* permission:日志文件权限(可选),默认为null(若为null值,monolog会取0644)
* file:日志文件位置(绝对路径!!!),要求可写权限
*/
'log' => [
'level' => 'debug',
'permission' => 0777,
'file' => '/tmp/easywechat.log',
],
/**
* OAuth 配置
*
* scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login
* callback:OAuth授权完成后的回调页地址
*/
'oauth' => [
'scopes' => ['snsapi_base'],
'callback' => '',
],
/**
* Guzzle 全局设置
*
* 更多请参考: http://docs.guzzlephp.org/en/latest/request-options.html
*/
'guzzle' => [
'timeout' => 8.0, // 超时时间(秒)
'verify' => FALSE, // 关掉 SSL 认证(强烈不建议!!!)
],
]
];
\ No newline at end of file
<?php
/**
* The manifest of files that are local to specific environment.
* This file returns a list of environments that the application
* may be installed under. The returned data must be in the following
* format:
*
* ```php
* return [
* 'environment name' => [
* 'path' => 'directory storing the local files',
* 'skipFiles' => [
* // list of files that should only copied once and skipped if they already exist
* ],
* 'setWritable' => [
* // list of directories that should be set writable
* ],
* 'setExecutable' => [
* // list of files that should be set executable
* ],
* 'setCookieValidationKey' => [
* // list of config files that need to be inserted with automatically generated cookie validation keys
* ],
* 'createSymlink' => [
* // list of symlinks to be created. Keys are symlinks, and values are the targets.
* ],
* ],
* ];
* ```
*/
return [
'Development' => [
'path' => 'dev',
],
'Prod' => [
'path' => 'prod',
],
'Test' => [
'path' => 'test',
]
];
This diff is collapsed.
<?php
$scheme = (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'http') ? $_SERVER['REQUEST_SCHEME'] : 'https';
$config = [
//是否使用用户中心
'isUseUcenter' => true,
//sso api config
'sso.apiurl' => 'http://u.ibanshou.cn/api/',
'sso.appid' => '10001',
'sso.appkey' => 'oY4@1f0#Io1u!Cd4@NJ#9YJFj1s@EGfDI@VA#vvRbqO',
//cas configs
'cas.configs' => [
'host' => 'sso.weixiuhui.cn',
'context' => '/cas',
'port' => 443,
'server_ca_cert_path' => '',
'debug' => FALSE,
'server_ip' => ['54.222.158.174', '172.31.12.30','111.230.165.181'],
'logs' => 'e/data/phpcas.log',
'uc_base_url' => $scheme.'://u.ibanshou.cn/',
],
//产品
'wxhpro' => [
'ucenter' => $scheme.'://u.ibanshou.cn',
'xue' => $scheme.'://xue.ibanshou.cn',
's' => $scheme.'://s.ibanshou.cn',
'bbs' => $scheme.'://bbs.ibanshou.cn',
],
//wxh_internal_api
'wxh.internal' => [
'server_secret' => 'TveYDczsq7LTllIUlM5t',
'client' => [
'ucenter' => [
'apiUrl' => 'http://u.ibanshou.cn/api/server',
'clientId' => 'common',
'clientSecret' => 'HjEfzuGmoVbBPSDVg9ig'
],
'xue' => [
'apiUrl' => 'http://xue.ibanshou.cn/api',
'clientId' => 'common',
'clientSecret' => 'hv2yWxz2P0ALwMr7jXdO'
],
'code' => [
'apiUrl' => 'http://code.ibanshou.cn/site/api-server',
'clientId' => 'common',
'clientSecret' => '2LMbaS2Ac9a2cPPBlZwq'
],
'bbs' => [
'apiUrl' => 'http://bbs.ibanshou.cn/api/server.php',
'clientId' => 'common',
'clientSecret' => '1WQwnpjcURS0JwSkdiq3r'
],
]
],
'wechat' => [
/**
* Debug 模式,bool 值:true/false
*
* 当值为 false 时,所有的日志都不会记录
*/
'debug' => FALSE,
/**
* 账号基本信息,请从微信公众平台/开放平台获取
*/
'app_id' => 'wx36d4b32ad497a7f1', //weixin2@pp.cc
'secret' => '734c41eefc2c55729a51a958e16d2dc2', // AppSecret
'token' => 'your-token', // Token
'aes_key' => '', // EncodingAESKey,安全模式下请一定要填写!!!
/**
* 日志配置
*
* level: 日志级别, 可选为:
* debug/info/notice/warning/error/critical/alert/emergency
* permission:日志文件权限(可选),默认为null(若为null值,monolog会取0644)
* file:日志文件位置(绝对路径!!!),要求可写权限
*/
'log' => [
'level' => 'notice',
'permission' => 0777,
'file' => '/tmp/easywechat.log',
],
/**
* OAuth 配置
*
* scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login
* callback:OAuth授权完成后的回调页地址
*/
'oauth' => [
'scopes' => ['snsapi_base'],
'callback' => '',
],
/**
* Guzzle 全局设置
*
* 更多请参考: http://docs.guzzlephp.org/en/latest/request-options.html
*/
'guzzle' => [
'timeout' => 8.0, // 超时时间(秒)
'verify' => FALSE, // 关掉 SSL 认证(强烈不建议!!!)
],
]
];
\ No newline at end of file
This diff is collapsed.
<?php
$config = [
//是否使用用户中心
'isUseUcenter' => true,
//sso api config
'sso.apiurl' => 'http://u.test.yunyamooc.com/api/',
'sso.appid' => '10001',
'sso.appkey' => 'oY4@1f0#Io1u!Cd4@NJ#9YJFj1s@EGfDI@VA#vvRbqO',
//cas configs
'cas.configs' => [
'host' => 'sso.weixiuhui.cn',
'context' => '/cas',
'port' => 443,
'server_ca_cert_path' => '',
'debug' => false,
'server_ip' => ['54.222.158.174','111.230.165.181'],
'logs' => 'e/data/phpcas.log',
'uc_base_url' => 'http://u.test.yunyamooc.com/',
],
//产品
'wxhpro' => [
'ucenter' => 'http://u.test.yunyamooc.com',
'xue' => 'http://xue.test.yunyamooc.com',
's' => 'http://s.test.yunyamooc.com',
'bbs' => 'http://bbs.test.yunyamooc.com',
],
//wxh_internal_api
'wxh.internal' => [
'server_secret' => 'TveYDczsq7LTllIUlM5t',
'client' => [
'ucenter' => [
'apiUrl' => 'http://u.test.yunyamooc.com/api/server',
'clientId' => 'common',
'clientSecret' => 'z1z7AZCWpbEkfWpak0dx'
],
'xue' => [
'apiUrl' => 'http://xue.test.yunyamooc.com/api',
'clientId' => 'common',
'clientSecret' => 'AwT3YKykIwkREb48C1w3'
],
'code' => [
'apiUrl' => 'http://testserv.pp.cc/wxherr/site/api-server',
'clientId' => 'common',
'clientSecret' => 'VBz7nU9qIeKUCjY89poG'
],
'bbs' => [
'apiUrl' => 'http://bbs.test.yunyamooc.com/api/server.php',
'clientId' => 'common',
'clientSecret' => 'AJmfi4ORZURS0JwSkdiq3r'
],
],
],
'wechat' => [
/**
* Debug 模式,bool 值:true/false
*
* 当值为 false 时,所有的日志都不会记录
*/
'debug' => false,
/**
* 账号基本信息,请从微信公众平台/开放平台获取
*/
'app_id' => 'wx81144f73d043d453', // 未迟 dev
'secret' => '5cf8cc7adcfce108d1ef3c9c1a831457', // AppSecret
'token' => 'your-token', // Token
'aes_key' => '', // EncodingAESKey,安全模式下请一定要填写!!!
/**
* 日志配置
*
* level: 日志级别, 可选为:
* debug/info/notice/warning/error/critical/alert/emergency
* permission:日志文件权限(可选),默认为null(若为null值,monolog会取0644)
* file:日志文件位置(绝对路径!!!),要求可写权限
*/
'log' => [
'level' => 'debug',
'permission' => 0777,
'file' => '/tmp/easywechat.log',
],
/**
* OAuth 配置
*
* scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login
* callback:OAuth授权完成后的回调页地址
*/
'oauth' => [
'scopes' => ['snsapi_base'],
'callback' => '',
],
/**
* Guzzle 全局设置
*
* 更多请参考: http://docs.guzzlephp.org/en/latest/request-options.html
*/
'guzzle' => [
'timeout' => 8.0, // 超时时间(秒)
'verify' => FALSE, // 关掉 SSL 认证(强烈不建议!!!)
],
]
];
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
File deleted
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
skin/default/images/icon_quick_link.png

13.4 KB | W: | H:

skin/default/images/icon_quick_link.png

29.3 KB | W: | H:

skin/default/images/icon_quick_link.png
skin/default/images/icon_quick_link.png
skin/default/images/icon_quick_link.png
skin/default/images/icon_quick_link.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit6777176e99b57eba18246c0c273a6099::getLoader();
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment