Merge branch 'master' of https://gitee.com/hainatravel/information-system
commit
864f77bf30
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
if (!defined('BASEPATH'))
|
||||
exit('No direct script access allowed');
|
||||
|
||||
class index extends CI_Controller {
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function homepage(){
|
||||
$this->load->view('bootstrap3/header');
|
||||
$this->load->view('homepage');
|
||||
$this->load->view('bootstrap3/footer');
|
||||
}
|
||||
|
||||
public function search_error_urls(){
|
||||
$sitecode = $this->input->get_post('sitecode');
|
||||
$errorurl = $this->input->get_post('errorurl');
|
||||
|
||||
if(empty($sitecode) && empty($errorurl)){
|
||||
echo '请选择站点或填写url';
|
||||
}else{
|
||||
//查询url
|
||||
$this->load->model('infos_model');
|
||||
$pages = $this->infos_model->get_errorurls_pages($sitecode,$errorurl);
|
||||
print_r(json_encode($pages));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
class infos_model extends CI_Model {
|
||||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
$this->HT = $this->load->database('HT', TRUE);
|
||||
}
|
||||
|
||||
function get_errorurls_pages($sitecode,$errorurl) {
|
||||
$sql = "select ic_url from infoContents where ic_sitecode = ? and ic_content like '%{$errorurl}%'";
|
||||
$query = $this->HT->query($sql,array($sitecode));
|
||||
return $query->result();
|
||||
}
|
||||
}
|
@ -0,0 +1,78 @@
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h2 class="text-center">查询信息</h2>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<div class="method_select">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation">
|
||||
<a href="#listinput" aria-controls="listinput" role="tab" data-toggle="tab">查询url所在页面</a>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="listinput">
|
||||
<div class="row" style="margin-top:10px;">
|
||||
<div class="col-md-9">
|
||||
<select name="destination" class="form-control" id="destination">
|
||||
<option value="">选择站点</option>
|
||||
<option value="gm">德语</option>
|
||||
<option value="ah">ah</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
<input type="text" id="errorurl" class="form-control" placeholder="请输入url"/>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<a href="#" id="searchurls" class="btn btn-info">查询页面</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="result_view">
|
||||
<div class="row">
|
||||
<h3 class="text-center">查询url所在页面列表</h3>
|
||||
<div class="container infodetails"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$('#searchurls').click(function(){
|
||||
var sitecode = $('#destination').val();
|
||||
var host = '';
|
||||
switch(sitecode){
|
||||
case 'ah':
|
||||
host = 'https://www.asiahighlights.com';
|
||||
break;
|
||||
case 'gm':
|
||||
host = 'https://chinarundreisen.com';
|
||||
break;
|
||||
}
|
||||
var errorurl = $('#errorurl').val();
|
||||
var html = '';
|
||||
$.ajax({
|
||||
url:'/info.php/apps/searchinfo/index/search_error_urls',
|
||||
data:{sitecode:sitecode,errorurl:errorurl},
|
||||
success:function(json,status){
|
||||
var data = $.parseJSON(json);
|
||||
console.log(data);
|
||||
for(var i = 0;i<data.length;i++){
|
||||
html += '<div class="row">';
|
||||
html += '<div class="col-md-2"><p>'+i+'</p></div>';
|
||||
html += '<div class="col-md-18"><p>'+data[i].ic_url+'</p></div>';
|
||||
html += '<div class="col-md-4"><a target="_blank" href="'+host+data[i].ic_url+'">预览</a></div>';
|
||||
html += '</div>';
|
||||
}
|
||||
$('.infodetails').html(html);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
Loading…
Reference in New Issue