Merge branch 'master' of git.mycht.cn:developers/information-system

hotfix/远程访问多媒体中心
LiaoYijun 8 years ago
commit beb90cb875

@ -363,12 +363,12 @@ $config['proxy_ips'] = '';
//各站信息组和人员权限分配 //各站信息组和人员权限分配
$config['site'] = array( $config['site'] = array(
'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'http://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,'), 'cht' => array('site_code' => 'cht', 'site_id' => 14, 'site_lgc' => '1', 'site_url' => 'https://www.chinahighlights.com', 'site_image_url' => '//images.chinahighlights.com', 'site_authors' => array('zzy', 'spt', 'yl', 'gavin', 'sw', 'zl', 'wbl', 'yqw', 'lf', 'zhm', 'pkl'), 'site_user' => ',ycc,lmr, zyh,J,shw,B,zzy,WJJ,Tony,pcf,zxy,wst,wz,v,S,yyg,yxd,wj,sw,yl,hx,spt,wmr,zl,syt,gavin,zm,htc,yqw,bhn,lmj,wbl,yqw,LYY,zhm,'),
'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'http://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'), 'gm' => array('site_code' => 'gm', 'site_id' => 22, 'site_lgc' => '4', 'site_url' => 'http://www.chinarundreisen.com', 'site_image_url' => '//bilder.chinarundreisen.com', 'site_authors' => array('DX', 'X', 'K', 'Lan', 'lmr', 'zyh', 'ZYHL', 'TDJ'), 'site_user' => ',ycc,lmr,B,zyh,DX,X,K,htc,zm,bhn,Lan,Tony,zyh,J,v,ZYHL,TDJ,LYY,shw,'),
'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'http://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'), 'vc' => array('site_code' => 'vc', 'site_id' => 30, 'site_lgc' => '5', 'site_url' => 'http://www.voyageschine.com', 'site_image_url' => '//images.voyageschine.com', 'site_authors' => array('JE', 'kq', 'lya', 'lyz', 'zyh'), 'site_user' => ',ycc,lmr, zyh,JE,htc,kq,lya,bhn,Tony,zyh,B,J,lyz,LYY,'),
'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'http://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'), 'jp' => array('site_code' => 'jp', 'site_id' => 88, 'site_lgc' => '3', 'site_url' => 'http://www.arachina.com', 'site_image_url' => '//images.arachina.com', 'site_authors' => array('hql', 'LLM', 'SHX', 'lmr', 'zyh', 'zb'), 'site_user' => ',ycc,lmr, zyh,hql,LLM,SHX,htc,zpl,Tony,zyh,J,B,zb,LYY,'),
'vac' => array('site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'http://www.viaje-a-china.com', 'site_image_url' => '//imagenes.viaje-a-china.com', 'site_authors' => array('I', 'cyt', 'lmr', 'zyh', 'LLM'), 'site_user' => ',ycc,lmr, zyh,I,cyt,htc,bhn,Tony,zyh,B,J,LLM,LYY,'), 'vac' => array('site_code' => 'vac', 'site_id' => 95, 'site_lgc' => '6', 'site_url' => 'http://www.viaje-a-china.com', 'site_image_url' => '//imagenes.viaje-a-china.com', 'site_authors' => array('I', 'cyt', 'lmr', 'zyh', 'LLM'), 'site_user' => ',ycc,lmr, zyh,I,cyt,htc,bhn,Tony,zyh,B,J,LLM,LYY,'),
'it' => array('site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'http://www.viaggio-in-cina.it', 'site_image_url' => '//images.viaggio-in-cina.it', 'site_authors' => array('LZY', 'ZQQ', 'lmr', 'zyh'), 'site_user' => ',ycc,lmr, zyh,LZY,htc,ZQQ,Tony,zyh,B,J,LYY,'), 'it' => array('site_code' => 'it', 'site_id' => 168, 'site_lgc' => '8', 'site_url' => 'https://www.viaggio-in-cina.it', 'site_image_url' => '//images.viaggio-in-cina.it', 'site_authors' => array('LZY', 'ZQQ', 'lmr', 'zyh'), 'site_user' => ',ycc,lmr, zyh,LZY,htc,ZQQ,Tony,zyh,B,J,LYY,'),
'ru' => array('site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'http://www.chinahighlights.ru', 'site_image_url' => '//images.chinahighlights.ru', 'site_authors' => array('xjj', 'zyy'), 'site_user' => ',ycc,lmr, zyh,xjj,htc,DX,zyy,bhn,Tony,zyh,B,J,LYY,'), 'ru' => array('site_code' => 'ru', 'site_id' => 102, 'site_lgc' => '7', 'site_url' => 'http://www.chinahighlights.ru', 'site_image_url' => '//images.chinahighlights.ru', 'site_authors' => array('xjj', 'zyy'), 'site_user' => ',ycc,lmr, zyh,xjj,htc,DX,zyy,bhn,Tony,zyh,B,J,LYY,'),
'wt' => array('site_code' => 'wt', 'site_id' => 172, 'site_lgc' => '2', 'site_url' => 'http://www.iiiyooo.com', 'site_image_url' => '', 'site_authors' => array('ylh', 'lfj', 'wx', 'lzh', 'shw', 'lx'), 'site_user' => ',ycc,lmr, zyh,ylh,lfj,wx,lzh,shw,lx,bhn,B,J,'), 'wt' => array('site_code' => 'wt', 'site_id' => 172, 'site_lgc' => '2', 'site_url' => 'http://www.iiiyooo.com', 'site_image_url' => '', 'site_authors' => array('ylh', 'lfj', 'wx', 'lzh', 'shw', 'lx'), 'site_user' => ',ycc,lmr, zyh,ylh,lfj,wx,lzh,shw,lx,bhn,B,J,'),
'tbt' => array('site_code' => 'tbt', 'site_id' => 169, 'site_lgc' => '1', 'site_url' => 'http://www.tibettravel.info', 'site_image_url' => '/images', 'site_authors' => array('wj', 'sfx'), 'site_user' => ',ycc,wj,bhn,wx,lzh,lfj,hwt,thf,sfx,J,ZP,'), 'tbt' => array('site_code' => 'tbt', 'site_id' => 169, 'site_lgc' => '1', 'site_url' => 'http://www.tibettravel.info', 'site_image_url' => '/images', 'site_authors' => array('wj', 'sfx'), 'site_user' => ',ycc,wj,bhn,wx,lzh,lfj,hwt,thf,sfx,J,ZP,'),
@ -691,7 +691,7 @@ $config['media_image_url_remote2'] = 'http://116.251.217.48:3581/upload';
//是否开启权限控制 //是否开启权限控制
$config['check_access'] = TRUE; $config['check_access'] = TRUE;
//权限管理超级管理 //权限管理超级管理
$config['access_super_manage'] = array('ycc', 'lyy', 'lmr'); $config['access_super_manage'] = array('ycc', 'lmr');
//编辑器预览样式路径 //编辑器预览样式路径
$config['css_source_cht'] = '<link href="http://data.chinahighlights.com/css/min.php?f=/public/css/global.min.css,/css/festival-detail.css" rel="stylesheet">'; $config['css_source_cht'] = '<link href="http://data.chinahighlights.com/css/min.php?f=/public/css/global.min.css,/css/festival-detail.css" rel="stylesheet">';
@ -1019,11 +1019,6 @@ $config['media_image_url_org'] = 'http://202.103.68.35/image';
$config['media_image_url_remote'] = 'http://photo.chtcdn.com/upload'; $config['media_image_url_remote'] = 'http://photo.chtcdn.com/upload';
$config['media_image_url_remote2'] = 'http://116.251.217.48:3581/upload'; $config['media_image_url_remote2'] = 'http://116.251.217.48:3581/upload';
//是否开启权限控制
$config['check_access'] = TRUE;
//权限管理超级管理
$config['access_super_manage'] = array('ycc');
//编辑器预览样式路径 //编辑器预览样式路径
$config['css_source_cht'] = '<link href="http://data.chinahighlights.com/css/min.php?f=/public/css/global.min.css,/css/festival-detail.css&amp;v=20140915" rel="stylesheet">'; $config['css_source_cht'] = '<link href="http://data.chinahighlights.com/css/min.php?f=/public/css/global.min.css,/css/festival-detail.css&amp;v=20140915" rel="stylesheet">';
$config['css_source_ah'] = '<link href="https://www.asiahighlights.com/min/?f=/css/global.min.css,/js/bootstrap-datepicker/css/bootstrap-datepicker3.standalone.css,/css/basic.css,/css/homepage.css,/css/contact.css,/css/tailor-make.css,/css/tour.css,/css/tour-detail.css,/css/inquiry-form.css,/css/missing.css" rel="stylesheet">'; $config['css_source_ah'] = '<link href="https://www.asiahighlights.com/min/?f=/css/global.min.css,/js/bootstrap-datepicker/css/bootstrap-datepicker3.standalone.css,/css/basic.css,/css/homepage.css,/css/contact.css,/css/tailor-make.css,/css/tour.css,/css/tour-detail.css,/css/inquiry-form.css,/css/missing.css" rel="stylesheet">';

@ -1,137 +1,194 @@
<?php <?php
if (!defined('BASEPATH')) if (!defined('BASEPATH'))
exit('No direct script access allowed'); exit('No direct script access allowed');
class Cache extends CI_Controller class Cache extends CI_Controller
{ {
//缓存文件绝对路径 //缓存文件绝对路径
private $dir = ''; private $dir = '';
//存放缓存文件的数组 //存放缓存文件的数组
private $file = array(); private $file = array();
//存放缓存文件夹的数组 //存放缓存文件夹的数组
private $path = array(); private $path = array();
//缓存更新接口 //缓存更新接口
private $cache_api = ''; private $cache_api = '';
//缓存更新参数 //缓存更新参数
private $post_para = ''; private $post_para = '';
//当前站点域名 //当前站点域名
private $current_domain = ''; private $current_domain = '';
//文件更新日期 //文件更新日期
private $file_time = array(); private $file_time = array();
function __construct() function __construct()
{ {
parent::__construct(); parent::__construct();
$this->permission->is_admin(); $this->permission->is_admin();
$this->load->model('Area_model'); $this->load->model('Area_model');
$this->load->model('InfoStructures_model'); $this->load->model('InfoStructures_model');
$this->load->model('Information_model'); $this->load->model('Information_model');
$this->site_code = $this->config->item('site_code'); $this->site_code = $this->config->item('site_code');
} }
/** /**
* *
* 公有函数:扫描已有缓存文件并更新。 * 公有函数:扫描已有缓存文件并更新。
* *
* 必要参数: * 必要参数:
* @param String $site_code * @param String $site_code
* *
*/ */
public function update() public function update()
{ {
//设置缓存文件文件夹 //设置缓存文件文件夹
$cache_config = $this->config->item('cache'); $cache_config = $this->config->item('cache');
$current_cache_config = $cache_config[$this->site_code]; $current_cache_config = $cache_config[$this->site_code];
$this->dir = $current_cache_config['cache_path']; $this->dir = $current_cache_config['cache_path'];
//设置当前站点 //设置当前站点
$this->current_domain = $this->config->item('site_url'); $this->current_domain = $this->config->item('site_url');
//设置缓存更新接口及POST参数 //echo $this->config->item('site_url');
$this->cache_api = $current_cache_config['cache_api']; //设置缓存更新接口及POST参数
$this->post_para = $current_cache_config['cache_api_para']; $this->cache_api = $current_cache_config['cache_api'];
//遍历缓存文件夹 $this->post_para = $current_cache_config['cache_api_para'];
$this->tree($this->dir, $this->file, $this->path, $this->file_time); //遍历缓存文件夹
//按目录筛选结果 $this->tree($this->dir, $this->file, $this->path, $this->file_time);
$this->filter($this->file, $this->path); //按目录筛选结果
$this->filter($this->file, $this->path);
//整理需要传递到视图的数据
$data['file'] = $this->file; //整理需要传递到视图的数据
$data['path'] = $this->path; $data['file'] = $this->file;
$data['file_time'] = $this->file_time; $data['path'] = $this->path;
$data['cache_api'] = $this->cache_api; $data['file_time'] = $this->file_time;
$data['post_para'] = $this->post_para; $data['cache_api'] = $this->cache_api;
$data['post_para'] = $this->post_para;
//视图
$this->load->view('cache/update', $data); //视图
} $this->load->view('cache/update', $data);
}
/**
* /**
* 私有函数:递归遍历缓存文件夹,将目录存放到$path文件存放到$file。 *
* * 公有函数:扫描已有缓存文件并更新。
* 必要参数: *
* @param String $dir - 需要遍历的目录 * 必要参数:
* @param Array $file - 存放文件结果的数组引用 * @param String $site_code
* @param Array $path - 存放路径结果的数组引用 *
* @param Array $file_time - 存放文件更新日期的数组引用 */
* public function sitemap()
*/ {
private function tree($dir, &$file, &$path, &$file_time) header("Content-type:text/xml");
{ //设置缓存文件文件夹
$mydir = dir($dir); $cache_config = $this->config->item('cache');
while($f = $mydir->read()) $current_cache_config = $cache_config[$this->site_code];
{ $this->dir = $current_cache_config['cache_path'];
if(is_dir("$dir/$f") && $f!="." && $f!=".." && (strpos($dir, '/cn/')==false))
{ //设置当前站点
$path[] = "$dir/$f"; $this->current_domain = $this->config->item('site_url');
$this->tree("$dir/$f", $file, $path, $file_time); //设置缓存更新接口及POST参数
} $this->cache_api = $current_cache_config['cache_api'];
else $this->post_para = $current_cache_config['cache_api_para'];
{ //遍历缓存文件夹
if ($f!='.' && $f!='..' && (strpos($dir, '/cn/')==false)) $this->tree($this->dir, $this->file, $this->path, $this->file_time);
{ //按目录筛选结果
$file_temp = str_ireplace('index.htm###', '', $f.'###'); $this->filter($this->file, $this->path);
$file_temp = str_ireplace('###', '', $file_temp);
$path_temp = str_ireplace($this->dir, '', $dir); //整理需要传递到视图的数据
$url_temp = $this->current_domain.$path_temp.'/'.$file_temp; $data['file'] = $this->file;
$file_time[$url_temp] = date("F d Y H:i:s", filemtime("$dir/$f")); $data['path'] = $this->path;
$file[] = $url_temp; $data['file_time'] = $this->file_time;
} $data['cache_api'] = $this->cache_api;
} $data['post_para'] = $this->post_para;
}
$mydir->close(); //排序file数组
} sort ($data['file']);
//生成sitemap
/** $dom = new DomDocument('1.0', 'utf-8');
* $urlset = $dom->createElement('urlset');
* 私有函数:筛选目录和文件。 $urlset->setAttribute('xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9');
* $dom->appendchild($urlset);
* 必要参数: foreach ($data['file'] as $f)
* @param Array $file - 存放文件结果的数组引用 {
* @param Array $path - 存放路径结果的数组引用 $url = $dom->createElement('url');
* $loc = $dom->createElement('loc');
* 可选参数POST参数 - $_POST['p'] $text = $dom->createTextNode($f);
* $loc->appendchild($text);
*/ $url->appendchild($loc);
private function filter(&$file, &$path) $urlset->appendchild($url);
{ }
if (isset($_POST['p']) && !empty($_POST['p']))
{ echo($dom->saveXML());
//删选文件
foreach ($file as &$f) }
{
(stripos($f, $_POST['p'])!==false) or $f = false;
} /**
$file = array_filter($file); *
//删选目录 * 私有函数:递归遍历缓存文件夹,将目录存放到$path文件存放到$file。
foreach ($path as &$p) *
{ * 必要参数:
(stripos($p, $_POST['p'])!==false) or $p = false; * @param String $dir - 需要遍历的目录
} * @param Array $file - 存放文件结果的数组引用
$path = array_filter($path); * @param Array $path - 存放路径结果的数组引用
} * @param Array $file_time - 存放文件更新日期的数组引用
} *
*/
} private function tree($dir, &$file, &$path, &$file_time)
//end of Cache {
$mydir = dir($dir);
while($f = $mydir->read())
{
if(is_dir("$dir/$f") && $f!="." && $f!=".." && (strpos($dir, '/cn/')==false))
{
$path[] = "$dir/$f";
$this->tree("$dir/$f", $file, $path, $file_time);
}
else
{
if ($f!='.' && $f!='..' && (strpos($dir, '/cn/')==false) && (strpos($f, '.pdf')===false))
{
$file_temp = str_ireplace('index.htm###', '', $f.'###');
$file_temp = str_ireplace('###', '', $file_temp);
$path_temp = str_ireplace($this->dir, '', $dir);
$url_temp = $this->current_domain.$path_temp.'/'.$file_temp;
$file_time[$url_temp] = date("F d Y H:i:s", filemtime("$dir/$f"));
$file[] = $url_temp;
}
}
}
$mydir->close();
}
/**
*
* 私有函数:筛选目录和文件。
*
* 必要参数:
* @param Array $file - 存放文件结果的数组引用
* @param Array $path - 存放路径结果的数组引用
*
* 可选参数POST参数 - $_POST['p']
*
*/
private function filter(&$file, &$path)
{
if (isset($_POST['p']) && !empty($_POST['p']))
{
//删选文件
foreach ($file as &$f)
{
(stripos($f, $_POST['p'])!==false) or $f = false;
}
$file = array_filter($file);
//删选目录
foreach ($path as &$p)
{
(stripos($p, $_POST['p'])!==false) or $p = false;
}
$path = array_filter($path);
}
}
}
//end of Cache

@ -92,7 +92,7 @@ class Sendmail extends CI_Controller
} }
} }
$this->InfoSMS_model->set_mail_status($m->M_SN,1,$order_condition); $this->InfoSMS_model->set_mail_status($m->M_SN,1);
$this->email->clear(TRUE); $this->email->clear(TRUE);
} }
} }

@ -0,0 +1,40 @@
<?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
class Tools extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->permission->is_admin();
$this->load->model('Area_model');
$this->load->model('InfoStructures_model');
$this->load->model('Information_model');
$this->site_code = $this->config->item('site_code');
}
/**
*
* 公有函数:扫描已有缓存文件并更新。
*
* 必要参数:
* @param String $site_code
*
*/
public function old()
{
$data['yeardiff'] = $this->input->get_post('yeardiff');
$data['nopub'] = $this->input->get_post('nopub');
$data['emptyinfo'] = $this->input->get_post('emptyinfo');
//参数
if (!$data['yeardiff']) $data['yeardiff'] = 3;
//老旧信息
$data['info'] = $this->Information_model->get_oldest_info($data['yeardiff'], $data['nopub'], $data['emptyinfo']);
//视图
$this->load->view('tools/old', $data);
}
}
//end of Cache

@ -328,4 +328,33 @@ class Information_model extends CI_Model {
return $this->GetList(); return $this->GetList();
} }
//获取3年未更新的信息
function get_oldest_info($yeardiff = 3, $has_no_pub = true, $empty_info = true) {
$has_no_pub ? $sql_no_pub = '' : $sql_no_pub = "AND ic_status = 1";
$empty_info ? $sql_empty_info = '' : $sql_empty_info = "AND datalength(ic_content) > 0";
//sql
$sql = "SELECT
ic_id,
ic_url,
ic_sitecode,
ic_title,
ic_url_title,
ic_datetime,
ic_type,
ic_author,
ic_status,
ic_view,
is_id
FROM infoContents
LEFT JOIN infoStructures ON ic_id = is_ic_id
WHERE YEAR(GETDATE()) - YEAR(ic_datetime) >= ?
AND ic_sitecode = ?
".$sql_no_pub."
".$sql_empty_info."
AND ic_url <> ''
ORDER BY ic_datetime desc";
$query = $this->HT->query($sql, array($yeardiff, $this->config->item('site_code')));
return $query->result();
}
} }

@ -136,6 +136,7 @@ class PageSpeedData_model extends CI_Model {
$this->where .= " AND psd.psd_DesktopScore BETWEEN $start_score AND $end_score "; $this->where .= " AND psd.psd_DesktopScore BETWEEN $start_score AND $end_score ";
$this->orderby = ' ORDER BY psd_DesktopScore ASC '; $this->orderby = ' ORDER BY psd_DesktopScore ASC ';
} }
$this->where .= " AND psd.psd_ErrorCount<=3 ";
return $this->get_list(); return $this->get_list();
} }

@ -0,0 +1,80 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Sendmail_model extends CI_Model {
function __construct()
{
parent::__construct();
$this->HT = $this->load->database('HT', TRUE);
}
function SendMailToTable($fromName,$fromEmail,$toName,$toEmail,$subject,$body)
{
if($this->validEmail($toEmail))
{
$data = array(
"M_ReplyToName" => $fromName, //回复人
"M_ReplyToEmail" => $fromEmail, //回复地址
"M_ToName" => $toName, //收件人名
"M_ToEmail" => $toEmail, //收件邮件地址
"M_Title" => $subject, //主题
"M_Body" => $body, //邮件正文
"M_Web" => "CHT", //所属站点
"M_FromName" => "Chinahighlights.com", //站点名称
"M_State" => 0,
);
$this->HT->insert('Email_AutomaticSend',$data);
return TRUE;
}else{
return FALSE;
}
}
public function validEmail($email){
$isValid = true;
$atIndex = strrpos($email, "@");
if (is_bool($atIndex) && !$atIndex){
$isValid = false;
}else{
$domain = substr($email, $atIndex+1);
$local = substr($email, 0, $atIndex);
$localLen = strlen($local);
$domainLen = strlen($domain);
if ($localLen < 1 || $localLen > 64){
// local part length exceeded
$isValid = false;
}else if ($domainLen < 1 || $domainLen > 255){
// domain part length exceeded
$isValid = false;
}else if ($local[0] == '.' || $local[$localLen-1] == '.'){
// local part starts or ends with '.'
$isValid = false;
}else if (preg_match('/\\.\\./', $local)){
// local part has two consecutive dots
$isValid = false;
}else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain)){
// character not valid in domain part
$isValid = false;
}else if (preg_match('/\\.\\./', $domain)){
// domain part has two consecutive dots
$isValid = false;
}else if(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&`_=\\/$\'*+?^{}|~.-])+$/',str_replace("\\\\","",$local))){
// character not valid in local part unless
// local part is quoted
if (!preg_match('/^"(\\\\"|[^"])+"$/',str_replace("\\\\","",$local))){
$isValid = false;
}
}
/*
不检查是否有DNS解析
if ($isValid && !(checkdnsrr($domain,"MX") || checkdnsrr($domain,"A"))){
// domain not found in DNS
$isValid = false;
}
*/
}
return $isValid;
}
}

@ -0,0 +1,70 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<style>
*{ font-family:Verdana, Geneva, sans-serif;}
h1{ font-size:18px; text-align:center; color:#545454; margin:0 0 10px 0!important;}
p{ font-size:14px; color:#545454; line-height:22px; margin-bottom:12px!important;}
table.table{ width:90%; border-width:1px 1px 0 1px; border-color:#d1d1d1; border-style: solid; margin-bottom:15px;}
table.table th{ background:#f1f1f1; color:#666; border-bottom:1px solid #d1d1d1; width:180px; font-size:14px; text-align:left; padding:8px 10px 8px 10px;}
table.table td{ padding:8px 0 8px 10px; border-bottom:1px solid #d1d1d1; font-size:14px; color:#545454;}
</style>
</head>
<body>
<h1>China Highlights Booking Confirmation</h1>
<p>Dear <?php echo $user[0]->GUT_LastName?>,</p>
<p>Thanks for payment US$145 . The train tickets have already been issued. </p>
<p> You can collect the paper ticket(s) from now at any train station in mainland China. </p>
<p> Please present all passenger(s) original passport(s) and Ticket Pick Up No.E601014106 &nbsp;at any ticket collecting counters (in Chinese 取票窗口)of any railway stations in mainland China. They will then issue your paper train ticket(s). </p>
<table border="0" cellpadding="0" cellspacing="0" class="table">
<tr>
<th>Passenger(s)</th>
<td><p>2 adult(s)
</p>
<p> 1. ALEXANDER JAMES JOHNSON , passport number 503406354<br />
2. SIAN MARIE JOHNSON , passport number 528876517</p></td>
</tr>
</table>
<p>Train 1:</p>
<table border="0" cellpadding="0" cellspacing="0" class="table">
<tr>
<th><strong>Ticket Pick Up No.</strong></th>
<td>E601014106&nbsp; </td>
</tr>
<tr>
<th><strong>Train No.</strong></th>
<td>Z19</td>
</tr>
<tr>
<th><strong>Departure</strong></th>
<td>20:40 Jun.06 Beijing Xi (West) Station(in Chinese 北京西火车站)</td>
</tr>
<tr>
<th><strong>Arrival</strong></th>
<td>08:31AM Jun.07 Xi'an Station(in Chinese 西安火车站) </td>
</tr>
<tr>
<th><strong>Class</strong></th>
<td>Soft Sleeper </td>
</tr>
</table>
<p>Kindly note below:</p>
<p> 1. The same passport that was used for booking should also be used for ticket collection. A renewed passport won't be acceptable even if the holder is the same person. The system does not allow us to change passport number or passenger name after issue ticket. Have to issue new ticket if wrong passport number or name.</p>
<p> 2. There is no further fee if collect train ticket(s) at the DEPARTURE station shown on your ticket(s). RMB 5 per ticket will be charged at a ticket counter at other stations. E.g. if you have booked Beijing-Shanghai and Shanghai-Beijing ticket(s), and you collect them all at Beijing, you will be charged RMB 5 per ticket for the Shanghai-Beijing ticket(s), but if you pick up the return leg ticket(s) separately in Shanghai you will avoid the charge.</p>
<p> 3. On departure day, please time your arrival wisely. If you are going to collect your tickets on departure day, we suggest you be at the station at least 1.5 hours ahead of the stated departure time to allow for waiting in queue at the ticket-counter, for security checks and for ticket checks.<br />
If you&rsquo;ve already collected before the departure day, it is also wise to be at the station at least 40 minutes ahead. </p>
<p> 4. Download railway station instructions, maps and tips at <a href="http://www.chinahighlights.com/china-trains/station-map.htm">http://www.chinahighlights.com/china-trains/station-map.htm</a> <br />
<br />
5.Terms &amp; Conditions. <a href="http://www.chinahighlights.com/china-trains/booking-policy.htm">http://www.chinahighlights.com/china-trains/booking-policy.htm</a></p>
<p> Best Regards!<br />
Iris Wang, Travel Advisor<br />
Tel: +86-773-2801368 &nbsp;Mobile:+86-18775900313 <br />
Fax: 86-773-2827424, 86-773-2885308 <br />
E-mail: <a href="mailto:iris@chinahighlights.me">iris@chinahighlights.me</a><br />
<a href="http://www.chinahighlights.com">www.chinahighlights.com</a> <br />
Address: Building 6, Chuangyi Business Park, 70 Qilidian Road, Guilin, Guangxi, 541004, China<br />
If you wish to share anything with my supervisor (Ms. Alex Yang), please feel free to send your email to <a href="mailto:alex@chinahighlights.net">alex@chinahighlights.net</a>. </p>
</body>
</html>

@ -73,12 +73,13 @@
更多<b class="caret"></b> 更多<b class="caret"></b>
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="<?php echo site_url('apps/pagespeed') ?>">页面性能分析</a></li> <li><a target="_blank" href="http://www.arachina.com/html-tag-quick-query.htm">Html基础知识</a></li>
<li><a href="<?php echo site_url('seo') ?>">SEO管理</a></li> <li><a target="_blank" href="<?php echo site_url('tools/old') ?>">老旧信息查询</a></li>
<li> <a href="<?php echo site_url('thirdparty/public/infopayauthor') ?>">打赏统计</a></li> <li><a target="_blank" href="<?php echo site_url('apps/pagespeed') ?>">页面性能分析</a></li>
<li> <a href="<?php echo site_url('thirdparty/form') ?>">表单管理</a></li> <li><a target="_blank" href="<?php echo site_url('seo') ?>">SEO管理</a></li>
<li><a href="<?php echo site_url('thirdparty/advertise') ?>">广告管理</a></li> <li><a target="_blank" href="<?php echo site_url('thirdparty/public/infopayauthor') ?>">打赏统计</a></li>
<li><a href="http://www.arachina.com/html-tag-quick-query.htm">html知识</a></li> <li><a target="_blank" href="<?php echo site_url('thirdparty/form') ?>">表单管理</a></li>
<li><a target="_blank" href="<?php echo site_url('thirdparty/advertise') ?>">广告管理</a></li>
</ul> </ul>
</li> </li>

@ -908,9 +908,11 @@
'info' => '信息', 'info' => '信息',
'deal' => '促销', 'deal' => '促销',
'2015' => '2015', '2015' => '2015',
'tour2017' => '2017',
'op' => 'OP', 'op' => 'OP',
'best' => '实用信息', 'best' => '实用信息',
'culture' => '文化' 'culture' => '文化',
'top10' => 'TOP10'
); );
?> ?>
<label>匹配到一级导航 <label>匹配到一级导航
@ -934,10 +936,12 @@
<option value="flight"><?php echo($meta_subnavi_arr['flight']); ?></option> <option value="flight"><?php echo($meta_subnavi_arr['flight']); ?></option>
<option value="info"><?php echo($meta_subnavi_arr['info']); ?></option> <option value="info"><?php echo($meta_subnavi_arr['info']); ?></option>
<option value="deal"><?php echo($meta_subnavi_arr['deal']); ?></option> <option value="deal"><?php echo($meta_subnavi_arr['deal']); ?></option>
<option value="tour2017"><?php echo($meta_subnavi_arr['tour2017']); ?></option>
<option value="2015"><?php echo($meta_subnavi_arr['2015']); ?></option> <option value="2015"><?php echo($meta_subnavi_arr['2015']); ?></option>
<option value="op"><?php echo($meta_subnavi_arr['op']); ?></option> <option value="op"><?php echo($meta_subnavi_arr['op']); ?></option>
<option value="best"><?php echo($meta_subnavi_arr['best']); ?></option> <option value="best"><?php echo($meta_subnavi_arr['best']); ?></option>
<option value="culture"><?php echo($meta_subnavi_arr['culture']); ?></option> <option value="culture"><?php echo($meta_subnavi_arr['culture']); ?></option>
<option value="top10"><?php echo($meta_subnavi_arr['top10']); ?></option>
</select> </select>
</div> </div>
<div class="col-sm-8"> <div class="col-sm-8">

@ -23,7 +23,7 @@
$(function() { $(function() {
//更新静态页,异步请求队列(setp_set个) //更新静态页,异步请求队列(setp_set个)
var setp_set = 20; var setp_set = 6;
$('#update').on('click', function() { $('#update').on('click', function() {
var $data = $('.data'); var $data = $('.data');
for(var i=0; i<setp_set; i++) { for(var i=0; i<setp_set; i++) {

@ -0,0 +1,142 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>老旧信息-v1.0</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="http://europe.chtcdn.com/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
<script type="text/javascript" src="http://europe.chtcdn.com/js/jquery.js"></script>
<script type="text/javascript" src="http://europe.chtcdn.com/bootstrap/js/bootstrap.min.js"></script>
<style type="text/css">
.show-grid {padding: 15px; background: #efefef; border-radius: 5px;}
.mr10 {margin-right: 10px;}
.nav {margin-bottom: 5px;}
.pic {display: none;}
.msg {color: #07c;}
.mt12 {margin-top: 12px;}
.msg_wait {color: #999;}
.none {display: none;}
.form-search {display: inline-block;margin:0 0 0 5px !important;}
.input-medium.search-query {width: 250px;}
#search,#insert,#update {margin-top: 2px;float: right;}
@media (min-width: 1200px) {
.container.wd {
padding: 0 15px;
width: 1170px;
}
}
</style>
<script type="text/javascript">
$(function() {
//下拉选站点
$('a.sss').on('click', function() {
var site = $(this).html();
location.href = '/info.php/login/change_site/'+site+'/?url=/tools/old#';
});
});
</script>
</head>
<body>
<div class="container wd">
<div class="row show-grid">
<ul class="nav nav-pills">
<li class="active dropdown mr10">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
站点:<?php echo($this->config->item('site_code'));?>
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a class="sss">cht</a>
</li>
<li>
<a class="sss">jp</a>
</li>
<li>
<a class="sss">gm</a>
</li>
<li>
<a class="sss">vc</a>
</li>
<li>
<a class="sss">vac</a>
</li>
<li>
<a class="sss">ru</a>
</li>
<li>
<a class="sss">it</a>
</li>
<li>
<a class="sss">ct</a>
</li>
</ul>
</li>
<span class="label label-info">信息:<?php echo(count($info));?>个 (只显示前800个)</span>
<form class="form-search" id="path_search" action="#" method="post">
<select name="yeardiff">
<option value="1" <?php if($yeardiff==1) echo('selected'); ?>>1年前</option>
<option value="2" <?php if($yeardiff==2) echo('selected'); ?>>2年前</option>
<option value="3" <?php if($yeardiff==3) echo('selected'); ?>>3年前</option>
<option value="4" <?php if($yeardiff==4) echo('selected'); ?>>4年前</option>
<option value="5" <?php if($yeardiff==5) echo('selected'); ?>>5年前</option>
<option value="6" <?php if($yeardiff==6) echo('selected'); ?>>6年前</option>
<option value="6" <?php if($yeardiff==6) echo('selected'); ?>>7年前</option>
<option value="6" <?php if($yeardiff==6) echo('selected'); ?>>8年前</option>
</select>
<span class="checkbox">
<label>
<input type="checkbox" name="nopub" value="1" <?php if($nopub==1) echo('checked'); ?>> 显示未发布的信息
</label>
</span>
&nbsp;
<span class="checkbox">
<label>
<input type="checkbox" name="emptyinfo" value="1" <?php if($emptyinfo==1) echo('checked'); ?>> 显示内容为空的信息
</label>
</span>
&nbsp;&nbsp;
<button type="submit" class="btn">筛选</button>
</form>
</ul>
</div>
<div class="row">
<table class="table table-hover">
<thead>
<tr>
<th>#</th>
<th>文件名</th>
<th width="10%">更新日期</th>
<th width="6%">发布</th>
<th width="6%"></th>
</tr>
</thead>
<tbody class="data_group">
<?php foreach($info as $key=>$it) {
if ($key == 800) break;
?>
<tr class="data">
<td><?php echo($key+1);?></td>
<td title="<?php echo($it->ic_url);?>"><?php echo($it->ic_url);?></td>
<td title="<?php echo($it->ic_datetime);?>"><?php echo(date('Y-m-d', strtotime($it->ic_datetime)));?></td>
<td title="<?php echo($it->ic_datetime);?>">
<?php
if ($it->ic_status == 1)
echo('<span style="color:seagreen"></span>');
else
echo('<span style="color:#a12023"></span>');
?>
</td>
<td>
<a href="javascript:document.getElementById('keywords').value='<?php echo(urlencode($it->ic_url));?>';document.forms.goSearch.submit();" target="_blank">编辑</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<form action="/info.php/welcome/search" method="post" id="goSearch" target="_blank">
<input type="hidden" name="keywords" id="keywords" value="">
</form>
</body>
</html>
Loading…
Cancel
Save