Primo commit: trasferimento del progetto PPEasy
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
$timestamppdf = date('YmdHis');
|
||||
if ((!empty($documentlist->getColumnVal("idfileattached"))) || (!empty($photolist->getColumnVal("photofilename"))) || (!empty($photolist->getColumnVal("photoone"))) || (!empty($photolist->getColumnVal("phototwo")))) {
|
||||
$timestamppdf = date('YmdHis');
|
||||
if ($sndrpt == 'N') {
|
||||
//$pdf->Output(); second module
|
||||
$filepathname = $trfData['trfnumber'] . "rev" . $trfData['revtrf'] . "applicationform" . $timestamppdf . ".pdf";
|
||||
$filename = "pdf/" . $filepathname;
|
||||
$pdf->Output($filename, 'F');
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("zipname", "s", "$zipnamefile", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
} else {
|
||||
//$pdf->Output(); first module
|
||||
$filepathname = $trfData['trfnumber'] . "rev" . $trfData['revtrf'] . "applicationformb" . $timestamppdf . ".pdf";
|
||||
$filename = "pdf/" . $filepathname;
|
||||
$pdf->Output($filename, 'F');
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename2", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->bindColumn("zipname", "s", "$zipnamefile", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
}
|
||||
} else {
|
||||
if ($sndrpt == 'N') {
|
||||
//$pdf->Output(); second module
|
||||
$filepathname = $trfData['trfnumber'] . "rev" . $trfData['revtrf'] . "applicationform" . $timestamppdf . ".pdf";
|
||||
$filename = "pdf/" . $filepathname;
|
||||
$pdf->Output($filename, 'F');
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
} else {
|
||||
//$pdf->Output(); first module
|
||||
$filepathname = $trfData['trfnumber'] . "rev" . $trfData['revtrf'] . "applicationformb" . $timestamppdf . ".pdf";
|
||||
$filename = "pdf/" . $filepathname;
|
||||
$pdf->Output($filename, 'F');
|
||||
$UpdateQuery = new WA_MySQLi_Query($cmctrfdb);
|
||||
$UpdateQuery->Action = "update";
|
||||
$UpdateQuery->Table = "`trf-details`";
|
||||
$UpdateQuery->bindColumn("pdffilename2", "s", "$filepathname", "WA_DEFAULT");
|
||||
$UpdateQuery->addFilter("idtrfdetails", "=", "i", "" . ($idtrf) . "");
|
||||
$UpdateQuery->execute();
|
||||
$UpdateGoTo = "";
|
||||
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo ? rel2abs($UpdateGoTo, dirname(__FILE__)) : "";
|
||||
$UpdateQuery->redirect($UpdateGoTo);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user