添加文档报告、专利与著作权支持;archive类中支持获取内容
This commit is contained in:
parent
a673040e9a
commit
1954ce79ac
|
@ -75,15 +75,16 @@ class AboutController extends Zend_Controller_Action
|
|||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($siteid));
|
||||
$rows = $sth->fetchAll();
|
||||
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage(10);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
}
|
||||
|
||||
|
||||
} elseif ($ac=='patent' || $ac=='report') {
|
||||
$archives=new Archive($this->db);
|
||||
$rows=$archives->getArchive($ac);
|
||||
$this->_helper->viewRenderer($ac);
|
||||
}
|
||||
$paginator = Zend_Paginator::factory($rows);
|
||||
$paginator->setCurrentPageNumber($this->_getParam('page'));
|
||||
$paginator->setItemCountPerPage(10);
|
||||
$paginator->setView($this->view);
|
||||
Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagination_param.phtml');
|
||||
$this->view->paginator=$paginator;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('成果发表');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/about.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/about">关于本站</a>');
|
||||
$this->breadcrumb('<a href="/about/publication">成果发表</a>');
|
||||
$this->breadcrumb('专利与著作权');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id='sidebar'>
|
||||
<div id='leftnavi'>
|
||||
<?= $this->partial('about/navi.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h2>成果发表</h2>
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/about/publication/">期刊文章</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/about/publication/ac/report">文档报告</a></li>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/about/publication/ac/patent">专利与著作权</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<ul>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<li> <?php echo $item['title']; ?>
|
||||
<?php if (!empty($ref->link)) :
|
||||
echo ' <a href="'.$ref->link.'">下载</a>';
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
$this->headTitle($this->config->title->site);
|
||||
$this->headTitle('成果发表');
|
||||
$this->headTitle()->setSeparator(' - ');
|
||||
$this->headLink()->appendStylesheet('/css/about.css');
|
||||
$this->breadcrumb('<a href="/">首页</a>');
|
||||
$this->breadcrumb('<a href="/about">关于本站</a>');
|
||||
$this->breadcrumb('<a href="/about/publication">成果发表</a>');
|
||||
$this->breadcrumb('文档报告');
|
||||
$this->breadcrumb()->setSeparator(' > ');
|
||||
?>
|
||||
<div id='sidebar'>
|
||||
<div id='leftnavi'>
|
||||
<?= $this->partial('about/navi.phtml'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h2>成果发表</h2>
|
||||
<div id="tabs-controller">
|
||||
<ul>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/about/publication/">期刊文章</a></li>
|
||||
<li class="box-shadow active"><a class="text-shadow" href="/about/publication/ac/report">文档报告</a></li>
|
||||
<li class="box-shadow"><a class="text-shadow" href="/about/publication/ac/patent">专利与著作权</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="datalist">
|
||||
<?php if (count($this->paginator)): ?>
|
||||
<ul>
|
||||
<?php foreach ($this->paginator as $item): ?>
|
||||
<li> <?php echo $item['title']; ?>
|
||||
<?php if (!empty($ref->link)) :
|
||||
echo ' <a href="'.$ref->link.'">下载</a>';
|
||||
endif;
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<div class="pagenavi"><?= $this->paginator; ?></div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
|
@ -219,6 +219,13 @@ class Archive
|
|||
$sql = "DELETE FROM ".$this->tbl_tag." WHERE id=$aid";
|
||||
@$this->db->exec($sql);
|
||||
return true;
|
||||
}//DeleteTags
|
||||
|
||||
}//DeleteTags
|
||||
|
||||
function getArchive($code='')
|
||||
{
|
||||
$sql="select * from ".$this->tbl_archives;
|
||||
if (!empty($code)) $sql.=" where code='".$code."'";
|
||||
$rs=$this->db->query($sql);
|
||||
$rows=$rs->fetchAll();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue