From 6c50a54e4902cb0a56612aba0622e908813b7595 Mon Sep 17 00:00:00 2001 From: Fedotchenko Iuliia Date: Tue, 14 Feb 2017 15:50:06 +0100 Subject: [PATCH 1/2] [*] version 1.6.3 --- .gitignore | 1 - .htaccess | 3 + .yo-rc.json | 6 + ajax/index.php | 36 + api/PacklinkApiCaller.php | 240 +++ api/PacklinkSDK.php | 134 ++ api/index.php | 26 + classes/PLOrder.php | 49 + classes/helper/PlTotAdminTabHelper.php | 95 + classes/helper/index.php | 26 + classes/index.php | 26 + config.xml | 11 - .../admin/AdminGeneratePdfPlController.php | 43 + .../admin/AdminTabPacklinkController.php | 25 + controllers/admin/index.php | 26 + controllers/front/index.php | 36 + controllers/index.php | 26 + index.php | 51 +- libraries/index.php | 26 + libraries/sdk/PDFMerger/PDFMerger.php | 193 ++ libraries/sdk/PDFMerger/fpdf/FAQ.htm | 341 ++++ .../PDFMerger/fpdf/doc/acceptpagebreak.htm | 63 + libraries/sdk/PDFMerger/fpdf/doc/addfont.htm | 55 + libraries/sdk/PDFMerger/fpdf/doc/addlink.htm | 26 + libraries/sdk/PDFMerger/fpdf/doc/addpage.htm | 56 + .../sdk/PDFMerger/fpdf/doc/aliasnbpages.htm | 45 + libraries/sdk/PDFMerger/fpdf/doc/cell.htm | 104 + libraries/sdk/PDFMerger/fpdf/doc/close.htm | 21 + libraries/sdk/PDFMerger/fpdf/doc/error.htm | 25 + libraries/sdk/PDFMerger/fpdf/doc/footer.htm | 35 + libraries/sdk/PDFMerger/fpdf/doc/fpdf.htm | 63 + .../sdk/PDFMerger/fpdf/doc/getstringwidth.htm | 23 + libraries/sdk/PDFMerger/fpdf/doc/getx.htm | 20 + libraries/sdk/PDFMerger/fpdf/doc/gety.htm | 20 + libraries/sdk/PDFMerger/fpdf/doc/header.htm | 37 + libraries/sdk/PDFMerger/fpdf/doc/image.htm | 86 + libraries/sdk/PDFMerger/fpdf/doc/index.htm | 57 + libraries/sdk/PDFMerger/fpdf/doc/index.php | 26 + libraries/sdk/PDFMerger/fpdf/doc/line.htm | 38 + libraries/sdk/PDFMerger/fpdf/doc/link.htm | 46 + libraries/sdk/PDFMerger/fpdf/doc/ln.htm | 28 + .../sdk/PDFMerger/fpdf/doc/multicell.htm | 76 + libraries/sdk/PDFMerger/fpdf/doc/output.htm | 42 + libraries/sdk/PDFMerger/fpdf/doc/pageno.htm | 18 + libraries/sdk/PDFMerger/fpdf/doc/rect.htm | 48 + .../sdk/PDFMerger/fpdf/doc/setauthor.htm | 33 + .../PDFMerger/fpdf/doc/setautopagebreak.htm | 33 + .../sdk/PDFMerger/fpdf/doc/setcompression.htm | 31 + .../sdk/PDFMerger/fpdf/doc/setcreator.htm | 34 + .../sdk/PDFMerger/fpdf/doc/setdisplaymode.htm | 47 + .../sdk/PDFMerger/fpdf/doc/setdrawcolor.htm | 41 + .../sdk/PDFMerger/fpdf/doc/setfillcolor.htm | 40 + libraries/sdk/PDFMerger/fpdf/doc/setfont.htm | 92 + .../sdk/PDFMerger/fpdf/doc/setfontsize.htm | 25 + .../sdk/PDFMerger/fpdf/doc/setkeywords.htm | 33 + .../sdk/PDFMerger/fpdf/doc/setleftmargin.htm | 30 + .../sdk/PDFMerger/fpdf/doc/setlinewidth.htm | 29 + libraries/sdk/PDFMerger/fpdf/doc/setlink.htm | 34 + .../sdk/PDFMerger/fpdf/doc/setmargins.htm | 37 + .../sdk/PDFMerger/fpdf/doc/setrightmargin.htm | 28 + .../sdk/PDFMerger/fpdf/doc/setsubject.htm | 33 + .../sdk/PDFMerger/fpdf/doc/settextcolor.htm | 40 + libraries/sdk/PDFMerger/fpdf/doc/settitle.htm | 33 + .../sdk/PDFMerger/fpdf/doc/settopmargin.htm | 28 + libraries/sdk/PDFMerger/fpdf/doc/setx.htm | 29 + libraries/sdk/PDFMerger/fpdf/doc/setxy.htm | 31 + libraries/sdk/PDFMerger/fpdf/doc/sety.htm | 29 + libraries/sdk/PDFMerger/fpdf/doc/text.htm | 39 + libraries/sdk/PDFMerger/fpdf/doc/write.htm | 51 + libraries/sdk/PDFMerger/fpdf/font/courier.php | 7 + libraries/sdk/PDFMerger/fpdf/font/desktop.ini | 4 + .../sdk/PDFMerger/fpdf/font/helvetica.php | 15 + .../sdk/PDFMerger/fpdf/font/helveticab.php | 15 + .../sdk/PDFMerger/fpdf/font/helveticabi.php | 15 + .../sdk/PDFMerger/fpdf/font/helveticai.php | 15 + libraries/sdk/PDFMerger/fpdf/font/index.php | 26 + .../PDFMerger/fpdf/font/makefont/cp1250.map | 251 +++ .../PDFMerger/fpdf/font/makefont/cp1251.map | 255 +++ .../PDFMerger/fpdf/font/makefont/cp1252.map | 251 +++ .../PDFMerger/fpdf/font/makefont/cp1253.map | 239 +++ .../PDFMerger/fpdf/font/makefont/cp1254.map | 249 +++ .../PDFMerger/fpdf/font/makefont/cp1255.map | 233 +++ .../PDFMerger/fpdf/font/makefont/cp1257.map | 244 +++ .../PDFMerger/fpdf/font/makefont/cp1258.map | 247 +++ .../PDFMerger/fpdf/font/makefont/cp874.map | 225 +++ .../PDFMerger/fpdf/font/makefont/index.php | 26 + .../fpdf/font/makefont/iso-8859-1.map | 256 +++ .../fpdf/font/makefont/iso-8859-11.map | 248 +++ .../fpdf/font/makefont/iso-8859-15.map | 256 +++ .../fpdf/font/makefont/iso-8859-16.map | 256 +++ .../fpdf/font/makefont/iso-8859-2.map | 256 +++ .../fpdf/font/makefont/iso-8859-4.map | 256 +++ .../fpdf/font/makefont/iso-8859-5.map | 256 +++ .../fpdf/font/makefont/iso-8859-7.map | 250 +++ .../fpdf/font/makefont/iso-8859-9.map | 256 +++ .../PDFMerger/fpdf/font/makefont/koi8-r.map | 256 +++ .../PDFMerger/fpdf/font/makefont/koi8-u.map | 256 +++ .../PDFMerger/fpdf/font/makefont/makefont.php | 419 ++++ libraries/sdk/PDFMerger/fpdf/font/symbol.php | 15 + libraries/sdk/PDFMerger/fpdf/font/times.php | 15 + libraries/sdk/PDFMerger/fpdf/font/timesb.php | 15 + libraries/sdk/PDFMerger/fpdf/font/timesbi.php | 15 + libraries/sdk/PDFMerger/fpdf/font/timesi.php | 15 + .../sdk/PDFMerger/fpdf/font/zapfdingbats.php | 15 + libraries/sdk/PDFMerger/fpdf/fpdf.css | 21 + libraries/sdk/PDFMerger/fpdf/fpdf.php | 1732 +++++++++++++++++ libraries/sdk/PDFMerger/fpdf/histo.htm | 128 ++ libraries/sdk/PDFMerger/fpdf/index.php | 26 + libraries/sdk/PDFMerger/fpdf/install.txt | 26 + libraries/sdk/PDFMerger/fpdf/license.txt | 6 + .../PDFMerger/fpdi/filters/FilterASCII85.php | 98 + .../fpdi/filters/FilterASCII85_FPDI.php | 33 + .../sdk/PDFMerger/fpdi/filters/FilterLZW.php | 154 ++ .../PDFMerger/fpdi/filters/FilterLZW_FPDI.php | 33 + .../sdk/PDFMerger/fpdi/filters/index.php | 26 + libraries/sdk/PDFMerger/fpdi/fpdf_tpl.php | 409 ++++ libraries/sdk/PDFMerger/fpdi/fpdi.php | 505 +++++ .../sdk/PDFMerger/fpdi/fpdi2tcpdf_bridge.php | 171 ++ .../sdk/PDFMerger/fpdi/fpdi_pdf_parser.php | 384 ++++ libraries/sdk/PDFMerger/fpdi/index.php | 26 + libraries/sdk/PDFMerger/fpdi/pdf_context.php | 97 + libraries/sdk/PDFMerger/fpdi/pdf_parser.php | 706 +++++++ libraries/sdk/PDFMerger/index.php | 26 + libraries/sdk/index.php | 26 + logo.gif | Bin 2736 -> 1633 bytes logo.png | Bin 3913 -> 1469 bytes packlink.php | 1566 +++++++++++++++ packlinkpro.php | 121 -- pdf/index.php | 26 + status.php | 63 + translations/ca.php | 94 + translations/de.php | 86 + translations/es.php | 102 +- translations/fr.php | 86 + translations/index.php | 51 +- translations/it.php | 86 + upgrade/Upgrade-1.3.0.php | 66 + upgrade/Upgrade-1.4.0.php | 41 + upgrade/Upgrade-1.5.0.php | 92 + upgrade/Upgrade-1.6.0.php | 69 + upgrade/Upgrade-1.6.3.php | 34 + upgrade/index.php | 26 + views/css/bootstrap.min.css | 6 + views/css/index.php | 26 + views/css/style15.css | 179 ++ views/css/style16.css | 174 ++ views/img/add.gif | Bin 0 -> 598 bytes views/img/delivery.gif | Bin 0 -> 583 bytes views/img/down.png | Bin 0 -> 858 bytes views/img/index.php | 51 +- views/img/logo-pl.svg | 89 + views/img/logo.jpg | Bin 11412 -> 0 bytes views/img/printer.gif | Bin 0 -> 731 bytes views/img/search.gif | Bin 0 -> 615 bytes views/img/up.png | Bin 0 -> 4720 bytes views/index.php | 51 +- views/js/bootstrap.min.js | 6 + views/js/index.php | 26 + views/templates/admin/_pl_action.tpl | 20 + views/templates/admin/_pl_action15.tpl | 20 + views/templates/admin/configure.tpl | 64 - views/templates/admin/index.php | 51 +- views/templates/front/index.php | 26 + views/templates/hook/back.tpl | 248 +++ views/templates/hook/expedition.tpl | 44 + views/templates/hook/expedition15.tpl | 28 + views/templates/hook/index.php | 26 + views/templates/hook/order_details.tpl | 61 + views/templates/index.php | 51 +- 169 files changed, 17078 insertions(+), 397 deletions(-) delete mode 100644 .gitignore create mode 100644 .htaccess create mode 100644 .yo-rc.json create mode 100644 ajax/index.php create mode 100644 api/PacklinkApiCaller.php create mode 100644 api/PacklinkSDK.php create mode 100644 api/index.php create mode 100644 classes/PLOrder.php create mode 100644 classes/helper/PlTotAdminTabHelper.php create mode 100644 classes/helper/index.php create mode 100644 classes/index.php delete mode 100644 config.xml create mode 100644 controllers/admin/AdminGeneratePdfPlController.php create mode 100644 controllers/admin/AdminTabPacklinkController.php create mode 100644 controllers/admin/index.php create mode 100644 controllers/front/index.php create mode 100644 controllers/index.php create mode 100644 libraries/index.php create mode 100644 libraries/sdk/PDFMerger/PDFMerger.php create mode 100644 libraries/sdk/PDFMerger/fpdf/FAQ.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/acceptpagebreak.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/addfont.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/addlink.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/addpage.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/aliasnbpages.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/cell.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/close.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/error.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/footer.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/fpdf.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/getstringwidth.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/getx.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/gety.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/header.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/image.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/index.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/index.php create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/line.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/link.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/ln.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/multicell.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/output.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/pageno.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/rect.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setauthor.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setautopagebreak.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setcompression.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setcreator.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setdisplaymode.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setdrawcolor.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setfillcolor.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setfont.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setfontsize.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setkeywords.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setleftmargin.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setlinewidth.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setlink.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setmargins.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setrightmargin.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setsubject.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/settextcolor.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/settitle.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/settopmargin.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setx.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/setxy.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/sety.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/text.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/doc/write.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/font/courier.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/desktop.ini create mode 100644 libraries/sdk/PDFMerger/fpdf/font/helvetica.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/helveticab.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/helveticabi.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/helveticai.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/index.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/cp1250.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/cp1251.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/cp1252.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/cp1253.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/cp1254.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/cp1255.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/cp1257.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/cp1258.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/cp874.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/index.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/iso-8859-1.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/iso-8859-11.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/iso-8859-15.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/iso-8859-16.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/iso-8859-2.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/iso-8859-4.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/iso-8859-5.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/iso-8859-7.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/iso-8859-9.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/koi8-r.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/koi8-u.map create mode 100644 libraries/sdk/PDFMerger/fpdf/font/makefont/makefont.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/symbol.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/times.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/timesb.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/timesbi.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/timesi.php create mode 100644 libraries/sdk/PDFMerger/fpdf/font/zapfdingbats.php create mode 100644 libraries/sdk/PDFMerger/fpdf/fpdf.css create mode 100644 libraries/sdk/PDFMerger/fpdf/fpdf.php create mode 100644 libraries/sdk/PDFMerger/fpdf/histo.htm create mode 100644 libraries/sdk/PDFMerger/fpdf/index.php create mode 100644 libraries/sdk/PDFMerger/fpdf/install.txt create mode 100644 libraries/sdk/PDFMerger/fpdf/license.txt create mode 100644 libraries/sdk/PDFMerger/fpdi/filters/FilterASCII85.php create mode 100644 libraries/sdk/PDFMerger/fpdi/filters/FilterASCII85_FPDI.php create mode 100644 libraries/sdk/PDFMerger/fpdi/filters/FilterLZW.php create mode 100644 libraries/sdk/PDFMerger/fpdi/filters/FilterLZW_FPDI.php create mode 100644 libraries/sdk/PDFMerger/fpdi/filters/index.php create mode 100644 libraries/sdk/PDFMerger/fpdi/fpdf_tpl.php create mode 100644 libraries/sdk/PDFMerger/fpdi/fpdi.php create mode 100644 libraries/sdk/PDFMerger/fpdi/fpdi2tcpdf_bridge.php create mode 100644 libraries/sdk/PDFMerger/fpdi/fpdi_pdf_parser.php create mode 100644 libraries/sdk/PDFMerger/fpdi/index.php create mode 100644 libraries/sdk/PDFMerger/fpdi/pdf_context.php create mode 100644 libraries/sdk/PDFMerger/fpdi/pdf_parser.php create mode 100644 libraries/sdk/PDFMerger/index.php create mode 100644 libraries/sdk/index.php create mode 100644 packlink.php delete mode 100644 packlinkpro.php create mode 100644 pdf/index.php create mode 100644 status.php create mode 100644 translations/ca.php create mode 100644 translations/de.php create mode 100644 translations/fr.php create mode 100644 translations/it.php create mode 100644 upgrade/Upgrade-1.3.0.php create mode 100644 upgrade/Upgrade-1.4.0.php create mode 100644 upgrade/Upgrade-1.5.0.php create mode 100644 upgrade/Upgrade-1.6.0.php create mode 100644 upgrade/Upgrade-1.6.3.php create mode 100644 upgrade/index.php create mode 100644 views/css/bootstrap.min.css create mode 100644 views/css/index.php create mode 100644 views/css/style15.css create mode 100644 views/css/style16.css create mode 100644 views/img/add.gif create mode 100644 views/img/delivery.gif create mode 100644 views/img/down.png create mode 100644 views/img/logo-pl.svg delete mode 100644 views/img/logo.jpg create mode 100644 views/img/printer.gif create mode 100644 views/img/search.gif create mode 100644 views/img/up.png create mode 100644 views/js/bootstrap.min.js create mode 100644 views/js/index.php create mode 100644 views/templates/admin/_pl_action.tpl create mode 100644 views/templates/admin/_pl_action15.tpl delete mode 100644 views/templates/admin/configure.tpl create mode 100644 views/templates/front/index.php create mode 100644 views/templates/hook/back.tpl create mode 100644 views/templates/hook/expedition.tpl create mode 100644 views/templates/hook/expedition15.tpl create mode 100644 views/templates/hook/index.php create mode 100644 views/templates/hook/order_details.tpl diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 14bc68c..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/nbproject/private/ \ No newline at end of file diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..624cb67 --- /dev/null +++ b/.htaccess @@ -0,0 +1,3 @@ +order deny,allow +allow from all +satisfy any \ No newline at end of file diff --git a/.yo-rc.json b/.yo-rc.json new file mode 100644 index 0000000..8bdef3d --- /dev/null +++ b/.yo-rc.json @@ -0,0 +1,6 @@ +{ + "generator-202_module": { + "moduleName": "packlink", + "modulePrefix": "PL_" + } +} \ No newline at end of file diff --git a/ajax/index.php b/ajax/index.php new file mode 100644 index 0000000..6b1d2d7 --- /dev/null +++ b/ajax/index.php @@ -0,0 +1,36 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/api/PacklinkApiCaller.php b/api/PacklinkApiCaller.php new file mode 100644 index 0000000..35ceb9b --- /dev/null +++ b/api/PacklinkApiCaller.php @@ -0,0 +1,240 @@ +host = $host; + $this->module = $module; + $this->user = $user; + $this->passwd = $passwd; + } + + /** + * Get body + * @return mixed Create body + */ + abstract protected function getBody(array $fields); + + /** + * Make call + * @param mixed $body body content + * @param mixed $http_header header content + * @param string $user User login + * @param string $passwd User password + * @return mixed Call + */ + protected function makeCall($body = null, $http_header = null) + { + // init uri to call + $uri_to_call = $this->host.$this->endpoint; + + $this->logs[] = '======================================================================================================'; + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Making new connection to : '.$uri_to_call; + + $stream_context = array(); + + if ($body != null) { + + if ($http_header) { + $stream_context = stream_context_create( + array ( + 'http' => array ( + 'method' => 'POST', + 'content' => $body, + 'header'=> $http_header + ) + ) + ); + } else { + $stream_context = stream_context_create( + array ( + 'http' => array ( + 'method' => 'POST', + 'content' => $body + ) + ) + ); + } + + } else { + $stream_context = array(); + } + + $test = array($http_header, $body, $this->user, $this->passwd); + + $this->response = $this->fileGetContents($uri_to_call, false, $stream_context); + + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Response : '.$this->response; + + if ($this->response != false) { + $this->response = json_decode($this->response); + } + + $this->logs[] = '======================================================================================================'; + + if ($this->debug) { + $this->writeLog(); + } + } + + private function fileGetContents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5) + { + if ($stream_context == null && preg_match('/^https?:\/\//', $url)) { + $stream_context = @stream_context_create(array('http' => array('timeout' => $curl_timeout))); + } + if (function_exists('curl_init')) { + $curl = curl_init(); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($curl, CURLOPT_URL, $url); + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5); + curl_setopt($curl, CURLOPT_TIMEOUT, $curl_timeout); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); + if ($stream_context != null) { + $opts = stream_context_get_options($stream_context); + + if (isset($opts['http']['method']) && Tools::strtolower($opts['http']['method']) == 'post') { + curl_setopt($curl, CURLOPT_POST, true); + if (isset($opts['http']['content'])) { + curl_setopt($curl, CURLOPT_POSTFIELDS, $opts['http']['content']); + } + if (isset($opts['http']['header'])) { + curl_setopt($curl, CURLOPT_HTTPHEADER, array( + "Content-type: application/json", + "Content-Length: " . strlen($opts['http']['content']), + "Authorization: ".$opts['http']['header'] + )); + } else { + curl_setopt($curl, CURLOPT_HTTPHEADER, array( + "Content-type: application/json", + "Content-Length: " . strlen($opts['http']['content']), + "Authorization: ".Configuration::get('PL_API_KEY') + )); + } + } else { + curl_setopt($curl, CURLOPT_HTTPHEADER, array( + "Content-type: application/json", + "Authorization: ".Configuration::get('PL_API_KEY') + )); + } + } + + + + foreach ($opts as $key => $option) { + foreach ($option as $key => $value) { + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Options of stream context: '.$key.' => '.$value; + } + } + + $content = curl_exec($curl); + + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Curl: '.$curl; + + curl_close($curl); + + return $content; + } else { + return false; + } + } + + + /** + * Get Logs + * @return array Logs + */ + final public function getLogs() + { + return $this->logs; + } + + final protected function writeLog() + { + if (!$this->debug) { + return false; + } + + $handle = fopen(dirname(__FILE__).'/../log.txt', 'a+'); + + foreach ($this->getLogs() as $value) { + fwrite($handle, $value."\r"); + } + + $this->logs = array(); + + fclose($handle); + } +} diff --git a/api/PacklinkSDK.php b/api/PacklinkSDK.php new file mode 100644 index 0000000..1e93885 --- /dev/null +++ b/api/PacklinkSDK.php @@ -0,0 +1,134 @@ +dev) { + $url = "https://apisandbox.packlink.com/"; + } else { + $url = "https://api.packlink.com/"; + } + parent::__construct($url, $module); + + $this->api_key = $api_key; + } + + public function createAnalitics($body, $api_key) + { + $this->action = 'POST'; + $this->endpoint = 'v1/analytics'; + $this->makeCall($this->getBody($body), $api_key); + + return $this->response; + } + + public function createCallback($body, $api_key) + { + $this->action = 'POST'; + $this->endpoint = 'v1/shipments/callback'; + $this->makeCall($this->getBody($body), $api_key); + + return $this->response; + } + + public function createDraft($params) + { + $this->action = 'POST'; + $this->endpoint = 'v1/shipments'; + $this->makeCall($this->getBody($params)); + + return $this->response; + } + + + + protected function getBody(array $fields) + { + $return = true; + + // if fields not empty + if (empty($fields)) { + $return = false; + } + + // if not empty + if ($return) { + return json_encode($fields); + } + + return $return; + } + + /** + * + * @return $postal_zones : array( + array('id' => '76', 'name' => 'France métropolitaine'), + array('id' => '77', 'name' => 'France Corse') + */ + + public function getPdfLabels($params) + { + $this->action = 'GET'; + $this->endpoint = 'v1/shipments/'.$params.'/labels'; + $this->makeCall(); + + return $this->response; + } + public function getPdfLabelsFile($params) + { + $this->action = 'GET'; + $this->endpoint = 'v1/shipments/'.$params.'/customs'; + $this->makeCall(); + + return $this->response; + } + + public function getWarehouses() + { + $this->action = 'GET'; + $this->endpoint = 'v1/clients/warehouses'; + $this->makeCall(); + + return $this->response; + } + + public function getCitiesByPostCode($postcode, $iso_code) + { + $this->action = 'GET'; + $language = $iso_code.'_'.strtoupper($iso_code); + $this->endpoint = 'v1/locations/postalcodes/'.$iso_code.'/'.$postcode.'?language='.$language.'&platform=PRO&platform_country='.$iso_code; + + $this->makeCall(); + + return $this->response; + } + + public function getShippementDetails($reference) + { + $this->action = 'GET'; + $this->endpoint = 'v1/shipments/'.$reference; + + $this->makeCall(); + + return $this->response; + } +} diff --git a/api/index.php b/api/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/api/index.php @@ -0,0 +1,26 @@ + 'packlink_orders', + 'primary' => 'id_order', + 'multilang' => false, + 'fields' => array( + 'id_order' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), + 'draft_reference' => array('type' => self::TYPE_STRING, 'validate' => 'isString', 'required' => true), + 'postcode' => array('type' => self::TYPE_STRING), + 'postalzone' => array('type' => self::TYPE_STRING), + 'details' => array('type' => self::TYPE_STRING), + 'pdf' => array('type' => self::TYPE_STRING), + ) + ); +} diff --git a/classes/helper/PlTotAdminTabHelper.php b/classes/helper/PlTotAdminTabHelper.php new file mode 100644 index 0000000..bd036fe --- /dev/null +++ b/classes/helper/PlTotAdminTabHelper.php @@ -0,0 +1,95 @@ +delete(); + } + } + + return $result; + } + + /** + * Add admin tabs in the menu + * @param Array $tabs + * Array[ + * Array[ + * id_parent => 0 || void + * className => Controller to link to + * module => modulename to easily delete when uninstalling + * name => name to display + * position => position + * ] + * ] + */ + public static function addAdminTab($data) + { + if (is_array(current($data))) { + $ids = array(); + + foreach ($data as $tab) { + $ids[] = PlTotAdminTabHelper::addAdminTab($tab); + } + + return $ids; + } + + // Get ID Parent + if (isset($data['id_parent'])) { + $id_parent = $data['id_parent']; + } else { + $id_parent = (int)Tab::getIdFromClassName($data['classNameParent']); + } + + // Tab + $tab = Tab::getInstanceFromClassName($data['className']); + + $tab->id_parent = (int)$id_parent; + $tab->class_name = $data['className']; + $tab->module = $data['module']; + $tab->position = Tab::getNewLastPosition((int)$id_parent); + $tab->active = $data['active']; + + $languages = Language::getLanguages(false); + + foreach ($languages as $lang) { + $tab->name[(int)$lang['id_lang']] = $data['name']; + } + + if (!$tab->save()) { + return false; + } + + return $tab->id; + } +} diff --git a/classes/helper/index.php b/classes/helper/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/classes/helper/index.php @@ -0,0 +1,26 @@ + - - packlinkpro - - - - - - 1 - 1 - diff --git a/controllers/admin/AdminGeneratePdfPlController.php b/controllers/admin/AdminGeneratePdfPlController.php new file mode 100644 index 0000000..8c4ffbb --- /dev/null +++ b/controllers/admin/AdminGeneratePdfPlController.php @@ -0,0 +1,43 @@ +action = $action; + } + } + public function processGeneratePDF() + { + $path = _PS_MODULE_DIR_."packlink/pdf/"; + + header('Content-type: application/pdf'); + header('Content-Disposition: attachment; filename="PacklinkExpedition.pdf"'); + readfile($path.'PacklinkExpedition.pdf'); + } +} diff --git a/controllers/admin/AdminTabPacklinkController.php b/controllers/admin/AdminTabPacklinkController.php new file mode 100644 index 0000000..cccbc14 --- /dev/null +++ b/controllers/admin/AdminTabPacklinkController.php @@ -0,0 +1,25 @@ +link->getAdminLink('AdminModules').'&configure='.$this->module->name.'&tab_module=shipping_logistics&module_name='.$this->module->name); + } +} diff --git a/controllers/admin/index.php b/controllers/admin/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/controllers/admin/index.php @@ -0,0 +1,26 @@ + +* @copyright 2007-2014 PrestaShop SA +* @version Release: $Revision: 7776 $ +* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/controllers/index.php b/controllers/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/controllers/index.php @@ -0,0 +1,26 @@ + -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +* Copyright 2017 OMI Europa S.L (Packlink) -header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at -header('Cache-Control: no-store, no-cache, must-revalidate'); -header('Cache-Control: post-check=0, pre-check=0', false); -header('Pragma: no-cache'); +* http://www.apache.org/licenses/LICENSE-2.0 -header('Location: ../'); -exit; +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/libraries/index.php b/libraries/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/libraries/index.php @@ -0,0 +1,26 @@ +_rewritepages($pages); + } + + $this->_files[] = array($filepath, $pages); + } + else + { + throw new exception("Could not locate PDF on '$filepath'"); + } + + return $this; + } + + /** + * Merges your provided PDFs and outputs to specified location. + * @param $outputmode + * @param $outputname + * @return PDF + */ + public function merge($outputmode = 'browser', $outputpath = 'newfile.pdf') + { + if(!isset($this->_files) || !is_array($this->_files)): throw new exception("No PDFs to merge."); endif; + + $fpdi = new FPDI; + + //merger operations + foreach($this->_files as $file) + { + $filename = $file[0]; + $filepages = $file[1]; + + $count = $fpdi->setSourceFile($filename); + + //add the pages + if($filepages == 'all') + { + for($i=1; $i<=$count; $i++) + { + $template = $fpdi->importPage($i); + $size = $fpdi->getTemplateSize($template); + + $fpdi->AddPage('P', array($size['w'], $size['h'])); + $fpdi->useTemplate($template); + } + } + else + { + foreach($filepages as $page) + { + if(!$template = $fpdi->importPage($page)): throw new exception("Could not load page '$page' in PDF '$filename'. Check that the page exists."); endif; + $size = $fpdi->getTemplateSize($template); + + $fpdi->AddPage('P', array($size['w'], $size['h'])); + $fpdi->useTemplate($template); + } + } + } + + //output operations + $mode = $this->_switchmode($outputmode); + + if($mode == 'S') + { + return $fpdi->Output($outputpath, 'S'); + } + else + { + if($fpdi->Output($outputpath, $mode) !== false) + { + return true; + } + else + { + throw new exception("Error outputting PDF to '$outputmode'."); + return false; + } + } + + + } + + /** + * FPDI uses single characters for specifying the output location. Change our more descriptive string into proper format. + * @param $mode + * @return Character + */ + private function _switchmode($mode) + { + switch(strtolower($mode)) + { + case 'download': + return 'D'; + break; + case 'browser': + return 'I'; + break; + case 'file': + return 'F'; + break; + case 'string': + return 'S'; + break; + default: + return 'I'; + break; + } + } + + /** + * Takes our provided pages in the form of 1,3,4,16-50 and creates an array of all pages + * @param $pages + * @return unknown_type + */ + private function _rewritepages($pages) + { + $pages = str_replace(' ', '', $pages); + $part = explode(',', $pages); + + //parse hyphens + foreach($part as $i) + { + $ind = explode('-', $i); + + if(count($ind) == 2) + { + $x = $ind[0]; //start page + $y = $ind[1]; //end page + + if($x > $y): throw new exception("Starting page, '$x' is greater than ending page '$y'."); return false; endif; + + //add middle pages + while($x <= $y): $newpages[] = (int) $x; $x++; endwhile; + } + else + { + $newpages[] = (int) $ind[0]; + } + } + + return $newpages; + } + +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/fpdf/FAQ.htm b/libraries/sdk/PDFMerger/fpdf/FAQ.htm new file mode 100644 index 0000000..72094a9 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/FAQ.htm @@ -0,0 +1,341 @@ + + + + +FAQ + + + + +

FAQ

+ + + + + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/acceptpagebreak.htm b/libraries/sdk/PDFMerger/fpdf/doc/acceptpagebreak.htm new file mode 100644 index 0000000..e5cd2a4 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/acceptpagebreak.htm @@ -0,0 +1,63 @@ + + + + +AcceptPageBreak + + + +

AcceptPageBreak

+boolean AcceptPageBreak() +

Description

+Whenever a page break condition is met, the method is called, and the break is issued or not +depending on the returned value. The default implementation returns a value according to the +mode selected by SetAutoPageBreak(). +
+This method is called automatically and should not be called directly by the application. +

Example

+The method is overriden in an inherited class in order to obtain a 3 column layout: +
+
class PDF extends FPDF
+{
+var $col=0;
+
+function SetCol($col)
+{
+    //Move position to a column
+    $this->col=$col;
+    $x=10+$col*65;
+    $this->SetLeftMargin($x);
+    $this->SetX($x);
+}
+
+function AcceptPageBreak()
+{
+    if($this->col<2)
+    {
+        //Go to next column
+        $this->SetCol($this->col+1);
+        $this->SetY(10);
+        return false;
+    }
+    else
+    {
+        //Go back to first column and issue page break
+        $this->SetCol(0);
+        return true;
+    }
+}
+}
+
+$pdf=new PDF();
+$pdf->AddPage();
+$pdf->SetFont('Arial','',12);
+for($i=1;$i<=300;$i++)
+    $pdf->Cell(0,5,"Line $i",0,1);
+$pdf->Output();
+
+

See also

+SetAutoPageBreak(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/addfont.htm b/libraries/sdk/PDFMerger/fpdf/doc/addfont.htm new file mode 100644 index 0000000..e14caa6 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/addfont.htm @@ -0,0 +1,55 @@ + + + + +AddFont + + + +

AddFont

+AddFont(string family [, string style [, string file]]) +

Description

+Imports a TrueType or Type1 font and makes it available. It is necessary to generate a font +definition file first with the makefont.php utility. +
+The definition file (and the font file itself when embedding) must be present in the font directory. +If it is not found, the error "Could not include font definition file" is generated. +

Parameters

+
+
family
+
+Font family. The name can be chosen arbitrarily. If it is a standard family name, it will +override the corresponding font. +
+
style
+
+Font style. Possible values are (case insensitive): +
    +
  • empty string: regular
  • +
  • B: bold
  • +
  • I: italic
  • +
  • BI or IB: bold italic
  • +
+The default value is regular. +
+
file
+
+The font definition file. +
+By default, the name is built from the family and style, in lower case with no space. +
+
+

Example

+
+
$pdf->AddFont('Comic','I');
+
+is equivalent to: +
+
$pdf->AddFont('Comic','I','comici.php');
+
+

See also

+SetFont(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/addlink.htm b/libraries/sdk/PDFMerger/fpdf/doc/addlink.htm new file mode 100644 index 0000000..35c666d --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/addlink.htm @@ -0,0 +1,26 @@ + + + + +AddLink + + + +

AddLink

+int AddLink() +

Description

+Creates a new internal link and returns its identifier. An internal link is a clickable area +which directs to another place within the document. +
+The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is +defined with SetLink(). +

See also

+Cell(), +Write(), +Image(), +Link(), +SetLink(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/addpage.htm b/libraries/sdk/PDFMerger/fpdf/doc/addpage.htm new file mode 100644 index 0000000..692c5cc --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/addpage.htm @@ -0,0 +1,56 @@ + + + + +AddPage + + + +

AddPage

+AddPage([string orientation ,[ mixed format]]) +

Description

+Adds a new page to the document. If a page is already present, the Footer() method is called +first to output the footer. Then the page is added, the current position set to the top-left +corner according to the left and top margins, and Header() is called to display the header. +
+The font which was set before calling is automatically restored. There is no need to call +SetFont() again if you want to continue with the same font. The same is true for colors and +line width. +
+The origin of the coordinate system is at the top-left corner and increasing ordinates go +downwards. +

Parameters

+
+
orientation
+
+Page orientation. Possible values are (case insensitive): +
    +
  • P or Portrait
  • +
  • L or Landscape
  • +
+The default value is the one passed to the constructor. +
+
format
+
+Page format. It can be either one of the following values (case insensitive): +
    +
  • A3
  • +
  • A4
  • +
  • A5
  • +
  • Letter
  • +
  • Legal
  • +
+or an array containing the width and the height (expressed in user unit).
+
+The default value is the one passed to the constructor. +
+
+

See also

+FPDF(), +Header(), +Footer(), +SetMargins(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/aliasnbpages.htm b/libraries/sdk/PDFMerger/fpdf/doc/aliasnbpages.htm new file mode 100644 index 0000000..364a2b1 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/aliasnbpages.htm @@ -0,0 +1,45 @@ + + + + +AliasNbPages + + + +

AliasNbPages

+AliasNbPages([string alias]) +

Description

+Defines an alias for the total number of pages. It will be substituted as the document is +closed. +

Parameters

+
+
alias
+
+The alias. Default value: {nb}. +
+
+

Example

+
+
class PDF extends FPDF
+{
+function Footer()
+{
+    //Go to 1.5 cm from bottom
+    $this->SetY(-15);
+    //Select Arial italic 8
+    $this->SetFont('Arial','I',8);
+    //Print current and total page numbers
+    $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
+}
+}
+
+$pdf=new PDF();
+$pdf->AliasNbPages();
+
+

See also

+PageNo(), +Footer(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/cell.htm b/libraries/sdk/PDFMerger/fpdf/doc/cell.htm new file mode 100644 index 0000000..9fadf94 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/cell.htm @@ -0,0 +1,104 @@ + + + + +Cell + + + +

Cell

+Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]]) +

Description

+Prints a cell (rectangular area) with optional borders, background color and character string. +The upper-left corner of the cell corresponds to the current position. The text can be aligned +or centered. After the call, the current position moves to the right or to the next line. It is +possible to put a link on the text. +
+If automatic page breaking is enabled and the cell goes beyond the limit, a page break is +done before outputting. +

Parameters

+
+
w
+
+Cell width. If 0, the cell extends up to the right margin. +
+
h
+
+Cell height. +Default value: 0. +
+
txt
+
+String to print. +Default value: empty string. +
+
border
+
+Indicates if borders must be drawn around the cell. The value can be either a number: +
    +
  • 0: no border
  • +
  • 1: frame
  • +
+or a string containing some or all of the following characters (in any order): +
    +
  • L: left
  • +
  • T: top
  • +
  • R: right
  • +
  • B: bottom
  • +
+Default value: 0. +
+
ln
+
+Indicates where the current position should go after the call. Possible values are: +
    +
  • 0: to the right
  • +
  • 1: to the beginning of the next line
  • +
  • 2: below
  • +
+Putting 1 is equivalent to putting 0 and calling Ln() just after. +Default value: 0. +
+
align
+
+Allows to center or align the text. Possible values are: +
    +
  • L or empty string: left align (default value)
  • +
  • C: center
  • +
  • R: right align
  • +
+
+
fill
+
+Indicates if the cell background must be painted (true) or transparent (false). +Default value: false. +
+
link
+
+URL or identifier returned by AddLink(). +
+
+

Example

+
+
//Set font
+$pdf->SetFont('Arial','B',16);
+//Move to 8 cm to the right
+$pdf->Cell(80);
+//Centered text in a framed 20*10 mm cell and line break
+$pdf->Cell(20,10,'Title',1,1,'C');
+
+

See also

+SetFont(), +SetDrawColor(), +SetFillColor(), +SetTextColor(), +SetLineWidth(), +AddLink(), +Ln(), +MultiCell(), +Write(), +SetAutoPageBreak(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/close.htm b/libraries/sdk/PDFMerger/fpdf/doc/close.htm new file mode 100644 index 0000000..d21f881 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/close.htm @@ -0,0 +1,21 @@ + + + + +Close + + + +

Close

+Close() +

Description

+Terminates the PDF document. It is not necessary to call this method explicitly because Output() +does it automatically. +
+If the document contains no page, AddPage() is called to prevent from getting an invalid document. +

See also

+Output(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/error.htm b/libraries/sdk/PDFMerger/fpdf/doc/error.htm new file mode 100644 index 0000000..e0097c2 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/error.htm @@ -0,0 +1,25 @@ + + + + +Error + + + +

Error

+Error(string msg) +

Description

+This method is automatically called in case of fatal error; it simply outputs the message +and halts the execution. An inherited class may override it to customize the error handling +but should always halt the script, or the resulting document would probably be invalid. +

Parameters

+
+
msg
+
+The error message. +
+
+
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/footer.htm b/libraries/sdk/PDFMerger/fpdf/doc/footer.htm new file mode 100644 index 0000000..a0f4a13 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/footer.htm @@ -0,0 +1,35 @@ + + + + +Footer + + + +

Footer

+Footer() +

Description

+This method is used to render the page footer. It is automatically called by AddPage() and +Close() and should not be called directly by the application. The implementation in FPDF is +empty, so you have to subclass it and override the method if you want a specific processing. +

Example

+
+
class PDF extends FPDF
+{
+function Footer()
+{
+    //Go to 1.5 cm from bottom
+    $this->SetY(-15);
+    //Select Arial italic 8
+    $this->SetFont('Arial','I',8);
+    //Print centered page number
+    $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
+}
+}
+
+

See also

+Header(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/fpdf.htm b/libraries/sdk/PDFMerger/fpdf/doc/fpdf.htm new file mode 100644 index 0000000..0b2ab4a --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/fpdf.htm @@ -0,0 +1,63 @@ + + + + +FPDF + + + +

FPDF

+FPDF([string orientation [, string unit [, mixed format]]]) +

Description

+This is the class constructor. It allows to set up the page format, the orientation and the +unit of measure used in all methods (except for font sizes). +

Parameters

+
+
orientation
+
+Default page orientation. Possible values are (case insensitive): +
    +
  • P or Portrait
  • +
  • L or Landscape
  • +
+Default value is P. +
+
unit
+
+User unit. Possible values are: +
    +
  • pt: point
  • +
  • mm: millimeter
  • +
  • cm: centimeter
  • +
  • in: inch
  • +
+A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This +is a very common unit in typography; font sizes are expressed in that unit. +
+
+Default value is mm. +
+
format
+
+The format used for pages. It can be either one of the following values (case insensitive): +
    +
  • A3
  • +
  • A4
  • +
  • A5
  • +
  • Letter
  • +
  • Legal
  • +
+or an array containing the width and the height (expressed in the unit given by unit).
+
+Default value is A4. +
+
+

Example

+Example with a custom 100x150 mm page format: +
+
$pdf = new FPDF('P', 'mm', array(100,150));
+
+
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/getstringwidth.htm b/libraries/sdk/PDFMerger/fpdf/doc/getstringwidth.htm new file mode 100644 index 0000000..38b4875 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/getstringwidth.htm @@ -0,0 +1,23 @@ + + + + +GetStringWidth + + + +

GetStringWidth

+float GetStringWidth(string s) +

Description

+Returns the length of a string in user unit. A font must be selected. +

Parameters

+
+
s
+
+The string whose length is to be computed. +
+
+
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/getx.htm b/libraries/sdk/PDFMerger/fpdf/doc/getx.htm new file mode 100644 index 0000000..401447e --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/getx.htm @@ -0,0 +1,20 @@ + + + + +GetX + + + +

GetX

+float GetX() +

Description

+Returns the abscissa of the current position. +

See also

+SetX(), +GetY(), +SetY(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/gety.htm b/libraries/sdk/PDFMerger/fpdf/doc/gety.htm new file mode 100644 index 0000000..bee0526 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/gety.htm @@ -0,0 +1,20 @@ + + + + +GetY + + + +

GetY

+float GetY() +

Description

+Returns the ordinate of the current position. +

See also

+SetY(), +GetX(), +SetX(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/header.htm b/libraries/sdk/PDFMerger/fpdf/doc/header.htm new file mode 100644 index 0000000..d172dc7 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/header.htm @@ -0,0 +1,37 @@ + + + + +Header + + + +

Header

+Header() +

Description

+This method is used to render the page header. It is automatically called by AddPage() and +should not be called directly by the application. The implementation in FPDF is empty, so +you have to subclass it and override the method if you want a specific processing. +

Example

+
+
class PDF extends FPDF
+{
+function Header()
+{
+    //Select Arial bold 15
+    $this->SetFont('Arial','B',15);
+    //Move to the right
+    $this->Cell(80);
+    //Framed title
+    $this->Cell(30,10,'Title',1,0,'C');
+    //Line break
+    $this->Ln(20);
+}
+}
+
+

See also

+Footer(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/image.htm b/libraries/sdk/PDFMerger/fpdf/doc/image.htm new file mode 100644 index 0000000..40c3029 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/image.htm @@ -0,0 +1,86 @@ + + + + +Image + + + +

Image

+Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]]) +

Description

+Puts an image. The size it will take on the page can be specified in different ways: + +Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF. +
+
+For JPEGs, all flavors are allowed: + +For PNGs, are allowed: + +but are not supported: + +For GIFs: in case of an animated GIF, only the first frame is used.
+
+If a transparent color is defined, it is taken into account.
+
+The format can be specified explicitly or inferred from the file extension.
+It is possible to put a link on the image.
+
+Remark: if an image is used several times, only one copy is embedded in the file. +

Parameters

+
+
file
+
+Path or URL of the image. +
+
x
+
+Abscissa of the upper-left corner. If not specified or equal to null, the current abscissa +is used. +
+
y
+
+Ordinate of the upper-left corner. If not specified or equal to null, the current ordinate +is used; moreover, a page break is triggered first if necessary (in case automatic page breaking is enabled) +and, after the call, the current ordinate is moved to the bottom of the image. +
+
w
+
+Width of the image in the page. If not specified or equal to zero, it is automatically calculated. +
+
h
+
+Height of the image in the page. If not specified or equal to zero, it is automatically calculated. +
+
type
+
+Image format. Possible values are (case insensitive): JPG, JPEG, PNG and GIF. +If not specified, the type is inferred from the file extension. +
+
link
+
+URL or identifier returned by AddLink(). +
+
+

See also

+AddLink(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/index.htm b/libraries/sdk/PDFMerger/fpdf/doc/index.htm new file mode 100644 index 0000000..e320c5a --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/index.htm @@ -0,0 +1,57 @@ + + + + +FPDF 1.6 Reference Manual + + + +

FPDF 1.6 Reference Manual

+AcceptPageBreak - accept or not automatic page break
+AddFont - add a new font
+AddLink - create an internal link
+AddPage - add a new page
+AliasNbPages - define an alias for number of pages
+Cell - print a cell
+Close - terminate the document
+Error - fatal error
+Footer - page footer
+FPDF - constructor
+GetStringWidth - compute string length
+GetX - get current x position
+GetY - get current y position
+Header - page header
+Image - output an image
+Line - draw a line
+Link - put a link
+Ln - line break
+MultiCell - print text with line breaks
+Output - save or send the document
+PageNo - page number
+Rect - draw a rectangle
+SetAuthor - set the document author
+SetAutoPageBreak - set the automatic page breaking mode
+SetCompression - turn compression on or off
+SetCreator - set document creator
+SetDisplayMode - set display mode
+SetDrawColor - set drawing color
+SetFillColor - set filling color
+SetFont - set font
+SetFontSize - set font size
+SetKeywords - associate keywords with document
+SetLeftMargin - set left margin
+SetLineWidth - set line width
+SetLink - set internal link destination
+SetMargins - set margins
+SetRightMargin - set right margin
+SetSubject - set document subject
+SetTextColor - set text color
+SetTitle - set document title
+SetTopMargin - set top margin
+SetX - set current x position
+SetXY - set current x and y positions
+SetY - set current y position
+Text - print a string
+Write - print flowing text
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/index.php b/libraries/sdk/PDFMerger/fpdf/doc/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/index.php @@ -0,0 +1,26 @@ + + + + +Line + + + +

Line

+Line(float x1, float y1, float x2, float y2) +

Description

+Draws a line between two points. +

Parameters

+
+
x1
+
+Abscissa of first point. +
+
y1
+
+Ordinate of first point. +
+
x2
+
+Abscissa of second point. +
+
y2
+
+Ordinate of second point. +
+
+

See also

+SetLineWidth(), +SetDrawColor(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/link.htm b/libraries/sdk/PDFMerger/fpdf/doc/link.htm new file mode 100644 index 0000000..66f28d6 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/link.htm @@ -0,0 +1,46 @@ + + + + +Link + + + +

Link

+Link(float x, float y, float w, float h, mixed link) +

Description

+Puts a link on a rectangular area of the page. Text or image links are generally put via Cell(), +Write() or Image(), but this method can be useful for instance to define a clickable area inside +an image. +

Parameters

+
+
x
+
+Abscissa of the upper-left corner of the rectangle. +
+
y
+
+Ordinate of the upper-left corner of the rectangle. +
+
w
+
+Width of the rectangle. +
+
h
+
+Height of the rectangle. +
+
link
+
+URL or identifier returned by AddLink(). +
+
+

See also

+AddLink(), +Cell(), +Write(), +Image(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/ln.htm b/libraries/sdk/PDFMerger/fpdf/doc/ln.htm new file mode 100644 index 0000000..6778204 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/ln.htm @@ -0,0 +1,28 @@ + + + + +Ln + + + +

Ln

+Ln([float h]) +

Description

+Performs a line break. The current abscissa goes back to the left margin and the ordinate +increases by the amount passed in parameter. +

Parameters

+
+
h
+
+The height of the break. +
+By default, the value equals the height of the last printed cell. +
+
+

See also

+Cell(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/multicell.htm b/libraries/sdk/PDFMerger/fpdf/doc/multicell.htm new file mode 100644 index 0000000..5c3543f --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/multicell.htm @@ -0,0 +1,76 @@ + + + + +MultiCell + + + +

MultiCell

+MultiCell(float w, float h, string txt [, mixed border [, string align [, boolean fill]]]) +

Description

+This method allows printing text with line breaks. They can be automatic (as soon as the +text reaches the right border of the cell) or explicit (via the \n character). As many cells +as necessary are output, one below the other. +
+Text can be aligned, centered or justified. The cell block can be framed and the background +painted. +

Parameters

+
+
w
+
+Width of cells. If 0, they extend up to the right margin of the page. +
+
h
+
+Height of cells. +
+
txt
+
+String to print. +
+
border
+
+Indicates if borders must be drawn around the cell block. The value can be either a number: +
    +
  • 0: no border
  • +
  • 1: frame
  • +
+or a string containing some or all of the following characters (in any order): +
    +
  • L: left
  • +
  • T: top
  • +
  • R: right
  • +
  • B: bottom
  • +
+Default value: 0. +
+
align
+
+Sets the text alignment. Possible values are: +
    +
  • L: left alignment
  • +
  • C: center
  • +
  • R: right alignment
  • +
  • J: justification (default value)
  • +
+
+
fill
+
+Indicates if the cell background must be painted (true) or transparent (false). +Default value: false. +
+
+

See also

+SetFont(), +SetDrawColor(), +SetFillColor(), +SetTextColor(), +SetLineWidth(), +Cell(), +Write(), +SetAutoPageBreak(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/output.htm b/libraries/sdk/PDFMerger/fpdf/doc/output.htm new file mode 100644 index 0000000..f627b82 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/output.htm @@ -0,0 +1,42 @@ + + + + +Output + + + +

Output

+string Output([string name, string dest]) +

Description

+Send the document to a given destination: browser, file or string. In the case of browser, the +plug-in may be used (if present) or a download ("Save as" dialog box) may be forced. +
+The method first calls Close() if necessary to terminate the document. +

Parameters

+
+
name
+
+The name of the file. If not specified, the document will be sent to the browser +(destination I) with the name doc.pdf. +
+
dest
+
+Destination where to send the document. It can take one of the following values: +
    +
  • I: send the file inline to the browser. The plug-in is used if available. +The name given by name is used when one selects the "Save as" option on the +link generating the PDF.
  • +
  • D: send to the browser and force a file download with the name given by +name.
  • +
  • F: save to a local file with the name given by name (may include a path).
  • +
  • S: return the document as a string. name is ignored.
  • +
+
+
+

See also

+Close(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/pageno.htm b/libraries/sdk/PDFMerger/fpdf/doc/pageno.htm new file mode 100644 index 0000000..c917d66 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/pageno.htm @@ -0,0 +1,18 @@ + + + + +PageNo + + + +

PageNo

+int PageNo() +

Description

+Returns the current page number. +

See also

+AliasNbPages(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/rect.htm b/libraries/sdk/PDFMerger/fpdf/doc/rect.htm new file mode 100644 index 0000000..ab3d017 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/rect.htm @@ -0,0 +1,48 @@ + + + + +Rect + + + +

Rect

+Rect(float x, float y, float w, float h [, string style]) +

Description

+Outputs a rectangle. It can be drawn (border only), filled (with no border) or both. +

Parameters

+
+
x
+
+Abscissa of upper-left corner. +
+
y
+
+Ordinate of upper-left corner. +
+
w
+
+Width. +
+
h
+
+Height. +
+
style
+
+Style of rendering. Possible values are: +
    +
  • D or empty string: draw. This is the default value.
  • +
  • F: fill
  • +
  • DF or FD: draw and fill
  • +
+
+
+

See also

+SetLineWidth(), +SetDrawColor(), +SetFillColor(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setauthor.htm b/libraries/sdk/PDFMerger/fpdf/doc/setauthor.htm new file mode 100644 index 0000000..6cb3754 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setauthor.htm @@ -0,0 +1,33 @@ + + + + +SetAuthor + + + +

SetAuthor

+SetAuthor(string author [, boolean isUTF8]) +

Description

+Defines the author of the document. +

Parameters

+
+
author
+
+The name of the author. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetCreator(), +SetKeywords(), +SetSubject(), +SetTitle(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setautopagebreak.htm b/libraries/sdk/PDFMerger/fpdf/doc/setautopagebreak.htm new file mode 100644 index 0000000..80291a2 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setautopagebreak.htm @@ -0,0 +1,33 @@ + + + + +SetAutoPageBreak + + + +

SetAutoPageBreak

+SetAutoPageBreak(boolean auto [, float margin]) +

Description

+Enables or disables the automatic page breaking mode. When enabling, the second parameter is +the distance from the bottom of the page that defines the triggering limit. By default, the +mode is on and the margin is 2 cm. +

Parameters

+
+
auto
+
+Boolean indicating if mode should be on or off. +
+
margin
+
+Distance from the bottom of the page. +
+
+

See also

+Cell(), +MultiCell(), +AcceptPageBreak(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setcompression.htm b/libraries/sdk/PDFMerger/fpdf/doc/setcompression.htm new file mode 100644 index 0000000..ec506d9 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setcompression.htm @@ -0,0 +1,31 @@ + + + + +SetCompression + + + +

SetCompression

+SetCompression(boolean compress) +

Description

+Activates or deactivates page compression. When activated, the internal representation of +each page is compressed, which leads to a compression ratio of about 2 for the resulting +document. +
+Compression is on by default. +
+
+Note: the Zlib extension is required for this feature. If not present, compression +will be turned off. +

Parameters

+
+
compress
+
+Boolean indicating if compression must be enabled. +
+
+
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setcreator.htm b/libraries/sdk/PDFMerger/fpdf/doc/setcreator.htm new file mode 100644 index 0000000..19f820c --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setcreator.htm @@ -0,0 +1,34 @@ + + + + +SetCreator + + + +

SetCreator

+SetCreator(string creator [, boolean isUTF8]) +

Description

+Defines the creator of the document. This is typically the name of the application that +generates the PDF. +

Parameters

+
+
creator
+
+The name of the creator. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetAuthor(), +SetKeywords(), +SetSubject(), +SetTitle(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setdisplaymode.htm b/libraries/sdk/PDFMerger/fpdf/doc/setdisplaymode.htm new file mode 100644 index 0000000..99854be --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setdisplaymode.htm @@ -0,0 +1,47 @@ + + + + +SetDisplayMode + + + +

SetDisplayMode

+SetDisplayMode(mixed zoom [, string layout]) +

Description

+Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be +displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a +specific zooming factor or use viewer default (configured in the Preferences menu of Acrobat). +The page layout can be specified too: single at once, continuous display, two columns or viewer +default. +
+By default, documents use the full width mode with continuous display. +

Parameters

+
+
zoom
+
+The zoom to use. It can be one of the following string values: +
    +
  • fullpage: displays the entire page on screen
  • +
  • fullwidth: uses maximum width of window
  • +
  • real: uses real size (equivalent to 100% zoom)
  • +
  • default: uses viewer default mode
  • +
+or a number indicating the zooming factor to use. +
+
layout
+
+The page layout. Possible values are: +
    +
  • single: displays one page at once
  • +
  • continuous: displays pages continuously
  • +
  • two: displays two pages on two columns
  • +
  • default: uses viewer default mode
  • +
+Default value is continuous. +
+
+
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setdrawcolor.htm b/libraries/sdk/PDFMerger/fpdf/doc/setdrawcolor.htm new file mode 100644 index 0000000..1a6c736 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setdrawcolor.htm @@ -0,0 +1,41 @@ + + + + +SetDrawColor + + + +

SetDrawColor

+SetDrawColor(int r [, int g, int b]) +

Description

+Defines the color used for all drawing operations (lines, rectangles and cell borders). It +can be expressed in RGB components or gray scale. The method can be called before the first +page is created and the value is retained from page to page. +

Parameters

+
+
r
+
+If g et b are given, red component; if not, indicates the gray level. +Value between 0 and 255. +
+
g
+
+Green component (between 0 and 255). +
+
b
+
+Blue component (between 0 and 255). +
+
+

See also

+SetFillColor(), +SetTextColor(), +Line(), +Rect(), +Cell(), +MultiCell(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setfillcolor.htm b/libraries/sdk/PDFMerger/fpdf/doc/setfillcolor.htm new file mode 100644 index 0000000..76f8660 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setfillcolor.htm @@ -0,0 +1,40 @@ + + + + +SetFillColor + + + +

SetFillColor

+SetFillColor(int r [, int g, int b]) +

Description

+Defines the color used for all filling operations (filled rectangles and cell backgrounds). +It can be expressed in RGB components or gray scale. The method can be called before the first +page is created and the value is retained from page to page. +

Parameters

+
+
r
+
+If g and b are given, red component; if not, indicates the gray level. +Value between 0 and 255. +
+
g
+
+Green component (between 0 and 255). +
+
b
+
+Blue component (between 0 and 255). +
+
+

See also

+SetDrawColor(), +SetTextColor(), +Rect(), +Cell(), +MultiCell(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setfont.htm b/libraries/sdk/PDFMerger/fpdf/doc/setfont.htm new file mode 100644 index 0000000..c0d35be --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setfont.htm @@ -0,0 +1,92 @@ + + + + +SetFont + + + +

SetFont

+SetFont(string family [, string style [, float size]]) +

Description

+Sets the font used to print character strings. It is mandatory to call this method +at least once before printing text or the resulting document would not be valid. +
+The font can be either a standard one or a font added via the AddFont() method. Standard fonts +use Windows encoding cp1252 (Western Europe). +
+The method can be called before the first page is created and the font is retained from page +to page. +
+If you just wish to change the current font size, it is simpler to call SetFontSize(). +
+
+Note: the font metric files must be accessible. They are searched successively in: + +Example defining FPDF_FONTPATH (note the mandatory trailing slash): +
+
define('FPDF_FONTPATH','/home/www/font/');
+require('fpdf.php');
+
+If the file corresponding to the requested font is not found, the error "Could not include +font metric file" is issued. +

Parameters

+
+
family
+
+Family font. It can be either a name defined by AddFont() or one of the standard families (case +insensitive): +
    +
  • Courier (fixed-width)
  • +
  • Helvetica or Arial (synonymous; sans serif)
  • +
  • Times (serif)
  • +
  • Symbol (symbolic)
  • +
  • ZapfDingbats (symbolic)
  • +
+It is also possible to pass an empty string. In that case, the current family is retained. +
+
style
+
+Font style. Possible values are (case insensitive): +
    +
  • empty string: regular
  • +
  • B: bold
  • +
  • I: italic
  • +
  • U: underline
  • +
+or any combination. The default value is regular. +Bold and italic styles do not apply to Symbol and ZapfDingbats. +
+
size
+
+Font size in points. +
+The default value is the current size. If no size has been specified since the beginning of +the document, the value taken is 12. +
+
+

Example

+
+
//Times regular 12
+$pdf->SetFont('Times');
+//Arial bold 14
+$pdf->SetFont('Arial','B',14);
+//Removes bold
+$pdf->SetFont('');
+//Times bold, italic and underlined 14
+$pdf->SetFont('Times','BIU');
+
+

See also

+AddFont(), +SetFontSize(), +Cell(), +MultiCell(), +Write(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setfontsize.htm b/libraries/sdk/PDFMerger/fpdf/doc/setfontsize.htm new file mode 100644 index 0000000..54fd899 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setfontsize.htm @@ -0,0 +1,25 @@ + + + + +SetFontSize + + + +

SetFontSize

+SetFontSize(float size) +

Description

+Defines the size of the current font. +

Parameters

+
+
size
+
+The size (in points). +
+
+

See also

+SetFont(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setkeywords.htm b/libraries/sdk/PDFMerger/fpdf/doc/setkeywords.htm new file mode 100644 index 0000000..02eb466 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setkeywords.htm @@ -0,0 +1,33 @@ + + + + +SetKeywords + + + +

SetKeywords

+SetKeywords(string keywords [, boolean isUTF8]) +

Description

+Associates keywords with the document, generally in the form 'keyword1 keyword2 ...'. +

Parameters

+
+
keywords
+
+The list of keywords. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetAuthor(), +SetCreator(), +SetSubject(), +SetTitle(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setleftmargin.htm b/libraries/sdk/PDFMerger/fpdf/doc/setleftmargin.htm new file mode 100644 index 0000000..500c17a --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setleftmargin.htm @@ -0,0 +1,30 @@ + + + + +SetLeftMargin + + + +

SetLeftMargin

+SetLeftMargin(float margin) +

Description

+Defines the left margin. The method can be called before creating the first page. +
+If the current abscissa gets out of page, it is brought back to the margin. +

Parameters

+
+
margin
+
+The margin. +
+
+

See also

+SetTopMargin(), +SetRightMargin(), +SetAutoPageBreak(), +SetMargins(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setlinewidth.htm b/libraries/sdk/PDFMerger/fpdf/doc/setlinewidth.htm new file mode 100644 index 0000000..fa15b7d --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setlinewidth.htm @@ -0,0 +1,29 @@ + + + + +SetLineWidth + + + +

SetLineWidth

+SetLineWidth(float width) +

Description

+Defines the line width. By default, the value equals 0.2 mm. The method can be called before +the first page is created and the value is retained from page to page. +

Parameters

+
+
width
+
+The width. +
+
+

See also

+Line(), +Rect(), +Cell(), +MultiCell(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setlink.htm b/libraries/sdk/PDFMerger/fpdf/doc/setlink.htm new file mode 100644 index 0000000..654c25e --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setlink.htm @@ -0,0 +1,34 @@ + + + + +SetLink + + + +

SetLink

+SetLink(int link [, float y [, int page]]) +

Description

+Defines the page and position a link points to. +

Parameters

+
+
link
+
+The link identifier returned by AddLink(). +
+
y
+
+Ordinate of target position; -1 indicates the current position. +The default value is 0 (top of page). +
+
page
+
+Number of target page; -1 indicates the current page. This is the default value. +
+
+

See also

+AddLink(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setmargins.htm b/libraries/sdk/PDFMerger/fpdf/doc/setmargins.htm new file mode 100644 index 0000000..eaa1701 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setmargins.htm @@ -0,0 +1,37 @@ + + + + +SetMargins + + + +

SetMargins

+SetMargins(float left, float top [, float right]) +

Description

+Defines the left, top and right margins. By default, they equal 1 cm. Call this method to change +them. +

Parameters

+
+
left
+
+Left margin. +
+
top
+
+Top margin. +
+
right
+
+Right margin. Default value is the left one. +
+
+

See also

+SetLeftMargin(), +SetTopMargin(), +SetRightMargin(), +SetAutoPageBreak(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setrightmargin.htm b/libraries/sdk/PDFMerger/fpdf/doc/setrightmargin.htm new file mode 100644 index 0000000..ef0d942 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setrightmargin.htm @@ -0,0 +1,28 @@ + + + + +SetRightMargin + + + +

SetRightMargin

+SetRightMargin(float margin) +

Description

+Defines the right margin. The method can be called before creating the first page. +

Parameters

+
+
margin
+
+The margin. +
+
+

See also

+SetLeftMargin(), +SetTopMargin(), +SetAutoPageBreak(), +SetMargins(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setsubject.htm b/libraries/sdk/PDFMerger/fpdf/doc/setsubject.htm new file mode 100644 index 0000000..64a27d8 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setsubject.htm @@ -0,0 +1,33 @@ + + + + +SetSubject + + + +

SetSubject

+SetSubject(string subject [, boolean isUTF8]) +

Description

+Defines the subject of the document. +

Parameters

+
+
subject
+
+The subject. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetAuthor(), +SetCreator(), +SetKeywords(), +SetTitle(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/settextcolor.htm b/libraries/sdk/PDFMerger/fpdf/doc/settextcolor.htm new file mode 100644 index 0000000..1772712 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/settextcolor.htm @@ -0,0 +1,40 @@ + + + + +SetTextColor + + + +

SetTextColor

+SetTextColor(int r [, int g, int b]) +

Description

+Defines the color used for text. It can be expressed in RGB components or gray scale. The +method can be called before the first page is created and the value is retained from page to +page. +

Parameters

+
+
r
+
+If g et b are given, red component; if not, indicates the gray level. +Value between 0 and 255. +
+
g
+
+Green component (between 0 and 255). +
+
b
+
+Blue component (between 0 and 255). +
+
+

See also

+SetDrawColor(), +SetFillColor(), +Text(), +Cell(), +MultiCell(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/settitle.htm b/libraries/sdk/PDFMerger/fpdf/doc/settitle.htm new file mode 100644 index 0000000..741f4c6 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/settitle.htm @@ -0,0 +1,33 @@ + + + + +SetTitle + + + +

SetTitle

+SetTitle(string title [, boolean isUTF8]) +

Description

+Defines the title of the document. +

Parameters

+
+
title
+
+The title. +
+
isUTF8
+
+Indicates if the string is encoded in ISO-8859-1 (false) or UTF-8 (true).
+Default value: false. +
+
+

See also

+SetAuthor(), +SetCreator(), +SetKeywords(), +SetSubject(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/settopmargin.htm b/libraries/sdk/PDFMerger/fpdf/doc/settopmargin.htm new file mode 100644 index 0000000..99339fc --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/settopmargin.htm @@ -0,0 +1,28 @@ + + + + +SetTopMargin + + + +

SetTopMargin

+SetTopMargin(float margin) +

Description

+Defines the top margin. The method can be called before creating the first page. +

Parameters

+
+
margin
+
+The margin. +
+
+

See also

+SetLeftMargin(), +SetRightMargin(), +SetAutoPageBreak(), +SetMargins(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setx.htm b/libraries/sdk/PDFMerger/fpdf/doc/setx.htm new file mode 100644 index 0000000..9336d76 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setx.htm @@ -0,0 +1,29 @@ + + + + +SetX + + + +

SetX

+SetX(float x) +

Description

+Defines the abscissa of the current position. If the passed value is negative, it is relative +to the right of the page. +

Parameters

+
+
x
+
+The value of the abscissa. +
+
+

See also

+GetX(), +GetY(), +SetY(), +SetXY(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/setxy.htm b/libraries/sdk/PDFMerger/fpdf/doc/setxy.htm new file mode 100644 index 0000000..7e62fe3 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/setxy.htm @@ -0,0 +1,31 @@ + + + + +SetXY + + + +

SetXY

+SetXY(float x, float y) +

Description

+Defines the abscissa and ordinate of the current position. If the passed values are negative, +they are relative respectively to the right and bottom of the page. +

Parameters

+
+
x
+
+The value of the abscissa. +
+
y
+
+The value of the ordinate. +
+
+

See also

+SetX(), +SetY(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/sety.htm b/libraries/sdk/PDFMerger/fpdf/doc/sety.htm new file mode 100644 index 0000000..37435f6 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/sety.htm @@ -0,0 +1,29 @@ + + + + +SetY + + + +

SetY

+SetY(float y) +

Description

+Moves the current abscissa back to the left margin and sets the ordinate. If the passed value +is negative, it is relative to the bottom of the page. +

Parameters

+
+
y
+
+The value of the ordinate. +
+
+

See also

+GetX(), +GetY(), +SetX(), +SetXY(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/text.htm b/libraries/sdk/PDFMerger/fpdf/doc/text.htm new file mode 100644 index 0000000..c79fa2d --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/text.htm @@ -0,0 +1,39 @@ + + + + +Text + + + +

Text

+Text(float x, float y, string txt) +

Description

+Prints a character string. The origin is on the left of the first character, on the baseline. +This method allows to place a string precisely on the page, but it is usually easier to use +Cell(), MultiCell() or Write() which are the standard methods to print text. +

Parameters

+
+
x
+
+Abscissa of the origin. +
+
y
+
+Ordinate of the origin. +
+
txt
+
+String to print. +
+
+

See also

+SetFont(), +SetTextColor(), +Cell(), +MultiCell(), +Write(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/doc/write.htm b/libraries/sdk/PDFMerger/fpdf/doc/write.htm new file mode 100644 index 0000000..cf93b41 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/doc/write.htm @@ -0,0 +1,51 @@ + + + + +Write + + + +

Write

+Write(float h, string txt [, mixed link]) +

Description

+This method prints text from the current position. When the right margin is reached (or the \n +character is met) a line break occurs and text continues from the left margin. Upon method exit, +the current position is left just at the end of the text. +
+It is possible to put a link on the text. +

Parameters

+
+
h
+
+Line height. +
+
txt
+
+String to print. +
+
link
+
+URL or identifier returned by AddLink(). +
+
+

Example

+
+
//Begin with regular font
+$pdf->SetFont('Arial','',14);
+$pdf->Write(5,'Visit ');
+//Then put a blue underlined link
+$pdf->SetTextColor(0,0,255);
+$pdf->SetFont('','U');
+$pdf->Write(5,'www.fpdf.org','http://www.fpdf.org');
+
+

See also

+SetFont(), +SetTextColor(), +AddLink(), +MultiCell(), +SetAutoPageBreak(). +
+
Index
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/font/courier.php b/libraries/sdk/PDFMerger/fpdf/font/courier.php new file mode 100644 index 0000000..4c009f3 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/courier.php @@ -0,0 +1,7 @@ + diff --git a/libraries/sdk/PDFMerger/fpdf/font/desktop.ini b/libraries/sdk/PDFMerger/fpdf/font/desktop.ini new file mode 100644 index 0000000..c5547ea --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/desktop.ini @@ -0,0 +1,4 @@ +[ViewState] +Mode= +Vid= +FolderType=NotSpecified diff --git a/libraries/sdk/PDFMerger/fpdf/font/helvetica.php b/libraries/sdk/PDFMerger/fpdf/font/helvetica.php new file mode 100644 index 0000000..8fa7683 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/helvetica.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, + 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, + chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, + chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/helveticab.php b/libraries/sdk/PDFMerger/fpdf/font/helveticab.php new file mode 100644 index 0000000..a8473c9 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/helveticab.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, + 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, + 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, + chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, + chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/helveticabi.php b/libraries/sdk/PDFMerger/fpdf/font/helveticabi.php new file mode 100644 index 0000000..4137953 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/helveticabi.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>333,'"'=>474,'#'=>556,'$'=>556,'%'=>889,'&'=>722,'\''=>238,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>333,';'=>333,'<'=>584,'='=>584,'>'=>584,'?'=>611,'@'=>975,'A'=>722, + 'B'=>722,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>556,'K'=>722,'L'=>611,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>584,'_'=>556,'`'=>333,'a'=>556,'b'=>611,'c'=>556,'d'=>611,'e'=>556,'f'=>333,'g'=>611,'h'=>611,'i'=>278,'j'=>278,'k'=>556,'l'=>278,'m'=>889, + 'n'=>611,'o'=>611,'p'=>611,'q'=>611,'r'=>389,'s'=>556,'t'=>333,'u'=>611,'v'=>556,'w'=>778,'x'=>556,'y'=>556,'z'=>500,'{'=>389,'|'=>280,'}'=>389,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>278,chr(131)=>556, + chr(132)=>500,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>278,chr(146)=>278,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>556,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>280,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>611,chr(182)=>556,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>556,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>611,chr(241)=>611, + chr(242)=>611,chr(243)=>611,chr(244)=>611,chr(245)=>611,chr(246)=>611,chr(247)=>584,chr(248)=>611,chr(249)=>611,chr(250)=>611,chr(251)=>611,chr(252)=>611,chr(253)=>556,chr(254)=>611,chr(255)=>556); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/helveticai.php b/libraries/sdk/PDFMerger/fpdf/font/helveticai.php new file mode 100644 index 0000000..d5bb6e0 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/helveticai.php @@ -0,0 +1,15 @@ +278,chr(1)=>278,chr(2)=>278,chr(3)=>278,chr(4)=>278,chr(5)=>278,chr(6)=>278,chr(7)=>278,chr(8)=>278,chr(9)=>278,chr(10)=>278,chr(11)=>278,chr(12)=>278,chr(13)=>278,chr(14)=>278,chr(15)=>278,chr(16)=>278,chr(17)=>278,chr(18)=>278,chr(19)=>278,chr(20)=>278,chr(21)=>278, + chr(22)=>278,chr(23)=>278,chr(24)=>278,chr(25)=>278,chr(26)=>278,chr(27)=>278,chr(28)=>278,chr(29)=>278,chr(30)=>278,chr(31)=>278,' '=>278,'!'=>278,'"'=>355,'#'=>556,'$'=>556,'%'=>889,'&'=>667,'\''=>191,'('=>333,')'=>333,'*'=>389,'+'=>584, + ','=>278,'-'=>333,'.'=>278,'/'=>278,'0'=>556,'1'=>556,'2'=>556,'3'=>556,'4'=>556,'5'=>556,'6'=>556,'7'=>556,'8'=>556,'9'=>556,':'=>278,';'=>278,'<'=>584,'='=>584,'>'=>584,'?'=>556,'@'=>1015,'A'=>667, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>722,'I'=>278,'J'=>500,'K'=>667,'L'=>556,'M'=>833,'N'=>722,'O'=>778,'P'=>667,'Q'=>778,'R'=>722,'S'=>667,'T'=>611,'U'=>722,'V'=>667,'W'=>944, + 'X'=>667,'Y'=>667,'Z'=>611,'['=>278,'\\'=>278,']'=>278,'^'=>469,'_'=>556,'`'=>333,'a'=>556,'b'=>556,'c'=>500,'d'=>556,'e'=>556,'f'=>278,'g'=>556,'h'=>556,'i'=>222,'j'=>222,'k'=>500,'l'=>222,'m'=>833, + 'n'=>556,'o'=>556,'p'=>556,'q'=>556,'r'=>333,'s'=>500,'t'=>278,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>500,'{'=>334,'|'=>260,'}'=>334,'~'=>584,chr(127)=>350,chr(128)=>556,chr(129)=>350,chr(130)=>222,chr(131)=>556, + chr(132)=>333,chr(133)=>1000,chr(134)=>556,chr(135)=>556,chr(136)=>333,chr(137)=>1000,chr(138)=>667,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>222,chr(146)=>222,chr(147)=>333,chr(148)=>333,chr(149)=>350,chr(150)=>556,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>500,chr(155)=>333,chr(156)=>944,chr(157)=>350,chr(158)=>500,chr(159)=>667,chr(160)=>278,chr(161)=>333,chr(162)=>556,chr(163)=>556,chr(164)=>556,chr(165)=>556,chr(166)=>260,chr(167)=>556,chr(168)=>333,chr(169)=>737,chr(170)=>370,chr(171)=>556,chr(172)=>584,chr(173)=>333,chr(174)=>737,chr(175)=>333, + chr(176)=>400,chr(177)=>584,chr(178)=>333,chr(179)=>333,chr(180)=>333,chr(181)=>556,chr(182)=>537,chr(183)=>278,chr(184)=>333,chr(185)=>333,chr(186)=>365,chr(187)=>556,chr(188)=>834,chr(189)=>834,chr(190)=>834,chr(191)=>611,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>278,chr(205)=>278,chr(206)=>278,chr(207)=>278,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>584,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>667,chr(222)=>667,chr(223)=>611,chr(224)=>556,chr(225)=>556,chr(226)=>556,chr(227)=>556,chr(228)=>556,chr(229)=>556,chr(230)=>889,chr(231)=>500,chr(232)=>556,chr(233)=>556,chr(234)=>556,chr(235)=>556,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>556,chr(241)=>556, + chr(242)=>556,chr(243)=>556,chr(244)=>556,chr(245)=>556,chr(246)=>556,chr(247)=>584,chr(248)=>611,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/index.php b/libraries/sdk/PDFMerger/fpdf/font/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/index.php @@ -0,0 +1,26 @@ +Error: encoding not found: '.$enc); + $cc2gn=array(); + foreach($a as $l) + { + if($l[0]=='!') + { + $e=preg_split('/[ \\t]+/',rtrim($l)); + $cc=hexdec(substr($e[0],1)); + $gn=$e[2]; + $cc2gn[$cc]=$gn; + } + } + for($i=0;$i<=255;$i++) + { + if(!isset($cc2gn[$i])) + $cc2gn[$i]='.notdef'; + } + return $cc2gn; +} + +function ReadAFM($file, &$map) +{ + //Read a font metric file + $a=file($file); + if(empty($a)) + die('File not found'); + $widths=array(); + $fm=array(); + $fix=array('Edot'=>'Edotaccent','edot'=>'edotaccent','Idot'=>'Idotaccent','Zdot'=>'Zdotaccent','zdot'=>'zdotaccent', + 'Odblacute'=>'Ohungarumlaut','odblacute'=>'ohungarumlaut','Udblacute'=>'Uhungarumlaut','udblacute'=>'uhungarumlaut', + 'Gcedilla'=>'Gcommaaccent','gcedilla'=>'gcommaaccent','Kcedilla'=>'Kcommaaccent','kcedilla'=>'kcommaaccent', + 'Lcedilla'=>'Lcommaaccent','lcedilla'=>'lcommaaccent','Ncedilla'=>'Ncommaaccent','ncedilla'=>'ncommaaccent', + 'Rcedilla'=>'Rcommaaccent','rcedilla'=>'rcommaaccent','Scedilla'=>'Scommaaccent','scedilla'=>'scommaaccent', + 'Tcedilla'=>'Tcommaaccent','tcedilla'=>'tcommaaccent','Dslash'=>'Dcroat','dslash'=>'dcroat','Dmacron'=>'Dcroat','dmacron'=>'dcroat', + 'combininggraveaccent'=>'gravecomb','combininghookabove'=>'hookabovecomb','combiningtildeaccent'=>'tildecomb', + 'combiningacuteaccent'=>'acutecomb','combiningdotbelow'=>'dotbelowcomb','dongsign'=>'dong'); + foreach($a as $l) + { + $e=explode(' ',rtrim($l)); + if(count($e)<2) + continue; + $code=$e[0]; + $param=$e[1]; + if($code=='C') + { + //Character metrics + $cc=(int)$e[1]; + $w=$e[4]; + $gn=$e[7]; + if(substr($gn,-4)=='20AC') + $gn='Euro'; + if(isset($fix[$gn])) + { + //Fix incorrect glyph name + foreach($map as $c=>$n) + { + if($n==$fix[$gn]) + $map[$c]=$gn; + } + } + if(empty($map)) + { + //Symbolic font: use built-in encoding + $widths[$cc]=$w; + } + else + { + $widths[$gn]=$w; + if($gn=='X') + $fm['CapXHeight']=$e[13]; + } + if($gn=='.notdef') + $fm['MissingWidth']=$w; + } + elseif($code=='FontName') + $fm['FontName']=$param; + elseif($code=='Weight') + $fm['Weight']=$param; + elseif($code=='ItalicAngle') + $fm['ItalicAngle']=(double)$param; + elseif($code=='Ascender') + $fm['Ascender']=(int)$param; + elseif($code=='Descender') + $fm['Descender']=(int)$param; + elseif($code=='UnderlineThickness') + $fm['UnderlineThickness']=(int)$param; + elseif($code=='UnderlinePosition') + $fm['UnderlinePosition']=(int)$param; + elseif($code=='IsFixedPitch') + $fm['IsFixedPitch']=($param=='true'); + elseif($code=='FontBBox') + $fm['FontBBox']=array($e[1],$e[2],$e[3],$e[4]); + elseif($code=='CapHeight') + $fm['CapHeight']=(int)$param; + elseif($code=='StdVW') + $fm['StdVW']=(int)$param; + } + if(!isset($fm['FontName'])) + die('FontName not found'); + if(!empty($map)) + { + if(!isset($widths['.notdef'])) + $widths['.notdef']=600; + if(!isset($widths['Delta']) && isset($widths['increment'])) + $widths['Delta']=$widths['increment']; + //Order widths according to map + for($i=0;$i<=255;$i++) + { + if(!isset($widths[$map[$i]])) + { + echo 'Warning: character '.$map[$i].' is missing
'; + $widths[$i]=$widths['.notdef']; + } + else + $widths[$i]=$widths[$map[$i]]; + } + } + $fm['Widths']=$widths; + return $fm; +} + +function MakeFontDescriptor($fm, $symbolic) +{ + //Ascent + $asc=(isset($fm['Ascender']) ? $fm['Ascender'] : 1000); + $fd="array('Ascent'=>".$asc; + //Descent + $desc=(isset($fm['Descender']) ? $fm['Descender'] : -200); + $fd.=",'Descent'=>".$desc; + //CapHeight + if(isset($fm['CapHeight'])) + $ch=$fm['CapHeight']; + elseif(isset($fm['CapXHeight'])) + $ch=$fm['CapXHeight']; + else + $ch=$asc; + $fd.=",'CapHeight'=>".$ch; + //Flags + $flags=0; + if(isset($fm['IsFixedPitch']) && $fm['IsFixedPitch']) + $flags+=1<<0; + if($symbolic) + $flags+=1<<2; + if(!$symbolic) + $flags+=1<<5; + if(isset($fm['ItalicAngle']) && $fm['ItalicAngle']!=0) + $flags+=1<<6; + $fd.=",'Flags'=>".$flags; + //FontBBox + if(isset($fm['FontBBox'])) + $fbb=$fm['FontBBox']; + else + $fbb=array(0,$desc-100,1000,$asc+100); + $fd.=",'FontBBox'=>'[".$fbb[0].' '.$fbb[1].' '.$fbb[2].' '.$fbb[3]."]'"; + //ItalicAngle + $ia=(isset($fm['ItalicAngle']) ? $fm['ItalicAngle'] : 0); + $fd.=",'ItalicAngle'=>".$ia; + //StemV + if(isset($fm['StdVW'])) + $stemv=$fm['StdVW']; + elseif(isset($fm['Weight']) && preg_match('/bold|black/i',$fm['Weight'])) + $stemv=120; + else + $stemv=70; + $fd.=",'StemV'=>".$stemv; + //MissingWidth + if(isset($fm['MissingWidth'])) + $fd.=",'MissingWidth'=>".$fm['MissingWidth']; + $fd.=')'; + return $fd; +} + +function MakeWidthArray($fm) +{ + //Make character width array + $s="array(\n\t"; + $cw=$fm['Widths']; + for($i=0;$i<=255;$i++) + { + if(chr($i)=="'") + $s.="'\\''"; + elseif(chr($i)=="\\") + $s.="'\\\\'"; + elseif($i>=32 && $i<=126) + $s.="'".chr($i)."'"; + else + $s.="chr($i)"; + $s.='=>'.$fm['Widths'][$i]; + if($i<255) + $s.=','; + if(($i+1)%22==0) + $s.="\n\t"; + } + $s.=')'; + return $s; +} + +function MakeFontEncoding($map) +{ + //Build differences from reference encoding + $ref=ReadMap('cp1252'); + $s=''; + $last=0; + for($i=32;$i<=255;$i++) + { + if($map[$i]!=$ref[$i]) + { + if($i!=$last+1) + $s.=$i.' '; + $last=$i; + $s.='/'.$map[$i].' '; + } + } + return rtrim($s); +} + +function SaveToFile($file, $s, $mode) +{ + $f=fopen($file,'w'.$mode); + if(!$f) + die('Can\'t write to file '.$file); + fwrite($f,$s,strlen($s)); + fclose($f); +} + +function ReadShort($f) +{ + $a=unpack('n1n',fread($f,2)); + return $a['n']; +} + +function ReadLong($f) +{ + $a=unpack('N1N',fread($f,4)); + return $a['N']; +} + +function CheckTTF($file) +{ + //Check if font license allows embedding + $f=fopen($file,'rb'); + if(!$f) + die('Error: Can\'t open '.$file); + //Extract number of tables + fseek($f,4,SEEK_CUR); + $nb=ReadShort($f); + fseek($f,6,SEEK_CUR); + //Seek OS/2 table + $found=false; + for($i=0;$i<$nb;$i++) + { + if(fread($f,4)=='OS/2') + { + $found=true; + break; + } + fseek($f,12,SEEK_CUR); + } + if(!$found) + { + fclose($f); + return; + } + fseek($f,4,SEEK_CUR); + $offset=ReadLong($f); + fseek($f,$offset,SEEK_SET); + //Extract fsType flags + fseek($f,8,SEEK_CUR); + $fsType=ReadShort($f); + $rl=($fsType & 0x02)!=0; + $pp=($fsType & 0x04)!=0; + $e=($fsType & 0x08)!=0; + fclose($f); + if($rl && !$pp && !$e) + echo 'Warning: font license does not allow embedding'; +} + +/******************************************************************************* +* fontfile: path to TTF file (or empty string if not to be embedded) * +* afmfile: path to AFM file * +* enc: font encoding (or empty string for symbolic fonts) * +* patch: optional patch for encoding * +* type: font type if fontfile is empty * +*******************************************************************************/ +function MakeFont($fontfile, $afmfile, $enc='cp1252', $patch=array(), $type='TrueType') +{ + //Generate a font definition file + if(get_magic_quotes_runtime()) + @set_magic_quotes_runtime(0); + ini_set('auto_detect_line_endings','1'); + if($enc) + { + $map=ReadMap($enc); + foreach($patch as $cc=>$gn) + $map[$cc]=$gn; + } + else + $map=array(); + if(!file_exists($afmfile)) + die('Error: AFM file not found: '.$afmfile); + $fm=ReadAFM($afmfile,$map); + if($enc) + $diff=MakeFontEncoding($map); + else + $diff=''; + $fd=MakeFontDescriptor($fm,empty($map)); + //Find font type + if($fontfile) + { + $ext=strtolower(substr($fontfile,-3)); + if($ext=='ttf') + $type='TrueType'; + elseif($ext=='pfb') + $type='Type1'; + else + die('Error: unrecognized font file extension: '.$ext); + } + else + { + if($type!='TrueType' && $type!='Type1') + die('Error: incorrect font type: '.$type); + } + //Start generation + $s='Error: font file not found: '.$fontfile); + if($type=='TrueType') + CheckTTF($fontfile); + $f=fopen($fontfile,'rb'); + if(!$f) + die('Error: Can\'t open '.$fontfile); + $file=fread($f,filesize($fontfile)); + fclose($f); + if($type=='Type1') + { + //Find first two sections and discard third one + $header=(ord($file[0])==128); + if($header) + { + //Strip first binary header + $file=substr($file,6); + } + $pos=strpos($file,'eexec'); + if(!$pos) + die('Error: font file does not seem to be valid Type1'); + $size1=$pos+6; + if($header && ord($file[$size1])==128) + { + //Strip second binary header + $file=substr($file,0,$size1).substr($file,$size1+6); + } + $pos=strpos($file,'00000000'); + if(!$pos) + die('Error: font file does not seem to be valid Type1'); + $size2=$pos-$size1; + $file=substr($file,0,$size1+$size2); + } + if(function_exists('gzcompress')) + { + $cmp=$basename.'.z'; + SaveToFile($cmp,gzcompress($file),'b'); + $s.='$file=\''.$cmp."';\n"; + echo 'Font file compressed ('.$cmp.')
'; + } + else + { + $s.='$file=\''.basename($fontfile)."';\n"; + echo 'Notice: font file could not be compressed (zlib extension not available)
'; + } + if($type=='Type1') + { + $s.='$size1='.$size1.";\n"; + $s.='$size2='.$size2.";\n"; + } + else + $s.='$originalsize='.filesize($fontfile).";\n"; + } + else + { + //Not embedded font + $s.='$file='."'';\n"; + } + $s.="?>\n"; + SaveToFile($basename.'.php',$s,'t'); + echo 'Font definition file generated ('.$basename.'.php'.')
'; +} +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/symbol.php b/libraries/sdk/PDFMerger/fpdf/font/symbol.php new file mode 100644 index 0000000..b556ed8 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/symbol.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>713,'#'=>500,'$'=>549,'%'=>833,'&'=>778,'\''=>439,'('=>333,')'=>333,'*'=>500,'+'=>549, + ','=>250,'-'=>549,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>549,'='=>549,'>'=>549,'?'=>444,'@'=>549,'A'=>722, + 'B'=>667,'C'=>722,'D'=>612,'E'=>611,'F'=>763,'G'=>603,'H'=>722,'I'=>333,'J'=>631,'K'=>722,'L'=>686,'M'=>889,'N'=>722,'O'=>722,'P'=>768,'Q'=>741,'R'=>556,'S'=>592,'T'=>611,'U'=>690,'V'=>439,'W'=>768, + 'X'=>645,'Y'=>795,'Z'=>611,'['=>333,'\\'=>863,']'=>333,'^'=>658,'_'=>500,'`'=>500,'a'=>631,'b'=>549,'c'=>549,'d'=>494,'e'=>439,'f'=>521,'g'=>411,'h'=>603,'i'=>329,'j'=>603,'k'=>549,'l'=>549,'m'=>576, + 'n'=>521,'o'=>549,'p'=>549,'q'=>521,'r'=>549,'s'=>603,'t'=>439,'u'=>576,'v'=>713,'w'=>686,'x'=>493,'y'=>686,'z'=>494,'{'=>480,'|'=>200,'}'=>480,'~'=>549,chr(127)=>0,chr(128)=>0,chr(129)=>0,chr(130)=>0,chr(131)=>0, + chr(132)=>0,chr(133)=>0,chr(134)=>0,chr(135)=>0,chr(136)=>0,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>0,chr(141)=>0,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, + chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>750,chr(161)=>620,chr(162)=>247,chr(163)=>549,chr(164)=>167,chr(165)=>713,chr(166)=>500,chr(167)=>753,chr(168)=>753,chr(169)=>753,chr(170)=>753,chr(171)=>1042,chr(172)=>987,chr(173)=>603,chr(174)=>987,chr(175)=>603, + chr(176)=>400,chr(177)=>549,chr(178)=>411,chr(179)=>549,chr(180)=>549,chr(181)=>713,chr(182)=>494,chr(183)=>460,chr(184)=>549,chr(185)=>549,chr(186)=>549,chr(187)=>549,chr(188)=>1000,chr(189)=>603,chr(190)=>1000,chr(191)=>658,chr(192)=>823,chr(193)=>686,chr(194)=>795,chr(195)=>987,chr(196)=>768,chr(197)=>768, + chr(198)=>823,chr(199)=>768,chr(200)=>768,chr(201)=>713,chr(202)=>713,chr(203)=>713,chr(204)=>713,chr(205)=>713,chr(206)=>713,chr(207)=>713,chr(208)=>768,chr(209)=>713,chr(210)=>790,chr(211)=>790,chr(212)=>890,chr(213)=>823,chr(214)=>549,chr(215)=>250,chr(216)=>713,chr(217)=>603,chr(218)=>603,chr(219)=>1042, + chr(220)=>987,chr(221)=>603,chr(222)=>987,chr(223)=>603,chr(224)=>494,chr(225)=>329,chr(226)=>790,chr(227)=>790,chr(228)=>786,chr(229)=>713,chr(230)=>384,chr(231)=>384,chr(232)=>384,chr(233)=>384,chr(234)=>384,chr(235)=>384,chr(236)=>494,chr(237)=>494,chr(238)=>494,chr(239)=>494,chr(240)=>0,chr(241)=>329, + chr(242)=>274,chr(243)=>686,chr(244)=>686,chr(245)=>686,chr(246)=>384,chr(247)=>384,chr(248)=>384,chr(249)=>384,chr(250)=>384,chr(251)=>384,chr(252)=>494,chr(253)=>494,chr(254)=>494,chr(255)=>0); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/times.php b/libraries/sdk/PDFMerger/fpdf/font/times.php new file mode 100644 index 0000000..b9be1b2 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/times.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>408,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>180,'('=>333,')'=>333,'*'=>500,'+'=>564, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>278,';'=>278,'<'=>564,'='=>564,'>'=>564,'?'=>444,'@'=>921,'A'=>722, + 'B'=>667,'C'=>667,'D'=>722,'E'=>611,'F'=>556,'G'=>722,'H'=>722,'I'=>333,'J'=>389,'K'=>722,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>556,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>722,'W'=>944, + 'X'=>722,'Y'=>722,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>469,'_'=>500,'`'=>333,'a'=>444,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>333,'s'=>389,'t'=>278,'u'=>500,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>480,'|'=>200,'}'=>480,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>444,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>889,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>444,chr(148)=>444,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>980, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>200,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>564,chr(173)=>333,chr(174)=>760,chr(175)=>333, + chr(176)=>400,chr(177)=>564,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>453,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>444,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>564,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>722,chr(222)=>556,chr(223)=>500,chr(224)=>444,chr(225)=>444,chr(226)=>444,chr(227)=>444,chr(228)=>444,chr(229)=>444,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>564,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>500,chr(254)=>500,chr(255)=>500); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/timesb.php b/libraries/sdk/PDFMerger/fpdf/font/timesb.php new file mode 100644 index 0000000..c3eb9fa --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/timesb.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>555,'#'=>500,'$'=>500,'%'=>1000,'&'=>833,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>930,'A'=>722, + 'B'=>667,'C'=>722,'D'=>722,'E'=>667,'F'=>611,'G'=>778,'H'=>778,'I'=>389,'J'=>500,'K'=>778,'L'=>667,'M'=>944,'N'=>722,'O'=>778,'P'=>611,'Q'=>778,'R'=>722,'S'=>556,'T'=>667,'U'=>722,'V'=>722,'W'=>1000, + 'X'=>722,'Y'=>722,'Z'=>667,'['=>333,'\\'=>278,']'=>333,'^'=>581,'_'=>500,'`'=>333,'a'=>500,'b'=>556,'c'=>444,'d'=>556,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>333,'k'=>556,'l'=>278,'m'=>833, + 'n'=>556,'o'=>500,'p'=>556,'q'=>556,'r'=>444,'s'=>389,'t'=>333,'u'=>556,'v'=>500,'w'=>722,'x'=>500,'y'=>500,'z'=>444,'{'=>394,'|'=>220,'}'=>394,'~'=>520,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>1000,chr(141)=>350,chr(142)=>667,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>444,chr(159)=>722,chr(160)=>250,chr(161)=>333,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>300,chr(171)=>500,chr(172)=>570,chr(173)=>333,chr(174)=>747,chr(175)=>333, + chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>556,chr(182)=>540,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>330,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>722,chr(193)=>722,chr(194)=>722,chr(195)=>722,chr(196)=>722,chr(197)=>722, + chr(198)=>1000,chr(199)=>722,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>778,chr(211)=>778,chr(212)=>778,chr(213)=>778,chr(214)=>778,chr(215)=>570,chr(216)=>778,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>722,chr(222)=>611,chr(223)=>556,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>500,chr(254)=>556,chr(255)=>500); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/timesbi.php b/libraries/sdk/PDFMerger/fpdf/font/timesbi.php new file mode 100644 index 0000000..161f630 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/timesbi.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>389,'"'=>555,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>278,'('=>333,')'=>333,'*'=>500,'+'=>570, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>570,'='=>570,'>'=>570,'?'=>500,'@'=>832,'A'=>667, + 'B'=>667,'C'=>667,'D'=>722,'E'=>667,'F'=>667,'G'=>722,'H'=>778,'I'=>389,'J'=>500,'K'=>667,'L'=>611,'M'=>889,'N'=>722,'O'=>722,'P'=>611,'Q'=>722,'R'=>667,'S'=>556,'T'=>611,'U'=>722,'V'=>667,'W'=>889, + 'X'=>667,'Y'=>611,'Z'=>611,'['=>333,'\\'=>278,']'=>333,'^'=>570,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>333,'g'=>500,'h'=>556,'i'=>278,'j'=>278,'k'=>500,'l'=>278,'m'=>778, + 'n'=>556,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>556,'v'=>444,'w'=>667,'x'=>500,'y'=>444,'z'=>389,'{'=>348,'|'=>220,'}'=>348,'~'=>570,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>500,chr(133)=>1000,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>556,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>611,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>500,chr(148)=>500,chr(149)=>350,chr(150)=>500,chr(151)=>1000,chr(152)=>333,chr(153)=>1000, + chr(154)=>389,chr(155)=>333,chr(156)=>722,chr(157)=>350,chr(158)=>389,chr(159)=>611,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>220,chr(167)=>500,chr(168)=>333,chr(169)=>747,chr(170)=>266,chr(171)=>500,chr(172)=>606,chr(173)=>333,chr(174)=>747,chr(175)=>333, + chr(176)=>400,chr(177)=>570,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>576,chr(182)=>500,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>300,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>667,chr(193)=>667,chr(194)=>667,chr(195)=>667,chr(196)=>667,chr(197)=>667, + chr(198)=>944,chr(199)=>667,chr(200)=>667,chr(201)=>667,chr(202)=>667,chr(203)=>667,chr(204)=>389,chr(205)=>389,chr(206)=>389,chr(207)=>389,chr(208)=>722,chr(209)=>722,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>570,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>611,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>722,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>556, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>570,chr(248)=>500,chr(249)=>556,chr(250)=>556,chr(251)=>556,chr(252)=>556,chr(253)=>444,chr(254)=>500,chr(255)=>444); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/timesi.php b/libraries/sdk/PDFMerger/fpdf/font/timesi.php new file mode 100644 index 0000000..de171fd --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/timesi.php @@ -0,0 +1,15 @@ +250,chr(1)=>250,chr(2)=>250,chr(3)=>250,chr(4)=>250,chr(5)=>250,chr(6)=>250,chr(7)=>250,chr(8)=>250,chr(9)=>250,chr(10)=>250,chr(11)=>250,chr(12)=>250,chr(13)=>250,chr(14)=>250,chr(15)=>250,chr(16)=>250,chr(17)=>250,chr(18)=>250,chr(19)=>250,chr(20)=>250,chr(21)=>250, + chr(22)=>250,chr(23)=>250,chr(24)=>250,chr(25)=>250,chr(26)=>250,chr(27)=>250,chr(28)=>250,chr(29)=>250,chr(30)=>250,chr(31)=>250,' '=>250,'!'=>333,'"'=>420,'#'=>500,'$'=>500,'%'=>833,'&'=>778,'\''=>214,'('=>333,')'=>333,'*'=>500,'+'=>675, + ','=>250,'-'=>333,'.'=>250,'/'=>278,'0'=>500,'1'=>500,'2'=>500,'3'=>500,'4'=>500,'5'=>500,'6'=>500,'7'=>500,'8'=>500,'9'=>500,':'=>333,';'=>333,'<'=>675,'='=>675,'>'=>675,'?'=>500,'@'=>920,'A'=>611, + 'B'=>611,'C'=>667,'D'=>722,'E'=>611,'F'=>611,'G'=>722,'H'=>722,'I'=>333,'J'=>444,'K'=>667,'L'=>556,'M'=>833,'N'=>667,'O'=>722,'P'=>611,'Q'=>722,'R'=>611,'S'=>500,'T'=>556,'U'=>722,'V'=>611,'W'=>833, + 'X'=>611,'Y'=>556,'Z'=>556,'['=>389,'\\'=>278,']'=>389,'^'=>422,'_'=>500,'`'=>333,'a'=>500,'b'=>500,'c'=>444,'d'=>500,'e'=>444,'f'=>278,'g'=>500,'h'=>500,'i'=>278,'j'=>278,'k'=>444,'l'=>278,'m'=>722, + 'n'=>500,'o'=>500,'p'=>500,'q'=>500,'r'=>389,'s'=>389,'t'=>278,'u'=>500,'v'=>444,'w'=>667,'x'=>444,'y'=>444,'z'=>389,'{'=>400,'|'=>275,'}'=>400,'~'=>541,chr(127)=>350,chr(128)=>500,chr(129)=>350,chr(130)=>333,chr(131)=>500, + chr(132)=>556,chr(133)=>889,chr(134)=>500,chr(135)=>500,chr(136)=>333,chr(137)=>1000,chr(138)=>500,chr(139)=>333,chr(140)=>944,chr(141)=>350,chr(142)=>556,chr(143)=>350,chr(144)=>350,chr(145)=>333,chr(146)=>333,chr(147)=>556,chr(148)=>556,chr(149)=>350,chr(150)=>500,chr(151)=>889,chr(152)=>333,chr(153)=>980, + chr(154)=>389,chr(155)=>333,chr(156)=>667,chr(157)=>350,chr(158)=>389,chr(159)=>556,chr(160)=>250,chr(161)=>389,chr(162)=>500,chr(163)=>500,chr(164)=>500,chr(165)=>500,chr(166)=>275,chr(167)=>500,chr(168)=>333,chr(169)=>760,chr(170)=>276,chr(171)=>500,chr(172)=>675,chr(173)=>333,chr(174)=>760,chr(175)=>333, + chr(176)=>400,chr(177)=>675,chr(178)=>300,chr(179)=>300,chr(180)=>333,chr(181)=>500,chr(182)=>523,chr(183)=>250,chr(184)=>333,chr(185)=>300,chr(186)=>310,chr(187)=>500,chr(188)=>750,chr(189)=>750,chr(190)=>750,chr(191)=>500,chr(192)=>611,chr(193)=>611,chr(194)=>611,chr(195)=>611,chr(196)=>611,chr(197)=>611, + chr(198)=>889,chr(199)=>667,chr(200)=>611,chr(201)=>611,chr(202)=>611,chr(203)=>611,chr(204)=>333,chr(205)=>333,chr(206)=>333,chr(207)=>333,chr(208)=>722,chr(209)=>667,chr(210)=>722,chr(211)=>722,chr(212)=>722,chr(213)=>722,chr(214)=>722,chr(215)=>675,chr(216)=>722,chr(217)=>722,chr(218)=>722,chr(219)=>722, + chr(220)=>722,chr(221)=>556,chr(222)=>611,chr(223)=>500,chr(224)=>500,chr(225)=>500,chr(226)=>500,chr(227)=>500,chr(228)=>500,chr(229)=>500,chr(230)=>667,chr(231)=>444,chr(232)=>444,chr(233)=>444,chr(234)=>444,chr(235)=>444,chr(236)=>278,chr(237)=>278,chr(238)=>278,chr(239)=>278,chr(240)=>500,chr(241)=>500, + chr(242)=>500,chr(243)=>500,chr(244)=>500,chr(245)=>500,chr(246)=>500,chr(247)=>675,chr(248)=>500,chr(249)=>500,chr(250)=>500,chr(251)=>500,chr(252)=>500,chr(253)=>444,chr(254)=>500,chr(255)=>444); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/font/zapfdingbats.php b/libraries/sdk/PDFMerger/fpdf/font/zapfdingbats.php new file mode 100644 index 0000000..f2bdfd5 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/font/zapfdingbats.php @@ -0,0 +1,15 @@ +0,chr(1)=>0,chr(2)=>0,chr(3)=>0,chr(4)=>0,chr(5)=>0,chr(6)=>0,chr(7)=>0,chr(8)=>0,chr(9)=>0,chr(10)=>0,chr(11)=>0,chr(12)=>0,chr(13)=>0,chr(14)=>0,chr(15)=>0,chr(16)=>0,chr(17)=>0,chr(18)=>0,chr(19)=>0,chr(20)=>0,chr(21)=>0, + chr(22)=>0,chr(23)=>0,chr(24)=>0,chr(25)=>0,chr(26)=>0,chr(27)=>0,chr(28)=>0,chr(29)=>0,chr(30)=>0,chr(31)=>0,' '=>278,'!'=>974,'"'=>961,'#'=>974,'$'=>980,'%'=>719,'&'=>789,'\''=>790,'('=>791,')'=>690,'*'=>960,'+'=>939, + ','=>549,'-'=>855,'.'=>911,'/'=>933,'0'=>911,'1'=>945,'2'=>974,'3'=>755,'4'=>846,'5'=>762,'6'=>761,'7'=>571,'8'=>677,'9'=>763,':'=>760,';'=>759,'<'=>754,'='=>494,'>'=>552,'?'=>537,'@'=>577,'A'=>692, + 'B'=>786,'C'=>788,'D'=>788,'E'=>790,'F'=>793,'G'=>794,'H'=>816,'I'=>823,'J'=>789,'K'=>841,'L'=>823,'M'=>833,'N'=>816,'O'=>831,'P'=>923,'Q'=>744,'R'=>723,'S'=>749,'T'=>790,'U'=>792,'V'=>695,'W'=>776, + 'X'=>768,'Y'=>792,'Z'=>759,'['=>707,'\\'=>708,']'=>682,'^'=>701,'_'=>826,'`'=>815,'a'=>789,'b'=>789,'c'=>707,'d'=>687,'e'=>696,'f'=>689,'g'=>786,'h'=>787,'i'=>713,'j'=>791,'k'=>785,'l'=>791,'m'=>873, + 'n'=>761,'o'=>762,'p'=>762,'q'=>759,'r'=>759,'s'=>892,'t'=>892,'u'=>788,'v'=>784,'w'=>438,'x'=>138,'y'=>277,'z'=>415,'{'=>392,'|'=>392,'}'=>668,'~'=>668,chr(127)=>0,chr(128)=>390,chr(129)=>390,chr(130)=>317,chr(131)=>317, + chr(132)=>276,chr(133)=>276,chr(134)=>509,chr(135)=>509,chr(136)=>410,chr(137)=>410,chr(138)=>234,chr(139)=>234,chr(140)=>334,chr(141)=>334,chr(142)=>0,chr(143)=>0,chr(144)=>0,chr(145)=>0,chr(146)=>0,chr(147)=>0,chr(148)=>0,chr(149)=>0,chr(150)=>0,chr(151)=>0,chr(152)=>0,chr(153)=>0, + chr(154)=>0,chr(155)=>0,chr(156)=>0,chr(157)=>0,chr(158)=>0,chr(159)=>0,chr(160)=>0,chr(161)=>732,chr(162)=>544,chr(163)=>544,chr(164)=>910,chr(165)=>667,chr(166)=>760,chr(167)=>760,chr(168)=>776,chr(169)=>595,chr(170)=>694,chr(171)=>626,chr(172)=>788,chr(173)=>788,chr(174)=>788,chr(175)=>788, + chr(176)=>788,chr(177)=>788,chr(178)=>788,chr(179)=>788,chr(180)=>788,chr(181)=>788,chr(182)=>788,chr(183)=>788,chr(184)=>788,chr(185)=>788,chr(186)=>788,chr(187)=>788,chr(188)=>788,chr(189)=>788,chr(190)=>788,chr(191)=>788,chr(192)=>788,chr(193)=>788,chr(194)=>788,chr(195)=>788,chr(196)=>788,chr(197)=>788, + chr(198)=>788,chr(199)=>788,chr(200)=>788,chr(201)=>788,chr(202)=>788,chr(203)=>788,chr(204)=>788,chr(205)=>788,chr(206)=>788,chr(207)=>788,chr(208)=>788,chr(209)=>788,chr(210)=>788,chr(211)=>788,chr(212)=>894,chr(213)=>838,chr(214)=>1016,chr(215)=>458,chr(216)=>748,chr(217)=>924,chr(218)=>748,chr(219)=>918, + chr(220)=>927,chr(221)=>928,chr(222)=>928,chr(223)=>834,chr(224)=>873,chr(225)=>828,chr(226)=>924,chr(227)=>924,chr(228)=>917,chr(229)=>930,chr(230)=>931,chr(231)=>463,chr(232)=>883,chr(233)=>836,chr(234)=>836,chr(235)=>867,chr(236)=>867,chr(237)=>696,chr(238)=>696,chr(239)=>874,chr(240)=>0,chr(241)=>874, + chr(242)=>760,chr(243)=>946,chr(244)=>771,chr(245)=>865,chr(246)=>771,chr(247)=>888,chr(248)=>967,chr(249)=>888,chr(250)=>831,chr(251)=>873,chr(252)=>927,chr(253)=>970,chr(254)=>918,chr(255)=>0); +?> diff --git a/libraries/sdk/PDFMerger/fpdf/fpdf.css b/libraries/sdk/PDFMerger/fpdf/fpdf.css new file mode 100644 index 0000000..8cfa33d --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/fpdf.css @@ -0,0 +1,21 @@ +body {font-family:"Times New Roman",serif} +h1 {font:bold 135% Arial,sans-serif; color:#4000A0; margin-bottom:0.9em} +h2 {font:bold 95% Arial,sans-serif; color:#900000; margin-top:1.5em; margin-bottom:1em} +dl.param dt {text-decoration:underline} +dl.param dd {margin-top:1em; margin-bottom:1em} +dl.param ul {margin-top:1em; margin-bottom:1em} +tt, code, kbd {font-family:"Courier New",Courier,monospace; font-size:82%} +div.source {margin-top:1.4em; margin-bottom:1.3em} +div.source pre {display:table; border:1px solid #24246A; width:100%; margin:0em; font-family:inherit; font-size:100%} +div.source code {display:block; border:1px solid #C5C5EC; background-color:#F0F5FF; padding:6px; color:#000000} +div.doc-source {margin-top:1.4em; margin-bottom:1.3em} +div.doc-source pre {display:table; width:100%; margin:0em; font-family:inherit; font-size:100%} +div.doc-source code {display:block; background-color:#E0E0E0; padding:4px} +.kw {color:#000080; font-weight:bold} +.str {color:#CC0000} +.cmt {color:#008000} +p.demo {text-align:center; margin-top:-0.9em} +a.demo {text-decoration:none; font-weight:bold; color:#0000CC} +a.demo:link {text-decoration:none; font-weight:bold; color:#0000CC} +a.demo:hover {text-decoration:none; font-weight:bold; color:#0000FF} +a.demo:active {text-decoration:none; font-weight:bold; color:#0000FF} diff --git a/libraries/sdk/PDFMerger/fpdf/fpdf.php b/libraries/sdk/PDFMerger/fpdf/fpdf.php new file mode 100644 index 0000000..51f5d59 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/fpdf.php @@ -0,0 +1,1732 @@ +_dochecks(); + //Initialization of properties + $this->page=0; + $this->n=2; + $this->buffer=''; + $this->pages=array(); + $this->PageSizes=array(); + $this->state=0; + $this->fonts=array(); + $this->FontFiles=array(); + $this->diffs=array(); + $this->images=array(); + $this->links=array(); + $this->InHeader=false; + $this->InFooter=false; + $this->lasth=0; + $this->FontFamily=''; + $this->FontStyle=''; + $this->FontSizePt=12; + $this->underline=false; + $this->DrawColor='0 G'; + $this->FillColor='0 g'; + $this->TextColor='0 g'; + $this->ColorFlag=false; + $this->ws=0; + //Standard fonts + $this->CoreFonts=array('courier'=>'Courier', 'courierB'=>'Courier-Bold', 'courierI'=>'Courier-Oblique', 'courierBI'=>'Courier-BoldOblique', + 'helvetica'=>'Helvetica', 'helveticaB'=>'Helvetica-Bold', 'helveticaI'=>'Helvetica-Oblique', 'helveticaBI'=>'Helvetica-BoldOblique', + 'times'=>'Times-Roman', 'timesB'=>'Times-Bold', 'timesI'=>'Times-Italic', 'timesBI'=>'Times-BoldItalic', + 'symbol'=>'Symbol', 'zapfdingbats'=>'ZapfDingbats'); + //Scale factor + if($unit=='pt') + $this->k=1; + elseif($unit=='mm') + $this->k=72/25.4; + elseif($unit=='cm') + $this->k=72/2.54; + elseif($unit=='in') + $this->k=72; + else + $this->Error('Incorrect unit: '.$unit); + //Page format + $this->PageFormats=array('a3'=>array(841.89,1190.55), 'a4'=>array(595.28,841.89), 'a5'=>array(420.94,595.28), + 'letter'=>array(612,792), 'legal'=>array(612,1008)); + if(is_string($format)) + $format=$this->_getpageformat($format); + $this->DefPageFormat=$format; + $this->CurPageFormat=$format; + //Page orientation + $orientation=strtolower($orientation); + if($orientation=='p' || $orientation=='portrait') + { + $this->DefOrientation='P'; + $this->w=$this->DefPageFormat[0]; + $this->h=$this->DefPageFormat[1]; + } + elseif($orientation=='l' || $orientation=='landscape') + { + $this->DefOrientation='L'; + $this->w=$this->DefPageFormat[1]; + $this->h=$this->DefPageFormat[0]; + } + else + $this->Error('Incorrect orientation: '.$orientation); + $this->CurOrientation=$this->DefOrientation; + $this->wPt=$this->w*$this->k; + $this->hPt=$this->h*$this->k; + //Page margins (1 cm) + $margin=28.35/$this->k; + $this->SetMargins($margin,$margin); + //Interior cell margin (1 mm) + $this->cMargin=$margin/10; + //Line width (0.2 mm) + $this->LineWidth=.567/$this->k; + //Automatic page break + $this->SetAutoPageBreak(true,2*$margin); + //Full width display mode + $this->SetDisplayMode('fullwidth'); + //Enable compression + $this->SetCompression(true); + //Set default PDF version number + $this->PDFVersion='1.3'; +} + +function SetMargins($left, $top, $right=null) +{ + //Set left, top and right margins + $this->lMargin=$left; + $this->tMargin=$top; + if($right===null) + $right=$left; + $this->rMargin=$right; +} + +function SetLeftMargin($margin) +{ + //Set left margin + $this->lMargin=$margin; + if($this->page>0 && $this->x<$margin) + $this->x=$margin; +} + +function SetTopMargin($margin) +{ + //Set top margin + $this->tMargin=$margin; +} + +function SetRightMargin($margin) +{ + //Set right margin + $this->rMargin=$margin; +} + +function SetAutoPageBreak($auto, $margin=0) +{ + //Set auto page break mode and triggering margin + $this->AutoPageBreak=$auto; + $this->bMargin=$margin; + $this->PageBreakTrigger=$this->h-$margin; +} + +function SetDisplayMode($zoom, $layout='continuous') +{ + //Set display mode in viewer + if($zoom=='fullpage' || $zoom=='fullwidth' || $zoom=='real' || $zoom=='default' || !is_string($zoom)) + $this->ZoomMode=$zoom; + else + $this->Error('Incorrect zoom display mode: '.$zoom); + if($layout=='single' || $layout=='continuous' || $layout=='two' || $layout=='default') + $this->LayoutMode=$layout; + else + $this->Error('Incorrect layout display mode: '.$layout); +} + +function SetCompression($compress) +{ + //Set page compression + if(function_exists('gzcompress')) + $this->compress=$compress; + else + $this->compress=false; +} + +function SetTitle($title, $isUTF8=false) +{ + //Title of document + if($isUTF8) + $title=$this->_UTF8toUTF16($title); + $this->title=$title; +} + +function SetSubject($subject, $isUTF8=false) +{ + //Subject of document + if($isUTF8) + $subject=$this->_UTF8toUTF16($subject); + $this->subject=$subject; +} + +function SetAuthor($author, $isUTF8=false) +{ + //Author of document + if($isUTF8) + $author=$this->_UTF8toUTF16($author); + $this->author=$author; +} + +function SetKeywords($keywords, $isUTF8=false) +{ + //Keywords of document + if($isUTF8) + $keywords=$this->_UTF8toUTF16($keywords); + $this->keywords=$keywords; +} + +function SetCreator($creator, $isUTF8=false) +{ + //Creator of document + if($isUTF8) + $creator=$this->_UTF8toUTF16($creator); + $this->creator=$creator; +} + +function AliasNbPages($alias='{nb}') +{ + //Define an alias for total number of pages + $this->AliasNbPages=$alias; +} + +function Error($msg) +{ + //Fatal error + die('FPDF error: '.$msg); +} + +function Open() +{ + //Begin document + $this->state=1; +} + +function Close() +{ + //Terminate document + if($this->state==3) + return; + if($this->page==0) + $this->AddPage(); + //Page footer + $this->InFooter=true; + $this->Footer(); + $this->InFooter=false; + //Close page + $this->_endpage(); + //Close document + $this->_enddoc(); +} + +function AddPage($orientation='', $format='') +{ + //Start a new page + if($this->state==0) + $this->Open(); + $family=$this->FontFamily; + $style=$this->FontStyle.($this->underline ? 'U' : ''); + $size=$this->FontSizePt; + $lw=$this->LineWidth; + $dc=$this->DrawColor; + $fc=$this->FillColor; + $tc=$this->TextColor; + $cf=$this->ColorFlag; + if($this->page>0) + { + //Page footer + $this->InFooter=true; + $this->Footer(); + $this->InFooter=false; + //Close page + $this->_endpage(); + } + //Start new page + $this->_beginpage($orientation,$format); + //Set line cap style to square + $this->_out('2 J'); + //Set line width + $this->LineWidth=$lw; + $this->_out(sprintf('%.2F w',$lw*$this->k)); + //Set font + if($family) + $this->SetFont($family,$style,$size); + //Set colors + $this->DrawColor=$dc; + if($dc!='0 G') + $this->_out($dc); + $this->FillColor=$fc; + if($fc!='0 g') + $this->_out($fc); + $this->TextColor=$tc; + $this->ColorFlag=$cf; + //Page header + $this->InHeader=true; + $this->Header(); + $this->InHeader=false; + //Restore line width + if($this->LineWidth!=$lw) + { + $this->LineWidth=$lw; + $this->_out(sprintf('%.2F w',$lw*$this->k)); + } + //Restore font + if($family) + $this->SetFont($family,$style,$size); + //Restore colors + if($this->DrawColor!=$dc) + { + $this->DrawColor=$dc; + $this->_out($dc); + } + if($this->FillColor!=$fc) + { + $this->FillColor=$fc; + $this->_out($fc); + } + $this->TextColor=$tc; + $this->ColorFlag=$cf; +} + +function Header() +{ + //To be implemented in your own inherited class +} + +function Footer() +{ + //To be implemented in your own inherited class +} + +function PageNo() +{ + //Get current page number + return $this->page; +} + +function SetDrawColor($r, $g=null, $b=null) +{ + //Set color for all stroking operations + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->DrawColor=sprintf('%.3F G',$r/255); + else + $this->DrawColor=sprintf('%.3F %.3F %.3F RG',$r/255,$g/255,$b/255); + if($this->page>0) + $this->_out($this->DrawColor); +} + +function SetFillColor($r, $g=null, $b=null) +{ + //Set color for all filling operations + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->FillColor=sprintf('%.3F g',$r/255); + else + $this->FillColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); + $this->ColorFlag=($this->FillColor!=$this->TextColor); + if($this->page>0) + $this->_out($this->FillColor); +} + +function SetTextColor($r, $g=null, $b=null) +{ + //Set color for text + if(($r==0 && $g==0 && $b==0) || $g===null) + $this->TextColor=sprintf('%.3F g',$r/255); + else + $this->TextColor=sprintf('%.3F %.3F %.3F rg',$r/255,$g/255,$b/255); + $this->ColorFlag=($this->FillColor!=$this->TextColor); +} + +function GetStringWidth($s) +{ + //Get width of a string in the current font + $s=(string)$s; + $cw=&$this->CurrentFont['cw']; + $w=0; + $l=strlen($s); + for($i=0;$i<$l;$i++) + $w+=$cw[$s[$i]]; + return $w*$this->FontSize/1000; +} + +function SetLineWidth($width) +{ + //Set line width + $this->LineWidth=$width; + if($this->page>0) + $this->_out(sprintf('%.2F w',$width*$this->k)); +} + +function Line($x1, $y1, $x2, $y2) +{ + //Draw a line + $this->_out(sprintf('%.2F %.2F m %.2F %.2F l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k)); +} + +function Rect($x, $y, $w, $h, $style='') +{ + //Draw a rectangle + if($style=='F') + $op='f'; + elseif($style=='FD' || $style=='DF') + $op='B'; + else + $op='S'; + $this->_out(sprintf('%.2F %.2F %.2F %.2F re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op)); +} + +function AddFont($family, $style='', $file='') +{ + //Add a TrueType or Type1 font + $family=strtolower($family); + if($file=='') + $file=str_replace(' ','',$family).strtolower($style).'.php'; + if($family=='arial') + $family='helvetica'; + $style=strtoupper($style); + if($style=='IB') + $style='BI'; + $fontkey=$family.$style; + if(isset($this->fonts[$fontkey])) + return; + include($this->_getfontpath().$file); + if(!isset($name)) + $this->Error('Could not include font definition file'); + $i=count($this->fonts)+1; + $this->fonts[$fontkey]=array('i'=>$i, 'type'=>$type, 'name'=>$name, 'desc'=>$desc, 'up'=>$up, 'ut'=>$ut, 'cw'=>$cw, 'enc'=>$enc, 'file'=>$file); + if($diff) + { + //Search existing encodings + $d=0; + $nb=count($this->diffs); + for($i=1;$i<=$nb;$i++) + { + if($this->diffs[$i]==$diff) + { + $d=$i; + break; + } + } + if($d==0) + { + $d=$nb+1; + $this->diffs[$d]=$diff; + } + $this->fonts[$fontkey]['diff']=$d; + } + if($file) + { + if($type=='TrueType') + $this->FontFiles[$file]=array('length1'=>$originalsize); + else + $this->FontFiles[$file]=array('length1'=>$size1, 'length2'=>$size2); + } +} + +function SetFont($family, $style='', $size=0) +{ + //Select a font; size given in points + global $fpdf_charwidths; + + $family=strtolower($family); + if($family=='') + $family=$this->FontFamily; + if($family=='arial') + $family='helvetica'; + elseif($family=='symbol' || $family=='zapfdingbats') + $style=''; + $style=strtoupper($style); + if(strpos($style,'U')!==false) + { + $this->underline=true; + $style=str_replace('U','',$style); + } + else + $this->underline=false; + if($style=='IB') + $style='BI'; + if($size==0) + $size=$this->FontSizePt; + //Test if font is already selected + if($this->FontFamily==$family && $this->FontStyle==$style && $this->FontSizePt==$size) + return; + //Test if used for the first time + $fontkey=$family.$style; + if(!isset($this->fonts[$fontkey])) + { + //Check if one of the standard fonts + if(isset($this->CoreFonts[$fontkey])) + { + if(!isset($fpdf_charwidths[$fontkey])) + { + //Load metric file + $file=$family; + if($family=='times' || $family=='helvetica') + $file.=strtolower($style); + include($this->_getfontpath().$file.'.php'); + if(!isset($fpdf_charwidths[$fontkey])) + $this->Error('Could not include font metric file'); + } + $i=count($this->fonts)+1; + $name=$this->CoreFonts[$fontkey]; + $cw=$fpdf_charwidths[$fontkey]; + $this->fonts[$fontkey]=array('i'=>$i, 'type'=>'core', 'name'=>$name, 'up'=>-100, 'ut'=>50, 'cw'=>$cw); + } + else + $this->Error('Undefined font: '.$family.' '.$style); + } + //Select it + $this->FontFamily=$family; + $this->FontStyle=$style; + $this->FontSizePt=$size; + $this->FontSize=$size/$this->k; + $this->CurrentFont=&$this->fonts[$fontkey]; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function SetFontSize($size) +{ + //Set font size in points + if($this->FontSizePt==$size) + return; + $this->FontSizePt=$size; + $this->FontSize=$size/$this->k; + if($this->page>0) + $this->_out(sprintf('BT /F%d %.2F Tf ET',$this->CurrentFont['i'],$this->FontSizePt)); +} + +function AddLink() +{ + //Create a new internal link + $n=count($this->links)+1; + $this->links[$n]=array(0, 0); + return $n; +} + +function SetLink($link, $y=0, $page=-1) +{ + //Set destination of internal link + if($y==-1) + $y=$this->y; + if($page==-1) + $page=$this->page; + $this->links[$link]=array($page, $y); +} + +function Link($x, $y, $w, $h, $link) +{ + //Put a link on the page + $this->PageLinks[$this->page][]=array($x*$this->k, $this->hPt-$y*$this->k, $w*$this->k, $h*$this->k, $link); +} + +function Text($x, $y, $txt) +{ + //Output a string + $s=sprintf('BT %.2F %.2F Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt)); + if($this->underline && $txt!='') + $s.=' '.$this->_dounderline($x,$y,$txt); + if($this->ColorFlag) + $s='q '.$this->TextColor.' '.$s.' Q'; + $this->_out($s); +} + +function AcceptPageBreak() +{ + //Accept automatic page break or not + return $this->AutoPageBreak; +} + +function Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=false, $link='') +{ + //Output a cell + $k=$this->k; + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + //Automatic page break + $x=$this->x; + $ws=$this->ws; + if($ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->AddPage($this->CurOrientation,$this->CurPageFormat); + $this->x=$x; + if($ws>0) + { + $this->ws=$ws; + $this->_out(sprintf('%.3F Tw',$ws*$k)); + } + } + if($w==0) + $w=$this->w-$this->rMargin-$this->x; + $s=''; + if($fill || $border==1) + { + if($fill) + $op=($border==1) ? 'B' : 'f'; + else + $op='S'; + $s=sprintf('%.2F %.2F %.2F %.2F re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op); + } + if(is_string($border)) + { + $x=$this->x; + $y=$this->y; + if(strpos($border,'L')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k); + if(strpos($border,'T')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k); + if(strpos($border,'R')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + if(strpos($border,'B')!==false) + $s.=sprintf('%.2F %.2F m %.2F %.2F l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k); + } + if($txt!=='') + { + if($align=='R') + $dx=$w-$this->cMargin-$this->GetStringWidth($txt); + elseif($align=='C') + $dx=($w-$this->GetStringWidth($txt))/2; + else + $dx=$this->cMargin; + if($this->ColorFlag) + $s.='q '.$this->TextColor.' '; + $txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt))); + $s.=sprintf('BT %.2F %.2F Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2); + if($this->underline) + $s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt); + if($this->ColorFlag) + $s.=' Q'; + if($link) + $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link); + } + if($s) + $this->_out($s); + $this->lasth=$h; + if($ln>0) + { + //Go to next line + $this->y+=$h; + if($ln==1) + $this->x=$this->lMargin; + } + else + $this->x+=$w; +} + +function MultiCell($w, $h, $txt, $border=0, $align='J', $fill=false) +{ + //Output text with automatic or explicit line breaks + $cw=&$this->CurrentFont['cw']; + if($w==0) + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $nb=strlen($s); + if($nb>0 && $s[$nb-1]=="\n") + $nb--; + $b=0; + if($border) + { + if($border==1) + { + $border='LTRB'; + $b='LRT'; + $b2='LR'; + } + else + { + $b2=''; + if(strpos($border,'L')!==false) + $b2.='L'; + if(strpos($border,'R')!==false) + $b2.='R'; + $b=(strpos($border,'T')!==false) ? $b2.'T' : $b2; + } + } + $sep=-1; + $i=0; + $j=0; + $l=0; + $ns=0; + $nl=1; + while($i<$nb) + { + //Get next character + $c=$s[$i]; + if($c=="\n") + { + //Explicit line break + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + $i++; + $sep=-1; + $j=$i; + $l=0; + $ns=0; + $nl++; + if($border && $nl==2) + $b=$b2; + continue; + } + if($c==' ') + { + $sep=$i; + $ls=$l; + $ns++; + } + $l+=$cw[$c]; + if($l>$wmax) + { + //Automatic line break + if($sep==-1) + { + if($i==$j) + $i++; + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + } + else + { + if($align=='J') + { + $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0; + $this->_out(sprintf('%.3F Tw',$this->ws*$this->k)); + } + $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill); + $i=$sep+1; + } + $sep=-1; + $j=$i; + $l=0; + $ns=0; + $nl++; + if($border && $nl==2) + $b=$b2; + } + else + $i++; + } + //Last chunk + if($this->ws>0) + { + $this->ws=0; + $this->_out('0 Tw'); + } + if($border && strpos($border,'B')!==false) + $b.='B'; + $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill); + $this->x=$this->lMargin; +} + +function Write($h, $txt, $link='') +{ + //Output text in flowing mode + $cw=&$this->CurrentFont['cw']; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $s=str_replace("\r",'',$txt); + $nb=strlen($s); + $sep=-1; + $i=0; + $j=0; + $l=0; + $nl=1; + while($i<$nb) + { + //Get next character + $c=$s[$i]; + if($c=="\n") + { + //Explicit line break + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + $i++; + $sep=-1; + $j=$i; + $l=0; + if($nl==1) + { + $this->x=$this->lMargin; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + continue; + } + if($c==' ') + $sep=$i; + $l+=$cw[$c]; + if($l>$wmax) + { + //Automatic line break + if($sep==-1) + { + if($this->x>$this->lMargin) + { + //Move to next line + $this->x=$this->lMargin; + $this->y+=$h; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + $i++; + $nl++; + continue; + } + if($i==$j) + $i++; + $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link); + } + else + { + $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link); + $i=$sep+1; + } + $sep=-1; + $j=$i; + $l=0; + if($nl==1) + { + $this->x=$this->lMargin; + $w=$this->w-$this->rMargin-$this->x; + $wmax=($w-2*$this->cMargin)*1000/$this->FontSize; + } + $nl++; + } + else + $i++; + } + //Last chunk + if($i!=$j) + $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link); +} + +function Ln($h=null) +{ + //Line feed; default value is last cell height + $this->x=$this->lMargin; + if($h===null) + $this->y+=$this->lasth; + else + $this->y+=$h; +} + +function Image($file, $x=null, $y=null, $w=0, $h=0, $type='', $link='') +{ + //Put an image on the page + if(!isset($this->images[$file])) + { + //First use of this image, get info + if($type=='') + { + $pos=strrpos($file,'.'); + if(!$pos) + $this->Error('Image file has no extension and no type was specified: '.$file); + $type=substr($file,$pos+1); + } + $type=strtolower($type); + if($type=='jpeg') + $type='jpg'; + $mtd='_parse'.$type; + if(!method_exists($this,$mtd)) + $this->Error('Unsupported image type: '.$type); + $info=$this->$mtd($file); + $info['i']=count($this->images)+1; + $this->images[$file]=$info; + } + else + $info=$this->images[$file]; + //Automatic width and height calculation if needed + if($w==0 && $h==0) + { + //Put image at 72 dpi + $w=$info['w']/$this->k; + $h=$info['h']/$this->k; + } + elseif($w==0) + $w=$h*$info['w']/$info['h']; + elseif($h==0) + $h=$w*$info['h']/$info['w']; + //Flowing mode + if($y===null) + { + if($this->y+$h>$this->PageBreakTrigger && !$this->InHeader && !$this->InFooter && $this->AcceptPageBreak()) + { + //Automatic page break + $x2=$this->x; + $this->AddPage($this->CurOrientation,$this->CurPageFormat); + $this->x=$x2; + } + $y=$this->y; + $this->y+=$h; + } + if($x===null) + $x=$this->x; + $this->_out(sprintf('q %.2F 0 0 %.2F %.2F %.2F cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i'])); + if($link) + $this->Link($x,$y,$w,$h,$link); +} + +function GetX() +{ + //Get x position + return $this->x; +} + +function SetX($x) +{ + //Set x position + if($x>=0) + $this->x=$x; + else + $this->x=$this->w+$x; +} + +function GetY() +{ + //Get y position + return $this->y; +} + +function SetY($y) +{ + //Set y position and reset x + $this->x=$this->lMargin; + if($y>=0) + $this->y=$y; + else + $this->y=$this->h+$y; +} + +function SetXY($x, $y) +{ + //Set x and y positions + $this->SetY($y); + $this->SetX($x); +} + +function Output($name='', $dest='') +{ + //Output PDF to some destination + if($this->state<3) + $this->Close(); + $dest=strtoupper($dest); + if($dest=='') + { + if($name=='') + { + $name='doc.pdf'; + $dest='I'; + } + else + $dest='F'; + } + switch($dest) + { + case 'I': + //Send to standard output + if(ob_get_length()) + $this->Error('Some data has already been output, can\'t send PDF file'); + if(php_sapi_name()!='cli') + { + //We send to a browser + header('Content-Type: application/pdf'); + if(headers_sent()) + $this->Error('Some data has already been output, can\'t send PDF file'); + header('Content-Length: '.strlen($this->buffer)); + header('Content-Disposition: inline; filename="'.$name.'"'); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + ini_set('zlib.output_compression','0'); + } + echo $this->buffer; + break; + case 'D': + //Download file + if(ob_get_length()) + $this->Error('Some data has already been output, can\'t send PDF file'); + header('Content-Type: application/x-download'); + if(headers_sent()) + $this->Error('Some data has already been output, can\'t send PDF file'); + header('Content-Length: '.strlen($this->buffer)); + header('Content-Disposition: attachment; filename="'.$name.'"'); + header('Cache-Control: private, max-age=0, must-revalidate'); + header('Pragma: public'); + ini_set('zlib.output_compression','0'); + echo $this->buffer; + break; + case 'F': + //Save to local file + $f=fopen($name,'wb'); + if(!$f) + $this->Error('Unable to create output file: '.$name); + fwrite($f,$this->buffer,strlen($this->buffer)); + fclose($f); + break; + case 'S': + //Return as a string + return $this->buffer; + default: + $this->Error('Incorrect output destination: '.$dest); + } + return ''; +} + +/******************************************************************************* +* * +* Protected methods * +* * +*******************************************************************************/ +function _dochecks() +{ + //Check availability of %F + if(sprintf('%.1F',1.0)!='1.0') + $this->Error('This version of PHP is not supported'); + //Check mbstring overloading + if(ini_get('mbstring.func_overload') & 2) + $this->Error('mbstring overloading must be disabled'); + //Disable runtime magic quotes + if(get_magic_quotes_runtime()) + @set_magic_quotes_runtime(0); +} + +function _getpageformat($format) +{ + $format=strtolower($format); + if(!isset($this->PageFormats[$format])) + $this->Error('Unknown page format: '.$format); + $a=$this->PageFormats[$format]; + return array($a[0]/$this->k, $a[1]/$this->k); +} + +function _getfontpath() +{ + if(!defined('FPDF_FONTPATH') && is_dir(dirname(__FILE__).'/font')) + define('FPDF_FONTPATH',dirname(__FILE__).'/font/'); + return defined('FPDF_FONTPATH') ? FPDF_FONTPATH : ''; +} + +function _beginpage($orientation, $format) +{ + $this->page++; + $this->pages[$this->page]=''; + $this->state=2; + $this->x=$this->lMargin; + $this->y=$this->tMargin; + $this->FontFamily=''; + //Check page size + if($orientation=='') + $orientation=$this->DefOrientation; + else + $orientation=strtoupper($orientation[0]); + if($format=='') + $format=$this->DefPageFormat; + else + { + if(is_string($format)) + $format=$this->_getpageformat($format); + } + if($orientation!=$this->CurOrientation || $format[0]!=$this->CurPageFormat[0] || $format[1]!=$this->CurPageFormat[1]) + { + //New size + if($orientation=='P') + { + $this->w=$format[0]; + $this->h=$format[1]; + } + else + { + $this->w=$format[1]; + $this->h=$format[0]; + } + $this->wPt=$this->w*$this->k; + $this->hPt=$this->h*$this->k; + $this->PageBreakTrigger=$this->h-$this->bMargin; + $this->CurOrientation=$orientation; + $this->CurPageFormat=$format; + } + if($orientation!=$this->DefOrientation || $format[0]!=$this->DefPageFormat[0] || $format[1]!=$this->DefPageFormat[1]) + $this->PageSizes[$this->page]=array($this->wPt, $this->hPt); +} + +function _endpage() +{ + $this->state=1; +} + +function _escape($s) +{ + //Escape special characters in strings + $s=str_replace('\\','\\\\',$s); + $s=str_replace('(','\\(',$s); + $s=str_replace(')','\\)',$s); + $s=str_replace("\r",'\\r',$s); + return $s; +} + +function _textstring($s) +{ + //Format a text string + return '('.$this->_escape($s).')'; +} + +function _UTF8toUTF16($s) +{ + //Convert UTF-8 to UTF-16BE with BOM + $res="\xFE\xFF"; + $nb=strlen($s); + $i=0; + while($i<$nb) + { + $c1=ord($s[$i++]); + if($c1>=224) + { + //3-byte character + $c2=ord($s[$i++]); + $c3=ord($s[$i++]); + $res.=chr((($c1 & 0x0F)<<4) + (($c2 & 0x3C)>>2)); + $res.=chr((($c2 & 0x03)<<6) + ($c3 & 0x3F)); + } + elseif($c1>=192) + { + //2-byte character + $c2=ord($s[$i++]); + $res.=chr(($c1 & 0x1C)>>2); + $res.=chr((($c1 & 0x03)<<6) + ($c2 & 0x3F)); + } + else + { + //Single-byte character + $res.="\0".chr($c1); + } + } + return $res; +} + +function _dounderline($x, $y, $txt) +{ + //Underline text + $up=$this->CurrentFont['up']; + $ut=$this->CurrentFont['ut']; + $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' '); + return sprintf('%.2F %.2F %.2F %.2F re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt); +} + +function _parsejpg($file) +{ + //Extract info from a JPEG file + $a=GetImageSize($file); + if(!$a) + $this->Error('Missing or incorrect image file: '.$file); + if($a[2]!=2) + $this->Error('Not a JPEG file: '.$file); + if(!isset($a['channels']) || $a['channels']==3) + $colspace='DeviceRGB'; + elseif($a['channels']==4) + $colspace='DeviceCMYK'; + else + $colspace='DeviceGray'; + $bpc=isset($a['bits']) ? $a['bits'] : 8; + //Read whole file + $f=fopen($file,'rb'); + $data=''; + while(!feof($f)) + $data.=fread($f,8192); + fclose($f); + return array('w'=>$a[0], 'h'=>$a[1], 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'DCTDecode', 'data'=>$data); +} + +function _parsepng($file) +{ + //Extract info from a PNG file + $f=fopen($file,'rb'); + if(!$f) + $this->Error('Can\'t open image file: '.$file); + //Check signature + if($this->_readstream($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10)) + $this->Error('Not a PNG file: '.$file); + //Read header chunk + $this->_readstream($f,4); + if($this->_readstream($f,4)!='IHDR') + $this->Error('Incorrect PNG file: '.$file); + $w=$this->_readint($f); + $h=$this->_readint($f); + $bpc=ord($this->_readstream($f,1)); + if($bpc>8) + $this->Error('16-bit depth not supported: '.$file); + $ct=ord($this->_readstream($f,1)); + if($ct==0) + $colspace='DeviceGray'; + elseif($ct==2) + $colspace='DeviceRGB'; + elseif($ct==3) + $colspace='Indexed'; + else + $this->Error('Alpha channel not supported: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Unknown compression method: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Unknown filter method: '.$file); + if(ord($this->_readstream($f,1))!=0) + $this->Error('Interlacing not supported: '.$file); + $this->_readstream($f,4); + $parms='/DecodeParms <>'; + //Scan chunks looking for palette, transparency and image data + $pal=''; + $trns=''; + $data=''; + do + { + $n=$this->_readint($f); + $type=$this->_readstream($f,4); + if($type=='PLTE') + { + //Read palette + $pal=$this->_readstream($f,$n); + $this->_readstream($f,4); + } + elseif($type=='tRNS') + { + //Read transparency info + $t=$this->_readstream($f,$n); + if($ct==0) + $trns=array(ord(substr($t,1,1))); + elseif($ct==2) + $trns=array(ord(substr($t,1,1)), ord(substr($t,3,1)), ord(substr($t,5,1))); + else + { + $pos=strpos($t,chr(0)); + if($pos!==false) + $trns=array($pos); + } + $this->_readstream($f,4); + } + elseif($type=='IDAT') + { + //Read image data block + $data.=$this->_readstream($f,$n); + $this->_readstream($f,4); + } + elseif($type=='IEND') + break; + else + $this->_readstream($f,$n+4); + } + while($n); + if($colspace=='Indexed' && empty($pal)) + $this->Error('Missing palette in '.$file); + fclose($f); + return array('w'=>$w, 'h'=>$h, 'cs'=>$colspace, 'bpc'=>$bpc, 'f'=>'FlateDecode', 'parms'=>$parms, 'pal'=>$pal, 'trns'=>$trns, 'data'=>$data); +} + +function _readstream($f, $n) +{ + //Read n bytes from stream + $res=''; + while($n>0 && !feof($f)) + { + $s=fread($f,$n); + if($s===false) + $this->Error('Error while reading stream'); + $n-=strlen($s); + $res.=$s; + } + if($n>0) + $this->Error('Unexpected end of stream'); + return $res; +} + +function _readint($f) +{ + //Read a 4-byte integer from stream + $a=unpack('Ni',$this->_readstream($f,4)); + return $a['i']; +} + +function _parsegif($file) +{ + //Extract info from a GIF file (via PNG conversion) + if(!function_exists('imagepng')) + $this->Error('GD extension is required for GIF support'); + if(!function_exists('imagecreatefromgif')) + $this->Error('GD has no GIF read support'); + $im=imagecreatefromgif($file); + if(!$im) + $this->Error('Missing or incorrect image file: '.$file); + imageinterlace($im,0); + $tmp=tempnam('.','gif'); + if(!$tmp) + $this->Error('Unable to create a temporary file'); + if(!imagepng($im,$tmp)) + $this->Error('Error while saving to temporary file'); + imagedestroy($im); + $info=$this->_parsepng($tmp); + unlink($tmp); + return $info; +} + +function _newobj() +{ + //Begin a new object + $this->n++; + $this->offsets[$this->n]=strlen($this->buffer); + $this->_out($this->n.' 0 obj'); +} + +function _putstream($s) +{ + $this->_out('stream'); + $this->_out($s); + $this->_out('endstream'); +} + +function _out($s) +{ + //Add a line to the document + if($this->state==2) + $this->pages[$this->page].=$s."\n"; + else + $this->buffer.=$s."\n"; +} + +function _putpages() +{ + $nb=$this->page; + if(!empty($this->AliasNbPages)) + { + //Replace number of pages + for($n=1;$n<=$nb;$n++) + $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]); + } + if($this->DefOrientation=='P') + { + $wPt=$this->DefPageFormat[0]*$this->k; + $hPt=$this->DefPageFormat[1]*$this->k; + } + else + { + $wPt=$this->DefPageFormat[1]*$this->k; + $hPt=$this->DefPageFormat[0]*$this->k; + } + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + for($n=1;$n<=$nb;$n++) + { + //Page + $this->_newobj(); + $this->_out('<_out('/Parent 1 0 R'); + if(isset($this->PageSizes[$n])) + $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$this->PageSizes[$n][0],$this->PageSizes[$n][1])); + $this->_out('/Resources 2 0 R'); + if(isset($this->PageLinks[$n])) + { + //Links + $annots='/Annots ['; + foreach($this->PageLinks[$n] as $pl) + { + $rect=sprintf('%.2F %.2F %.2F %.2F',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]); + $annots.='<_textstring($pl[4]).'>>>>'; + else + { + $l=$this->links[$pl[4]]; + $h=isset($this->PageSizes[$l[0]]) ? $this->PageSizes[$l[0]][1] : $hPt; + $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2F null]>>',1+2*$l[0],$h-$l[1]*$this->k); + } + } + $this->_out($annots.']'); + } + $this->_out('/Contents '.($this->n+1).' 0 R>>'); + $this->_out('endobj'); + //Page content + $p=($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n]; + $this->_newobj(); + $this->_out('<<'.$filter.'/Length '.strlen($p).'>>'); + $this->_putstream($p); + $this->_out('endobj'); + } + //Pages root + $this->offsets[1]=strlen($this->buffer); + $this->_out('1 0 obj'); + $this->_out('<_out($kids.']'); + $this->_out('/Count '.$nb); + $this->_out(sprintf('/MediaBox [0 0 %.2F %.2F]',$wPt,$hPt)); + $this->_out('>>'); + $this->_out('endobj'); +} + +function _putfonts() +{ + $nf=$this->n; + foreach($this->diffs as $diff) + { + //Encodings + $this->_newobj(); + $this->_out('<>'); + $this->_out('endobj'); + } + foreach($this->FontFiles as $file=>$info) + { + //Font file embedding + $this->_newobj(); + $this->FontFiles[$file]['n']=$this->n; + $font=''; + $f=fopen($this->_getfontpath().$file,'rb',1); + if(!$f) + $this->Error('Font file not found'); + while(!feof($f)) + $font.=fread($f,8192); + fclose($f); + $compressed=(substr($file,-2)=='.z'); + if(!$compressed && isset($info['length2'])) + { + $header=(ord($font[0])==128); + if($header) + { + //Strip first binary header + $font=substr($font,6); + } + if($header && ord($font[$info['length1']])==128) + { + //Strip second binary header + $font=substr($font,0,$info['length1']).substr($font,$info['length1']+6); + } + } + $this->_out('<_out('/Filter /FlateDecode'); + $this->_out('/Length1 '.$info['length1']); + if(isset($info['length2'])) + $this->_out('/Length2 '.$info['length2'].' /Length3 0'); + $this->_out('>>'); + $this->_putstream($font); + $this->_out('endobj'); + } + foreach($this->fonts as $k=>$font) + { + //Font objects + $this->fonts[$k]['n']=$this->n+1; + $type=$font['type']; + $name=$font['name']; + if($type=='core') + { + //Standard font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /Type1'); + if($name!='Symbol' && $name!='ZapfDingbats') + $this->_out('/Encoding /WinAnsiEncoding'); + $this->_out('>>'); + $this->_out('endobj'); + } + elseif($type=='Type1' || $type=='TrueType') + { + //Additional Type1 or TrueType font + $this->_newobj(); + $this->_out('<_out('/BaseFont /'.$name); + $this->_out('/Subtype /'.$type); + $this->_out('/FirstChar 32 /LastChar 255'); + $this->_out('/Widths '.($this->n+1).' 0 R'); + $this->_out('/FontDescriptor '.($this->n+2).' 0 R'); + if($font['enc']) + { + if(isset($font['diff'])) + $this->_out('/Encoding '.($nf+$font['diff']).' 0 R'); + else + $this->_out('/Encoding /WinAnsiEncoding'); + } + $this->_out('>>'); + $this->_out('endobj'); + //Widths + $this->_newobj(); + $cw=&$font['cw']; + $s='['; + for($i=32;$i<=255;$i++) + $s.=$cw[chr($i)].' '; + $this->_out($s.']'); + $this->_out('endobj'); + //Descriptor + $this->_newobj(); + $s='<$v) + $s.=' /'.$k.' '.$v; + $file=$font['file']; + if($file) + $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R'; + $this->_out($s.'>>'); + $this->_out('endobj'); + } + else + { + //Allow for additional types + $mtd='_put'.strtolower($type); + if(!method_exists($this,$mtd)) + $this->Error('Unsupported font type: '.$type); + $this->$mtd($font); + } + } +} + +function _putimages() +{ + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + reset($this->images); + while(list($file,$info)=each($this->images)) + { + $this->_newobj(); + $this->images[$file]['n']=$this->n; + $this->_out('<_out('/Subtype /Image'); + $this->_out('/Width '.$info['w']); + $this->_out('/Height '.$info['h']); + if($info['cs']=='Indexed') + $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]'); + else + { + $this->_out('/ColorSpace /'.$info['cs']); + if($info['cs']=='DeviceCMYK') + $this->_out('/Decode [1 0 1 0 1 0 1 0]'); + } + $this->_out('/BitsPerComponent '.$info['bpc']); + if(isset($info['f'])) + $this->_out('/Filter /'.$info['f']); + if(isset($info['parms'])) + $this->_out($info['parms']); + if(isset($info['trns']) && is_array($info['trns'])) + { + $trns=''; + for($i=0;$i_out('/Mask ['.$trns.']'); + } + $this->_out('/Length '.strlen($info['data']).'>>'); + $this->_putstream($info['data']); + unset($this->images[$file]['data']); + $this->_out('endobj'); + //Palette + if($info['cs']=='Indexed') + { + $this->_newobj(); + $pal=($this->compress) ? gzcompress($info['pal']) : $info['pal']; + $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>'); + $this->_putstream($pal); + $this->_out('endobj'); + } + } +} + +function _putxobjectdict() +{ + foreach($this->images as $image) + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); +} + +function _putresourcedict() +{ + $this->_out('/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]'); + $this->_out('/Font <<'); + foreach($this->fonts as $font) + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); + $this->_out('>>'); + $this->_out('/XObject <<'); + $this->_putxobjectdict(); + $this->_out('>>'); +} + +function _putresources() +{ + $this->_putfonts(); + $this->_putimages(); + //Resource dictionary + $this->offsets[2]=strlen($this->buffer); + $this->_out('2 0 obj'); + $this->_out('<<'); + $this->_putresourcedict(); + $this->_out('>>'); + $this->_out('endobj'); +} + +function _putinfo() +{ + $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION)); + if(!empty($this->title)) + $this->_out('/Title '.$this->_textstring($this->title)); + if(!empty($this->subject)) + $this->_out('/Subject '.$this->_textstring($this->subject)); + if(!empty($this->author)) + $this->_out('/Author '.$this->_textstring($this->author)); + if(!empty($this->keywords)) + $this->_out('/Keywords '.$this->_textstring($this->keywords)); + if(!empty($this->creator)) + $this->_out('/Creator '.$this->_textstring($this->creator)); + $this->_out('/CreationDate '.$this->_textstring('D:'.@date('YmdHis'))); +} + +function _putcatalog() +{ + $this->_out('/Type /Catalog'); + $this->_out('/Pages 1 0 R'); + if($this->ZoomMode=='fullpage') + $this->_out('/OpenAction [3 0 R /Fit]'); + elseif($this->ZoomMode=='fullwidth') + $this->_out('/OpenAction [3 0 R /FitH null]'); + elseif($this->ZoomMode=='real') + $this->_out('/OpenAction [3 0 R /XYZ null null 1]'); + elseif(!is_string($this->ZoomMode)) + $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']'); + if($this->LayoutMode=='single') + $this->_out('/PageLayout /SinglePage'); + elseif($this->LayoutMode=='continuous') + $this->_out('/PageLayout /OneColumn'); + elseif($this->LayoutMode=='two') + $this->_out('/PageLayout /TwoColumnLeft'); +} + +function _putheader() +{ + $this->_out('%PDF-'.$this->PDFVersion); +} + +function _puttrailer() +{ + $this->_out('/Size '.($this->n+1)); + $this->_out('/Root '.$this->n.' 0 R'); + $this->_out('/Info '.($this->n-1).' 0 R'); +} + +function _enddoc() +{ + $this->_putheader(); + $this->_putpages(); + $this->_putresources(); + //Info + $this->_newobj(); + $this->_out('<<'); + $this->_putinfo(); + $this->_out('>>'); + $this->_out('endobj'); + //Catalog + $this->_newobj(); + $this->_out('<<'); + $this->_putcatalog(); + $this->_out('>>'); + $this->_out('endobj'); + //Cross-ref + $o=strlen($this->buffer); + $this->_out('xref'); + $this->_out('0 '.($this->n+1)); + $this->_out('0000000000 65535 f '); + for($i=1;$i<=$this->n;$i++) + $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i])); + //Trailer + $this->_out('trailer'); + $this->_out('<<'); + $this->_puttrailer(); + $this->_out('>>'); + $this->_out('startxref'); + $this->_out($o); + $this->_out('%%EOF'); + $this->state=3; +} +//End of class +} + +//Handle special IE contype request +if(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']=='contype') +{ + header('Content-Type: application/pdf'); + exit; +} + +?> diff --git a/libraries/sdk/PDFMerger/fpdf/histo.htm b/libraries/sdk/PDFMerger/fpdf/histo.htm new file mode 100644 index 0000000..be15851 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/histo.htm @@ -0,0 +1,128 @@ + + + + +History + + + + +

History

+
+
v1.6 (2008-08-03)
+
+- GIF image support.
+- Images can now trigger page breaks.
+- Possibility to have different page formats in a single document.
+- Document properties (author, creator, keywords, subject and title) can now be specified in UTF-8.
+- Fixed a bug: when a PNG was inserted through a URL, an error sometimes occurred.
+- An automatic page break in Header() doesn't cause an infinite loop any more.
+- Removed some warning messages appearing with recent PHP versions.
+- Added HTTP headers to reduce problems with IE.
+
+
v1.53 (2004-12-31)
+
+- When the font subdirectory is in the same directory as fpdf.php, it is no longer necessary to define the FPDF_FONTPATH constant.
+- The array $HTTP_SERVER_VARS is no longer used. It could cause trouble on PHP5-based configurations with the register_long_arrays option disabled.
+- Fixed a problem related to Type1 font embedding which caused trouble to some PDF processors.
+- The file name sent to the browser could not contain a space character.
+- The Cell() method could not print the number 0 (you had to pass the string '0').
+
+
v1.52 (2003-12-30)
+
+- Image() now displays the image at 72 dpi if no dimension is given.
+- Output() takes a string as second parameter to indicate destination.
+- Open() is now called automatically by AddPage().
+- Inserting remote JPEG images doesn't generate an error any longer.
+- Decimal separator is forced to dot in the constructor.
+- Added several encodings (Turkish, Thai, Hebrew, Ukrainian and Vietnamese).
+- The last line of a right-aligned MultiCell() was not correctly aligned if it was terminated by a carriage return.
+- No more error message about already sent headers when outputting the PDF to the standard output from the command line.
+- The underlining was going too far for text containing characters \, ( or ).
+- $HTTP_ENV_VARS has been replaced by $HTTP_SERVER_VARS.
+
+
v1.51 (2002-08-03)
+
+- Type1 font support.
+- Added Baltic encoding.
+- The class now works internally in points with the origin at the bottom in order to avoid two bugs occurring with Acrobat 5 :
  * The line thickness was too large when printed under Windows 98 SE and ME.
  * TrueType fonts didn't appear immediately inside the plug-in (a substitution font was used), one had to cause a window refresh to make them show up.
+- It is no longer necessary to set the decimal separator as dot to produce valid documents.
+- The clickable area in a cell was always on the left independently from the text alignment.
+- JPEG images in CMYK mode appeared in inverted colors.
+- Transparent PNG images in grayscale or true color mode were incorrectly handled.
+- Adding new fonts now works correctly even with the magic_quotes_runtime option set to on.
+
+
v1.5 (2002-05-28)
+
+- TrueType font (AddFont()) and encoding support (Western and Eastern Europe, Cyrillic and Greek).
+- Added Write() method.
+- Added underlined style.
+- Internal and external link support (AddLink(), SetLink(), Link()).
+- Added right margin management and methods SetRightMargin(), SetTopMargin().
+- Modification of SetDisplayMode() to select page layout.
+- The border parameter of MultiCell() now lets choose borders to draw as Cell().
+- When a document contains no page, Close() now calls AddPage() instead of causing a fatal error.
+
+
v1.41 (2002-03-13)
+
+- Fixed SetDisplayMode() which no longer worked (the PDF viewer used its default display).
+
+
v1.4 (2002-03-02)
+
+- PHP3 is no longer supported.
+- Page compression (SetCompression()).
+- Choice of page format and possibility to change orientation inside document.
+- Added AcceptPageBreak() method.
+- Ability to print the total number of pages (AliasNbPages()).
+- Choice of cell borders to draw.
+- New mode for Cell(): the current position can now move under the cell.
+- Ability to include an image by specifying height only (width is calculated automatically).
+- Fixed a bug: when a justified line triggered a page break, the footer inherited the corresponding word spacing.
+
+
v1.31 (2002-01-12)
+
+- Fixed a bug in drawing frame with MultiCell(): the last line always started from the left margin.
+- Removed Expires HTTP header (gives trouble in some situations).
+- Added Content-disposition HTTP header (seems to help in some situations).
+
+
v1.3 (2001-12-03)
+
+- Line break and text justification support (MultiCell()).
+- Color support (SetDrawColor(), SetFillColor(), SetTextColor()). Possibility to draw filled rectangles and paint cell background.
+- A cell whose width is declared null extends up to the right margin of the page.
+- Line width is now retained from page to page and defaults to 0.2 mm.
+- Added SetXY() method.
+- Fixed a passing by reference done in a deprecated manner for PHP4.
+
+
v1.2 (2001-11-11)
+
+- Added font metric files and GetStringWidth() method.
+- Centering and right-aligning text in cells.
+- Display mode control (SetDisplayMode()).
+- Added methods to set document properties (SetAuthor(), SetCreator(), SetKeywords(), SetSubject(), SetTitle()).
+- Possibility to force PDF download by browser.
+- Added SetX() and GetX() methods.
+- During automatic page break, current abscissa is now retained.
+
+
v1.11 (2001-10-20)
+
+- PNG support doesn't require PHP4/zlib any more. Data are now put directly into PDF without any decompression/recompression stage.
+- Image insertion now works correctly even with magic_quotes_runtime option set to on.
+
+
v1.1 (2001-10-07)
+
+- JPEG and PNG image support.
+
+
v1.01 (2001-10-03)
+
+- Fixed a bug involving page break: in case when Header() doesn't specify a font, the one from previous page was not restored and produced an incorrect document.
+
+
v1.0 (2001-09-17)
+
+- First version.
+
+
+ + diff --git a/libraries/sdk/PDFMerger/fpdf/index.php b/libraries/sdk/PDFMerger/fpdf/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdf/index.php @@ -0,0 +1,26 @@ + ORD_u) { + $this->error('Illegal character in ASCII85Decode.'); + } + + $chn[$state++] = $ch - ORD_exclmark; + + if ($state == 5) { + $state = 0; + $r = 0; + for ($j = 0; $j < 5; ++$j) + $r = $r * 85 + $chn[$j]; + $out .= chr($r >> 24); + $out .= chr($r >> 16); + $out .= chr($r >> 8); + $out .= chr($r); + } + } + $r = 0; + + if ($state == 1) + $this->error('Illegal length in ASCII85Decode.'); + if ($state == 2) { + $r = $chn[0] * 85 * 85 * 85 * 85 + ($chn[1]+1) * 85 * 85 * 85; + $out .= chr($r >> 24); + } + else if ($state == 3) { + $r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + ($chn[2]+1) * 85 * 85; + $out .= chr($r >> 24); + $out .= chr($r >> 16); + } + else if ($state == 4) { + $r = $chn[0] * 85 * 85 * 85 * 85 + $chn[1] * 85 * 85 * 85 + $chn[2] * 85 * 85 + ($chn[3]+1) * 85 ; + $out .= chr($r >> 24); + $out .= chr($r >> 16); + $out .= chr($r >> 8); + } + + return $out; + } + + function encode($in) { + $this->error("ASCII85 encoding not implemented."); + } +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/fpdi/filters/FilterASCII85_FPDI.php b/libraries/sdk/PDFMerger/fpdi/filters/FilterASCII85_FPDI.php new file mode 100644 index 0000000..596de48 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdi/filters/FilterASCII85_FPDI.php @@ -0,0 +1,33 @@ +fpdi =& $fpdi; + } + + function error($msg) { + $this->fpdi->error($msg); + } +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/fpdi/filters/FilterLZW.php b/libraries/sdk/PDFMerger/fpdi/filters/FilterLZW.php new file mode 100644 index 0000000..5867603 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdi/filters/FilterLZW.php @@ -0,0 +1,154 @@ +error('LZW flavour not supported.'); + } + + $this->initsTable(); + + $this->data = $data; + $this->dataLength = strlen($data); + + // Initialize pointers + $this->bytePointer = 0; + $this->bitPointer = 0; + + $this->nextData = 0; + $this->nextBits = 0; + + $oldCode = 0; + + $string = ''; + $uncompData = ''; + + while (($code = $this->getNextCode()) != 257) { + if ($code == 256) { + $this->initsTable(); + $code = $this->getNextCode(); + + if ($code == 257) { + break; + } + + $uncompData .= $this->sTable[$code]; + $oldCode = $code; + + } else { + + if ($code < $this->tIdx) { + $string = $this->sTable[$code]; + $uncompData .= $string; + + $this->addStringToTable($this->sTable[$oldCode], $string[0]); + $oldCode = $code; + } else { + $string = $this->sTable[$oldCode]; + $string = $string.$string[0]; + $uncompData .= $string; + + $this->addStringToTable($string); + $oldCode = $code; + } + } + } + + return $uncompData; + } + + + /** + * Initialize the string table. + */ + function initsTable() { + $this->sTable = array(); + + for ($i = 0; $i < 256; $i++) + $this->sTable[$i] = chr($i); + + $this->tIdx = 258; + $this->bitsToGet = 9; + } + + /** + * Add a new string to the string table. + */ + function addStringToTable ($oldString, $newString='') { + $string = $oldString.$newString; + + // Add this new String to the table + $this->sTable[$this->tIdx++] = $string; + + if ($this->tIdx == 511) { + $this->bitsToGet = 10; + } else if ($this->tIdx == 1023) { + $this->bitsToGet = 11; + } else if ($this->tIdx == 2047) { + $this->bitsToGet = 12; + } + } + + // Returns the next 9, 10, 11 or 12 bits + function getNextCode() { + if ($this->bytePointer == $this->dataLength) { + return 257; + } + + $this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff); + $this->nextBits += 8; + + if ($this->nextBits < $this->bitsToGet) { + $this->nextData = ($this->nextData << 8) | (ord($this->data[$this->bytePointer++]) & 0xff); + $this->nextBits += 8; + } + + $code = ($this->nextData >> ($this->nextBits - $this->bitsToGet)) & $this->andTable[$this->bitsToGet-9]; + $this->nextBits -= $this->bitsToGet; + + return $code; + } + + function encode($in) { + $this->error("LZW encoding not implemented."); + } +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/fpdi/filters/FilterLZW_FPDI.php b/libraries/sdk/PDFMerger/fpdi/filters/FilterLZW_FPDI.php new file mode 100644 index 0000000..540c22c --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdi/filters/FilterLZW_FPDI.php @@ -0,0 +1,33 @@ +fpdi =& $fpdi; + } + + function error($msg) { + $this->fpdi->error($msg); + } +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/fpdi/filters/index.php b/libraries/sdk/PDFMerger/fpdi/filters/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdi/filters/index.php @@ -0,0 +1,26 @@ +page <= 0) + $this->error("You have to add a page to fpdf first!"); + + if ($x == null) + $x = 0; + if ($y == null) + $y = 0; + if ($w == null) + $w = $this->w; + if ($h == null) + $h = $this->h; + + // Save settings + $this->tpl++; + $tpl =& $this->tpls[$this->tpl]; + $tpl = array( + 'o_x' => $this->x, + 'o_y' => $this->y, + 'o_AutoPageBreak' => $this->AutoPageBreak, + 'o_bMargin' => $this->bMargin, + 'o_tMargin' => $this->tMargin, + 'o_lMargin' => $this->lMargin, + 'o_rMargin' => $this->rMargin, + 'o_h' => $this->h, + 'o_w' => $this->w, + 'buffer' => '', + 'x' => $x, + 'y' => $y, + 'w' => $w, + 'h' => $h + ); + + $this->SetAutoPageBreak(false); + + // Define own high and width to calculate possitions correct + $this->h = $h; + $this->w = $w; + + $this->_intpl = true; + $this->SetXY($x+$this->lMargin, $y+$this->tMargin); + $this->SetRightMargin($this->w-$w+$this->rMargin); + + return $this->tpl; + } + + /** + * End Template + * + * This method ends a template and reset initiated variables on beginTemplate. + * + * @return mixed If a template is opened, the ID is returned. If not a false is returned. + */ + function endTemplate() { + if ($this->_intpl) { + $this->_intpl = false; + $tpl =& $this->tpls[$this->tpl]; + $this->SetXY($tpl['o_x'], $tpl['o_y']); + $this->tMargin = $tpl['o_tMargin']; + $this->lMargin = $tpl['o_lMargin']; + $this->rMargin = $tpl['o_rMargin']; + $this->h = $tpl['o_h']; + $this->w = $tpl['o_w']; + $this->SetAutoPageBreak($tpl['o_AutoPageBreak'], $tpl['o_bMargin']); + + return $this->tpl; + } else { + return false; + } + } + + /** + * Use a Template in current Page or other Template + * + * You can use a template in a page or in another template. + * You can give the used template a new size like you use the Image()-method. + * All parameters are optional. The width or height is calculated automaticaly + * if one is given. If no parameter is given the origin size as defined in + * beginTemplate() is used. + * The calculated or used width and height are returned as an array. + * + * @param int $tplidx A valid template-Id + * @param int $_x The x-position + * @param int $_y The y-position + * @param int $_w The new width of the template + * @param int $_h The new height of the template + * @retrun array The height and width of the template + */ + function useTemplate($tplidx, $_x=null, $_y=null, $_w=0, $_h=0) { + if ($this->page <= 0) + $this->error("You have to add a page to fpdf first!"); + + if (!isset($this->tpls[$tplidx])) + $this->error("Template does not exist!"); + + if ($this->_intpl) { + $this->_res['tpl'][$this->tpl]['tpls'][$tplidx] =& $this->tpls[$tplidx]; + } + + $tpl =& $this->tpls[$tplidx]; + $w = $tpl['w']; + $h = $tpl['h']; + + if ($_x == null) + $_x = 0; + if ($_y == null) + $_y = 0; + + $_x += $tpl['x']; + $_y += $tpl['y']; + + $wh = $this->getTemplateSize($tplidx, $_w, $_h); + $_w = $wh['w']; + $_h = $wh['h']; + + $tData = array( + 'x' => $this->x, + 'y' => $this->y, + 'w' => $_w, + 'h' => $_h, + 'scaleX' => ($_w/$w), + 'scaleY' => ($_h/$h), + 'tx' => $_x, + 'ty' => ($this->h-$_y-$_h), + 'lty' => ($this->h-$_y-$_h) - ($this->h-$h) * ($_h/$h) + ); + + $this->_out(sprintf("q %.4F 0 0 %.4F %.4F %.4F cm", $tData['scaleX'], $tData['scaleY'], $tData['tx']*$this->k, $tData['ty']*$this->k)); // Translate + $this->_out(sprintf('%s%d Do Q', $this->tplprefix, $tplidx)); + + $this->lastUsedTemplateData = $tData; + + return array("w" => $_w, "h" => $_h); + } + + /** + * Get The calculated Size of a Template + * + * If one size is given, this method calculates the other one. + * + * @param int $tplidx A valid template-Id + * @param int $_w The width of the template + * @param int $_h The height of the template + * @return array The height and width of the template + */ + function getTemplateSize($tplidx, $_w=0, $_h=0) { + if (!$this->tpls[$tplidx]) + return false; + + $tpl =& $this->tpls[$tplidx]; + $w = $tpl['w']; + $h = $tpl['h']; + + if ($_w == 0 and $_h == 0) { + $_w = $w; + $_h = $h; + } + + if($_w==0) + $_w = $_h*$w/$h; + if($_h==0) + $_h = $_w*$h/$w; + + return array("w" => $_w, "h" => $_h); + } + + /** + * See FPDF/TCPDF-Documentation ;-) + */ + function SetFont($family, $style='', $size=0, $fontfile='') { + if (!is_subclass_of($this, 'TCPDF') && func_num_args() > 3) { + $this->Error('More than 3 arguments for the SetFont method are only available in TCPDF.'); + } + /** + * force the resetting of font changes in a template + */ + if ($this->_intpl) + $this->FontFamily = ''; + + parent::SetFont($family, $style, $size, $fontfile); + + $fontkey = $this->FontFamily.$this->FontStyle; + + if ($this->_intpl) { + $this->_res['tpl'][$this->tpl]['fonts'][$fontkey] =& $this->fonts[$fontkey]; + } else { + $this->_res['page'][$this->page]['fonts'][$fontkey] =& $this->fonts[$fontkey]; + } + } + + /** + * See FPDF/TCPDF-Documentation ;-) + */ + function Image($file, $x, $y, $w=0, $h=0, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0) { + if (!is_subclass_of($this, 'TCPDF') && func_num_args() > 7) { + $this->Error('More than 7 arguments for the Image method are only available in TCPDF.'); + } + + parent::Image($file, $x, $y, $w, $h, $type, $link, $align, $resize, $dpi, $palign, $ismask, $imgmask, $border); + if ($this->_intpl) { + $this->_res['tpl'][$this->tpl]['images'][$file] =& $this->images[$file]; + } else { + $this->_res['page'][$this->page]['images'][$file] =& $this->images[$file]; + } + } + + /** + * See FPDF-Documentation ;-) + * + * AddPage is not available when you're "in" a template. + */ + function AddPage($orientation='', $format='') { + if ($this->_intpl) + $this->Error('Adding pages in templates isn\'t possible!'); + parent::AddPage($orientation, $format); + } + + /** + * Preserve adding Links in Templates ...won't work + */ + function Link($x, $y, $w, $h, $link, $spaces=0) { + if (!is_subclass_of($this, 'TCPDF') && func_num_args() > 5) { + $this->Error('More than 7 arguments for the Image method are only available in TCPDF.'); + } + + if ($this->_intpl) + $this->Error('Using links in templates aren\'t possible!'); + parent::Link($x, $y, $w, $h, $link, $spaces); + } + + function AddLink() { + if ($this->_intpl) + $this->Error('Adding links in templates aren\'t possible!'); + return parent::AddLink(); + } + + function SetLink($link, $y=0, $page=-1) { + if ($this->_intpl) + $this->Error('Setting links in templates aren\'t possible!'); + parent::SetLink($link, $y, $page); + } + + /** + * Private Method that writes the form xobjects + */ + function _putformxobjects() { + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + reset($this->tpls); + foreach($this->tpls AS $tplidx => $tpl) { + + $p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; + $this->_newobj(); + $this->tpls[$tplidx]['n'] = $this->n; + $this->_out('<<'.$filter.'/Type /XObject'); + $this->_out('/Subtype /Form'); + $this->_out('/FormType 1'); + $this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]', + // llx + $tpl['x'], + // lly + -$tpl['y'], + // urx + ($tpl['w']+$tpl['x'])*$this->k, + // ury + ($tpl['h']-$tpl['y'])*$this->k + )); + + if ($tpl['x'] != 0 || $tpl['y'] != 0) { + $this->_out(sprintf('/Matrix [1 0 0 1 %.5F %.5F]', + -$tpl['x']*$this->k*2, $tpl['y']*$this->k*2 + )); + } + + $this->_out('/Resources '); + + $this->_out('<_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) { + $this->_out('/Font <<'); + foreach($this->_res['tpl'][$tplidx]['fonts'] as $font) + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); + $this->_out('>>'); + } + if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || + isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) + { + $this->_out('/XObject <<'); + if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) { + foreach($this->_res['tpl'][$tplidx]['images'] as $image) + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); + } + if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { + foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl) + $this->_out($this->tplprefix.$i.' '.$tpl['n'].' 0 R'); + } + $this->_out('>>'); + } + $this->_out('>>'); + + $this->_out('/Length '.strlen($p).' >>'); + $this->_putstream($p); + $this->_out('endobj'); + } + } + + /** + * Overwritten to add _putformxobjects() after _putimages() + * + */ + function _putimages() { + parent::_putimages(); + $this->_putformxobjects(); + } + + function _putxobjectdict() { + parent::_putxobjectdict(); + + if (count($this->tpls)) { + foreach($this->tpls as $tplidx => $tpl) { + $this->_out(sprintf('%s%d %d 0 R', $this->tplprefix, $tplidx, $tpl['n'])); + } + } + } + + /** + * Private Method + */ + function _out($s) { + if ($this->state==2 && $this->_intpl) { + $this->tpls[$this->tpl]['buffer'] .= $s."\n"; + } else { + parent::_out($s); + } + } +} diff --git a/libraries/sdk/PDFMerger/fpdi/fpdi.php b/libraries/sdk/PDFMerger/fpdi/fpdi.php new file mode 100644 index 0000000..01e734b --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdi/fpdi.php @@ -0,0 +1,505 @@ +current_filename = $filename; + $fn =& $this->current_filename; + + if (!isset($this->parsers[$fn])) + $this->parsers[$fn] =& new fpdi_pdf_parser($fn, $this); + $this->current_parser =& $this->parsers[$fn]; + + return $this->parsers[$fn]->getPageCount(); + } + + /** + * Import a page + * + * @param int $pageno pagenumber + * @return int Index of imported page - to use with fpdf_tpl::useTemplate() + */ + function importPage($pageno, $boxName='/CropBox') { + if ($this->_intpl) { + return $this->error('Please import the desired pages before creating a new template.'); + } + + $fn =& $this->current_filename; + + // check if page already imported + $pageKey = $fn.((int)$pageno).$boxName; + if (isset($this->_importedPages[$pageKey])) + return $this->_importedPages[$pageKey]; + + $parser =& $this->parsers[$fn]; + $parser->setPageno($pageno); + + $this->tpl++; + $this->tpls[$this->tpl] = array(); + $tpl =& $this->tpls[$this->tpl]; + $tpl['parser'] =& $parser; + $tpl['resources'] = $parser->getPageResources(); + $tpl['buffer'] = $parser->getContent(); + + if (!in_array($boxName, $parser->availableBoxes)) + return $this->Error(sprintf('Unknown box: %s', $boxName)); + $pageboxes = $parser->getPageBoxes($pageno); + + /** + * MediaBox + * CropBox: Default -> MediaBox + * BleedBox: Default -> CropBox + * TrimBox: Default -> CropBox + * ArtBox: Default -> CropBox + */ + if (!isset($pageboxes[$boxName]) && ($boxName == '/BleedBox' || $boxName == '/TrimBox' || $boxName == '/ArtBox')) + $boxName = '/CropBox'; + if (!isset($pageboxes[$boxName]) && $boxName == '/CropBox') + $boxName = '/MediaBox'; + + if (!isset($pageboxes[$boxName])) + return false; + $this->lastUsedPageBox = $boxName; + + $box = $pageboxes[$boxName]; + $tpl['box'] = $box; + + // To build an array that can be used by PDF_TPL::useTemplate() + $this->tpls[$this->tpl] = array_merge($this->tpls[$this->tpl],$box); + + // An imported page will start at 0,0 everytime. Translation will be set in _putformxobjects() + $tpl['x'] = 0; + $tpl['y'] = 0; + + $page =& $parser->pages[$parser->pageno]; + + // handle rotated pages + $rotation = $parser->getPageRotation($pageno); + $tpl['_rotationAngle'] = 0; + if (isset($rotation[1]) && ($angle = $rotation[1] % 360) != 0) { + $steps = $angle / 90; + + $_w = $tpl['w']; + $_h = $tpl['h']; + $tpl['w'] = $steps % 2 == 0 ? $_w : $_h; + $tpl['h'] = $steps % 2 == 0 ? $_h : $_w; + + $tpl['_rotationAngle'] = $angle*-1; + } + + $this->_importedPages[$pageKey] = $this->tpl; + + return $this->tpl; + } + + function getLastUsedPageBox() { + return $this->lastUsedPageBox; + } + + function useTemplate($tplidx, $_x=null, $_y=null, $_w=0, $_h=0, $adjustPageSize=false) { + if ($adjustPageSize == true && is_null($_x) && is_null($_y)) { + $size = $this->getTemplateSize($tplidx, $_w, $_h); + $format = array($size['w'], $size['h']); + if ($format[0]!=$this->CurPageFormat[0] || $format[1]!=$this->CurPageFormat[1]) { + $this->w=$format[0]; + $this->h=$format[1]; + $this->wPt=$this->w*$this->k; + $this->hPt=$this->h*$this->k; + $this->PageBreakTrigger=$this->h-$this->bMargin; + $this->CurPageFormat=$format; + $this->PageSizes[$this->page]=array($this->wPt, $this->hPt); + } + } + + $this->_out('q 0 J 1 w 0 j 0 G 0 g'); // reset standard values + $s = parent::useTemplate($tplidx, $_x, $_y, $_w, $_h); + $this->_out('Q'); + return $s; + } + + /** + * Private method, that rebuilds all needed objects of source files + */ + function _putimportedobjects() { + if (is_array($this->parsers) && count($this->parsers) > 0) { + foreach($this->parsers AS $filename => $p) { + $this->current_parser =& $this->parsers[$filename]; + if (isset($this->_obj_stack[$filename]) && is_array($this->_obj_stack[$filename])) { + while(($n = key($this->_obj_stack[$filename])) !== null) { + $nObj = $this->current_parser->pdf_resolve_object($this->current_parser->c,$this->_obj_stack[$filename][$n][1]); + + $this->_newobj($this->_obj_stack[$filename][$n][0]); + + if ($nObj[0] == PDF_TYPE_STREAM) { + $this->pdf_write_value ($nObj); + } else { + $this->pdf_write_value ($nObj[1]); + } + + $this->_out('endobj'); + $this->_obj_stack[$filename][$n] = null; // free memory + unset($this->_obj_stack[$filename][$n]); + reset($this->_obj_stack[$filename]); + } + } + } + } + } + + + /** + * Private Method that writes the form xobjects + */ + function _putformxobjects() { + $filter=($this->compress) ? '/Filter /FlateDecode ' : ''; + reset($this->tpls); + foreach($this->tpls AS $tplidx => $tpl) { + $p=($this->compress) ? gzcompress($tpl['buffer']) : $tpl['buffer']; + $this->_newobj(); + $cN = $this->n; // TCPDF/Protection: rem current "n" + + $this->tpls[$tplidx]['n'] = $this->n; + $this->_out('<<'.$filter.'/Type /XObject'); + $this->_out('/Subtype /Form'); + $this->_out('/FormType 1'); + + $this->_out(sprintf('/BBox [%.2F %.2F %.2F %.2F]', + (isset($tpl['box']['llx']) ? $tpl['box']['llx'] : $tpl['x'])*$this->k, + (isset($tpl['box']['lly']) ? $tpl['box']['lly'] : -$tpl['y'])*$this->k, + (isset($tpl['box']['urx']) ? $tpl['box']['urx'] : $tpl['w'] + $tpl['x'])*$this->k, + (isset($tpl['box']['ury']) ? $tpl['box']['ury'] : $tpl['h']-$tpl['y'])*$this->k + )); + + $c = 1; + $s = 0; + $tx = 0; + $ty = 0; + + if (isset($tpl['box'])) { + $tx = -$tpl['box']['llx']; + $ty = -$tpl['box']['lly']; + + if ($tpl['_rotationAngle'] <> 0) { + $angle = $tpl['_rotationAngle'] * M_PI/180; + $c=cos($angle); + $s=sin($angle); + + switch($tpl['_rotationAngle']) { + case -90: + $tx = -$tpl['box']['lly']; + $ty = $tpl['box']['urx']; + break; + case -180: + $tx = $tpl['box']['urx']; + $ty = $tpl['box']['ury']; + break; + case -270: + $tx = $tpl['box']['ury']; + $ty = 0; + break; + } + } + } else if ($tpl['x'] != 0 || $tpl['y'] != 0) { + $tx = -$tpl['x']*2; + $ty = $tpl['y']*2; + } + + $tx *= $this->k; + $ty *= $this->k; + + if ($c != 1 || $s != 0 || $tx != 0 || $ty != 0) { + $this->_out(sprintf('/Matrix [%.5F %.5F %.5F %.5F %.5F %.5F]', + $c, $s, -$s, $c, $tx, $ty + )); + } + + $this->_out('/Resources '); + + if (isset($tpl['resources'])) { + $this->current_parser =& $tpl['parser']; + $this->pdf_write_value($tpl['resources']); // "n" will be changed + } else { + $this->_out('<_res['tpl'][$tplidx]['fonts']) && count($this->_res['tpl'][$tplidx]['fonts'])) { + $this->_out('/Font <<'); + foreach($this->_res['tpl'][$tplidx]['fonts'] as $font) + $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R'); + $this->_out('>>'); + } + if(isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images']) || + isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) + { + $this->_out('/XObject <<'); + if (isset($this->_res['tpl'][$tplidx]['images']) && count($this->_res['tpl'][$tplidx]['images'])) { + foreach($this->_res['tpl'][$tplidx]['images'] as $image) + $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R'); + } + if (isset($this->_res['tpl'][$tplidx]['tpls']) && count($this->_res['tpl'][$tplidx]['tpls'])) { + foreach($this->_res['tpl'][$tplidx]['tpls'] as $i => $tpl) + $this->_out($this->tplprefix.$i.' '.$tpl['n'].' 0 R'); + } + $this->_out('>>'); + } + $this->_out('>>'); + } + + $nN = $this->n; // TCPDF: rem new "n" + $this->n = $cN; // TCPDF: reset to current "n" + $this->_out('/Length '.strlen($p).' >>'); + $this->_putstream($p); + $this->_out('endobj'); + $this->n = $nN; // TCPDF: reset to new "n" + } + + $this->_putimportedobjects(); + } + + /** + * Rewritten to handle existing own defined objects + */ + function _newobj($obj_id=false,$onlynewobj=false) { + if (!$obj_id) { + $obj_id = ++$this->n; + } + + //Begin a new object + if (!$onlynewobj) { + $this->offsets[$obj_id] = is_subclass_of($this, 'TCPDF') ? $this->bufferlen : strlen($this->buffer); + $this->_out($obj_id.' 0 obj'); + $this->_current_obj_id = $obj_id; // for later use with encryption + } + return $obj_id; + } + + /** + * Writes a value + * Needed to rebuild the source document + * + * @param mixed $value A PDF-Value. Structure of values see cases in this method + */ + function pdf_write_value(&$value) + { + if (is_subclass_of($this, 'TCPDF')) { + parent::pdf_write_value($value); + } + + switch ($value[0]) { + + case PDF_TYPE_TOKEN : + $this->_straightOut($value[1] . ' '); + break; + case PDF_TYPE_NUMERIC : + case PDF_TYPE_REAL : + if (is_float($value[1]) && $value[1] != 0) { + $this->_straightOut(rtrim(rtrim(sprintf('%F', $value[1]), '0'), '.') .' '); + } else { + $this->_straightOut($value[1] . ' '); + } + break; + + case PDF_TYPE_ARRAY : + + // An array. Output the proper + // structure and move on. + + $this->_straightOut('['); + for ($i = 0; $i < count($value[1]); $i++) { + $this->pdf_write_value($value[1][$i]); + } + + $this->_out(']'); + break; + + case PDF_TYPE_DICTIONARY : + + // A dictionary. + $this->_straightOut('<<'); + + reset ($value[1]); + + while (list($k, $v) = each($value[1])) { + $this->_straightOut($k . ' '); + $this->pdf_write_value($v); + } + + $this->_straightOut('>>'); + break; + + case PDF_TYPE_OBJREF : + + // An indirect object reference + // Fill the object stack if needed + $cpfn =& $this->current_parser->filename; + + if (!isset($this->_don_obj_stack[$cpfn][$value[1]])) { + $this->_newobj(false,true); + $this->_obj_stack[$cpfn][$value[1]] = array($this->n, $value); + $this->_don_obj_stack[$cpfn][$value[1]] = array($this->n, $value); // Value is maybee obsolete!!! + } + $objid = $this->_don_obj_stack[$cpfn][$value[1]][0]; + + $this->_out($objid.' 0 R'); + break; + + case PDF_TYPE_STRING : + + // A string. + $this->_straightOut('('.$value[1].')'); + + break; + + case PDF_TYPE_STREAM : + + // A stream. First, output the + // stream dictionary, then the + // stream data itself. + $this->pdf_write_value($value[1]); + $this->_out('stream'); + $this->_out($value[2][1]); + $this->_out('endstream'); + break; + case PDF_TYPE_HEX : + $this->_straightOut('<'.$value[1].'>'); + break; + + case PDF_TYPE_BOOLEAN : + $this->_straightOut($value[1] ? 'true ' : 'false '); + break; + + case PDF_TYPE_NULL : + // The null object. + + $this->_straightOut('null '); + break; + } + } + + + /** + * Modified so not each call will add a newline to the output. + */ + function _straightOut($s) { + if (!is_subclass_of($this, 'TCPDF')) { + if($this->state==2) + $this->pages[$this->page] .= $s; + else + $this->buffer .= $s; + } else { + if ($this->state == 2) { + if (isset($this->footerlen[$this->page]) AND ($this->footerlen[$this->page] > 0)) { + // puts data before page footer + $page = substr($this->getPageBuffer($this->page), 0, -$this->footerlen[$this->page]); + $footer = substr($this->getPageBuffer($this->page), -$this->footerlen[$this->page]); + $this->setPageBuffer($this->page, $page.' '.$s."\n".$footer); + } else { + $this->setPageBuffer($this->page, $s, true); + } + } else { + $this->setBuffer($s); + } + } + } + + /** + * rewritten to close opened parsers + * + */ + function _enddoc() { + parent::_enddoc(); + $this->_closeParsers(); + } + + /** + * close all files opened by parsers + */ + function _closeParsers() { + if ($this->state > 2 && count($this->parsers) > 0) { + foreach ($this->parsers as $k => $_){ + $this->parsers[$k]->closeFile(); + $this->parsers[$k] = null; + unset($this->parsers[$k]); + } + return true; + } + return false; + } + +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/fpdi/fpdi2tcpdf_bridge.php b/libraries/sdk/PDFMerger/fpdi/fpdi2tcpdf_bridge.php new file mode 100644 index 0000000..008c766 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdi/fpdi2tcpdf_bridge.php @@ -0,0 +1,171 @@ +PDFVersion; + case 'k': + return $this->k; + default: + // Error handling + $this->Error('Cannot access protected property '.get_class($this).':$'.$name.' / Undefined property: '.get_class($this).'::$'.$name); + } + } + + function __set($name, $value) { + switch ($name) { + case 'PDFVersion': + $this->PDFVersion = $value; + break; + default: + // Error handling + $this->Error('Cannot access protected property '.get_class($this).':$'.$name.' / Undefined property: '.get_class($this).'::$'.$name); + } + } + + /** + * Encryption of imported data by FPDI + * + * @param array $value + */ + function pdf_write_value(&$value) { + switch ($value[0]) { + case PDF_TYPE_STRING : + if ($this->encrypted) { + $value[1] = $this->_unescape($value[1]); + $value[1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[1]); + $value[1] = $this->_escape($value[1]); + } + break; + + case PDF_TYPE_STREAM : + if ($this->encrypted) { + $value[2][1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[2][1]); + } + break; + + case PDF_TYPE_HEX : + if ($this->encrypted) { + $value[1] = $this->hex2str($value[1]); + $value[1] = $this->_RC4($this->_objectkey($this->_current_obj_id), $value[1]); + + // remake hexstring of encrypted string + $value[1] = $this->str2hex($value[1]); + } + break; + } + } + + /** + * Unescapes a PDF string + * + * @param string $s + * @return string + */ + function _unescape($s) { + $out = ''; + for ($count = 0, $n = strlen($s); $count < $n; $count++) { + if ($s[$count] != '\\' || $count == $n-1) { + $out .= $s[$count]; + } else { + switch ($s[++$count]) { + case ')': + case '(': + case '\\': + $out .= $s[$count]; + break; + case 'f': + $out .= chr(0x0C); + break; + case 'b': + $out .= chr(0x08); + break; + case 't': + $out .= chr(0x09); + break; + case 'r': + $out .= chr(0x0D); + break; + case 'n': + $out .= chr(0x0A); + break; + case "\r": + if ($count != $n-1 && $s[$count+1] == "\n") + $count++; + break; + case "\n": + break; + default: + // Octal-Values + if (ord($s[$count]) >= ord('0') && + ord($s[$count]) <= ord('9')) { + $oct = ''. $s[$count]; + + if (ord($s[$count+1]) >= ord('0') && + ord($s[$count+1]) <= ord('9')) { + $oct .= $s[++$count]; + + if (ord($s[$count+1]) >= ord('0') && + ord($s[$count+1]) <= ord('9')) { + $oct .= $s[++$count]; + } + } + + $out .= chr(octdec($oct)); + } else { + $out .= $s[$count]; + } + } + } + } + return $out; + } + + /** + * Hexadecimal to string + * + * @param string $hex + * @return string + */ + function hex2str($hex) { + return pack('H*', str_replace(array("\r", "\n", ' '), '', $hex)); + } + + /** + * String to hexadecimal + * + * @param string $str + * @return string + */ + function str2hex($str) { + return current(unpack('H*', $str)); + } +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/fpdi/fpdi_pdf_parser.php b/libraries/sdk/PDFMerger/fpdi/fpdi_pdf_parser.php new file mode 100644 index 0000000..c82f0ac --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdi/fpdi_pdf_parser.php @@ -0,0 +1,384 @@ +fpdi =& $fpdi; + + parent::pdf_parser($filename); + + // resolve Pages-Dictonary + $pages = $this->pdf_resolve_object($this->c, $this->root[1][1]['/Pages']); + + // Read pages + $this->read_pages($this->c, $pages, $this->pages); + + // count pages; + $this->page_count = count($this->pages); + } + + /** + * Overwrite parent::error() + * + * @param string $msg Error-Message + */ + function error($msg) { + $this->fpdi->error($msg); + } + + /** + * Get pagecount from sourcefile + * + * @return int + */ + function getPageCount() { + return $this->page_count; + } + + + /** + * Set pageno + * + * @param int $pageno Pagenumber to use + */ + function setPageno($pageno) { + $pageno = ((int) $pageno) - 1; + + if ($pageno < 0 || $pageno >= $this->getPageCount()) { + $this->fpdi->error('Pagenumber is wrong!'); + } + + $this->pageno = $pageno; + } + + /** + * Get page-resources from current page + * + * @return array + */ + function getPageResources() { + return $this->_getPageResources($this->pages[$this->pageno]); + } + + /** + * Get page-resources from /Page + * + * @param array $obj Array of pdf-data + */ + function _getPageResources ($obj) { // $obj = /Page + $obj = $this->pdf_resolve_object($this->c, $obj); + + // If the current object has a resources + // dictionary associated with it, we use + // it. Otherwise, we move back to its + // parent object. + if (isset ($obj[1][1]['/Resources'])) { + $res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Resources']); + if ($res[0] == PDF_TYPE_OBJECT) + return $res[1]; + return $res; + } else { + if (!isset ($obj[1][1]['/Parent'])) { + return false; + } else { + $res = $this->_getPageResources($obj[1][1]['/Parent']); + if ($res[0] == PDF_TYPE_OBJECT) + return $res[1]; + return $res; + } + } + } + + + /** + * Get content of current page + * + * If more /Contents is an array, the streams are concated + * + * @return string + */ + function getContent() { + $buffer = ''; + + if (isset($this->pages[$this->pageno][1][1]['/Contents'])) { + $contents = $this->_getPageContent($this->pages[$this->pageno][1][1]['/Contents']); + foreach($contents AS $tmp_content) { + $buffer .= $this->_rebuildContentStream($tmp_content).' '; + } + } + + return $buffer; + } + + + /** + * Resolve all content-objects + * + * @param array $content_ref + * @return array + */ + function _getPageContent($content_ref) { + $contents = array(); + + if ($content_ref[0] == PDF_TYPE_OBJREF) { + $content = $this->pdf_resolve_object($this->c, $content_ref); + if ($content[1][0] == PDF_TYPE_ARRAY) { + $contents = $this->_getPageContent($content[1]); + } else { + $contents[] = $content; + } + } else if ($content_ref[0] == PDF_TYPE_ARRAY) { + foreach ($content_ref[1] AS $tmp_content_ref) { + $contents = array_merge($contents,$this->_getPageContent($tmp_content_ref)); + } + } + + return $contents; + } + + + /** + * Rebuild content-streams + * + * @param array $obj + * @return string + */ + function _rebuildContentStream($obj) { + $filters = array(); + + if (isset($obj[1][1]['/Filter'])) { + $_filter = $obj[1][1]['/Filter']; + + if ($_filter[0] == PDF_TYPE_TOKEN) { + $filters[] = $_filter; + } else if ($_filter[0] == PDF_TYPE_ARRAY) { + $filters = $_filter[1]; + } + } + + $stream = $obj[2][1]; + + foreach ($filters AS $_filter) { + switch ($_filter[1]) { + case '/FlateDecode': + if (function_exists('gzuncompress')) { + $stream = (strlen($stream) > 0) ? @gzuncompress($stream) : ''; + } else { + $this->error(sprintf('To handle %s filter, please compile php with zlib support.',$_filter[1])); + } + if ($stream === false) { + $this->error('Error while decompressing stream.'); + } + break; + case '/LZWDecode': + include_once('filters/FilterLZW_FPDI.php'); + $decoder =& new FilterLZW_FPDI($this->fpdi); + $stream = $decoder->decode($stream); + break; + case '/ASCII85Decode': + include_once('filters/FilterASCII85_FPDI.php'); + $decoder =& new FilterASCII85_FPDI($this->fpdi); + $stream = $decoder->decode($stream); + break; + case null: + $stream = $stream; + break; + default: + $this->error(sprintf('Unsupported Filter: %s',$_filter[1])); + } + } + + return $stream; + } + + + /** + * Get a Box from a page + * Arrayformat is same as used by fpdf_tpl + * + * @param array $page a /Page + * @param string $box_index Type of Box @see $availableBoxes + * @return array + */ + function getPageBox($page, $box_index) { + $page = $this->pdf_resolve_object($this->c,$page); + $box = null; + if (isset($page[1][1][$box_index])) + $box =& $page[1][1][$box_index]; + + if (!is_null($box) && $box[0] == PDF_TYPE_OBJREF) { + $tmp_box = $this->pdf_resolve_object($this->c,$box); + $box = $tmp_box[1]; + } + + if (!is_null($box) && $box[0] == PDF_TYPE_ARRAY) { + $b =& $box[1]; + return array('x' => $b[0][1]/$this->fpdi->k, + 'y' => $b[1][1]/$this->fpdi->k, + 'w' => abs($b[0][1]-$b[2][1])/$this->fpdi->k, + 'h' => abs($b[1][1]-$b[3][1])/$this->fpdi->k, + 'llx' => min($b[0][1], $b[2][1])/$this->fpdi->k, + 'lly' => min($b[1][1], $b[3][1])/$this->fpdi->k, + 'urx' => max($b[0][1], $b[2][1])/$this->fpdi->k, + 'ury' => max($b[1][1], $b[3][1])/$this->fpdi->k, + ); + } else if (!isset ($page[1][1]['/Parent'])) { + return false; + } else { + return $this->getPageBox($this->pdf_resolve_object($this->c, $page[1][1]['/Parent']), $box_index); + } + } + + function getPageBoxes($pageno) { + return $this->_getPageBoxes($this->pages[$pageno-1]); + } + + /** + * Get all Boxes from /Page + * + * @param array a /Page + * @return array + */ + function _getPageBoxes($page) { + $boxes = array(); + + foreach($this->availableBoxes AS $box) { + if ($_box = $this->getPageBox($page,$box)) { + $boxes[$box] = $_box; + } + } + + return $boxes; + } + + /** + * Get the page rotation by pageno + * + * @param integer $pageno + * @return array + */ + function getPageRotation($pageno) { + return $this->_getPageRotation($this->pages[$pageno-1]); + } + + function _getPageRotation ($obj) { // $obj = /Page + $obj = $this->pdf_resolve_object($this->c, $obj); + if (isset ($obj[1][1]['/Rotate'])) { + $res = $this->pdf_resolve_object($this->c, $obj[1][1]['/Rotate']); + if ($res[0] == PDF_TYPE_OBJECT) + return $res[1]; + return $res; + } else { + if (!isset ($obj[1][1]['/Parent'])) { + return false; + } else { + $res = $this->_getPageRotation($obj[1][1]['/Parent']); + if ($res[0] == PDF_TYPE_OBJECT) + return $res[1]; + return $res; + } + } + } + + /** + * Read all /Page(es) + * + * @param object pdf_context + * @param array /Pages + * @param array the result-array + */ + function read_pages (&$c, &$pages, &$result) { + // Get the kids dictionary + $kids = $this->pdf_resolve_object ($c, $pages[1][1]['/Kids']); + + if (!is_array($kids)) + $this->error('Cannot find /Kids in current /Page-Dictionary'); + foreach ($kids[1] as $v) { + $pg = $this->pdf_resolve_object ($c, $v); + if ($pg[1][1]['/Type'][1] === '/Pages') { + // If one of the kids is an embedded + // /Pages array, resolve it as well. + $this->read_pages ($c, $pg, $result); + } else { + $result[] = $pg; + } + } + } + + + + /** + * Get PDF-Version + * + * And reset the PDF Version used in FPDI if needed + */ + function getPDFVersion() { + parent::getPDFVersion(); + $this->fpdi->PDFVersion = max($this->fpdi->PDFVersion, $this->pdfVersion); + } + +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/fpdi/index.php b/libraries/sdk/PDFMerger/fpdi/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdi/index.php @@ -0,0 +1,26 @@ +file =& $f; + if (is_string($this->file)) + $this->_mode = 1; + $this->reset(); + } + + // Optionally move the file + // pointer to a new location + // and reset the buffered data + + function reset($pos = null, $l = 100) { + if ($this->_mode == 0) { + if (!is_null ($pos)) { + fseek ($this->file, $pos); + } + + $this->buffer = $l > 0 ? fread($this->file, $l) : ''; + $this->length = strlen($this->buffer); + if ($this->length < $l) + $this->increase_length($l - $this->length); + } else { + $this->buffer = $this->file; + $this->length = strlen($this->buffer); + } + $this->offset = 0; + $this->stack = array(); + } + + // Make sure that there is at least one + // character beyond the current offset in + // the buffer to prevent the tokenizer + // from attempting to access data that does + // not exist + + function ensure_content() { + if ($this->offset >= $this->length - 1) { + return $this->increase_length(); + } else { + return true; + } + } + + // Forcefully read more data into the buffer + + function increase_length($l=100) { + if ($this->_mode == 0 && feof($this->file)) { + return false; + } else if ($this->_mode == 0) { + $totalLength = $this->length + $l; + do { + $this->buffer .= fread($this->file, $totalLength-$this->length); + } while ((($this->length = strlen($this->buffer)) != $totalLength) && !feof($this->file)); + + return true; + } else { + return false; + } + } +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/fpdi/pdf_parser.php b/libraries/sdk/PDFMerger/fpdi/pdf_parser.php new file mode 100644 index 0000000..e1536d6 --- /dev/null +++ b/libraries/sdk/PDFMerger/fpdi/pdf_parser.php @@ -0,0 +1,706 @@ +filename = $filename; + + $this->f = @fopen($this->filename, 'rb'); + + if (!$this->f) + $this->error(sprintf('Cannot open %s !', $filename)); + + $this->getPDFVersion(); + + $this->c =& new pdf_context($this->f); + + // Read xref-Data + $this->xref = array(); + $this->pdf_read_xref($this->xref, $this->pdf_find_xref()); + + // Check for Encryption + $this->getEncryption(); + + // Read root + $this->pdf_read_root(); + } + + /** + * Close the opened file + */ + function closeFile() { + if (isset($this->f) && is_resource($this->f)) { + fclose($this->f); + unset($this->f); + } + } + + /** + * Print Error and die + * + * @param string $msg Error-Message + */ + function error($msg) { + die('PDF-Parser Error: '.$msg); + } + + /** + * Check Trailer for Encryption + */ + function getEncryption() { + if (isset($this->xref['trailer'][1]['/Encrypt'])) { + $this->error('File is encrypted!'); + } + } + + /** + * Find/Return /Root + * + * @return array + */ + function pdf_find_root() { + if ($this->xref['trailer'][1]['/Root'][0] != PDF_TYPE_OBJREF) { + $this->error('Wrong Type of Root-Element! Must be an indirect reference'); + } + + return $this->xref['trailer'][1]['/Root']; + } + + /** + * Read the /Root + */ + function pdf_read_root() { + // read root + $this->root = $this->pdf_resolve_object($this->c, $this->pdf_find_root()); + } + + /** + * Get PDF-Version + * + * And reset the PDF Version used in FPDI if needed + */ + function getPDFVersion() { + fseek($this->f, 0); + preg_match('/\d\.\d/',fread($this->f,16),$m); + if (isset($m[0])) + $this->pdfVersion = $m[0]; + return $this->pdfVersion; + } + + /** + * Find the xref-Table + */ + function pdf_find_xref() { + $toRead = 1500; + + $stat = fseek ($this->f, -$toRead, SEEK_END); + if ($stat === -1) { + fseek ($this->f, 0); + } + $data = fread($this->f, $toRead); + + $pos = strlen($data) - strpos(strrev($data), strrev('startxref')); + $data = substr($data, $pos); + + if (!preg_match('/\s*(\d+).*$/s', $data, $matches)) { + $this->error('Unable to find pointer to xref table'); + } + + return (int) $matches[1]; + } + + /** + * Read xref-table + * + * @param array $result Array of xref-table + * @param integer $offset of xref-table + */ + function pdf_read_xref(&$result, $offset) { + + fseek($this->f, $o_pos = $offset-20); // set some bytes backwards to fetch errorious docs + + $data = fread($this->f, 100); + + $xrefPos = strrpos($data, 'xref'); + + if ($xrefPos === false) { + fseek($this->f, $offset); + $c =& new pdf_context($this->f); + $xrefStreamObjDec = $this->pdf_read_value($c); + + if (is_array($xrefStreamObjDec) && isset($xrefStreamObjDec[0]) && $xrefStreamObjDec[0] == PDF_TYPE_OBJDEC) { + $this->error(sprintf('This document (%s) probably uses a compression technique which is not supported by the free parser shipped with FPDI.', $this->filename)); + } else { + $this->error('Unable to find xref table.'); + } + } + + if (!isset($result['xref_location'])) { + $result['xref_location'] = $o_pos+$xrefPos; + $result['max_object'] = 0; + } + + $cylces = -1; + $bytesPerCycle = 100; + + fseek($this->f, $o_pos = $o_pos+$xrefPos+4); // set the handle directly after the "xref"-keyword + $data = fread($this->f, $bytesPerCycle); + + while (($trailerPos = strpos($data, 'trailer', max($bytesPerCycle*$cylces++, 0))) === false && !feof($this->f)) { + $data .= fread($this->f, $bytesPerCycle); + } + + if ($trailerPos === false) { + $this->error('Trailer keyword not found after xref table'); + } + + $data = substr($data, 0, $trailerPos); + + // get Line-Ending + preg_match_all("/(\r\n|\n|\r)/", substr($data, 0, 100), $m); // check the first 100 bytes for linebreaks + + $differentLineEndings = count(array_unique($m[0])); + if ($differentLineEndings > 1) { + $lines = preg_split("/(\r\n|\n|\r)/", $data, -1, PREG_SPLIT_NO_EMPTY); + } else { + $lines = explode($m[0][1], $data); + } + + $data = $differentLineEndings = $m = null; + unset($data, $differentLineEndings, $m); + + $linesCount = count($lines); + + $start = 1; + + for ($i = 0; $i < $linesCount; $i++) { + $line = trim($lines[$i]); + if ($line) { + $pieces = explode(' ', $line); + $c = count($pieces); + switch($c) { + case 2: + $start = (int)$pieces[0]; + $end = $start+(int)$pieces[1]; + if ($end > $result['max_object']) + $result['max_object'] = $end; + break; + case 3: + if (!isset($result['xref'][$start])) + $result['xref'][$start] = array(); + + if (!array_key_exists($gen = (int) $pieces[1], $result['xref'][$start])) { + $result['xref'][$start][$gen] = $pieces[2] == 'n' ? (int) $pieces[0] : null; + } + $start++; + break; + default: + $this->error('Unexpected data in xref table'); + } + } + } + + $lines = $pieces = $line = $start = $end = $gen = null; + unset($lines, $pieces, $line, $start, $end, $gen); + + fseek($this->f, $o_pos+$trailerPos+7); + + $c =& new pdf_context($this->f); + $trailer = $this->pdf_read_value($c); + + $c = null; + unset($c); + + if (!isset($result['trailer'])) { + $result['trailer'] = $trailer; + } + + if (isset($trailer[1]['/Prev'])) { + $this->pdf_read_xref($result, $trailer[1]['/Prev'][1]); + } + + $trailer = null; + unset($trailer); + + return true; + } + + /** + * Reads an Value + * + * @param object $c pdf_context + * @param string $token a Token + * @return mixed + */ + function pdf_read_value(&$c, $token = null) { + if (is_null($token)) { + $token = $this->pdf_read_token($c); + } + + if ($token === false) { + return false; + } + + switch ($token) { + case '<': + // This is a hex string. + // Read the value, then the terminator + + $pos = $c->offset; + + while(1) { + + $match = strpos ($c->buffer, '>', $pos); + + // If you can't find it, try + // reading more data from the stream + + if ($match === false) { + if (!$c->increase_length()) { + return false; + } else { + continue; + } + } + + $result = substr ($c->buffer, $c->offset, $match - $c->offset); + $c->offset = $match + 1; + + return array (PDF_TYPE_HEX, $result); + } + + break; + case '<<': + // This is a dictionary. + + $result = array(); + + // Recurse into this function until we reach + // the end of the dictionary. + while (($key = $this->pdf_read_token($c)) !== '>>') { + if ($key === false) { + return false; + } + + if (($value = $this->pdf_read_value($c)) === false) { + return false; + } + + // Catch missing value + if ($value[0] == PDF_TYPE_TOKEN && $value[1] == '>>') { + $result[$key] = array(PDF_TYPE_NULL); + break; + } + + $result[$key] = $value; + } + + return array (PDF_TYPE_DICTIONARY, $result); + + case '[': + // This is an array. + + $result = array(); + + // Recurse into this function until we reach + // the end of the array. + while (($token = $this->pdf_read_token($c)) !== ']') { + if ($token === false) { + return false; + } + + if (($value = $this->pdf_read_value($c, $token)) === false) { + return false; + } + + $result[] = $value; + } + + return array (PDF_TYPE_ARRAY, $result); + + case '(' : + // This is a string + $pos = $c->offset; + + $openBrackets = 1; + do { + for (; $openBrackets != 0 && $pos < $c->length; $pos++) { + switch (ord($c->buffer[$pos])) { + case 0x28: // '(' + $openBrackets++; + break; + case 0x29: // ')' + $openBrackets--; + break; + case 0x5C: // backslash + $pos++; + } + } + } while($openBrackets != 0 && $c->increase_length()); + + $result = substr($c->buffer, $c->offset, $pos - $c->offset - 1); + $c->offset = $pos; + + return array (PDF_TYPE_STRING, $result); + + case 'stream': + $o_pos = ftell($c->file)-strlen($c->buffer); + $o_offset = $c->offset; + + $c->reset($startpos = $o_pos + $o_offset); + + $e = 0; // ensure line breaks in front of the stream + if ($c->buffer[0] == chr(10) || $c->buffer[0] == chr(13)) + $e++; + if ($c->buffer[1] == chr(10) && $c->buffer[0] != chr(10)) + $e++; + + if ($this->actual_obj[1][1]['/Length'][0] == PDF_TYPE_OBJREF) { + $tmp_c =& new pdf_context($this->f); + $tmp_length = $this->pdf_resolve_object($tmp_c,$this->actual_obj[1][1]['/Length']); + $length = $tmp_length[1][1]; + } else { + $length = $this->actual_obj[1][1]['/Length'][1]; + } + + if ($length > 0) { + $c->reset($startpos+$e,$length); + $v = $c->buffer; + } else { + $v = ''; + } + $c->reset($startpos+$e+$length+9); // 9 = strlen("endstream") + + return array(PDF_TYPE_STREAM, $v); + + default : + if (is_numeric ($token)) { + // A numeric token. Make sure that + // it is not part of something else. + if (($tok2 = $this->pdf_read_token ($c)) !== false) { + if (is_numeric ($tok2)) { + + // Two numeric tokens in a row. + // In this case, we're probably in + // front of either an object reference + // or an object specification. + // Determine the case and return the data + if (($tok3 = $this->pdf_read_token ($c)) !== false) { + switch ($tok3) { + case 'obj' : + return array (PDF_TYPE_OBJDEC, (int) $token, (int) $tok2); + case 'R' : + return array (PDF_TYPE_OBJREF, (int) $token, (int) $tok2); + } + // If we get to this point, that numeric value up + // there was just a numeric value. Push the extra + // tokens back into the stack and return the value. + array_push ($c->stack, $tok3); + } + } + + array_push ($c->stack, $tok2); + } + + if ($token === (string)((int)$token)) + return array (PDF_TYPE_NUMERIC, (int)$token); + else + return array (PDF_TYPE_REAL, (float)$token); + } else if ($token == 'true' || $token == 'false') { + return array (PDF_TYPE_BOOLEAN, $token == 'true'); + } else if ($token == 'null') { + return array (PDF_TYPE_NULL); + } else { + // Just a token. Return it. + return array (PDF_TYPE_TOKEN, $token); + } + } + } + + /** + * Resolve an object + * + * @param object $c pdf_context + * @param array $obj_spec The object-data + * @param boolean $encapsulate Must set to true, cause the parsing and fpdi use this method only without this para + */ + function pdf_resolve_object(&$c, $obj_spec, $encapsulate = true) { + // Exit if we get invalid data + if (!is_array($obj_spec)) { + $ret = false; + return $ret; + } + + if ($obj_spec[0] == PDF_TYPE_OBJREF) { + + // This is a reference, resolve it + if (isset($this->xref['xref'][$obj_spec[1]][$obj_spec[2]])) { + + // Save current file position + // This is needed if you want to resolve + // references while you're reading another object + // (e.g.: if you need to determine the length + // of a stream) + + $old_pos = ftell($c->file); + + // Reposition the file pointer and + // load the object header. + + $c->reset($this->xref['xref'][$obj_spec[1]][$obj_spec[2]]); + + $header = $this->pdf_read_value($c); + + if ($header[0] != PDF_TYPE_OBJDEC || $header[1] != $obj_spec[1] || $header[2] != $obj_spec[2]) { + $this->error("Unable to find object ({$obj_spec[1]}, {$obj_spec[2]}) at expected location"); + } + + // If we're being asked to store all the information + // about the object, we add the object ID and generation + // number for later use + $result = array(); + $this->actual_obj =& $result; + if ($encapsulate) { + $result = array ( + PDF_TYPE_OBJECT, + 'obj' => $obj_spec[1], + 'gen' => $obj_spec[2] + ); + } + + // Now simply read the object data until + // we encounter an end-of-object marker + while(1) { + $value = $this->pdf_read_value($c); + if ($value === false || count($result) > 4) { + // in this case the parser coudn't find an endobj so we break here + break; + } + + if ($value[0] == PDF_TYPE_TOKEN && $value[1] === 'endobj') { + break; + } + + $result[] = $value; + } + + $c->reset($old_pos); + + if (isset($result[2][0]) && $result[2][0] == PDF_TYPE_STREAM) { + $result[0] = PDF_TYPE_STREAM; + } + + return $result; + } + } else { + return $obj_spec; + } + } + + + + /** + * Reads a token from the file + * + * @param object $c pdf_context + * @return mixed + */ + function pdf_read_token(&$c) + { + // If there is a token available + // on the stack, pop it out and + // return it. + + if (count($c->stack)) { + return array_pop($c->stack); + } + + // Strip away any whitespace + + do { + if (!$c->ensure_content()) { + return false; + } + $c->offset += strspn($c->buffer, " \n\r\t", $c->offset); + } while ($c->offset >= $c->length - 1); + + // Get the first character in the stream + + $char = $c->buffer[$c->offset++]; + + switch ($char) { + + case '[': + case ']': + case '(': + case ')': + + // This is either an array or literal string + // delimiter, Return it + + return $char; + + case '<': + case '>': + + // This could either be a hex string or + // dictionary delimiter. Determine the + // appropriate case and return the token + + if ($c->buffer[$c->offset] == $char) { + if (!$c->ensure_content()) { + return false; + } + $c->offset++; + return $char . $char; + } else { + return $char; + } + + case '%': + + // This is a comment - jump over it! + + $pos = $c->offset; + while(1) { + $match = preg_match("/(\r\n|\r|\n)/", $c->buffer, $m, PREG_OFFSET_CAPTURE, $pos); + if ($match === 0) { + if (!$c->increase_length()) { + return false; + } else { + continue; + } + } + + $c->offset = $m[0][1]+strlen($m[0][0]); + + return $this->pdf_read_token($c); + } + + default: + + // This is "another" type of token (probably + // a dictionary entry or a numeric value) + // Find the end and return it. + + if (!$c->ensure_content()) { + return false; + } + + while(1) { + + // Determine the length of the token + + $pos = strcspn($c->buffer, " %[]<>()\r\n\t/", $c->offset); + + if ($c->offset + $pos <= $c->length - 1) { + break; + } else { + // If the script reaches this point, + // the token may span beyond the end + // of the current buffer. Therefore, + // we increase the size of the buffer + // and try again--just to be safe. + + $c->increase_length(); + } + } + + $result = substr($c->buffer, $c->offset - 1, $pos + 1); + + $c->offset += $pos; + return $result; + } + } +} + +} \ No newline at end of file diff --git a/libraries/sdk/PDFMerger/index.php b/libraries/sdk/PDFMerger/index.php new file mode 100644 index 0000000..ad70a72 --- /dev/null +++ b/libraries/sdk/PDFMerger/index.php @@ -0,0 +1,26 @@ +LWmL%dW5X;g^MXc;1-i6B33<>rl`rY@;^Ue9bdCz;!ne#p;Da8=2 zCjAgUwFYn?z#_19K3qNy3L-$Q+-2(S+z-l?vCBe$6uq*(Iec@OQ6nQ|Q zJJck>`ef)l3HSemO|zlv67<}Gp4-s24X$^5@obK%TRST+edT41#ZPSn9-A82cUg$VG=DeTDq zZv}#P7BLgmlN`yvW8++Q(v(MWXf~B&v1zbt`x-ISV%A`pNoT(hkN% z@$eualpWVG6v@#{22JPp{l%HNG)J?!v>nyWQlVj)7Mq!Nvf;gWg1}R3EJxZ*REl1M z@eE>%#f%&Dx&*bspi{{8dYLRyrBzB5i7K5!nZO$cy`s-oPn#T8%EtBinjiY=2lN%B zV72p+^%P?%pv(q_wxYcyz}Gx*E(rtrO88_XLSz5Y=)NmnJ%ZUUTmH~5 ze9FeFo#AEe#?O{Ne(&kNclXZiTQ_f9@4EKeufP0!^`{?yxYBvK50t^7iKXO&d4V)vkZ5=FN50RcqgP{k2!utbXO?%2g{@yi`%Xd|BCxFO-%%zjR6Q z;^&GA7rC4T4vu9O+G(3LKkr#fZq5SAY|18|d3yf5r=EObZdT@;*%`CaAD{VH8evSG zk&>KbNaUNWjgOnIiH*V4(NQX8q(Ux}O2ndwX;Z_)LZ^fT2VsHeYwfj0_!85|})Ra7(S-WHXa-w zGN_tJMT|p7`NpY?(^8v`96dJL%NWsGefnVIMEvl%W}`%p#cTGqHIG$JufN!Kz&Pb< zQ^2r|(Q4grw{e}hjY>5u@Lt_2{O$}LT literal 2736 zcmV;h3QzS%Nk%w1VL1Rf0O$Vz009652LcBQ1`Q7k6&4gKEGbAzM_OE2pIj20U?Xa5 zX}Vzmo@XesW(=)pA8~VV0E+L!X$`k+9(Q?msc|@?b3M*(2zPvbqj^Zab|$)cHOhG< z(s~uYeKOK|AgX~>=6C|`c>suthcKG$zJo)EjgaSm3BZL*tBPhWqV42^8QFy?kdlw2 zk9y&UF5HPN%Z^U}hXA&dY3+(4PNwekiW|0+aQ2H1{fhwUjV#xZMoO&h|BM#@jv4%r z7@eP-^O7q5k{bV$8@Hc?|C1;Fmks=uC;gWw@R~aRnJWI7Gyj?_U$*Yhqjmh9G~}X9 zrmL>0tEl&%JpP_FY`5@Tyzl>?H~64M|DZVkp)Z8C&;Ou6{iH##vaWQ#?#Qo{)2@Tj zu8IGrOZcc>|EoQKzwrF3Q{}F8$Frizvz@iKwD+xA_pM-f#qR&ESO2bE^Ra00v2KdP z@A|V)sKCYAxS0O4V7$J&jL7ZwwQ~QpX#TZs^SOH0zM}WLaPzx?{km}bykwfp?f$%Z z@xY7kz>)U9jK;{t+{Lci#kBvxgZ#mQ)5yE=#G3lWegDLM?Z=y=)$jVog!IOi*vq)= z$*KCtjPJ^%&d|*N$d263yxPyg`^uH%&%gD~qUh1O)78@R(6G4N^4-01q@7TfG+}ZBg$mZM5_t~(;;rZ;_!^z?E+TY^%+qvD~+~nTf z_T0bEfh4c;^pAt-|peg^x?wz;L70T=;`C)<>%!7 z>*?+0>+b36=D@9X~U)b8-@{O;TJ@9yvM?(OpQ@bd5Z@agLF{Pgkm@$>Nf@#OFH_xSSh z^7Qfl^XBpP`SkYl`1bn#_U`le`}X+s^!fb%`0@4n{rLL!|M~a!`~La+`1<_$_x=C> z{QLR-|NZ~`A^s6Va%Ew3Wn>_CX>@2HM@dak04x9i0021vIRF3%{s6}bR7cRA!GrMR zDWu1+A;Ww3>`9ymv7$qV^AswacktjqbsZ0CbXYN>#F7;!syulQFJ~hk*GXR<=(lwCzR;Wphk6yz1LLZ z&4mw5+N(;`sMbAM-@Tg$w(eJb?n%oyXJ#ewQS$mxzi=@9yne62-lq*bZyeiXvf|SO1PX7cj&rB zn}mZ^wd2*^WW~0J-@fPjXzvbt53N+&(__Cw=g!BTXwIDeIq3l@d^9$Vwgp>)3!Ogb z@M(jE7?UB(yRrA(a~DkAsvbTVV$LN(2(d;q=N;in9!o5-2ypYj2c3MC&0`;SK;aWx zVd#wWOen+n;6o2b^iUuXc{m}&5i2gS#V_NaBjbA#QmD^`obgi*VKTCVOEiU4LWqbW zo@m4oNFK3-62~mFOf@p16X8Di#77%FC*h?}Y~YkL4mshl^2!*yNWlh?J_tdC51DAw zjyH-Bp#&k2>_SX5)`&w6I_0$E+=R1bS(J14C=<#!-wdOK5=Qi(1b{>eu>>{$R9dMv zTWm2&DZ}tl2`}M{gUggwg0)s%vCSinHCIGq%PszoLW-skJ|tu5t??{zgcC|Eamgja zi~~qGwaF;y#1e(DaZ4#?Fe?tJ&&@ZeJKuaG zjx)j-@rf;;j7Tk!+FX0B8%j7~#Tr)Fl1CoIbd#=ofNGf!I_Y*pj4i!f5l1hT@X&+A zX!>vjKK93&0MP(aO7vNR$y%tj1_;J||qW{6R-6&PDO4?4Hj zvxL4KTaiU4E!$EuI)EaYE-|e%-3l#n$jrka^;8;x`3dN0W!lPT0GMh+9}%P5uCU2cUqZfQ;QSFL1-%4YMZiQ#36_+ak;r zIK*J9y<7O;M9wVq&G$T&J|egke9$8L=q=wej6UqxVz$|*@PLC4*WRJVKgsk!L_C#F zpm_jyR2q2DL9Y>HC5`+6#~Nk?L)S~ujB*MpsL*msCy?V{#I2bJaKJxS)LQ8eyGK!} z*uaS4gr)a%%{MA~_#j55;@BNA{t*w3na>KD;sO#N zp_G^CqcQJb#~DIEzxqinXXMaa2_8YK$vvQN2B;J#es;hua6t+>n1(x=g1XRzh8~~b zfCYIlKUGv}9{LNw1vn@KCsgep{y#9l1H|!p(xV1kM9U~==oggV}kCL#Rs2y)tj z6&hqn;5oqoX?RDBdc;U}JQ9-VAO|_*VS@hfWgVlSm>ZDaYo53Zz0F zuw>*bWy#EDs$&xfxIqsrIkPko;g?4WrZAD{gbbj-9eaZ18}-plW{OK(<7mbQEKo6P z{*nku66TVu0E7fE;!EZJ6el^)$|ZSm%1XVr-tf791~4xO2=UX3((3)*;G=4fWUxMpj4$K zE$KZ}s?u)w)TioTgakCoQJH!`2GY1GPbYfLoi6noKaHwS#Q_Zx)Sy5$$iWPZummG) z01fhp>QhsywuwshtY;lZ7*ybbM9d=`O_)Ikh5=Qy{&cMOu&Z9v$_sSJ<1okAt6o!@ zSHbR;9BhOj!VHVnk`hG<0#S)(%RLudqw_@YG+H1Y@DXGqs^>dTicD<`c_8bK+bV+o7;K(l(?h)Ml;884tzG0 zSk85>EQ2eJ>I!$bqn!tGbIZ(itiu_h@Pj8_5sr0~7ai+hhB3+kjAsa>76K_}Hk?si z>k3!2+THF*^%My&xB?C>cmfRCP=#4kK@?TMgCMjJ2vRu05@e7>Fi5(L@Pwzn(l}0j zSv%a6Mk5wqr~@VXpotXVfeAZEfgrp90a?t!50=P65gc(1SipCp)hJwrFPz`&q9&!` z$VDm;K?y`0V+2gV0~N|Z136HE4wm4=D(o-_Koo-$k}yX~v!UZ1&*Qq)5ZF@15sh9D zLmWHU#fL4LL5yL%su{G19xb8~XJIf-8Y*1|F?9Up`i6P4-^j5oKtYT`8@kXVE3}@) zVOMD!ni%t_?`1a|S-aMivDrBEJEY-^?Rxstpx*AnY{8B$oBGtKPPM8FN9t{CLmJW0 qv+6*Bi9;Mhc2UT+u6NDrUiZ2SceukLFae6Q*<#Pq`0+df0suS5SGyJf diff --git a/logo.png b/logo.png index 6d2d92a4ee2f86c8283491b022a4674433971061..a8cfafd10a3f86d1a369148855c46e7e8078fce3 100644 GIT binary patch literal 1469 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz$r9IylHmNblJdl&R0hYC{G?O` z&)mfH)S%SFl*+=BsWuD@%o>>?5hW46K32*3xq68pHF_1f1wh>l3^w)^1&PVosU-?Y zsp*+{wo31J?^jaDOtDo8H}y5}EpSfF$n>ZxN)4{^3rViZPPR-@vbR&PsjvbXkegbP zs8ErclUHn2VXFi-*9yo63F|8hm3bwJ6}oxF$}kgLQj3#|G7CyF^YauyCMG83 zmzLNn0bL65LT&-v*t}wBFaZNhzap_f-%!s0*lEl2^R8JRMC7?NanVBh8Mvlg&PUfy|=H^CjhK8=Dj%MaSA#)3J z3ujA5GiPU*UYGpj(%jU%5}4i;xL!8{oO(eCBDVl&vrB4GW?5>ATTyu6FfcMQn!xmLy0HZF%Fcj1#$@%wl9Rq1exrJo(V<(lAw*h0yE*T>Fxq@L|61l%P*CAO6cT zAMWnv`14S4nbhMHHa5pYk{zu&?0^37=*aQ}91U43Au*}p<~+ey>H*urI@1y?_O|#1 z7W|fAK79Q6ilmsN5+CNS1E(g&i-o@Voh{|cXsy4YVQ<3}?;Vm7Eg=_9N3pe8pU!x~ z5MU#GYTEOLrw4cMXP&~FpPQa=V}=XR0Zt4ed*tO8cGXrh>u}~Xc^_&$(3By*glo}E z=DND1gcl3^raI2nkSIM6P{dHA)Wh(|Phr~efUkc{m=Eh1v;4oG@AZb|YRuCQN~~)= zk8!4mF&3%{6bIkjyg;qmddtawa|0HKaNVlwUL3SoWbtLEoXvMwZs}}SyZmYKj$OG1 z)gRTIR=7oH{HpLsvT6QuL+F+9q)VocTg+~1bC#Ta@X=pnAIcxvX!P$uw+UCV#Fh0gJkSjQdJsQ$R#sHN8Q6ac^{cg67qCoZFV%m8F$Jo=5W9@}iX zOrT5xPV@t93OC=SCUn$*L-7SQ+STzAF<4TFlj<#EE+;{x1bNiXHUKIeW}}l+c|jtw z)HDv90$yK_(b6Y(j>s1=LNnGfMtq?cer-d^E~Eo zEZOtCz?vZCMLY&B#poNJnqZG64QAv}5DgORgB%kO!-`SX>mYzecB(_KxsJn1F>??E zUU`(p4=Q`Y_kG84T-Rl024V0`M`?Y@>{8euCYu?8f!6V> z`|R1DuOTglcceF7?Jm65u2hs#E&Mf+N=*=x5k2CyA%JA`0-B%_1uC#zmxgzNg#73w z1eQFoDYN@0f!Sjo{)Mndl}zhLwkpk3Bs*WbOFz2R?Ol@H_CV^TZvrHb{1TcG%42dM zZk=T&!6nPKWA!!(ApFA|>Lm0b-}eC$wc|XztJZy9-?LYMm;#s6{lYG=OfeBa_SwI0 z4*j=qix4^~kA)7QDWj|OxremAg+fHuOw-gfE%d@h1fKemEZb@LV*+Rd-x}lW3=VwT zwgEs0IrMfZza+D7ou8X2%ZGD2{)r$!S{SXl5mE#|Q9ntrW{#}fz*-7`uIq+jgyyA` zrfD)O_zq;MEyTDkDdAkrQx^dsx9lk4lNrvH>d0><^q&0IKP_GI-JUJC1RZms6ol3k z?Ug4kz6>aLSqOmZ zx~}Vz*`40GwmSQAt5zi@C`VXBfCdu69){4HrcdS4>b0#v0rV}R>z)%&ej&f}pIOg> znb>!_7Siz@6Iy3FKQnXS*=pZX&-Jp|Y>Rs(*%gz4GIOm~4P8~qoEU!3nkX;>UInb$ zWm5z&Skb&MV_+HDmQ**behd)c07Oh0Ii>W_mLO2>(RW1UCsVb$I*>Rj&t=19^BCJ%`C^Kx^a$P4BN2OA!R4M_hAU!90aAP1$xFzzPkV3F( zO$ucS`Li%>p>w|qzZO=F@jU=K24Bt&ZME~~`kpsFJ|2=91VN=z@qNFAS{Ygkg21w@ z@RslU6B85B=T+e6&gk6tuWsjpzIX0tVL})*a47A(O})$MHNbm&-M7 z&0Ud@xFA+N``3bCbGSi^O{M{?+-rsU|(NfUtizq)vG-(O0uA5 zsC!IOhyM)v|Ne*k(W zvSN1972m8@vDh`zw`-<2ai)Z@%-+I~&-#7qluvshlaYxm?mNGc$8I z`n6gu)P^V&3dLfvSS%I_g-WGrHy6wCL}3>II2G}GKWrnx%l-o0^8seJ6pMJ>x^+o+ zUb}W}JZ>;ElUznif3U%}Y}~Erb|%d~`sky#-+nuQ8*jYv$#v_HKMU1i9NUgFF9)z-LF+(| zkB`^&u@7z5wPcnLrpo*43KkI3bA9(y%f#}3K)MGi06<|dBO)#yvY);o;}1za1t{U$ z!W~yK3lboKRIm8<{+Or!{{B*_1V9L}YtO#L2Os8xFH!GeeC-7QrBZ3;%$ZTT0{|Et z92^)JfHj7nUcq|0p5qG;ag^mWG9Cs>mI}`Odgik?K{;`jBjSY-y3R`7^7`ofo6EyT zq+5itRMNGr0{rMT+qPrpfVgS$#_43_ts{kH)=%L3Se|+W2m3QBL_xkng0YG`Y=P8ihe&!<((Z0jQ1NkqV zanlB^VwOd!QNd@{&jZf{94bgyp|^NX=P&|2fN6 zDc@@84-rWzsWC;hc2w;9<O{tu*`UKU=5i`cw-WUDq2} zC#MTS(@VpL-}vDlUz*u9(3@cf1LFD@!r*1w_TIgF=Pz8;@#-2rv=u@|%l>e^sR9@s zFgu|fI1?a^NJLl@YX?8TrnirsvHCmbF8?DaPUhMzU<|{ca=AQJsu7}>Mr!L%?(5w3 z*k$w6EHo&l-@TU>UyD>1Y9n~-N4)nLXc8bM0RrlK4j_R1Skq>05py^XhePO-;9-r z!#hOG^xFHykr^vief!}c@Ti@)wNPuCCWT?LEu+nE3eT~A@z`zi#{TPqdEJT;LZQ0( z&`av8_5{{g6+{d{LQL4f({B|oyY0sViO(f+*2h%pI9Tda{-eZ{Zrsn7*CfA0FbT&Fe-g>CPr(`gzXAD;%<)G5Ar zn6kskVfH}wvLrZlxzMoyZtZz`Li7}1~7%W>7l1mDJm9=Ckd~m zOPXOG-u~L)e|+nzbD-%uh(cZk2~J=oP22flVQ|*f7v1pJnr`4!cuAs9r_(3KI$eAa z!gJi6YrpY3+U~B-6f+!8m3&htl}|yFx*zb{M+3g}-X&Lk&9y2gq;MM0ZLpq(9yHxN z{PH6`yMEvsz2237Kd|&l&vie1{(A#Mn|4>a7O&Z8q;n_y>- z>FxndH#y8THN9FGlBo^`oz4d*LI3Sw)ig~?In`68l<)heoF2q8qH4GDr^ zBsbwEZ*wO8w$>xRoIXUv=)*Q*dfMZU3LyY!1YN*&EI#nEeB)l@gN?Q02PKp)K!7eF z2!=q>!H~sLS+clOTE|%!AWc91dXzIX6C6`88A;0}jg5^>PiNzJiLmJ?zxOfjo3lsX z{p6;@y;t_^I5vi#Eqh|n61Og-f7#DBo=s1E#7pwfG%g-L^q0oJ@vId*z8f;HAO4v? z`zr6uRc^;QlMS_O{7kNAv)MLSqk{yZkjrGL`uNC7>u*1v&uFS^Hr2+={25=_zT_L9 z(e{n=u_}r+{K;basLX%+YgPEeJstZV;p`k_2IPTtR6gjQcaODbO=@HtWY+GxuqDwB zf*@3I;#{s#$>nmQ#Q~=Q3LtMFL(a@kU!r&P>Y6U~j*d^A<9YP%Fy>`czkx3d(DVCM zx1@W|*IpUax$oj2H$TXot@2B~1-ELoqO2Ve6GPhY8!R)E19s@U;RbhzD%@d@P>qg` zPBZRPDcJXeYPBk)mdj>u`nmt;g=4;!%BBp<^`w9osK5_0nOwP6Q-RVnK_s%->_nyF zxlTt%-f>+hx3e?fc5-$cM=909Zf9pFjgF2soplIt${~~B1xf{h<2dDVxx2eN9G|$) zq2VA148!m|FLYMV^Ex^@lxiPFf*`PMI|f5UU0q!?GBR?Kbe?4F$extW@~F zYJA`KJhgYe3?q6q?G>$ X>X`4=$OXn%00000NkvXXu0mjflU#;> diff --git a/packlink.php b/packlink.php new file mode 100644 index 0000000..549091e --- /dev/null +++ b/packlink.php @@ -0,0 +1,1566 @@ +name = 'packlink'; + $this->tab = 'shipping_logistics'; + $this->version = '1.6.3'; + $this->author = '202-ecommerce'; + $this->module_key = 'a7a3a395043ca3a09d703f7d1c74a107'; + $this->ps_versions_compliancy = array('min' => '1.5', 'max' => '2.0'); + $this->bootstrap = true; + + parent::__construct(); + + $this->includeFiles(); + + $this->displayName = $this->l('Packlink PRO Shipping'); + $this->description = $this->l('Save up to 70% on your shipping costs. No fixed fees, no minimum shipping volume required. Manage all your shipments in a single platform.'); + + $default_language = new Country(Configuration::get('PS_COUNTRY_DEFAULT')); + $language = Tools::strtolower($default_language->iso_code); + + if ($language != "it" && $language != "es" && $language != "fr" && $language != "de") { + $language = "es"; + } + + if ($this->dev) { + $this->pl_url = "https://".$language."-profront-integration.packitos.com"; + } else { + $this->pl_url = "https://pro.packlink.".$language; + } + } + + private function includeFiles() + { + $path = $this->getLocalPath().'classes'.DIRECTORY_SEPARATOR; + foreach (scandir($path) as $class) { + if ($class != "index.php" && is_file($path.$class)) { + $class_name = Tools::substr($class, 0, -4); + if ($class_name != 'index' && !preg_match('#\.old#isD', $class) && !class_exists($class_name)) { + require_once $path.$class_name.'.php'; + } + } + } + + $path .= 'helper'.DIRECTORY_SEPARATOR; + + foreach (scandir($path) as $class) { + if ($class != "index.php" && is_file($path.$class)) { + $class_name = Tools::substr($class, 0, -4); + if ($class_name != 'index' && !preg_match('#\.old#isD', $class) && !class_exists($class_name)) { + require_once $path.$class_name.'.php'; + } + } + } + + $path .= '..'.DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'api'.DIRECTORY_SEPARATOR; + + foreach (scandir($path) as $class) { + if ($class != "index.php" && is_file($path.$class)) { + $class_name = Tools::substr($class, 0, -4); + if ($class_name != 'index' && !preg_match('#\.old#isD', $class) && !class_exists($class_name)) { + require_once $path.$class_name.'.php'; + } + } + } + } + + + ############################################################################################################ + # Install / Upgrade / Uninstall + ############################################################################################################ + + /** + * Module install + * @return boolean if install was successfull + */ + public function install() + { + // Install default + if (!parent::install()) { + return false; + } + + // install DataBase + if (!$this->installSQL()) { + return false; + } + if (!Configuration::updateValue('PL_IMPORT', 1)) { + return false; + } + if (!Configuration::updateValue('PL_CREATE_DRAFT_AUTO', 1)) { + return false; + } + if (!Configuration::updateValue('PL_API_KEY', '')) { + return false; + } + if (!Configuration::updateValue('PL_API_KG', '1')) { + return false; + } + if (!Configuration::updateValue('PL_API_CM', '1')) { + return false; + } + if (!Configuration::updateValue('PL_API_VERSION', '')) { + return false; + } + if (!Configuration::updateValue('PL_ST_AWAITING', 0)) { + return false; + } + if (!Configuration::updateValue('PL_ST_PENDING', 3)) { + return false; + } + if (!Configuration::updateValue('PL_ST_READY', 3)) { + return false; + } + if (!Configuration::updateValue('PL_ST_TRANSIT', 4)) { + return false; + } + if (!Configuration::updateValue('PL_ST_DELIVERED', 5)) { + return false; + } + + // Install tabs + if (!$this->installTabs()) { + return false; + } + + // Registration hook + if (!$this->registrationHook()) { + return false; + } + + if (!$this->createTab()) { + return false; + } + if (!$this->createTabPdf()) { + return false; + } + + return true; + } + + /** + * Module uninstall + * @return boolean if uninstall was successfull + */ + public function uninstall() + { + + // Uninstall default + if (!parent::uninstall()) { + return false; + } + + //Uninstall DataBase + if (!$this->uninstallSQL()) { + return false; + } + + if (!PlTotAdminTabHelper::deleteAdminTabs('AdminTabPacklink')) { + return false; + } + + if (!PlTotAdminTabHelper::deleteAdminTabs('AdminGeneratePdfPl')) { + return false; + } + + // Delete tabs + if (!$this->uninstallTabs()) { + return false; + } + + if (!Configuration::deleteByName('PL_API_KEY')) { + return false; + } + if (!Configuration::deleteByName('PL_IMPORT')) { + return false; + } + if (!Configuration::deleteByName('PL_API_CM')) { + return false; + } + if (!Configuration::deleteByName('PL_API_KG')) { + return false; + } + if (!Configuration::deleteByName('PL_API_VERSION')) { + return false; + } + if (!Configuration::deleteByName('PL_ST_AWAITING')) { + return false; + } + if (!Configuration::deleteByName('PL_ST_PENDING')) { + return false; + } + if (!Configuration::deleteByName('PL_ST_READY')) { + return false; + } + if (!Configuration::deleteByName('PL_ST_TRANSIT')) { + return false; + } + if (!Configuration::deleteByName('PL_ST_DELIVERED')) { + return false; + } + if (!Configuration::deleteByName('PL_CREATE_DRAFT_AUTO')) { + return false; + } + + return true; + } + + + ############################################################################################################ + # Tabs + ############################################################################################################ + + public function createTab() + { + if (version_compare(_PS_VERSION_, '1.6', '>=')) { + $parent = 14; + } else { + $parent = 13; + } + PlTotAdminTabHelper::addAdminTab(array( + 'id_parent' => $parent, + 'className' => 'AdminTabPacklink', + 'default_name' => 'Packlink', + 'name' => 'Packlink PRO', + 'active' => true, + 'module' => $this->name, + )); + + return true; + } + + public function createTabPdf() + { + PlTotAdminTabHelper::addAdminTab(array( + 'id_parent' => 14, + 'className' => 'AdminGeneratePdfPl', + 'default_name' => 'PacklinkPdf', + 'name' => 'PacklinkPdf', + 'active' => false, + 'module' => $this->name, + )); + + return true; + } + + /** + * Initialisation to install / uninstall + */ + private function installTabs() + { + + $menu_id = 14; + + // Install All Tabs directly via controller's install function + $path = $this->getLocalPath().'controllers'.DIRECTORY_SEPARATOR.'admin'.DIRECTORY_SEPARATOR; + $controllers = scandir($path); + foreach ($controllers as $controller) { + if ($controller != 'index.php' && !preg_match('#\.old#isD', $controller) && is_file($path.$controller)) { + require_once $path.$controller; + $controller_name = Tools::substr($controller, 0, -4); + //Check if class_name is an existing Class or not + if (class_exists($controller_name)) { + if (method_exists($controller_name, 'install')) { + if (!call_user_func(array($controller_name, 'install'), $menu_id, $this->name)) { + return false; + } + } + } + } + } + return true; + } + + + /** + * Delete tab + * @return boolean if successfull + */ + public function uninstallTabs() + { + return PlTotAdminTabHelper::deleteAdminTabs($this->name); + } + + ############################################################################################################ + # SQL + ############################################################################################################ + + /** + * Install DataBase table + * @return boolean if install was successfull + */ + private function installSQL() + { + // Install All Object Model SQL via install function + $path = $this->getLocalPath().'classes'.DIRECTORY_SEPARATOR; + $classes = scandir($path); + foreach ($classes as $class) { + if ($class != 'index.php' && !preg_match('#\.old#isD', $class) && is_file($path.$class)) { + $class_name = Tools::substr($class, 0, -4); + // Check if class_name is an existing Class or not + if (class_exists($class_name)) { + if (method_exists($class_name, 'install')) { + if (!call_user_func(array($class_name, 'install'))) { + return false; + } + } + } + } + } + + $sql = array(); + $sql[] = "CREATE TABLE IF NOT EXISTS `"._DB_PREFIX_."packlink_orders` ( + `id_order` INT(11) NOT NULL PRIMARY KEY, + `draft_reference` VARCHAR(255) NOT NULL, + `postcode` VARCHAR(21), + `postalzone` INT(11), + `details` VARCHAR(1500), + `pdf` VARCHAR(1500) + ) ENGINE = "._MYSQL_ENGINE_." "; + + $sql[] = "CREATE TABLE IF NOT EXISTS `" . _DB_PREFIX_ . "packlink_wait_draft` ( + `id_order` INT(11) NOT NULL PRIMARY KEY, + `date_add` DATE + ) ENGINE = " . _MYSQL_ENGINE_ . " "; + + foreach ($sql as $q) { + if (!DB::getInstance()->execute($q)) { + return false; + } + } + + return true; + } + + /** + * Uninstall DataBase table + * @return boolean if install was successfull + */ + private function uninstallSQL() + { + // Uninstall All Object Model SQL via install function + $path = $this->getLocalPath().'classes'.DIRECTORY_SEPARATOR; + $classes = scandir($path); + foreach ($classes as $class) { + if ($class != 'index.php' && !preg_match('#\.old#isD', $class) && is_file($path.$class)) { + $class_name = Tools::substr($class, 0, -4); + // Check if class_name is an existing Class or not + if (class_exists($class_name)) { + if (method_exists($class_name, 'uninstall')) { + if (!call_user_func(array($class_name, 'uninstall'))) { + return false; + } + } + } + } + } + + $sql = "DROP TABLE IF EXISTS `"._DB_PREFIX_."packlink_orders`"; + if (!DB::getInstance()->execute($sql)) { + return false; + } + + $sql_wait = "DROP TABLE IF EXISTS `"._DB_PREFIX_."packlink_wait_draft`"; + if (!DB::getInstance()->execute($sql_wait)) { + return false; + } + + return true; + } + + + ############################################################################################################ + # Hook + ############################################################################################################ + + /** + * [registrationHook description] + * @return [type] [description] + */ + private function registrationHook() + { + // Example : + if (!$this->registerHook('actionObjectOrderHistoryAddAfter')) { + return false; + } + + if (!$this->registerHook('actionObjectOrderUpdateAfter')) { + return false; + } + + if (!$this->registerHook('actionOrderStatusPostUpdate')) { + return false; + } + + if (!$this->registerHook('displayOrderDetail')) { + return false; + } + + if (!$this->registerHook('displayBackOfficeHeader')) { + return false; + } + if (version_compare(_PS_VERSION_, '1.6.1', '>=')) { + if (!$this->registerHook('displayAdminOrderContentShip')) { + return false; + } + if (!$this->registerHook('displayAdminOrderTabShip')) { + return false; + } + } + + if (!$this->registerHook('displayAdminOrder')) { + return false; + } + + if (!$this->registerHook('displayHeader')) { + return false; + } + + return true; + } + + /* + ** Hook update carrier + ** + */ + + ############################################################################################################ + # Administration + ############################################################################################################ + + /** + * Admin display + * @return String Display admin content + */ + public function getContent() + { + + // Suffix to link + $suffixLink = '&configure='.$this->name.'&token='.Tools::getValue('token'); + $suffixLink .= '&tab_module='.$this->tab.'&module_name='.$this->name; + $output = ''; + $link = new Link; + if (Tools::getValue('PL_tab_name')) { + $tab_name = Tools::getValue('PL_tab_name'); + } else { + $tab_name = "home_settings"; + } + + $sdk = new PacklinkSDK(Configuration::get('PL_API_KEY'), $this); + + $default_language = new Country(Configuration::get('PS_COUNTRY_DEFAULT')); + $language = Tools::strtolower($default_language->iso_code); + + if ($language != "it" && $language != "es" && $language != "fr" && $language != "de") { + $language = "es"; + } + + // Base + if (version_compare(_PS_VERSION_, '1.5', '>')) { + $this->module_link = 'index.php?controller='.Tools::getValue('controller').$suffixLink; + } else { + $this->module_link = 'index.php?tab='.Tools::getValue('tab').$suffixLink; + } + + + if (Tools::getValue('submit-query')) { + $PL_API_KEY = Tools::getValue('PL_API_KEY'); + $check_key = $this->callAnalitics($PL_API_KEY, "setup"); + $this->callbackEvents($PL_API_KEY); + Configuration::updateValue('PL_API_KEY', $PL_API_KEY); + $output .=$this->displayConfirmation($this->l('Settings updated successfully')); + } else { + $PL_API_KEY = Configuration::get('PL_API_KEY'); + } + + $warehouses = $sdk->getWarehouses(); + if (isset($warehouses->message)) { + $show_address = false; + } else { + $show_address = true; + } + + if ($language == "it") { + $pl_aide = "https://support-pro.packlink.com/hc/it/sections/202755109-Prestashop"; + } elseif ($language == "de") { + $pl_aide = "https://support-pro.packlink.com/hc/de/sections/202755109-Prestashop"; + } elseif ($language == "es" || $language == "en") { + $pl_aide = "https://support-pro.packlink.com/hc/es-es/sections/202755109-Prestashop"; + } elseif ($language == "fr") { + $pl_aide = "https://support-pro.packlink.com/hc/fr-fr/sections/202755109-Prestashop"; + } else { + $pl_aide = "https://support-pro.packlink.com/hc/es-es/sections/202755109-Prestashop"; + } + + $carrier_link = $this->pl_url. '/prestashop?utm_source=partnerships&utm_content=link&utm_campaign=backoffice'; + + $generate_api = $this->pl_url.'/private/settings/integrations/prestashop_module'; + + $link_pro_addr = $this->pl_url.'/private/settings/warehouses'; + + if (Tools::getValue('submit-conversion')) { + $length = Tools::getValue('length'); + if (!$length) { + $length = 1; + } + Configuration::updateValue('PL_API_CM', $length); + $weight = Tools::getValue('weight'); + if (!$weight) { + $weight = 1; + } + Configuration::updateValue('PL_API_KG', $weight); + $output .=$this->displayConfirmation($this->l('Settings updated successfully')); + } else { + $length = Configuration::get('PL_API_CM'); + $weight = Configuration::get('PL_API_KG'); + } + + if (Tools::getValue('submit-create-pl')) { + $packlink_createPl = Tools::getValue('createPl'); + Configuration::updateValue('PL_CREATE_DRAFT_AUTO', $packlink_createPl); + if (Tools::getValue('createPl') == 1) { + $this->callAnalitics($PL_API_KEY, "automatic_export_option"); + } else { + $this->callAnalitics($PL_API_KEY, "manual_export_option"); + } + $output .=$this->displayConfirmation($this->l('Settings updated successfully')); + } else { + $packlink_createPl = Configuration::get('PL_CREATE_DRAFT_AUTO'); + } + + if (Tools::getValue('submit-import')) { + $packlink_import = Tools::getValue('import'); + Configuration::updateValue('PL_IMPORT', $packlink_import); + $output .=$this->displayConfirmation($this->l('Settings updated successfully')); + } else { + $packlink_import = Configuration::get('PL_IMPORT'); + } + + $unit_weight = Configuration::get('PS_WEIGHT_UNIT'); + $unit_length = Configuration::get('PS_DIMENSION_UNIT'); + $link_units = $this->context->link->getAdminLink('AdminLocalization').'#PS_CURRENCY_DEFAULT'; + $link_status = $this->context->link->getAdminLink('AdminStatuses'); + + $update_msg = ''; + if (Configuration::get('PL_API_VERSION') == '' || version_compare(Configuration::get('PL_API_VERSION'), $this->version, '<')) { + $update_msg = $this->displayConfirmation($this->l('v1.1: All of your paid orders will now be imported automatically into Packlink PRO').'
'.$this->l('v1.2: Sent content(s) will be filled automatically for your Packlink PRO shipments').'
'.$this->l('v1.3: Shipment details and tracking number automatically imported into PrestaShop orders. Auto-population of missing product data in catalog (weight/dimensions)').'
'.$this->l('v1.4: Synchronization of Packlink PRO shipping statuses with PrestaShop order statuses to keep your orders up-to-date').'
'.$this->l('v1.5: Configuration page redesign. Default "ship from" address management from Packlink PRO settings').'
'.$this->l('v1.6: New actions buttons which indicates the next action required for each order status. Option to choose between automatic or manual shipment creation.')); + Configuration::updateValue('PL_API_VERSION', $this->version); + } + + $default_lang = $this->context->language->id; + $order_state = OrderState::getOrderStates($default_lang); + + if (Tools::getValue('submit-status')) { + $status_awaiting = Tools::getValue('select_awaiting'); + Configuration::updateValue('PL_ST_AWAITING', $status_awaiting); + $status_pending = Tools::getValue('select_pending'); + Configuration::updateValue('PL_ST_PENDING', $status_pending); + $status_ready = Tools::getValue('select_ready'); + Configuration::updateValue('PL_ST_READY', $status_ready); + $status_transit = Tools::getValue('select_transit'); + Configuration::updateValue('PL_ST_TRANSIT', $status_transit); + $status_delivered = Tools::getValue('select_delivered'); + Configuration::updateValue('PL_ST_DELIVERED', $status_delivered); + $output .=$this->displayConfirmation($this->l('Settings updated successfully')); + } else { + $status_awaiting = Configuration::get('PL_ST_AWAITING'); + $status_pending = Configuration::get('PL_ST_PENDING'); + $status_ready = Configuration::get('PL_ST_READY'); + $status_transit = Configuration::get('PL_ST_TRANSIT'); + $status_delivered = Configuration::get('PL_ST_DELIVERED'); + } + + $this->context->smarty->assign(array( + 'PL_API_KEY' => $PL_API_KEY, + 'carrier_link' => $carrier_link, + 'generate_api' => $generate_api, + 'module_link' => $this->module_link, + 'language' => $language, + 'link' => $link->getAdminLink('AdminPackLink', true).'&ajax=true&action=GetPostCode', + 'weight' => $weight, + 'length' => $length, + 'unit_weight' => $unit_weight, + 'unit_length' => $unit_length, + 'packlink_import' => $packlink_import, + 'simple_link' => $this->_path, + 'update_msg' => $update_msg, + 'order_state' => $order_state, + 'status_awaiting' => $status_awaiting, + 'status_pending' => $status_pending, + 'status_ready' => $status_ready, + 'status_transit' => $status_transit, + 'status_delivered' => $status_delivered, + 'tab_name' => $tab_name, + 'link_units' => $link_units, + 'link_status' => $link_status, + 'link_pro_addr' => $link_pro_addr, + 'warehouses' => $warehouses, + 'show_address' => $show_address, + 'pl_aide' => $pl_aide, + 'packlink_createPl' => $packlink_createPl, + )); + $this->postProcess(); + + if (version_compare(_PS_VERSION_, '1.6', '<')) { + $this->context->controller->addCSS($this->_path.'views/css/bootstrap.min.css', 'all'); + $this->context->controller->addCSS($this->_path.'views/css/style15.css', 'all'); + $this->context->controller->addJS($this->_path.'views/js/bootstrap.min.js', 'all'); + $this->context->controller->addJS(_PS_JS_DIR_.'/jquery/plugins/autocomplete/jquery.autocomplete.js', 'all'); + } else { + $this->context->controller->addCSS($this->_path.'views/css/style16.css', 'all'); + } + + return $update_msg.$output.$this->display(__FILE__, 'back.tpl'); + + } + + public function callAnalitics($api_key, $event) + { + # TODO : call to packlink + $body = array( + 'ecommerce' => 'prestashop', + 'ecommerce_version' => _PS_VERSION_, + 'event' => $event + ); + $sdk = new PacklinkSDK($api_key, $this); + $datas = $sdk->createAnalitics($body, $api_key); + + return $datas; + + } + + + public function callbackEvents($api_key) + { + # TODO : call to packlink + if (isset($_SERVER['HTTPS'])) { + $url_shop = Tools::getShopDomainSsl(true); + } else { + $url_shop = Tools::getShopDomain(true); + } + + $body = array( + 'url' => $url_shop.'/modules/packlink/status.php' + ); + $sdk = new PacklinkSDK($api_key, $this); + $datas = $sdk->createCallback($body, $api_key); + + return $datas; + + } + + public function getCartAddressDelivery($id_address_delivery) + { + + $sql = 'SELECT * FROM '._DB_PREFIX_.'address WHERE id_address = '.(int)$id_address_delivery; + $id_address_delivery = Db::getInstance()->executeS($sql); + + return $id_address_delivery; + + } + + public function getCartCountryDelivery($country) + { + + $sql = 'SELECT iso_code FROM '._DB_PREFIX_.'country WHERE id_country = '.(int)$country; + $country = Db::getInstance()->getValue($sql); + + return $country; + + } + + public function getCartStateDelivery($state) + { + + $sql = 'SELECT name FROM '._DB_PREFIX_.'state WHERE id_state = '.(int)$state; + $state = Db::getInstance()->getValue($sql); + + return $state; + + } + + public function getEmailDelivery($customer_id) + { + + $sql = 'SELECT email FROM '._DB_PREFIX_.'customer WHERE id_customer = '.(int)$customer_id; + $customer_email = Db::getInstance()->getValue($sql); + + return $customer_email; + + } + + public function getCartProductCat($id_category) + { + + $sql = 'SELECT name FROM '._DB_PREFIX_.'category_lang WHERE id_category = '.(int)$id_category; + $id_category_default = Db::getInstance()->getValue($sql); + + return $id_category_default; + + } + + public function convertToDistance($distance) + { + $distance = $distance / Configuration::get('PL_API_KG'); + return $distance; + } + + public function convertToWeight($weight) + { + $weight = $weight / Configuration::get('PL_API_CM'); + return $weight; + } + + + + public function hookdisplayBackOfficeHeader($params) + { + if (Tools::strtolower(Tools::getValue('controller')) == "adminorders" && Tools::getValue('id_order')) { + $this->execCreatePlShipment(Tools::getValue('id_order')); + $this->createPacklinkDetails(Tools::getValue('id_order')); + } + } + + public function hookDisplayHeader($params) + { + + if (Tools::getValue('controller') == "orderconfirmation" && Tools::getValue('id_order')) { + $this->execCreatePlShipment(); + $this->createPacklinkDetails(Tools::getValue('id_order')); + } + + } + + public function hookdisplayAdminOrder($params) + { + if (!$this->pl_hook) { + $this->pl_hook = true; + } else { + return ''; + } + $id_order = $params['id_order']; + $pl_order = new PLOrder($id_order); + + $order_ps = new Order($id_order); + $expedition_pl = ''; + + $pl_shippement = ''; + + if (Tools::getValue('create_pl_draft') == 1) { + if (Configuration::get('PL_API_KEY')) { + $this->createPlShippement($id_order); + Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminOrders')."&id_order=".$id_order."&vieworder"); + } else { + $this->context->controller->warnings[] = sprintf($this->l('No api key found')); + } + } + + if (!$pl_order->id_order) { + $this->context->smarty->assign(array( + 'simple_link' => $this->_path, + 'reference' => " ", + 'suivi' => $this->l('Create'), + 'iconBtn' => "icon-plus-sign", + 'link_suivi' => Context::getContext()->link->getAdminLink('AdminOrders')."&id_order=".$id_order."&vieworder&create_pl_draft=1", + 'img15' => 'views/img/add.gif', + 'target' => '_self' + )); + + if (version_compare(_PS_VERSION_, '1.6', '<')) { + $expedition_pl = $this->display(__FILE__, 'expedition15.tpl'); + } else { + $expedition_pl = $this->display(__FILE__, 'expedition.tpl'); + } + + return $expedition_pl; + } + + if ($pl_order->details && $pl_order->details != '') { + + $details = Tools::jsonDecode($pl_order->details); + $sdk = new PacklinkSDK(Configuration::get('PL_API_KEY'), $this); + + + $this->context->smarty->assign(array( + 'simple_link' => $this->_path, + 'reference' => $this->l('Shipping reference: ').$pl_order->draft_reference + )); + + if ($details->state == "AWAITING_COMPLETION" || $details->state == "READY_TO_PURCHASE") { + $this->context->smarty->assign(array( + 'suivi' => $this->l('Send'), + 'iconBtn' => "icon-truck", + 'link_suivi' => $details->tracking_url, + 'img15' => 'views/img/delivery.gif', + 'target' => '_blank' + )); + } else if ($details->state == "READY_TO_PRINT" || $details->state == "READY_FOR_COLLECTION") { + $pdf_url = $pl_order->pdf; + if (!$pdf_url || $pdf_url == '') { + $url = $sdk->getPdfLabels($pl_order->draft_reference); + $pdf_url = $url['0']; + } + + $this->context->smarty->assign(array( + 'suivi' => $this->l('Print'), + 'iconBtn' => "icon-print", + 'link_suivi' => $pdf_url, + 'img15' => 'views/img/printer.gif', + 'target' => '_self' + )); + } else if ($details->state == "IN_TRANSIT" || $details->state == "DELIVERED" || $details->state == 'PURCHASE_SUCCESS' || $details->state == "CARRIER_PENDING" || $details->state == 'CARRIER_OK' || $details->state == 'CARRIER_KO' || $details->state == 'CANCELED') { + $this->context->smarty->assign(array( + 'suivi' => $this->l('View'), + 'iconBtn' => "icon-search", + 'link_suivi' => $details->tracking_url, + 'img15' => 'views/img/search.gif', + 'target' => '_blank' + )); + } + if (version_compare(_PS_VERSION_, '1.6', '<')) { + $expedition_pl = $this->display(__FILE__, 'expedition15.tpl'); + } else { + $expedition_pl = $this->display(__FILE__, 'expedition.tpl'); + } + + + if ($details->state == "AWAITING_COMPLETION" || $details->state == "READY_TO_PURCHASE") { + return $expedition_pl; + } + + $location = ''; + if ($details->dropoff_point_id) { + $location = $details->location; + } + + $sdk = new PacklinkSDK(Configuration::get('PL_API_KEY'), $this); + + if ($details->state == "READY_TO_PRINT" || $details->state == "READY_FOR_COLLECTION") { + $button = $this->l('Print'); + $target = "_self"; + $img_pl = "printer.gif"; + $icon = "icon-print"; + $pdf_url = $pl_order->pdf; + if (!$pdf_url || $pdf_url == '') { + $url = $sdk->getPdfLabels($pl_order->draft_reference); + $pdf_url = $url['0']; + } + $href = $pdf_url; + } else { + $button = $this->l('View'); + $target = "_blank"; + $img_pl = "search.gif"; + $icon = "icon-search"; + $href = $details->tracking_url; + } + if (version_compare(_PS_VERSION_, '1.6', '<')) { + $this->context->controller->addCSS($this->_path.'views/css/style15.css', 'all'); + } else { + $this->context->controller->addCSS($this->_path.'views/css/style16.css', 'all'); + } + $svg_icon = ' + + '; + if (version_compare(_PS_VERSION_, '1.6.1', '<') && version_compare(_PS_VERSION_, '1.6', '>=')) { + $pl_shippement .= ' + '; + + $pl_shippement .= ' + + '; + } else if (version_compare(_PS_VERSION_, '1.6', '<')) { + $pl_shippement .= '
+ '.$svg_icon.$this->l('Tracking with Packlink PRO').''; + + $pl_shippement .= ' + + + + + + + + + + + + + + + + '; + + if ($location != '') { + $pl_shippement .= ''; + } + + $pl_shippement .= ' +
'.$this->l('Date').''.$this->l('Carrier').''.$this->l('Weight').''.$this->l('Shipping costs').''.$this->l('Tracking number').'
'.$details->date.''.$details->carrier.'
'.$details->service.'
'.$details->weight.' '.Configuration::get('PS_WEIGHT_UNIT').''.$details->cost.' '.$this->l('EUR').' + '; + if ($details->tracking) { + foreach ($details->tracking as $key => $value) { + $pl_shippement .= ''.$value.'
'; + } + } + + $pl_shippement .= '
'.$button.'
'.$location->company.'
+ '.$location->street1.'
'.$location->street2.'
+ '.$location->zip_code.' '.$location->city.'
'; + $pl_shippement .= '
'; + } + + } + return $pl_shippement.$expedition_pl; + + } + + public function hookdisplayAdminOrderTabShip($params) + { + $id_order = $params['order']->id; + $pl_order = new PLOrder($id_order); + if ($pl_order->details && $pl_order->details != '') { + $details = Tools::jsonDecode($pl_order->details); + if ($details->state == "AWAITING_COMPLETION" || $details->state == "READY_TO_PURCHASE") { + return ''; + } + if (version_compare(_PS_VERSION_, '1.6', '<')) { + $this->context->controller->addCSS($this->_path.'views/css/style15.css', 'all'); + } else { + $this->context->controller->addCSS($this->_path.'views/css/style16.css', 'all'); + } + return ''; + } + } + + public function createPacklinkDetails($id_order) + { + $pl_order = new PLOrder($id_order); + if ($pl_order->id_order != '' && $pl_order->draft_reference != '') { + $reference = $pl_order->draft_reference; + $sdk = new PacklinkSDK(Configuration::get('PL_API_KEY'), $this); + $datas = $sdk->getShippementDetails($reference); + $items = ''; + $this->logs[] = '======================================================================================================'; + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Shippement state from Packlink Pro : '.$datas->state; + + $default_language = new Country(Configuration::get('PS_COUNTRY_DEFAULT')); + $language = Tools::strtolower($default_language->iso_code); + if ($language != "it" && $language != "es" && $language != "fr" && $language != "de") { + $language = "es"; + } + + if ($datas->state) { + $track = '/'.$reference; + if (($datas->state == "READY_TO_PRINT" || $datas->state == "READY_FOR_COLLECTION") && !$pl_order->pdf) { + $pdf = $sdk->getPdfLabels($pl_order->draft_reference); + $pl_order->pdf = $pdf[0]; + } + $pl_order->details = Tools::jsonEncode(array( + 'date' => $datas->order_date, + 'carrier' => $datas->carrier, + 'service' => $datas->service, + 'weight' => $datas->packages[0]->weight, + 'cost' => $datas->price->total_price, + 'tracking' => $datas->trackings, + 'tracking_url' => $this->pl_url.'/private/shipments'.$track, + 'location' => $datas->to, + 'tracking_url_fo' => $datas->tracking_url, + 'dropoff_point_id' => $datas->dropoff_point_id, + 'state' => $datas->state + )); + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Data from Packlink Pro : '.$pl_order->details; + + $pl_order->save(); + if (isset($datas->additional_data->items)) { + $items = $datas->additional_data->items; + } + $import = Configuration::get('PL_IMPORT'); + if ($import == 1 && count($items) == 1 && $items[0]->quantity == 1) { + $order = new Order($id_order); + + $products = $order->getProducts(); + + if (isset($products) && !empty($products)) { + foreach ($products as $key => $value) { + $product = new Product($products[$key]['product_id']); + } + + if ($product->width == 0) { + $product->width = ($datas->packages[0]->width * Configuration::get('PL_API_CM')); + } + if ($product->depth == 0) { + $product->depth = ($datas->packages[0]->length * Configuration::get('PL_API_CM')); + } + if ($product->weight == 0) { + $product->weight = ($datas->packages[0]->weight * Configuration::get('PL_API_KG')); + } + if ($product->height == 0) { + $product->height = ($datas->packages[0]->height * Configuration::get('PL_API_CM')); + } + $product->save(); + } + } + } + } + if ($this->debug) { + $this->writeLog(); + } + } + + public function hookdisplayOrderDetail($params) + { + $id_order = $params['order']->id; + $this->createPacklinkDetails($id_order); + + $order = new Order($id_order); + $carrier = $order->getShipping(); + if (version_compare(_PS_VERSION_, '1.6', '<')) { + $version = 0; + } else { + $version = 1; + } + + $pl_order = new PLOrder($id_order); + if ($pl_order->details && $pl_order->details != '') { + $details = Tools::jsonDecode($pl_order->details); + if ($details->carrier) { + $temp = explode('/', $details->date); + $date_pl = $temp[2].'/'.$temp[1].'/'.$temp[0]; + + $this->context->smarty->assign(array( + 'details' => $details, + 'date' => $date_pl, + 'carrierPL' => $details->carrier, + 'weight' => $details->weight, + 'trackings' => $details->tracking, + 'tracking_url' => $details->tracking_url_fo, + 'version' => $version, + 'carr_pl_name' => $this->l('Carrier') + )); + + return $this->display(__FILE__, 'order_details.tpl'); + } + } + } + + public function hookdisplayAdminOrderContentShip($params) + { + $id_order = $params['order']->id; + $pl_order = new PLOrder($id_order); + $sdk = new PacklinkSDK(Configuration::get('PL_API_KEY'), $this); + + + $pl_shippement = ''; + if ($pl_order->details && $pl_order->details != '') { + $details = Tools::jsonDecode($pl_order->details); + if ($details->state == "AWAITING_COMPLETION" || $details->state == "READY_TO_PURCHASE") { + return $pl_shippement; + } + $location = ''; + if ($details->dropoff_point_id) { + $location = $details->location; + } + $pl_shippement .= ' + '; + } + + return $pl_shippement; + } + + public function hookactionOrderStatusPostUpdate($params) + { + if ($params['newOrderStatus']->id != _PS_OS_WS_PAYMENT_ && $params['newOrderStatus']->id != _PS_OS_PAYMENT_) { + return false; + } + + Db::getInstance()->insert( + 'packlink_wait_draft', + array( + 'id_order' => $params['id_order'], + 'date_add' => date('Y-m-d H:i:s'), + ) + ); + } + + private function execCreatePlShipment($id_order = null) + { + $query = new DbQuery(); + $query->from('packlink_wait_draft'); + $query->where('id_order NOT IN (SELECT id_order FROM '._DB_PREFIX_.'packlink_orders) '); + + $orders = Db::getInstance()->executeS($query); + + $refresh = false; + if (Configuration::get('PL_CREATE_DRAFT_AUTO')) { + if ($orders && count($orders)) { + foreach ($orders as $order) { + + $this->createPlShippement($order['id_order']); + + if ($order['id_order'] == $id_order) { + $refresh = true; + } + } + } + } + if ($refresh) { + Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminOrders') . "&id_order=" . $id_order . "&vieworder"); + } + + } + + public function createPlShippement($id_order_params) + { + $order = new Order((int) $id_order_params); + + $address_delivery = $this->getCartAddressDelivery($order->id_address_delivery); + $country_delivery = $this->getCartCountryDelivery($address_delivery[0]['id_country']); + $state_delivery = $this->getCartStateDelivery($address_delivery[0]['id_state']); + if (!$state_delivery) { + $state_delivery = ''; + } + if ($address_delivery[0]['phone_mobile'] || $address_delivery[0]['phone_mobile'] != '') { + $phone_delivery = $address_delivery[0]['phone_mobile']; + } else { + $phone_delivery = $address_delivery[0]['phone']; + } + $email_delivery = $this->getEmailDelivery($address_delivery[0]['id_customer']); + + $cart_products = array(); + $cart_products = $order->getProducts(); + + + $sdk = new PacklinkSDK(Configuration::get('PL_API_KEY'), $this); + $datas_client = $sdk->getCitiesByPostCode($address_delivery[0]['postcode'], $country_delivery); + if (isset($datas_client->message)) { + return false; + } + + $postal_zone_id_to = $datas_client[0]->postalZone->id; + $zip_code_id_to = $datas_client[0]->id; + + if (count($datas_client) > 1) { + foreach ($datas_client as $key => $value) { + $city = Tools::strtolower($address_delivery[0]['city']); + $arr = array("-", "/", ",", "_"); + $city_formated = str_replace($arr, " ", $city); + $city_formated_pl = Tools::strtolower(str_replace($arr, " ", $value->city->name)); + + if ($city_formated_pl == $city_formated) { + $postal_zone_id_to = $value->postalZone->id; + $zip_code_id_to = $value->id; + } + } + } + + + + $shipments_datas = + array( + 'to' => array( + 'name' => $address_delivery[0]['firstname'], + 'surname' => $address_delivery[0]['lastname'], + 'company' => $address_delivery[0]['company'], + 'street1' => $address_delivery[0]['address1'], + 'street2' => $address_delivery[0]['address2'], + 'zip_code' => $address_delivery[0]['postcode'], + 'city' => $address_delivery[0]['city'], + 'country' => $country_delivery, + 'state' => $state_delivery, + 'phone' => $phone_delivery, + 'email' => $email_delivery + ), + 'additional_data' => array( + 'postal_zone_id_to' => $postal_zone_id_to, + 'zip_code_id_to' => $zip_code_id_to, + ), + 'contentvalue' => $order->total_products_wt, + 'source' => 'module_prestashop', + ); + + if (count($cart_products) > 0) { + if (count($cart_products) == 1) { + foreach ($cart_products as $key => $value) { + if ($cart_products[$key]['product_quantity'] == 1) { + $weight = $this->convertToWeight($cart_products[$key]['weight']); + $width = $this->convertToDistance($cart_products[$key]['width']); + $height = $this->convertToDistance($cart_products[$key]['height']); + $depth = $this->convertToDistance($cart_products[$key]['depth']); + + $packages = array( + 'weight' => $weight, + 'length' => $depth, + 'width' => $width, + 'height' => $height + ); + } else { + $packages = array( + 'weight' => 0, + 'length' => 0, + 'width' => 0, + 'height' => 0 + ); + } + + } + } else { + $packages = array( + 'weight' => 0, + 'length' => 0, + 'width' => 0, + 'height' => 0 + ); + } + $shipments_datas['packages'][] = $packages; + $cmpt = 0; + foreach ($cart_products as $key => $value) { + + $category = $this->getCartProductCat($value['id_category_default']); + + $product_link = $this->context->link->getProductLink($value['product_id']); + $product = new Product($value['product_id'], false, Context::getContext()->language->id); + + $image = Image::getImages(Context::getContext()->language->id, $value['product_id'], $value['product_attribute_id']); + if (empty($image)) { + $image = Image::getCover($value['product_id']); + $product_img_link = $this->context->link->getImageLink($product->link_rewrite, $image['id_image']); + } else { + $product_img_link = $this->context->link->getImageLink($product->link_rewrite, $image[0]['id_image']); + } + + $weight = $this->convertToWeight($value['weight']); + $width = $this->convertToDistance($value['width']); + $height = $this->convertToDistance($value['height']); + $depth = $this->convertToDistance($value['depth']); + + $value['cart_quantity'] = $value['product_quantity']; + + $items = + array( + 'quantity' => $value['cart_quantity'], + 'category_name' => $category, + 'picture_url' => $product_img_link, + 'item_id' => $value['product_id'], + 'price' => $value['product_price_wt'], + 'item_url' => $product_link, + 'title' => $value['product_name'] + ); + + $shipments_datas['additional_data']['items'][] = $items; + + for ($i = 1; $i <= $value['cart_quantity']; $i++) { + $packages = array( + 'weight' => $weight, + 'length' => $depth, + 'width' => $width, + 'height' => $height + ); + $shipments_datas['additional_data']['items'][$cmpt]['package'][] = $packages; + + } + $cmpt++; + } + } + + $name_list = ''; + foreach ($cart_products as $key => $value) { + $product_info = new Product($cart_products[$key]['product_id']); + $name_list .= $cart_products[$key]['product_quantity'].' '.$product_info->name[$this->context->language->id]."; "; + } + + $shipments_datas['content'] = $name_list; + + + $this->logs[] = '======================================================================================================'; + + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Id order : '.$id_order_params; + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Id cart : '.$order->id_cart; + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Id carrier : '.$order->id_carrier; + + foreach ($shipments_datas as $key => $data) { + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Shippement datas : '.$key; + if (is_array($data)) { + foreach ($data as $key => $value1) { + if (is_array($value1)) { + foreach ($value1 as $key => $value2) { + if (is_array($value2)) { + foreach ($value2 as $key => $value3) { + if (is_array($value3)) { + foreach ($value3 as $key => $value4) { + if (!is_array($value4)) { + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Items datas : '.$key.' => '.$value4; + } + } + } else { + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Items datas : '.$key.' => '.$value3; + } + } + } else { + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Shippement datas : '.$key.' => '.$value2; + } + } + } else { + $this->logs[] = '['.strftime('%Y-%m-%d %H:%M:%S').'] : Shippement datas : '.$key.' => '.$value1; + } + } + } + } + + $this->logs[] = '======================================================================================================'; + + if ($this->debug) { + $this->writeLog(); + } + + + + $_packlink_orders_old = new PLOrder($order->id); + + if ($_packlink_orders_old->id == '') { + + $pl_reference = $this->callSDK($shipments_datas); + + if ($pl_reference->reference != '') { + $_packlink_orders = new PLOrder(); + $_packlink_orders->id_order = $order->id; + $_packlink_orders->draft_reference = $pl_reference->reference; + $_packlink_orders->postcode = $zip_code_id_to; + $_packlink_orders->postalzone = $postal_zone_id_to; + $_packlink_orders->details = ''; + $_packlink_orders->save(); + + if (Configuration::get('PL_ST_AWAITING') && Configuration::get('PL_ST_AWAITING') != 0) { + $new_state = Configuration::get('PL_ST_AWAITING'); + $statuses_used = array(); + $order_statuses = Db::getInstance()->executeS(' + SELECT `id_order_state` + FROM `'._DB_PREFIX_.'order_history` + WHERE `id_order` = '.(int)$order->id); + foreach ($order_statuses as $key => $order_statuse) { + $statuses_used[] = $order_statuse['id_order_state']; + } + if (!in_array($new_state, $statuses_used)) { + $order->setCurrentState($new_state); + } + } + + $this->createPacklinkDetails($order->id); + } + } + } + + public function callSDK($shipments_datas) + { + # TODO : call to packlink + $sdk = new PacklinkSDK(Configuration::get('PL_API_KEY'), $this); + $datas = $sdk->createDraft($shipments_datas); + + return $datas; + + } + + final public function getLogs() + { + return $this->logs; + } + + final public function writeLog() + { + if (!$this->debug) { + return false; + } + + $handle = fopen(dirname(__FILE__).'/log_order.txt', 'a+'); + + foreach ($this->getLogs() as $value) { + fwrite($handle, $value."\r"); + } + + $this->logs = array(); + + fclose($handle); + } + + public function getOrderShippingCost($params, $shipping_cost) + { + return $shipping_cost; + } + + public function getOrderShippingCostExternal($params) + { + return $this->getOrderShippingCost($params); + } + + /** + * Processing post in BO + */ + public function postProcess() + { + } +} diff --git a/packlinkpro.php b/packlinkpro.php deleted file mode 100644 index f2d3158..0000000 --- a/packlinkpro.php +++ /dev/null @@ -1,121 +0,0 @@ - -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -if (!defined('_PS_VERSION_')) { - exit; -} - -class Packlinkpro extends Module -{ - protected $config_form = false; - - public function __construct() - { - $this->name = 'packlinkpro'; - $this->tab = 'shipping_logistics'; - $this->version = '1.0.0'; - $this->author = 'PrestaShop'; - $this->need_instance = 0; - - /** - * Set $this->bootstrap to true if your module is compliant with bootstrap (PrestaShop 1.6) - */ - $this->bootstrap = true; - - parent::__construct(); - - $this->displayName = $this->l('Packlink Pro'); - $this->description = $this->l('Packlink PRO is an innovative cloud-based platform that automates shipping for eCommerce sites and small enterprises.'); - } - /** - * Don't forget to create update methods if needed: - * http://doc.prestashop.com/display/PS16/Enabling+the+Auto-Update - */ - public function install() - { - return parent::install() && - $this->registerHook('backOfficeHeader'); - } - /** - * Load the configuration form - */ - public function getContent() - { - $this->context->smarty->assign('module_dir', $this->_path); - - $output = $this->context->smarty->fetch($this->local_path.'views/templates/admin/configure.tpl'); - - return $output; - } - protected function getConfigForm() - { - return array( - 'form' => array( - 'legend' => array( - 'title' => $this->l('Settings'), - 'icon' => 'icon-cogs', - ), - 'input' => array( - array( - 'type' => 'switch', - 'label' => $this->l('Live mode'), - 'name' => 'PACKLINKPRO_LIVE_MODE', - 'is_bool' => true, - 'desc' => $this->l('Use this module in live mode'), - 'values' => array( - array( - 'id' => 'active_on', - 'value' => true, - 'label' => $this->l('Enabled') - ), - array( - 'id' => 'active_off', - 'value' => false, - 'label' => $this->l('Disabled') - ) - ), - ), - array( - 'col' => 3, - 'type' => 'text', - 'prefix' => '', - 'desc' => $this->l('Enter a valid email address'), - 'name' => 'PACKLINKPRO_ACCOUNT_EMAIL', - 'label' => $this->l('Email'), - ), - array( - 'type' => 'password', - 'name' => 'PACKLINKPRO_ACCOUNT_PASSWORD', - 'label' => $this->l('Password'), - ), - ), - 'submit' => array( - 'title' => $this->l('Save'), - ), - ), - ); - } -} diff --git a/pdf/index.php b/pdf/index.php new file mode 100644 index 0000000..b66430a --- /dev/null +++ b/pdf/index.php @@ -0,0 +1,26 @@ +data->shipment_reference).'"'; +$id = Db::getInstance()->getValue($sql); +$order = new Order($id); + +$packlink = new Packlink(); +$packlink->createPacklinkDetails($id); +$packlink->logs[] = $events; +$packlink->logs[] = "Order id : ".$id.PHP_EOL; +if ($events->event == "shipment.carrier.success" && Configuration::get('PL_ST_PENDING') && Configuration::get('PL_ST_PENDING') != 0) { + $new_state = Configuration::get('PL_ST_PENDING'); +} elseif ($events->event == "shipment.label.ready" && Configuration::get('PL_ST_READY') && Configuration::get('PL_ST_READY') != 0) { + sleep(10); //event arrive dans le meme temps + $new_state = Configuration::get('PL_ST_READY'); +} elseif ($events->event == "shipment.tracking.update" && Configuration::get('PL_ST_TRANSIT') && Configuration::get('PL_ST_TRANSIT') != 0) { + sleep(10); //event arrive dans le meme temps + $new_state = Configuration::get('PL_ST_TRANSIT'); +} elseif ($events->event == "shipment.carrier.delivered" && Configuration::get('PL_ST_DELIVERED') && Configuration::get('PL_ST_DELIVERED') != 0) { + $new_state = Configuration::get('PL_ST_DELIVERED'); +} else { + $new_state = ''; +} + +$packlink->logs[] = date('d/m/Y H:i:s').' micro : '.microtime(true).' ['.getmypid(). '] new state : '.$new_state.' old state : '.$order->current_state.PHP_EOL; +$statuses_used = array(); +$order_statuses = Db::getInstance()->executeS(' + SELECT `id_order_state` + FROM `'._DB_PREFIX_.'order_history` + WHERE `id_order` ='.(int)$id); +foreach ($order_statuses as $key => $order_statuse) { + $statuses_used[] = $order_statuse['id_order_state']; +} + +if ($new_state && !in_array($new_state, $statuses_used)) { + $order->setCurrentState($new_state); + $order->save(); + $packlink->logs[] = date('d/m/Y H:i:s').' micro : '.microtime(true).' ['.getmypid(). '] new state : '.$new_state.' old state : '.$order->current_state.PHP_EOL; +} + +if ($packlink->debug) { + $packlink->writeLog(); +} diff --git a/translations/ca.php b/translations/ca.php new file mode 100644 index 0000000..51a0f41 --- /dev/null +++ b/translations/ca.php @@ -0,0 +1,94 @@ +packlink_0b97a05d427162a2ee640649ec60cb29'] = 'Envíos Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_ef18c7cd5a3502ed4bd1fbe0711f5b30'] = 'Ahorra hasta un 70% en tus gastos logísticos. Sin tarifas fijas, ni volumen mínimo de envíos. Centraliza todos tus envíos en una sóla plataforma'; +$_MODULE['<{packlink}prestashop>packlink_99c6a210f4dcefc26fb451bbf3e46235'] = 'No ha sido seleccionado ningún pedido. Por favor, selecciona al menos un pedido antes de hacer clic en \"Imprimir etiquetas de envío\" '; +$_MODULE['<{packlink}prestashop>packlink_b3a99ab400a352bb353ecec0273a45e0'] = 'Los siguientes pedidos deben de ser enviados en Packlink PRO, para poder imprimir las etiquetas de estos envios: %s'; +$_MODULE['<{packlink}prestashop>packlink_c2e921c55faef48ceee60e38f6ee76a4'] = 'Un envío fue ya creado en Packlink PRO para el pedido %s'; +$_MODULE['<{packlink}prestashop>packlink_756dfb23ae68799afa0a1f1e08fb2b7a'] = 'No ha sido seleccionado ningún envío. Por favor, selecciona al menos un pedido antes de hacer clic en \"Crear un envío\".'; +$_MODULE['<{packlink}prestashop>packlink_8ef84b819f959a200378e5ec12e69ce3'] = 'Un envío ha sido creado en Packlink PRO para los pedidos %s'; +$_MODULE['<{packlink}prestashop>packlink_3f0e4671e82194b5e24e78a7f046766c'] = 'Crear envío'; +$_MODULE['<{packlink}prestashop>packlink_fce7f1444023c69d25915cf54b5d458f'] = 'Imprimir etiquetas de envío'; +$_MODULE['<{packlink}prestashop>packlink_686e697538050e4664636337cc3b834f'] = 'Crear'; +$_MODULE['<{packlink}prestashop>packlink_13dba24862cf9128167a59100e154c8d'] = 'Imprimir'; +$_MODULE['<{packlink}prestashop>packlink_4351cfebe4b61d8aa5efa1d020710005'] = 'Ver'; +$_MODULE['<{packlink}prestashop>packlink_94966d90747b97d1f0f206c98a8b1ac3'] = 'Enviar'; +$_MODULE['<{packlink}prestashop>packlink_6bb311efd788bb4b3123896667e767a7'] = 'Envío'; +$_MODULE['<{packlink}prestashop>packlink_462390017ab0938911d2d4e964c0cab7'] = 'Configuración actualizada correctamente'; +$_MODULE['<{packlink}prestashop>packlink_86d44abc0a7c7d72800225f5c802c76e'] = 'v1.1: Todos tus pedidos ordenados serán importados automáticamente a Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_6ad1638f364f235339f4b634ab14536d'] = 'v1.2: El contenido de los paquetes será rellenado de manera automática en los pedidos de Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_8d8dcf11f578fbd84885523b99dba612'] = 'v1.3: Los detalles del envío y el número de seguimiento se importan automáticamente desde PrestaShop . Rellena automáticamente los datos que faltan en el catálogo de productos (peso / dimensiones)'; +$_MODULE['<{packlink}prestashop>packlink_d5958a20aeb6864da743668bc8c987b5'] = 'v1.4: la sincronización de los estados de los envíos en Packlink PRO con los pedidos de PrestaShop para mantener actualizada la información de tus pedidos hasta la fecha'; +$_MODULE['<{packlink}prestashop>packlink_10f272913bfc6bcfefbffb97c8aa5b64'] = 'v1.5: Rediseño de la página de configuración. Configuración de las direcciones predefinidas en Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_08932d692d533c3896bc9603cfc7d7b2'] = 'v1.6: se han incluido nuevas funcionalidades en los botones para que te indiquen las acciones siguientes que tienes que realizar para continuar con tu pedido. Posibilidad de elegir entre la creación automática o manual de tus envíos. Impresión simultánea de la etiquetas.'; +$_MODULE['<{packlink}prestashop>packlink_f88e7238ae513219fced1387ada24122'] = 'Número de referencia:'; +$_MODULE['<{packlink}prestashop>packlink_fc8a4b51bb08e059ee5947a2967f5963'] = 'Seguimiento con Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; +$_MODULE['<{packlink}prestashop>packlink_914419aa32f04011357d3b604a86d7eb'] = 'Transportista'; +$_MODULE['<{packlink}prestashop>packlink_8c489d0946f66d17d73f26366a4bf620'] = 'Peso'; +$_MODULE['<{packlink}prestashop>packlink_9f06b28a40790c4c4df5739bce3c1eb0'] = 'Coste de envíos'; +$_MODULE['<{packlink}prestashop>packlink_5068c162a60b5859f973f701333f45c5'] = 'Número de tracking'; +$_MODULE['<{packlink}prestashop>back_263494a530bf342ae23ec21d28ed6f21'] = 'Envía tus pedidos con facilidad y a los mejores precios con Packlink PRO. ¿Todavía no tienes una cuenta? Sólo tardarás unos segundos en '; +$_MODULE['<{packlink}prestashop>back_e0f179c9505c59254879b6ca513d35b9'] = 'registrarte'; +$_MODULE['<{packlink}prestashop>back_bb38b5c72a367e0fbbf98bfe4efdcbc2'] = '.'; +$_MODULE['<{packlink}prestashop>back_ad2376beebecdcf7846ba973fa1a005b'] = 'Configurar'; +$_MODULE['<{packlink}prestashop>back_7d06182c98480873fd25664fb3f7a698'] = 'Dirección del remitente'; +$_MODULE['<{packlink}prestashop>back_33af8066d3c83110d4bd897f687cedd2'] = 'Estado de los pedidos'; +$_MODULE['<{packlink}prestashop>back_8d060c6c1f26e42643ba8d942ce8bb97'] = 'Unidad de datos'; +$_MODULE['<{packlink}prestashop>back_3d3d0e1cf8a4804562a5f3b14a93218a'] = 'Ayuda'; +$_MODULE['<{packlink}prestashop>back_3f184c818991971619eac510c58db516'] = 'Conexión Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_307d9d03bb11eec9b8e17ae5804be36a'] = 'Deberás indicar la clave de API asociada con tu cuenta de Packlink PRO en el campo de abajo, con el fin de conectar Packlink PRO con PrestaShop.'; +$_MODULE['<{packlink}prestashop>back_0de704e37355374d02208e081a5452c6'] = 'Genera la clave de API ahora.'; +$_MODULE['<{packlink}prestashop>back_8121ed5d107fbbe4f4f5d4d2b889adbe'] = 'Clave de API Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{packlink}prestashop>back_b46ddc2dc6573cbaa28949f9468cb2d9'] = 'Preferencias en la creación de envíos'; +$_MODULE['<{packlink}prestashop>back_efabfaefe35cb8a6dbcb13245f9a85ab'] = 'Una vez que los pedidos son pagados, crea los envíos automáticamente en Packlink PRO o hazlo de forma manual siempre que lo desees :'; +$_MODULE['<{packlink}prestashop>back_6903e2b3a86228f4d258e423fb6b913a'] = 'Crear automáticamente'; +$_MODULE['<{packlink}prestashop>back_a85b3f8e5456d47e8056e0372aeccb2a'] = 'Crear de forma manual'; +$_MODULE['<{packlink}prestashop>back_fe4c4ddd503c10a8fe9a8249dc1a2336'] = '\"Dirección / es del remitente\"'; +$_MODULE['<{packlink}prestashop>back_6f7af3b914733e1f5ba45105287be347'] = '\"Dirección del remitente\" ahorra tiempo al guardar la dirección que se cargará automáticamente junto a los detalles del envío en Packlink PRO. Tu puedes configurar y editar esta dirección desde la '; +$_MODULE['<{packlink}prestashop>back_2810557faa3bc1dd29cc1641541d4519'] = '\"configuración\" de Packlink PRO.'; +$_MODULE['<{packlink}prestashop>back_e9f7009a3509f4da8ce78cbad712b8a5'] = 'Por defecto'; +$_MODULE['<{packlink}prestashop>back_3e35c6d17b3f41d65732a32e85eb0c0d'] = 'Teléfono : '; +$_MODULE['<{packlink}prestashop>back_151994a8fad78d8d91387ac8c7885475'] = '¡La dirección del remitente no se ha configurado en Packlink PRO!'; +$_MODULE['<{packlink}prestashop>back_ec211f7c20af43e742bf2570c3cb84f9'] = 'Añadir'; +$_MODULE['<{packlink}prestashop>back_cdf4b324673b77427ca416ac40d3da9a'] = 'Estado de la sincronización'; +$_MODULE['<{packlink}prestashop>back_348b4bdc33672e024a23cd3c12072c5d'] = 'El estado de los pedidos de PrestaShop'; +$_MODULE['<{packlink}prestashop>back_3b6a80aad70166de7b5de4943b519c5e'] = 'se sincronizan con el estado de los envíos en Packlink PRO tal y como está configurado en la tabla de abajo. '; +$_MODULE['<{packlink}prestashop>back_afa76985e2458e32f329a1bf2a1ad523'] = 'Cada vez que el estado de un envío cambia en Packlink PRO, el estado de ese pedido en PrestaShop también se actualiza'; +$_MODULE['<{packlink}prestashop>back_3a96c81e606c0602b9fee629a0eeef24'] = 'Estado del envío en Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_0c573dd42480d097bee61cdc975e16d8'] = 'Estado del pedido en PrestaShop'; +$_MODULE['<{packlink}prestashop>back_158bc559027a1bc2827e7da0d3ff32cd'] = 'Estado #1'; +$_MODULE['<{packlink}prestashop>back_2d13df6f8b5e4c5af9f87e0dc39df69d'] = 'Pendiente'; +$_MODULE['<{packlink}prestashop>back_f8762460f4735a774ba593d36db8074c'] = '(Ninguno)'; +$_MODULE['<{packlink}prestashop>back_6e45ffbef4b733a0b988165fc7cba296'] = 'Estado #2'; +$_MODULE['<{packlink}prestashop>back_643562a9ae7099c8aabfdc93478db117'] = 'Procesado'; +$_MODULE['<{packlink}prestashop>back_f4c513dd3babc5917becbdaf74fe7991'] = 'Estado #3'; +$_MODULE['<{packlink}prestashop>back_de04ee99badd303f6b87abe736b3a973'] = 'Listo para el envío'; +$_MODULE['<{packlink}prestashop>back_26051d4300f2c053a39df713ef1ca675'] = 'Estado #4'; +$_MODULE['<{packlink}prestashop>back_7ec4f8b296984ffe6ea829b7e1743577'] = 'En tránsito'; +$_MODULE['<{packlink}prestashop>back_5ef6c1599201631174cbad0330aa6462'] = 'Estado #5'; +$_MODULE['<{packlink}prestashop>back_67edd3b99247c9eb5884a02802a20fa7'] = 'Entregado'; +$_MODULE['<{packlink}prestashop>back_5405b90a3e049fb630e63305d34ec924'] = 'Unidades de conversión'; +$_MODULE['<{packlink}prestashop>back_41e51bb942c3ed91a5ba95ef86977a7e'] = 'Packlink PRO funciona con kilogramos y con centímetros. Tu PrestaShop puede estar configurado con estas '; +$_MODULE['<{packlink}prestashop>back_ece834d9839ea190d2551135ada79921'] = 'unidades de medida.'; +$_MODULE['<{packlink}prestashop>back_4493a6ab1434295fc2ee81980ee139a4'] = 'Por favor, asegúrate de que la tabla inferior es correcta y que los datos importados desde PrestaShop para Packlink PRO son correctos'; +$_MODULE['<{packlink}prestashop>back_af28d67cbda82fc994e27524c43a7b6b'] = 'Unidad de peso'; +$_MODULE['<{packlink}prestashop>back_ebe86682666f2ab3da0843ed3097e4b3'] = 'kg'; +$_MODULE['<{packlink}prestashop>back_76019d8b34c330c0dcca0bc489085d33'] = 'Dimensiones'; +$_MODULE['<{packlink}prestashop>back_820eb5b696ea2a657c0db1e258dc7d81'] = 'cm'; +$_MODULE['<{packlink}prestashop>back_a44416bcc8b9c0109f9a895b79970482'] = 'Rellena automáticamente las dimensiones de los productos'; +$_MODULE['<{packlink}prestashop>back_54fe3f3982ca0e1f6f497d7c6a320dab'] = 'Rellena automáticamente el peso y las dimensiones de tus productos en PrestaShop desde Packlink PRO cuándo faltan algunos datos para que el producto se envíe:'; +$_MODULE['<{packlink}prestashop>back_68eec46437c384d8dad18d5464ebc35c'] = 'Siempre'; +$_MODULE['<{packlink}prestashop>back_6e7b34fa59e1bd229b207892956dc41c'] = 'Nunca'; +$_MODULE['<{packlink}prestashop>expedition_8264629920e2e27a68ae0ec8fc603eee'] = 'Envío con Packlink PRO'; +$_MODULE['<{packlink}prestashop>expedition15_8264629920e2e27a68ae0ec8fc603eee'] = 'Envío con Packlink PRO'; +$_MODULE['<{packlink}prestashop>order_details_e7fae27fac3ad0e64be43219f5f4fd17'] = 'Transportista sustituto'; +$_MODULE['<{packlink}prestashop>order_details_e6e5fb296b6df4c8f7f831c7d3412240'] = 'Aquí está el transportista que has seleccionado:'; +$_MODULE['<{packlink}prestashop>order_details_4706040ad816e058d36a721e35301423'] = 'Aquí está el transportista que nosotros hemos seleccionado:'; +$_MODULE['<{packlink}prestashop>order_details_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; +$_MODULE['<{packlink}prestashop>order_details_914419aa32f04011357d3b604a86d7eb'] = 'Transportistas'; +$_MODULE['<{packlink}prestashop>order_details_8c489d0946f66d17d73f26366a4bf620'] = 'Peso'; +$_MODULE['<{packlink}prestashop>order_details_5068c162a60b5859f973f701333f45c5'] = 'Número de tracking'; diff --git a/translations/de.php b/translations/de.php new file mode 100644 index 0000000..3b5f617 --- /dev/null +++ b/translations/de.php @@ -0,0 +1,86 @@ +packlink_0b97a05d427162a2ee640649ec60cb29'] = 'Packlink PRO Versand'; +$_MODULE['<{packlink}prestashop>packlink_ef18c7cd5a3502ed4bd1fbe0711f5b30'] = 'Sparen Sie bis zu 70% in Ihrem Versand. Kein Mindestbuchungsvolumen oder Versandlabelkosten. Zentralisieren Sie alle Ihre Versandaufträge auf einem einzigen Kontrollsystem. '; +$_MODULE['<{packlink}prestashop>packlink_462390017ab0938911d2d4e964c0cab7'] = 'Ihre Einstellungen wurden erfolgreich aktualisiert'; +$_MODULE['<{packlink}prestashop>packlink_86d44abc0a7c7d72800225f5c802c76e'] = 'v1.1: Alle versandfertigen Sendungsaufträge werden ab sofort automatisch in Packlink PRO importiert.'; +$_MODULE['<{packlink}prestashop>packlink_6ad1638f364f235339f4b634ab14536d'] = 'v1.2: Alle versendeten Inhalte werden automatisch für Ihre Packlink PRO Versandaufträge ausgefüllt.'; +$_MODULE['<{packlink}prestashop>packlink_8d8dcf11f578fbd84885523b99dba612'] = 'v1.3: Versanddetails und Trackingnummer werden automatisch in PrestaShop Bestellungen importiert. Automatische Befüllung der fehlenden Produktdaten im Katalog (Gewicht/Maße)'; +$_MODULE['<{packlink}prestashop>packlink_d5958a20aeb6864da743668bc8c987b5'] = 'v1.4: Synchronisierung der Packlink PRO Versandstatuse mit PrestaShop, um Ihre Sendungen auf den aktuellsten Stand zu haben.'; +$_MODULE['<{packlink}prestashop>packlink_10f272913bfc6bcfefbffb97c8aa5b64'] = 'v1.5: Neugestaltung der Einstellungsseite. Es wird die Adresse gewählt, die Sie in Packlink PRO als \"Voreingestellte Adresse\" konfiguriert haben'; +$_MODULE['<{packlink}prestashop>packlink_02d825c6dd0492357ee20776776f2c63'] = 'v1.6: neue Buttons in PrestaShop, um Versandstatuse jeder Bestellung anzupassen oder zu ändern. Wählen Sie zwischen automatischer oder manueller Versandauftragserstellung.'; +$_MODULE['<{packlink}prestashop>packlink_686e697538050e4664636337cc3b834f'] = 'Erstellen'; +$_MODULE['<{packlink}prestashop>packlink_f88e7238ae513219fced1387ada24122'] = 'Auftragsnummer:'; +$_MODULE['<{packlink}prestashop>packlink_94966d90747b97d1f0f206c98a8b1ac3'] = 'Versand'; +$_MODULE['<{packlink}prestashop>packlink_13dba24862cf9128167a59100e154c8d'] = 'Drucken'; +$_MODULE['<{packlink}prestashop>packlink_4351cfebe4b61d8aa5efa1d020710005'] = 'Ansehen'; +$_MODULE['<{packlink}prestashop>packlink_fc8a4b51bb08e059ee5947a2967f5963'] = 'Sendungsverfolgung mit Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_44749712dbec183e983dcd78a7736c41'] = 'Datum'; +$_MODULE['<{packlink}prestashop>packlink_914419aa32f04011357d3b604a86d7eb'] = 'Versanddienstleister'; +$_MODULE['<{packlink}prestashop>packlink_8c489d0946f66d17d73f26366a4bf620'] = 'Gewicht'; +$_MODULE['<{packlink}prestashop>packlink_9f06b28a40790c4c4df5739bce3c1eb0'] = 'Versandkosten'; +$_MODULE['<{packlink}prestashop>packlink_5068c162a60b5859f973f701333f45c5'] = 'Sendungs nummer'; +$_MODULE['<{packlink}prestashop>back_263494a530bf342ae23ec21d28ed6f21'] = 'Versenden Sie Ihre versandfertigen Sendungsaufträge einfach und immer mit den besten Preisen auf Packlink PRO. Sie haben noch keinen Packlink PRO Account? '; +$_MODULE['<{packlink}prestashop>back_e0f179c9505c59254879b6ca513d35b9'] = 'Registrieren Sie '; +$_MODULE['<{packlink}prestashop>back_bb38b5c72a367e0fbbf98bfe4efdcbc2'] = 'sich kostenlos und in wenigen Sekungen.'; +$_MODULE['<{packlink}prestashop>back_ad2376beebecdcf7846ba973fa1a005b'] = 'Einstellungen'; +$_MODULE['<{packlink}prestashop>back_7d06182c98480873fd25664fb3f7a698'] = 'Absenderadresse'; +$_MODULE['<{packlink}prestashop>back_33af8066d3c83110d4bd897f687cedd2'] = 'Versandstatus'; +$_MODULE['<{packlink}prestashop>back_8d060c6c1f26e42643ba8d942ce8bb97'] = 'Dateneinheit'; +$_MODULE['<{packlink}prestashop>back_3d3d0e1cf8a4804562a5f3b14a93218a'] = 'Hilfeportal'; +$_MODULE['<{packlink}prestashop>back_3f184c818991971619eac510c58db516'] = 'PACKLINK PRO INTEGRATION'; +$_MODULE['<{packlink}prestashop>back_307d9d03bb11eec9b8e17ae5804be36a'] = 'Einer, mit Ihrem Packlink PRO Konto, zugeteilter API Schlüssel muss im unteren Feld angegeben werden, um eine Synchronisierung mit PrestaShop zu ermöglichen.'; +$_MODULE['<{packlink}prestashop>back_0de704e37355374d02208e081a5452c6'] = 'Jetzt API Schlüssel generieren.'; +$_MODULE['<{packlink}prestashop>back_8121ed5d107fbbe4f4f5d4d2b889adbe'] = 'Packlink Pro API-Schlüssel'; +$_MODULE['<{packlink}prestashop>back_c9cc8cce247e49bae79f15173ce97354'] = 'Speichern'; +$_MODULE['<{packlink}prestashop>back_b46ddc2dc6573cbaa28949f9468cb2d9'] = 'Präferenzen der Versandauftragserstellung'; +$_MODULE['<{packlink}prestashop>back_efabfaefe35cb8a6dbcb13245f9a85ab'] = 'Sobald Ihre Bestellungen bezahlt wurden, wird der Versandauftrag automatisch in Packlink PRO erstellt oder erstellen Sie diese manuell wann immer Sie wollen:'; +$_MODULE['<{packlink}prestashop>back_6903e2b3a86228f4d258e423fb6b913a'] = 'Automatisch erstellen'; +$_MODULE['<{packlink}prestashop>back_a85b3f8e5456d47e8056e0372aeccb2a'] = 'Manuell erstellen'; +$_MODULE['<{packlink}prestashop>back_fe4c4ddd503c10a8fe9a8249dc1a2336'] = 'Absenderadresse'; +$_MODULE['<{packlink}prestashop>back_6f7af3b914733e1f5ba45105287be347'] = 'Die Absenderadresse hilft Ihnen während des Versandprozesses Zeit zu sparen, indem diese Information automatisch in Packlink PRO ausgefüllt wird. Sie können dies in den'; +$_MODULE['<{packlink}prestashop>back_2810557faa3bc1dd29cc1641541d4519'] = 'Packlink PRO Einstellungen ändern. '; +$_MODULE['<{packlink}prestashop>back_e9f7009a3509f4da8ce78cbad712b8a5'] = 'Voreingestellt'; +$_MODULE['<{packlink}prestashop>back_3e35c6d17b3f41d65732a32e85eb0c0d'] = 'Telefonnummer: '; +$_MODULE['<{packlink}prestashop>back_151994a8fad78d8d91387ac8c7885475'] = 'Die Absenderadresse wurde nicht auf Packlink PRO eingestellt! '; +$_MODULE['<{packlink}prestashop>back_ec211f7c20af43e742bf2570c3cb84f9'] = 'Hinzufügen'; +$_MODULE['<{packlink}prestashop>back_cdf4b324673b77427ca416ac40d3da9a'] = 'Status der Synchronisierung'; +$_MODULE['<{packlink}prestashop>back_348b4bdc33672e024a23cd3c12072c5d'] = 'Der Status des PrestaShop Auftrags'; +$_MODULE['<{packlink}prestashop>back_3b6a80aad70166de7b5de4943b519c5e'] = 'synchronisiert sich mit dem Packlink PRO Versandstatus so, wie es in der unteren Tabelle eingestellt ist.'; +$_MODULE['<{packlink}prestashop>back_afa76985e2458e32f329a1bf2a1ad523'] = 'Sobald sich der Status einer Sendung auf Packlink PRO ändert, aktualisiert sich dieser auch in Ihrem PrestaShop.'; +$_MODULE['<{packlink}prestashop>back_3a96c81e606c0602b9fee629a0eeef24'] = 'Packlink PRO Versandstatus'; +$_MODULE['<{packlink}prestashop>back_0c573dd42480d097bee61cdc975e16d8'] = 'Status des PrestaShop Auftrags '; +$_MODULE['<{packlink}prestashop>back_158bc559027a1bc2827e7da0d3ff32cd'] = 'Statut #1'; +$_MODULE['<{packlink}prestashop>back_2d13df6f8b5e4c5af9f87e0dc39df69d'] = 'Wartend'; +$_MODULE['<{packlink}prestashop>back_f8762460f4735a774ba593d36db8074c'] = '(Keine)'; +$_MODULE['<{packlink}prestashop>back_6e45ffbef4b733a0b988165fc7cba296'] = 'Statut #2'; +$_MODULE['<{packlink}prestashop>back_643562a9ae7099c8aabfdc93478db117'] = 'In Bearbeitung'; +$_MODULE['<{packlink}prestashop>back_f4c513dd3babc5917becbdaf74fe7991'] = 'Statut #3'; +$_MODULE['<{packlink}prestashop>back_de04ee99badd303f6b87abe736b3a973'] = 'Versandfertig'; +$_MODULE['<{packlink}prestashop>back_26051d4300f2c053a39df713ef1ca675'] = 'Statut #4'; +$_MODULE['<{packlink}prestashop>back_7ec4f8b296984ffe6ea829b7e1743577'] = 'Im Transit'; +$_MODULE['<{packlink}prestashop>back_5ef6c1599201631174cbad0330aa6462'] = 'Statut #5'; +$_MODULE['<{packlink}prestashop>back_67edd3b99247c9eb5884a02802a20fa7'] = 'Zugestellt'; +$_MODULE['<{packlink}prestashop>back_5405b90a3e049fb630e63305d34ec924'] = 'Maßeinheiten umrechnen'; +$_MODULE['<{packlink}prestashop>back_41e51bb942c3ed91a5ba95ef86977a7e'] = 'Packlink PRO funktioniert mit Kilogramm und Zentimetern. Ihr PrestaShop ist möglicherweise mit anderen'; +$_MODULE['<{packlink}prestashop>back_ece834d9839ea190d2551135ada79921'] = 'Maßeinheit'; +$_MODULE['<{packlink}prestashop>back_4493a6ab1434295fc2ee81980ee139a4'] = 'Bitte vergewissern Sie sich, dass die untere Tabelle korrekt ist, damit der Datenimport von PrestaShop zu Packlink PRO funktioniert.'; +$_MODULE['<{packlink}prestashop>back_af28d67cbda82fc994e27524c43a7b6b'] = 'Gewichtseinheiten'; +$_MODULE['<{packlink}prestashop>back_ebe86682666f2ab3da0843ed3097e4b3'] = 'kg'; +$_MODULE['<{packlink}prestashop>back_76019d8b34c330c0dcca0bc489085d33'] = 'Abmaße'; +$_MODULE['<{packlink}prestashop>back_820eb5b696ea2a657c0db1e258dc7d81'] = 'cm'; +$_MODULE['<{packlink}prestashop>back_a44416bcc8b9c0109f9a895b79970482'] = 'Produkt Daten automatisch ausfüllen'; +$_MODULE['<{packlink}prestashop>back_54fe3f3982ca0e1f6f497d7c6a320dab'] = 'Automatisch Gewicht und Maße in das PrestaShop Katalog von Packlink PRO einfügen, falls diese nicht für ein zu versendenes Produkt, verfügbar ist:'; +$_MODULE['<{packlink}prestashop>back_68eec46437c384d8dad18d5464ebc35c'] = 'Immer'; +$_MODULE['<{packlink}prestashop>back_6e7b34fa59e1bd229b207892956dc41c'] = 'Nie'; +$_MODULE['<{packlink}prestashop>expedition_8264629920e2e27a68ae0ec8fc603eee'] = 'Versenden mit Packlink PRO'; +$_MODULE['<{packlink}prestashop>expedition15_8264629920e2e27a68ae0ec8fc603eee'] = 'Versenden mit Packlink PRO'; +$_MODULE['<{packlink}prestashop>order_details_e7fae27fac3ad0e64be43219f5f4fd17'] = 'Neu gewählter Versanddienstleister'; +$_MODULE['<{packlink}prestashop>order_details_e6e5fb296b6df4c8f7f831c7d3412240'] = 'Ihr ausgewählter Versanddienstleister'; +$_MODULE['<{packlink}prestashop>order_details_4706040ad816e058d36a721e35301423'] = 'Der von uns ausgewählte Versanddienstleister'; +$_MODULE['<{packlink}prestashop>order_details_44749712dbec183e983dcd78a7736c41'] = 'Datum'; +$_MODULE['<{packlink}prestashop>order_details_914419aa32f04011357d3b604a86d7eb'] = ' Träger'; +$_MODULE['<{packlink}prestashop>order_details_8c489d0946f66d17d73f26366a4bf620'] = 'Gewicht'; +$_MODULE['<{packlink}prestashop>order_details_5068c162a60b5859f973f701333f45c5'] = 'Sendungs nummer'; diff --git a/translations/es.php b/translations/es.php index e79631f..18ecd5c 100644 --- a/translations/es.php +++ b/translations/es.php @@ -2,23 +2,85 @@ global $_MODULE; $_MODULE = array(); -$_MODULE['<{packlinkpro}prestashop>packlinkpro_5e10b5fd79b0b688ccac0593dc628fe8'] = 'Packlink Pro'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_6f246519918d5af20d0bf70e37fb6a1c'] = 'Packlink PRO es una innovadora plataforma Cloud que automatiza los envíos para eCommerce y pequeñas empresas.'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_f4f70727dc34561dfde1a3c529b6205c'] = 'Ajustes'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_cebd5bbe0ffdecc270a8a324e5a277dd'] = 'Live mode'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_ea9df7a306e2f8b5af37b67084d0c984'] = 'Utilizar el módulo en Live mode'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_00d23a76e43b46dae9ec7aa9dcbebb32'] = 'Activar'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_b9f5c797ebbf55adccdd8539a65a0241'] = 'Desactivar'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_cffa70587159989d91e6ce586ea65c14'] = 'Entra una dirección de correo válida'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_ce8ae9da5b7cd6c3df2929543a9af92d'] = 'Email'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_dc647eb65e6711e155375218212b3964'] = 'Contraseña'; -$_MODULE['<{packlinkpro}prestashop>packlinkpro_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; -$_MODULE['<{packlinkpro}prestashop>configure_fc93769b55d04fe9c25342dd09f23eb0'] = 'La plataforma Cloud que automatiza los envíos'; -$_MODULE['<{packlinkpro}prestashop>configure_062bfbaa60ccf6fceaa741c0c63ec439'] = 'Tus clientes podrán aprovecharse de las ventajas de los mejores servicios de transporte en todo el mundo, con envíos de tu tienda o almacén a su puerta o a un punto de conveniencia cercano.'; -$_MODULE['<{packlinkpro}prestashop>configure_ac909f377e7fcdeac56b8c8b7b43b68f'] = 'Con Packlink PRO, el vendedor podrá centrarse en su negocio sin preocuparse por la logística. Con solo un par de clics, Prestashop y Packlink PRO estarán integrados para que el vendedor pueda gestionar los pedidos, elegir el servicio que más se ajuste a las necesidades de cada envío, imprimir las etiquetas y enviar.'; -$_MODULE['<{packlinkpro}prestashop>configure_01a094b99b6bbab3e22b92e2072712ec'] = 'Tarifas preferentes desde el primer envío'; -$_MODULE['<{packlinkpro}prestashop>configure_48576c4f77cfc83dd37486ab9551dfec'] = 'Integración con Prestashop'; -$_MODULE['<{packlinkpro}prestashop>configure_2177b3971519e00a5b6dfbbd0fe331a4'] = 'Importación múltiple desde archivo CSV/XLS'; -$_MODULE['<{packlinkpro}prestashop>configure_1ddbca941251949e41f1d762fd402404'] = 'Seguimiento de paquetes en tiempo real'; -$_MODULE['<{packlinkpro}prestashop>configure_0cc9689b6430b5930a2161154373d03d'] = 'Cobertura de seguro y atención al cliente'; -$_MODULE['<{packlinkpro}prestashop>configure_7ac1f88afff36d27ee8e5f1ae9258c84'] = 'Descubre Packlink Pro'; +$_MODULE['<{packlink}prestashop>packlink_0b97a05d427162a2ee640649ec60cb29'] = 'Envíos Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_ef18c7cd5a3502ed4bd1fbe0711f5b30'] = 'Ahorra hasta un 70% en tus gastos logísticos. Sin tarifas fijas, ni volumen mínimo de envíos. Centraliza todos tus envíos en una sóla plataforma'; +$_MODULE['<{packlink}prestashop>packlink_462390017ab0938911d2d4e964c0cab7'] = 'Configuración actualizada correctamente'; +$_MODULE['<{packlink}prestashop>packlink_86d44abc0a7c7d72800225f5c802c76e'] = 'v1.1: Todos tus pedidos ordenados serán importados automáticamente a Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_6ad1638f364f235339f4b634ab14536d'] = 'v1.2: El contenido de los paquetes será rellenado de manera automática en los pedidos de Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_8d8dcf11f578fbd84885523b99dba612'] = 'v1.3 : Los detalles del envío y el número de seguimiento se importan automáticamente desde PrestaShop . Rellena automáticamente los datos que faltan en el catálogo de productos (peso / dimensiones)'; +$_MODULE['<{packlink}prestashop>packlink_d5958a20aeb6864da743668bc8c987b5'] = 'v1.4: la sincronización de los estados de los envíos en Packlink PRO con los pedidos de PrestaShop para mantener actualizada la información de tus pedidos hasta la fecha'; +$_MODULE['<{packlink}prestashop>packlink_10f272913bfc6bcfefbffb97c8aa5b64'] = 'v1.5: Rediseño de la página de configuración. Configuración de las direcciones predefinidas en Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_02d825c6dd0492357ee20776776f2c63'] = 'v1.6: se han incluido nuevas funcionalidades en los botones para que te indiquen las acciones siguientes que tienes que realizar para continuar con tu pedido. Posibilidad de elegir entre la creación automática o manual de tus envíos.'; +$_MODULE['<{packlink}prestashop>packlink_686e697538050e4664636337cc3b834f'] = 'Crear'; +$_MODULE['<{packlink}prestashop>packlink_f88e7238ae513219fced1387ada24122'] = 'Número de referencia:'; +$_MODULE['<{packlink}prestashop>packlink_94966d90747b97d1f0f206c98a8b1ac3'] = 'Enviar'; +$_MODULE['<{packlink}prestashop>packlink_13dba24862cf9128167a59100e154c8d'] = 'Imprimir'; +$_MODULE['<{packlink}prestashop>packlink_4351cfebe4b61d8aa5efa1d020710005'] = 'Ver'; +$_MODULE['<{packlink}prestashop>packlink_fc8a4b51bb08e059ee5947a2967f5963'] = 'Seguimiento con Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; +$_MODULE['<{packlink}prestashop>packlink_914419aa32f04011357d3b604a86d7eb'] = 'Transportista'; +$_MODULE['<{packlink}prestashop>packlink_8c489d0946f66d17d73f26366a4bf620'] = 'Peso'; +$_MODULE['<{packlink}prestashop>packlink_9f06b28a40790c4c4df5739bce3c1eb0'] = 'Coste de envíos'; +$_MODULE['<{packlink}prestashop>packlink_5068c162a60b5859f973f701333f45c5'] = 'Número de tracking'; +$_MODULE['<{packlink}prestashop>back_263494a530bf342ae23ec21d28ed6f21'] = 'Envía tus pedidos con facilidad y a los mejores precios con Packlink PRO. ¿Todavía no tienes una cuenta? Sólo tardarás unos segundos en '; +$_MODULE['<{packlink}prestashop>back_e0f179c9505c59254879b6ca513d35b9'] = 'registrarte'; +$_MODULE['<{packlink}prestashop>back_bb38b5c72a367e0fbbf98bfe4efdcbc2'] = '.'; +$_MODULE['<{packlink}prestashop>back_ad2376beebecdcf7846ba973fa1a005b'] = 'Configurar'; +$_MODULE['<{packlink}prestashop>back_7d06182c98480873fd25664fb3f7a698'] = 'Dirección del remitente'; +$_MODULE['<{packlink}prestashop>back_33af8066d3c83110d4bd897f687cedd2'] = 'Estado de los pedidos'; +$_MODULE['<{packlink}prestashop>back_8d060c6c1f26e42643ba8d942ce8bb97'] = 'Unidad de datos'; +$_MODULE['<{packlink}prestashop>back_3d3d0e1cf8a4804562a5f3b14a93218a'] = 'Ayuda'; +$_MODULE['<{packlink}prestashop>back_3f184c818991971619eac510c58db516'] = 'Conexión Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_307d9d03bb11eec9b8e17ae5804be36a'] = 'Deberás indicar la clave de API asociada con tu cuenta de Packlink PRO en el campo de abajo, con el fin de conectar Packlink PRO con PrestaShop.'; +$_MODULE['<{packlink}prestashop>back_0de704e37355374d02208e081a5452c6'] = 'Genera la clave de API ahora.'; +$_MODULE['<{packlink}prestashop>back_8121ed5d107fbbe4f4f5d4d2b889adbe'] = 'Clave de API Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_c9cc8cce247e49bae79f15173ce97354'] = 'Guardar'; +$_MODULE['<{packlink}prestashop>back_b46ddc2dc6573cbaa28949f9468cb2d9'] = 'Preferencias en la creación de envíos'; +$_MODULE['<{packlink}prestashop>back_efabfaefe35cb8a6dbcb13245f9a85ab'] = 'Una vez que los pedidos son pagados, crea los envíos automáticamente en Packlink PRO o hazlo de forma manual siempre que lo desees :'; +$_MODULE['<{packlink}prestashop>back_6903e2b3a86228f4d258e423fb6b913a'] = 'Crear automáticamente'; +$_MODULE['<{packlink}prestashop>back_a85b3f8e5456d47e8056e0372aeccb2a'] = 'Crear de forma manual'; +$_MODULE['<{packlink}prestashop>back_fe4c4ddd503c10a8fe9a8249dc1a2336'] = '\"Dirección / es del remitente\"'; +$_MODULE['<{packlink}prestashop>back_6f7af3b914733e1f5ba45105287be347'] = '\"Dirección del remitente\" ahorra tiempo al guardar la dirección que se cargará automáticamente junto a los detalles del envío en Packlink PRO. Tu puedes configurar y editar esta dirección desde la '; +$_MODULE['<{packlink}prestashop>back_2810557faa3bc1dd29cc1641541d4519'] = '\"configuración\" de Packlink PRO.'; +$_MODULE['<{packlink}prestashop>back_e9f7009a3509f4da8ce78cbad712b8a5'] = 'Por defecto'; +$_MODULE['<{packlink}prestashop>back_3e35c6d17b3f41d65732a32e85eb0c0d'] = 'Teléfono : '; +$_MODULE['<{packlink}prestashop>back_151994a8fad78d8d91387ac8c7885475'] = '¡La dirección del remitente no se ha configurado en Packlink PRO!'; +$_MODULE['<{packlink}prestashop>back_ec211f7c20af43e742bf2570c3cb84f9'] = 'Añadir'; +$_MODULE['<{packlink}prestashop>back_cdf4b324673b77427ca416ac40d3da9a'] = 'Estado de la sincronización'; +$_MODULE['<{packlink}prestashop>back_348b4bdc33672e024a23cd3c12072c5d'] = 'El estado de los pedidos de PrestaShop'; +$_MODULE['<{packlink}prestashop>back_3b6a80aad70166de7b5de4943b519c5e'] = 'se sincronizan con el estado de los envíos en Packlink PRO tal y como está configurado en la tabla de abajo. '; +$_MODULE['<{packlink}prestashop>back_afa76985e2458e32f329a1bf2a1ad523'] = 'Cada vez que el estado de un envío cambia en Packlink PRO, el estado de ese pedido en PrestaShop también se actualiza'; +$_MODULE['<{packlink}prestashop>back_3a96c81e606c0602b9fee629a0eeef24'] = 'Estado del envío en Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_0c573dd42480d097bee61cdc975e16d8'] = 'Estado del pedido en PrestaShop'; +$_MODULE['<{packlink}prestashop>back_158bc559027a1bc2827e7da0d3ff32cd'] = 'Estado #1'; +$_MODULE['<{packlink}prestashop>back_2d13df6f8b5e4c5af9f87e0dc39df69d'] = 'Pendiente'; +$_MODULE['<{packlink}prestashop>back_f8762460f4735a774ba593d36db8074c'] = '(Ninguno)'; +$_MODULE['<{packlink}prestashop>back_6e45ffbef4b733a0b988165fc7cba296'] = 'Estado #2'; +$_MODULE['<{packlink}prestashop>back_643562a9ae7099c8aabfdc93478db117'] = 'Procesado'; +$_MODULE['<{packlink}prestashop>back_f4c513dd3babc5917becbdaf74fe7991'] = 'Estado #3'; +$_MODULE['<{packlink}prestashop>back_de04ee99badd303f6b87abe736b3a973'] = 'Listo para el envío'; +$_MODULE['<{packlink}prestashop>back_26051d4300f2c053a39df713ef1ca675'] = 'Estado #4'; +$_MODULE['<{packlink}prestashop>back_7ec4f8b296984ffe6ea829b7e1743577'] = 'En tránsito'; +$_MODULE['<{packlink}prestashop>back_5ef6c1599201631174cbad0330aa6462'] = 'Estado #5'; +$_MODULE['<{packlink}prestashop>back_67edd3b99247c9eb5884a02802a20fa7'] = 'Entregado'; +$_MODULE['<{packlink}prestashop>back_5405b90a3e049fb630e63305d34ec924'] = 'Unidades de conversión'; +$_MODULE['<{packlink}prestashop>back_41e51bb942c3ed91a5ba95ef86977a7e'] = 'Packlink PRO funciona con kilogramos y con centímetros. Tu PrestaShop puede estar configurado con estas '; +$_MODULE['<{packlink}prestashop>back_ece834d9839ea190d2551135ada79921'] = 'unidades de medida.'; +$_MODULE['<{packlink}prestashop>back_4493a6ab1434295fc2ee81980ee139a4'] = 'Por favor, asegúrate de que la tabla inferior es correcta y que los datos importados desde PrestaShop para Packlink PRO son correctos'; +$_MODULE['<{packlink}prestashop>back_af28d67cbda82fc994e27524c43a7b6b'] = 'Unidad de peso'; +$_MODULE['<{packlink}prestashop>back_ebe86682666f2ab3da0843ed3097e4b3'] = 'kg'; +$_MODULE['<{packlink}prestashop>back_76019d8b34c330c0dcca0bc489085d33'] = 'Dimensiones'; +$_MODULE['<{packlink}prestashop>back_820eb5b696ea2a657c0db1e258dc7d81'] = 'cm'; +$_MODULE['<{packlink}prestashop>back_a44416bcc8b9c0109f9a895b79970482'] = 'Rellena automáticamente las dimensiones de los productos'; +$_MODULE['<{packlink}prestashop>back_54fe3f3982ca0e1f6f497d7c6a320dab'] = 'Rellena automáticamente el peso y las dimensiones de tus productos en PrestaShop desde Packlink PRO cuándo faltan algunos datos para que el producto se envíe:'; +$_MODULE['<{packlink}prestashop>back_68eec46437c384d8dad18d5464ebc35c'] = 'Siempre'; +$_MODULE['<{packlink}prestashop>back_6e7b34fa59e1bd229b207892956dc41c'] = 'Nunca'; +$_MODULE['<{packlink}prestashop>expedition_8264629920e2e27a68ae0ec8fc603eee'] = 'Envío con Packlink PRO'; +$_MODULE['<{packlink}prestashop>expedition15_8264629920e2e27a68ae0ec8fc603eee'] = 'Envío con Packlink PRO'; +$_MODULE['<{packlink}prestashop>order_details_e7fae27fac3ad0e64be43219f5f4fd17'] = 'Transportista sustituto'; +$_MODULE['<{packlink}prestashop>order_details_e6e5fb296b6df4c8f7f831c7d3412240'] = 'Aquí está el transportista que has seleccionado:'; +$_MODULE['<{packlink}prestashop>order_details_4706040ad816e058d36a721e35301423'] = 'Aquí está el transportista que nosotros hemos seleccionado:'; +$_MODULE['<{packlink}prestashop>order_details_44749712dbec183e983dcd78a7736c41'] = 'Fecha'; +$_MODULE['<{packlink}prestashop>order_details_914419aa32f04011357d3b604a86d7eb'] = 'Transportistas'; +$_MODULE['<{packlink}prestashop>order_details_8c489d0946f66d17d73f26366a4bf620'] = 'Peso'; +$_MODULE['<{packlink}prestashop>order_details_5068c162a60b5859f973f701333f45c5'] = 'Número de tracking'; diff --git a/translations/fr.php b/translations/fr.php new file mode 100644 index 0000000..fdff829 --- /dev/null +++ b/translations/fr.php @@ -0,0 +1,86 @@ +packlink_0b97a05d427162a2ee640649ec60cb29'] = 'Expéditions Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_ef18c7cd5a3502ed4bd1fbe0711f5b30'] = 'Économisez jusqu\'à 70% sur vos coûts d\'expédition. Pas de frais fixe, ni de minimum de volume d\'envois exigé. Centralisez tous vos envois sur une unique plateforme.'; +$_MODULE['<{packlink}prestashop>packlink_462390017ab0938911d2d4e964c0cab7'] = 'Configuration actualisé avec succès'; +$_MODULE['<{packlink}prestashop>packlink_86d44abc0a7c7d72800225f5c802c76e'] = 'v1.1: Toutes vos commandes payées seront dorénavant importées automatiquement dans Packlink PRO.'; +$_MODULE['<{packlink}prestashop>packlink_6ad1638f364f235339f4b634ab14536d'] = 'v1.2 : Le(s) contenu(s) de vos colis sera automatiquement renseigné pour vos expéditions avec Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_8d8dcf11f578fbd84885523b99dba612'] = 'v1.3 : Les détails de l\'envoi et le numéro de suivi sont automatiquement importés dans les commandes PrestaShop. Remplir automatiquement les données manquantes du produit dans le catalogue (poids/dimensions)'; +$_MODULE['<{packlink}prestashop>packlink_d5958a20aeb6864da743668bc8c987b5'] = 'v1.4 : Synchronisation des statuts d\'expéditions sur Packlink PRO avec les statuts de commandes sur PrestaShop afin de maintenir actualisées vos commandes'; +$_MODULE['<{packlink}prestashop>packlink_10f272913bfc6bcfefbffb97c8aa5b64'] = 'v1.5 : Redesign de la page de configuration. Configuration de l\'adresse d\'enlèvement par défaut à partir de Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_02d825c6dd0492357ee20776776f2c63'] = 'v1.6 : Ajout de boutons d\\\'actions dans PrestaShop qui indique l\\\'action à réaliser pour chaque commande. Option pour choisir de créer vos envois automatiquement ou manuellement.'; +$_MODULE['<{packlink}prestashop>packlink_686e697538050e4664636337cc3b834f'] = 'Créer'; +$_MODULE['<{packlink}prestashop>packlink_f88e7238ae513219fced1387ada24122'] = 'Numéro de référence:'; +$_MODULE['<{packlink}prestashop>packlink_94966d90747b97d1f0f206c98a8b1ac3'] = 'Envoyer'; +$_MODULE['<{packlink}prestashop>packlink_13dba24862cf9128167a59100e154c8d'] = 'Imprimer'; +$_MODULE['<{packlink}prestashop>packlink_4351cfebe4b61d8aa5efa1d020710005'] = 'Voir'; +$_MODULE['<{packlink}prestashop>packlink_fc8a4b51bb08e059ee5947a2967f5963'] = 'Suivi avec Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{packlink}prestashop>packlink_914419aa32f04011357d3b604a86d7eb'] = 'Transporteur'; +$_MODULE['<{packlink}prestashop>packlink_8c489d0946f66d17d73f26366a4bf620'] = 'Poids'; +$_MODULE['<{packlink}prestashop>packlink_9f06b28a40790c4c4df5739bce3c1eb0'] = 'Coût d\'expédition'; +$_MODULE['<{packlink}prestashop>packlink_5068c162a60b5859f973f701333f45c5'] = 'Numéro de suivi'; +$_MODULE['<{packlink}prestashop>back_263494a530bf342ae23ec21d28ed6f21'] = 'Expédiez facilement vos commandes payées aux meilleurs tarifs avec Packlink PRO. Pas encore de compte ?'; +$_MODULE['<{packlink}prestashop>back_e0f179c9505c59254879b6ca513d35b9'] = ' Inscrivez-vous en ligne'; +$_MODULE['<{packlink}prestashop>back_bb38b5c72a367e0fbbf98bfe4efdcbc2'] = ' en seulement quelques secondes.'; +$_MODULE['<{packlink}prestashop>back_ad2376beebecdcf7846ba973fa1a005b'] = 'Configuration'; +$_MODULE['<{packlink}prestashop>back_7d06182c98480873fd25664fb3f7a698'] = 'Adresse de l\'expéditeur'; +$_MODULE['<{packlink}prestashop>back_33af8066d3c83110d4bd897f687cedd2'] = 'Statut des commandes'; +$_MODULE['<{packlink}prestashop>back_8d060c6c1f26e42643ba8d942ce8bb97'] = 'Unités de mesure'; +$_MODULE['<{packlink}prestashop>back_3d3d0e1cf8a4804562a5f3b14a93218a'] = 'Centre d\'aide'; +$_MODULE['<{packlink}prestashop>back_3f184c818991971619eac510c58db516'] = 'Connexion Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_307d9d03bb11eec9b8e17ae5804be36a'] = 'Une clé API associée à votre compte Packlink PRO doit être indiquée dans le champ ci-dessous afin de connecter Packlink PRO avec PrestaShop.'; +$_MODULE['<{packlink}prestashop>back_0de704e37355374d02208e081a5452c6'] = 'Générez dès maintenant votre clé API.'; +$_MODULE['<{packlink}prestashop>back_8121ed5d107fbbe4f4f5d4d2b889adbe'] = 'Clé API Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_c9cc8cce247e49bae79f15173ce97354'] = 'Sauvegarder'; +$_MODULE['<{packlink}prestashop>back_b46ddc2dc6573cbaa28949f9468cb2d9'] = 'Préférences pour la création des envois'; +$_MODULE['<{packlink}prestashop>back_efabfaefe35cb8a6dbcb13245f9a85ab'] = 'Créer automatiquement ou manuellement des envois dans Packlink PRO une fois que les commandes sont payées :'; +$_MODULE['<{packlink}prestashop>back_6903e2b3a86228f4d258e423fb6b913a'] = 'Créer automatiquement'; +$_MODULE['<{packlink}prestashop>back_a85b3f8e5456d47e8056e0372aeccb2a'] = 'Créer manuellement'; +$_MODULE['<{packlink}prestashop>back_fe4c4ddd503c10a8fe9a8249dc1a2336'] = 'Adresse(s) d\'enlèvement par défaut'; +$_MODULE['<{packlink}prestashop>back_6f7af3b914733e1f5ba45105287be347'] = 'Utiliser l\'adresse d\'enlèvement par défaut vous permettra d\'économiser du temps; il vous suffit d\'indiquer les détails de l\'expédition dans Packlink PRO. Vous pouvez les configurer et les modifier dans la section '; +$_MODULE['<{packlink}prestashop>back_2810557faa3bc1dd29cc1641541d4519'] = '\"Paramètres\" de Packlink PRO. '; +$_MODULE['<{packlink}prestashop>back_e9f7009a3509f4da8ce78cbad712b8a5'] = 'Par défaut'; +$_MODULE['<{packlink}prestashop>back_3e35c6d17b3f41d65732a32e85eb0c0d'] = 'Téléphone :'; +$_MODULE['<{packlink}prestashop>back_151994a8fad78d8d91387ac8c7885475'] = 'Il n\'y a pas d\'adresse d\'enlèvement par défaut configurée dans Packlink PRO !'; +$_MODULE['<{packlink}prestashop>back_ec211f7c20af43e742bf2570c3cb84f9'] = 'Ajouter'; +$_MODULE['<{packlink}prestashop>back_cdf4b324673b77427ca416ac40d3da9a'] = 'Statut de la synchronisation'; +$_MODULE['<{packlink}prestashop>back_348b4bdc33672e024a23cd3c12072c5d'] = 'Les statuts des commandes PrestaShop'; +$_MODULE['<{packlink}prestashop>back_3b6a80aad70166de7b5de4943b519c5e'] = 'sont synchronisés avec les statuts d\'expéditions de Packlink PRO comme il figure dans la table ci-dessous. '; +$_MODULE['<{packlink}prestashop>back_afa76985e2458e32f329a1bf2a1ad523'] = 'Chaque fois que le statut d\'une expédition change dans Packlink PRO, le statut de la commande associée dans PrestaShop est directement actualisé.'; +$_MODULE['<{packlink}prestashop>back_3a96c81e606c0602b9fee629a0eeef24'] = 'Statut d\'expédition Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_0c573dd42480d097bee61cdc975e16d8'] = 'Statut de commande PrestaShop'; +$_MODULE['<{packlink}prestashop>back_158bc559027a1bc2827e7da0d3ff32cd'] = 'Statut #1'; +$_MODULE['<{packlink}prestashop>back_2d13df6f8b5e4c5af9f87e0dc39df69d'] = 'En attente'; +$_MODULE['<{packlink}prestashop>back_f8762460f4735a774ba593d36db8074c'] = '(Aucun)'; +$_MODULE['<{packlink}prestashop>back_6e45ffbef4b733a0b988165fc7cba296'] = 'Statut #2'; +$_MODULE['<{packlink}prestashop>back_643562a9ae7099c8aabfdc93478db117'] = 'En cours de traitement'; +$_MODULE['<{packlink}prestashop>back_f4c513dd3babc5917becbdaf74fe7991'] = 'Statut #3'; +$_MODULE['<{packlink}prestashop>back_de04ee99badd303f6b87abe736b3a973'] = 'Prêt à être expédié'; +$_MODULE['<{packlink}prestashop>back_26051d4300f2c053a39df713ef1ca675'] = 'Statut #4'; +$_MODULE['<{packlink}prestashop>back_7ec4f8b296984ffe6ea829b7e1743577'] = 'En cours de livraison'; +$_MODULE['<{packlink}prestashop>back_5ef6c1599201631174cbad0330aa6462'] = 'Statut #5'; +$_MODULE['<{packlink}prestashop>back_67edd3b99247c9eb5884a02802a20fa7'] = 'Livré'; +$_MODULE['<{packlink}prestashop>back_5405b90a3e049fb630e63305d34ec924'] = 'Conversion unité de mesure'; +$_MODULE['<{packlink}prestashop>back_41e51bb942c3ed91a5ba95ef86977a7e'] = 'Packlink PRO fonctionne avec des kilogrammes et des centimètres. Votre PrestaShop peut être configuré avec d\'autres'; +$_MODULE['<{packlink}prestashop>back_ece834d9839ea190d2551135ada79921'] = 'unités de mesure.'; +$_MODULE['<{packlink}prestashop>back_4493a6ab1434295fc2ee81980ee139a4'] = 'Merci de vérifier que la table de mesure ci-dessous est correcte, et que les données importées depuis PrestaShop sur Packlink PRO correspondent.'; +$_MODULE['<{packlink}prestashop>back_af28d67cbda82fc994e27524c43a7b6b'] = 'Unité de poids'; +$_MODULE['<{packlink}prestashop>back_ebe86682666f2ab3da0843ed3097e4b3'] = 'kg'; +$_MODULE['<{packlink}prestashop>back_76019d8b34c330c0dcca0bc489085d33'] = 'Unité de dimension'; +$_MODULE['<{packlink}prestashop>back_820eb5b696ea2a657c0db1e258dc7d81'] = 'cm'; +$_MODULE['<{packlink}prestashop>back_a44416bcc8b9c0109f9a895b79970482'] = 'Remplir automatiquement les dimensions des produits'; +$_MODULE['<{packlink}prestashop>back_54fe3f3982ca0e1f6f497d7c6a320dab'] = 'Remplir automatiquement le poids et les dimensions de vos produits dans le catalogue PrestaShop depuis Packlink PRO lorsque cette donnée est manquante afin d\'expédier le produit :'; +$_MODULE['<{packlink}prestashop>back_68eec46437c384d8dad18d5464ebc35c'] = 'Toujours'; +$_MODULE['<{packlink}prestashop>back_6e7b34fa59e1bd229b207892956dc41c'] = 'Jamais'; +$_MODULE['<{packlink}prestashop>expedition_8264629920e2e27a68ae0ec8fc603eee'] = 'Envois avec Packlink PRO'; +$_MODULE['<{packlink}prestashop>expedition15_8264629920e2e27a68ae0ec8fc603eee'] = 'Envois avec Packlink PRO'; +$_MODULE['<{packlink}prestashop>order_details_e7fae27fac3ad0e64be43219f5f4fd17'] = 'Transporteur de substitution'; +$_MODULE['<{packlink}prestashop>order_details_e6e5fb296b6df4c8f7f831c7d3412240'] = 'Voici le transporteur que vous avez sélectionné :'; +$_MODULE['<{packlink}prestashop>order_details_4706040ad816e058d36a721e35301423'] = 'Voici le transporteur que nous avons sélectionné :'; +$_MODULE['<{packlink}prestashop>order_details_44749712dbec183e983dcd78a7736c41'] = 'Date'; +$_MODULE['<{packlink}prestashop>order_details_914419aa32f04011357d3b604a86d7eb'] = 'Transporteur'; +$_MODULE['<{packlink}prestashop>order_details_8c489d0946f66d17d73f26366a4bf620'] = 'Poids'; +$_MODULE['<{packlink}prestashop>order_details_5068c162a60b5859f973f701333f45c5'] = 'Numéro de suivi'; diff --git a/translations/index.php b/translations/index.php index 8442d6e..b66430a 100644 --- a/translations/index.php +++ b/translations/index.php @@ -1,35 +1,26 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +* Copyright 2017 OMI Europa S.L (Packlink) -header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at -header('Cache-Control: no-store, no-cache, must-revalidate'); -header('Cache-Control: post-check=0, pre-check=0', false); -header('Pragma: no-cache'); +* http://www.apache.org/licenses/LICENSE-2.0 -header('Location: ../'); -exit; +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/translations/it.php b/translations/it.php new file mode 100644 index 0000000..b4ffed4 --- /dev/null +++ b/translations/it.php @@ -0,0 +1,86 @@ +packlink_0b97a05d427162a2ee640649ec60cb29'] = 'Spedizioni Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_ef18c7cd5a3502ed4bd1fbe0711f5b30'] = 'Risparmia fino a un 70% sulle tue spedizioni. Nessun costo fisso, né abbonamento. Centralizza tutte le spedizioni in un\'unica piattaforma.'; +$_MODULE['<{packlink}prestashop>packlink_462390017ab0938911d2d4e964c0cab7'] = 'Impostazioni aggiornate correttamente'; +$_MODULE['<{packlink}prestashop>packlink_86d44abc0a7c7d72800225f5c802c76e'] = 'v1.1: Tutti i tuoi ordini completi da adesso saranno importati automaticamente su Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_6ad1638f364f235339f4b634ab14536d'] = 'v1.2: I contenuti inviati saranno inseriti automaticamente per le tue spedizioni con Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_8d8dcf11f578fbd84885523b99dba612'] = 'v1.3: I dettagli della spedizione e del tracking si importano automaticamente da PrestaShop. Compilazione automatica delle informazioni di prodotto (peso e misure) mancanti '; +$_MODULE['<{packlink}prestashop>packlink_d5958a20aeb6864da743668bc8c987b5'] = 'v1.4: sincronizzazione degli stati di spedizione Packlink PRO con lo stato degli ordini PrestaShop per mantenere aggiornati i tuoi ordini '; +$_MODULE['<{packlink}prestashop>packlink_10f272913bfc6bcfefbffb97c8aa5b64'] = 'v1.5: Redisegno della pagina di configurazione. Configurazione dell\'indirizzo predefinito dalle impostazioni di Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_02d825c6dd0492357ee20776776f2c63'] = 'v1.6: nuovo bottone in PrestaShop che indica l\'azione da realizzare per ciascun ordine. Possibilità di scegliere tra creare o automatizzare le spedizioni. '; +$_MODULE['<{packlink}prestashop>packlink_686e697538050e4664636337cc3b834f'] = 'Crea'; +$_MODULE['<{packlink}prestashop>packlink_f88e7238ae513219fced1387ada24122'] = 'Numero di spedizione:'; +$_MODULE['<{packlink}prestashop>packlink_94966d90747b97d1f0f206c98a8b1ac3'] = 'Invia'; +$_MODULE['<{packlink}prestashop>packlink_13dba24862cf9128167a59100e154c8d'] = 'Stampa'; +$_MODULE['<{packlink}prestashop>packlink_4351cfebe4b61d8aa5efa1d020710005'] = 'Visualizza'; +$_MODULE['<{packlink}prestashop>packlink_fc8a4b51bb08e059ee5947a2967f5963'] = 'Tracking con Packlink PRO'; +$_MODULE['<{packlink}prestashop>packlink_44749712dbec183e983dcd78a7736c41'] = 'Data'; +$_MODULE['<{packlink}prestashop>packlink_914419aa32f04011357d3b604a86d7eb'] = 'Corriere'; +$_MODULE['<{packlink}prestashop>packlink_8c489d0946f66d17d73f26366a4bf620'] = 'Peso'; +$_MODULE['<{packlink}prestashop>packlink_9f06b28a40790c4c4df5739bce3c1eb0'] = 'Costo della spedizione'; +$_MODULE['<{packlink}prestashop>packlink_5068c162a60b5859f973f701333f45c5'] = 'Numero di tracking'; +$_MODULE['<{packlink}prestashop>back_263494a530bf342ae23ec21d28ed6f21'] = 'Spedisci i tuoi ordini completi al miglior prezzo con Packlink PRO. Non hai ancora un account? '; +$_MODULE['<{packlink}prestashop>back_e0f179c9505c59254879b6ca513d35b9'] = 'Registrati subito'; +$_MODULE['<{packlink}prestashop>back_bb38b5c72a367e0fbbf98bfe4efdcbc2'] = ' gratuitamente.'; +$_MODULE['<{packlink}prestashop>back_ad2376beebecdcf7846ba973fa1a005b'] = 'Configurazione'; +$_MODULE['<{packlink}prestashop>back_7d06182c98480873fd25664fb3f7a698'] = 'Indirizzo mittente'; +$_MODULE['<{packlink}prestashop>back_33af8066d3c83110d4bd897f687cedd2'] = 'Stato ordini'; +$_MODULE['<{packlink}prestashop>back_8d060c6c1f26e42643ba8d942ce8bb97'] = 'Unità di misura'; +$_MODULE['<{packlink}prestashop>back_3d3d0e1cf8a4804562a5f3b14a93218a'] = 'Portale di Aiuto'; +$_MODULE['<{packlink}prestashop>back_3f184c818991971619eac510c58db516'] = 'Connetti Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_307d9d03bb11eec9b8e17ae5804be36a'] = 'Nel campo qui sotto dovrai indicare la API Key del tuo account Packlink PRO, per poter connettere Packlink PRO con PrestaShop.'; +$_MODULE['<{packlink}prestashop>back_0de704e37355374d02208e081a5452c6'] = 'Crea la tua API Key adesso'; +$_MODULE['<{packlink}prestashop>back_8121ed5d107fbbe4f4f5d4d2b889adbe'] = 'Packlink PRO API key'; +$_MODULE['<{packlink}prestashop>back_c9cc8cce247e49bae79f15173ce97354'] = 'Salva'; +$_MODULE['<{packlink}prestashop>back_b46ddc2dc6573cbaa28949f9468cb2d9'] = 'Impostazioni di creazione degli ordini'; +$_MODULE['<{packlink}prestashop>back_efabfaefe35cb8a6dbcb13245f9a85ab'] = 'Scegli tra la creazione automatica delle spedizioni in Packlink PRO ogni volta che un ordine verrà pagato o la compilazione manuale:'; +$_MODULE['<{packlink}prestashop>back_6903e2b3a86228f4d258e423fb6b913a'] = 'Crea automaticamente'; +$_MODULE['<{packlink}prestashop>back_a85b3f8e5456d47e8056e0372aeccb2a'] = 'Crea manualmente'; +$_MODULE['<{packlink}prestashop>back_fe4c4ddd503c10a8fe9a8249dc1a2336'] = 'Indirizzo/i predefinito/i'; +$_MODULE['<{packlink}prestashop>back_6f7af3b914733e1f5ba45105287be347'] = 'Usare un indirizzo predefinito ti permette di risparmiare tempo, precompilando i tuoi dati di invio su Packlink PRO. Potrai impostare e modificare il tuo indirizzo predefinito '; +$_MODULE['<{packlink}prestashop>back_2810557faa3bc1dd29cc1641541d4519'] = 'su Packlink PRO dal menu Impostazioni.'; +$_MODULE['<{packlink}prestashop>back_e9f7009a3509f4da8ce78cbad712b8a5'] = 'Predefinito'; +$_MODULE['<{packlink}prestashop>back_3e35c6d17b3f41d65732a32e85eb0c0d'] = 'Telefono : '; +$_MODULE['<{packlink}prestashop>back_151994a8fad78d8d91387ac8c7885475'] = 'Non esiste nessun indirizzo predefinito configurato su Packlink PRO!'; +$_MODULE['<{packlink}prestashop>back_ec211f7c20af43e742bf2570c3cb84f9'] = 'Aggiungi'; +$_MODULE['<{packlink}prestashop>back_cdf4b324673b77427ca416ac40d3da9a'] = 'Stato della sincronizzazione'; +$_MODULE['<{packlink}prestashop>back_348b4bdc33672e024a23cd3c12072c5d'] = 'Lo stato degli ordini PrestaShop'; +$_MODULE['<{packlink}prestashop>back_3b6a80aad70166de7b5de4943b519c5e'] = 'è stato sincronizzato con lo stato delle spedizioni Packlink PRO come configurato nella tavola a seguire.'; +$_MODULE['<{packlink}prestashop>back_afa76985e2458e32f329a1bf2a1ad523'] = 'Ogni volta che lo stato di una spedizione sarà cambiato su Packlink PRO, lo stato dell\'ordine PrestaShop a cui è associata la spedizione sarà aggiornato.'; +$_MODULE['<{packlink}prestashop>back_3a96c81e606c0602b9fee629a0eeef24'] = 'Stato della spedizione Packlink PRO'; +$_MODULE['<{packlink}prestashop>back_0c573dd42480d097bee61cdc975e16d8'] = 'Stato dell\'ordine PrestaShop'; +$_MODULE['<{packlink}prestashop>back_158bc559027a1bc2827e7da0d3ff32cd'] = 'Stato #1'; +$_MODULE['<{packlink}prestashop>back_2d13df6f8b5e4c5af9f87e0dc39df69d'] = 'In attesa'; +$_MODULE['<{packlink}prestashop>back_f8762460f4735a774ba593d36db8074c'] = '(Nessuno)'; +$_MODULE['<{packlink}prestashop>back_6e45ffbef4b733a0b988165fc7cba296'] = 'Stato #2'; +$_MODULE['<{packlink}prestashop>back_643562a9ae7099c8aabfdc93478db117'] = 'In processo'; +$_MODULE['<{packlink}prestashop>back_f4c513dd3babc5917becbdaf74fe7991'] = 'Stato #3'; +$_MODULE['<{packlink}prestashop>back_de04ee99badd303f6b87abe736b3a973'] = 'Pronto per l\'invio'; +$_MODULE['<{packlink}prestashop>back_26051d4300f2c053a39df713ef1ca675'] = 'Stato #4'; +$_MODULE['<{packlink}prestashop>back_7ec4f8b296984ffe6ea829b7e1743577'] = 'In transito'; +$_MODULE['<{packlink}prestashop>back_5ef6c1599201631174cbad0330aa6462'] = 'Stato #5'; +$_MODULE['<{packlink}prestashop>back_67edd3b99247c9eb5884a02802a20fa7'] = 'Cosegnato'; +$_MODULE['<{packlink}prestashop>back_5405b90a3e049fb630e63305d34ec924'] = 'Conversione unità di misura'; +$_MODULE['<{packlink}prestashop>back_41e51bb942c3ed91a5ba95ef86977a7e'] = 'Packlink PRO funziona con chilogrammi e centimetri. Il tuo account PrestaShop potrebbe essere configurato con altre '; +$_MODULE['<{packlink}prestashop>back_ece834d9839ea190d2551135ada79921'] = 'unità di misura.'; +$_MODULE['<{packlink}prestashop>back_4493a6ab1434295fc2ee81980ee139a4'] = 'Ti preghiamo di assicurarti che la tavola a seguire riporti i dati corretti e che i dati importati da PrestaShop a Packlink PRO corrispondano'; +$_MODULE['<{packlink}prestashop>back_af28d67cbda82fc994e27524c43a7b6b'] = 'Unità di peso'; +$_MODULE['<{packlink}prestashop>back_ebe86682666f2ab3da0843ed3097e4b3'] = 'kg'; +$_MODULE['<{packlink}prestashop>back_76019d8b34c330c0dcca0bc489085d33'] = 'Unità delle dimensioni'; +$_MODULE['<{packlink}prestashop>back_820eb5b696ea2a657c0db1e258dc7d81'] = 'cm'; +$_MODULE['<{packlink}prestashop>back_a44416bcc8b9c0109f9a895b79970482'] = 'Completa automaticamente le unità di misura del prodotto'; +$_MODULE['<{packlink}prestashop>back_54fe3f3982ca0e1f6f497d7c6a320dab'] = 'Completa automaticamente peso e dimensioni su PrestaShop da Packlink PRO, quando questa informazione non è presente per un prodotto che spedisci:'; +$_MODULE['<{packlink}prestashop>back_68eec46437c384d8dad18d5464ebc35c'] = 'Sempre'; +$_MODULE['<{packlink}prestashop>back_6e7b34fa59e1bd229b207892956dc41c'] = 'Mai'; +$_MODULE['<{packlink}prestashop>expedition_8264629920e2e27a68ae0ec8fc603eee'] = 'Spedizione con Packlink PRO'; +$_MODULE['<{packlink}prestashop>expedition15_8264629920e2e27a68ae0ec8fc603eee'] = 'Spedizione con Packlink PRO'; +$_MODULE['<{packlink}prestashop>order_details_e7fae27fac3ad0e64be43219f5f4fd17'] = 'Cambiare corriere'; +$_MODULE['<{packlink}prestashop>order_details_e6e5fb296b6df4c8f7f831c7d3412240'] = 'Qui vedrai il corriere da te selezionato:'; +$_MODULE['<{packlink}prestashop>order_details_4706040ad816e058d36a721e35301423'] = 'Qui vedrai il corriere selezionato da noi:'; +$_MODULE['<{packlink}prestashop>order_details_44749712dbec183e983dcd78a7736c41'] = 'Data'; +$_MODULE['<{packlink}prestashop>order_details_914419aa32f04011357d3b604a86d7eb'] = 'Vettore'; +$_MODULE['<{packlink}prestashop>order_details_8c489d0946f66d17d73f26366a4bf620'] = 'Peso'; +$_MODULE['<{packlink}prestashop>order_details_5068c162a60b5859f973f701333f45c5'] = 'Numero di tracking'; diff --git a/upgrade/Upgrade-1.3.0.php b/upgrade/Upgrade-1.3.0.php new file mode 100644 index 0000000..40d7a49 --- /dev/null +++ b/upgrade/Upgrade-1.3.0.php @@ -0,0 +1,66 @@ +registerHook('displayBackOfficeHeader')) { + return false; + } + if (!$object->registerHook('displayOrderDetail')) { + return false; + } + + if (version_compare(_PS_VERSION_, '1.6.1', '>=')) { + + if (!$object->registerHook('displayAdminOrderContentShip')) { + return false; + } + if (!$object->registerHook('displayAdminOrderTabShip')) { + return false; + } + } + if (version_compare(_PS_VERSION_, '1.6.1', '<')) { + if (!$object->registerHook('displayAdminOrder')) { + return false; + } + } + + $sql = 'SELECT column_name + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = "'._DB_PREFIX_.'packlink_orders" + AND table_schema = "'._DB_NAME_.'" + AND column_name = "details"'; + $column = Db::getInstance()->getRow($sql); + + if (!$column) { + $sql = 'ALTER TABLE '._DB_PREFIX_.'packlink_orders ADD details VARCHAR(1500)'; + } + + if (!Db::getInstance()->execute($sql)) { + return false; + } + + return true; +} diff --git a/upgrade/Upgrade-1.4.0.php b/upgrade/Upgrade-1.4.0.php new file mode 100644 index 0000000..21e4cb1 --- /dev/null +++ b/upgrade/Upgrade-1.4.0.php @@ -0,0 +1,41 @@ +createTab()) { + return false; + } + + if (!Configuration::updateValue('PL_ST_AWAITING', 0)) { + return false; + } + + $object->registerHook('actionObjectOrderUpdateAfter'); + $object->registerHook('actionOrderHistoryAddAfter'); + $object->registerHook('actionOrderStatusPostUpdate'); + + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'packlink_wait_draft` ( + `id_order` int(11) NOT NULL AUTO_INCREMENT, + `date_add` DATE, + PRIMARY KEY (`id_order`) )')) { + return false; + } + if (!Db::getInstance()->Execute(' + CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'packlink_done_draft` ( + `id_order` int(11) NOT NULL AUTO_INCREMENT, + `date_add` DATE, + PRIMARY KEY (`id_order`) )')) { + return false; + } + + return true; +} diff --git a/upgrade/Upgrade-1.6.0.php b/upgrade/Upgrade-1.6.0.php new file mode 100644 index 0000000..aec6a2d --- /dev/null +++ b/upgrade/Upgrade-1.6.0.php @@ -0,0 +1,69 @@ +=')) { + if (!$object->registerHook('displayAdminOrder')) { + return false; + } + } + if (!Configuration::updateValue('PL_CREATE_DRAFT_AUTO', 1)) { + return false; + } + if (!$object->registerHook('actionOrderStatusPostUpdate')) { + return false; + } + if (!$object->registerHook('displayHeader')) { + return false; + } + if (!Configuration::updateValue('PL_ST_AWAITING', 0)) { + return false; + } + if (!$object->createTabPdf()) { + return false; + } + + $sql = 'SELECT column_name + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = "'._DB_PREFIX_.'packlink_orders" + AND table_schema = "'._DB_NAME_.'" + AND column_name = "pdf"'; + $column = Db::getInstance()->getRow($sql); + + if (!$column) { + $sql = 'ALTER TABLE '._DB_PREFIX_.'packlink_orders ADD pdf VARCHAR(1500)'; + } + + if (!Db::getInstance()->execute($sql)) { + return false; + } + + $sql = 'SELECT id_order + FROM `'._DB_PREFIX_.'packlink_orders`'; + $ids = Db::getInstance()->ExecuteS($sql); + + foreach ($ids as $key => $id) { + $object->createPacklinkDetails($id['id_order']); + } + + return true; +} diff --git a/upgrade/Upgrade-1.6.3.php b/upgrade/Upgrade-1.6.3.php new file mode 100644 index 0000000..3f9b8c4 --- /dev/null +++ b/upgrade/Upgrade-1.6.3.php @@ -0,0 +1,34 @@ + $override) { + if (!is_file(_PS_OVERRIDE_DIR_.$override) || !is_writable(_PS_OVERRIDE_DIR_.$override)) { + return false; + } + rename(_PS_OVERRIDE_DIR_.$override, _PS_OVERRIDE_DIR_.$override.'.Old'); + } + } + return true; +} diff --git a/upgrade/index.php b/upgrade/index.php new file mode 100644 index 0000000..b66430a --- /dev/null +++ b/upgrade/index.php @@ -0,0 +1,26 @@ +.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8 !important;border-color:#d6e9c6;border-top:1px solid #d6e9c6 !important;border-bottom: 1px solid #d6e9c6 !important;}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color: #fcf8e3 !important;border-color:#faebcc;border-top: 1px solid #faebcc !important;border-bottom:1px solid #faebcc !important;}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/views/css/index.php b/views/css/index.php new file mode 100644 index 0000000..b66430a --- /dev/null +++ b/views/css/index.php @@ -0,0 +1,26 @@ +li>a, .pl_navigation .nav>li>a:hover, .pl_navigation .nav>li>a:focus, + .pl_navigation .nav>li>a:hover>span, .pl_navigation .nav>li>a:focus>span{ + color:#2095f2; + background-color: #FFFFFF; + font-size: 14px; + text-decoration: none; +} +.pl_navigation .nav>li.active>a:active, .pl_navigation .nav>li>a:active, .pl_navigation .nav>li.active>a:focus, .pl_navigation .nav>li.active>a:hover, .pl_navigation .nav>li.active>a{ + border-bottom: 3px solid #4277bb; + padding-bottom: 2px; + color:#4277bb; + background-color: #FFFFFF; + font-size: 14px; + font-weight: bold; + border-radius: 0; +} + +.tab_title span:after { + content: ""; + position: absolute; + height: 10px; + border-bottom: 2px solid #dcdcdb; + top: 0; + width: 1500%; +} +.tab_title span:after { + left: 100%; + margin-left: 15px; +} +.pl_navigation .tab_title { + line-height: 1; + text-align: left; + margin: 0 0 20px 0px; + font-size: 15px; + overflow: hidden; +} +.tab_title span { + display: inline-block; + position: relative; +} +.pl_navigation .tab_description { + margin: 0 0 22px 0; +} +.pl_navigation .form-group, .pl_navigation .form-horizontal { + float:initial; +} +.pl_navigation .btn-info { + background-color: #2095f2; + border-color: #21a6c1; + min-width: 120px; +} +#pl_key .col-sm-11 { + padding-left: 0px !important; +} +.pl_navigation .egal { + width: 20px; +} +.pl_navigation .col_title { + text-align: left !important; +} +.pl_navigation .small_col { + width: auto; + text-align:left !important; + white-space: nowrap; + padding: 0; + padding-top: 8px; +} +.pl_navigation .other-wh { + border-color: silver; + background: #fcfcfc; +} +.pl_navigation .warehouse { + justify-content: space-between; + min-height: 135px; + margin: 0 40px 40px 0; + padding: 10px; + border-width: 1px; + border-style: solid; + border-radius: 2px; +} +.pl_navigation .default-wh { + border-color: #56b652; + background: rgba(203,235,199,.4); +} +.pl_navigation .default-wh .btn-default { + margin: 0 0 0 10px; + padding: 0 9px; + color: #56b652; + font-size: .91429rem; + line-height: 2.8; + font-weight: 700; + letter-spacing: .5px; + text-transform: uppercase; + border-width: 1px; + border-color: #56b652; + border-style: solid; + border-radius: 20px; + background-color: transparent; + transition: opacity ease-in-out .3s; +} +.pl_navigation .warehouse .title { + margin: 0; + overflow: hidden; + color: #4a4a4a; + font-size: 16px; + font-weight: 600; + white-space: nowrap; + text-overflow: ellipsis; +} +.pl_navigation .default-wh .title { + color: #1f791d; +} +.pl_navigation .warehouse p { + font-size: 14px; + margin-bottom: 3px; +} +.pl_navigation .warehouse header { + display: flex; + margin-bottom: 8px; +} +.import-radio { + padding-right: 100px; +} +svg.ic_assignement { + float: left; +} +#expeditionPl { + width: 100%; +} +#expeditionPl th:last-child { + text-align: right; + font-weight: normal; +} +@media only screen and (max-width: 998px) { +.unit-block { + width: 85% !important; +} +} +@media only screen and (max-width: 768px) { +.import-radio { + margin-left: 26px; +} +} \ No newline at end of file diff --git a/views/css/style16.css b/views/css/style16.css new file mode 100644 index 0000000..529d6dd --- /dev/null +++ b/views/css/style16.css @@ -0,0 +1,174 @@ +body { + background-color: white; +} +label { + text-align:left; +} +#headingOne a:hover, #headingOne a:focus, #headingOne a { + text-decoration: none; + color:#555 !important; +} +.pl_navigation .inscription { + font-family: 'Open Sans',Helvetica,Arial,sans-serif; + font-size: 15px; +} +#collapseOne { + padding-top: 10px; + padding-bottom: 10px; +} +#headingOne { + margin: -19px -21px -1px -16px !important; +} +#headingOne img { + height: 20px; +} +#pl_address input, #pl_key input, #pl_address select, #pl_units input, #pl_status select{ + background-color: #FFFFFF; + border-radius: 4px; + margin-bottom: 10px; +} +#main { + background-color: #FFF; +} +#pl_units input[disabled], #pl_address input[disabled]{ + background-color: #eee; +} + + .pl_navigation .nav>li>a, .pl_navigation .nav>li>a:hover, .pl_navigation .nav>li>a:focus, + .pl_navigation .nav>li>a:hover>span, .pl_navigation .nav>li>a:focus>span{ + color:#2095f2; + background-color: #FFFFFF; + font-size: 14px; + text-decoration: none; +} +.pl_navigation .nav>li>a:active>span, +.pl_navigation .nav>li.active>a:active>span, .pl_navigation .nav>li.active>a:active,.pl_navigation .nav>li>a:active, .pl_navigation .nav>li.active>a>span, .pl_navigation .nav>li.active>a:focus, .pl_navigation .nav>li.active>a:hover, .pl_navigation .nav>li.active>a:hover>span, .pl_navigation .nav>li.active>a, .pl_navigation .nav>li.active>a:focus>span{ + border-bottom: 3px solid #4277bb; + padding-bottom: 2px; + color:#4277bb; + background-color: #FFFFFF; + font-size: 14px; + font-weight: bold; +} +.tab_title span:after { + content: ""; + position: absolute; + height: 10px; + border-bottom: 2px solid #dcdcdb; + top: 0; + width: 5000%; +} +.tab_title span:after { + left: 100%; + margin-left: 15px; +} +.pl_navigation .tab_title { + line-height: 1.3; + text-align: left; + margin: 0 0 20px 0px; + font-size: 15px; + overflow: hidden; +} +.tab_title span { + display: inline-block; + position: relative; +} +.pl_navigation .tab_description { + margin: 0 0 22px 0; +} +.pl_navigation .form-group, .pl_navigation .form-horizontal { + float:initial; +} +.pl_navigation .btn-info { + background-color: #2095f2; + border-color: #21a6c1; + min-width: 120px; +} +.pl_navigation .egal { + width: 20px; +} +.pl_navigation .col_title { + text-align: left !important; +} +.pl_navigation .small_col { + width: auto; + text-align:left !important; + white-space: nowrap; +} +.pl_navigation .other-wh { + border-color: silver; + background: #fcfcfc; +} +.pl_navigation .warehouse { + justify-content: space-between; + min-height: 135px; + margin: 0 40px 40px 0; + padding: 10px; + border-width: 1px; + border-style: solid; + border-radius: 2px; +} +.pl_navigation .default-wh { + border-color: #56b652; + background: rgba(203,235,199,.4); +} +.pl_navigation .default-wh .btn-default { + margin: 0 0 0 10px; + padding: 0 9px; + color: #56b652; + font-size: .71429rem; + line-height: 1.8; + font-weight: 700; + letter-spacing: .5px; + text-transform: uppercase; + border-width: 1px; + border-color: #56b652; + border-style: solid; + border-radius: 20px; + background-color: transparent; + transition: opacity ease-in-out .3s; +} +.pl_navigation .warehouse .title { + margin: 0; + overflow: hidden; + color: #4a4a4a; + font-size: 16px; + font-weight: 600; + white-space: nowrap; + text-overflow: ellipsis; +} +.pl_navigation .default-wh .title { + color: #1f791d; +} +.pl_navigation .warehouse p { + font-size: 14px; + margin-bottom: 3px; +} +.pl_navigation .warehouse header { + display: flex; + margin-bottom: 8px; +} +#myTab li.active a svg { + fill: #555 !important; +} +#myTab li a svg { + height: 16px; + width: 16px; + float: left; + fill: #00aff0; + margin-top: 1px; + margin-right: 3px; +} +#myTab li a:hover svg { + fill: #0077a4 !important; +} +@media only screen and (max-width: 998px) { +.unit-block { + width: 85% !important; +} +} +@media only screen and (max-width: 768px) { +.import-radio { + margin-left: 26px; +} +} diff --git a/views/img/add.gif b/views/img/add.gif new file mode 100644 index 0000000000000000000000000000000000000000..df08c0b6b93e51661981722c0f8514a8bb2748af GIT binary patch literal 598 zcmZ?wbhEHb6krfwc*ekB(`vH$=912x71!Tg%G(kVH#>CJ!D;{h|KELeXZ6nHma`Qn z?jD|VV`A&Jg6AKedh|J_uL_!ergPH1x>Z+Z*X&NsKajNa#QeRFw%&Ys(SL?R!vOo@`xmd)CzbO}%HD9eYgAJ~+Pg z{M4o`xj|EXcHLQ5us1Gwe#oP@52s!2N?8@M<@WM*_m@^4&3gas&5;-TPd_`f_3rB8 zt;sbzvU>JbWv-5L?zSr19Y66%{j}pPJ=a=#j#ekk4L@>c=YvmouD!q3dA_D+YjN0I zm*TbA41*OY{$ycfXJBX00XYy9Ck*VH8`ztgTUuMq-PCz?n5323*d>ItEtxI#Y-F@r zB~Rn^o?Eo|kuo6UtxYZgUDO|~W_8Ji57 zA$L}@A3J?n>TMxPEI~@ z8L9Ky+U{zCh92BX{H(G}s;ZJJ7!3_IjQIJ@1Z36Kot#uu82&S~ qanyWt65wFv)3KPaAmM^zTa%Q5&jEuY3Y}a!=Wd4nJ za0`PlBg3pY5)2GXe>`0rLn`LHz2n=#Unq0@Wv-O_^Ex2_~T`ghNWxgjIpL6#UU&N%v?@zr{ z-gjo#v!uR#(MGG@Ff%Y8Xkj^?xri|#XePTv>@)HIxdsOfXT5U2$?j3e{6*EmE!cF? z?wbd=AJxyhrhC3I((>23B~yQBCuslVSaafPNoy{{KH>PhtDkuz=5Ky{>b76a!O-*D z?!3KrMDdaLx-7nJ7qi!X5sELnTC{4dTXvdF!Q3C0R!>@eU`H9(+QlyqC_g&ge~vjJ zYj*6lYfKM#KPtOC6*XA@RxEoR`wyo-5-UGTMg%+5_imW^#<=-KV9->nGu&iO7_ePEtcF58DG zKQ4BiN?x%0LYvirpjjV{UPdP*9=u!9Q+go$k^7n1j0w39*Ots!dqCi0^0rxy3ErHw zB}-z?ll01C+0Wun&I{K#z?XDfUa8t|p+kG; zZpLrwJM4IqMG9tpc|6~vuuy8I-UGIm$M*Yti*XXY=ym@?m zYVUuh8I#{+O*tL4sXwt>ZohoQ)DKoy+H^&J&-z)u$v!{4_s!BB(h1d%io+fIF8}+{ zK570|E@QSGF8@AOU!K3I%S>>G_v^>;%D;`vOb_@xkW`lcuV|qA$R%{%(*x{n^8ZZ@ z?4OB*Zj<}>-{_?9CTUk*Gu9jK-+qPJ-z;y9K9Kik{xO^>50of1FX->%y1MTaf5u8+ P=3wx2^>bP0l+XkK-xiF; literal 0 HcmV?d00001 diff --git a/views/img/index.php b/views/img/index.php index 8442d6e..b66430a 100644 --- a/views/img/index.php +++ b/views/img/index.php @@ -1,35 +1,26 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +* Copyright 2017 OMI Europa S.L (Packlink) -header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at -header('Cache-Control: no-store, no-cache, must-revalidate'); -header('Cache-Control: post-check=0, pre-check=0', false); -header('Pragma: no-cache'); +* http://www.apache.org/licenses/LICENSE-2.0 -header('Location: ../'); -exit; +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/views/img/logo-pl.svg b/views/img/logo-pl.svg new file mode 100644 index 0000000..d087580 --- /dev/null +++ b/views/img/logo-pl.svg @@ -0,0 +1,89 @@ + +image/svg+xml \ No newline at end of file diff --git a/views/img/logo.jpg b/views/img/logo.jpg deleted file mode 100644 index 1a3afeb87bff6d8837ac7cf7c8b95aa6929adf01..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11412 zcmb7qbyVHn*6qRF4({$!thl=rr?|VjQ;NHLiyz!wi%W5L4(`R>p*()~-f`dejrZ5v z*<+6+D?7ihfq{mG zL4<>Yg-1q2Mn*zJLP9|WqNAWK4TU7{yKKJcr?*# zc6Q?7Y6xpSSMK?}0}isGlEGr9)Jx*FMeJv=^Nfl^U7r;eVWZb`>|HX)wBTDpr{s%{=!pCH#)lydUMqva~) zG_<)7U(NaBn1`x(${f{yy=!91#||s#uvLr~FS{T;x;a(!vnxi4kME{dw)@tl(W1^b zIrE&0@=Qy0@ecUh>GA^4oGpZFpo-^eidk`*VS7xg5}z*8P+QJ&E^wYFa%SC_WTMlk zBjmDdTsU1a0#d5@#L>4kW&Pyu`1BxY#tr0g?N&4g8`(W8z&N`~Q-$&w8(Q*Iv_wr+ z7v8oB8w%ZdVBUV0e1p2-U;0!Vv@*BtzVCeKj{Vlea?do%p_Bl2N_ITFU4r#h{CIhA z9QLe&9}mlcaemv<{Ak7M z-w%^RC7lt=8uq3m6^^b;#fFAbN7sUAiK~__rynP!Y#=+^l^wg9M|S*n{mpIgVM=>7 zY%1P=j&eve{$x-(*XZAF0|96%T5(P!`UxqG>QOA=Px{^N(Q|bux#EIUdo#?DrB&bC z%x=9sc)4|5xk(;jT>RAHMt%d$2IjQ2#bU!$3m8Lcjq& zBI+|2IuM7QlZ=%^1cO@n!++sF+!_J~GHtsB_`Kg@!+lzjL_04;cxR`ZltuJC<`DTi zw0*|X_qw0rmbGWd`$K;k9Kc*EESAz1QmaTB*!(98q&@@vR<{xJ*XTJo= zR3`sy?fVk94PoE$-{DX@%h#4XlngU58}xIs>s;>Lh~Mj8{?77AbR3VDVO;)UPKIiz zQh*;iZzbnD%ScbF_+~0vQ-lxyS)+@pd(2_5sBJttuSRfjHRQBt9>NI5Po|+mXD|)4 z{<=h}`kU>T+nWU@Q4f&{I_z+D*xdt!=QFw}ytuM<3_csSf{&KfPCWYk`8C7Fwi8vR z9`;PQD^_0ATJYzW!yswPZ#p4?je>k)Y5Nxm7Z0bFz5>lss8;PIZY~<9Ho>ylu6_I= zSm~816-7Lfe+~MZttjr=m)2Uz2{ikQfcNveN%?d9<_10-tb2VbqI*&%E-3{Z_uu z?*Ip_u(c7M8w^8J=*n%yfd79cj;qR~jvewX2Wj zq}J8zZ*zwD%zWi`^(j80X5gMGBe+mnG}E0*Lt2QU>m9J|jUBCYXA24<;1!OJxQM;B z;lCn|#*|mvSR3vlP>8oU*&DFYN><5_bSA1Wb~gXVq%Fb8RDb}lXd*h1H&90ZBm>iO z+m*8$;cYLVG;(yk0*64*hFqyT?2hI_#$PcBi_AdGjh!sQN*ahYkF`Xe8ZD#EsOOC> z1kBr3F|RC74M4Cz>pp%5e8dAc1_1C80MPKzupe0cuLAM034;M7XTua#0bxP>*yX=N;{)}DA^1AlPlmsL`V>zVHJ*~IGe|xzF<_$DAuOmWpQtOB zxkI0vn{ou|U%%4VQK1`-PbiadZ;e#tURE^|oaORtBi;Y1qe9XVgnC5zD0CdD!NRrg zk3rn8?cR#pRID0%qTPAH|hU^ZbEHTR*NyWm9!HFqRtt$p?6GubhCF-v*wb=eTIK~j^>uG{&jO=WY$|@FVv1xBT<(IyW z?j%ebtB6WyO*Yj0vgkT)lU@H>&t?$yZ5;+p;|^0Oml~s|#hjL(M0ty(7r58g>n(6G zgC)EIVGIu=#&n8uYLy`K5b z7JW6(h5!lR4!(5Mo+_k<;u=lHLv(#XPbHrbS4P{sm6rfhiP7pn4_*)lGp5Wr^(Ugw z1TevTK*R8JXZ@O3wgSB@n8zDNc_yZ|qM}2CP+lb=1UqU6xjLfglV3eb^WIQxnuQ6c zo0MIq$j6}7&gpLNu^jIHFsxsF&*{sRmq@#>#w#75bJ&*MGYRvjH{Zbpv+-Gvu*>;U z(X+Cq%ed-qZVpyTIe&@nQOSH_7|`v-zzK4}aveYG=nmA1ESN|SjF3M{R48$uCR9Cg zFj343uHTYK*oUZ7yV4a0mQeon%*PG>c> zDxq<*Gvc(^1@luvC6`r-%?>?>j<_x^>LOz4pxj7@PSoLP$+&b}8{V!^iQJYScW|t+d zQ(kGF?@Rl=cf>H)iWqhoZtvpkHA<6}G5AYb>O5ltgWXbsuepz&RI#l69bV>@jq< zh#+P}VBpWBFg7z;!?2o>F!8Gcj+h^x_%+rJ61kGO^KP<(4MRds%8vRBqMoJ+NaDx_ zTQ<#d<$yFs6>o)(CjB!aHC4kW^qIN{U+F_k-CYx9m`W|C>*tzHWw+K{x}ecK5H!toS8c3TAm+i$*(zO>zsL( zn&W@=sKkhEqgpB7Gk01M*d??FZ3^KG4^ns4tFm)QUyBzKzEC(a9(n+|fWe4B z;6UU)m~i7&6SgSKW=ZU4HE1Sj4?51w#!Qb@&J3|<9em%^FJU@wDI;NXmxn z@w@B-!78bVcjysST28yyRN!K_>KeJZs4Jask@3F!uKNRGxiA0_&=61`ECUMu-xv!C z_@L?-FhFulHc^#8EDB0?PG@w`_CLJCII(U9TTHq4U*rSwAB44MZ%KLwL|5%a%LTre zrtS~12kcz5Ye!)-Z7s1Pxm;d%+5%0W#HMEi^Q z@9{c!4JG{b)QWhqB)VhmJK)F{n-S%*n^wa%)pS|5osl3kVxJ6mJKOrfto|J6#r%a^ z)AL&Sh&|Iny3dd38;VW|wP9v`9D7PLluN%prZ_|BQ&;Y)^!x| zQ}W0Jw)91 zw>CyYE<@$3Gk;;vajA7MD|o`Ueg|k7RD6B*|62S;_d!HbJym$9js{0#OPWY_&d0PI zBR;*MzgCvb+nnyb130P_&o2T=Yj%tIKc|f@DDA{8T`E4Em;Gp>Ih=Y2RLC`LP`cX* zrVXin`gN=^Zwl7`m}d~%G~OE3L$}_bhhfP-RfZw0$GmNSUCuATjm}^$% zr&D0BlH&KwOWurqsx*(@G%{}sPX20?+_5zJZ>O)@lJby0X-k{%Mg)-7FEH4DZ}qr( z+qH4;SO~VJrX-ns2ZUH$5#l}4HSt}ebv-J5FOgL37Z*&cOqld~=$}@;5)1N61;@H+>SeJ#-DWoN$kZ$$j}`#Zsd= zblYc59Js5dW0CIEAnf3Ws~qFwxbvh@G#v8f37nt0^R1o{9~S}#$Dc~I?QAM2saIxl zYUk;{$D=FuBORuDUKz~$4y<$;j7Le68C|PPO0t|bIL9BY$dkpe5V`KZ1FAkyOzdOg z1OWvB1qTO@0P`=V_`wqa&=^2WayA$&3Q-kfXG#t+m&CeWbaqt}*FaGH2VE2qR|`ts zrc%zoyqfvXbP84&Qb=34nQ@Bt{-`xAEzR;;J;t6$ynEtf5V#3#S$%=uim*ErkOmynTNrm#~d{$~n@<6*ir z+Eb1ER)ITKXM&2!EQxj8JtNH4!l)W7$2K9=)+ZA~xRM)+)f`*>!$*6zX|`UBKPMud zZM+>!v#Y>)4ZmwZHG{Jlx^yJ7{7Q#Zp+@k=vnm{_J%$-c>Ft8&MUZ=nc7Rn2-!|Sl z23Vex1om43U!T6T4Q;FW9BwKLEcTsqtBVs7xvS~wT$`+VCR>MFLwHmBVgze-5(F zr3S!}YR&1bwNvrVmS-tQn6x@OzDhb~KYYz%&5Pqqhma1eD7z{bM~xU-9Iit8Nt;?f z?hmwP-X;vkIWb-R=b>qIvHjH{HCu3hBTZ3mZ%e(cBUcriuNyeM;yWg2jcPXlkqL(i zSK81eQ!HYHlFHoAUdN8!PW=?07fK(aQ`S1x?;k7y|L(Rws&T5M19+;3NR7A4JRF_t zMBQ%)5hGy3)y{#}D-f_fluDh6rT^Zm$pX{j!)n{4iEo)TNCNq1q4{5}B3YM!SzUbX zFdvR1&s=Iv^4Wqf)BAq0us&W`x9Fmx&E!w39wcAAv$D<^m#=uNRB>C_v4RSVOfueQ zBq>?u z{uAHhvODt8sFbu$-$2($Z@n6|!)#Q}p~lzpj&$QLEXf9GSd@0a z8Zl#yXXLr3x~@&fvRbI>{4k?!Of;*My$>gGKOaM`heJDw7_R0Us+vx+!y-v$;3|K`z?M%;6lFxST#A* zU9ItiCCkj>K5L4n8k3byjQi4G%_+NZyl_dkZj>O4CFMQjU?ZO4a(H*X1Ndt^kL^Bt z>+{_{e2Zn8q>S~dt4dMxHsB+cOFk>(vahfJ6Sgk)Yk`lJ3TlYE8RZ!xb`6;PJ-l|K z7+W1q< zl$4asc`f^dS_^x_Q9GEav_#w&*rS!{E~}w!eiTg3vpfrt9ye+H8hE$$^fkgVGRZ9U z(V;VK@x-gg6B?e)akhdD&``X?XIIr4EgU~})>U?Y1}uaf3ypRLXOBR$Rhq%qWj~!% zsIU5$rtPiTU-dw)zB)CT!ttkhnFGz_W6q&!9yovo>q8FyK}4qgJQLcfqeyzE^G@4Q z2Rgat6&kMHhc<=3M!*z!J;%L6?*KY!&IeY;hBGpawROtV^%b$BuMJo<<&I#G#DhOoL+RQk*`B~=Emzl%c4L9*Nj^f=;9|$}=U1XFs zBn|rIbfa5vwa~SizK3WpLMCW?z2Ki4totT|)q}VVaXaB2tdY`NdNqw`ChC628f8u_ z(k}jS2hvP@C0`x_UkA=faK~N(e`GNDsN3Ugt$@KUR~XI?fdf^xLYpaNpNY7AXLcaT zv!hnIo?>8hH)rzKCY>Jp=-qZsB1L_kaKanEy)farFZvy_uRm2S7`dC)$eL?L$~C1y z7RQMoF{;m!by|tE761T*Fg||HPe2XGE*hTAc4*rP5-ku;g=a~WOTcVJha`oR6=J!2 z9j-o-?ris`9b^Q-<(hpoZoIwM0se{xmEu}q#YV-RUie0IVu#Mucvjvq%_l7M;?YH& zGvH}ckC03-V!9gb0seCG5B(R~@z$!@D4SI;u%WgU*d6Y`xtU^&lO`LxYP#qOiJiIT zl4eV?J@sRRFAi#_d`h7hKsrhK3U!N&-Zu%UrntH&V#7` zkGokCk7dZLUrmfve5@b|!xjXprnf)w5PSC-yS=b6+}$_uWj3ph;!Fo}5PhS&6Y>tC z*YqIpruPl7t%9JRPZV)7_UPP1F1%8??t)1)XF{v{n>exs+2vQw@#k~QJoaX&=L1JW zsGk+l?NPYyYOzviEh>7`WYo0|sXGWKnO!qlWc5uO`m*=0C95vE#;p5n3y#w!-!tp8f9^MBtRk$ZE6yJB4@&z1iHL+}vgv`7jvSsuu%>ORZJ3&aQ9 zGF`A^VhB&WD3o)vZ5I>iUtZK|ux`)iXDdES8cHqTtpAYvo9Q+u>6lI@}0)+ndbF47TtmWk=>d`vzoCLY+SK12uo=t_yEH3ab)IRSW@Pj@8CkW-bQ@eJnw>&O&*0c@3sTkW!AXBdR+Bth#MTh!S zlt2!SnJ5?BFJQlg557Wk6yu0_)%UwRut4>NXd~RPiOaANBTs<#E+ga|q#lpzfz!Mm zTMpt(LDk_EuJc$L<5XVKB)Kt=8b*OkX}0wiZNX@57MCJZji0I2I(kALPKr4b2Mqe} zj_HGYJgCsv+k$XGgO53@?LzCeb28P1eP*Qb{2z*i~?6^~w{A=dvxW%y634e(D+1HBQSDzS`) zT}J)YUM1W^-qZw36aMu>C_&3r_g3j%q7`2tH{;=RglpkDYx|u5mQ8tNU`dBCZ|TGZgjSdBO5s_ z5)>h?N&U5w+$iBGh`lN&*AEO(jx^tw9w8yH6HAVX_VAD&pk)v!{_eP) zimDeaD)Q*?D&?d*g1!~W=W=D47--d8+U-EG=3rd@6%qTv$P1h^URX4Gg9L#0MjQ-vA)NC!_^hYe@` zer%NPthm*kg@RTb5XOdQrfbINa^_HZ{uLdrN!k+i=0Jc5?1J(L0edMW7LQJqs2my0 z-55Mf7*d`Yg8Diyk`3!7d_G0p6GS@6zMcMl{`#=yV85!!=btDW9)1wt3b;cn#+0!w zvPQqH7jF0xX)>yMR8C^`7@+%uq$%zwT;yFThG{-sn-OYiZ6_^(_H z0EQ|VXfHWz#vmIh<48F{58Wfqi;sWg*k3>Io>?Y9X^fA=l}?y;zeBZ+$!;vg@na~% zh6*S#7&cvK@!?7t%U=r0`Tc!EFEo&#+)PYIE9r~H%uqyHPTv6~K(Fb3n zT=p}aXtyIFyeYgJS;@d{L}43v1tTi(5?>j z0e0vgqOOSY)qmAobY+h7CEWFb9ZTLDu?r^tR{`N4^yEx~Mclo{sg1&B_j>YyyzoezzNX3BG=0ag1 z_!}m$s`^aK6w#vRd(_A1L%CzH#)Es78k+j)81177xWuk9K#8rG&S9K=!rt{=0`HWjBvE^vs)|5|u}Rnz9dwdw2Rinw9>y~y z6vec79MuqhS5ZfQESbF*(2-=Yf`B4;oP~==d=Pw@*F~?5C06>y388qz)Z@0Q|)PvJ37Usbi8vflytJ8Iex^OARnuqdk$qSZ;W*$Frjrw5Rb&a&9Bbq|D`0;-G=m$tLoFG~o2>-0!*+C61kNyD@IAA;)zFqQHVH842dh z1~s!`r<4;2KE4Y1ti0`@{Nc)Nw~y3%z(leEr-T95cSe!fk=COJ9n}ySS!J5Ooy|p| zl{P1}fcksTNMbJ1?+-B?1&J<)O*jBEE!15QKHJ!|N(Na>(NJ!hJ#zQQYbL&y@VIpi z^noZGX0I4O+hz=0*1|0?Wy~X))x)pcj0z_+;y~km0y|WbeWD*Xm|qx>F?rz1O?~sqm))Mw52)Vb>Oc&^0CSOh;TvR z8GI{M146LzMNb_1;1y|q(dNYTkzIAPNmDd2SYTrSVdCmzzXOP-%a*4&(G600*3GKz zCVnkuXcG*%I`HP@iN)hXKNQIa!J9Qiu^hWAk%>(*L}#FpNJf%dF(zXK+xj9XDM zAmbB3SK+z7x{QMtNA8aEGGPM!0{?*7df4b^1l~h;;lQ$BMi87^FN5*4fC zJ;6z+)!{mC;|E7|&G4rdsjAJ_`Fil-1px2m>`nr4QPR53CyS<_E%1C#)oDa_$TsLX zo`?G=iXkA_5!SX$+>E%bQ0m%|F(3sYE{N985uY6d|Dx0ixNTLbT6;OSyvuSuHQ58# z?&1{6Q%Z)x^Q0R_esOLrzu`W)o39r=5%Y#Zvz2D03>|d0W4d_cfBAbt8mw zC2J5D#vBoq9^|v3PEHo0Ouh4Ep$=%`M7D47N9uHLkpT#|)0}a$$cjf7B}vkQ5Lp@p zt)17=tJMv2mx`C~XafaY`ve712{|&EJV8y+m9e>HiB|j{#oj}OO3~l;)>n; zv>izXK?Z<}s(85|k|vNTb|P|p>QR;6Qr8T_?w(d01S4WT_WvYrL&rl5d)V~FnGxWY ztzF~~-DYdE-Rc(aLAeoPEll8dmM#|G=O4R;$HG+X?2dVp&Z6i5LLx?^vG8dl!roxW zXgQFu<2VPGn=S^gdkupVotHfTM34pI>s-S)g^ay!H_pD)ikw5c&v-ORc1Vun^gB;H z_SabKd4OLqDl6Q|Tz`st`oFPNdkzw21VTK0wW(gvbg)6ntE4=poXpYtjzNk{aWBKUT6GOuJDbz* zalZ?bvbo>Mbl$k4h$m!TUdhm{fIB6xEAfC}^2UALlRB?nbSlVfB0TeHaR%<{VQ=y}XrVKU zzy+u8n5$Wd#+T;_Z(C1&qH`GD*%E>S>5T`q|MZD21*AU z)jlj)og0IiK^&nHE=mY2eVD(h5IM$Cug7k~V31uO1dPZA^fnvKPbwPP&rD`nH zkCR8HkuHkGy)Ajqp=p{(Vkx*LWhk4#U`Gs8h6eI3oefmg-eFNB*dp#p^4Qk^I1)Oc z@4p&!Cja>xhKI9w>h9|&2pE9zpC@GVynV68tiYoAT@o)2R6FB#1QDsyHi+P4Ec&Tn zZ&dRPbSebKyoCI%BB6Y%fLMmxHs?pcH63T;q1vDa@AWN$PJAqXGR;;~UjT;c>YyIq zHspG1GJ$;|lQ;`}iTWk-hWJm55CllMKU8$B+j$3(UcCjQl2AkCB5N2CV!=8+em=cd zt5}E)Milty9s?XUfMg4##R(-BpFBBkXQ($Cvxam8)%kEg8fY{E#Cu6m8%mG0>6y5a z1+Uguq6@^odDw;N)^-#}M?y*GA`C?ka8czc1%e{bUjsPGHh4zD^*xHybGRIlaplM% zZF&N^2hmXZpCu|}>*9)`9qwgjsqk$bF7x+hQGeOTCahK}6}BfJmWhb&l*h0~p=M#( z!yAZ_p5y%BUId`y>bAbwCm{TQZ?d_R4H8P#%5X;K3O6;O$l0QSz$~$%eKUMt`9F@v B2Au!^ diff --git a/views/img/printer.gif b/views/img/printer.gif new file mode 100644 index 0000000000000000000000000000000000000000..a350d1871536eb28fe2949936de1c79c1c26269d GIT binary patch literal 731 zcmV<10wn#3P)^msfbTI z9jQ^EwMRD5xNEm*sJPjH^k)@gXT@kl5ii6#6jNXX`Yb0kVgq(zut?ZfbRr+DS= z>q{33dTpWN$tl6c7nxE)4Qur1GCxuUnp5Y z5HK(>u&W4&EXz<>UtfnPivJ`O3Zb4K8yl-}7K;Uh5XR!-B2uXo6E#Dr&Ck!D<$0b5 zXEK?PNF*3;w;Rc15`MqGDN4rSaGd2kJ3GNmOiaM%^D*ppJL2&;mX?;95{t!PwOY^e z?d|R0=pOKTy$qMj1$rk8qtS@b(NQ*LUtb@(y1JlNtJzsS-`3U!Ze(Pn>hXBkfzr6} z{3Vv(2AlG1;RQN6I#_mYZVs)jt>6p>!_3go(6&ye1Mdo>SRyz&A^1T#%t=UROW6Bf zz^9CeqErU&3`3<-Da~6HQ^UW&yCT)$Cu literal 0 HcmV?d00001 diff --git a/views/img/search.gif b/views/img/search.gif new file mode 100644 index 0000000000000000000000000000000000000000..cf3d97f75e9cde9c143980d89272fe61fc2d64ee GIT binary patch literal 615 zcmV-t0+{`YP)gNuvOO$0ks zMIj=HnnBRUR?tKXG11rxCU4&7dG4NbuvR2_mEvc)n?Cow;~Wve|KR^>9@p5l)|QB+ z$jmun3q#x>;ss-PW_mnr2MHVzLAl1RW&0?VkixF*4t!St0YVb2wnKdU(kmOHiL;aW zK8Xte%(k>MVGG$E4no6dcNnb>BhVHHGD&1pv4YZ68kE2V03t5#PCEFm7=ad$6)+3B zTCmn*?A?=u(o~ET7~-7g0)ZB=6|lumi4}B}MLgy~Ysy6)Q5%Al7|05&1z3Jpu>cF8 z3?VXs*3<}%h3`5Wld)N2zJnk%Agw<~3k)sPTLFd=F5;d8-bj-09SkQuynfflNcZLN z!^_37fdZvzrq=9~mp*($%mcDRKC&qvaaZuX+C=AT6O*~tHl>0mcP<_q>-z%$xO(@! zYluq5a8VQI$S@4?r*v;gPo!QQ%pX3A#>xx4t=w-L6COWx?aj&`f+!YePsFtj=hOQR zP3=E2j@9L7s8;T^&s?u(Hdpu?CubjMrGn{t_37>9$|AD)QE08weJlKn8|OyjL~7oP zC8mPT`jzuH*Dh^I0048RGafUIT)4H~*m8m>egI0iH=(LB%b@@O002ovPDHLkV1lw0 B3J6v_f(jTX5M)vkqJhAvc*RzR z)(IsbwrLrX0C8Xn1mXlmCTTnj3PeRhIDkOIK?nry%UbvQ2ky`Jtd(_=y>^~=@BQrk z>~ntD=j*fV(>0$00G93kZs!324B%G-KsJWAsdF!N@MakQ&29!6UP!W-9NUoOGnnVhl8HzvB^<*}=os(Rz3V<>F@A_{mAmy2@p@5*O z0r6guRva&O7W<2YIopVJ!F-u+AKs5OU@}a-;wS+b+gh&c!RTln+EuZCym(7USwlC<1dkU(Qs{MW={4A^5EgdOA>q&Y!}2R==JZ59J27 zOA;IhvWVcrum*d6vumclx<4?lT;sJ8%v@56E2*WkDe`Tho(Ydq{sH#&)$@)F2o}3W z;_0tV35b#V?-7apnu5hvya%f_TId7Pdzq4$Q%Mh0{`?}^@uMl8AnIqOxWXSRT9-z21^I>(0O!X@^Y*J+dq|+OV z>R!xzTi2(H#EDyz0{|-{FM$7Wl0LtEqyn4Vniv6Co_YJ^;>p&;Ld+lCkudcsL6PHL zJB-!{1=GG=b7Ft)hs^|qZcCA_uYo$U3tdJ}vmyYl_DV+VpI1t=T`7@&@?31k0EH?_z5S$)=Q9xB^#MH$Xa|0V~U#v1hR!!74Q2VOUd>6_E=rBB- z5nB;oVnI=GjF283i5~lhb>FF>;Cktp*aSFF%@j}vGGe6SeO~ulPn&`Vf4#tz8L<-a z0WQO@xATTEa(hepF#ViRfQir&^ozh&(^iJQ5x_TpyVL$0>=7BWH>-9`QbqsDj#~}e$Q(fUOoh!6f(>mM78~FhF zy;`a}Hefv{>tu?@Re$vXWWzZYey@Sr#3|dv%#ND80~Fun1<7kBThI7o*U;2Tb~s>p zCj`VsCHeP0loiv?n|vgJgkEp-Mn>!JF@a zVF6FQ?ZYZCdfA>TzZb(E@K+V(_l{7A2yx009a^KBc_IoUytP(BKnC74OG|i z6ue&aB!TNpVEtnudO&ddRj53U`th@>=5<1%B3&=U+=V-&(L=73l~b1#e z4ohegx?cdxq^)F|a;D+;go2o|QgRh3{L~ZAz8cvtw9|2B37sYA2J}d#nL+%S2@P=i z!Y80?kM@X9V*r!+(TZZIehk31R6*$2+^r7ppj*xY<65B)iNM-+M>(Ssp=YrhJp`le z_@*_g>o3oaR6n}pZ1iBbu9BC$`e{s#NlvH@Td%PL4ys+Kh4o@IBcr%1P-PMIrHa?h zSRSdH=04Zhnc{;5&ITTzum&ta_fC6P{u{4zZ1b?U*XVw!{Zty+;aW5jl@o#nL@Xpd zX+mvXmtB&6Z3?2UrivB=LufSe1MM4ZkWO3=POIzPlHcCW;mWsoW!zsEMLgj@e-3XJ z?r=(6UY02dT>{G?AoPjr*sj^8D<##x=}zI{!c@ij^Dm#t<_@E-sQg>f(cgOy@|nta z+k^HRgU%kksFG2bVfJ{BE{SuHGoZ1P!Uflfocl2`&;~SVG2RD&BFGnMiYqpX* zp3q~YgI+`I-vYr5iD2a2kJyG;YU{C({e2AmGmTx`-BAM;#iLeM8ZqeQ@M;XLWX4+N z63s3XkN|Ezb_r|g@b3OHzr=IPWmt*pW(BaWuYN`iAzQz5Mw_TP%HDi zXk_aV33dbBpBk^IumnK??ZtOsnAYPLu;)oP?_ZGI3R|TQ#-}>gz1g_D*tg|MYS7ol zAh1`v?#zZcJXPFrso|wemVS30we^B-FUdn#CM{7QMCK6WEKHbb9 z@i<_$nTbMQPQCV$TupN+VfMJf()>U`+!MdW`NACvH_tlV*!;`q|LieR1nW=Wd!dcM zJE1JS(FNgEEkLoBAC5ov_~n>qa3H^m_Zk+FYeWBhX9k!whu&zL#Jue;z`N1zV) zwnfo)k8OkD7$lX-9_q9m-giwwOC#i3oR(o`U^4Z#;CQN+2aP5o}-3>CnhbG8DOgNMZyLn=GL*pHYT-3pD`ZX*Rb>y)lDzE@-CM63+(lax{@7h8`3 zR*$c^|3F_X+x*tgepLAs<|#~-y2I|c{Q-Swv`3qkNV_+@>Tw}#P&K5-A&s%A*ar4! z%S)ml!Dy{JjVyQs6!$$Ub(tOOSn7?EWNLn^!}qJY9iFr^7b9T~D~19a)z7>gZV`}O za|>A4gEyZ~H$J1A5Md{iN1D?%Utve!vdAvT^o6=Zd_Vk0s1JU|VD(^bLFHVY3ymz1 zZVL1(T7bPEu_b~laeFv?{BDOgYgv*+R-~&>jhBW=Tuv5JdZzw3piRp=GY(ZC)0T1( zhw0fPGFA+C3OM@%jC>3}nJdAD(Dn@1sQj^;#6hpV}BUJfz%}r?ctRUQ{q)|(DcFrG_ z%q@xJ8h9S;)2*TVLblNi_n|_uMfiT|T$7jObk`=A=vktA;1OC(_an0Qnu5`+lwi+z zHknmv~NsJ%Q!+s9*5XmZN32bv#eqFB%`P@oH zs1@kWcFvjBskqSEye%LkSdVJ#TCy9fM_a$9U-{7`CCJg?!;z zR@>o?M7!7Uc5$9U=W7JSbG96767B$`_wS$(R%iD~O_09XF0_6v#h`n|a&czq!VvVl zLO^1tiDW1BbJH$lD-RD2q-Ahq&6P5a_aRfo4_ zGm!R}l_uBApaZMeCRBfv)2*>fKW?E2OAN%Hz;JhXNM$J;m~i@0&>g%e(Jfyx@|!~z z&$qt#+!PxBnNq1MaWF8#{=$gpqE&9{1|@K7KQ5-aI4%&2WWr(1IMjv5e^~;zW@1jo zTpmowX={GT#^QcB63q}{t-T9nO8WvP(IcxKPDipJ8Si?GtE>`SOQz8I@8#|fcmc}h z)S!4{1n2I7s5Mg(Vva-umcuv*XO4sdoUS0C%VOknAI zD~A`0!l6t_GW-}8%yDbV#k_&Z37&g}jMi$~eX!8Qk?aw{Hc!YTu=r~a$sh7wLWo1O z!eNh}L!dM`n}U%6s>nXWj36oBE4EM%4V1Gi6ucQK+74||7kwB$j53HyJPv~Ri&7oh zu@1>N8^PJTv>&B>n*m9MJ)^9|%$8!)Gsj@l9xk?vKp`!W{W z9H}{f0w>XjewMBuH3)KSFHMePlaao2`;`0NmswISmV6B)nJJpL}%7+advzibNCmgR7pY|a^PYWOBcr>rrSV2pS#V=z}gWU3B1=lKrASBbZg*7!taqMzl{&yY#eql&-L z*ldIz4l&||L|_^>q5*<7;M7m@Swd8I5Zv+ztlG*fh^WZ;4}O^~1+b8=3^VDl!*=WO zi`Y%cB_p@SY|$Je#rZ!0wlkQSusA#Gv(;X?_COn#fVW}N4sWn}v;ynJh{Dt;8tFyL zlS1(qqULW&gdph=QRy0rfge!6pTJ&W_aHG2e+UHq2(R(Y+7sZGKq(#(Jun^u-4Wxl zJfn$5NG_~xZPIVDUuAF-5Xuyjo*$jFm~IKwLqvL6Q_>iG65aX+rRPWZE(jov9()m; z!OysQE)t+^!Xi+A!D^bbb0=s~ok6`yl51tEHx6L#Y&<@KmJOZ^e*hbeLSkAl{UTp| z73ZtmeaJ_>&7k>XId+9!KLX!iPvbe*rJ4omfBQcDzyHAsAe4`bK=%XrJFMsA*iuDy N@ABPQ`VH&CzXAPl11SIi literal 0 HcmV?d00001 diff --git a/views/index.php b/views/index.php index 8442d6e..b66430a 100644 --- a/views/index.php +++ b/views/index.php @@ -1,35 +1,26 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +* Copyright 2017 OMI Europa S.L (Packlink) -header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at -header('Cache-Control: no-store, no-cache, must-revalidate'); -header('Cache-Control: post-check=0, pre-check=0', false); -header('Pragma: no-cache'); +* http://www.apache.org/licenses/LICENSE-2.0 -header('Location: ../'); -exit; +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/views/js/bootstrap.min.js b/views/js/bootstrap.min.js new file mode 100644 index 0000000..b04a0e8 --- /dev/null +++ b/views/js/bootstrap.min.js @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.1.1 (http://getbootstrap.com) + * Copyright 2011-2014 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one(a.support.transition.end,function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b()})}(jQuery),+function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){f.trigger("closed.bs.alert").remove()}var d=a(this),e=d.attr("data-target");e||(e=d.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,""));var f=a(e);b&&b.preventDefault(),f.length||(f=d.hasClass("alert")?d:d.parent()),f.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one(a.support.transition.end,c).emulateTransitionEnd(150):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("bs.alert");e||d.data("bs.alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.bs.alert.data-api",b,c.prototype.close)}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.isLoading=!1};b.DEFAULTS={loadingText:"loading..."},b.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",f.resetText||d.data("resetText",d[e]()),d[e](f[b]||this.options[b]),setTimeout(a.proxy(function(){"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},b.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")&&(c.prop("checked")&&this.$element.hasClass("active")?a=!1:b.find(".active").removeClass("active")),a&&c.prop("checked",!this.$element.hasClass("active")).trigger("change")}a&&this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof c&&c;e||d.data("bs.button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.bs.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle"),b.preventDefault()})}(jQuery),+function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},b.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},b.prototype.getActiveIndex=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},b.prototype.to=function(b){var c=this,d=this.getActiveIndex();return b>this.$items.length-1||0>b?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){c.to(b)}):d==b?this.pause().cycle():this.slide(b>d?"next":"prev",a(this.$items[b]))},b.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},b.prototype.next=function(){return this.sliding?void 0:this.slide("next")},b.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},b.prototype.slide=function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g="next"==b?"left":"right",h="next"==b?"first":"last",i=this;if(!e.length){if(!this.options.wrap)return;e=this.$element.find(".item")[h]()}if(e.hasClass("active"))return this.sliding=!1;var j=a.Event("slide.bs.carousel",{relatedTarget:e[0],direction:g});return this.$element.trigger(j),j.isDefaultPrevented()?void 0:(this.sliding=!0,f&&this.pause(),this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid.bs.carousel",function(){var b=a(i.$indicators.children()[i.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")?(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),d.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid.bs.carousel")},0)}).emulateTransitionEnd(1e3*d.css("transition-duration").slice(0,-1))):(d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid.bs.carousel")),f&&this.cycle(),this)};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("bs.carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d=a(this),e=a(d.attr("data-target")||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),d.data()),g=d.attr("data-slide-to");g&&(f.interval=!1),e.carousel(f),(g=d.attr("data-slide-to"))&&e.data("bs.carousel").to(g),b.preventDefault()}),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var b=a(this);b.carousel(b.data())})})}(jQuery),+function(a){"use strict";var b=function(c,d){this.$element=a(c),this.options=a.extend({},b.DEFAULTS,d),this.transitioning=null,this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.DEFAULTS={toggle:!0},b.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},b.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b=a.Event("show.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.$parent&&this.$parent.find("> .panel > .in");if(c&&c.length){var d=c.data("bs.collapse");if(d&&d.transitioning)return;c.collapse("hide"),d||c.data("bs.collapse",null)}var e=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[e](0),this.transitioning=1;var f=function(){this.$element.removeClass("collapsing").addClass("collapse in")[e]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return f.call(this);var g=a.camelCase(["scroll",e].join("-"));this.$element.one(a.support.transition.end,a.proxy(f,this)).emulateTransitionEnd(350)[e](this.$element[0][g])}}},b.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var d=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return a.support.transition?void this.$element[c](0).one(a.support.transition.end,a.proxy(d,this)).emulateTransitionEnd(350):d.call(this)}}},b.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("bs.collapse"),f=a.extend({},b.DEFAULTS,d.data(),"object"==typeof c&&c);!e&&f.toggle&&"show"==c&&(c=!c),e||d.data("bs.collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e),g=f.data("bs.collapse"),h=g?"toggle":d.data(),i=d.attr("data-parent"),j=i&&a(i);g&&g.transitioning||(j&&j.find('[data-toggle=collapse][data-parent="'+i+'"]').not(d).addClass("collapsed"),d[f.hasClass("in")?"addClass":"removeClass"]("collapsed")),f.collapse(h)})}(jQuery),+function(a){"use strict";function b(b){a(d).remove(),a(e).each(function(){var d=c(a(this)),e={relatedTarget:this};d.hasClass("open")&&(d.trigger(b=a.Event("hide.bs.dropdown",e)),b.isDefaultPrevented()||d.removeClass("open").trigger("hidden.bs.dropdown",e))})}function c(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}var d=".dropdown-backdrop",e="[data-toggle=dropdown]",f=function(b){a(b).on("click.bs.dropdown",this.toggle)};f.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=c(e),g=f.hasClass("open");if(b(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(''}),b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),b.prototype.constructor=b,b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},b.prototype.hasContent=function(){return this.getTitle()||this.getContent()},b.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},b.prototype.tip=function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip};var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof c&&c;(e||"destroy"!=c)&&(e||d.data("bs.popover",e=new b(this,f)),"string"==typeof c&&e[c]())})},a.fn.popover.Constructor=b,a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(jQuery),+function(a){"use strict";function b(c,d){var e,f=a.proxy(this.process,this);this.$element=a(a(c).is("body")?window:c),this.$body=a("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",f),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||(e=a(c).attr("href"))&&e.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=a([]),this.targets=a([]),this.activeTarget=null,this.refresh(),this.process()}b.DEFAULTS={offset:10},b.prototype.refresh=function(){var b=this.$element[0]==window?"offset":"position";this.offsets=a([]),this.targets=a([]);{var c=this;this.$body.find(this.selector).map(function(){var d=a(this),e=d.data("target")||d.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[b]().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})}},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);if(g&&b<=e[0])return g!=(a=f[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,a(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(jQuery),+function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a")[0],f=a.Event("show.bs.tab",{relatedTarget:e});if(b.trigger(f),!f.isDefaultPrevented()){var g=a(d);this.activate(b.parent("li"),c),this.activate(g,g.parent(),function(){b.trigger({type:"shown.bs.tab",relatedTarget:e})})}}},b.prototype.activate=function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e).emulateTransitionEnd(150):e(),f.removeClass("in")};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(jQuery),+function(a){"use strict";var b=function(c,d){this.options=a.extend({},b.DEFAULTS,d),this.$window=a(window).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(c),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};b.RESET="affix affix-top affix-bottom",b.DEFAULTS={offset:0},b.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(b.RESET).addClass("affix");var a=this.$window.scrollTop(),c=this.$element.offset();return this.pinnedOffset=c.top-a},b.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.top,h=f.bottom;"top"==this.affixed&&(e.top+=d),"object"!=typeof f&&(h=g=f),"function"==typeof g&&(g=f.top(this.$element)),"function"==typeof h&&(h=f.bottom(this.$element));var i=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=h&&e.top+this.$element.height()>=c-h?"bottom":null!=g&&g>=d?"top":!1;if(this.affixed!==i){this.unpin&&this.$element.css("top","");var j="affix"+(i?"-"+i:""),k=a.Event(j+".bs.affix");this.$element.trigger(k),k.isDefaultPrevented()||(this.affixed=i,this.unpin="bottom"==i?this.getPinnedOffset():null,this.$element.removeClass(b.RESET).addClass(j).trigger(a.Event(j.replace("affix","affixed"))),"bottom"==i&&this.$element.offset({top:c-h-this.$element.height()}))}}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof c&&c;e||d.data("bs.affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(jQuery); \ No newline at end of file diff --git a/views/js/index.php b/views/js/index.php new file mode 100644 index 0000000..b66430a --- /dev/null +++ b/views/js/index.php @@ -0,0 +1,26 @@ + + + {$suivi|escape:'html':'UTF-8'} + + \ No newline at end of file diff --git a/views/templates/admin/_pl_action15.tpl b/views/templates/admin/_pl_action15.tpl new file mode 100644 index 0000000..0c40352 --- /dev/null +++ b/views/templates/admin/_pl_action15.tpl @@ -0,0 +1,20 @@ +{* +* Copyright 2017 OMI Europa S.L (Packlink) + +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://www.apache.org/licenses/LICENSE-2.0 + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*} + + + {$suivi|escape:'html':'UTF-8'} + + \ No newline at end of file diff --git a/views/templates/admin/configure.tpl b/views/templates/admin/configure.tpl deleted file mode 100644 index fe2e734..0000000 --- a/views/templates/admin/configure.tpl +++ /dev/null @@ -1,64 +0,0 @@ -{* -* 2007-2015 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2016 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*} - -
-
-
- -
-
-

{l s='PrestaShop\'s cloud-based platform that automates shipping' mod='packlinkpro'}

-
-
- -
- -
-
-
-

-

{l s='Your customers will take advantage of the best worldwide courier services, from your shop to their door or a convenience point near their home.' mod='packlinkpro'} -

{l s='With Packlink PRO, vendors will have the chance to concentrate in their core business without worrying about logistics. With only a couple of clicks, Prestashop and Packlink PRO will be integrated so the vendor can manage the orders, choose the service that best fits each shipment’s needs, print the labels and ship it all.' mod='packlinkpro'}

-
    -
  • {l s='With Packlink PRO, vendors will have the chance to concentrate in their core business without worrying about logistics. With only a couple of clicks, Prestashop and Packlink PRO will be integrated so the vendor can manage the orders, choose the service that best fits each shipment’s needs, print the labels and ship it all.' mod='packlinkpro'}
  • -
  • {l s='Discount rates from the first shipment' mod='packlinkpro'}
  • -
  • {l s='Prestashop integration' mod='packlinkpro'}
  • -
  • {l s='Bulk CSV/XLS upload' mod='packlinkpro'}
  • -
  • {l s='Real-time parcel tracking' mod='packlinkpro'}
  • -
  • {l s='Insurance and customer service' mod='packlinkpro'}
  • -
-

-
-
- -
- -
-
-
diff --git a/views/templates/admin/index.php b/views/templates/admin/index.php index 8442d6e..b66430a 100644 --- a/views/templates/admin/index.php +++ b/views/templates/admin/index.php @@ -1,35 +1,26 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +* Copyright 2017 OMI Europa S.L (Packlink) -header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at -header('Cache-Control: no-store, no-cache, must-revalidate'); -header('Cache-Control: post-check=0, pre-check=0', false); -header('Pragma: no-cache'); +* http://www.apache.org/licenses/LICENSE-2.0 -header('Location: ../'); -exit; +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file diff --git a/views/templates/front/index.php b/views/templates/front/index.php new file mode 100644 index 0000000..b66430a --- /dev/null +++ b/views/templates/front/index.php @@ -0,0 +1,26 @@ + +

+

{l s='Ship your paid orders easily at the best prices with Packlink PRO. No account yet? It only takes few seconds to ' mod='packlink'} + {l s='register online' mod='packlink'}{l s=' .' mod='packlink'}


+ +

+
+
+

{l s='Packlink PRO connection' mod='packlink'}

+

{l s='An API key associated with your Packlink PRO account must be indicated in the field below in order to connect Packlink PRO with PrestaShop. ' mod='packlink'} + {l s='Generate API key now.' mod='packlink'}

+
+
+ +
+ +
+ +
+
+
+ +
+
+ +

{l s='Shipment creation preference ' mod='packlink'}

+

{l s='Create shipments in Packlink PRO automatically once orders are paid or manually whenever you want:' mod='packlink'}

+
+
+ +
+ + +
+ + +
+
+
+ +
+
+ +
+
+

{l s='“Ship from” address(es)' mod='packlink'}

+

{l s='“Ship from” address(es) save(s) you time by prefilling shipping details in Packlink PRO. You can configure and edit them from' mod='packlink'} {l s='Packlink PRO settings.' mod='packlink'}

+ {if $show_address} + {foreach from=$warehouses item=warehouse} +
+
+

{$warehouse->alias|escape:'htmlall':'UTF-8'}

+ {if $warehouse->default_selection|escape:'htmlall':'UTF-8'} +

{l s='By default' mod='packlink'}

+ {/if} +
+

{$warehouse->address|escape:'htmlall':'UTF-8'} {$warehouse->address2|escape:'htmlall':'UTF-8'}

+

{$warehouse->postal_code|escape:'htmlall':'UTF-8'} {$warehouse->city|escape:'htmlall':'UTF-8'}

+

{l s='Telephone: ' mod='packlink'}{$warehouse->phone|escape:'htmlall':'UTF-8'}

+
+ {/foreach} + {else} + +
+
+

{l s='No "ship from" address configured in Packlink PRO!' mod='packlink'}

+ {l s='Add' mod='packlink'} +
+ {/if} + +
+ + +
+

{l s='Status synchronization' mod='packlink'}

+

{l s='PrestaShop order statuses' mod='packlink'} {l s='are synchronized with Packlink PRO shipping statuses as configured in the matching table below.' mod='packlink'}
+ {l s='Each time a shipment status changes in Packlink PRO, the status of its associated order in PrestaShop is updated accordingly.' mod='packlink'}

+
+
+
+ + +
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ +
+ +
+
+ + + +
+
+
+ +
+
+
+ + + +
+

{l s='Data unit conversion ' mod='packlink'}

+

{l s='Packlink PRO works with kilograms and centimetres. Your PrestaShop might be configured with other' mod='packlink'} {l s='data unit.' mod='packlink'}
+ {l s='Please make sure the matching table below makes sense so data imported from PrestaShop to Packlink PRO corresponds.' mod='packlink'}

+
+
+
+ + + + + +
+ +
+ +
+ + +
+ +
+ + +
+
+
+ +
+
+ +

{l s='Auto-populate product data unit ' mod='packlink'}

+

{l s='Automatically complete weight and dimension in PrestaShop catalog from Packlink PRO when such data is missing for a product you ship:' mod='packlink'}

+
+
+ +
+ + +
+ + +
+
+
+ +
+
+
+ +
+
+ + + + diff --git a/views/templates/hook/expedition.tpl b/views/templates/hook/expedition.tpl new file mode 100644 index 0000000..c722845 --- /dev/null +++ b/views/templates/hook/expedition.tpl @@ -0,0 +1,44 @@ +{* +* Copyright 2017 OMI Europa S.L (Packlink) + +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://www.apache.org/licenses/LICENSE-2.0 + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*} + + +
+
+
+ + + + + + + + +
{$reference|escape:'html':'UTF-8'} {$suivi|escape:'html':'UTF-8'}
+
+
+
diff --git a/views/templates/hook/expedition15.tpl b/views/templates/hook/expedition15.tpl new file mode 100644 index 0000000..51853f2 --- /dev/null +++ b/views/templates/hook/expedition15.tpl @@ -0,0 +1,28 @@ +{* +* Copyright 2017 OMI Europa S.L (Packlink) + +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at + +* http://www.apache.org/licenses/LICENSE-2.0 + +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*} + +
+ {l s='Ship with Packlink PRO' mod='packlink'} + + + + + + + + +
{$reference|escape:'html':'UTF-8'} {$suivi|escape:'html':'UTF-8'}
+
\ No newline at end of file diff --git a/views/templates/hook/index.php b/views/templates/hook/index.php new file mode 100644 index 0000000..b66430a --- /dev/null +++ b/views/templates/hook/index.php @@ -0,0 +1,26 @@ + + $(function () { + var footab; + if ({$version|escape:"html":"UTF-8"}) { + footab = $(".footab").last(); + var info = $(".info-order").find('p').first(); + $("#add_carrier").insertAfter(info); + } else { + footab = $(".table_block").last(); + } + $("#ps_table").insertBefore(footab); + $("#packlink").insertAfter(footab); + $("#pl_table").insertBefore("#packlink"); + + + }); + +

{l s='Carrier substitute' mod='packlink'} {$carrierPL|escape:"html":"UTF-8"}

+ +

{l s='Here is carrier you selected :' mod='packlink'}

+

{l s='Here is carrier subsitute we selected :' mod='packlink'}

+ + + + + + + + + + + + + + + + + + + + + diff --git a/views/templates/index.php b/views/templates/index.php index 8442d6e..b66430a 100644 --- a/views/templates/index.php +++ b/views/templates/index.php @@ -1,35 +1,26 @@ -* @copyright 2007-2015 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ +* Copyright 2017 OMI Europa S.L (Packlink) -header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at -header('Cache-Control: no-store, no-cache, must-revalidate'); -header('Cache-Control: post-check=0, pre-check=0', false); -header('Pragma: no-cache'); +* http://www.apache.org/licenses/LICENSE-2.0 -header('Location: ../'); -exit; +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); + +header("Cache-Control: no-store, no-cache, must-revalidate"); +header("Cache-Control: post-check=0, pre-check=0", false); +header("Pragma: no-cache"); + +header("Location: ../"); +exit; \ No newline at end of file From 81eec53b5199768bbf7e8b285d9f0716f5f4749e Mon Sep 17 00:00:00 2001 From: Fedotchenko Iuliia Date: Tue, 21 Feb 2017 10:19:19 +0100 Subject: [PATCH 2/2] [*] new logo --- logo.png | Bin 1469 -> 2196 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/logo.png b/logo.png index a8cfafd10a3f86d1a369148855c46e7e8078fce3..db4d1243e424ac03423c6ceff314aa20b640c63c 100644 GIT binary patch delta 1565 zcmcJOXH*k*5WxSC$5TYK1qY&7zyY-i2^l6*c?JkeK|mm)42z5~3{#e3G+Gr!0a;<> zfd~{FOev8>A~TQ(Hc$)@Kvo2T5Jn(jg~kuQezMs@7KKj`E24YMUW)Pj3mYN!F>=g~5%qk7EpANQ@C0aa7v~3PTw}5r#0#F&O-W zToKTUbv*?Y1EjV--k<0l92K5osHmllvp~a5QRYYs1kwx!!=X&gEa0X_I3p;^+#H2Q zpi+Vq_kDv<--U`5q2D0*cOmJ&lMvs95D-(6@R=+V0EL_OXPj_i>Dv6#>VR+&L@_Hn zCZKnlB`fQzYqG%nE}mfF6=&QckqyEb?Vm&-hFQ!KtgXv>$HgG3?omyDLG#$t#u0G! zZFAprJ#WfA>x1K>Yq^or@nT$Uv z2C?ss$G1cjcY{!dNW79!H$>wKh4af(bIbcl4M*-YTPLv@e@|f_wK}A|ADfYkPD}8V zj_HNv-1?EEHv=HD4g|abvCM4d5Pw44JvOgLZn90`oJ?rdz10}=f+rA3LyEe+bGdB; zA}=b}Gv_ZrqyrC9Res~>t%^PnRO?LX0HJgcQv37mrmwXarc-)5Al8BqhVRqPdCBV4 zl8>nSEz;HX*~OK{p6Q8MX>0!sxI#xiV6Dq!BhyQ_EBmPR!w;+byP9LThuZQ*>VwZxx?)Nn=xpjglb?;+qn0k)Fmul@+GNb8P7C z@EW%~JzM&P@KVm_^py3fD*I?@?_nw1x7nuN6iuezsevwq;`?K5@HTK)V<4*6ktRwKD-_tu6&7+ax8kniv4U1f>& zPz)yPj`9fmTeAiC~Q}X5ds#(p=>SAmpaTI~f5oczS?Wk)vNaRszTO2b$J=6~Ne2ie=HBsdMniQs1 z8<-?4I0hH!x|doUh+=c`kI6Rv7~aXE(5fbDC%irWk4O3p(Op|yY~n-5BO?C?H*$o& zVI5r;&nYriF&$!Y+1=Ua}<6=Nb%6YHD`?lpic3T=`*D=jitJTU2X3Mk2e4wWj zRSzVqbNn7~>xjv@1URzg`FfcXX=;+oD$tt^)yq_ix{h=Gba3YYVX`f&hN=HXW3!N=~osv@E(LzQ(l51wf0l6rE<)kVS!H1s9%NN8-{ad zoApzcXRyL58#|bgUu@#9EhsqDcG|lkW%$EX#1K}q5w#6sY$&c(n-=AgN?AL+XEZRK z%xi!0_13Hvn_1Fni2NIx5^O9v zTZ><@wz+6h1*j;kdFZFd$GZH`?x{s738VQndzWpfUji+%a8mO;i6ehRV2!ggFEzbH F{s$B6NSFWs delta 832 zcmbOtxR+b8Gr-TCmrII^fq{Y7)59eQNGpIa2OE$quB!SnQE``&ftk62xuu?=skym{ zxsHO7fuX6sfw8`^fv%CUm5G6siP6Tt>Wth98or6inRzAo#Tk?JnPe4=9F0w#%w65g z&5hg)4P8wg&CG#9<`(7_&X$g5&d!r_m}H=e+zfCkTES!hGsy*~q91URTwQT0GGTVA z7Zg8rnt_2y+tbA{q~cc6pa1{unK=xMjEp8Q{hMwq!Mw6FAdfLw{jlVuFNfc#US)LX zR&5B87Eo{4aB=UCaf{W_4_AoVABurRYjX^fa7&_REc}EtS#1UGUl=m&p#-zN9C7 znD1LZCFqmPhyU`-hr7Eu{ybD%CiOUljm`0pWJjwG`=38NIA~ImnWymP=cXszsGs2ibb%9t$R2t5gV7_0JmBje6XwG@#w`Eu z=X!~MH!o1Dw%&5`-`s%3AzZiWx)%p67Fm4RDQEK? zmRma8)h>Tpyu*7}u0i!jHK!GB(HXxgJd$jhzuXXdWjyJU>Ejl&o7$WuXCHjD*<-c5 oVppz00LPXeI+k~f8yJ`wn%=x{=