Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
c9ccc24d
Verified
Commit
c9ccc24d
authored
6 years ago
by
Damien
Browse files
Options
Downloads
Patches
Plain Diff
FEAT #8183 QRCode liaison
parent
9c774c97
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/class/PrintControler.php
+12
-6
12 additions, 6 deletions
core/class/PrintControler.php
with
12 additions
and
6 deletions
core/class/PrintControler.php
+
12
−
6
View file @
c9ccc24d
...
@@ -11,6 +11,7 @@ require_once('core/class/class_security.php');
...
@@ -11,6 +11,7 @@ require_once('core/class/class_security.php');
require_once
(
'apps/maarch_entreprise/tools/pdfb/fpdf_1_7/fpdf.php'
);
require_once
(
'apps/maarch_entreprise/tools/pdfb/fpdf_1_7/fpdf.php'
);
require_once
(
'apps/maarch_entreprise/tools/pdfb/fpdf_1_7/fpdi.php'
);
require_once
(
'apps/maarch_entreprise/tools/pdfb/fpdf_1_7/fpdi.php'
);
require_once
(
'apps/maarch_entreprise/tools/phpqrcode/qrlib.php'
);
class
EmptyObject
{
class
EmptyObject
{
function
__construct
()
function
__construct
()
...
@@ -51,7 +52,7 @@ class PrintControler extends PrintFunctions
...
@@ -51,7 +52,7 @@ class PrintControler extends PrintFunctions
$this
->
retrieve_datas
(
$resId
);
$this
->
retrieve_datas
(
$resId
);
}
}
$this
->
process_functions
();
$this
->
process_functions
();
$_SESSION
[
'print'
][
'filename'
]
=
$this
->
make_pdf
();
$_SESSION
[
'print'
][
'filename'
]
=
$this
->
make_pdf
(
$resId
);
}
}
// Private
// Private
...
@@ -177,7 +178,7 @@ class PrintControler extends PrintFunctions
...
@@ -177,7 +178,7 @@ class PrintControler extends PrintFunctions
}
}
}
}
private
function
make_pdf
()
private
function
make_pdf
(
$resId
)
{
{
$functions
=
new
functions
();
$functions
=
new
functions
();
$db
=
new
Database
();
$db
=
new
Database
();
...
@@ -232,7 +233,7 @@ class PrintControler extends PrintFunctions
...
@@ -232,7 +233,7 @@ class PrintControler extends PrintFunctions
$pdf
->
SetFont
(
'Arial'
,
'B'
,
11
);
$pdf
->
SetFont
(
'Arial'
,
'B'
,
11
);
//APPLICATION NAME
//APPLICATION NAME
$pdf
->
Cell
(
140
,
5
,
utf8_decode
(
$_SESSION
[
'config'
][
'applicationname'
]),
0
,
0
,
'
L
'
,
false
);
$pdf
->
Cell
(
140
,
5
,
utf8_decode
(
$_SESSION
[
'config'
][
'applicationname'
]),
0
,
0
,
'
C
'
,
false
);
$pdf
->
SetFont
(
'Arial'
,
''
,
10
);
$pdf
->
SetFont
(
'Arial'
,
''
,
10
);
...
@@ -242,15 +243,20 @@ class PrintControler extends PrintFunctions
...
@@ -242,15 +243,20 @@ class PrintControler extends PrintFunctions
$pdf
->
SetFont
(
'Arial'
,
'B'
,
10
);
$pdf
->
SetFont
(
'Arial'
,
'B'
,
10
);
//INITIATOR
//INITIATOR
if
(
!
empty
(
$resId
))
{
$filename_QR
=
$_SESSION
[
'config'
][
'tmppath'
]
.
DIRECTORY_SEPARATOR
.
$_SESSION
[
'user'
][
'UserId'
]
.
time
()
.
rand
()
.
"_QRCODE.png"
;
QRcode
::
png
(
$resId
,
$filename_QR
);
$pdf
->
Image
(
$filename_QR
,
7
,
3
);
}
if
(
$this
->
array_print
[
$cpt
][
'initiator'
]
<>
''
)
{
if
(
$this
->
array_print
[
$cpt
][
'initiator'
]
<>
''
)
{
$stmt
=
$db
->
query
(
$stmt
=
$db
->
query
(
"select entity_label from entities where entity_id = ?"
,
"select entity_label from entities where entity_id = ?"
,
array
(
$this
->
array_print
[
$cpt
][
'initiator'
])
array
(
$this
->
array_print
[
$cpt
][
'initiator'
])
);
);
$resultEntity
=
$stmt
->
fetchObject
();
$resultEntity
=
$stmt
->
fetchObject
();
$pdf
->
Cell
(
36
,
5
,
utf8_decode
(
_INITIATOR
.
' : '
$pdf
->
Cell
(
140
,
5
,
utf8_decode
(
_INITIATOR
.
' : '
.
$resultEntity
->
entity_label
.
" ("
.
$this
->
array_print
[
$cpt
][
'initiator'
]
.
")"
),
0
,
1
,
'
L
'
,
false
);
.
$resultEntity
->
entity_label
.
" ("
.
$this
->
array_print
[
$cpt
][
'initiator'
]
.
")"
),
0
,
1
,
'
C
'
,
false
);
}
elseif
(
$this
->
array_print
[
$cpt
][
'typist'
]
<>
''
)
{
}
elseif
(
$this
->
array_print
[
$cpt
][
'typist'
]
<>
''
)
{
require_once
"modules/entities/class/class_manage_entities.php"
;
require_once
"modules/entities/class/class_manage_entities.php"
;
$entity
=
new
entity
();
$entity
=
new
entity
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment