Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
don
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
25
Issues
25
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
Operations
Operations
Incidents
Environments
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
LQDN Adminsys
don
Commits
b365c8ca
Commit
b365c8ca
authored
Nov 19, 2018
by
Okhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cs-fix
parent
67bf68ce
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
app/controller/admin.php
app/controller/admin.php
+25
-25
No files found.
app/controller/admin.php
View file @
b365c8ca
...
...
@@ -1283,9 +1283,9 @@ class Admin extends Controller
AND d.id="
.
$transaction
);
$result
=
$stmt
->
fetch
(
\
PDO
::
FETCH_ASSOC
);
if
(
!
$result
)
{
// don non trouvé en statut 101. On le crée (la banque à raison)
// statut = cumul
$f3
->
get
(
'container'
)[
'command_handler'
]
// don non trouvé en statut 101. On le crée (la banque à raison)
// statut = cumul
$f3
->
get
(
'container'
)[
'command_handler'
]
->
handle
(
new
DonationCreateCommand
(
$user
[
'id'
],
101
,
...
...
@@ -1294,15 +1294,15 @@ class Admin extends Controller
0
,
0
));
// Et on le récupère
$cumul
=
$db
->
lastInsertId
();
$don
=
$f3
->
get
(
'container'
)[
'donation_finder'
]
->
findById
(
$cumul
);
}
else
{
$cumul
=
$result
->
fetch
(
\
PDO
::
FETCH_ASSOC
);
$cumul
=
$result
[
'id'
];
}
// On regarde si le don n'as pas déjà été ajouté (en vérifiant la datec)
$result
=
$db
->
query
(
"SELECT COUNT(1)
// Et on le récupère
$cumul
=
$db
->
lastInsertId
();
$don
=
$f3
->
get
(
'container'
)[
'donation_finder'
]
->
findById
(
$cumul
);
}
else
{
$cumul
=
$result
->
fetch
(
\
PDO
::
FETCH_ASSOC
);
$cumul
=
$result
[
'id'
];
}
// On regarde si le don n'as pas déjà été ajouté (en vérifiant la datec)
$result
=
$db
->
query
(
"SELECT COUNT(1)
FROM dons d
JOIN users u ON u.id = d.user_id
WHERE u.email='"
.
$email
.
"'
...
...
@@ -1310,12 +1310,12 @@ class Admin extends Controller
AND d.datec='"
.
$new_effect
.
"'
AND d.cumul="
.
$cumul
.
"
"
);
if
(
$result
)
{
$combien
=
$result
->
fetch
();
if
(
$combien
[
0
]
==
0
)
{
$update
++
;
// Don récurrent non comptabilisé, on l'ajoute
$query
=
"INSERT INTO dons (status,
if
(
$result
)
{
$combien
=
$result
->
fetch
();
if
(
$combien
[
0
]
==
0
)
{
$update
++
;
// Don récurrent non comptabilisé, on l'ajoute
$query
=
"INSERT INTO dons (status,
datec,
somme,
user_id,
...
...
@@ -1328,18 +1328,18 @@ class Admin extends Controller
'"
.
$user
[
'id'
]
.
"',
'"
.
$cumul
.
"',
'"
.
$identifier
.
"')"
;
if
(
!
$testing
)
{
$db
->
query
(
$query
);
// On met alors à jour le cumul et le total de l'utilisateur concerné
$result
=
$db
->
query
(
"UPDATE users
if
(
!
$testing
)
{
$db
->
query
(
$query
);
// On met alors à jour le cumul et le total de l'utilisateur concerné
$result
=
$db
->
query
(
"UPDATE users
SET cumul=cumul+"
.
$amount
.
",
total=total+"
.
$amount
.
"
WHERE id='"
.
$user
[
'id'
]
.
"'"
);
}
}
else
{
$comptabilise
[]
=
$identifier
;
}
}
else
{
$comptabilise
[]
=
$identifier
;
}
}
}
}
fclose
(
$handle
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment