Skip to content
Snippets Groups Projects
Commit d9e850e1 authored by nicrausaz's avatar nicrausaz
Browse files

save guest sciper

parent f7c46b24
No related branches found
No related tags found
No related merge requests found
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
// write in DB // write in DB
insertDataIntoDB($pdo, $candidateData); insertDataIntoDB($pdo, $candidateData);
// Send mails // Send mails
// mailToResp($candidateData->prenomApprenti, $candidateData->nomApprenti, $candidateData->formation); // mailToResp($candidateData->prenomApprenti, $candidateData->nomApprenti, $candidateData->formation);
......
...@@ -7,8 +7,9 @@ ...@@ -7,8 +7,9 @@
$oClient->SetAllowsFilter('categorie=epfl-guests'); $oClient->SetAllowsFilter('categorie=epfl-guests');
$oClient->Authenticate(); $oClient->Authenticate();
$user = $oClient->getValue('user'); $user = $oClient->getValue('user');
$firstname= $oClient->getValue('firstname'); $firstname = $oClient->getValue('firstname');
$name= $oClient->getValue('name'); $name = $oClient->getValue('name');
$guest_sciper = $oClient->getValue('uniqueid');
$sKey = $oClient->GetKey(); $sKey = $oClient->GetKey();
include('templates/isPostulationOpen.php'); include('templates/isPostulationOpen.php');
...@@ -99,6 +100,9 @@ ...@@ -99,6 +100,9 @@
<option value="Homme" <?php echo ($_SESSION['postedForm']['genreApp'] == "Homme") ? "selected" : ''; ?>>Homme</option> <option value="Homme" <?php echo ($_SESSION['postedForm']['genreApp'] == "Homme") ? "selected" : ''; ?>>Homme</option>
<option value="Femme" <?php echo ($_SESSION['postedForm']['genreApp'] == "Femme") ? "selected" : ''; ?>>Femme</option> <option value="Femme" <?php echo ($_SESSION['postedForm']['genreApp'] == "Femme") ? "selected" : ''; ?>>Femme</option>
</select> </select>
<input type="text" name="guestSciper" class="form-control" placeholder="Prénom" value="<?php echo $guest_sciper;?>" readonly hidden />
<label for="nameApp">Nom *</label> <label for="nameApp">Nom *</label>
<input type="text" name="nameApp" id="nameApp" class="form-control" placeholder="Nom" value="<?php echo $name;?>" readonly /> <input type="text" name="nameApp" id="nameApp" class="form-control" placeholder="Nom" value="<?php echo $name;?>" readonly />
...@@ -137,7 +141,7 @@ ...@@ -137,7 +141,7 @@
<input type="text" name="langApp" id="langApp" placeholder="Langue maternelle" class="form-control" value="<?php echo $_SESSION['postedForm']['langApp'] != '' ? $_SESSION['postedForm']['langApp'] : ''; ?>" minlength="2" maxlength="20" data-required /> <input type="text" name="langApp" id="langApp" placeholder="Langue maternelle" class="form-control" value="<?php echo $_SESSION['postedForm']['langApp'] != '' ? $_SESSION['postedForm']['langApp'] : ''; ?>" minlength="2" maxlength="20" data-required />
<label for="avsNumber">Numéro AVS*</label> <label for="avsNumber">Numéro AVS*</label>
<input type="text" name="avsNumber" id="avsNumber" placeholder="Numéro AVS *" class="form-control" value="<?php echo $_SESSION['postedForm']['avsNumber'] != '' ? $_SESSION['postedForm']['avsNumber'] : ''; ?>" minlength="2" maxlength="20" data-required /> <input type="text" name="avsNumber" id="avsNumber" placeholder="Numéro AVS" class="form-control" value="<?php echo $_SESSION['postedForm']['avsNumber'] != '' ? $_SESSION['postedForm']['avsNumber'] : ''; ?>" minlength="2" maxlength="20" data-required />
<div class="form-group"> <div class="form-group">
<label>Connaissances linguistiques *</label> <label>Connaissances linguistiques *</label>
......
...@@ -76,10 +76,11 @@ function insertDataIntoDB ($pdo, $candidateData) { ...@@ -76,10 +76,11 @@ function insertDataIntoDB ($pdo, $candidateData) {
function insertPersonalInfos ($pdo, $candidateData) { function insertPersonalInfos ($pdo, $candidateData) {
$sqlreq = "INSERT INTO applicant $sqlreq = "INSERT INTO applicant
(applicant_formation, applicant_it_section, applicant_formation_location, applicant_maturity, applicant_gender, applicant_name, applicant_fsname, applicant_address_street, applicant_address_npa, applicant_home_phone, applicant_personal_phone, applicant_mail, applicant_birthdate, applicant_origin, applicant_nationality, applicant_foreign_authorization, applicant_avs, applicant_main_language, applicant_speaks_french, applicant_speaks_german, applicant_speaks_english, applicant_speaks_other, applicant_has_majority, applicant_scolarity_end, applicant_already_applicant, applicant_already_applicant_year, applicant_application_date, applicant_application_status, fk_applicant_main_responsible, fk_applicant_sec_responsible) (applicant_guest_sciper, applicant_formation, applicant_it_section, applicant_formation_location, applicant_maturity, applicant_gender, applicant_name, applicant_fsname, applicant_address_street, applicant_address_npa, applicant_home_phone, applicant_personal_phone, applicant_mail, applicant_birthdate, applicant_origin, applicant_nationality, applicant_foreign_authorization, applicant_avs, applicant_main_language, applicant_speaks_french, applicant_speaks_german, applicant_speaks_english, applicant_speaks_other, applicant_has_majority, applicant_scolarity_end, applicant_already_applicant, applicant_already_applicant_year, applicant_application_date, applicant_application_status, fk_applicant_main_responsible, fk_applicant_sec_responsible)
VALUES (:applicant_formation, :applicant_it_section, :applicant_formation_location, :applicant_maturity, :applicant_gender, :applicant_name, :applicant_fsname, :applicant_address_street, :applicant_address_npa, :applicant_home_phone, :applicant_personal_phone, :applicant_mail, :applicant_birthdate, :applicant_origin, :applicant_nationality, :applicant_foreign_authorization, :applicant_avs, :applicant_main_language, :applicant_speaks_french, :applicant_speaks_german, :applicant_speaks_english, :applicant_speaks_other, :applicant_has_majority, :applicant_scolarity_end, :applicant_already_applicant, :applicant_already_applicant_year, NOW(), 'new', null, null)"; VALUES (:applicant_guest_sciper, :applicant_formation, :applicant_it_section, :applicant_formation_location, :applicant_maturity, :applicant_gender, :applicant_name, :applicant_fsname, :applicant_address_street, :applicant_address_npa, :applicant_home_phone, :applicant_personal_phone, :applicant_mail, :applicant_birthdate, :applicant_origin, :applicant_nationality, :applicant_foreign_authorization, :applicant_avs, :applicant_main_language, :applicant_speaks_french, :applicant_speaks_german, :applicant_speaks_english, :applicant_speaks_other, :applicant_has_majority, :applicant_scolarity_end, :applicant_already_applicant, :applicant_already_applicant_year, NOW(), 'new', null, null)";
$query = $pdo->prepare($sqlreq); $query = $pdo->prepare($sqlreq);
$query->bindParam(':applicant_guest_sciper', $candidateData->guest_sciper, PDO::PARAM_STR);
$query->bindParam(':applicant_formation', $candidateData->formation, PDO::PARAM_STR); $query->bindParam(':applicant_formation', $candidateData->formation, PDO::PARAM_STR);
$query->bindParam(':applicant_it_section', $candidateData->filiere, PDO::PARAM_STR); $query->bindParam(':applicant_it_section', $candidateData->filiere, PDO::PARAM_STR);
$query->bindParam(':applicant_formation_location', $candidateData->lieu, PDO::PARAM_STR); $query->bindParam(':applicant_formation_location', $candidateData->lieu, PDO::PARAM_STR);
......
...@@ -18,6 +18,7 @@ class PersonnalData { ...@@ -18,6 +18,7 @@ class PersonnalData {
); );
private $dateNow; private $dateNow;
public $rootpath = 'D:/formdata/'; // \\\\scxdata\\apprentis$\\candidatures\\nouvelles\\ public $rootpath = 'D:/formdata/'; // \\\\scxdata\\apprentis$\\candidatures\\nouvelles\\
public $guest_sciper = "";
public $formation = ""; public $formation = "";
public $lieu = ""; public $lieu = "";
public $filiere = ""; public $filiere = "";
...@@ -52,6 +53,7 @@ class PersonnalData { ...@@ -52,6 +53,7 @@ class PersonnalData {
$this->dateNow = date('Y-m-d_H-i-s'); $this->dateNow = date('Y-m-d_H-i-s');
// Rempli les infos // Rempli les infos
$this->postedData = $postedData; $this->postedData = $postedData;
$this->guest_sciper = $postedData['guestSciper'];
$this->formation = $postedData['job']; $this->formation = $postedData['job'];
$this->lieu = $postedData['lieu']; $this->lieu = $postedData['lieu'];
if($this->formation =="informaticien"){ if($this->formation =="informaticien"){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment