1.What's exactly the license of FPDF? Are there any usage restrictions?
+FPDF is released under a permissive license: there is no usage restriction. You may embed it
+freely in your application (commercial or not), with or without modifications.
+
+
+
+
2.When I try to create a PDF, a lot of weird characters show on the screen. Why?
+These "weird" characters are in fact the actual content of your PDF. This behavior is a bug of
+IE6. When it first receives an HTML page, then a PDF from the same URL, it displays it directly
+without launching Acrobat. This happens frequently during the development stage: on the least
+script error, an HTML page is sent, and after correction, the PDF arrives.
+
+To solve the problem, simply quit and restart IE. You can also go to another URL and come
+back.
+
+To avoid this kind of inconvenience during the development, you can generate the PDF directly
+to a file and open it through the explorer.
+
+
+
+
3.I try to generate a PDF and IE displays a blank page. What happens?
+First of all, check that you send nothing to the browser after the PDF (not even a space or a
+carriage return). You can put an exit statement just after the call to the Output() method to
+be sure. If it still doesn't work, it means you're a victim of the "blank page syndrome". IE
+used in conjunction with the Acrobat plug-in suffers from many bugs. To avoid these problems
+in a reliable manner, two main techniques exist:
+
+
+- Disable the plug-in and use Acrobat as a helper application. To do this, launch Acrobat, go
+to the Edit menu, Preferences, Internet, and uncheck "Display PDF in browser". Then, the next
+time you load a PDF in IE, it displays the dialog box "Open it" or "Save it to disk". Uncheck
+the option "Always ask before opening this type of file" and choose Open. From now on, PDF files
+will open automatically in an external Acrobat window.
+
+The drawback of the method is that you need to alter the client configuration, which you can do
+in an intranet environment but not for the Internet.
+
+
+- Use a redirection technique. It consists in generating the PDF in a temporary file on the server
+and redirect the client to it. For example, at the end of the script, you can put the following:
+
+
//Determine a temporary file name in the current directory
+$file = basename(tempnam('.', 'tmp'));
+rename($file, $file.'.pdf');
+$file .= '.pdf';
+//Save PDF to file
+$pdf->Output($file, 'F');
+//Redirect
+header('Location: '.$file);
+
+This method turns the dynamic PDF into a static one and avoids all troubles. But you have to do
+some cleaning in order to delete the temporary files. For example:
+
+This function deletes all files of the form tmp*.pdf older than an hour in the specified
+directory. You may call it where you want, for example in the script which generates the PDF.
+
+
+
+
4.I can't make line breaks work. I put \n in the string printed by MultiCell but it doesn't work.
+You have to enclose your string with double quotes, not single ones.
+
+
+
+
5.I try to display a variable in the Header method but nothing prints.
+You have to use the global keyword to access global variables, for example:
+
6.I defined the Header and Footer methods in my PDF class but nothing appears.
+You have to create an object from the PDF class, not FPDF:
+
+
$pdf = new PDF();
+
+
+
+
+
7.Accented characters are replaced by some strange characters like é.
+Don't use UTF-8 encoding. Standard FPDF fonts use ISO-8859-1 or Windows-1252.
+It is possible to perform a conversion to ISO-8859-1 with utf8_decode():
+
+
$str = utf8_decode($str);
+
+But some characters such as Euro won't be translated correctly. If the iconv extension is available, the
+right way to do it is the following:
+
+
$str = iconv('UTF-8', 'windows-1252', $str);
+
+
+
+
+
8.I try to display the Euro symbol but it doesn't work.
+The standard fonts have the Euro character at position 128. You can define a constant like this
+for convenience:
+
+
define('EURO', chr(128));
+
+
+
+
+
9.I get the following error when I try to generate a PDF: Some data has already been output, can't send PDF file
+You must send nothing to the browser except the PDF itself: no HTML, no space, no carriage return. A common
+case is having extra blank at the end of an included script file.
+If you can't figure out where the problem comes from, this other message appearing just before can help you:
+
+Warning: Cannot modify header information - headers already sent by (output started at script.php:X)
+
+It means that script.php outputs something at line X. Go to this line and fix it.
+In case the message doesn't show, first check that you didn't disable warnings, then add this at the very
+beginning of your script:
+
+
ob_end_clean();
+
+If you still don't see it, disable zlib.output_compression in your php.ini and it should appear.
+
+
+
+
10.I draw a frame with very precise dimensions, but when printed I notice some differences.
+To respect dimensions, select "None" for the Page Scaling setting instead of "Shrink to Printable Area" in the print dialog box.
+
+
+
+
11.I'd like to use the whole surface of the page, but when printed I always have some margins. How can I get rid of them?
+Printers have physical margins (different depending on the models); it is therefore impossible to remove
+them and print on the whole surface of the paper.
+
+
+
+
12.How can I put a background in my PDF?
+For a picture, call Image() in the Header() method, before any other output. To set a background color, use Rect().
+
+
+
+
13.How can I set a specific header or footer on the first page?
16.What's the limit of the file sizes I can generate with FPDF?
+There is no particular limit. There are some constraints, however:
+
+
+- The maximum memory size allocated to PHP scripts is usually 8MB. For very big documents,
+especially with images, this limit may be reached (the file being built into memory). The
+parameter is configured in the php.ini file.
+
+
+- The maximum execution time allocated defaults to 30 seconds. This limit can of course be easily
+reached. It is configured in php.ini and may be altered dynamically with set_time_limit().
+
+
+- Browsers generally have a 5 minute time-out. If you send the PDF directly to the browser and
+reach the limit, it will be lost. It is therefore advised for very big documents to
+generate them in a file, and to send some data to the browser from time to time (with a call
+to flush() to force the output). When the document is finished, you can send a redirection to
+it or create a link.
+
+Remark: even if the browser times out, the script may continue to run on the server.
+
18.I'd like to make a search engine in PHP and index PDF files. Can I do it with FPDF?
+No. But a GPL C utility does exist, pdftotext, which is able to extract the textual content from
+a PDF. It is provided with the Xpdf package:
+
+http://www.foolabs.com/xpdf/
+
+
+
+
19.Can I convert an HTML page to PDF with FPDF?
+Not real-world pages. But a GPL C utility does exist, htmldoc, which allows to do it and gives good results:
+
+http://www.htmldoc.org
+
+
+
+
20.Can I concatenate PDF files with FPDF?
+Not directly, but it is possible to use FPDI
+to perform this task. Some free command-line tools also exist:
+
+mbtPdfAsm
+pdftk
+
+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();
+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.
+
+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().
+
+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.
+
+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();
+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');
+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.
+
+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.
+
+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');
+}
+}
+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.
+
+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);
+}
+}
+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:
+
+
explicit width and height (expressed in user unit)
+
one explicit dimension, the other being calculated automatically in order to keep the original proportions
+
no explicit dimension, in which case the image is put at 72 dpi
+
+Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF.
+
+
+For JPEGs, all flavors are allowed:
+
+
gray scales
+
true colors (24 bits)
+
CMYK (32 bits)
+
+For PNGs, are allowed:
+
+
gray scales on at most 8 bits (256 levels)
+
indexed colors
+
true colors (24 bits)
+
+but are not supported:
+
+
Interlacing
+
Alpha channel
+
+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.
+
+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
+
+
+
+
+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.
+
+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.
+
+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.
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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:
+
+
The directory defined by the FPDF_FONTPATH constant (if this constant is defined)
+
The font directory located in the directory containing fpdf.php (if it exists)
+
The directories accessible through include()
+
+Example defining FPDF_FONTPATH (note the mandatory trailing slash):
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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.
+
+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');
+- 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 @@
+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 .= '
';
+ }
+
+ 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 0000000..df08c0b
Binary files /dev/null and b/views/img/add.gif differ
diff --git a/views/img/delivery.gif b/views/img/delivery.gif
new file mode 100644
index 0000000..482ceea
Binary files /dev/null and b/views/img/delivery.gif differ
diff --git a/views/img/down.png b/views/img/down.png
new file mode 100644
index 0000000..98fb95e
Binary files /dev/null and b/views/img/down.png differ
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 @@
+
+
\ No newline at end of file
diff --git a/views/img/logo.jpg b/views/img/logo.jpg
deleted file mode 100644
index 1a3afeb..0000000
Binary files a/views/img/logo.jpg and /dev/null differ
diff --git a/views/img/printer.gif b/views/img/printer.gif
new file mode 100644
index 0000000..a350d18
Binary files /dev/null and b/views/img/printer.gif differ
diff --git a/views/img/search.gif b/views/img/search.gif
new file mode 100644
index 0000000..cf3d97f
Binary files /dev/null and b/views/img/search.gif differ
diff --git a/views/img/up.png b/views/img/up.png
new file mode 100644
index 0000000..2db6495
Binary files /dev/null and b/views/img/up.png differ
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('').insertAfter(a(this)).on("click",b);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;f.toggleClass("open").trigger("shown.bs.dropdown",h),e.focus()}return!1}},f.prototype.keydown=function(b){if(/(38|40|27)/.test(b.keyCode)){var d=a(this);if(b.preventDefault(),b.stopPropagation(),!d.is(".disabled, :disabled")){var f=c(d),g=f.hasClass("open");if(!g||g&&27==b.keyCode)return 27==b.which&&f.find(e).focus(),d.click();var h=" li:not(.divider):visible a",i=f.find("[role=menu]"+h+", [role=listbox]"+h);if(i.length){var j=i.index(i.filter(":focus"));38==b.keyCode&&j>0&&j--,40==b.keyCode&&j').appendTo(document.body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b).emulateTransitionEnd(150):b()):b&&b()};var c=a.fn.modal;a.fn.modal=function(c,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},b.DEFAULTS,e.data(),"object"==typeof c&&c);f||e.data("bs.modal",f=new b(this,g)),"string"==typeof c?f[c](d):g.show&&f.show(d)})},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());c.is("a")&&b.preventDefault(),e.modal(f,this).one("hide",function(){c.is(":visible")&&c.focus()})}),a(document).on("show.bs.modal",".modal",function(){a(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){a(document.body).removeClass("modal-open")})}(jQuery),+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",a,b)};b.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},b.prototype.init=function(b,c,d){this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d);for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},b.prototype.getDefaults=function(){return b.DEFAULTS},b.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},b.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show()},b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(b),b.isDefaultPrevented())return;var c=this,d=this.tip();this.setContent(),this.options.animation&&d.addClass("fade");var e="function"==typeof this.options.placement?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,f=/\s?auto?\s?/i,g=f.test(e);g&&(e=e.replace(f,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(e),this.options.container?d.appendTo(this.options.container):d.insertAfter(this.$element);var h=this.getPosition(),i=d[0].offsetWidth,j=d[0].offsetHeight;if(g){var k=this.$element.parent(),l=e,m=document.documentElement.scrollTop||document.body.scrollTop,n="body"==this.options.container?window.innerWidth:k.outerWidth(),o="body"==this.options.container?window.innerHeight:k.outerHeight(),p="body"==this.options.container?0:k.offset().left;e="bottom"==e&&h.top+h.height+j-m>o?"top":"top"==e&&h.top-m-j<0?"bottom":"right"==e&&h.right+i>n?"left":"left"==e&&h.left-i'}),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'}
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='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='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'}
{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.
+*}
+
+
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.
+*}
+
+
\ 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");
+
+
+ });
+
+
+
+
+
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