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

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

View File

@ -44,7 +44,7 @@ setTimeout("document.getElementsByClassName('box-info').remove(0)",5000);
foreach ($this->paginator as $item): foreach ($this->paginator as $item):
?> ?>
<tr> <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> <td>
<?php echo date("Y-m-d",strtotime($item['ts_created']));?> <?php echo date("Y-m-d",strtotime($item['ts_created']));?>
</td> </td>

View File

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