Merge branch 'master' of git.mycht.cn:developers/information-system
commit
beb90cb875
@ -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
|
@ -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 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 </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’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 & 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 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>
|
@ -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>
|
||||||
|
|
||||||
|
<span class="checkbox">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="emptyinfo" value="1" <?php if($emptyinfo==1) echo('checked'); ?>> 显示内容为空的信息
|
||||||
|
</label>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<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…
Reference in New Issue