merge heihedata branch to r4082
This commit is contained in:
parent
a4c02d8876
commit
1a8c85bd9e
|
@ -875,8 +875,10 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
if ($form->isValid($formdata)) {
|
if ($form->isValid($formdata)) {
|
||||||
$uploadedData = $form->getValues();
|
$uploadedData = $form->getValues();
|
||||||
$pdf = basename($form->pdf->getFileName());
|
$pdf = basename($form->pdf->getFileName());
|
||||||
$sql="insert into offlineapp (username,email,unit,phone,address,postcode,project,pdflink,datalist,ts_created,ts_approved) values(?,?,?,?,?,?,?,?,?,?,now())";
|
$sql="insert into offlineapp (username,email,unit,phone,address,postcode,project,pdflink,datalist,ts_created,ts_approved,project_id,project_title,project_type) values(?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
|
||||||
$this->db->query($sql,array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],$formdata['project'],$pdf,$formdata['datalist'],$formdata['ts_approved']));
|
$this->db->query($sql,array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],
|
||||||
|
$formdata['project'],$pdf,$formdata['datalist'],$formdata['ts_approved']),$formdata['ts_approved'],
|
||||||
|
$formdata['project_id'],$formdata['project_title'],$formdata['project_type']);
|
||||||
$this->messenger->addMessage('提示信息:您已经成功添加该离线服务记录。');
|
$this->messenger->addMessage('提示信息:您已经成功添加该离线服务记录。');
|
||||||
$this->_redirect('/admin/down/offline');
|
$this->_redirect('/admin/down/offline');
|
||||||
} else {
|
} else {
|
||||||
|
@ -897,11 +899,14 @@ class Admin_DownController extends Zend_Controller_Action
|
||||||
$pdf = basename($form->pdf->getFileName());
|
$pdf = basename($form->pdf->getFileName());
|
||||||
$sql="update offlineapp set username=?,email=?,unit=?,phone=?,address=?,postcode=?,project=?,";
|
$sql="update offlineapp set username=?,email=?,unit=?,phone=?,address=?,postcode=?,project=?,";
|
||||||
if ($form->pdf->isUploaded()) $sql.="pdflink=?,";
|
if ($form->pdf->isUploaded()) $sql.="pdflink=?,";
|
||||||
$sql.="datalist=?,ts_approved=? where id=?";
|
$sql.="datalist=?,ts_approved=?,project_id=?,project_title=?,project_type=? where id=?";
|
||||||
$param=array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],$formdata['project']);
|
$param=array($formdata['username'],$formdata['email'],$formdata['unit'],$formdata['phone'],$formdata['address'],$formdata['postcode'],$formdata['project']);
|
||||||
if ($form->pdf->isUploaded()) $param[]=$pdf;
|
if ($form->pdf->isUploaded()) $param[]=$pdf;
|
||||||
$param[]=$formdata['datalist'];
|
$param[]=$formdata['datalist'];
|
||||||
$param[]=$formdata['ts_approved'];
|
$param[]=$formdata['ts_approved'];
|
||||||
|
$param[]=$formdata['project_id'];
|
||||||
|
$param[]=$formdata['project_title'];
|
||||||
|
$param[]=$formdata['project_type'];
|
||||||
$param[]=$edit;
|
$param[]=$edit;
|
||||||
$this->db->query($sql,$param);
|
$this->db->query($sql,$param);
|
||||||
$this->messenger->addMessage('提示信息:您已经编辑添加该记录。');
|
$this->messenger->addMessage('提示信息:您已经编辑添加该记录。');
|
||||||
|
|
|
@ -19,7 +19,9 @@ $this->breadcrumb()->setSeparator(' > ');
|
||||||
<?php if (count($this->paginator)): ?>
|
<?php if (count($this->paginator)): ?>
|
||||||
<ol start="<?php echo ($this->paginator->getCurrentPageNumber() - 1) * $this->paginator->getItemCountPerPage()+1; ?>">
|
<ol start="<?php echo ($this->paginator->getCurrentPageNumber() - 1) * $this->paginator->getItemCountPerPage()+1; ?>">
|
||||||
<?php foreach ($this->paginator as $item): ?>
|
<?php foreach ($this->paginator as $item): ?>
|
||||||
<li> <?php echo $item['reference'];
|
<li> <?php
|
||||||
|
if ($item['reftype']==1) echo '<span class="label label-info">数据中心施引文献</span>';
|
||||||
|
echo $item['reference'];
|
||||||
echo ' <a href="/knowledge/paper/id/'.$item['id'].'"><i class="icon-info-sign text-success"></i>查看</a>';
|
echo ' <a href="/knowledge/paper/id/'.$item['id'].'"><i class="icon-info-sign text-success"></i>查看</a>';
|
||||||
if (!empty($item['link'])) :
|
if (!empty($item['link'])) :
|
||||||
echo ' <a href="'.$item['link'].'">下载</a>';
|
echo ' <a href="'.$item['link'].'">下载</a>';
|
||||||
|
|
|
@ -20,7 +20,7 @@ $this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||||
<h3><?php echo $this->paper['title']; ?></h3>
|
<h3><?php echo $this->paper['title']; ?></h3>
|
||||||
<hr />
|
<hr />
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if(count($this->author) > 0) {?>
|
<?php if($this->author) : ?>
|
||||||
<h4>作者</h4>
|
<h4>作者</h4>
|
||||||
<ul>
|
<ul>
|
||||||
<?php foreach($this->author as $a) : ?>
|
<?php foreach($this->author as $a) : ?>
|
||||||
|
@ -28,7 +28,7 @@ $this->headLink()->appendStylesheet('/css/colorbox.css');
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</ul>
|
</ul>
|
||||||
<hr />
|
<hr />
|
||||||
<?php } ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ($this->paper['abstract']){ ?>
|
<?php if ($this->paper['abstract']){ ?>
|
||||||
<h4>摘要</h4>
|
<h4>摘要</h4>
|
||||||
|
|
|
@ -26,6 +26,23 @@ class OfflinelogForm extends Zend_Form
|
||||||
$address->setLabel('联系地址')->setRequired(true);
|
$address->setLabel('联系地址')->setRequired(true);
|
||||||
$project=new Zend_Form_Element_Textarea('project');
|
$project=new Zend_Form_Element_Textarea('project');
|
||||||
$project->setLabel('用途')->setRequired(true)->setAttrib('rows',2);
|
$project->setLabel('用途')->setRequired(true)->setAttrib('rows',2);
|
||||||
|
$project_id=new Zend_Form_Element_Text('project_id');
|
||||||
|
$project_id->setLabel('项目编号');
|
||||||
|
$project_title=new Zend_Form_Element_Text('project_title');
|
||||||
|
$project_title->setLabel('项目名称');
|
||||||
|
$project_type=new Zend_Form_Element_Select('project_type');
|
||||||
|
$project_type->setLabel('项目类型');
|
||||||
|
$project_type->addMultiOption('','请选择项目类型');
|
||||||
|
$project_type->addMultiOption('国家973计划项目课题','国家973计划项目课题');
|
||||||
|
$project_type->addMultiOption('国家863计划课题','国家863计划课题');
|
||||||
|
$project_type->addMultiOption('国家级科技支撑课题','国家级科技支撑课题');
|
||||||
|
$project_type->addMultiOption('国家级科技重大专项','国家级科技重大专项');
|
||||||
|
$project_type->addMultiOption('国家级国家重大工程','国家级国家重大工程');
|
||||||
|
$project_type->addMultiOption('国家级国家自然科学基金','国家级国家自然科学基金');
|
||||||
|
$project_type->addMultiOption('国际合作项目','国际合作项目');
|
||||||
|
$project_type->addMultiOption('省部级项目','省部级项目');
|
||||||
|
$project_type->addMultiOption('其他项目工程','其他项目工程');
|
||||||
|
|
||||||
$datalist=new Zend_Form_Element_Textarea('datalist');
|
$datalist=new Zend_Form_Element_Textarea('datalist');
|
||||||
$datalist->setLabel('数据清单')->setRequired(true)->setAttrib('rows',2);
|
$datalist->setLabel('数据清单')->setRequired(true)->setAttrib('rows',2);
|
||||||
$pdf=new Zend_Form_Element_File('pdf');
|
$pdf=new Zend_Form_Element_File('pdf');
|
||||||
|
@ -42,6 +59,6 @@ class OfflinelogForm extends Zend_Form
|
||||||
$submit = new Zend_Form_Element_Submit('submit');
|
$submit = new Zend_Form_Element_Submit('submit');
|
||||||
$submit->setAttrib('id', 'submitbutton')->setLabel('添加');
|
$submit->setAttrib('id', 'submitbutton')->setLabel('添加');
|
||||||
$this->setAttrib('enctype', 'multipart/form-data');
|
$this->setAttrib('enctype', 'multipart/form-data');
|
||||||
$this->addElements(array($username,$email,$phone,$unit,$address,$postcode,$pdf,$ts_approved,$project,$datalist,$id,$submit));
|
$this->addElements(array($username,$email,$phone,$unit,$address,$postcode,$pdf,$ts_approved,$project_id,$project_title,$project_type,$project,$datalist,$id,$submit));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,7 +3,7 @@ namespace Order\Manager;
|
||||||
|
|
||||||
use Helpers\View as view;
|
use Helpers\View as view;
|
||||||
use Helpers\dbh;
|
use Helpers\dbh;
|
||||||
use Order\listener\ManagerListener;
|
use Order\Listener\ManagerListener;
|
||||||
|
|
||||||
class Offlineapp
|
class Offlineapp
|
||||||
{
|
{
|
||||||
|
|
|
@ -174,8 +174,6 @@ class Ris
|
||||||
$results = $this->events()->trigger('checkLoad', $this, compact('ref'));
|
$results = $this->events()->trigger('checkLoad', $this, compact('ref'));
|
||||||
$id = $results->bottom();
|
$id = $results->bottom();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
$this->unsetVar($ref);
|
$this->unsetVar($ref);
|
||||||
|
@ -261,6 +259,11 @@ class Ris
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
|
if(is_string($author))
|
||||||
|
{
|
||||||
|
$author_splited = $this->splitAuthor($author);
|
||||||
|
$this->dbh->insert($this->table->reference_author,array('id'=>$id , 'lastname'=>$author_splited['lastname'] , 'firstname'=>$author_splited['firstname'] , 'place'=>0 ));
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue