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
T
Theme-WordPress-Adullact-org
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
11
Issues
11
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Adullact
Theme-WordPress-Adullact-org
Commits
215fcb69
Commit
215fcb69
authored
Jun 03, 2019
by
N. Peraldi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add first version of mail sender
parent
2a95dde8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
5 deletions
+38
-5
twentynineteen-child/contact.php
twentynineteen-child/contact.php
+6
-0
twentynineteen-child/traitementAdhesion.php
twentynineteen-child/traitementAdhesion.php
+32
-5
No files found.
twentynineteen-child/contact.php
View file @
215fcb69
...
...
@@ -21,6 +21,8 @@ $errors = array(
$debug_mode
=
false
;
$resultat
=
false
;
function
tryToEcho
(
$var
)
{
if
(
isset
(
$_POST
[
$var
]))
{
...
...
@@ -85,6 +87,10 @@ if (isset($_POST)) {
var_dump
(
$errors
);
}
if
(
$numberOfErrors
==
0
){
sendAdhesionMail
(
$_POST
);
header
(
"Location:"
);
}
...
...
twentynineteen-child/traitementAdhesion.php
View file @
215fcb69
...
...
@@ -11,6 +11,27 @@
$debug_mode_traitement
=
false
;
function
sendAdhesionMail
(
$tab
){
//fonction utilisée pour l'envoi de mail
$message
=
"Nouvelle requête pour le formulaire d'adhésion :
\n
"
;
foreach
(
$tab
as
$key
=>
$value
){
$message
=
$message
.
$key
.
" : "
.
$value
.
"
\n
"
;
}
$message
=
wordwrap
(
$message
,
70
,
"
\r\n
"
);
if
(
mail
(
'nathan.peraldi@adullact.org'
,
"Nouvelle demande de renouvellement d'adhésion"
,
$message
)){
echo
"message envoyé"
;
$resultat
=
true
;
}
}
function
verifEPCI
(
$tab
,
$errors
)
{
...
...
@@ -41,9 +62,15 @@ function verifEPCI($tab, $errors)
$errors
[
"EPCI hab"
]
=
"Vous devez entrer un nombre."
;
}
}
else
{
$errors
[
"EPCI hab"
]
=
"Vous devez entrer un nombre."
;
}
}
else
{
$errors
[
"EPCI hab"
]
=
"Vous devez entrer un nombre."
;
}
$errors
[
"EPCI hab"
]
=
"Vous devez entrer un nombre."
;
return
$errors
;
}
...
...
@@ -221,7 +248,7 @@ function verifSiret($tab)
{
global
$debug_mode_traitement
;
if
(
$debug_mode_traitement
)
{
if
(
$debug_mode_traitement
)
{
echo
"<br> on vérifie le siret <br> "
;
}
...
...
@@ -361,7 +388,7 @@ function traitement($tab, $errors)
{
global
$debug_mode_traitement
;
if
(
$debug_mode_traitement
)
{
if
(
$debug_mode_traitement
)
{
echo
"début du traitement "
;
}
...
...
@@ -369,7 +396,7 @@ function traitement($tab, $errors)
//le résultat du premier select
if
(
verifFirstSelection
(
$tab
))
{
if
(
$debug_mode_traitement
)
{
if
(
$debug_mode_traitement
)
{
echo
"<br> le first select est OK <br>"
;
}
...
...
@@ -389,7 +416,7 @@ function traitement($tab, $errors)
}
if
(
$debug_mode_traitement
)
{
if
(
$debug_mode_traitement
)
{
echo
"errors : <br>"
;
var_dump
(
$errors
);
}
...
...
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