Config SQL externe

This commit is contained in:
xdrm-brackets 2016-01-09 15:49:48 +01:00
parent 018fd30b20
commit bdaa863c82
13 changed files with 24 additions and 14 deletions

1
.gitignore vendored Executable file
View File

@ -0,0 +1 @@
/manager/conf*.json

View File

@ -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;

1
manager/index.php Executable file
View File

@ -0,0 +1 @@
<?php header('Location: ../index.php'); ?>

1
manager/repo/index.php Executable file
View File

@ -0,0 +1 @@
<?php header('Location: ../../index.php'); ?>

View File

@ -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'] ){

View File

@ -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>";

1
page/index.php Executable file
View File

@ -0,0 +1 @@
<?php header('Location: ../index.php'); ?>

0
src/files/admin2_export_jury.xlsx Normal file → Executable file
View File

Binary file not shown.

0
src/files/modele_import_notes.xlsx Normal file → Executable file
View File

View File

@ -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'));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 KiB

After

Width:  |  Height:  |  Size: 134 KiB

0
xdoc/git.graph Normal file → Executable file
View File