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

52 lines
1.9 KiB
PHTML
Executable File

<?php
$this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
$this->nav[] = array('link'=>"/yrnmr",'title'=>'黄河上游宁蒙河段');
?>
<?= $this->render('breadcrumbs.phtml'); ?>
<div class="row">
<div class="span2">
<?= $this->partial('yrnmr/navi.phtml'); ?>
</div>
<div class="span10">
<div id="intro">
<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>
</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>
</div>
<script type="text/javascript" language="javascript">
function changetlist(){
$.getJSON("/service/mdjson/source/yrnmr", function(data){
$('#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>