在数据页面添加了支持项目的显示
This commit is contained in:
parent
8122670e12
commit
33b75a2469
|
@ -650,6 +650,10 @@ class DataController extends Zend_Controller_Action
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->view->data_archives = $data_archives;
|
$this->view->data_archives = $data_archives;
|
||||||
|
//支持项目
|
||||||
|
include_once("data/Fund.php");
|
||||||
|
$fund = new Fund($this->db);
|
||||||
|
$this->view->fund = $fund->fetch($uuid);
|
||||||
|
|
||||||
//自动跳转
|
//自动跳转
|
||||||
$sql="select s.* from datasource d left join source s on d.sourceid=s.id where d.uuid=?";
|
$sql="select s.* from datasource d left join source s on d.sourceid=s.id where d.uuid=?";
|
||||||
|
|
|
@ -82,9 +82,18 @@ if ($md->title_en) echo '<br />'.$this->escape($md->title_en);?>
|
||||||
</ul>
|
</ul>
|
||||||
<hr />
|
<hr />
|
||||||
<?php }?>
|
<?php }?>
|
||||||
<?php if ($md->suppinfo) : ?>
|
<?php if ($md->suppinfo || $this->fund) : ?>
|
||||||
<h4><i class="icon-money text-info"></i>资助项目</h4>
|
<h4><i class="icon-money text-info"></i>资助项目</h4>
|
||||||
|
<?php if(!empty($md->suppinfo)) { ?>
|
||||||
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
|
<?php echo '<p>'.str_replace(array("\r\n", "\n", "\r"),'</p><p>',$this->escape($md->suppinfo)).'</p>';?>
|
||||||
|
<?php } ?>
|
||||||
|
<?php if(!empty($this->fund)) { ?>
|
||||||
|
<?php foreach($this->fund as $k=>$v) { ?>
|
||||||
|
<ul>
|
||||||
|
<li><?= $v['title'] ?>(项目编号:<?= $v['fund_id']?>)</li>
|
||||||
|
</ul>
|
||||||
|
<?php } ?>
|
||||||
|
<?php } ?>
|
||||||
<hr />
|
<hr />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php if ($this->resources) : ?>
|
<?php if ($this->resources) : ?>
|
||||||
|
|
|
@ -62,7 +62,7 @@ class Fund extends Zend_Controller_Plugin_Abstract
|
||||||
$sql = "SELECT f.* FROM ".$this->tbl_fund." f $wheresql ORDER BY f.id DESC";
|
$sql = "SELECT f.* FROM ".$this->tbl_fund." f $wheresql ORDER BY f.id DESC";
|
||||||
}
|
}
|
||||||
$rs = $this->db->query($sql);
|
$rs = $this->db->query($sql);
|
||||||
$rows = $rs->fetchAll();
|
$rows = $rs->fetchAll(PDO::FETCH_BOTH);
|
||||||
return $rows;
|
return $rows;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue