This commit is contained in:
Li Heng 2015-01-30 06:53:11 +00:00
parent e615a9db37
commit c504dbed37
4 changed files with 393 additions and 298 deletions

View File

@ -66,7 +66,7 @@ class IndexController extends Zend_Controller_Action
//$time = date("Y-m-d H:i:s",time());
$sql = "SELECT * FROM archive WHERE is_pub=true and sub='$this->subnews' AND ts_published<now()
and id in (select ar_catalog.aid from ar_catalog left join ar_category on ar_catalog.cid=ar_category.id where ar_category.ptype='news')
order by ts_published desc LIMIT 5 ";
order by ts_published desc LIMIT 8 ";
$sth = $this->db->query($sql);
$rows = $sth->fetchAll(PDO::FETCH_BOTH);

View File

@ -1,48 +1,61 @@
<!-- header -->
<link href="/sjyportal/css/style.css" rel="stylesheet" type="text/css" />
<header>
<!-- Navbar
================================================== -->
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<div class="container">
<div class="row-fluid">
<div class="span12">
<div class="span3">
<a href="/"><img src="/sjyportal/img/logo.png" /></a>
</div>
<div class="span9">
<p class="pull-right" style="font-size:9px; position:relative; top:-8px;">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="brand" href="#">青海省水文水资源勘测局</a>
<div class="nav-collapse collapse">
<ul class="nav" id="mainmenu">
<li class="">
<a href="/" >首页</a>
</li>
<li class="">
<a href="/archives/">新闻</a>
</li>
<li class="">
<a href="/data">数据</a>
</li>
<li class="">
<a href="/about">关于我们</a>
</li>
</ul>
<form class="navbar-search pull-left" action="/search" method="get">
<input type="text" class="search-query span3" placeholder="搜索" name="q">
</form>
<ul class="nav pull-right">
<li class="divider-vertical"></li>
<li class="dropdown">
<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity())
{
$user = $auth->getIdentity();
echo '<a href="/account"><i class="icon-user"></i> '.$user->username.'</a> ';
echo '<a href="/account" class="icon-user dropdown-toggle" data-toggle="dropdown"> '.$user->username.' <b class="caret"></b></a>';
echo '<ul class="dropdown-menu">';
if ($user->usertype == $this->config->auth->identifier)
{
echo '<a href="/admin"><i class="icon-cog"></i> 后台 </a>';
echo '<li><a href="/admin">后台</a></li>';
}
echo '<a href="/data/order"><i class="icon-shopping-cart"></i> 数据篮 </a>';
echo '<a href="/account/logout">退出</a>';
echo '<li><a href="/admin">数据篮</a></li>';
echo '<li class="divider"></li>';
echo '<li><a href="/account/logout">退出</a></li>';
echo '</ul>';
echo '</li>';
} else {
echo '<a href="/account/login">登 录</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="/account/register">注 册</a>';
echo '<li><a href="/account/register">注册</a></li>
<li><a href="/account/login">登录</a></li>';
} ?>
</p>
<p class="pull-right" >
<form action="/search" method="get">
<ul class="navigat nav nav-pills pull-right" id="mainmenu">
<li><a href="/">首 页</a></li>
<li style="padding-left:15px"><a href="/archives/">新 闻</a></li>
<li style="padding-left:15px"><a href="/data">数 据</a></li>
<li style="padding-left:15px"><a href="/about">关于我们</a></li>
<li style="padding-left:15px" class="input-append ">
<input class="input-medium" placeholder="关键字" type="text" name="q">
<button class="btn" type="submit">搜索</button>
</li>
</ul>
</form>
</p>
</div>
</div>

View File

@ -7,13 +7,16 @@
</div><!-- 结束container容器实现banner全屏展示-->
<!-- Carousel
================================================== -->
<div class="container-fluid1 ">
<div class="container">
<div class="row">
<div class="span6">
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item active"> <img src="/sjyportal/img/slide-01.jpg" alt="" class="">
<div class="item active"> <img src="/sjyportal/img/slide-00.jpg" class="img-rounded">
<div class="container">
<div class="carousel-caption">
<h2>“青海—犹他省州水资源可持续发展项目”启动</h2>
<h2>青海54.6%国土被纳入三江源国家生态保护试验区</h2>
</div>
</div>
</div>
@ -21,33 +24,96 @@
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev"></a> <a class="right carousel-control" href="#myCarousel" data-slide="next"></a> </div>
</div>
<div class="span6">
<div class="box">
<p class="box-title">平台新闻</p>
<ul>
<?php foreach($this->list_news as $k=>$v){ ?>
<li>
<a href="<?= $v['url'] ?>" title="<?= $v['title'] ?>"><i class="icon-hand-right"> </i><?= $v['title'] ?></a>&nbsp;&nbsp;<span class="small"><?= date('Y-m-d',strtotime($v['ts_published'])) ?></span>
</li>
<?php } ?>
<span class="pull-right"><a href="/archives/" target="_blank" class="more">更多>></a></span>
</ul>
</div>
</div>
</div>
</div>
<!-- /.carousel -->
<div class="container">
<div class="row-fluid">
<div class="span6">
<div class="box">
<p class="box-title">最新可视化数据</p>
<ul>
<?php foreach($this->visualdata as $k=>$v){ ?>
<li>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>&nbsp;&nbsp;<span class="small"><?= date('Y-m-d',strtotime($v['ts_published'])) ?></span>
</li>
<?php } ?>
<span class="pull-right"><a href="/data/visual" target="_blank" class="more">更多>></a></span>
</ul>
</div>
</div>
<!-- /.span6 -->
<div class="span3">
<div class="box">
<p class="box-title">可视化数据</p>
<div class="count"><span>208</span></div>
</div>
</div>
<div class="span3">
<div class="box">
<p class="box-title">已发布数据集</p>
<div class="count"><span><?= $this->metanum ?></span></div>
</div>
</div>
<!-- /.span3 -->
</div><!-- /.part1 -->
<!-- Three columns of text below the carousel -->
<div class="row-fluid">
<div class="span12">
<div class="span3">
<div class="span4">
<div class="box">
<h4 class="box-title">本站统计</h4>
<p class="box-title">最新发布数据</p>
<ul>
<li>数据集: <?= $this->metanum ?></li>
<li>在线数据: <?= $this->onlinesize ?>MB</li>
<li>离线数据: <?= $this->offlinesize ?>MB</li>
<li>共有注册用户:<?= $this->usernum ?></li>
<li>离线申请:<?= $this->offlinenum ?>人次</li>
<?php foreach($this->offlinemdtop as $k=>$v){ ?>
<li>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>
</li>
<?php } ?>
<span class="pull-right"><a href="/archives/" target="_blank" class="more">更多>></a></span>
</ul>
</div>
</div>
<!-- /.span4 -->
<div class="span9">
<div class="span4">
<div class="box">
<h4 class="box-title">新闻公告</h4>
<p class="box-title">热门数据排行</p>
<ul>
<?php foreach($this->list_news as $k=>$v){ ?>
<?php foreach($this->offlinemdtop as $k=>$v){ ?>
<li>
<a href="<?= $v['url'] ?>" title="<?= $v['title'] ?>"><i class=" icon-ok-sign"> </i><?= $v['title'] ?></a>&nbsp;&nbsp;<span class="small"><?= date('Y-m-d',strtotime($v['ts_published'])) ?></span>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>
</li>
<?php } ?>
<span class="pull-right"><a href="/archives/" target="_blank" class="more">更多>></a></span>
</ul>
</div>
</div>
<!-- /.span4 -->
<div class="span4">
<div class="box">
<p class="box-title">热门数据排行</p>
<ul>
<?php foreach($this->offlinemdtop as $k=>$v){ ?>
<li>
<a href="/data/<?= $v['uuid'] ?>" title="<?= $v['title'] ?>"><i class=" icon-map-marker"> </i><?= $v['title'] ?></a>
</li>
<?php } ?>
<span class="pull-right"><a href="/archives/" target="_blank" class="more">更多>></a></span>
@ -58,13 +124,14 @@
</div>
<!-- /.row -->
<div style="margin-bottom:20px;"><img src="/sjyportal/img/protect.jpg" class="img-rounded" /></div>
<!-- Three columns of text below the carousel -->
<div class="row-fluid">
<!-- /.span4 -->
<div class="span4">
<div class="box">
<h4 class="box-title">最新可视化数据</h4>
<p class="box-title">最新可视化数据</p>
<ul>
<?php foreach($this->visualdata as $k=>$v){ ?>
<li>
@ -77,7 +144,7 @@
</div>
<div class="span4">
<div class="box">
<h4 class="box-title">热门在线数据集</h4>
<p class="box-title">热门在线数据集</p>
<ul>
<?php foreach($this->mdtop as $k=>$v){ ?>
<li>
@ -91,7 +158,7 @@
<!-- /.span4 -->
<div class="span4">
<div class="box">
<h4 class="box-title">热门离线数据集</h4>
<p class="box-title">热门离线数据集</p>
<ul>
<?php foreach($this->offlinemdtop as $k=>$v){ ?>
<li>

View File

@ -1,20 +1,20 @@
/* CSS Document */
/* GLOBAL STYLES
-------------------------------------------------- */
/* Padding below the footer and lighter body text */

.navbar-search
{
margin-top:10px;
}
body {
padding-bottom: 40px;
color: #5a5a5a;
padding-top: 70px;
}
header{
margin: 5px 0px;
background-color: #FFFFFF;
}
.navbar .nav > .active > a, .navbar .nav > .active > a:hover, .navbar .nav > .active > a:focus
{
#logo, #search {
}
.navigat {
@ -24,7 +24,6 @@ header{
left: 70px;
top: 15px;
}
}
.container .span12 .row .span8 .nav {
padding-top: 0px;
@ -36,7 +35,6 @@ header{
width: 270px;
margin-bottom: 30px;
padding: 0px;
background-color: #fff;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
@ -100,7 +98,9 @@ header{
/* */
.box {
border: 1px solid #EFEFEF;
font-family: "微软雅黑";
background-color: #FFFFFF;
border: 1px solid #E2E2E2;
padding-top: 10px;
padding-bottom: 20px;
margin-bottom: 20px;
@ -109,18 +109,16 @@ header{
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 1px 4px rgba(0,0,0,.065);
-moz-box-shadow: 0 1px 4px rgba(0,0,0,.065);
box-shadow: 0 1px 4px rgba(0,0,0,.065);
}
.box-title {
font-family: "微软雅黑";
font-size: 22px;
border-left-width: 4px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: solid;
border-left-color: #006699;
border-left-color: #26C6DA;
padding-left: 10px;
margin-left: 10px;
}
@ -150,7 +148,7 @@ header{
/* Carousel base class */
.carousel {
margin-bottom: 15px;
margin-bottom: 0px;
}
.carousel .container {
@ -179,13 +177,14 @@ header{
.carousel-caption {
background-color: transparent;
position: static;
max-width: 1128px;
padding: 0 20px;
max-width: 570px;
padding: 0 0px;
margin-top:210px;
}
.carousel-caption h2, .carousel-caption .lead {
margin: 0;
font-size: 20px;
line-height: 1.25;
color: #fff;
text-shadow: 0 1px 1px rgba(0,0,0,.4);
@ -284,6 +283,7 @@ header{
}
}
.Lbox {
min-height: 580px;
border: 1px solid #EFEFEF;
padding-right: 15px;
padding-left: 15px;
@ -297,13 +297,28 @@ header{
-moz-box-shadow: 0 1px 4px rgba(0,0,0,.065);
box-shadow: 0 1px 4px rgba(0,0,0,.065);
}
.count
{
font-size: 40px;
color: #333333;
line-height: 1.5em;
margin-top: 50px;
text-align: center;
min-height: 90px;
font-family:微软雅黑黑体;
}
.count span
{
color: #dc3929;
font-size: 70px;
}
.footer {
border-top-width: 4px;
border-top-style: solid;
border-top-color: #006600;
border-right-color: #009900;
border-bottom-color: #009900;
border-left-color: #009900;
padding-top: 25px;
margin-top: 40px;
background-color:#2c3e50;
height:120px;
color:#ffffff;
text-align:center;
}