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()); //$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() $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') 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); $sth = $this->db->query($sql);
$rows = $sth->fetchAll(PDO::FETCH_BOTH); $rows = $sth->fetchAll(PDO::FETCH_BOTH);

View File

@ -1,48 +1,61 @@
<!-- header --> <!-- header -->
<link href="/sjyportal/css/style.css" rel="stylesheet" type="text/css" />
<header> <header>
<!-- Navbar
================================================== -->
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<div class="container"> <div class="container">
<div class="row-fluid"> <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<div class="span12"> <span class="icon-bar"></span>
<div class="span3"> <span class="icon-bar"></span>
<a href="/"><img src="/sjyportal/img/logo.png" /></a> <span class="icon-bar"></span>
</div> </button>
<div class="span9"> <a class="brand" href="#">青海省水文水资源勘测局</a>
<p class="pull-right" style="font-size:9px; position:relative; top:-8px;"> <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 <?php
$auth = Zend_Auth::getInstance(); $auth = Zend_Auth::getInstance();
if($auth->hasIdentity()) if($auth->hasIdentity())
{ {
$user = $auth->getIdentity(); $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) 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 '<li><a href="/admin">数据篮</a></li>';
echo '<a href="/account/logout">退出</a>'; echo '<li class="divider"></li>';
echo '<li><a href="/account/logout">退出</a></li>';
echo '</ul>';
echo '</li>';
} else { } 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> </ul>
</form>
</p>
</div> </div>
</div> </div>

View File

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

View File

@ -1,20 +1,20 @@
/* CSS Document */ 
/* GLOBAL STYLES .navbar-search
-------------------------------------------------- */ {
/* Padding below the footer and lighter body text */ margin-top:10px;
}
body { body {
padding-bottom: 40px; padding-top: 70px;
color: #5a5a5a;
} }
header{ header{
margin: 5px 0px; background-color: #FFFFFF;
} }
.navbar .nav > .active > a, .navbar .nav > .active > a:hover, .navbar .nav > .active > a:focus
{
#logo, #search {
} }
.navigat { .navigat {
@ -24,7 +24,6 @@ header{
left: 70px; left: 70px;
top: 15px; top: 15px;
} }
}
.container .span12 .row .span8 .nav { .container .span12 .row .span8 .nav {
padding-top: 0px; padding-top: 0px;
@ -36,7 +35,6 @@ header{
width: 270px; width: 270px;
margin-bottom: 30px; margin-bottom: 30px;
padding: 0px; padding: 0px;
background-color: #fff;
-webkit-border-radius: 6px; -webkit-border-radius: 6px;
-moz-border-radius: 6px; -moz-border-radius: 6px;
border-radius: 6px; border-radius: 6px;
@ -100,7 +98,9 @@ header{
/* */ /* */
.box { .box {
border: 1px solid #EFEFEF; font-family: "微软雅黑";
background-color: #FFFFFF;
border: 1px solid #E2E2E2;
padding-top: 10px; padding-top: 10px;
padding-bottom: 20px; padding-bottom: 20px;
margin-bottom: 20px; margin-bottom: 20px;
@ -109,18 +109,16 @@ header{
-webkit-border-radius: 6px; -webkit-border-radius: 6px;
-moz-border-radius: 6px; -moz-border-radius: 6px;
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 { .box-title {
font-family: "微软雅黑"; font-family: "微软雅黑";
font-size: 22px;
border-left-width: 4px; border-left-width: 4px;
border-top-style: none; border-top-style: none;
border-right-style: none; border-right-style: none;
border-bottom-style: none; border-bottom-style: none;
border-left-style: solid; border-left-style: solid;
border-left-color: #006699; border-left-color: #26C6DA;
padding-left: 10px; padding-left: 10px;
margin-left: 10px; margin-left: 10px;
} }
@ -148,9 +146,9 @@ header{
/* CUSTOMIZE THE CAROUSEL /* CUSTOMIZE THE CAROUSEL
-------------------------------------------------- */ -------------------------------------------------- */
/* Carousel base class */ /* Carousel base class */
.carousel { .carousel {
margin-bottom: 15px; margin-bottom: 0px;
} }
.carousel .container { .carousel .container {
@ -179,13 +177,14 @@ header{
.carousel-caption { .carousel-caption {
background-color: transparent; background-color: transparent;
position: static; position: static;
max-width: 1128px; max-width: 570px;
padding: 0 20px; padding: 0 0px;
margin-top:210px; margin-top:210px;
} }
.carousel-caption h2, .carousel-caption .lead { .carousel-caption h2, .carousel-caption .lead {
margin: 0; margin: 0;
font-size: 20px;
line-height: 1.25; line-height: 1.25;
color: #fff; color: #fff;
text-shadow: 0 1px 1px rgba(0,0,0,.4); text-shadow: 0 1px 1px rgba(0,0,0,.4);
@ -197,7 +196,7 @@ header{
/* MARKETING CONTENT /* MARKETING CONTENT
-------------------------------------------------- */ -------------------------------------------------- */
/* Center align the text within the three columns below the carousel */ /* Center align the text within the three columns below the carousel */
.marketing .span4 { .marketing .span4 {
text-align: left; text-align: left;
} }
@ -215,75 +214,76 @@ header{
/* RESPONSIVE CSS /* RESPONSIVE CSS
-------------------------------------------------- */ -------------------------------------------------- */
@media (max-width: 979px) { @media (max-width: 979px) {
.container.navbar-wrapper { .container.navbar-wrapper {
margin-bottom: 0; margin-bottom: 0;
width: auto; width: auto;
} }
.navbar-inner { .navbar-inner {
border-radius: 0; border-radius: 0;
margin: -20px 0; margin: -20px 0;
} }
.carousel .item { .carousel .item {
height: 500px; height: 500px;
} }
.carousel img { .carousel img {
width: auto; width: auto;
height: 500px; height: 500px;
} }
.featurette { .featurette {
height: auto; height: auto;
padding: 0; padding: 0;
} }
.featurette-image.pull-left, .featurette-image.pull-right { .featurette-image.pull-left, .featurette-image.pull-right {
display: block; display: block;
float: none; float: none;
max-width: 40%; max-width: 40%;
margin: 0 auto 20px; margin: 0 auto 20px;
}
} }
} @media (max-width: 767px) {
@media (max-width: 767px) { .navbar-inner {
.navbar-inner {
margin: -20px; margin: -20px;
} }
.carousel { .carousel {
margin-left: -20px; margin-left: -20px;
margin-right: -20px; margin-right: -20px;
} }
.carousel .container { .carousel .container {
} }
.carousel .item { .carousel .item {
height: 300px; height: 300px;
} }
.carousel img { .carousel img {
height: 300px; height: 300px;
} }
.carousel-caption { .carousel-caption {
width: 65%; width: 65%;
padding: 0 70px; padding: 0 70px;
margin-top: 100px; margin-top: 100px;
} }
.carousel-caption h1 { .carousel-caption h1 {
font-size: 30px; font-size: 30px;
} }
.carousel-caption .lead, .carousel-caption .btn { .carousel-caption .lead, .carousel-caption .btn {
font-size: 18px; font-size: 18px;
} }
.marketing .span4 + .span4 { .marketing .span4 + .span4 {
margin-top: 40px; margin-top: 40px;
} }
.featurette-heading { .featurette-heading {
font-size: 30px; font-size: 30px;
} }
.featurette .lead { .featurette .lead {
font-size: 18px; font-size: 18px;
line-height: 1.5; line-height: 1.5;
} }
} }
.Lbox { .Lbox {
min-height: 580px;
border: 1px solid #EFEFEF; border: 1px solid #EFEFEF;
padding-right: 15px; padding-right: 15px;
padding-left: 15px; padding-left: 15px;
@ -297,13 +297,28 @@ header{
-moz-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-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 { .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; padding-top: 25px;
margin-top: 40px; margin-top: 40px;
background-color:#2c3e50;
height:120px;
color:#ffffff;
text-align:center;
} }