12 | This is the class constructor. It allows to set up the page size, the orientation and the
13 | unit of measure used in all methods (except for font sizes).
14 |
Parameters
15 |
16 |
orientation
17 |
18 | Default page orientation. Possible values are (case insensitive):
19 |
20 |
P or Portrait
21 |
L or Landscape
22 |
23 | Default value is P.
24 |
25 |
unit
26 |
27 | User unit. Possible values are:
28 |
29 |
pt: point
30 |
mm: millimeter
31 |
cm: centimeter
32 |
in: inch
33 |
34 | A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This
35 | is a very common unit in typography; font sizes are expressed in that unit.
36 |
37 |
38 | Default value is mm.
39 |
40 |
size
41 |
42 | The size used for pages. It can be either one of the following values (case insensitive):
43 |
44 |
A3
45 |
A4
46 |
A5
47 |
Letter
48 |
Legal
49 |
50 | or an array containing the width and the height (expressed in the unit given by unit).
51 |
52 | Default value is A4.
53 |
54 |
55 |
Example
56 | Example with a custom 100x150 mm page size:
57 |
12 | Whenever a page break condition is met, the method is called, and the break is issued or not
13 | depending on the returned value. The default implementation returns a value according to the
14 | mode selected by SetAutoPageBreak().
15 |
16 | This method is called automatically and should not be called directly by the application.
17 |
Example
18 | The method is overriden in an inherited class in order to obtain a 3 column layout:
19 |
20 |
class PDF extends FPDF
21 | {
22 | var $col = 0;
23 |
24 | function SetCol($col)
25 | {
26 | // Move position to a column
27 | $this->col = $col;
28 | $x = 10+$col*65;
29 | $this->SetLeftMargin($x);
30 | $this->SetX($x);
31 | }
32 |
33 | function AcceptPageBreak()
34 | {
35 | if($this->col<2)
36 | {
37 | // Go to next column
38 | $this->SetCol($this->col+1);
39 | $this->SetY(10);
40 | return false;
41 | }
42 | else
43 | {
44 | // Go back to first column and issue page break
45 | $this->SetCol(0);
46 | return true;
47 | }
48 | }
49 | }
50 |
51 | $pdf = new PDF();
52 | $pdf->AddPage();
53 | $pdf->SetFont('Arial','',12);
54 | for($i=1;$i<=300;$i++)
55 | $pdf->Cell(0,5,"Line $i",0,1);
56 | $pdf->Output();
12 | Imports a TrueType, OpenType or Type1 font and makes it available. It is necessary to generate a font
13 | definition file first with the MakeFont utility.
14 |
15 | The definition file (and the font file itself when embedding) must be present in the font directory.
16 | If it is not found, the error "Could not include font definition file" is raised.
17 |
Parameters
18 |
19 |
family
20 |
21 | Font family. The name can be chosen arbitrarily. If it is a standard family name, it will
22 | override the corresponding font.
23 |
24 |
style
25 |
26 | Font style. Possible values are (case insensitive):
27 |
28 |
empty string: regular
29 |
B: bold
30 |
I: italic
31 |
BI or IB: bold italic
32 |
33 | The default value is regular.
34 |
35 |
file
36 |
37 | The font definition file.
38 |
39 | By default, the name is built from the family and style, in lower case with no space.
40 |
12 | Creates a new internal link and returns its identifier. An internal link is a clickable area
13 | which directs to another place within the document.
14 |
15 | The identifier can then be passed to Cell(), Write(), Image() or Link(). The destination is
16 | defined with SetLink().
17 |
12 | Adds a new page to the document. If a page is already present, the Footer() method is called
13 | first to output the footer. Then the page is added, the current position set to the top-left
14 | corner according to the left and top margins, and Header() is called to display the header.
15 |
16 | The font which was set before calling is automatically restored. There is no need to call
17 | SetFont() again if you want to continue with the same font. The same is true for colors and
18 | line width.
19 |
20 | The origin of the coordinate system is at the top-left corner and increasing ordinates go
21 | downwards.
22 |
Parameters
23 |
24 |
orientation
25 |
26 | Page orientation. Possible values are (case insensitive):
27 |
28 |
P or Portrait
29 |
L or Landscape
30 |
31 | The default value is the one passed to the constructor.
32 |
33 |
size
34 |
35 | Page size. It can be either one of the following values (case insensitive):
36 |
37 |
A3
38 |
A4
39 |
A5
40 |
Letter
41 |
Legal
42 |
43 | or an array containing the width and the height (expressed in user unit).
44 |
45 | The default value is the one passed to the constructor.
46 |
47 |
rotation
48 |
49 | Angle by which to rotate the page. It must be a multiple of 90; positive values
50 | mean clockwise rotation. The default value is 0.
51 |
10 | Cell(float w [, float h [, string txt [, mixed border [, int ln [, string align [, boolean fill [, mixed link]]]]]]])
11 |
Description
12 | Prints a cell (rectangular area) with optional borders, background color and character string.
13 | The upper-left corner of the cell corresponds to the current position. The text can be aligned
14 | or centered. After the call, the current position moves to the right or to the next line. It is
15 | possible to put a link on the text.
16 |
17 | If automatic page breaking is enabled and the cell goes beyond the limit, a page break is
18 | done before outputting.
19 |
Parameters
20 |
21 |
w
22 |
23 | Cell width. If 0, the cell extends up to the right margin.
24 |
37 | Indicates if borders must be drawn around the cell. The value can be either a number:
38 |
39 |
0: no border
40 |
1: frame
41 |
42 | or a string containing some or all of the following characters (in any order):
43 |
44 |
L: left
45 |
T: top
46 |
R: right
47 |
B: bottom
48 |
49 | Default value: 0.
50 |
51 |
ln
52 |
53 | Indicates where the current position should go after the call. Possible values are:
54 |
55 |
0: to the right
56 |
1: to the beginning of the next line
57 |
2: below
58 |
59 | Putting 1 is equivalent to putting 0 and calling Ln() just after.
60 | Default value: 0.
61 |
62 |
align
63 |
64 | Allows to center or align the text. Possible values are:
65 |
66 |
L or empty string: left align (default value)
67 |
C: center
68 |
R: right align
69 |
70 |
71 |
fill
72 |
73 | Indicates if the cell background must be painted (true) or transparent (false).
74 | Default value: false.
75 |
76 |
link
77 |
78 | URL or identifier returned by AddLink().
79 |
80 |
81 |
Example
82 |
83 |
// Set font
84 | $pdf->SetFont('Arial','B',16);
85 | // Move to 8 cm to the right
86 | $pdf->Cell(80);
87 | // Centered text in a framed 20*10 mm cell and line break
88 | $pdf->Cell(20,10,'Title',1,1,'C');
12 | Terminates the PDF document. It is not necessary to call this method explicitly because Output()
13 | does it automatically.
14 |
15 | If the document contains no page, AddPage() is called to prevent from getting an invalid document.
16 |
12 | This method is automatically called in case of a fatal error; it simply throws an exception
13 | with the provided message.
14 | An inherited class may override it to customize the error handling but the method should
15 | never return, otherwise the resulting document would probably be invalid.
16 |
12 | This method is used to render the page footer. It is automatically called by AddPage() and
13 | Close() and should not be called directly by the application. The implementation in FPDF is
14 | empty, so you have to subclass it and override the method if you want a specific processing.
15 |
Example
16 |
17 |
class PDF extends FPDF
18 | {
19 | function Footer()
20 | {
21 | // Go to 1.5 cm from bottom
22 | $this->SetY(-15);
23 | // Select Arial italic 8
24 | $this->SetFont('Arial','I',8);
25 | // Print centered page number
26 | $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
27 | }
28 | }
12 | This method is used to render the page header. It is automatically called by AddPage() and
13 | should not be called directly by the application. The implementation in FPDF is empty, so
14 | you have to subclass it and override the method if you want a specific processing.
15 |
Example
16 |
17 |
class PDF extends FPDF
18 | {
19 | function Header()
20 | {
21 | // Select Arial bold 15
22 | $this->SetFont('Arial','B',15);
23 | // Move to the right
24 | $this->Cell(80);
25 | // Framed title
26 | $this->Cell(30,10,'Title',1,0,'C');
27 | // Line break
28 | $this->Ln(20);
29 | }
30 | }
10 | Image(string file [, float x [, float y [, float w [, float h [, string type [, mixed link]]]]]])
11 |
Description
12 | Puts an image. The size it will take on the page can be specified in different ways:
13 |
14 |
explicit width and height (expressed in user unit or dpi)
15 |
one explicit dimension, the other being calculated automatically in order to keep the original proportions
16 |
no explicit dimension, in which case the image is put at 96 dpi
17 |
18 | Supported formats are JPEG, PNG and GIF. The GD extension is required for GIF.
19 |
20 |
21 | For JPEGs, all flavors are allowed:
22 |
23 |
gray scales
24 |
true colors (24 bits)
25 |
CMYK (32 bits)
26 |
27 | For PNGs, are allowed:
28 |
29 |
gray scales on at most 8 bits (256 levels)
30 |
indexed colors
31 |
true colors (24 bits)
32 |
33 | For GIFs: in case of an animated GIF, only the first frame is displayed.
34 |
35 | Transparency is supported.
36 |
37 | The format can be specified explicitly or inferred from the file extension.
38 |
39 | It is possible to put a link on the image.
40 |
41 | Remark: if an image is used several times, only one copy is embedded in the file.
42 |
Parameters
43 |
44 |
file
45 |
46 | Path or URL of the image.
47 |
48 |
x
49 |
50 | Abscissa of the upper-left corner. If not specified or equal to null, the current abscissa
51 | is used.
52 |
53 |
y
54 |
55 | Ordinate of the upper-left corner. If not specified or equal to null, the current ordinate
56 | is used; moreover, a page break is triggered first if necessary (in case automatic page breaking is enabled)
57 | and, after the call, the current ordinate is moved to the bottom of the image.
58 |
59 |
w
60 |
61 | Width of the image in the page. There are three cases:
62 |
63 |
If the value is positive, it represents the width in user unit
64 |
If the value is negative, the absolute value represents the horizontal resolution in dpi
65 |
If the value is not specified or equal to zero, it is automatically calculated
66 |
67 |
68 |
h
69 |
70 | Height of the image in the page. There are three cases:
71 |
72 |
If the value is positive, it represents the height in user unit
73 |
If the value is negative, the absolute value represents the vertical resolution in dpi
74 |
If the value is not specified or equal to zero, it is automatically calculated
75 |
76 |
77 |
type
78 |
79 | Image format. Possible values are (case insensitive): JPG, JPEG, PNG and GIF.
80 | If not specified, the type is inferred from the file extension.
81 |
82 |
link
83 |
84 | URL or identifier returned by AddLink().
85 |
86 |
87 |
Example
88 |
89 |
// Insert a logo in the top-left corner at 300 dpi
90 | $pdf->Image('logo.png',10,10,-300);
91 | // Insert a dynamic image from a URL
92 | $pdf->Image('http://chart.googleapis.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World',60,30,90,0,'PNG');
10 | __construct - constructor
11 | AcceptPageBreak - accept or not automatic page break
12 | AddFont - add a new font
13 | AddLink - create an internal link
14 | AddPage - add a new page
15 | AliasNbPages - define an alias for number of pages
16 | Cell - print a cell
17 | Close - terminate the document
18 | Error - fatal error
19 | Footer - page footer
20 | GetPageHeight - get current page height
21 | GetPageWidth - get current page width
22 | GetStringWidth - compute string length
23 | GetX - get current x position
24 | GetY - get current y position
25 | Header - page header
26 | Image - output an image
27 | Line - draw a line
28 | Link - put a link
29 | Ln - line break
30 | MultiCell - print text with line breaks
31 | Output - save or send the document
32 | PageNo - page number
33 | Rect - draw a rectangle
34 | SetAuthor - set the document author
35 | SetAutoPageBreak - set the automatic page breaking mode
36 | SetCompression - turn compression on or off
37 | SetCreator - set document creator
38 | SetDisplayMode - set display mode
39 | SetDrawColor - set drawing color
40 | SetFillColor - set filling color
41 | SetFont - set font
42 | SetFontSize - set font size
43 | SetKeywords - associate keywords with document
44 | SetLeftMargin - set left margin
45 | SetLineWidth - set line width
46 | SetLink - set internal link destination
47 | SetMargins - set margins
48 | SetRightMargin - set right margin
49 | SetSubject - set document subject
50 | SetTextColor - set text color
51 | SetTitle - set document title
52 | SetTopMargin - set top margin
53 | SetX - set current x position
54 | SetXY - set current x and y positions
55 | SetY - set current y position and optionally reset x
56 | Text - print a string
57 | Write - print flowing text
58 |
59 |
60 |
--------------------------------------------------------------------------------
/fpdf/doc/line.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Line
6 |
7 |
8 |
9 |
12 | Puts a link on a rectangular area of the page. Text or image links are generally put via Cell(),
13 | Write() or Image(), but this method can be useful for instance to define a clickable area inside
14 | an image.
15 |
Parameters
16 |
17 |
x
18 |
19 | Abscissa of the upper-left corner of the rectangle.
20 |
21 |
y
22 |
23 | Ordinate of the upper-left corner of the rectangle.
24 |
25 |
w
26 |
27 | Width of the rectangle.
28 |
29 |
h
30 |
31 | Height of the rectangle.
32 |
33 |
link
34 |
35 | URL or identifier returned by AddLink().
36 |
12 | This method allows printing text with line breaks. They can be automatic (as soon as the
13 | text reaches the right border of the cell) or explicit (via the \n character). As many cells
14 | as necessary are output, one below the other.
15 |
16 | Text can be aligned, centered or justified. The cell block can be framed and the background
17 | painted.
18 |
Parameters
19 |
20 |
w
21 |
22 | Width of cells. If 0, they extend up to the right margin of the page.
23 |
24 |
h
25 |
26 | Height of cells.
27 |
28 |
txt
29 |
30 | String to print.
31 |
32 |
border
33 |
34 | Indicates if borders must be drawn around the cell block. The value can be either a number:
35 |
36 |
0: no border
37 |
1: frame
38 |
39 | or a string containing some or all of the following characters (in any order):
40 |
41 |
L: left
42 |
T: top
43 |
R: right
44 |
B: bottom
45 |
46 | Default value: 0.
47 |
48 |
align
49 |
50 | Sets the text alignment. Possible values are:
51 |
52 |
L: left alignment
53 |
C: center
54 |
R: right alignment
55 |
J: justification (default value)
56 |
57 |
58 |
fill
59 |
60 | Indicates if the cell background must be painted (true) or transparent (false).
61 | Default value: false.
62 |
10 | string Output([string dest [, string name [, boolean isUTF8]]])
11 |
Description
12 | Send the document to a given destination: browser, file or string. In the case of a browser, the
13 | PDF viewer may be used or a download may be forced.
14 |
15 | The method first calls Close() if necessary to terminate the document.
16 |
Parameters
17 |
18 |
dest
19 |
20 | Destination where to send the document. It can be one of the following:
21 |
22 |
I: send the file inline to the browser. The PDF viewer is used if available.
23 |
D: send to the browser and force a file download with the name given by name.
24 |
F: save to a local file with the name given by name (may include a path).
25 |
S: return the document as a string.
26 |
27 | The default value is I.
28 |
29 |
name
30 |
31 | The name of the file. It is ignored in case of destination S.
32 | The default value is doc.pdf.
33 |
34 |
isUTF8
35 |
36 | Indicates if name is encoded in ISO-8859-1 (false) or UTF-8 (true).
37 | Only used for destinations I and D.
38 | The default value is false.
39 |
10 | SetAutoPageBreak(boolean auto [, float margin])
11 |
Description
12 | Enables or disables the automatic page breaking mode. When enabling, the second parameter is
13 | the distance from the bottom of the page that defines the triggering limit. By default, the
14 | mode is on and the margin is 2 cm.
15 |
Parameters
16 |
17 |
auto
18 |
19 | Boolean indicating if mode should be on or off.
20 |
12 | Activates or deactivates page compression. When activated, the internal representation of
13 | each page is compressed, which leads to a compression ratio of about 2 for the resulting
14 | document.
15 |
16 | Compression is on by default.
17 |
18 |
19 | Note: the Zlib extension is required for this feature. If not present, compression
20 | will be turned off.
21 |
Parameters
22 |
23 |
compress
24 |
25 | Boolean indicating if compression must be enabled.
26 |
12 | Defines the way the document is to be displayed by the viewer. The zoom level can be set: pages can be
13 | displayed entirely on screen, occupy the full width of the window, use real size, be scaled by a
14 | specific zooming factor or use viewer default (configured in the Preferences menu of Adobe Reader).
15 | The page layout can be specified too: single at once, continuous display, two columns or viewer
16 | default.
17 |
Parameters
18 |
19 |
zoom
20 |
21 | The zoom to use. It can be one of the following string values:
22 |
23 |
fullpage: displays the entire page on screen
24 |
fullwidth: uses maximum width of window
25 |
real: uses real size (equivalent to 100% zoom)
26 |
default: uses viewer default mode
27 |
28 | or a number indicating the zooming factor to use.
29 |
12 | Defines the color used for all drawing operations (lines, rectangles and cell borders). It
13 | can be expressed in RGB components or gray scale. The method can be called before the first
14 | page is created and the value is retained from page to page.
15 |
Parameters
16 |
17 |
r
18 |
19 | If g et b are given, red component; if not, indicates the gray level.
20 | Value between 0 and 255.
21 |
12 | Defines the color used for all filling operations (filled rectangles and cell backgrounds).
13 | It can be expressed in RGB components or gray scale. The method can be called before the first
14 | page is created and the value is retained from page to page.
15 |
Parameters
16 |
17 |
r
18 |
19 | If g and b are given, red component; if not, indicates the gray level.
20 | Value between 0 and 255.
21 |
12 | Sets the font used to print character strings. It is mandatory to call this method
13 | at least once before printing text or the resulting document would not be valid.
14 |
15 | The font can be either a standard one or a font added via the AddFont() method. Standard fonts
16 | use the Windows encoding cp1252 (Western Europe).
17 |
18 | The method can be called before the first page is created and the font is kept from page
19 | to page.
20 |
21 | If you just wish to change the current font size, it is simpler to call SetFontSize().
22 |
23 |
24 | Note: the font definition files must be accessible. They are searched successively in:
25 |
26 |
The directory defined by the FPDF_FONTPATH constant (if this constant is defined)
27 |
The font directory located in the same directory as fpdf.php (if it exists)
35 | If the file corresponding to the requested font is not found, the error "Could not include font
36 | definition file" is raised.
37 |
Parameters
38 |
39 |
family
40 |
41 | Family font. It can be either a name defined by AddFont() or one of the standard families (case
42 | insensitive):
43 |
44 |
Courier (fixed-width)
45 |
Helvetica or Arial (synonymous; sans serif)
46 |
Times (serif)
47 |
Symbol (symbolic)
48 |
ZapfDingbats (symbolic)
49 |
50 | It is also possible to pass an empty string. In that case, the current family is kept.
51 |
52 |
style
53 |
54 | Font style. Possible values are (case insensitive):
55 |
56 |
empty string: regular
57 |
B: bold
58 |
I: italic
59 |
U: underline
60 |
61 | or any combination. The default value is regular.
62 | Bold and italic styles do not apply to Symbol and ZapfDingbats.
63 |
64 |
size
65 |
66 | Font size in points.
67 |
68 | The default value is the current size. If no size has been specified since the beginning of
69 | the document, the value taken is 12.
70 |
12 | Defines the left margin. The method can be called before creating the first page.
13 |
14 | If the current abscissa gets out of page, it is brought back to the margin.
15 |
12 | Defines the line width. By default, the value equals 0.2 mm. The method can be called before
13 | the first page is created and the value is retained from page to page.
14 |
12 | Defines the color used for text. It can be expressed in RGB components or gray scale. The
13 | method can be called before the first page is created and the value is retained from page to
14 | page.
15 |
Parameters
16 |
17 |
r
18 |
19 | If g et b are given, red component; if not, indicates the gray level.
20 | Value between 0 and 255.
21 |
12 | Defines the abscissa and ordinate of the current position. If the passed values are negative,
13 | they are relative respectively to the right and bottom of the page.
14 |
12 | Sets the ordinate and optionally moves the current abscissa back to the left margin. If the value
13 | is negative, it is relative to the bottom of the page.
14 |
Parameters
15 |
16 |
y
17 |
18 | The value of the ordinate.
19 |
20 |
resetX
21 |
22 | Whether to reset the abscissa. Default value: true.
23 |
12 | Prints a character string. The origin is on the left of the first character, on the baseline.
13 | This method allows to place a string precisely on the page, but it is usually easier to use
14 | Cell(), MultiCell() or Write() which are the standard methods to print text.
15 |
12 | This method prints text from the current position. When the right margin is reached (or the \n
13 | character is met) a line break occurs and text continues from the left margin. Upon method exit,
14 | the current position is left just at the end of the text.
15 |
16 | It is possible to put a link on the text.
17 |
Parameters
18 |
19 |
h
20 |
21 | Line height.
22 |
23 |
txt
24 |
25 | String to print.
26 |
27 |
link
28 |
29 | URL or identifier returned by AddLink().
30 |
31 |
32 |
Example
33 |
34 |
// Begin with regular font
35 | $pdf->SetFont('Arial','',14);
36 | $pdf->Write(5,'Visit ');
37 | // Then put a blue underlined link
38 | $pdf->SetTextColor(0,0,255);
39 | $pdf->SetFont('','U');
40 | $pdf->Write(5,'www.fpdf.org','http://www.fpdf.org');
You can also insert links on
94 | text, such as www.fpdf.org, or on an image: click on the logo.';
95 |
96 | $pdf = new PDF();
97 | // First page
98 | $pdf->AddPage();
99 | $pdf->SetFont('Arial','',20);
100 | $pdf->Write(5,"To find out what's new in this tutorial, click ");
101 | $pdf->SetFont('','U');
102 | $link = $pdf->AddLink();
103 | $pdf->Write(5,'here',$link);
104 | $pdf->SetFont('');
105 | // Second page
106 | $pdf->AddPage();
107 | $pdf->SetLink($link);
108 | $pdf->Image('logo.png',10,12,30,0,'','http://www.fpdf.org');
109 | $pdf->SetLeftMargin(45);
110 | $pdf->SetFontSize(14);
111 | $pdf->WriteHTML($html);
112 | $pdf->Output();
113 | ?>
114 |
--------------------------------------------------------------------------------
/fpdf/tutorial/tuto7.php:
--------------------------------------------------------------------------------
1 | AddFont('Calligrapher','','calligra.php');
7 | $pdf->AddPage();
8 | $pdf->SetFont('Calligrapher','',35);
9 | $pdf->Cell(0,10,'Enjoy new fonts with FPDF!');
10 | $pdf->Output();
11 | ?>
12 |
--------------------------------------------------------------------------------
/function_data.php:
--------------------------------------------------------------------------------
1 |
5 | * Makbox is a personal (staas) cloud.
6 | *
7 | * Makbox is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | *
13 | * Makbox is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU Affero General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Affero General Public License, version 3,
19 | * along with this program. If not, see
20 | *
21 | */
22 |
23 |
24 | function input($data)
25 | {
26 | $data = trim($data);
27 | $data = stripslashes($data);
28 | $data = htmlspecialchars($data);
29 | return $data;
30 | }
31 |
32 |
33 | ?>
34 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
5 | * Makbox is a personal (staas) cloud.
6 | *
7 | * Makbox is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | *
13 | * Makbox is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU Affero General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Affero General Public License, version 3,
19 | * along with this program. If not, see
20 | *
21 | */
22 |
23 |
24 | session_start();
25 |
26 |
27 | ?>
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
Administrator
57 |
58 |
59 |
60 |
61 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | alert("Sign in control panel error");
127 | ';
128 | }
129 |
130 |
131 | } // kleisimo ths isset
132 |
133 |
134 | } //kleisimo ths megalhs else gia elenxo ths ip
135 |
136 | ?>
137 |
--------------------------------------------------------------------------------
/logout.php:
--------------------------------------------------------------------------------
1 |
5 | * Makbox is a personal (staas) cloud.
6 | *
7 | * Makbox is free software: you can redistribute it and/or modify
8 | * it under the terms of the GNU Affero General Public License as
9 | * published by the Free Software Foundation, either version 3 of the
10 | * License, or (at your option) any later version.
11 | *
12 | *
13 | * Makbox is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU Affero General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU Affero General Public License, version 3,
19 | * along with this program. If not, see
20 | *
21 | */
22 |
23 |
24 | session_start();
25 | session_unset();
26 | session_destroy();
27 | header('Location: index.php');
28 |
29 | ?>
30 |
--------------------------------------------------------------------------------
/photos/database-tree.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makbox/control_panel/80b00eea2b894d8bf020cbb20d86b33974e4cbcb/photos/database-tree.ico
--------------------------------------------------------------------------------
/photos/database.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makbox/control_panel/80b00eea2b894d8bf020cbb20d86b33974e4cbcb/photos/database.ico
--------------------------------------------------------------------------------
/photos/makbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makbox/control_panel/80b00eea2b894d8bf020cbb20d86b33974e4cbcb/photos/makbox.png
--------------------------------------------------------------------------------
/photos/network.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makbox/control_panel/80b00eea2b894d8bf020cbb20d86b33974e4cbcb/photos/network.png
--------------------------------------------------------------------------------
/photos/settings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makbox/control_panel/80b00eea2b894d8bf020cbb20d86b33974e4cbcb/photos/settings.png
--------------------------------------------------------------------------------
/photos/users.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/makbox/control_panel/80b00eea2b894d8bf020cbb20d86b33974e4cbcb/photos/users.ico
--------------------------------------------------------------------------------
/server_messages_export.php:
--------------------------------------------------------------------------------
1 |
6 | * Makbox is a personal (staas) cloud.
7 | *
8 | * Makbox is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | *
14 | * Makbox is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License, version 3,
20 | * along with this program. If not, see
21 | *
22 | */
23 |
24 |
25 |
26 | require('class_cn.php');
27 |
28 | $obj = new in;
29 |
30 | $host = $obj->connect[0];
31 | $user = $obj->connect[1];
32 | $pass = $obj->connect[2];
33 | $db = $obj->connect[3];
34 |
35 | $conn = new mysqli($host,$user,$pass,$db);
36 |
37 | if($conn->connect_error)
38 | {
39 | die ("Cannot connect to server " .$conn->connect_error);
40 | }
41 |
42 |
43 | else
44 | {
45 |
46 |
47 | require('fpdf/fpdf.php');
48 | $pdf=new FPDF();
49 | $pdf->AddPage('P', 'Legal'); // kathorizei ton tupo xartiou ths selidas
50 | // o tupos mporei an einai P or Portrait L or Landscape kai megethos xartiou (A3,A4,A5,Letter,Legal)
51 | $pdf->SetFont('Arial','B',10);
52 | $pdf->Ln();
53 | $pdf->Ln();
54 | $pdf->SetFont('times','B',10);
55 | $pdf->SetFillColor(230,230,230); // edw kathorizeis to xrwma
56 | $pdf->Cell(199,12,"All server messages send to users",1,0,'C',TRUE);
57 | $pdf->Ln(); // afhnei mia grammh keno kai paei apo katw
58 | $pdf->Cell(34,15,"Created",1,0,'C',TRUE); // edw vazeis platos,upsos,onoma,border w,0h,kai true gia na parei to xrwma
59 | $pdf->Cell(16,15,"From",1,0,'C',TRUE);
60 | $pdf->Cell(22,15,"To",1,0,'C',TRUE);
61 | $pdf->Cell(127,15,"Message",1,0,'C',TRUE);
62 | $pdf->Ln();
63 |
64 |
65 | $sql = "SELECT created,_from,_to,message FROM messages";
66 | $result = $conn->query($sql);
67 |
68 | while($row=$result->fetch_assoc())
69 | {
70 | $created = $row['created'];
71 | $from = $row['_from'];
72 | $to = $row['_to'];
73 | $message = $row['message'];
74 | //$blank=" ";
75 |
76 | $pdf->Cell(34,7,$created,1);
77 | //$pdf->Cell(10,7,$blank);
78 | $pdf->Cell(16,7,$from,1);
79 | $pdf->Cell(22,7,$to,1);
80 | $pdf->Cell(127,7,$message,1); // edw emfanizei olo to keimeno kanwntas ansiplwsh keimenou
81 | $pdf->Ln();
82 | }
83 |
84 | $pdf->Output();
85 |
86 |
87 |
88 |
89 | /*
90 | duo eidh eksodou pdf
91 |
92 | $pdf->Output('D','messages.pdf'); //eksodos kateutheian me onoma
93 |
94 | $pdf->Output(); // edw anoigo vlewpw kai meta katevazw kai allazw onoma
95 |
96 | */
97 |
98 |
99 | } // kleisimo ths else gia ta dedomena
100 |
101 | $conn->close();
102 |
103 |
104 | ?>
105 |
--------------------------------------------------------------------------------
/storage_user_storage.php:
--------------------------------------------------------------------------------
1 |
6 | * Makbox is a personal (staas) cloud.
7 | *
8 | * Makbox is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | *
14 | * Makbox is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License, version 3,
20 | * along with this program. If not, see
21 | *
22 | */
23 |
24 |
25 |
26 | if(isset($_POST['submit_storage']))
27 | {
28 |
29 | require('class_cn.php');
30 |
31 | $obj = new in;
32 |
33 | $host = $obj->connect[0];
34 | $user = $obj->connect[1];
35 | $pass = $obj->connect[2];
36 | $db = $obj->connect[3];
37 |
38 |
39 |
40 |
41 | $conn = new mysqli($host,$user,$pass,$db);
42 |
43 |
44 | if($conn->connect_error)
45 | {
46 | die ("Cannot connect to server " .$conn->connect_error);
47 | exit;
48 | }
49 |
50 |
51 | else
52 | {
53 |
54 | require_once('function_data.php');
55 |
56 |
57 | $user = input($_POST['user']);
58 | $user = $conn->real_escape_string($user);
59 |
60 | $space_limit = input($_POST['space_limit']);
61 | $space_limit = $conn->real_escape_string($space_limit);
62 |
63 |
64 |
65 | $sql0="select user from hard_disk";
66 | $result0=$conn->query($sql0);
67 |
68 |
69 |
70 | while($row0=$result0->fetch_assoc())
71 | {
72 |
73 | if ($user != $row0['user'])
74 | {
75 | echo '';
77 | echo ("");
78 | }
79 |
80 |
81 |
82 | else
83 | {
84 |
85 | $sql2="update hard_disk set space_limit = '$space_limit' where user='$user'";
86 | $result2=$conn->query($sql2);
87 | echo ("");
88 | }
89 |
90 |
91 | } // end of while
92 |
93 |
94 | } // kleisimo ths else gia ta dedomena
95 |
96 |
97 | $conn->close();
98 |
99 | } // kleisimo ths isset
100 |
101 |
102 | ?>
103 |
--------------------------------------------------------------------------------
/transfer_archives_delete.php:
--------------------------------------------------------------------------------
1 |
6 | * Makbox is a personal (staas) cloud.
7 | *
8 | * Makbox is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | *
14 | * Makbox is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License, version 3,
20 | * along with this program. If not, see
21 | *
22 | */
23 |
24 |
25 |
26 | if(isset($_POST['delete_submit']))
27 | {
28 |
29 | require('class_cn.php');
30 |
31 | $obj = new in;
32 |
33 | $host = $obj->connect[0];
34 | $user = $obj->connect[1];
35 | $pass = $obj->connect[2];
36 | $db = $obj->connect[3];
37 |
38 | $conn = new mysqli ($host,$user,$pass,$db);
39 |
40 | if($conn->connect_error)
41 | {
42 | die("Database connection failed: " .$conn->connect_error);
43 | }
44 |
45 | else
46 | {
47 | $idarr = $_POST['checked_id'];
48 | foreach($idarr as $id)
49 | {
50 |
51 | $sql1="DELETE FROM folder_uploads WHERE id='$id' and file_type='canonical'";
52 | $result1=$conn->query($sql1);
53 |
54 |
55 | }
56 | $_SESSION['success_msg'] = 'File have been deleted successfully.';
57 | header("Location: transfer_archives.php");
58 |
59 | }//telos ths else gia ta dedomena
60 |
61 | $conn->close();
62 |
63 | }//telos ths if gia ton elenxo me thn issset
64 | ?>
65 |
--------------------------------------------------------------------------------
/transfer_archives_download.php:
--------------------------------------------------------------------------------
1 |
6 | * Makbox is a personal (staas) cloud.
7 | *
8 | * Makbox is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | *
14 | * Makbox is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License, version 3,
20 | * along with this program. If not, see
21 | *
22 | */
23 |
24 |
25 |
26 | if(isset($_GET['id']))
27 | {
28 |
29 | $id = intval($_GET['id']);
30 |
31 |
32 | if($id <= 0)
33 | {
34 | die('The ID is invalid!');
35 | }
36 |
37 |
38 | else
39 | {
40 |
41 | require('class_cn.php');
42 |
43 | $obj = new in;
44 |
45 | $host = $obj->connect[0];
46 | $user = $obj->connect[1];
47 | $pass = $obj->connect[2];
48 | $db = $obj->connect[3];
49 |
50 | $conn = new mysqli($host,$user,$pass,$db);
51 |
52 | if($conn->connect_error)
53 | {
54 | die ("Cannot connect to server " .$conn->connect_error);
55 | }
56 |
57 | else
58 | {
59 |
60 | $sql= " SELECT name,type,size,data FROM folder_uploads WHERE id ='$id'";
61 | $result = $conn->query($sql);
62 |
63 | if($result)
64 | {
65 | $row = $result->fetch_assoc();
66 |
67 |
68 | header("Content-Type: ". $row['type']);
69 | header("Content-Length: ". $row['size']);
70 | header('Content-Disposition:attachment;filename="' .$row['name'] .'"');
71 |
72 |
73 | echo $row['data'];
74 | }
75 | else
76 | {
77 | echo 'Error! No data exists with that ID.';
78 | }
79 |
80 | }//kleisimo ths else gia ta dedoimena
81 |
82 | }// kleisimo ths megalhs else
83 |
84 | $conn->close();
85 |
86 | }// kleisimos ths megalhs if
87 |
88 |
89 |
90 |
91 | ?>
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/transfer_archives_export.php:
--------------------------------------------------------------------------------
1 |
6 | * Makbox is a personal (staas) cloud.
7 | *
8 | * Makbox is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | *
14 | * Makbox is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License, version 3,
20 | * along with this program. If not, see
21 | *
22 | */
23 |
24 |
25 |
26 | require('class_cn.php');
27 |
28 | $obj = new in;
29 |
30 | $host = $obj->connect[0];
31 | $user = $obj->connect[1];
32 | $pass = $obj->connect[2];
33 | $db = $obj->connect[3];
34 |
35 | $conn = new mysqli($host,$user,$pass,$db);
36 |
37 | if($conn->connect_error)
38 | {
39 | die ("Cannot connect to server " .$conn->connect_error);
40 | }
41 |
42 |
43 | else
44 | {
45 |
46 |
47 | require('fpdf/fpdf.php');
48 | $pdf=new FPDF();
49 | $pdf->AddPage('P', 'A3'); // kathorizei ton tupo xartiou ths selidas
50 | // o tupos mporei an einai P or Portrait L or Landscape kai megethos xartiou (A3,A4,A5,Letter,Legal)
51 | $pdf->SetFont('Arial','B',10);
52 | $pdf->Ln();
53 | $pdf->Ln();
54 | $pdf->SetFillColor(230,230,230); // edw kathorizeis to xrwma
55 | $pdf->SetFont('times','B',15);
56 | $pdf->Cell(283,15,"All tansfer archives between users",1,0,'C',TRUE);
57 | $pdf->Ln(); // afhnei mia grammh keno kai paei apo katw
58 | $pdf->SetFont('times','B',10);
59 | $pdf->Cell(95,15,"Name",1,0,'C',TRUE); // edw vazeis platos,upsos,onoma,border w,0h,kai true gia na parei to xrwma
60 | $pdf->Cell(60,15,"Type",1,0,'C',TRUE);
61 | $pdf->Cell(30,15,"Size",1,0,'C',TRUE);
62 | $pdf->Cell(29,15,"From",1,0,'C',TRUE);
63 | $pdf->Cell(29,15,"To",1,0,'C',TRUE);
64 | $pdf->Cell(40,15,"Send",1,0,'C',TRUE);
65 | $pdf->Ln();
66 |
67 |
68 | $sql="select id,name,type,size,_from,_to,created from folder_uploads";
69 | $result = $conn->query($sql);
70 |
71 | while($row=$result->fetch_assoc())
72 | {
73 | $name = $row['name'];
74 | $type = $row['type'];
75 | $size = $row['size'];
76 | $from = $row['_from'];
77 | $to = $row['_to'];
78 | $created = $row['created'];
79 |
80 |
81 | $pdf->Cell(95,7,$name,1);
82 | $pdf->Cell(60,7,$type,1);
83 | $pdf->Cell(30,7,$size,1);
84 | $pdf->Cell(29,7,$from,1);
85 | $pdf->Cell(29,7,$to,1);
86 | $pdf->Cell(40,7,$created,1);
87 |
88 | //$pdf->Cell(127,7,$message,1); // edw emfanizei olo to keimeno kanwntas ansiplwsh keimenou an einai MultiCell
89 | $pdf->Ln();
90 | }
91 |
92 | $pdf->Output();
93 |
94 |
95 |
96 |
97 | /*
98 | duo eidh eksodou pdf
99 |
100 | $pdf->Output('D','messages.pdf'); //eksodos kateutheian me onoma
101 |
102 | $pdf->Output(); // edw anoigo vlewpw kai meta katevazw kai allazw onoma
103 |
104 | */
105 |
106 |
107 | } // kleisimo ths else gia ta dedomena
108 |
109 | $conn->close();
110 |
111 |
112 | ?>
113 |
--------------------------------------------------------------------------------
/transfer_archives_hidden_delete.php:
--------------------------------------------------------------------------------
1 |
6 | * Makbox is a personal (staas) cloud.
7 | *
8 | * Makbox is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | *
14 | * Makbox is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License, version 3,
20 | * along with this program. If not, see
21 | *
22 | */
23 |
24 |
25 |
26 | if(isset($_POST['delete_submit']))
27 | {
28 |
29 | require('class_cn.php');
30 |
31 | $obj = new in;
32 |
33 | $host = $obj->connect[0];
34 | $user = $obj->connect[1];
35 | $pass = $obj->connect[2];
36 | $db = $obj->connect[3];
37 |
38 | $conn = new mysqli ($host,$user,$pass,$db);
39 |
40 | if($conn->connect_error)
41 | {
42 | die("Database connection failed: " .$conn->connect_error);
43 | }
44 |
45 | else
46 | {
47 | $idarr = $_POST['checked_id'];
48 | foreach($idarr as $id)
49 | {
50 |
51 | $sql1="DELETE FROM backup_folder_uploads WHERE id='$id'";
52 | $result1=$conn->query($sql1);
53 |
54 |
55 | }
56 | $_SESSION['success_msg'] = 'File have been deleted successfully.';
57 | header("Location: transfer_archives_hidden.php");
58 |
59 | }//telos ths else gia ta dedomena
60 |
61 | $conn->close();
62 |
63 | }//telos ths if gia ton elenxo me thn issset
64 | ?>
65 |
--------------------------------------------------------------------------------
/transfer_archives_hidden_download.php:
--------------------------------------------------------------------------------
1 |
6 | * Makbox is a personal (staas) cloud.
7 | *
8 | * Makbox is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | *
14 | * Makbox is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License, version 3,
20 | * along with this program. If not, see
21 | *
22 | */
23 |
24 |
25 |
26 | if(isset($_GET['id']))
27 | {
28 |
29 | $id = intval($_GET['id']);
30 |
31 |
32 | if($id <= 0)
33 | {
34 | die('The ID is invalid!');
35 | }
36 |
37 |
38 | else
39 | {
40 |
41 | require('class_cn.php');
42 |
43 | $obj = new in;
44 |
45 | $host = $obj->connect[0];
46 | $user = $obj->connect[1];
47 | $pass = $obj->connect[2];
48 | $db = $obj->connect[3];
49 |
50 | $conn = new mysqli($host,$user,$pass,$db);
51 |
52 | if($conn->connect_error)
53 | {
54 | die ("Cannot connect to server " .$conn->connect_error);
55 | }
56 |
57 | else
58 | {
59 |
60 | $sql= " SELECT name,type,size,data FROM backup_folder_uploads WHERE id ='$id'";
61 | $result = $conn->query($sql);
62 |
63 | if($result)
64 | {
65 | $row = $result->fetch_assoc();
66 |
67 |
68 | header("Content-Type: ". $row['type']);
69 | header("Content-Length: ". $row['size']);
70 | header('Content-Disposition:attachment;filename="' .$row['name'] .'"');
71 |
72 |
73 | echo $row['data'];
74 | }
75 | else
76 | {
77 | echo 'Error! No data exists with that ID.';
78 | }
79 |
80 | }//kleisimo ths else gia ta dedoimena
81 |
82 | }// kleisimo ths megalhs else
83 |
84 | $conn->close();
85 |
86 | }// kleisimos ths megalhs if
87 |
88 |
89 |
90 |
91 | ?>
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/transfer_archives_hidden_export.php:
--------------------------------------------------------------------------------
1 |
6 | * Makbox is a personal (staas) cloud.
7 | *
8 | * Makbox is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU Affero General Public License as
10 | * published by the Free Software Foundation, either version 3 of the
11 | * License, or (at your option) any later version.
12 | *
13 | *
14 | * Makbox is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU Affero General Public License for more details.
18 | *
19 | * You should have received a copy of the GNU Affero General Public License, version 3,
20 | * along with this program. If not, see
21 | *
22 | */
23 |
24 |
25 |
26 | require('class_cn.php');
27 |
28 | $obj = new in;
29 |
30 | $host = $obj->connect[0];
31 | $user = $obj->connect[1];
32 | $pass = $obj->connect[2];
33 | $db = $obj->connect[3];
34 |
35 | $conn = new mysqli($host,$user,$pass,$db);
36 |
37 | if($conn->connect_error)
38 | {
39 | die ("Cannot connect to server " .$conn->connect_error);
40 | }
41 |
42 |
43 | else
44 | {
45 |
46 |
47 | require('fpdf/fpdf.php');
48 | $pdf=new FPDF();
49 | $pdf->AddPage('P', 'A3'); // kathorizei ton tupo xartiou ths selidas
50 | // o tupos mporei an einai P or Portrait L or Landscape kai megethos xartiou (A3,A4,A5,Letter,Legal)
51 | $pdf->SetFont('Arial','B',10);
52 | $pdf->Ln();
53 | $pdf->Ln();
54 | $pdf->SetFillColor(230,230,230); // edw kathorizeis to xrwma
55 | $pdf->SetFont('times','B',15);
56 | $pdf->Cell(283,15,"All tansfer archives between users",1,0,'C',TRUE);
57 | $pdf->Ln(); // afhnei mia grammh keno kai paei apo katw
58 | $pdf->SetFont('times','B',10);
59 | $pdf->Cell(95,15,"Name",1,0,'C',TRUE); // edw vazeis platos,upsos,onoma,border w,0h,kai true gia na parei to xrwma
60 | $pdf->Cell(60,15,"Type",1,0,'C',TRUE);
61 | $pdf->Cell(30,15,"Size",1,0,'C',TRUE);
62 | $pdf->Cell(29,15,"From",1,0,'C',TRUE);
63 | $pdf->Cell(29,15,"To",1,0,'C',TRUE);
64 | $pdf->Cell(40,15,"Send",1,0,'C',TRUE);
65 | $pdf->Ln();
66 |
67 |
68 | $sql="select id,name,type,size,_from,_to,created from backup_folder_uploads";
69 | $result = $conn->query($sql);
70 |
71 | while($row=$result->fetch_assoc())
72 | {
73 | $name = $row['name'];
74 | $type = $row['type'];
75 | $size = $row['size'];
76 | $from = $row['_from'];
77 | $to = $row['_to'];
78 | $created = $row['created'];
79 |
80 |
81 | $pdf->Cell(95,7,$name,1);
82 | $pdf->Cell(60,7,$type,1);
83 | $pdf->Cell(30,7,$size,1);
84 | $pdf->Cell(29,7,$from,1);
85 | $pdf->Cell(29,7,$to,1);
86 | $pdf->Cell(40,7,$created,1);
87 |
88 | //$pdf->Cell(127,7,$message,1); // edw emfanizei olo to keimeno kanwntas ansiplwsh keimenou an einai MultiCell
89 | $pdf->Ln();
90 | }
91 |
92 | $pdf->Output();
93 |
94 |
95 |
96 |
97 | /*
98 | duo eidh eksodou pdf
99 |
100 | $pdf->Output('D','messages.pdf'); //eksodos kateutheian me onoma
101 |
102 | $pdf->Output(); // edw anoigo vlewpw kai meta katevazw kai allazw onoma
103 |
104 | */
105 |
106 |
107 | } // kleisimo ths else gia ta dedomena
108 |
109 | $conn->close();
110 |
111 |
112 | ?>
113 |
--------------------------------------------------------------------------------