增加doi验证的功能
This commit is contained in:
parent
aa3efdba5a
commit
cdb91b830a
|
@ -3717,11 +3717,17 @@ class Admin_DataController extends Zend_Controller_Action
|
|||
}
|
||||
else if ($ac=="verified") //成功申请
|
||||
{
|
||||
$sql="update datadoi set ts_published=now() where uuid=? and ts_published is null";
|
||||
$this->db->query($sql,array($uuid));
|
||||
$this->_helper->layout->disableLayout();
|
||||
$this->_helper->viewRenderer->setNoRender();
|
||||
$this->jsonexit(array('success'=>'成功申请'));
|
||||
$row=$this->db->fetchRow("select * from datadoi where uuid='$uuid'");
|
||||
$content=@file_get_contents("http://dx.doi.org/".$row['doi']);
|
||||
if (strpos($content,$row['doi'])!==false) //成功申请
|
||||
{
|
||||
$sql="update datadoi set ts_published=now() where uuid=? and ts_published is null";
|
||||
$this->db->query($sql,array($uuid));
|
||||
$this->jsonexit(array('success'=>'成功申请'));
|
||||
} else
|
||||
$this->jsonexit(array('success'=>'该DOI验证失败,请检查!'));
|
||||
return true;
|
||||
}
|
||||
}//doi
|
||||
|
|
|
@ -58,7 +58,7 @@ table thead tr th {background:#EBF2F6;}
|
|||
<td>
|
||||
<a href="/admin/data/doi/ac/edit/uuid/<?= $item['uuid']?>">编辑</a>
|
||||
<a href="/admin/data/doi/ac/convert/uuid/<?= $item['uuid']?>">导出</a>
|
||||
<a href="javascript:void(0);" rel="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>" class="verified_btn">成功</a>
|
||||
<a href="javascript:void(0);" rel="/admin/data/doi/ac/verified/uuid/<?= $item['uuid']?>" class="verified_btn">验证</a>
|
||||
<a href="javascript:void(0);" onclick="onedel(<?= $item['id']?>)" id="delbtn_<?= $item['id']?>">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue