同步到144代码更新

feature/pay
cyc 6 years ago
parent 47b2f0a7c7
commit 6454733a9a

@ -253,7 +253,7 @@ class BIZ_train_model extends CI_Model {
//自动获取符合自动出票要求的订单的coli_sn
function auto_check_ticket(){
$sql = "SELECT distinct top 20 COLD_SN ,coli_id,COLD_SPFS,COLI_State
$sql = "SELECT distinct top 30 COLD_SN ,coli_id,COLD_SPFS,COLI_State
FROM BIZ_ConfirmLineInfo bcli
inner join BIZ_ConfirmLineDetail bcld on COLD_COLI_SN=COLI_SN
LEFT JOIN BIZ_GroupAccountInfo bgai

@ -18,7 +18,7 @@ class Index extends CI_Controller {
header('Access-Control-Allow-Credentials:true');
$this->load->model('Tripadvisor_Review_model');
}
public function index($city = 'Beijing') {
$this->permission->is_admin();
$data = array();
@ -228,6 +228,7 @@ class Index extends CI_Controller {
require_once "PHPExcel/IOFactory.php";
$phpExcel = PHPExcel_IOFactory::load($path.$filename);
//创建返回的数组
$data = [];
foreach ($phpExcel->getSheetNames() as $key=>$destination){
@ -236,20 +237,20 @@ class Index extends CI_Controller {
$data[$key]->list_name = array();
$data[$key]->list_data = array();
//循环获取每个表格的行/列数
$row = $phpExcel->getActiveSheet()->getHighestRow();
$column = $phpExcel->getActiveSheet()->getHighestColumn();
$row = $phpExcel->getSheet($key)->getHighestRow();
$column = $phpExcel->getSheet($key)->getHighestColumn();
$j = 0;
// 行数循环
for ($i = 1; $i <= $row; $i++) {
// 列数循环
for ($c = 'A'; $c <= $column; $c++) {
if($phpExcel->getActiveSheet($key)->getCell('A' . $i)->getValue() == ''){
if($phpExcel->getSheet($key)->getCell('A' . $i)->getValue() == ''){
continue;
}else{
if($i == 1){
array_push($data[$key]->list_name,$phpExcel->getActiveSheet($key)->getCell($c . $i)->getValue());
array_push($data[$key]->list_name,$phpExcel->getSheet($key)->getCell($c . $i)->getValue());
}else{
$data[$key]->list_data[$j][] = $phpExcel->getActiveSheet($key)->getCell($c . $i)->getValue();
$data[$key]->list_data[$j][] = $phpExcel->getSheet($key)->getCell($c . $i)->getValue();
}
}
@ -291,6 +292,7 @@ class Index extends CI_Controller {
set_time_limit(0);
$url = $this->input->get_post('url');
$destination = $this->input->get_post('destination');
$html_num = $this->input->get_post('html_num');
//$url = 'https://www.tripadvisor.com/ShowUserReviews-g294212-d4006739-r666168101-The_Trippest_Mini_Group_Tours-Beijing.html';
$destination = 'tp_Beijing';
@ -307,6 +309,8 @@ class Index extends CI_Controller {
$meta_inner = $html_object->find('.meta_inner');
foreach($meta_inner as $detail_info){
//记录该条记录的id
$detail_data->html_id = $html_num;
//获取评论者帐号
foreach($detail_info->find('.info_text') as $review_name){
$detail_data->review_name = $review_name->first_child()->innertext;

@ -375,21 +375,9 @@ class Index extends CI_Controller {
$year_end = strtotime(date('Y-12-31', time()));
//$year_end = strtotime(date('2016-12-31'));
$data['rank_year'] = $this->ding_value_model->get_person_rank($year_start, $year_end);
//总榜
//$data['rank_all']=$this->Outlook_model->get_person_rank();
//每条价值观对应获得最多的人
/* ycc暂时不需要了
$rank=array();
$value_array=array('team','chengxin','customer','discovery','system');
foreach ($value_array as $value) {
$rank[$value]=$this->Outlook_model->value_key_rank($value);
for ($i=1; $i < 5; $i++) {
$value_key=$value.$i;
$rank[$value_key]=$this->Outlook_model->value_key_rank($value_key);
}
}
$data['rank']=$rank;
*/
//获取全年点赞次数
$data['click_like'] = $this->ding_value_model->get_click_liek($year_start, $year_end);
$this->load->view('rank_person',$data);
}
}

@ -287,6 +287,23 @@ class ding_value_model extends CI_Model {
return $result;
}
//获取全年参与点赞的次数
public function get_click_liek($from_date=false,$to_date=false){
$datesql="";
if ($from_date) {
$datesql=" AND ddv_Createtime BETWEEN '$from_date' AND '$to_date' ";
}
$sql="SELECT COUNT(*) as like_count
FROM Dingding_Value
WHERE ddv_Type='like' AND ddv_Comment_Name != 'value邮件'
$datesql
";
$query = $this->HT->query($sql);
$result=$query->row();
return $result;
}
//更新用户信息
function update_dingding_user($name,$unionid,$mobile,$email,$position,$avatar,$time){
$sql = "UPDATE Dingding_User SET

@ -4,16 +4,16 @@
<meta charset="utf-8">
<title>value系统登录</title>
<link href="http://data.chtcdn.com/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://data.chtcdn.com/js/poshytip/tip-yellow/tip-yellow.css" type="text/css" />
<link rel="stylesheet" href="http://data.chtcdn.com/js/modaldialog/css/jquery.modaldialog.css" type="text/css" />
<link rel="stylesheet" href="http://data.chtcdn.com/js/kindeditor/themes/default/default.css" type="text/css" media="screen" />
<script type="text/javascript" src="http://data.chtcdn.com/js/jquery.js"></script>
<script type="text/javascript" src="http://data.chtcdn.com/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="http://data.chtcdn.com/js/poshytip/jquery.poshytip.min.js"></script>
<script type="text/javascript" src="http://data.chtcdn.com/js/jquery.form.min.js"></script>
<script type="text/javascript" src="http://data.chtcdn.com/js/modaldialog/jquery.modaldialog.js"></script>
<script type="text/javascript" src="http://data.chtcdn.com/js/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript" src="http://data.chtcdn.com/js/basic.js"></script>
<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>
<script type="text/javascript" src="/dinglogin/dingmail.js"></script>
<link rel="stylesheet" href="/dinglogin/dingding.css">

@ -59,7 +59,7 @@
<div class="row">
<div class="col-xs-24 btn-lg"></div>
<div class="col-xs-24">
<h3>个人获赞排行榜</h3>
<h3>个人获赞排行榜 | 全年参与点赞次数:<?php echo $click_like->like_count?></h3>
</div>
<div class="col-xs-8">
<div class="col-xs-24 bg-white min-height-500">

@ -175,7 +175,10 @@ class Index extends CI_Controller {
$data['rank_month'] = $this->Outlook_model->get_person_rank($from_date, $to_date);
//年榜
$year_start = strtotime(date('Y-01-01', time()));
//$year_start = strtotime(date('2016-01-01'));
$year_end = strtotime(date('Y-12-31', time()));
//$year_end = strtotime(date('2016-12-31'));
$data['rank_year'] = $this->Outlook_model->get_person_rank($year_start, $year_end);
//总榜
//$data['rank_all']=$this->Outlook_model->get_person_rank();
@ -342,12 +345,12 @@ class Index extends CI_Controller {
$tip_type = 'comment'; //等于comment时页面不弹出提示
$tpldata['list'] = $this->Outlook_model->get_comment_list($whc_whm_identify, 'comment', 'DESC');
$tpldata['mail_text'] = $this->Outlook_model->get_mail_text($whc_whm_identify);
$tpldata['mail_text'] = $this->Outlook_model->get_mail_text($whc_whm_identify);
$tpldata['userinfo'] = $this->Outlook_model->get_webhtuser_by_filed('whu_email', $whc_whm_identify . '@citsguilin.com', '*');
if ($current_user->whu_uid && $linktype != 'comment' && $tpldata['userinfo']->whu_uid != $current_user->whu_uid) {
$like_count = $this->Outlook_model->get_comment_count($whc_whm_identify, $linktype, $current_user->whu_uid);
if ($like_count < 3) {
if ($like_count < 3) {
$data['whc_type'] = $linktype;
$data['whc_whm_identify'] = $whc_whm_identify;
$data['whc_uid'] = $current_user->whu_uid;
@ -373,7 +376,7 @@ class Index extends CI_Controller {
}
$tpldata['list_count'] = $this->Outlook_model->get_space_comment($tpldata['userinfo']->whu_uname, $whc_whm_identify, 'comment', true);
$tpldata['like_list'] = $this->Outlook_model->get_space_comment($tpldata['userinfo']->whu_uname, $whc_whm_identify, 'like');
$tpldata['like_list'] = $this->Outlook_model->get_space_comment($tpldata['userinfo']->whu_uname, $whc_whm_identify, 'like');
$tpldata['unlike_list'] = $this->Outlook_model->get_space_comment($tpldata['userinfo']->whu_uname, $whc_whm_identify, 'unlike');
$tpldata['type'] = $tip_type;
$tpldata['current_user'] = $current_user;
@ -627,7 +630,6 @@ class Index extends CI_Controller {
$fromemail = $fromuser->whu_email;
$subject = $this->input->post('mail_subject');
$body = $this->input->post('emailcontent') . $mailbody;
if (!$this->do_sendmail($fromemail, $tolist_array, $cclist_array, $subject, $body)) {
$result = 0; //"邮件发送有误: " . $mail->ErrorInfo;
} else {
@ -659,7 +661,7 @@ class Index extends CI_Controller {
$mail->CharSet = "utf-8";
$mail->Encoding = "base64";
$mail->IsHTML(true);
$mail->From = $fromuser; //发件人
foreach ($tolist_array as $v) {
$mail->AddAddress($v); //收件人
@ -671,7 +673,8 @@ class Index extends CI_Controller {
$mail->Body = $mailbody; //邮件内容
if (!$mail->Send()) {
$result = false; //"邮件发送有误: " . $mail->ErrorInfo;
//$result = false;// echo "邮件发送有误: " . $mail->ErrorInfo;
echo "邮件发送有误: " . $mail->ErrorInfo;
} else {
$result = true;
}
@ -814,6 +817,7 @@ class Index extends CI_Controller {
$whu_uname = $whu_uname[0];
$whu_ip = $this->input->post('whu_ip');
$result = $this->Outlook_model->verify_user($whu_uname, $whu_ip);
echo $result;
}

@ -281,7 +281,7 @@ class Outlook_model extends CI_Model {
return '2';
}else{
$sql="UPDATE webht_user SET whu_ip = '$whu_ip',whu_status=1 WHERE whu_uname like '%$whu_uname%' ";
$result = $this->HT->query($sql);
$result = $this->HT->query($sql);//var_dump($this->HT->last_query());
return '1';
}
}

Loading…
Cancel
Save