Browse Source

初始提交

master
xiaowei 4 years ago
commit
713566ee74
  1. 707
      iframe.php
  2. 67
      index.html
  3. 77
      index.php
  4. 37
      index/destroySession.php
  5. 66
      index/getActivity.php
  6. 267
      index/getUserInfo.class.php
  7. 15
      index/index.php
  8. 38
      index/judgeIsLogin.php
  9. 32
      index/logOut.php
  10. 56
      index/saveActivity.php
  11. 8
      index/synLogin.php
  12. 73
      judgeSource.php
  13. 31
      login.php
  14. 62
      modified.php

707
iframe.php

@ -0,0 +1,707 @@
<!DOCTYPE html>
<html lang="cmn-Hant-TW">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name ="viewport" content ="initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<!-- 上述3個meta標籤*必須*放在最前面,任何其他內容都*必須*跟隨其後! -->
<!-- 自定義TDK -->
<title>帆軟線上直播培訓開始報名啦!</title>
<meta name="keywords" content="帆軟課程,帆軟教學,finereport教學,finereport課程,finereport學習" />
<meta name="description" content="" />
<!-- Bootstrap -->
<link href="http://www.finereport.com/tw/wp-content/themes/BusinessNews/bootstrap.min.css" rel="stylesheet">
<style type="text/css">
body,html{
font-family:'苹方-简体','冬青黑体简体中文','微软雅黑','OpenSans','Myriad Pro','Verdana';
}
h1 {color: #191e28;font-size: 24px;}
h2 {color: #191e28;font-size: 24px;}
h3,h4 {color: #191e28;font-size: 16px;}
p {color: #7d8189;font-size: 13px; line-height: 25px;}
.navbar-default{padding: 0 2%;}
.navbar-default .navbar-nav>li>a{font-size: 14px;color: #191e28;}
.navbar-default .navbar-nav>li>a:hover{color: #20ade5;}
.navbar-brand {padding: 8px 15px;}
#headnav {padding-left:0%;}
.dropdown-menu>li>a {font-size: 13px;color: #7d8189;padding:5px 15px;}
.dropdown-menu>li>a:hover, .dropdown-menu>li>a:focus{color: #20ade5;background-color: #f2f3f4;}
.navbar-default .navbar-nav>.open>a, .navbar-default .navbar-nav>.open>a:focus, .navbar-default .navbar-nav>.open>a:hover{
color: #20ade5;
background-color: #f2f3f4;
}
.dropdown-menu{
border-radius:0;
-webkit-box-shadow:0 0 0;
box-shadow:0 0 0;
border: 0;
border-bottom: 3px solid #20ade5;
}
/*巨型导航*/
.megamenu {width: 120px;}
.megamenu>li>ul {padding-left: 0;}
.megamenu>li>ul>li {
list-style: none;
}
.megamenu .dropdown-header{
padding: 5px 0px;
font-size: 13px;
color: #20ade5;
}
.dropdown-menu .divider{margin: 3px 0;}
.megamenu>li>ul>li>a {
font-size: 13px;
display: block;
padding: 5px 0px;
clear: both;
font-weight: normal;
color: #7d8189;
white-space: normal;
}
.megamenu>li>ul>li>a:hover, .megamenu>li>ul>li>a:focus {
text-decoration: none;
color: #20ade5;
background-color: #f2f3f4;
}
/*列表组,按钮,巨幕*/
.list-group-item.active, .list-group-item.active:focus, .list-group-item.active:hover{
background-color: #007ed3;
border-color: #007ed3;
}
.btn{border-radius: 3px;}
.btn-primary
{
background-color:rgba(255,255,255,0);
border-color: #fff;
color: #fff;
height: 40px;
font-size: 16px;
}
.btn-primary:hover{
background-color:rgba(255,255,255,0.2);
border-color: #fff;
color: #fff;
}
.jumbotron h1 {color: #f2f4f6;font-size: 36px;}
.fastlink {padding-top:30px;padding-bottom:60px;}
.thumbnail a>img, .thumbnail>img{max-height:100px;}
/*返回顶部*/
p#back-to-top{
position:fixed;
display:none;
bottom:50px;
right:40px;
}
p#back-to-top a{
text-align:center;
text-decoration:none;
color:#d1d1d1;
display:block;
width:64px;
/*使用CSS3中的transition属性给跳转链接中的文字添加渐变效果*/
-moz-transition:color 0.5s;
-webkit-transition:color 0.5s;
-o-transition:color 0.5s;
}
p#back-to-top a:hover{
color:#979797;
}
p#back-to-top a span{
background:transparent url(/tw/wp-content/themes/BusinessNews/images/top.png) no-repeat;
border-radius:6px;
display:block;
height:60px;
width:60px;
margin:auto;
margin-bottom:5px;
/*使用CSS3中的transition属性给<span>标签背景颜色添加渐变效果*/
-moz-transition:background 0.5s;
-webkit-transition:background 0.5s;
-o-transition:background 0.5s;
}
#back-to-top a:hover span{
background:transparent url(/tw/wp-content/themes/BusinessNews/images/top.png) no-repeat;
}
@media screen and (max-width: 600px) {
p#back-to-top{
position:fixed;
display:none;
bottom:10px;
right:10px;
}
}
</style>
<style type="text/css">
.main-container{
margin-top: 51px;
}
.bot-nav{
padding-top: 30px;
padding-bottom: 30px;
background-color: #191e28;
}
.bot-nav ol, ul {padding-left: 0;}
.bot-nav .list-group-item{
background-color: #191e28;
padding-top: 5px;
padding-bottom: 5px;
border: 0;
}
.bot-nav h4{color: #20ade5;}
.bot-nav h5{color: #20ade5;font-size: 12px;}
.list-group-item a{color: #7d8189; font-size: 13px;}
.abstract>.col-md-9 h3{color:#20ade5;}
.singleimg{
margin: auto;
padding-bottom: 20px;
}
</style>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?43132450b0024686537065a45a188634";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', '1348010421977092');
fbq('track', 'PageView');
</script>
<noscript><img height="1" width="1" style="display:none"
src="https://www.facebook.com/tr?id=1348010421977092&ev=PageView&noscript=1"
/></noscript>
<!-- DO NOT MODIFY -->
<!-- End Facebook Pixel Code -->
</head>
<body>
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/zh_TW/sdk.js#xfbml=1&version=v2.8";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
 <!-- .navbar-toggle样式用于toggle收缩的内容,即nav-collapse collapse样式所在元素 -->
<button class="navbar-toggle" type="button" data-toggle="collapse" data-target=".navbar-responsive-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<!-- 確保無論是寬屏還是窄屏,navbar-brand都顯示 -->
<a href="http://www.finereport.com/tw/" class="navbar-brand"><img src="http://www.finereport.com/tw/wp-content/themes/BusinessNews/images/logo20160727.png" alt="帆軟LOGO" width="350"></a>
</div>
<!-- 屏幕寬度小於768px時,div.navbar-responsive-collapse容器里的內容都會隱藏,顯示icon-bar圖標,當點擊icon-bar圖標時,再展開。屏幕大於768px時,默認顯示。 -->
<div class="collapse navbar-collapse navbar-responsive-collapse">
<ul class="nav navbar-nav" id="headnav">
<li><a href="/tw/">首頁</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="http://www.finereport.com/tw/products">產品中心<span class="caret"></span></a>
<ul class="dropdown-menu megamenu row">
<li class="col-sm-4">
<ul>
<li class="divider"></li>
<li><a href="/tw/products">產品簡介</a></li>
<li><a href="/tw/products/function">功能詳解</a></li>
<li><a href="http://www.finereporthelp.com:8889/demo/ReportServer?op=fs" target="_blank">演示Demo</a></li>
<li><a href="/tw/products/trial">免費下載</a></li>
<li><a href="/tw/products/frlogin">獲取激活碼</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="/tw/success">客戶案例<span class="caret"></span></a>
<ul class="dropdown-menu megamenu row">
<li class="col-sm-4">
<ul>
<li class="divider"></li>
<li><a href="/tw/success/customers" rel="nofollow">客戶列表</a></li>
<li><a href="/tw/success/reviews" rel="nofollow">客戶評價</a></li>
<li><a href="/tw/success/real-estate" rel="nofollow">企業案例</a></li>
<li><a href="/tw/knowledge/businessanalysis" rel="nofollow">業務案例</a></li>
<li><a href="/tw/products/mobile" rel="nofollow">行動BI方案</a></li>
<li><a href="/tw/products/imax" rel="nofollow">數據大屏方案</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="http://www.finereport.com/tw/knowledge">使用教學<span class="caret"></span></a>
<ul class="dropdown-menu megamenu row">
<li class="col-sm-4">
<ul>
<li class="divider"></li>
<li><a href="http://help.finereport.com/" target="_blank">說明文檔</a></li>
<li><a href="/tw/video">訓練課程</a></li>
<li><a href="http://bbs.fanruan.com/" target="_blank">帆軟論壇</a></li>
<li><a href="/tw/knowledge">報表部落格</a></li>
<li><a href="/tw/knowledge/cio">CIO/IT人部落格</a></li>
<li><a href="/tw/knowledge/dataanalysisblog">數據分析部落格</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="http://www.finereport.com/tw/company">關於我們<span class="caret"></span></a>
<ul class="dropdown-menu megamenu row">
<li class="col-sm-4">
<ul>
<li class="divider"></li>
<li><a href="/tw/company/about" target="blank">了解帆軟</a></li>
<li><a href="/tw/company/contact" target="blank">聯繫方式</a></li>
<li><a href="/tw/success/partners" rel="nofollow" target="blank">夥伴招募</a></li>
<li><a href="/tw/news" rel="nofollow" target="blank">新聞資訊</a></li>
</ul>
</li>
</ul>
</li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:;">Language<span class="caret"></span></a>
<ul class="dropdown-menu megamenu row">
<li class="col-sm-3">
<ul>
<li class="divider"></li>
<li><a href="http://www.finereport.com/" target="_blank">简体中文</a></li>
<li><a href="/en/" rel="nofollow" target="_blank">English</a></li>
<li><a href="/jp/" rel="nofollow" target="_blank">日本語</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<div class="main-container">
<style type="text/css">
.main-container{
margin-top: 51px;
}
.newstitle h1{
font-size: 25px;
margin-bottom: 25px;
}
.row .addons{margin-top: 30px;}
.jumbotron{
background-image: url(http://www.fanruan.com/images/single1.jpg);
}
.nav-pills>li.active>a, .nav-pills>li.active>a:focus, .nav-pills>li.active>a:hover{
color: #f2f3f4;
background-color: #007ed3;
}
.jumbotron h1{
color: #fff;
}
.jumbotron h2{
font-size: 26px;
color:#fff;
}
.col-md-003 .list-group-item h4{color:#fff;font-size:18px}
.col-md-003 .list-group-item a{color:#20ade5}
.col-md-009 ul{padding-left:35px;}
.col-md-009 ul>li{font-size:13px;color:#7d8189;line-height:25px;}
</style>
<div class="container">
<div class="jumbotron">
<h1>FineReport</h1>
<h2>最強大的動態報表與BI商業智慧工具!</h2>
</div>
<div class="fb-like" data-href="https://www.facebook.com/twfinereport/" data-layout="button_count" data-action="like" data-size="small" data-show-faces="false" data-share="false"></div>
<div class="fb-share-button" data-layout="button" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u&amp;src=sdkpreparse">分享</a></div>
<div class="row">
<div class="col-md-009">
<div class="content">
<div class="newstitle text-center">
<h1>帆軟線上直播課程開始報名啦!</h1>
</div>
<div class="newstext">
<p>在大多數情況下,我們並不需要報表把資料庫中所有的數據都呈現出來,而是要根據一些條件來過濾出我們想要的數據,這就是參數查詢!<br />
FineReport報表中就是使用參數來動態的過濾數據的,實現用戶和數據的實時交互。<br />
幾乎所有的統計報表都會有統計條件,傳統的做法是使用如ext、html等編程實現,工作量大且維護成本高。<br />
FineReport報表只需要通過參數的定義,參數控制項綁定數據、參數過濾和參數面板樣式四個步驟便可以輕鬆實現參數查詢,零程式碼,維護簡單!</p>
<p>參數在報表製作中如此重要,那麼要如何輕鬆快速掌握這一技能呢?參加這場免費線上直播課程就可以!<br />
<img src="http://www.finereport.com/tw/wp-content/themes/BusinessNews/images/edm/edm2018042601.jpg" width="750px" alt="帆軟線上直播課程報名開始" /></p>
<p><strong>【課程名稱】</strong>FineReport 輕鬆學-專題:「善變的參數 」<br />
<strong>【課程費用】</strong>完全免費,報名參加<br />
<strong>【課程時間】</strong>2018/4/30 19:00-20:00<br />
<strong>【課程講師】</strong>帆軟講師 Sigurd<br />
<strong>【課程大綱】</strong></p>
<p>PART 【Ⅰ】 1 HRS</p>
<p>● 認識參數種類、參數值類型、參數的表示方式</p>
<p>&#8211;全域參數<br />
&#8211;自訂</p>
<p>&#8211;參數值的型態<br />
&#8211;字串<br />
&#8211;整型<br />
&#8211;雙精度<br />
&#8211;日期<br />
&#8211;布林<br />
&#8211;公式</p>
<p>&#8211;模板參數<br />
&#8211;自訂(與全域參數名稱相同時,優先取模板參數值)</p>
<p>&#8211;系統參數<br />
(公式中可取用)<br />
&#8211;$$page_number<br />
&#8211;$$totalPage_number<br />
&#8211;$fr_authority<br />
&#8211;$fr_username<br />
&#8211;$fr_userposition<br />
&#8211;NULL<br />
&#8211;NOFILTER<br />
&#8211;reportName<br />
&#8211;formletName<br />
&#8211;servletURL<br />
&#8211;serverSchema<br />
&#8211;serverName<br />
&#8211;serverPort<br />
&#8211;serverURL<br />
&#8211;contextPath<br />
&#8211;sessionID<br />
&#8211;GETUSERDEPARTMENTS()<br />
&#8211;GETUSERJOBTITLES()</p>
<p> (URL中可取用)<br />
&#8211;op=write,op=page,op=view<br />
&#8211;format=excel,format=pdf,format=word</p>
<p>&#8211;查詢參數(控制項)<br />
&#8211;預設值指定(搭配參數值的型態)<br />
&#8211;與全局、模板參數同名可繼承值</p>
<p>&#8211;資料庫連接參數</p>
<p>&#8211;資料集參數<br />
&#8211;${paraA}指定參數<br />
&#8211;${IF(LEN(paraA)>0,&#8221; And colA ='&#8221;+paraA+&#8221;&#8216;&#8221;,&#8221;&#8221;)}條件公式指定參數<br />
&#8211;搭配查詢控制項聯動過濾<br />
&#8211;檔案資料集參數</p>
<p>&#8211;圖表參數<br />
&#8211;CATEGORY<br />
&#8211;SERIES<br />
&#8211;VALUE</p>
<p>快點擊下方免費報名參加吧!報名成功後會為您發送直播觀看網址!</p>
<div class="jihuo" style="width:100%;height:700px;margin:auto;margin-top:70px;">
<iframe frameborder="0" src="http://cs.finereport.com:8080/weblicence/ReportServer?reportlet=baoming_taiwan.cpt&#038;op=write" width="100%" height="700px;"></iframe>
</div>
</div>
</div>
<div class="fastlink text-center">
上一篇: <a href="http://www.finereport.com/tw/company/news/baichengxunzhan.html" rel="prev">帆軟百城巡展再度啟航,引領企業數據分析的新浪潮</a>&nbsp;&nbsp;&nbsp;
下一篇:沒有了,已經是最新文章
</div>
</div>
<div class="col-md-003">
<ul class="list-group">
<li class="list-group-item active"><h4>聯繫我們</h4></li>
<li class="list-group-item">電話:0933-790886</li>
<li class="list-group-item">邮箱:brian.wang@fanruan.com</li>
<li class="list-group-item">地址:300 新竹市學府路40號 (交大育成中心 R302)</li>
<li class="list-group-item">臉書粉絲團
<div class="fb-like" data-href="https://www.facebook.com/twfinereport/" data-layout="button_count" data-action="like" data-size="small" data-show-faces="false" data-share="false"></div></li>
</ul>
</div>
</div>
</div>
<div class="bot-nav">
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-2 text-center">
<a href="http://www.finereport.com/tw/"><img src="http://www.finereport.com/tw/wp-content/themes/BusinessNews/images/logobot2016091302.png" width="160" alt="帆軟logo" tltle="帆軟logo"></a>
</div>
<div class="col-xs-6 col-md-2 text-center">
<div class="list-group">
<ul>
<li class="list-group-item"><h4>產品中心</h4></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/products">產品簡介</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/products/function">功能詳解</a></li>
<li class="list-group-item"><a href="http://www.finereporthelp.com:8889/demo/ReportServer?op=fs" target="_blank">演示Demo</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/products/trial">免費下載</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/products/frlogin">免費激活</a></li>
</ul>
</div>
</div>
<div class="col-xs-6 col-md-2 text-center">
<div class="list-group">
<ul>
<li class="list-group-item"><h4>客戶案例</h4></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/success/customers">客戶列表</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/success/reviews">客戶評價</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/success/real-estate" rel="nofollow">企業案例</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/knowledge/businessanalysis" rel="nofollow">業務案例</a></li>
</ul>
</div>
</div>
<div class="col-xs-6 col-md-2 text-center">
<div class="list-group">
<ul>
<li class="list-group-item"><h4>使用教學</h4></li>
<li class="list-group-item"><a href="help.finereport.com" target="_blank">說明文檔</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/video" rel="nofollow">訓練課程</a></li>
<li class="list-group-item"><a href="http://bbs.fanruan.com/" rel="nofollow" target="_blank">帆軟論壇</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/knowledge" rel="nofollow">專題文章</a></li>
</ul>
</div>
</div>
<div class="col-xs-6 col-md-2 text-center">
<div class="list-group">
<ul>
<li class="list-group-item"><h4>關於我們</h4></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/company/about" target="blank">了解帆軟</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/company/contact">聯繫我們</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/news">新聞資訊</a></li>
<li class="list-group-item"><a href="http://www.finereport.com/tw/success/partners">夥伴招募</a></li>
</ul>
</div>
</div>
<div class="col-xs-12 col-md-2 text-center">
<h4>臉書粉絲團</h4>
<div class="fb-like" data-href="https://www.facebook.com/twfinereport/" data-layout="button_count" data-action="like" data-size="small" data-show-faces="false" data-share="false"></div>
<a><img src="http://www.finereport.com/tw/wp-content/themes/BusinessNews/images/FBqrcode.png" style="width:120px;" alt="帆軟FineReport臉書官方賬號"></a>
</div>
</div>
<div class="row">
<div class="col-md-8 col-md-offset-2 text-center">
<h5>Copyright©2017 Fanruan Software Co.,Ltd. All Rights Reserved. 帆軟軟體有限公司 | 蘇ICP備14031611號-8</h5>
</div>
</div>
</div>
</div>
<p id="back-to-top"><a href="#top"><span></span>返回頂部</a></p>
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="http://www.finereport.com/tw/wp-includes/js/jquery.min.js"></script>
<script src="http://www.finereport.com/tw/wp-includes/js/bootstrap.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function(){
$(".dropdown").hover(
function() { $('.dropdown-menu', this).stop().fadeIn("fast");
},
function() { $('.dropdown-menu', this).stop().fadeOut("fast");
});
});
</script>
<script type="text/javascript">
jQuery(document).ready(function(){
//返回顶部
$(window).scroll(function(){
if ($(window).scrollTop()>500){
$("#back-to-top").fadeIn(800);
}
else
{
$("#back-to-top").fadeOut(800);
}
});
$("#back-to-top").click(function(){
$('body,html').animate({scrollTop:0},1000);
return false;
});
//首页视频展开及关闭
$(".videopop").click(function(){
$(".popup").show();
$("video").trigger('play');
});
$(".closeshipin").click(function(){
$(".popup").hide();
$("video").trigger('pause');
});
//finebi视频
$(".demovideo").click(function(){
$(".finebidemo").show();
});
//校招页点击详情及切换
$(".row.jdtitle").click(function(){
if ($(this).next().is(":hidden")) {
$(this).next().show(500);
}else{
$(this).next().hide(500);
}
if ($(this).parent().css("box-shadow")=="none") {
$(this).parent().css("box-shadow","0px 0px 2px rgba(25,30,40,0.15)");
}else{
$(this).parent().css("box-shadow","none");
}
});
$(".allcat>div>a").click(function(){
$(".allcat>div>a").removeClass("active");
$(this).addClass("active");
});
$(".allcat>.col-md-3").click(function(){
var index=$(this).index(); //获取被按下按钮的索引值,需要注意index是从0开始的
$(".alljd").hide();
$(".alljd").eq(index).show();
});
});
//采访视频
$("#video-gyw").click(function(){
$(".video-gyw").show();
});
$("#video-gq").click(function(){
$(".video-gq").show();
});
$("#video-zxf").click(function(){
$(".video-zxf").show();
});
$("#video-wzy").click(function(){
$(".video-wzy").show();
});
$("#video-lcf").click(function(){
$(".video-lcf").show();
});
$("#video-lhq").click(function(){
$(".video-lhq").show();
});
//用户评价页切换
$(".ratingpage .list-group").hover(function(){
$(this).find(".list-group-item.active").css("background-color","#20ade5");
$(this).find("p").css("color","#000");
$(this).find(".bbs").css("color","#fff");
$(this).find(".bbsid").css("color","#fff");
});
$(".expland4.ratingpage .list-group").mouseleave(function(){
$(this).find(".list-group-item.active").css("background-color","#f4f5f6");
$(this).find("p").css("color","#7d8189");
$(this).find(".bbs").css("color","#7d8189");
$(this).find(".bbsid").css("color","#000");
});
$(".expland5.ratingpage .list-group").mouseleave(function(){
$(this).find(".list-group-item.active").css("background-color","#d9eef9");
$(this).find("p").css("color","#7d8189");
$(this).find(".bbs").css("color","#7d8189");
$(this).find(".bbsid").css("color","#000");
});
$(".expland2.ratingpage .col-md-2").hover(function(){
$(".expland2 .col-md-2").find(".ratingimg").css("box-shadow","none");
$(".expland2 .col-md-2").find(".ratingimg").css("border","1px #eee solid");
$(".expland2 .col-md-2").find("h4").css({"color":"#7d8189","font-size":"14px"});
$(this).find(".ratingimg").css("box-shadow","0 0 5px #20ade5");
$(this).find(".ratingimg").css("border","1px #20ade5 solid");
$(this).find("h4").css({"color":"#20ade5","font-size":"16px"});
var index=$(this).index();
$(".story").hide();
$(".story").eq(index).show();
});
</script>
<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3Fb34b52d2b268ff53ddc20cfa751b5f42' type='text/javascript'%3E%3C/script%3E"));
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-58537071-1', 'auto');
ga('send', 'pageview');
</script>
<!-- Google 再营销代码的内容 -->
<!--------------------------------------------------
再营销代码不得与个人身份信息相关联,也不得放置在与敏感类别相关的网页上。有关如何设置代码的详细信息和说明,请访问:http://google.com/ads/remarketingsetup
--------------------------------------------------->
<script type="text/javascript">
var google_tag_params = {
dynx_itemid: 'REPLACE_WITH_VALUE',
dynx_itemid2: 'REPLACE_WITH_VALUE',
dynx_pagetype: 'REPLACE_WITH_VALUE',
dynx_totalvalue: 'REPLACE_WITH_VALUE',
};
</script>
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 956130027;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/956130027/?guid=ON&script=0"/>
</div>
</noscript>
<script type="application/javascript">(function(w,d,t,r,u){w[u]=w[u]||[];w[u].push({'projectId':'10000','properties':{'pixelId':'431542'}});var s=d.createElement(t);s.src=r;s.async=true;s.onload=s.onreadystatechange=function(){var y,rs=this.readyState,c=w[u];if(rs&&rs!="complete"&&rs!="loaded"){return}try{y=YAHOO.ywa.I13N.fireBeacon;w[u]=[];w[u].push=function(p){y([p])};y(c)}catch(e){}};var scr=d.getElementsByTagName(t)[0],par=scr.parentNode;par.insertBefore(s,scr)})(window,document,"script","https://s.yimg.com/wi/ytc.js","dotq");</script>
<script type="text/javascript">
_linkedin_data_partner_id = "42451";
</script><script type="text/javascript">
(function(){var s = document.getElementsByTagName("script")[0];
var b = document.createElement("script");
b.type = "text/javascript";b.async = true;
b.src = "https://snap.licdn.com/li.lms-analytics/insight.min.js";
s.parentNode.insertBefore(b, s);})();
</script>
</body>
</html>

67
index.html

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>站点创建成功-phpstudy for windows</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<meta HTTP-EQUIV="pragma" CONTENT="no-cache">
<meta HTTP-EQUIV="Cache-Control" CONTENT="no-store, must-revalidate">
<meta HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<meta HTTP-EQUIV="expires" CONTENT="0">
<style>
body{
font: 16px arial,'Microsoft Yahei','Hiragino Sans GB',sans-serif;
}
h1{
margin: 0;
color:#3a87ad;
font-size: 26px;
}
.content{
width: 45%;
margin: 0 auto;
}
.content >div{
margin-top: 200px;
padding: 20px;
background: #d9edf7;
border-radius: 12px;
}
.content dl{
color: #2d6a88;
line-height: 40px;
}
.content div div {
padding-bottom: 20px;
text-align:center;
}
</style>
</head>
<body>
<div class="content">
<div>
<h1>站点创建成功</h1>
<dl>
<dt>目录说明:</dt>
<dd>1:网站目录:/phpstudy安装目录/www/站点域名/</dd>
<dd>2:错误提示页面:/phpstudy安装目录/www/站点域名/error/</dd>
<dd>3:你可以删除或者修改该目录下的所有文件</dd>
<dt>操作注意事项:</dt>
<dd>1:新建站点、数据库、FTP可在phpstudy面板操作,数据库可在环境中下载数据库管理软件等;</dd>
<dd>2:将网站程序放到站点目录时请使用复制,剪切可能造成程序文件权限不正确;</dd>
</dl>
<div>使用手册,视频教程,BUG反馈,官网地址: <a href="https://www.xp.cn" target="_blank">www.xp.cn</a> </div>
</div>
</div>
</body>
</html>

77
index.php

@ -0,0 +1,77 @@
<?php
require_once 'com.php';
//跳转
if(strlen($_GET['referrer'])>0) {
$compare_str = "http://demo.finereport.com/decision/url/login?fine_username=demo&fine_password=123456&validity=-1";
if($compare_str == $_GET['referrer']) {
session_start();
echo $_SESSION['uid'] . "=>" . $_SESSION['username'];
echo "<script>window.location.href='".urldecode($_GET['referrer'])."'</script>";
} else {
define("FINEREPORT", '100');
require_once 'index/synLogin.php';
sleep(0.01);
echo "<script>window.location.href='".urldecode($_GET['referrer'])."'</script>";
}
}
if(!$_G['uid']){
header("location:/login/login.php");
}
$title = '账号中心';
$tpl->assign('cur',1);
$tpl->template_dir = 'account/tpl/';
//获取等级资料
$get_level = CallInterface(API_URL.'/v1/user/index/?uid='.$_G['uid'],'GET');
$arr_level = json_decode($get_level,true);
$position = [1=>'其它',2=>'业务人员',3=>'技术人员',4=>'CIO或CTO等高层人员',6=>'学生',7=>'老师'];
//实名认证状态
$realnameauth = CallInterface(API_URL.'/v1/account/realnameauth/getauth/?uid='.$_G['uid'],'GET');
$realnameauth = json_decode($realnameauth,true);
$tpl->assign('realnameauth',$realnameauth);
//学生认证状态
$studentauth = CallInterface(API_URL.'/v1/account/studentauth/getauth/?uid='.$_G['uid'],'GET');
$studentauth = json_decode($studentauth,true);
$tpl->assign('studentauth',$studentauth);
//组织认证状态
$orgauth = CallInterface(API_URL.'/v1/account/organizationauth/getauth/?uid='.$_G['uid'],'GET');
$orgauth = json_decode($orgauth,true);
$tpl->assign('orgauth',$orgauth);
//成员认证状态
$mem_header = ['authentication:'.base64_encode($ckuserinfo['appid'].'.'.$ckuser['access_token'].'.'.$ckuserinfo['uid'])];
$memberauth = CallInterface(API_URL.'/v1/account/membermanage/ismember/','GET', '',$mem_header);
$memberauth = json_decode($memberauth,true);
$tpl->assign('memberauth',$memberauth);
//下拉选中
$myposition = $_G['position'] ? $_G['position']:0;
//同步登录
if($_COOKIE["fr_id_onelogin"]){
setcookie('fr_id_onelogin','',0,'/');
echo id_synlogin();
}
//是否通过组织认证
$zuzhi_api = CallInterface(API_URL.'/v1/account/organizationauth/getauth/?uid='.$_G['uid'],'GET');
$zuzhi_arr = json_decode($zuzhi_api,true);
if($zuzhi_arr['message']=='success'){
$is_zuzhi=1;
}else{
$is_zuzhi=0;
}
$tpl->assign('is_zuzhi',$is_zuzhi);
$tpl->assign('title',$title);
$tpl->assign('user',$arr_level['data']);
$tpl->assign('position',$position);
$tpl->assign('myposition',$myposition);
$tpl->display('user_info.htm');

37
index/destroySession.php

@ -0,0 +1,37 @@
<?php
/**
* Created by xiaofu.qin
* Description: 销毁session,要不然调试的时候每次都要关掉浏览器太难受了
*/
session_start();
define('FINEREPORT', '100');
require_once '../myFunc/randomChars.php';
require_once '../ucenter_syn_login_and_logout_api.php';
//其他应用通知当前应用下线的时候就不需要在通知一遍了,因为当其他应用通知下线的时候,synUid这个session会变成-10
if( isset($_SESSION['synUid']) && $_SESSION['synUid'] < 0 ) {
print '';
}else {
syn_logout();
}
#清空session信息
$_SESSION = array();
#清除客户端sessionid
if(isset($_COOKIE[session_name()])) {
setcookie(session_name(),'',time()-3600,'/');
}
#彻底销毁session
session_destroy();
/*$script = <<<str
<script>
location.href = '../login/login.php';
</script>
str;*/
$script = "<script>location.href = '../login/login.php".((isset($_GET['referrer']) && strlen($_GET['referrer'])>0)? "?referrer=".$_GET['referrer']: "")."';</script>";
echo $script;

66
index/getActivity.php

@ -0,0 +1,66 @@
<?php
/**
* Created by xiaofu.qin
* email: xiaofu.qin@fanraun.com
* Date: 2017/3/3
* Time: 10:23
* Description: 用户在index.php点击“获取finereport”或者“获取fineBI验证码”按钮的时候提交的个人信息的时候提交的公司、需求、以及个人职能信息,在这里将其保存到pre_common_member_profile表中。
*/
session_start();
define('FINEREPORT', '100');
require_once '../myFunc/mysql_beta.php';
// 判断token是否存在,不存在则表示是表单欺诈
if( !isset($_POST['token']) || $_POST['token'] !== $_SESSION['token']) {
exit('Go home, my boy!');
}
//不允许所公司的变量为空字符串,因为在index.php页面还需要这儿字段来判断用户是否已经填写这些信息呢!
if( !isset($_POST['identical']) || !isset($_POST['motivation']) || !isset($_POST['company']) || !isset($_POST['realname']) || !isset($_SESSION['username']) || empty($_POST['company'])) {
exit('false');
}
/*
* $identical 的值与其所代表的含义如下
* Business : 业务人员
* ITboy : 运维人员
* CIO : CIO或者高层
* Student : 学生
* Other : 其他
*/
$identical = addslashes(htmlspecialchars($_POST['identical']));
/*
* $motivation的值与其所代表的含义如下:
* Company : 企业型用户
* SoftCompany : 软件型公司
* Personal : 个人用户
* 其他 : 用户自己填写的需求文字
*/
$motivation = addslashes(htmlspecialchars($_POST['motivation']));
$company = addslashes(htmlspecialchars($_POST['company']));$realname = addslashes(htmlspecialchars($_POST['realname']));
$uid = $_SESSION['uid'];
$conn = connect();
$sql = "update pre_common_member_profile set `position`=?, field4=?, company=?, realname=? where uid=?";
$stmt = $conn->prepare($sql);
if( !$stmt ) {
exit('wrong');
}
$stmt->bind_param('ssssi', $identical, $motivation, $company, $realname, $uid);
$stmt->execute();
$stmt->store_result();
if( $stmt->affected_rows === 0) {
exit('wrong');
}
//设置session为company变量
$_SESSION['company'] = $company;$_SESSION['realname'] = $realname;
exit('true');

267
index/getUserInfo.class.php

@ -0,0 +1,267 @@
<?php
/**
* Created by xiaofu.qin
* Description: 在index.php上使用。向数据库提取用户的信息,对外提供的类名为:getUserInfo,没有参数,但是必须在登录的情况下才能使用。
*/
if( !defined('FINEREPORT' )) {
header('Location:http:www.finereport.com');
exit('Hello world');
}
require_once 'myFunc/chineseToUnicode.php';
class getUserInfo{
//用户登录的方式——当前站点登录还是响应其他站点登录
private $logType;
private $uid;
public $username;
public $email;
public $realName;
public $mobile;
public $company;
public $qq;
# 用户收件地址
public $address;
public $level;
public $allowadmincp;
public $groupid;
#注册时间
public $regDate;
#fineReport和fineBI产品的激活码以及激活的时间
public $frActivityCode;
public $fbiActivityCode;
public $frActivityTime;
public $fbiActivityTime;
#该用户在请求激活码的时候填写的公司职位
public $position;
#该用户在填写激活码的时候填写的对fineReport产品的需求
public $demand;
#连接数据库使用的属性
private $stmt;
private $conn;
public function __construct(){
/*
* 数据库连接的句柄
*/
$this->conn = connect();
/**
* 如果用户在当前站点登录,那么就会有username和password、uid的session;如果当前站点是响应其他的站点进行登录的话,那么就只会有synUid这个session。
*/
if( isset($_SESSION['username']) ) {
$this->uid = $_SESSION['uid'];
$this->logType = 'current';
}else if( isset($_SESSION['synUid']) && $_SESSION['synUid'] > 0) {
$this->uid = $_SESSION['synUid'];
$this->logType = 'syn';
}
}
public function main() {
//TODO:主函数,分别执行两个获取信息的函数
$this->getInfoFromUcenterMembers();
$this->getRestInfoFromProfileTable();
$this->getUserState();
$this->setSession();
return $this;
}
public function setSession() {
$allInfo = $this->getInfo();
foreach ($allInfo as $key=>$value){
$_SESSION[$key] = $value;
}
}
public function getInfo() {
//TODO:将从数据库中获取的数据返回给调用者
return array(
"uid" => $this->uid,
"email"=> $this->email,
"username" => $this->username,
"realName" => $this->realName,
"regDate" => $this->regDate,
"qq" => $this->qq,
#公司以及职能
"company" => $this->company,
"position" => $this->position,
"demand" => $this->demand,
"mobile" => $this->mobile,
"address" => $this->address,
"level" => $this->level,
"allowadmincp" => $this->allowadmincp,
"groupid" => $this->groupid,
"frActivityCode" => $this->frActivityCode,
"fbiActivityCode" => $this->fbiActivityCode,
"frActivityTime" => $this->frActivityTime,
"fbiActivityTime" => $this->fbiActivityTime
);
}
public function __get($name){
// TODO: Implement __get() method.
if( isset($this->$name)) {
return $this->$name;
}else{
return "Invalid variable name";
}
}
public function getInfoFromUcenterMembers() {
//TODO:从pre_ucenter_members表中获取email、username、和注册时间的信息
$sql = "select username, email, regdate from pre_ucenter_members where uid=?";
//这里需要测试一下如果sql有问题会不会抛出错误
$this->stmt = $this->conn->prepare($sql);
$this->judgeStmt($sql);
$this->stmt->bind_param('i', $this->uid);
$this->stmt->execute();
$this->stmt->store_result();
$this->stmt->bind_result($this->username, $this->email, $this->regDate);
$this->stmt->fetch();
$this->freeResult();
//将注册时间转换成字符串格式
// $when = new DateTime(strval($this->regDate));
// $when->setTimezone(new DateTimeZone('Asia/Shanghai'));
// $this->regDate = $when->format('Y/m/d');
$this->regDate = date('Y-m-d', $this->regDate);
}
/**
* 从pre_common_member_profile表中获取realname、qq、mobile、company、finereportActivityCode和finebiActivityCode、以及职位、对fineReport产品的需求的信息
*/
public function getRestInfoFromProfileTable() {
$sql = "select realname, qq, company, address, mobile, finereport_code, finebi_code, `position`, field4, finereport_activation_time, finebi_activation_time from pre_common_member_profile where uid=?";
$this->stmt = $this->conn->prepare($sql);
$this->judgeStmt($sql);
$this->stmt->bind_param('i', $this->uid);
$this->stmt->execute();
$this->stmt->store_result();
$this->stmt->bind_result($this->realName, $this->qq, $this->company, $this->address, $this->mobile, $this->frActivityCode, $this->fbiActivityCode, $this->position, $this->demand, $this->frActivityTime, $this->fbiActivityTime);
$this->stmt->fetch();
$this->freeResult();
//将数据库中保存的unicode编码转换成中文
if( strpos($this->company, '[') !== false ) {
$this->company = unicodeToChinese($this->company);
}
if( strpos($this->realName, '[') !== false ) {
$this->realName = unicodeToChinese($this->realName);
}
//将数据库中保存的unicode编码转换成中文
if( strpos($this->demand, '[') !== false ) {
$this->demand = unicodeToChinese($this->demand);
}
}
/**
* 获取数据库中的公司、职位以及对fineReport产品的需求的信息
*/
public function getCompany() {
//TODO:获取pre_common_member_profile表中的company字段数据
$sql = "select company, `position`, field4, realName from pre_common_member_profile where uid=?";
//这里需要测试一下如果sql有问题会不会抛出错误
$this->stmt = $this->conn->prepare($sql);
$this->judgeStmt($sql);
$this->stmt->bind_param('i', $this->uid);
$this->stmt->execute();
$this->stmt->store_result();
$this->stmt->bind_result($this->company, $this->position, $this->demand, $this->realName);
$this->stmt->fetch();
$this->freeResult();
//将数据库中保存的unicode编码转换成中文
if( strpos($this->company, '[') !== false ) {
$this->company = unicodeToChinese($this->company);
} if( strpos($this->realName, '[') !== false ) { $this->realName = unicodeToChinese($this->realName); }
//将数据库中保存的unicode编码转换成中文
if( strpos($this->demand, '[') !== false ) {
$this->demand = unicodeToChinese($this->demand);
}
}
public function checkProduceActivationCode() {
//TODO:获取pre_common_member_profile表中的finereport_code, finebi_code字段数据
$sql = "select finereport_code, finebi_code from pre_common_member_profile where uid=?";
//这里需要测试一下如果sql有问题会不会抛出错误
$this->stmt = $this->conn->prepare($sql);
$this->judgeStmt($sql);
$this->stmt->bind_param('i', $this->uid);
$this->stmt->execute();
$this->stmt->store_result();
$this->stmt->bind_result($this->frActivityCode, $this->fbiActivityCode);
$this->stmt->fetch();
$this->freeResult();
}
public function getUserState() {
//TODO:获取pre_common_member表中的用户组、权限信息
$sql = "select pcm.groupid,allowadmincp,grouptitle from pre_common_member as pcm join pre_common_usergroup as pcu on pcm.groupid = pcu.groupid where uid=?";
//这里需要测试一下如果sql有问题会不会抛出错误
$this->stmt = $this->conn->prepare($sql);
$this->judgeStmt($sql);
$this->stmt->bind_param('i', $this->uid);
$this->stmt->execute();
$this->stmt->store_result();
$this->stmt->bind_result($this->groupid, $this->allowadmincp, $this->level);
$this->stmt->fetch();
$this->freeResult();
}
protected function judgeStmt($sql) {
/*
* 判断当前的预处理语句执行之后是否正确
*/
if( !$this->stmt ) {
throw new Exception('预处理语句有错,请检查——'.$sql);
}else{
return true;
}
}
protected function freeResult() {
$this->stmt->free_result();
}
public function __destruct(){
// TODO: Implement __destruct() method.
$this->freeResult();
$this->conn->close();
}
}
//计算两个日期之差,服务器的PHP不支持这个
function diffTime1($timeStempOne, $timeStempTwo) {
// $first = new DateTime('@'.strval($timeStempOne), new DateTimeZone('Asia/Shanghai'));
// $second = new DateTime('@'.strval($timeStempTwo), new DateTimeZone('Asia/Shanghai'));
//
// $diff = $second->diff($first);
//
// $str = "还有{$diff->format('%a')}天过期";
// return $str;
}
function diffTime($timeOne, $timeTwo) {
//需要$timeOne 大于$timeTwo
if( $timeOne < $timeTwo ) {
list( $timeOne, $timeTwo ) = array($timeTwo, $timeOne);
}
$day = intval(($timeOne-$timeTwo) / (3600 * 24));
$str = "还有{$day}天过期";
return $str;
}

15
index/index.php

@ -0,0 +1,15 @@
<?php
/**
* Created by xiaofu.qin
* email: xiaofu.qin@fanraun.com
* Date: 2017/3/8
* Time: 10:12
* Description: 因为这是一个文件夹,建立一个index.php来跳转,防止用户直接访问文件夹
*/
$str = <<<str
<script>
window.location.href = 'http://id.fanruan.com';
</script>
str;
echo $str;

38
index/judgeIsLogin.php

@ -0,0 +1,38 @@
<?php
if(!$_COOKIE["fr_id_auth"]){
echo "<script>window.location.href='login/login.php';</script>";
}
//验证token时效
// if(time() > $ckuser['expires_time']){
// //echo '已超时!';
// id_refresh_token();
// }
// //如果其他应用通知了该应用要下线,那么直接跳转到注销的页面
// if( isset($_SESSION['synLogOut']) && $_SESSION['synLogOut'] === 'yes') {
// echo "<script>window.location='index/destroySession.php';</script>";
// }
// //其他应用通知当前站点登录
// if( isset($_SESSION['synUid']) && $_SESSION['synUid']>0 ) {
// $_SESSION['uid'] = $_SESSION['synUid'];
// //设置count的session主要是为了兼容下面的if语句,因为如果用户在当前站点主动登录的话,就会有count这个session
// $_SESSION['count'] = 4;
// }
// //这是用户直接跳转到index.php页面的情况,重定向到login.php页面让其登录
// if( !isset($_SESSION['count']) ) {
// echo "<script>window.location.href='login/login.php';</script>";
// }
// //处理有count却没uid和username
// if( isset($_SESSION['count']) && ( !isset($_SESSION['uid']) && !isset($_SESSION['username']) && !isset($_SESSION['synUid']) ) ) {
// echo "<script>window.location='index/destroySession.php".((isset($_GET['referrer']) && strlen($_GET['referrer'])>0)? "?referrer=".$_GET['referrer']: "")."';</script>";
// }
// //当用户是注册之后进入首页的,会有一个$_SESSION['clickTimes']的变量,这是用来防范用户在短时间内提交两次注册信息的,在这里将其释放掉
// if( isset($_SESSION['clickTimes']) ) {
// unset($_SESSION['clickTimes']);
// }

32
index/logOut.php

@ -0,0 +1,32 @@
<?php
define('FINEREPORT', '100');
require_once '../com.php';
echo id_synlogout();
sleep(0.5);
$script = <<<str
<script>
function getPar(par){
var local_url = document.location.href;
var get = local_url.indexOf(par +"=");
if(get == -1){
return false;
}
var get_par = local_url.slice(par.length + get + 1);
var nextPar = get_par.indexOf("&");
if(nextPar != -1){
get_par = get_par.slice(0, nextPar);
}
return get_par;
}
if(getPar('referrer').length>0){
location.href = decodeURIComponent(getPar('referrer'));
} else {
location.href = '../login/login.php';
}
</script>
str;
echo $script;

56
index/saveActivity.php

@ -0,0 +1,56 @@
<?php
/**
* Created by xiaofu.qin
* Description: 用户在前端页面请求激活码,其实这些激活码是从finereport官网上获取的,并没有存入数据库中,所以该文件就是接受index.php的ajax传递进来的激活码进行数据库保存操作。
*/
session_start();
define('FINEREPORT', '100');
require_once '../myFunc/mysql_beta.php';
//判断前端页面传递回来的token是否正确
if( !isset($_POST['token']) || $_POST['token'] !== $_SESSION['token'] ) {
exit('Go home,my boy!');
}
$key = addslashes(htmlspecialchars($_POST["key"]));
$type = addslashes(htmlspecialchars($_POST['type']));
$uid = $_SESSION['uid'];
$time = time();
$conn = connect();
if( $type == 'fineBI' ) {
$sql = 'update pre_common_member_profile set finebi_code=?, finebi_activation_time=? where uid=?';
}else {
$sql = 'update pre_common_member_profile set finereport_code=?, finereport_activation_time=? where uid=?';
}
$stmt = $conn->prepare($sql);
if( !$stmt ) {
exit('false');
}
$stmt->bind_param('sii', $key, $time, $uid);
$stmt->execute();
if( $stmt->affected_rows !== 1){
exit('Can not insert into the database');
}
//发送邮件
require_once '../myFunc/clueReceipt.php';
if( isset($_SESSION['email']) && strlen($_SESSION['email'])>0 ) {
$nameforsend = isset($_SESSION['realname'])? $_SESSION['realname']: '尊敬的用户';
if($type == 'fineReport') {
$reqresult = send_mail($_SESSION['email'], 'zlwd',$subject='【帆软】这是关于FineReport的更多资料', ARRAY("%key%" => ARRAY($nameforsend)));
}
}
echo 'true';
$stmt->free_result();
$conn->close();

8
index/synLogin.php

@ -0,0 +1,8 @@
<?php
/**
* Description: 当前站点登录之后,通知其他的站点当前用户已登录
*/
if($ckuser['expires_time']){
echo id_synlogin();
}

73
judgeSource.php

@ -0,0 +1,73 @@
<?php
/**
* Created by xiaofu.qin
* email: xiaofu.qin@fanraun.com
* Date: 2017/3/2
* Time: 15:28
* Description: 在官网的首页引入执行main函数就可以设置相应的cookie,然后在需要跳转到登录/注册页面的页面下绑定dynamicPath.js下的那个函数就可以在登录和注册页面上接收线索来源这个信息了。
*/
/*
* 获取当前的url
* @return url
*/
function curPageURL(){
$pageURL = 'http://';
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
}
else {
$pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
}
return $pageURL;
}
/*
* 判断来源
*
* @return $flag: 线索来源字符串
* baidufr : 来自finereport百度推广
* baidufbi : 来自fineBI百度推广
* bbs : 来自bbs
* shop : 来自应用中心
* helpfr : 来自finereport帮助文档
* helpfbi : 来自fineBI帮助文档
* www : 来自直接输入finereport或者fineBI官网的访问
*/
function whereAreYouFrom() {
$currentUrl = curPageURL();
try{
$prevPageUrl = $_SERVER['HTTP_REFERER'];
}catch (Exception $err) {
return 'Unknown';
}
$flag = null;
//首先判断是否来自于百度推广
if( strpos($currentUrl, 'bdtg') !== false ) {
$flag = strpos($currentUrl, 'report') ? 'baidufr' : 'baidufbi';
}
else {
if( strpos($prevPageUrl, 'help') !== false ) {
$flag = strpos($prevPageUrl, 'report')!== false ? 'helpfr' : 'helpfbi';
}else{
$array = array();
$pattern = '/\/\/([^\.]+)/';
preg_match_all($pattern, $prevPageUrl, $array);
$flag = $array[1][0];
}
}
return $flag;
}
/*
* 设置名为clueSource的cookie,首先判断是否已经设置,如果有就不会进行设置了
*/
function main() {
$flag = whereAreYouFrom();
if( !isset($_COOKIE['clueSource']) || $_COOKIE['clueSource'] == 'Unknown' ) {
setcookie("clueSource", $flag, time()+3600);
}
}

31
login.php

@ -0,0 +1,31 @@
<?php
/**
* Created by xiaofu.qin
*/
ini_set('session.use_only_cookies', true);
session_start();
require_once 'myFunc/isLocal.php';
if( !isLocal() ) {
error_reporting(0);
}
define('FINEREPORT', 100);
require_once 'ucenter_syn_login_and_logout_api.php';
print login('upc', 'yudanyunyu');
//ini_set('display_errors', 1);
//error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
//
////引用静态资源管理类
//require_once 'Resource.class.php';
////设置配置和模板文件夹,这是指打包之后的配置和模板文件夹
//$root = dirname(__FILE__) . DIRECTORY_SEPARATOR;
//FISResource::setConfig(array(
// 'config_dir' => $root . '/tpl/config/',
// 'template_dir' => $root . '/tpl/'
//));
//
////渲染登录页面
//display("page/login.php");

62
modified.php

@ -0,0 +1,62 @@
<?php
session_start();
require_once 'com.php';
require_once 'myFunc/isLocal.php';
if( !isLocal() ) {
error_reporting(0);
}
define('FINEREPORT', 100);
ini_set('display_errors', 1);
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
#判断用户是否在本站点或者其他站点登录的文件
require_once 'index/judgeIsLogin.php';
require_once 'myFunc/randomChars.php';
#设置session
$_SESSION['token'] = produceToken(6);
#引用静态资源管理类
require_once 'Resource.class.php';
#设置配置和模板文件夹,这是指打包之后的配置和模板文件夹
$root = dirname(__FILE__) . DIRECTORY_SEPARATOR;
FISResource::setConfig(array(
'config_dir' => $root . '/tpl/config/',
'template_dir' => $root . '/tpl/'
));
#渲染页面
display("page/modifies/index.php", array());
Loading…
Cancel
Save