Skip to content
Snippets Groups Projects
Commit 229c75f8 authored by Leonardo Alain Surdez's avatar Leonardo Alain Surdez
Browse files

Merge branch 'migration/form' into 'master'

[Feat] Form is now 12 factored

See merge request !8
parents edda0af8 01ef186b
No related branches found
No related tags found
1 merge request!8[Feat] Form is now 12 factored
......@@ -2,13 +2,10 @@
require_once('configs/config.php');
$pdo = new PDO('mysql:host=' . $CONFIG[ENVIRONMENT]['DB_HOST'] . ';port=' . $CONFIG[ENVIRONMENT]['DB_PORT'] . ';dbname=' . $CONFIG[ENVIRONMENT]['DB_NAME'] . '', $CONFIG[ENVIRONMENT]['DB_USER'], $CONFIG[ENVIRONMENT]['DB_PASS'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
$pdo = new PDO('mysql:host=' . $_ENV['DB_HOST'] . ';port=' . $_ENV['DB_PORT'] . ';dbname=' . $_ENV['DB_DATABASE'] . '', $_ENV['DB_USERNAME'], $_ENV['DB_PASSWORD'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
$pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
// for development
if ($CONFIG[ENVIRONMENT] !== 'prod') {
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
include('models/DBController.php');
$DBController = new DBController($pdo);
......
......@@ -21,6 +21,10 @@ class PersonnalData {
public $nationaliteApprenti = "";
public $permisEtranger = "";
public $numeroAVS = "";
public $speaksFrench = 0;
public $speaksGerman = 0;
public $speaksEnglish = 0;
public $speaksOther = 0;
public $langueMaternelleApprenti = "";
public $majeur = 0;
public $representants = [];
......
......@@ -223,6 +223,9 @@ class TequilaClient{
IN : $sSessionsDirectory -> (optional) The directory where to save sessions files
IN : $iTimeout -> (optional) Session timeout
*/
private $iCookieLife;
private $sCookieName;
function __construct($sServer = '', $iTimeout = NULL) {
$this->stderr = fopen ('php://stderr', 'w');
......
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