switch to en schema and change pdf to en.

This commit is contained in:
wlx 2014-03-03 07:50:27 +00:00
parent 6be292d525
commit 9578c74bb0
5 changed files with 26 additions and 26 deletions

View File

@ -25,7 +25,7 @@ class ApplicantPDF extends FPDI
$this->addPage(); $this->addPage();
$this->useTemplate($tplidx); $this->useTemplate($tplidx);
$this->SetFont('ugb','',$this->fontsize); $this->SetFont('ugb','',$this->fontsize);
$this->setXY(74,43); $this->setXY(62,41);
$this->Write($this->fontsize,$this->data['realname']); $this->Write($this->fontsize,$this->data['realname']);
$this->SetXY(34,55); $this->SetXY(34,55);
$this->MultiCell (166, 4, str_replace(";","\n",$this->data['westdclist'])); $this->MultiCell (166, 4, str_replace(";","\n",$this->data['westdclist']));
@ -33,18 +33,18 @@ class ApplicantPDF extends FPDI
$this->MultiCell(166,4,trim($this->data['project'])); $this->MultiCell(166,4,trim($this->data['project']));
//$this->setXY(34,239); //$this->setXY(34,239);
//$this->Write($this->fontsize,$this->data['realname']); //$this->Write($this->fontsize,$this->data['realname']);
$this->setXY(32,223); $this->setXY(48,194);
$this->Write($this->fontsize,$this->data['unit']); $this->Write($this->fontsize,$this->data['unit']);
$this->setXY(112,223); $this->setXY(36,209);
$this->Write($this->fontsize,$this->data['email']); $this->Write($this->fontsize,$this->data['email']);
$this->setXY(174,223); //$this->setXY(174,223);
$this->Write($this->fontsize,$this->data['postcode']); //$this->Write($this->fontsize,$this->data['postcode']);
$this->setXY(32,230); $this->setXY(38,201);
$this->Write($this->fontsize,$this->data['address']); $this->Write($this->fontsize,$this->data['address']);
$this->setXY(112,230); $this->setXY(112,209);
$this->Write($this->fontsize,$this->data['phone']); $this->Write($this->fontsize,$this->data['phone']);
$t=date("Y-m-d"); $t=date("Y-m-d");
$this->setXY(174,230); $this->setXY(160,209);
$this->Write($this->fontsize,$t); $this->Write($this->fontsize,$t);
} }
function drawHeihe() function drawHeihe()
@ -79,9 +79,9 @@ class ApplicantPDF extends FPDI
function addRef($mds) function addRef($mds)
{ {
$this->addPage(); $this->addPage();
$this->SetFont('ugb','B',20); $this->SetFont('','B',20);
$this->ln(); $this->ln();
$this->Cell(0,0,'附件:数据引用信息',0,2,'C'); $this->Cell(0,0,'Attachment: Data Citation',0,2,'C');
$this->setY(30); $this->setY(30);
foreach($mds as $i=>$md) foreach($mds as $i=>$md)
{ {
@ -90,11 +90,11 @@ class ApplicantPDF extends FPDI
$this->ln(); $this->ln();
if ($md['reference']) if ($md['reference'])
{ {
$this->Write(5,'【引用方式】'.$md['reference']); $this->Write(5,'[Citation] '.$md['reference']);
$this->ln(); $this->ln();
if (!empty($md['publish_year'])) if (!empty($md['publish_year']))
{ {
$this->Write(5,'【数据的引用】'.substr($md['authors'],1,-1).'. '.$md['doititle'].'. '.$md['publisher'].', ' $this->Write(5,'[Data citation] '.substr($md['authors'],1,-1).'. '.$md['doititle'].'. '.$md['publisher'].', '
.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))). .(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).
'. doi:'.$md['datadoi'].' ['.str_replace('"','',substr($md['author_en'],1,-1)).'. '.$md['title_en'] '. doi:'.$md['datadoi'].' ['.str_replace('"','',substr($md['author_en'],1,-1)).'. '.$md['title_en']
.'. '.$md['publisher_en'].', '.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).'. doi:'.$md['datadoi'].']'); .'. '.$md['publisher_en'].', '.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).'. doi:'.$md['datadoi'].']');
@ -102,11 +102,11 @@ class ApplicantPDF extends FPDI
} }
} elseif ($md['citation']) } elseif ($md['citation'])
{ {
$this->Write(5,'【引用方式】'.$md['citation']); $this->Write(5,'[Citation] '.$md['citation']);
$this->ln(); $this->ln();
if (!empty($md['publish_year']) && !strpos($md['citation'],$md['datadoi'])) if (!empty($md['publish_year']) && !strpos($md['citation'],$md['datadoi']))
{ {
$this->Write(5,'【数据的引用】'.substr($md['authors'],1,-1).'. '.$md['doititle'].'. '.$md['publisher'].', ' $this->Write(5,'[Data citation] '.substr($md['authors'],1,-1).'. '.$md['doititle'].'. '.$md['publisher'].', '
.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))). .(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).
'. doi:'.$md['datadoi'].' ['.str_replace('"','',substr($md['author_en'],1,-1)).'. '.$md['title_en'] '. doi:'.$md['datadoi'].' ['.str_replace('"','',substr($md['author_en'],1,-1)).'. '.$md['title_en']
.'. '.$md['publisher_en'].', '.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).'. doi:'.$md['datadoi'].']'); .'. '.$md['publisher_en'].', '.(empty($md['ts_published'])?$md['publish_year']:date('Y',strtotime($md['ts_published']))).'. doi:'.$md['datadoi'].']');
@ -115,9 +115,9 @@ class ApplicantPDF extends FPDI
} }
if ($md['suppinfo'] || $md['fund']) if ($md['suppinfo'] || $md['fund'])
{ {
$this->SetFont('ugb','I',10); $this->SetFont('','I',10);
$p=(!empty($md['fund']))?$md['fund']:$md['suppinfo']; $p=(!empty($md['fund']))?$md['fund']:$md['suppinfo'];
$this->Write(5,'【项目信息】'.$p); $this->Write(5,'[Funding] '.$p);
$this->ln(); $this->ln();
} }
$this->ln(); $this->ln();
@ -163,7 +163,7 @@ class ApplicantPDF extends FPDI
$thisline .= "".$s['name'].": "; $thisline .= "".$s['name'].": ";
if($s['var'] == -1) if($s['var'] == -1)
{ {
$thisline .= "全部"; $thisline .= "All";
}else{ }else{
foreach($s['var'] as $var) foreach($s['var'] as $var)
{ {
@ -185,7 +185,7 @@ class ApplicantPDF extends FPDI
$this->addPage(); $this->addPage();
$this->SetFont('ugb','B',20); $this->SetFont('ugb','B',20);
$this->ln(); $this->ln();
$this->Cell(0,0,'附件:申请的数据子集',0,2,'C'); $this->Cell(0,0,'Attachment: Data Subsets',0,2,'C');
$this->setY(30); $this->setY(30);
foreach($line as $k=>$v) foreach($line as $k=>$v)

View File

@ -11,7 +11,7 @@ class OrderOperate implements \Order\Listener\OrderEvents
//!!!!!!important!!!!! //!!!!!!important!!!!!
//不同项目使用时是否要修改此项?? //不同项目使用时是否要修改此项??
public $tbl_metadata = "normalmetadata"; public $tbl_metadata = "en.normalmetadata";
public $tbl_dataorder = "dataorder"; public $tbl_dataorder = "dataorder";
function __construct($db = NULL) function __construct($db = NULL)

View File

@ -11,7 +11,7 @@ class PdfForm implements \Order\Listener\PdfFormEvents
//!!!!!!important!!!!! //!!!!!!important!!!!!
//不同项目使用时是否要修改此项?? //不同项目使用时是否要修改此项??
public $tbl_metadata = "normalmetadata"; public $tbl_metadata = "en.normalmetadata";
public $tbl_dataorder = "dataorder"; public $tbl_dataorder = "dataorder";
function __construct($db = NULL) function __construct($db = NULL)

View File

@ -13,7 +13,7 @@ class PdfOperate implements \Order\Listener\PdfEvents
//!!!!!!important!!!!! //!!!!!!important!!!!!
//不同项目使用时是否要修改此项?? //不同项目使用时是否要修改此项??
public $tbl_metadata = "normalmetadata"; public $tbl_metadata = "en.normalmetadata";
public $tbl_dataorder = "dataorder"; public $tbl_dataorder = "dataorder";
public $tbl_offlineapp = "offlineapp"; public $tbl_offlineapp = "offlineapp";

View File

@ -305,7 +305,7 @@ class Order
//生成pdf //生成pdf
public function pdfPrint($formData,$userid = 0,$save = false,$returnpdf = false) public function pdfPrint($formData,$userid = 0,$save = false,$returnpdf = false)
{ {
$sql="SELECT m.title||'('||m.filesize::text||'MB)' as title FROM dataorder d /*$sql="SELECT m.title||'('||m.filesize::text||'MB)' as title FROM dataorder d
RIGHT JOIN heihemetadata m ON d.uuid=m.uuid RIGHT JOIN heihemetadata m ON d.uuid=m.uuid
WHERE d.status=2 AND d.userid=?"; WHERE d.status=2 AND d.userid=?";
@ -313,10 +313,10 @@ class Order
foreach($list as $i=>$row){ foreach($list as $i=>$row){
@$formData['heihelist'].=($i+1).". ".$row['title'].";"; @$formData['heihelist'].=($i+1).". ".$row['title'].";";
} }*/
$sql="SELECT m.title||'('||m.filesize::text||'MB)' as title FROM dataorder d $sql="SELECT m.title||'('||m.filesize::text||'MB)' as title FROM dataorder d
RIGHT JOIN normalmetadata m ON d.uuid=m.uuid WHERE d.uuid not in (select uuid from heihemetadata) AND d.status=2 AND d.userid=?"; RIGHT JOIN en.normalmetadata m ON d.uuid=m.uuid WHERE d.status=2 AND d.userid=?";
$list = $this->db->fetchAll($sql,array($userid)); $list = $this->db->fetchAll($sql,array($userid));
foreach($list as $i=>$row){ foreach($list as $i=>$row){
@ -332,12 +332,12 @@ class Order
$pdf->data = $formData; $pdf->data = $formData;
if (isset($formData['westdclist'])) $pdf->drawWestdc(); if (isset($formData['westdclist'])) $pdf->drawWestdc();
if (isset($formData['heihelist'])) $pdf->drawHeihe(); //if (isset($formData['heihelist'])) $pdf->drawHeihe();
$pdf->addRef($this->pdfData); $pdf->addRef($this->pdfData);
$pdf->addSelection($this->pdfData); $pdf->addSelection($this->pdfData);
$pdf->addSecurity($this->config->offline->security); //$pdf->addSecurity($this->config->offline->security);
if($save === false) if($save === false)
{ {