westdc-zf1/application/default/views/scripts/yrnmr/index.phtml

52 lines
1.9 KiB
PHTML
Raw Normal View History

2012-08-30 13:38:05 +00:00
<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
2015-04-26 13:35:40 +00:00
$this->nav[] = array('link'=>"/yrnmr",'title'=>'黄河上游宁蒙河段');
2012-08-30 13:38:05 +00:00
?>
2015-04-26 13:35:40 +00:00
<?= $this->render('breadcrumbs.phtml'); ?>
2013-04-16 11:03:33 +00:00
<div class="row">
2015-04-26 13:35:40 +00:00
<div class="span2">
2013-04-16 11:03:33 +00:00
<?= $this->partial('yrnmr/navi.phtml'); ?>
</div>
2015-04-26 13:35:40 +00:00
<div class="span10">
2013-04-17 02:55:43 +00:00
<div id="intro">
2015-04-26 13:35:40 +00:00
<h1><?php if(!empty($this->info['title'])) echo $this->info['title']; ?></h1>
<table>
<tr><td><?php if(!empty($this->info['body'])) echo $this->info['body'];?></td></tr>
</table>
2013-04-17 02:55:43 +00:00
</div>
<div id="heihe_ad">
<h2>已整理数据展示</h2>
<ul id="heihe_list">
<?php foreach($this->meatdata as $md) : ?>
<li>
<a href="/yrnmr/view/uuid/<?php echo $md['uuid']; ?>"><span><?php echo $md['title']; ?></span>
<img src="/service/thumb/id/<?php echo $md['id']; ?>" alt="Data Thumbnail" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>" />
</a>
</li>
<?php endforeach; ?>
</ul>
<img class="next" src="/images/next.png" onclick="changetlist()" />
</div>
</div>
2012-08-30 13:38:05 +00:00
</div>
<script type="text/javascript" language="javascript">
function changetlist(){
2013-04-16 11:03:33 +00:00
$.getJSON("/service/mdjson/source/yrnmr", function(data){
2012-08-30 13:38:05 +00:00
$('#heihe_list').html('');
if(data.length>0)
{
$.each(data, function(key, val) {
var a = '<a href="/data/'+val['uuid']+'"><span>'+val['title']+'</span>';
var img = '<img src="/service/thumb/id/'+val['id']+'" alt="Data Thumbnail" title="'+val['description']+'" />';
$('<li/>', {
//"class":'list_img',
"html": a+img+'</a>'
}).appendTo('#heihe_list');
});
}
});
}
</script>