Merge branch 'master' of gitee.com:hainatravel/information-system

hotfix/远程访问多媒体中心
lyt 6 years ago
commit cd627869be

@ -0,0 +1,85 @@
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class login extends CI_Controller{
public function __construct(){
parent::__construct();
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Methods:POST, GET');
header('Access-Control-Max-Age:0');
header('Access-Control-Allow-Headers:x-requested-with, Content-Type');
header('Access-Control-Allow-Credentials:true');
$this->load->helper('dinglogin');
$this->load->helper('cookie');
$this->appid = 'dingoalutppbmywhkyorfp';
$this->appsecret = '6vAG1GwqwUE0b3g-8g0ZooKXt0SVVwcypIYbDLVy_MyS0jDV89rE68hXOV6WL0HO';
$this->AppKey = 'dingjcbxgidah9uspeuc';
$this->AppSecret = 'C4-8rUDK1u5Twpsw7U3yo42s_bbYxFIqzLMp2j7uI80Sa8D-OPbtSoCMgZxHxo2d';
$this->load->model('ding_login_model');
}
//展示第三方登录页HTTP_REFERER
public function index(){
delete_cookie('returnurl');
if(isset($_REQUEST['returnurl'])){
$returnurl = $_REQUEST['returnurl'];
}else{
$returnurl = 'http://www.mycht.cn';
}
$this->input->set_cookie('returnurl',$returnurl,60);
$this->load->view('login-indx');
}
//判断是否存在该用户
public function auth_login(){
$code = $_REQUEST['code'];
$microtime = get_microtime();
$signature = get_loginsign($microtime,$this->appsecret);
$url = 'https://oapi.dingtalk.com/sns/getuserinfo_bycode?accessKey='.urlencode($this->appid).'&timestamp='.urlencode($microtime).'&signature='.urlencode($signature);
$data = array();
$data['tmp_auth_code'] = $code;
$userinfo = GetPost_http($url,json_encode($data),'json');
$userinfo_data = json_decode($userinfo);
//如果不存在unionid,则不往下执行
if(!isset($userinfo_data->user_info->unionid)){
header("HTTP/1.1 404 Not Found");
exit('{"errcode":404,"errmsg":"不存在unionid"}');
}
$unionid = $userinfo_data->user_info->unionid;
//获取access_token
$access_url = 'https://oapi.dingtalk.com/gettoken?appkey='.$this->AppKey.'&appsecret='.$this->AppSecret;
$access_token = GetPost_http($access_url,'','');
$access_token = json_decode($access_token)->access_token;
//通过unionid获取userid(在公司内部进行查找,如果人员不存在则不会返回userid)
$userid_url = 'https://oapi.dingtalk.com/user/getUseridByUnionid?access_token='.$access_token.'&unionid='.$unionid;
$userid_json = GetPost_http($userid_url,'','');
if(!isset(json_decode($userid_json)->userid)){
header("HTTP/1.1 404 Not Found");
exit($userid_json);
}
$userid = json_decode($userid_json)->userid;
$user_url = 'https://oapi.dingtalk.com/user/get?access_token='.$access_token.'&userid='.$userid;
$user_info = GetPost_http($user_url,'','');
$user_data = json_decode($user_info);
$userinfo = array();
$userinfo['name'] = $user_data->name;
$userinfo['position'] = $user_data->position;
$userinfo['unionid'] = $user_data->unionid;
$userinfo['avatar'] = $user_data->avatar;
$userinfo['orgEmail'] = $user_data->orgEmail;
$userinfo['mobile'] = $user_data->mobile;
$userinfo['datetime'] = time();
$this->ding_login_model->addorupdateuser($userinfo);
$this->input->set_cookie('dingname',$user_data->name,2592000);
$this->input->set_cookie('dingunionid',$user_data->unionid,2592000);
redirect(get_cookie('returnurl'));
}
}

@ -0,0 +1,49 @@
<?php
//获取毫秒
function get_microtime (){
list($s1, $s2) = explode(' ', microtime());
return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);
}
//获取钉钉登录sign
function get_loginsign($microtime,$appsecret){
$microtime = $microtime;
$sign = hash_hmac('sha256',$microtime,$appsecret,true);
$signature = base64_encode($sign);
return $signature;
}
//发送请求函数
function GetPost_http($url, $data = '',$format='') {
if(!isset($_SERVER['HTTP_USER_AGENT'])){
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.104 Safari/537.36 Core/1.53.2372.400 QQBrowser/9.5.10548.400';
}
$curl = curl_init(); // 启动一个CURL会话
curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); // 对认证证书来源的检查
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); // 从证书中检查SSL加密算法是否存在
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); // 模拟用户使用的浏览器
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); // 使用自动跳转
curl_setopt($curl, CURLOPT_AUTOREFERER, 1); // 自动设置Referer
if (!empty($data)) {
curl_setopt($curl, CURLOPT_POST, 1); // 发送一个常规的Post请求
curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包
if($format == 'json'){
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json; charset=utf-8"));
}
}
curl_setopt($curl, CURLOPT_TIMEOUT, 40); // 设置超时限制防止死循环
curl_setopt($curl, CURLOPT_TIMEOUT_MS, 40000); // 设置超时限制防止死循环
curl_setopt($curl, CURLOPT_HEADER, 0); // 显示返回的Header区域内容
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); // 获取的信息以文件流的形式返回
$tmpInfo = curl_exec($curl); // 执行操作
$errno = curl_errno($curl);
if ($errno !== 0) {
log_message('error', 'dingding'.$errno.curl_error($curl));
}
curl_close($curl); //关闭CURL会话
return $tmpInfo; //返回数据
}
?>

@ -0,0 +1,34 @@
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class ding_login_model extends CI_Model {
function __construct(){
parent::__construct();
$this->HT = $this->load->database('HT', TRUE);
}
public function addorupdateuser($data){
$sql = "
IF NOT EXISTS(
select * from Dingding_User where ddu_Unionid = ?
)
INSERT INTO Dingding_User (ddu_Name,ddu_Unionid,ddu_Mobile,ddu_Email,ddu_Position,ddu_Avatar,ddu_Datetime) VALUES (N?,?,?,?,N?,?,?)
ELSE
UPDATE Dingding_User SET
ddu_Name = N?,
ddu_Mobile = ?,
ddu_Email = ?,
ddu_Position = N?,
ddu_Avatar = ?,
ddu_Datetime = ?
WHERE ddu_Unionid = ?
";
$query = $this->HT->query($sql,array($data['unionid'],$data['name'],$data['unionid'],$data['mobile'],$data['orgEmail'],$data['position'],$data['avatar'],$data['datetime'],$data['name'],$data['mobile'],$data['orgEmail'],$data['position'],$data['avatar'],$data['datetime'],$data['unionid']));
}
}
?>

@ -0,0 +1,124 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>value系统登录</title>
<link href="/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="/js/poshytip/tip-yellow/tip-yellow.css" type="text/css" />
<link rel="stylesheet" href="/js/modaldialog/css/jquery.modaldialog.css" type="text/css" />
<link rel="stylesheet" href="/js/kindeditor/themes/default/default.css" type="text/css" media="screen" />
<script type="text/javascript" src="/js/jquery.js"></script>
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/js/poshytip/jquery.poshytip.min.js"></script>
<script type="text/javascript" src="/js/jquery.form.min.js"></script>
<script type="text/javascript" src="/js/modaldialog/jquery.modaldialog.js"></script>
<script type="text/javascript" src="/js/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript" src="/js/basic.js"></script>
<script src="https://g.alicdn.com/dingding/dinglogin/0.0.2/ddLogin.js"></script>
<link rel="shortcut icon" href="http://data.chtcdn.com/bootstrap/img/glyphicons_290_skull.png">
</head>
<style>
.ding_login{
width:365px;
height:400px;
margin:0 auto;
}
.login_header{
width: 100%;
height: 64px;
font-size: 18px;
color: #898d90;
overflow: hidden;
border-bottom: 1px solid #e8e8e8;
}
.login_type{
width: 50%;
line-height: 60px;
text-align: center;
border-bottom: 4px solid transparent;
float: left;
cursor: pointer;
}
.login_type_active{
color: #38adff;
border-bottom: 4px solid #38adff;
cursor: default;
}
.hide{
display: none;
}
</style>
<body>
<div class="row-fluid">
<div class="span3"></div>
<div class="span6">
<form action="<?php echo site_url('login/check') ?>" class="form-horizontal" name="form_login" id="form_login" method="post">
<legend>
<p>Welcome</p>
<div class="login_header">
<div class="login_type login_type_active">钉钉扫码登录</div>
<div class="login_type"><a href="https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoalutppbmywhkyorfp&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/info.php/apps/dinglogin/login/auth_login">钉钉账号密码登录</a></div>
</div>
</legend>
<div class="ding_login">
<div id="login_container"></div>
</div>
</form>
<div class="alert alert-error">
<h4>IE6 isn't allowed!</h4>
Please use Google Chrome, Firefox, Safair, or IE7+.
</div>
</div>
<div class="span3"></div>
</div>
</body>
<script>
$(function(){
var url = encodeURIComponent("https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoalutppbmywhkyorfp&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/info.php/apps/dinglogin/login/auth_login");
var obj = DDLogin({
id:"login_container",//这里需要你在自己的页面定义一个HTML标签并设置id例如<div id="login_container"></div><span id="login_container"></span>
goto: url,
style: "",
href: "",
width : "300px",
height: "300px"
});
var hanndleMessage = function (event) {
var loginTmpCode = event.data; //拿到loginTmpCode后就可以在这里构造跳转链接进行跳转了
var origin = event.origin;
login_url = 'https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoalutppbmywhkyorfp&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/info.php/apps/dinglogin/login/auth_login&loginTmpCode='+loginTmpCode;
window.location.href = login_url;
};
if (typeof window.addEventListener != 'undefined') {
window.addEventListener('message', hanndleMessage, false);
} else if (typeof window.attachEvent != 'undefined') {
window.attachEvent('onmessage', hanndleMessage);
}
$('.login_type').click(function(){
console.log($(this).html());
if($(this).html() == '钉钉帐号密码登录'){
$('.pc_login').removeClass('hide');
$('#login_container').addClass('hide');
$('.ding_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).prev().removeClass('login_type_active');
}
if($(this).html() == '钉钉扫码登录'){
$('.ding_login').removeClass('hide');
$('#login_container').removeClass('hide');
$('.pc_login').addClass('hide');
$(this).addClass('login_type_active');
$(this).next().removeClass('login_type_active');
}
});
});
</script>
</html>

@ -248,30 +248,6 @@ class api extends CI_Controller{
}
}
//登录验证
public function check_login(){
$code = $this->input->get('code');
$signature = getDingSignature();
$urlencode_signature = urlencode($signature);
$personInfoUrl = 'https://oapi.dingtalk.com/sns/getuserinfo_bycode?signature='.$urlencode_signature.'&timestamp='.time().'&accessKey=dingoaystremzlahfew1tb';
$post_data = '{"tmp_auth_code":"'.$code.'"}';
$returnJson = GetPost_http($personInfoUrl,$post_data,'json');
$returnData = json_decode($returnJson);
if(!empty($returnData->user_info)){
//创建session
$this->session->set_userdata('dingname', $returnData->user_info->nick);
$this->session->set_userdata('dingunionid', $returnData->user_info->unionid);
redirect('http://www.mycht.cn/info.php/apps/trainsystem/pages/');
}else{
redirect('http://www.mycht.cn/info.php/apps/trainsystem/pages/login');
}
}
public function check_session(){
print_r($this->session->userdata('dingunionid'));
}
//订单同步到trainsystem
public function sync_orders(){
die();

@ -9,13 +9,15 @@ class pages extends CI_Controller{
$this->load->model("train_system_model");
$this->load->model("BIZ_train_model");
$this->load->helper('train');
$this->load->helper('cookie');
$this->order_status_msg = $this->config->item('train_order_status_msg');
}
public function index($coli_id = null){
/*if($this->session->userdata('dingname') == '' && $this->session->userdata('dingunionid') == ''){
dingLogin();
}*/
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
redirect('/apps/dinglogin/login/?returnurl=/apps/trainsystem/pages/');
}
if($coli_id == null){
$cols_id = $this->input->post("ht_order");
}else{
@ -54,9 +56,9 @@ class pages extends CI_Controller{
//系统列表页面
public function order_list(){
/*if($this->session->userdata('dingname') == '' && $this->session->userdata('dingunionid') == ''){
dingLogin();
}*/
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
redirect('/apps/dinglogin/login/?returnurl=/apps/trainsystem/pages/');
}
$page_size = 10;
$page = $this->input->get("page");
$order = $this->input->get("order");
@ -110,9 +112,9 @@ class pages extends CI_Controller{
//订单详情页面
public function order(){
/*if($this->session->userdata('dingname') == '' && $this->session->userdata('dingunionid') == ''){
dingLogin();
}*/
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
redirect('/apps/dinglogin/login/?returnurl=/apps/trainsystem/pages/');
}
$ordernumber = $order=$this->input->get("order");
if(empty($ordernumber)){
@ -159,9 +161,9 @@ class pages extends CI_Controller{
//退票页面
public function refund(){
/*if($this->session->userdata('dingname') == '' && $this->session->userdata('dingunionid') == ''){
dingLogin();
}*/
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
redirect('/apps/dinglogin/login/?returnurl=/apps/trainsystem/pages/');
}
$ordernumber = $order=$this->input->get("order");
if(empty($ordernumber)){
@ -198,9 +200,9 @@ class pages extends CI_Controller{
}
public function export(){
/*if($this->session->userdata('dingname') == '' && $this->session->userdata('dingunionid') == ''){
dingLogin();
}*/
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
redirect('/apps/dinglogin/login/?returnurl=/apps/trainsystem/pages/');
}
$this->load->view('header');
$this->load->view('export');
$this->load->view('footer');

@ -74,16 +74,4 @@ function GetPost_http($url, $data = '',$format='') {
return $tmpInfo; //返回数据
}
function getDingSignature(){
$timestamp = time();
$signature = hash_hmac('sha256',$timestamp,'emCK5vYFJc-HtMNNgbyGpmbYaNyPkNXn_ayoFd6q2m6rpljhxBn2JQEx9gy8H6DQ',true);
$signature = base64_encode($signature);
return $signature;
}
function dingLogin(){
redirect('https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoaystremzlahfew1tb&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/info.php/apps/trainsystem/api/check_login');
}
?>

@ -204,7 +204,7 @@ class Groupinfo_model extends CI_Model {
ESI_LeaveCity,
ESI_ServiceCity,
ESI_ServiceType,
ESI_ServiceSN,
IsNull(ESI_ServiceSN,0) as ESI_ServiceSN,
ESI_ServiceSN2,
ESI_ServiceName,
ESI_Describe,

@ -31,6 +31,7 @@
$guide_rate_index = 0;
foreach ($service_item_info as $key => $item) {
$count_rate_index++;
//echo $item->ESI_Rate. ' ';
$count_rate = $count_rate + $item->ESI_Rate;
if ($item->ESI_ServiceType == 'W') {
$guide_rate_index++;
@ -118,7 +119,7 @@
?>
<tr>
<td><?php echo empty($item->ESI_Describe)?$item->ESI_ServiceName:$item->ESI_Describe; ?></td>
<td><label><input type='radio' value="5" <?php if ($item->ESI_Rate == 5 || empty($item->ESI_Rate)) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Excellent</label></td>
<td><label><input type='radio' value="5" <?php if ($item->ESI_Rate == 5 || empty($item->ESI_Rate) || $item->ESI_Rate==0.00) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Excellent</label></td>
<td><label><input type='radio' value="4" <?php if ($item->ESI_Rate == 4) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Very Good</label></td>
<td><label><input type='radio' value="3" <?php if ($item->ESI_Rate == 3) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Fair</label></td>
<td><label><input type='radio' value="2" <?php if ($item->ESI_Rate == 2) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Poor</label></td>
@ -139,7 +140,7 @@
?>
<tr>
<td><?php echo empty($item->ESI_Describe)?$item->ESI_ServiceName:$item->ESI_Describe; ?></td>
<td><label><input type='radio' value="5" <?php if ($item->ESI_Rate == 5 || empty($item->ESI_Rate)) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Excellent</label></td>
<td><label><input type='radio' value="5" <?php if ($item->ESI_Rate == 5 || empty($item->ESI_Rate) || $item->ESI_Rate==0.00) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Excellent</label></td>
<td><label><input type='radio' value="4" <?php if ($item->ESI_Rate == 4) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Very Good</label></td>
<td><label><input type='radio' value="3" <?php if ($item->ESI_Rate == 3) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Fair</label></td>
<td><label><input type='radio' value="2" <?php if ($item->ESI_Rate == 2) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Poor</label></td>
@ -155,11 +156,11 @@
</tr>
<?php
foreach ($service_item_info as $item) {
if ($item->ESI_ServiceType == 'A' || $item->ESI_ServiceType == 'C' || $item->ESI_ServiceType == '7') {
if ($item->ESI_ServiceType == 'A' || $item->ESI_ServiceType == 'C' || ($item->ESI_ServiceType == '7' && $item->ESI_ServiceSN==0)) {
?>
<tr>
<td><?php echo empty($item->ESI_Describe)?$item->ESI_ServiceName:$item->ESI_Describe; ?></td>
<td><label><input type='radio' value="5" <?php if ($item->ESI_Rate == 5 || empty($item->ESI_Rate)) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Excellent</label></td>
<td><label><input type='radio' value="5" <?php if ($item->ESI_Rate == 5 || empty($item->ESI_Rate) || $item->ESI_Rate==0.00) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>' >Excellent</label></td>
<td><label><input type='radio' value="4" <?php if ($item->ESI_Rate == 4) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Very Good</label></td>
<td><label><input type='radio' value="3" <?php if ($item->ESI_Rate == 3) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Fair</label></td>
<td><label><input type='radio' value="2" <?php if ($item->ESI_Rate == 2) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Poor</label></td>
@ -169,7 +170,26 @@
}
}
?>
<tr>
<td colspan="6"><h3>4. Our Spotlight Experience(s)</h3></td>
</tr>
<?php
foreach ($service_item_info as $item) {
if ( $item->ESI_ServiceType == '7' && $item->ESI_ServiceSN>0) {
?>
<tr>
<td><?php echo empty($item->ESI_Describe)?$item->ESI_ServiceName:$item->ESI_Describe; ?></td>
<td><label><input type='radio' value="5" <?php if ($item->ESI_Rate == 5 || empty($item->ESI_Rate) || $item->ESI_Rate==0.00) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>' >Excellent</label></td>
<td><label><input type='radio' value="4" <?php if ($item->ESI_Rate == 4) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Very Good</label></td>
<td><label><input type='radio' value="3" <?php if ($item->ESI_Rate == 3) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Fair</label></td>
<td><label><input type='radio' value="2" <?php if ($item->ESI_Rate == 2) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Poor</label></td>
<td><label><input type='radio' value="1" <?php if ($item->ESI_Rate == 1) { echo "checked"; } ?> name='<?php echo 'esi_sn_' . $item->ESI_SN; ?>'>Unacceptable</label></td>
</tr>
<?php
}
}
?>
</table>
</div>
@ -181,7 +201,7 @@
switch ($group_service->QSFour) {
case 223005:
?>
<h3>4. What do you think of #<?php echo $group_service->QSFourServiceName; ?>#?</h3>
<h3>5. What do you think of #<?php echo $group_service->QSFourServiceName; ?>#?</h3>
<input type="hidden" name="q4_eef_type" value="<?php echo $group_service->QSFour; ?>" />
<div class="row">
<div class="col-md-24">
@ -192,7 +212,7 @@
break;
case 223006:
?>
<h3>4.What were the most enjoyable or memorable parts of your trip?</h3>
<h3>5.What were the most enjoyable or memorable parts of your trip?</h3>
<input type="hidden" name="q4_eef_type" value="<?php echo $group_service->QSFour; ?>" />
<div class="row">
<div class="col-md-24">
@ -203,7 +223,7 @@
break;
case 223007:
?>
<h3>4.If you could take your trip again, what would you do differently?</h3>
<h3>5.If you could take your trip again, what would you do differently?</h3>
<input type="hidden" name="q4_eef_type" value="<?php echo $group_service->QSFour; ?>" />
<div class="row">
<div class="col-md-24">
@ -225,7 +245,7 @@
switch ($group_service->QSFive) {
case 223008:
?>
<h3>5. Did you recommend #<?php echo $group_service->QSFiveServiceName; ?>#?</h3>
<h3>6. Did you recommend #<?php echo $group_service->QSFiveServiceName; ?>#?</h3>
<div class="row">
<input type="hidden" name="q5_eef_type" value="<?php echo $group_service->QSFive; ?>" />
<div class="col-md-2"><label><input type='radio' name='q5_eef_content_radio' <?php echo ($QSFive_EEF_ID == 'yes') ? 'checked' : false; ?> value="yes">YES</label></div>
@ -237,7 +257,7 @@
break;
case 223009:
?>
<h3>5. Did your guide take you to any shops/factories or tried to influence you to do so?</h3>
<h3>6. Did your guide take you to any shops/factories or tried to influence you to do so?</h3>
<div class="row">
<input type="hidden" name="q5_eef_type" value="<?php echo $group_service->QSFive; ?>" />
@ -250,7 +270,7 @@
break;
case 223010:
?>
<h3>5. Did your tour guide go the extra mile?</h3>
<h3>6. Did your tour guide go the extra mile?</h3>
<div class="row">
<input type="hidden" name="q5_eef_type" value="<?php echo $group_service->QSFive; ?>" />
@ -263,7 +283,7 @@
break;
case 223011:
?>
<h3>5. Did your tour guide take our sign/logo when met at the airport?</h3>
<h3>6. Did your tour guide take our sign/logo when met at the airport?</h3>
<div class="row">
<input type="hidden" name="q5_eef_type" value="<?php echo $group_service->QSFive; ?>" />
@ -280,7 +300,7 @@
<div class="row">
<div class="col-md-24">
<h3>6. Are you willing to recommend us on Trip Advisor?</h3>
<h3>7. Are you willing to recommend us on Trip Advisor?</h3>
</div>
</div>

@ -7,24 +7,17 @@ class Index extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->model('ding_value_model');
}
public function test_cookie(){
//https://oapi.dingtalk.com/connect/oauth2/sns_authorize?appid=dingoagxeeheunc0p95eu8&response_type=code&scope=snsapi_login&state=STATE&redirect_uri=http://www.mycht.cn/webht.php/apps/dingmail/index/test_cookie
$this->load->helper('cookie');
}
public function index($unionid = null,$type = null){
if($this->session->userdata('dingding_user_info') === false){
$this->session->set_userdata('unionid', $unionid);
$this->session->set_userdata('type',$type);
$this->load->view('login');
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
redirect('http://www.mycht.cn/info.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/');
}else{
if($unionid != null && $type != null){
$user_info = $this->session->userdata('dingding_user_info');
$data['type'] = $type;
$data['user'] = $user_info->ddu_Name;
$data['user_unionid'] = $user_info->ddu_Unionid;
$data['user'] = get_cookie('dingname');
$data['user_unionid'] = get_cookie('dingunionid');
if($this->ding_value_model->get_dingding_user($unionid) == null){
echo '该用户还未登录过,请告知他登录后才能对他点赞或拍砖!<br>';
echo '有问题请联系CYC!';
@ -56,7 +49,7 @@ class Index extends CI_Controller {
}
}else{
if($unionid == null){
$unionid = $this->session->userdata('dingding_user_info')->ddu_Unionid;
$unionid = get_cookie('dingunionid');
}
$mdata['user'] = $this->ding_value_model->get_dingding_user($unionid);
$mdata['user_unionid'] = $unionid;
@ -73,12 +66,10 @@ class Index extends CI_Controller {
//value邮件页面
public function mail_index(){
if($this->session->userdata('dingding_user_info') === false){
$this->load->view('login');
}else{
//print_r($this->session->userdata('dingding_user_info'));
$this->load->view('mail');
}
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
redirect('http://www.mycht.cn/info.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/');
}
$this->load->view('mail');
}
//发送邮件
@ -397,8 +388,8 @@ class Index extends CI_Controller {
//点赞排行榜
public function rank_person() {
if($this->session->userdata('dingding_user_info') === false){
$this->load->view('login');
if(get_cookie('dingname') == '' && get_cookie('dingunionid') == ''){
redirect('http://www.mycht.cn/info.php/apps/dinglogin/login/?returnurl=http://www.mycht.cn/webht.php/apps/dingmail/index/');
}else{
$data = array();
$user_info = $this->session->userdata('dingding_user_info');
@ -599,7 +590,6 @@ class Index extends CI_Controller {
//退出
public function logout(){
$this->session->unset_userdata('dingding_user_info');
$this->session->unset_userdata('unionid');
$this->session->unset_userdata('type');
$this->session->unset_userdata('identify');

@ -43,7 +43,7 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="<?php echo site_url('apps/dingmail/index/mail_index');?>">Value发送</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/index/'.$this->session->userdata('dingding_user_info')->ddu_Unionid);?>">个人中心</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/index/'.get_cookie('dingunionid'));?>">个人中心</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/rank_person');?>">排行榜</a></li>
</ul>
</div>

@ -46,7 +46,7 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="<?php echo site_url('apps/dingmail/index/mail_index');?>">Value发送</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/index/'.$this->session->userdata('dingding_user_info')->ddu_Unionid);?>">个人中心</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/index/'.get_cookie('dingunionid'));?>">个人中心</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/rank_person');?>">排行榜</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">

@ -45,7 +45,7 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="<?php echo site_url('apps/dingmail/index/mail_index');?>">Value发送</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/index/'.$this->session->userdata('dingding_user_info')->ddu_Unionid);?>">个人中心</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/index/'.get_cookie('dingunionid'));?>">个人中心</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/rank_person');?>">排行榜</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">

@ -43,7 +43,7 @@
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="<?php echo site_url('apps/dingmail/index/mail_index');?>">Value发送</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/index/'.$this->session->userdata('dingding_user_info')->ddu_Unionid);?>">个人中心</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/index/'.get_cookie('dingunionid')) ?>">个人中心</a></li>
<li><a href="<?php echo site_url('apps/dingmail/index/rank_person');?>">排行榜</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
@ -110,7 +110,7 @@
<div class="clearfix"></div>
</div>
</div>
<?php if($this->session->userdata('dingding_user_info')->ddu_Name == $user->ddu_Name ){ ?>
<?php if(get_cookie('dingname') == $user->ddu_Name ){ ?>
<div class="panel">
<div class="panel-body">
<legend>
@ -121,10 +121,10 @@
<a href="http://www.mycht.cn/webht.php/apps/dingmail/index/mail_index">
<img src="http://www.mycht.cn/css/images/+valuemail.png">
</a>
<a href="http://www.mycht.cn/webht.php/apps/dingmail/index/index/<?php echo $this->session->userdata('dingding_user_info')->ddu_Unionid?>/like">
<a href="http://www.mycht.cn/webht.php/apps/dingmail/index/index/<?php echo get_cookie('dingunionid'); ?>/like">
<img src="http://www.mycht.cn/css/images/+like.png">
</a>
<a href="http://www.mycht.cn/webht.php/apps/dingmail/index/index/<?php echo $this->session->userdata('dingding_user_info')->ddu_Unionid?>/unlike">
<a href="http://www.mycht.cn/webht.php/apps/dingmail/index/index/<?php echo get_cookie('dingunionid'); ?>/unlike">
<img src="http://www.mycht.cn/css/images/+unlike.png">
</a>
</div>

Loading…
Cancel
Save