修改了发布评审时的判断是否是被邀请的专家的逻辑

修改了视图
This commit is contained in:
Li Jianxuan 2011-10-18 07:20:53 +00:00
parent f45c9c9321
commit c61d177d18
3 changed files with 12 additions and 11 deletions

View File

@ -64,7 +64,7 @@ class ReviewController extends Zend_Controller_Action
}
$wheresql = array();
$wheresql[]=" mdexp.id='$uid' ";
$wheresql[]=" r.userid='$uid' ";
if(!empty($keyword) && !empty($search))
{
@ -80,8 +80,8 @@ class ReviewController extends Zend_Controller_Action
$wheresql = join(' and ',$wheresql);
$sql = "select mdexp.id,mdexp.uuid,md.title from mdexpertreview mdexp
left join metadata md on md.uuid=mdexp.uuid
$sql = "select r.id,md.title,r.uuid from mdreview r
left join metadata md on md.uuid=r.uuid
where $wheresql";
$rs = $this->db->query($sql);
@ -396,11 +396,7 @@ class ReviewController extends Zend_Controller_Action
}
try{
$sql = "select id from mdexperts where id='$userid'";
$rs = $this->db->query($sql);
$row = $rs->fetch();
$data = array(
'userid' => $userid,
'uuid' => $uuid,
@ -411,6 +407,11 @@ class ReviewController extends Zend_Controller_Action
'conclusion' => $conclusion
);
$sql = "select id from mdexpertreview where id='$userid' and uuid='$uuid'";
$rs = $this->db->query($sql);
$row = $rs->fetch();
if($row['id']!='')
{
$data['is_expert'] = 'true';

View File

@ -44,7 +44,7 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);
foreach ($this->paginator as $item):
?>
<tr>
<td> <img src="/images/westdc_20w.gif" /> <a href="<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
<td> <img src="/images/westdc_20w.gif" /> <a href="/review/review/uuid/<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
<td>
<?php echo date("Y-m-d",strtotime($item['ts_created']));?>
</td>

View File

@ -28,7 +28,7 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);
<form action="/review/myreview" method="POST">
<input class="q" type="text" id="q" name="q" value="<?php echo $this->keyword;?>" />
<input type="hidden" name="search" value="1" />
<input type="submit" value="搜索" /></form>
<input type="submit" class="btn" value="搜索" /></form>
<table class="stylized">
<thead>
@ -46,7 +46,7 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);
<tr class="<?php if($autoindex%2 == 0) echo 'even'; else echo 'odd'; ?>">
<td> <img src="/images/westdc_20w.gif" /> <a href="<?php echo $item['uuid'];?>"><?php echo $item['title'];?></a></td>
<td>
提交评审意见
<a href="/review/review/uuid/<?php echo $item['uuid'];?>">查看评审页</a>
</td>
</tr>
<?php endforeach; endif; ?>