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

mobile-first
lyt 5 years ago
commit 88af8a858b

@ -38,6 +38,9 @@ class Amplib {
public function auto_create($ic_id) {
$data = array();
if(strtolower($this->CI->config->item('site_code')) == 'cht'){
$this->CI->Information_model->ic_type = "AND ic.ic_type != 'none'";
}
$data['information'] = $this->CI->Information_model->detail_by_ic_id($ic_id);
if ($data['information'] == FALSE) {
return json_encode(array('result' => 'no', 'data' => '找不到这个页面'));

@ -35,7 +35,6 @@ class Information_model extends CI_Model {
$this->ic_url_is_id = false;
$this->ic_ht_area_type = false;
$this->ic_ht_area_id = false;
$this->ic_type = false;
$this->ic_id = false;
}
@ -133,7 +132,7 @@ class Information_model extends CI_Model {
}
$this->init();
$this->topNum = 1;
$this->ic_url_is_id = " AND ic.ic_id = " . $this->HT->escape($ic_id);
$this->ic_url_is_id = " AND ic.ic_id = " . $this->HT->escape($ic_id);
return $this->GetList();
}
@ -200,7 +199,7 @@ class Information_model extends CI_Model {
$this->orderBy ? $sql.=$this->orderBy : false;
$query = $this->HT->query($sql, array($site_code ? $site_code : $this->config->item('site_code')));
//print_r($this->HT->queries);
//print_r($this->HT->queries);die();
if ($this->topNum === 1) {
if ($query->num_rows() > 0) {
$row = $query->row();

@ -1,21 +1,24 @@
<?php
class Logs_model extends CI_Model {
class Logs_model extends CI_Model
{
var $insert_id = -1;
var $top_num = false;
var $log_res_id = false;
var $log_id = false;
var $log_action = false;
var $order_by = false;
var $log_datetime = false;
public $insert_id = -1;
public $top_num = false;
public $log_res_id = false;
public $log_id = false;
public $log_action = false;
public $order_by = false;
public $log_datetime = false;
function __construct() {
public function __construct()
{
parent::__construct();
$this->HT = $this->load->database('HT', TRUE);
$this->HT = $this->load->database('HT', true);
}
function init() {
public function init()
{
$this->top_num = false;
$this->log_res_id = false;
$this->log_id = false;
@ -24,8 +27,9 @@ class Logs_model extends CI_Model {
$this->order_by = " ORDER BY il.log_id DESC ";
}
//获取日志详情
function read($log_id) {
//获取日志详情.
public function read($log_id)
{
$this->init();
$this->top_num = 1;
$this->log_id = " AND il.log_id =" . $this->HT->escape($log_id);
@ -33,7 +37,8 @@ class Logs_model extends CI_Model {
}
//获取备份信息内容
function get_backup_list($is_id) {
public function get_backup_list($is_id)
{
$this->init();
$this->top_num = 16;
$this->log_res_id = " AND il.log_res_id =" . $this->HT->escape($is_id);
@ -42,7 +47,8 @@ class Logs_model extends CI_Model {
}
//获取最近的备份信息内容
function get_last_backup($is_id) {
public function get_last_backup($is_id)
{
$this->init();
$this->top_num = 1;
$this->log_res_id = " AND il.log_res_id =" . $this->HT->escape($is_id);
@ -51,27 +57,30 @@ class Logs_model extends CI_Model {
}
//获取所有备份信息内容
function get_all_backup_list($is_id,$amp=false) {
public function get_all_backup_list($is_id, $amp = false)
{
$this->init();
$this->log_res_id = " AND il.log_res_id =" . $this->HT->escape($is_id);
if($amp){
$this->log_action = " AND (il.log_action = 'backup_amp')";
}else{
$this->log_action = " AND (il.log_action = 'backup_info')";
}
if ($amp) {
$this->log_action = " AND (il.log_action = 'backup_amp')";
} else {
$this->log_action = " AND (il.log_action = 'backup_info')";
}
return $this->get_list();
}
//获取最后操作信息
function get_last_edit($is_id) {
public function get_last_edit($is_id)
{
$this->init();
$this->top_num = 1;
$this->log_res_id = " AND il.log_res_id =" . $this->HT->escape($is_id);
return $this->get_list();
}
public function get_last_log() {
public function get_last_log()
{
$this->init();
$this->top_num = 1;
$this->log_action = " AND il.log_action = 'backup_info'";
@ -79,17 +88,21 @@ class Logs_model extends CI_Model {
return $this->get_list();
}
public function get_last_cdn_update_info() {
public function get_last_cdn_update_info()
{
$this->init();
$this->top_num = 1;
$this->log_action = " AND il.log_action = 'update_cdn'";
return $this->get_list();
}
public function get_uncdn_list($last_id = false) {
public function get_uncdn_list($last_id = false)
{
$map = '';
if ($last_id)
if ($last_id) {
$map = " AND log_id > $last_id";
}
$sql = " SELECT log_id,is_sitecode,ic_url
FROM infoLogs
LEFT JOIN infoStructures ON is_id=log_res_id
@ -103,7 +116,8 @@ class Logs_model extends CI_Model {
return $query->result();
}
public function get_list_by_action() {
public function get_list_by_action()
{
$this->init();
$this->top_num = 50;
$this->log_action = " AND il.log_action = 'send_mail'";
@ -111,29 +125,30 @@ class Logs_model extends CI_Model {
return $this->get_list();
}
function get_list() {
public function get_list()
{
$this->top_num ? $sql = "SELECT TOP " . $this->top_num : $sql = "SELECT ";
$sql .= " il.log_id, \n"
. " il.log_action, \n"
. " il.log_res_id, \n"
. " il.log_ht_usercode, \n"
. " il.log_ht_username, \n"
. " il.log_content, \n"
. " il.log_datetime \n"
. "FROM infoLogs il \n"
. "WHERE 1=1 \n";
$this->log_res_id ? $sql.=$this->log_res_id : false;
$this->log_id ? $sql.=$this->log_id : false;
$this->log_action ? $sql.=$this->log_action : false;
$this->log_datetime ? $sql.=$this->log_datetime : false;
$this->order_by ? $sql.=$this->order_by : false;
. " il.log_action, \n"
. " il.log_res_id, \n"
. " il.log_ht_usercode, \n"
. " il.log_ht_username, \n"
. " il.log_content, \n"
. " il.log_datetime \n"
. "FROM infoLogs il \n"
. "WHERE 1=1 \n";
$this->log_res_id ? $sql .= $this->log_res_id : false;
$this->log_id ? $sql .= $this->log_id : false;
$this->log_action ? $sql .= $this->log_action : false;
$this->log_datetime ? $sql .= $this->log_datetime : false;
$this->order_by ? $sql .= $this->order_by : false;
$query = $this->HT->query($sql);
if ($this->top_num == 1) {
if ($query->num_rows() > 0) {
$row = $query->row();
return $row;
} else {
return FALSE;
return false;
}
} else {
return $query->result();
@ -141,31 +156,36 @@ class Logs_model extends CI_Model {
}
//备份信息内容
function backup_project($p_id, $log_content) {
public function backup_project($p_id, $log_content)
{
return $this->write('backup_project', $p_id, $log_content);
}
//备份信息内容
function backup($is_id, $log_content) {
public function backup($is_id, $log_content)
{
return $this->write('backup_info', $is_id, $log_content);
}
//备份信息meta内容,lmr - 2020/03/12
function backup_meta($is_id, $log_content, $meta_code) {
$add_icid_time_flug = 'backup_meta_'.$meta_code.'_'. $is_id.'_'.time();
public function backup_meta($is_id, $log_content, $meta_code)
{
$add_icid_time_flug = 'backup_meta_' . $meta_code . '_' . $is_id . '_' . time();
$this->write($add_icid_time_flug, $is_id, $log_content);
return $add_icid_time_flug;
}
//列表信息meta内容,lmr - 2020/03/23
function list_backup_meta($is_id, $meta_code) {
public function list_backup_meta($is_id, $meta_code)
{
$this->init();
$this->top_num = 100;
$this->log_res_id = " AND il.log_res_id =" . $this->HT->escape($is_id);
$this->log_action = " AND il.log_action like 'backup_meta_".$meta_code."_%'";
$this->log_action = " AND il.log_action like 'backup_meta_" . $meta_code . "_%'";
return $this->get_list();
}
//制定读取信息meta内容,lmr - 2020/03/23
function pick_backup_meta($action) {
public function pick_backup_meta($action)
{
$this->init();
$this->top_num = 1;
$this->log_action = " AND il.log_action =" . $this->HT->escape($action);
@ -173,28 +193,33 @@ class Logs_model extends CI_Model {
}
//备份信息简介
function backup_summary($is_id, $log_content) {
public function backup_summary($is_id, $log_content)
{
return $this->write('backup_summary', $is_id, $log_content);
}
//添加信息
function add($is_id) {
public function add($is_id)
{
return $this->write('add_info', $is_id);
}
//删除信息
function delete($is_id, $log_content) {
public function delete($is_id, $log_content)
{
return $this->write('delete_info', $is_id, $log_content);
}
//移动信息
function move($is_id_array) {
public function move($is_id_array)
{
//移动是很多个信息节点变动的在日志内容中记录所有几点id
return $this->write('move_info', 0, $is_id_array);
}
//写入测试,看看数据库写入是否正常
function write_test() {
public function write_test()
{
$sql = "
INSERT INTO infoLogs
(
@ -219,35 +244,37 @@ class Logs_model extends CI_Model {
}
//写入操作日志
function write($log_action, $is_id, $log_content = '') {
public function write($log_action, $is_id, $log_content = '')
{
$admin_info = $this->session->userdata('session_admin');
$sql = "INSERT INTO infoLogs \n"
. " ( \n"
. " log_action, log_res_id, log_content, log_ht_usercode, log_ht_username, \n"
. " log_datetime \n"
. " ) \n"
. "VALUES \n"
. " ( \n"
. " ?, ?, N?, ?, ?, GETDATE() \n"
. " )";
. " ( \n"
. " log_action, log_res_id, log_content, log_ht_usercode, log_ht_username, \n"
. " log_datetime \n"
. " ) \n"
. "VALUES \n"
. " ( \n"
. " ?, ?, N?, ?, ?, GETDATE() \n"
. " )";
$query = $this->HT->query($sql, array($log_action, $is_id, $log_content, $admin_info['OPI_Code'], $admin_info['OPI_Name']));
$this->insert_id = $this->HT->last_id('infoLogs');
return $query;
//print_r($this->HT->queries);
}
function update($log_action, $log_res_id) {
public function update($log_action, $log_res_id)
{
$sql = "UPDATE infoLogs SET log_res_id=? WHERE log_action=?";
$query = $this->HT->query($sql, array($log_res_id, $log_action));
return $query;
}
//查询上一次修改记录
function get_last_edit_amp($ic_id){
$sql = 'select top 1 log_id from infoLogs where log_res_id = ? order by log_datetime desc';
$query = $this->HT->query($sql, array($ic_id));
//查询上一次修改记录
public function get_last_edit_amp($ic_id)
{
$sql = 'select top 1 log_id from infoLogs where log_res_id = ? order by log_datetime desc';
$query = $this->HT->query($sql, array($ic_id));
return $query->row();
}
}
}

@ -14,7 +14,7 @@ class infos_model extends CI_Model {
}
function get_emptyamp_pages($sitecode){
$sql = "select ic_url from infoMetas left join infoContents on im_ic_id = ic_id where im_key = 'amp' and ic_sitecode = ? and im_value like '%<!--@CUSTOM-CONENT@-->%'";
$sql = "select ic_url from infoMetas left join infoContents on im_ic_id = ic_id where im_key = 'amp' and ic_sitecode = ? and im_value like '%<!--@CUSTOM-CONENT@-->%' and ic_type = 'none'";
$query = $this->HT->query($sql,array($sitecode));
return $query->result();
}

@ -0,0 +1,2 @@
Order Deny,Allow
Deny from all

@ -0,0 +1 @@
a:3:{s:5:"width";i:320;s:6:"height";i:213;s:4:"size";i:26940;}

@ -0,0 +1,2 @@
Order Deny,Allow
Deny from all

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@ -0,0 +1,2 @@
Order Deny,Allow
Deny from all

@ -0,0 +1 @@
a:3:{s:5:"width";i:164;s:6:"height";i:32;s:4:"size";i:3470;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:29;s:6:"height";i:32;s:4:"size";i:289;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:36;s:6:"height";i:32;s:4:"size";i:370;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:36;s:6:"height";i:32;s:4:"size";i:379;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:690;s:6:"height";i:63;s:4:"size";i:10059;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:9;s:6:"height";i:9;s:4:"size";i:63;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:9;s:6:"height";i:5;s:4:"size";i:51;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:7;s:6:"height";i:11;s:4:"size";i:209;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:7;s:6:"height";i:11;s:4:"size";i:209;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:8;s:6:"height";i:13;s:4:"size";i:117;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:14;s:6:"height";i:15;s:4:"size";i:608;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:16;s:6:"height";i:11;s:4:"size";i:4967;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:11;s:6:"height";i:11;s:4:"size";i:195;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:7;s:6:"height";i:4;s:4:"size";i:55;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:5;s:6:"height";i:5;s:4:"size";i:48;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:175;s:6:"height";i:195;s:4:"size";i:15268;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:980;s:6:"height";i:268;s:4:"size";i:97450;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:164;s:6:"height";i:102;s:4:"size";i:5143;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:200;s:4:"size";i:16010;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:313;s:6:"height";i:239;s:4:"size";i:34544;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:400;s:6:"height";i:270;s:4:"size";i:33479;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:358;s:6:"height";i:209;s:4:"size";i:42294;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:300;s:6:"height";i:200;s:4:"size";i:32858;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:300;s:6:"height";i:200;s:4:"size";i:18093;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:370;s:6:"height";i:180;s:4:"size";i:45955;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:313;s:6:"height";i:239;s:4:"size";i:27288;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:225;s:4:"size";i:12316;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:370;s:6:"height";i:180;s:4:"size";i:23133;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:225;s:4:"size";i:14401;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:358;s:6:"height";i:209;s:4:"size";i:30582;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:11051;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:358;s:6:"height";i:209;s:4:"size";i:45545;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:10190;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:358;s:6:"height";i:209;s:4:"size";i:26410;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:895;s:6:"height";i:400;s:4:"size";i:142650;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:12124;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:521;s:6:"height";i:300;s:4:"size";i:51494;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:1903;s:6:"height";i:682;s:4:"size";i:646900;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:9253;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:8991;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:895;s:6:"height";i:400;s:4:"size";i:83516;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:400;s:6:"height";i:266;s:4:"size";i:38050;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:848;s:6:"height";i:290;s:4:"size";i:38752;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:313;s:6:"height";i:239;s:4:"size";i:52078;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:520;s:6:"height";i:300;s:4:"size";i:59721;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:895;s:6:"height";i:400;s:4:"size";i:126218;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:13282;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:225;s:4:"size";i:25022;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:10019;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:10521;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:895;s:6:"height";i:400;s:4:"size";i:121731;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:895;s:6:"height";i:400;s:4:"size";i:125708;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:225;s:4:"size";i:15867;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:370;s:6:"height";i:180;s:4:"size";i:28645;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:358;s:6:"height";i:209;s:4:"size";i:30043;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:358;s:6:"height";i:209;s:4:"size";i:20810;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:400;s:6:"height";i:266;s:4:"size";i:53000;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:11242;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:8883;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:10691;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:358;s:6:"height";i:209;s:4:"size";i:30767;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:11501;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:7757;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:12313;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:14221;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:15421;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:370;s:6:"height";i:180;s:4:"size";i:21911;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:358;s:6:"height";i:209;s:4:"size";i:42816;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:200;s:6:"height";i:106;s:4:"size";i:11046;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:300;s:6:"height";i:200;s:4:"size";i:20215;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:358;s:6:"height";i:209;s:4:"size";i:27634;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:521;s:6:"height";i:300;s:4:"size";i:61245;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:1600;s:6:"height";i:1067;s:4:"size";i:2567931;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:360;s:6:"height";i:240;s:4:"size";i:42506;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:360;s:6:"height";i:240;s:4:"size";i:75948;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:1908;s:6:"height";i:700;s:4:"size";i:486682;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:1908;s:6:"height";i:700;s:4:"size";i:640449;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:360;s:6:"height";i:240;s:4:"size";i:33335;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:360;s:6:"height";i:240;s:4:"size";i:52454;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:1902;s:6:"height";i:700;s:4:"size";i:683958;}

@ -0,0 +1 @@
a:3:{s:5:"width";i:360;s:6:"height";i:240;s:4:"size";i:72385;}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save