Config SQL externe
This commit is contained in:
parent
018fd30b20
commit
bdaa863c82
|
@ -0,0 +1 @@
|
|||
/manager/conf*.json
|
|
@ -38,12 +38,11 @@ class DataBase{
|
|||
/* retourne une instance de la classe */
|
||||
public static function getInstance(){
|
||||
if( DataBase::$instance == null ){
|
||||
if( $_SERVER['HTTP_HOST'] == 'sid' ) // si co en local (xdrm)
|
||||
DataBase::$instance = new DataBase("localhost", "sid2", "php", "Qt358nUdyeTxLDM8");
|
||||
else if( $_SERVER['HTTP_HOST'] == 'localhost' ) // si co en local (autres)
|
||||
DataBase::$instance = new DataBase("localhost", "sid2", "root", "");
|
||||
else // si co en ligne
|
||||
DataBase::$instance = new DataBase("mysql.hostinger.fr", "u712664263_sid", "u712664263_php", "Qt358nUdyeTxLDM8");
|
||||
|
||||
// chargement de la configuration du server SQL
|
||||
$conf = json_decode(file_get_contents(__ROOT__.'/manager/conf.json'), true);
|
||||
DataBase::$instance = new DataBase($conf['host'], $conf['dbname'], $conf['user'], $conf['password']);
|
||||
|
||||
}
|
||||
|
||||
return DataBase::$instance;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<?php header('Location: ../index.php'); ?>
|
|
@ -0,0 +1 @@
|
|||
<?php header('Location: ../../index.php'); ?>
|
|
@ -1118,6 +1118,8 @@ if( (permission('master') || permission('admin')) && $etudiantOpt != null ){
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
echo "<section name='studentcase' data-title='Dossier étudiant' class='basic'>";
|
||||
|
||||
|
||||
|
||||
// on récupère $semestreOpt original
|
||||
$semestreOpt = $semestreOptBis;
|
||||
|
||||
|
@ -1149,6 +1151,9 @@ if( (permission('master') || permission('admin')) && $etudiantOpt != null ){
|
|||
/* ON GENERE LE <SVG> DU PARCOURS */
|
||||
displayParcours( $parcoursChart, $semestreOpt);
|
||||
|
||||
// echo "<br><div data-etu='".$etudiantOpt."' class='confirm active center' style='background-color:#fff'>Importer le dossier<input type='file' id='import_dossier'></div>";
|
||||
|
||||
|
||||
// pour chaque semestres (tous si aucun semestreOpt, sinon uniquement le selectionné)
|
||||
foreach($answer->parcours as $semestre){ if( $semestreOpt == null || $semestreOpt == $semestre['id'] ){
|
||||
|
||||
|
|
|
@ -693,7 +693,6 @@ if( permission('master') || permission('admin') ){
|
|||
echo "<option value='2'>2</option>";
|
||||
echo "</select><br>";
|
||||
|
||||
// echo "<div data-year='".$anneeOpt."' class='confirm active center'>Importer une liste</div>";
|
||||
echo "<div data-year='".$anneeOpt."' class='confirm active center'>Importer une liste<input type='file' id='import_inscrits'></div>";
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
<?php header('Location: ../index.php'); ?>
|
Binary file not shown.
17
test.php
17
test.php
|
@ -53,15 +53,18 @@ debug();
|
|||
|
||||
// 35 = UE1,
|
||||
// on veut que l'ue d'id 35 compte pour le semestre 252 et que les semestres de même rang et formation soient ignorés
|
||||
$request = new stdClass; $answer = new stdClass;
|
||||
$request->level_1 = 'capitaliser';
|
||||
$request->ue = 37;
|
||||
$request->semestre = 276;
|
||||
$request->etudiant = 'Etud100';
|
||||
/*******************************************************/
|
||||
// $request = new stdClass; $answer = new stdClass;
|
||||
// $request->level_1 = 'capitaliser';
|
||||
// $request->ue = 37;
|
||||
// $request->semestre = 276;
|
||||
// $request->etudiant = 'Etud100';
|
||||
|
||||
careerManager::switch_level_1($request, $answer);
|
||||
var_dump( $answer );
|
||||
// careerManager::switch_level_1($request, $answer);
|
||||
// var_dump( $answer );
|
||||
/*******************************************************/
|
||||
|
||||
var_dump( $_SERVER['HTTP_HOST'] );
|
||||
// $ts = time();
|
||||
// $date1 = date('Y-m-d', $ts);
|
||||
// $date2 = date('Y-m-d', strtotime($date1.' - 1 year'));
|
||||
|
|
BIN
xdoc/MCD.png
BIN
xdoc/MCD.png
Binary file not shown.
Before Width: | Height: | Size: 594 KiB After Width: | Height: | Size: 134 KiB |
Loading…
Reference in New Issue