Bonjour,
Ca fait 3jours que je bute sur cette erreur, je ne comprend pas d'ou elle provient.
J'ai vérifié tous les { }, ( ), ", ', [ ] mais je n'ai pas trouvé d'erreur.
Je vous montre le code mais bon, 1388 ligne, ca fait beaucoup…
Merci pour tous !
<?php
require_once ( '../Connections/tracking3.php' );
require_once ( 'Mobile_Detect.php' );
$detect = new Mobile_Detect ();
session_start ();
require_once ( "../phpls_include.php" );
if (! isset ( $_SESSION [ 'levelsession' ])) { ?>
< script type= "text/javascript" >
window. location. href = "../" ;
</ script> <?php
} else {
if ( $_SESSION [ 'levelsession' ] < 100 ) {
?>
< script type= "text/javascript" >
alert ( "Pour accéder à l'ensemble de la plateforme, contactez-nous <?php echo $domainEmail; ?>." );
window. location. href = "logout.php" ;
</ script> <?php
}
}
if (! function_exists ( "GetSQLValueString" )) {
function GetSQLValueString ( $theValue , $theType , $theDefinedValue = "" , $theNotDefinedValue = "" )
{
if ( PHP_VERSION < 6 ) {
$theValue = get_magic_quotes_gpc () ? stripslashes ( $theValue ) : $theValue ;
}
$theValue = function_exists ( "mysql_real_escape_string" ) ? mysql_real_escape_string ( $theValue ) : mysql_escape_string ( $theValue );
switch ( $theType ) {
case "text" :
$theValue = ( $theValue != "" ) ? "'" . $theValue . "'" : "NULL" ;
break ;
case "long" :
case "int" :
$theValue = ( $theValue != "" ) ? intval ( $theValue ) : "NULL" ;
break ;
case "double" :
$theValue = ( $theValue != "" ) ? doubleval ( $theValue ) : "NULL" ;
break ;
case "date" :
$theValue = ( $theValue != "" ) ? "'" . $theValue . "'" : "NULL" ;
break ;
case "defined" :
$theValue = ( $theValue != "" ) ? $theDefinedValue : $theNotDefinedValue ;
break ;
}
return $theValue ;
}
}
$maxRows_Recordset1 = 5 ;
$pageNum_Recordset1 = 0 ;
if ( isset ( $_GET [ 'pageNum_Recordset1' ])) {
$pageNum_Recordset1 = $_GET [ 'pageNum_Recordset1' ];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1 ;
$colname_Recordset1 = "0" ;
if ( isset ( $_SESSION [ 'usersession' ])) {
$colname_Recordset1 = $_SESSION [ 'usersession' ];
}
mysqli_select_db ( $tracking2 , $database_tracking2 );
$query_Recordset1 = sprintf ( "SELECT signid, 'userid', `First`, `Last`, adminid, TimeStamp AS TimeStamp,
TimeStampOut AS TimeStampOut, TIMEDIFF (TimeStampOut, TimeStamp) AS TimeOnSite FROM signin, userid WHERE LoginUser = '%s' AND userid.UserID=signin.userid ORDER BY signid DESC LIMIT 5" , $colname_Recordset1 );
$Recordset1 = mysqli_query ( $tracking2 , $query_Recordset1 ) or die ( mysqli_error ());
$row_Recordset1 = mysqli_fetch_array ( $Recordset1 );
$totalRows_Recordset1 = mysqli_num_rows ( $Recordset1 );
$varSearch_rsUserDetails = "0" ;
if ( isset ( $_SESSION [ 'usersession' ])) {
$varSearch_rsUserDetails = ( get_magic_quotes_gpc ()) ? $_SESSION [ 'usersession' ] : addslashes ( $_SESSION [ 'usersession' ]);
}
mysqli_select_db ( $tracking2 , $database_tracking2 );
$query_rsUserDetails = sprintf ( "SELECT *, adminImg FROM userid, admin WHERE LoginUser = '%s' AND userid.AdminLoginUser=admin.AdminID" , $varSearch_rsUserDetails );
$rsUserDetails = mysqli_query ( $tracking2 , $query_rsUserDetails ) or die ( mysqli_error ());
$row_rsUserDetails = mysqli_fetch_array ( $rsUserDetails );
$colname_Recordset2 = "0" ;
if ( isset ( $_SESSION [ 'usersession' ])) {
$colname_Recordset2 = $_SESSION [ 'usersession' ];
}
mysqli_select_db ( $tracking2 , $database_tracking2 );
$query_Recordset2 = sprintf ( "SELECT LessonScoreID, LessonName, LessonDescription, LessonLink, LessonShortName, LessonImg FROM userid, scores, lessoninfo WHERE LoginUser = '%s' AND userid.UserID=scores.UserScoreID AND scores.LessonScoreID=lessoninfo.LessonID ORDER BY TimeStampScore DESC" , $colname_Recordset2 );
$Recordset2 = mysqli_query ( $tracking2 , $query_Recordset2 ) or die ( mysqli_error ());
$row_Recordset2 = mysqli_fetch_array ( $Recordset2 );
$lastLessonid = $row_Recordset2 [ 'LessonScoreID' ];
$lastLessonShortName = $row_Recordset2 [ 'LessonShortName' ];
$lastLessonName = $row_Recordset2 [ 'LessonName' ];
$lastLessonDescription = $row_Recordset2 [ 'LessonDescription' ];
$lastLessonLink = $row_Recordset2 [ 'LessonLink' ];
$lastLessonImg = $row_Recordset2 [ 'LessonImg' ];
$varSearch_Recordset3 = "0" ;
if ( isset ( $_SESSION [ 'usersession' ])) {
$varSearch_Recordset3 = ( get_magic_quotes_gpc ()) ? $_SESSION [ 'usersession' ] : addslashes ( $_SESSION [ 'usersession' ]);
}
mysqli_select_db ( $tracking2 , $database_tracking2 );
$query_Recordset3 = sprintf ( "SELECT ResultScore FROM userid, scores WHERE LoginUser = '%s' AND userid.UserID=scores.UserScoreID AND scores.LessonScoreID = 7002 ORDER BY TimeStampScore DESC LIMIT 25" , $varSearch_Recordset3 );
$Recordset3 = mysqli_query ( $tracking2 , $query_Recordset3 ) or die ( mysqli_error ());
$countLevelTestScore = 0 ;
$didLevelTest = false;
while ( $row_Recordset3 = mysqli_fetch_array ( $Recordset3 )) {
$didLevelTest = true;
if ( $row_Recordset3 [ 'ResultScore' ]== 1 ) { $countLevelTestScore ++; }
}
if ( $didLevelTest == false) {
?>
< script type= "text/javascript" >
window. location. href = "LevelTest/LevelSplash.php" ;
</ script> <?php
} else if ( true == in_array ( $countLevelTestScore , range ( 0 , 3 ))) {
$studentLevel = 'A1 Novice' ;
$studentLevelS = 'A1' ;
} else if ( true == in_array ( $countLevelTestScore , range ( 4 , 7 ))) {
$studentLevel = 'A1 Débutant' ;
$studentLevelS = 'A1' ;
} else if ( true == in_array ( $countLevelTestScore , range ( 8 , 11 ))) {
$studentLevel = 'A2 Faux débutant' ;
$studentLevelS = 'A2' ;
} else if ( true == in_array ( $countLevelTestScore , range ( 12 , 16 ))) {
$studentLevel = 'B1 Intermediaire' ;
$studentLevelS = 'B1' ;
} else if ( true == in_array ( $countLevelTestScore , range ( 17 , 21 ))) {
$studentLevel = 'B2 Avancé' ;
$studentLevelS = 'B2' ;
} else if ( true == in_array ( $countLevelTestScore , range ( 22 , 25 ))) {
$studentLevel = 'C1 Expert' ;
$studentLevelS = 'C1' ; }
$_SESSION [ 'LTlevel' ] = $studentLevelS ;
$userId = $row_rsUserDetails [ 'UserID' ];
$query_Obj = sprintf ( "SELECT QuestionID FROM scores WHERE UserScoreID = '%s'
AND LessonScoreID = 9001 ORDER BY QuestionID DESC" , $userId );
$R_obj = mysqli_query ( $tracking2 , $query_Obj ) or die ( mysqli_error ());
$row_obj = mysqli_fetch_array ( $R_obj );
if ( isset ( $row_obj [ 'QuestionID' ]) && $row_obj [ 'QuestionID' ]< 15 ) {
$objNum = $row_obj [ 'QuestionID' ]+ 1 ;
?>
< script type= "text/javascript" >
var objnum = <?php json_encode ( $objNum ); ?>
window. location. href = "LevelTest/ObjFrench/O<?php echo $objNum; ?>.php" ;
</ script> <?
} elseif (! isset ( $row_obj [ 'QuestionID' ])) {
?>
< script type= "text/javascript" >
window. location. href = "LevelTest/ObjFrench" ;
</ script> <?
}
$query_q9 = sprintf ( "SELECT ResultScore, StudentAnswer, QuestionID FROM scores WHERE UserScoreID = '%s'
AND LessonScoreID = 9201 ORDER BY QuestionID ASC" , $userId );
$R_q9 = mysqli_query ( $tracking2 , $query_q9 ) or die ( mysqli_error ());
while ( $row_q9 = mysqli_fetch_array ( $R_q9 )) {
switch ( $row_q9 [ 'QuestionID' ]) {
case 5 :
$ansQ95 = explode ( "/" , $row_q9 [ 'StudentAnswer' ]);
for ( $i = 0 ; $i < count ( $ansQ95 ); $i ++) {
if ( $ansQ95 [ $i ]== "Appel" ) {
$link9 = 6 ; break ;
} else { $link9 = 7 ; }
}
break ;
case 1 :
case 2 :
case 3 :
case 4 :
case 6 :
case 8 :
$link9 = $row_q9 [ 'QuestionID' ]+ 1 ;
break ;
case 7 :
$ansQ95 = explode ( "/" , $row_q9 [ 'StudentAnswer' ]);
for ( $i = 0 ; $i < count ( $ansQ95 ); $i ++) {
if ( $ansQ95 [ $i ]== "Telephone" || $ansQ95 [ $i ]== "Visio" ) {
$link9 = 8 ;
break ;
} else { $link9 = 9 ; }
}
break ;
case 9 :
$link9 = 10 ;
}
}
if (! isset ( $link9 )) {
?>
< script type= "text/javascript" >
window. location. href = "LevelTest/ObjPbs/" ;
</ script> <?
} elseif ( $link9 < 10 ) {
?>
< script type= "text/javascript" >
window. location. href = "LevelTest/ObjPbs/O<? echo $link9; ?>.php" ;
</ script> <?
}
$totalAnswered = $totalQuestions ;
$totalIncorrectA = $totalAnswered - $totalCorrectA ;
require_once ( "nextL.php" );
$completedLessons = $lessonNBC [ 3 ] + $lessonNEC [ 3 ] + $lessonNIC [ 3 ] + $lessonNAC [ 3 ] + $lessonNVC [ 3 ] + $lessonNGC [ 3 ];
$startedLessons = $lessonNBC [ 2 ] + $lessonNEC [ 2 ] + $lessonNIC [ 2 ] + $lessonNAC [ 2 ] + $lessonNVC [ 2 ] + $lessonNGC [ 2 ];
$notcompletedLessons = $lessonNBC [ 1 ] + $lessonNEC [ 1 ] + $lessonNIC [ 1 ] + $lessonNAC [ 1 ] + $lessonNVC [ 1 ] + $lessonNGC [ 1 ];
require_once ( "nextL2.php" );
require_once ( "lessonname.php" );
require_once ( "lessonlist.php" );
$profileImg = $row_rsUserDetails [ 'profileImg' ];
if ( empty ( $profileImg )) {
$profileImg = 'img/profile.png' ;
}
$logo = $row_rsUserDetails [ 'adminImg' ];
if ( empty ( $logo )) {
$logo = 'img/logos/logo.png' ;
}
$colorm = 'bg-cBlue' ;
$colormP = 'bg-white shadow text-dark' ;
$colormL = '' ;
$liactive = 'overview' ;
$liactive1 = '' ;
$recoLesson = explode ( "||" , $ListLesson );
$lessonsLinkCheck = explode ( "/" , $recoLesson [ 3 ]);
switch ( $lessonsLinkCheck [ 0 ]) {
case 'LeconsN1a1' :
$seeAllLessons = 'lessonsBeg.php' ;
$NumberLessonRecommended = 1000 ;
if (! isset ( $nextLesson )) {
$nextLesson = 'LeconsN1a1/Lesson1' ;
$nextLessonTitle = 'Beginner 1' ;
}
break ;
case 'LeconsN1a' :
$seeAllLessons = 'lessonsEle.php' ;
$NumberLessonRecommended = 2000 ;
if (! isset ( $nextLesson )) {
$nextLesson = 'LeconsN1a1/Lesson1' ;
$nextLessonTitle = 'Elementary 1' ;
}
break ;
case 'LeconsN1b' :
$seeAllLessons = 'lessonsInt.php' ;
$NumberLessonRecommended = 3000 ;
if (! isset ( $nextLesson )) {
$nextLesson = 'LeconsN1a1/Lesson1' ;
$nextLessonTitle = 'Intermediate 1' ;
}
break ;
case 'LeconsN1c' :
$seeAllLessons = 'lessonsAdv.php' ;
$NumberLessonRecommended = 5000 ;
if (! isset ( $nextLesson )) {
$nextLesson = 'LeconsN1a1/Lesson1' ;
$nextLessonTitle = 'Advanced 1' ;
}
break ;
}
$recoVoc = explode ( "||" , $ListVoc );
$recoGra = explode ( "||" , $ListGra );
$recoWar = explode ( "||" , $ListWar );
if ( $recoLesson [ 4 ] == 'Started' ) {
switch ( $lessonsLinkCheck [ 0 ]) {
case 'LeconsN1a1' :
case 'LeconsN1a' :
$idLessonRecommended = explode ( " " , $recoLesson [ 1 ]);
$idGrammarLessonRecommended = $NumberLessonRecommended + $idLessonRecommended [ 2 ];
$idGrammarLessonRecommended2 = $NumberLessonRecommended + $idLessonRecommended [ 2 ]+ 100 ;
mysqli_select_db ( $tracking2 , $database_tracking2 );
$query_StartedLinkRecoLesson = sprintf ( "SELECT ScoreID, LessonScoreID, QuestionID, ResultScore, StudentAnswer FROM scores WHERE UserScoreID = '$useridnum' AND LessonScoreID = '$idGrammarLessonRecommended' " );
$StartedLinkRecoLesson = mysqli_query ( $tracking2 , $query_StartedLinkRecoLesson ) or die ( mysqli_error ());
while ( $row_StartedLinkRecoLesson = mysqli_fetch_array ( $StartedLinkRecoLesson )) {
$StartedQuestionID = $row_StartedLinkRecoLesson [ 'QuestionID' ];
}
$query_StartedLinkRecoLesson2 = sprintf ( "SELECT ScoreID, LessonScoreID, QuestionID, ResultScore, StudentAnswer FROM scores WHERE UserScoreID = '$useridnum' AND LessonScoreID = '$idGrammarLessonRecommended2' " );
$StartedLinkRecoLesson2 = mysqli_query ( $tracking2 , $query_StartedLinkRecoLesson2 ) or die ( mysqli_error ());
while ( $row_StartedLinkRecoLesson2 = mysqli_fetch_array ( $StartedLinkRecoLesson2 )) {
$StartedQuestionID2 = $row_StartedLinkRecoLesson2 [ 'QuestionID' ];
}
if ( isset ( $StartedQuestionID2 )) {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID2 +26 ). ".php" ;
} elseif ( $StartedQuestionID < 4 ) {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID +20 ). ".php" ;
} else {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID +20 ). ".php" ;
}
break ;
case 'LeconsN1b' :
$idLessonRecommended = explode ( " " , $recoLesson [ 1 ]);
$idGrammarLessonRecommended = $NumberLessonRecommended + $idLessonRecommended [ 2 ];
$idGrammarLessonRecommended2 = $NumberLessonRecommended + $idLessonRecommended [ 2 ]+ 100 ;
mysqli_select_db ( $tracking2 , $database_tracking2 );
$query_StartedLinkRecoLesson = sprintf ( "SELECT ScoreID, LessonScoreID, QuestionID, ResultScore, StudentAnswer FROM scores WHERE UserScoreID = '$useridnum' AND LessonScoreID = '$idGrammarLessonRecommended' " );
$StartedLinkRecoLesson = mysqli_query ( $tracking2 , $query_StartedLinkRecoLesson ) or die ( mysqli_error ());
while ( $row_StartedLinkRecoLesson = mysqli_fetch_array ( $StartedLinkRecoLesson )) {
$StartedQuestionID = $row_StartedLinkRecoLesson [ 'QuestionID' ];
}
$query_StartedLinkRecoLesson2 = sprintf ( "SELECT ScoreID, LessonScoreID, QuestionID, ResultScore, StudentAnswer FROM scores WHERE UserScoreID = '$useridnum' AND LessonScoreID = '$idGrammarLessonRecommended2' " );
$StartedLinkRecoLesson2 = mysqli_query ( $tracking2 , $query_StartedLinkRecoLesson2 ) or die ( mysqli_error ());
while ( $row_StartedLinkRecoLesson2 = mysqli_fetch_array ( $StartedLinkRecoLesson2 )) {
$StartedQuestionID2 = $row_StartedLinkRecoLesson2 [ 'QuestionID' ];
}
if ( isset ( $StartedQuestionID2 )) {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID2 +26 ). ".php" ;
} elseif ( $StartedQuestionID < 4 ) {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID +20 ). ".php" ;
} else {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID +20 ). ".php" ;
}
break ;
case 'LeconsN1c' :
$idLessonRecommended = explode ( " " , $recoLesson [ 1 ]);
$idGrammarLessonRecommended = $NumberLessonRecommended + $idLessonRecommended [ 2 ];
$idGrammarLessonRecommended2 = $NumberLessonRecommended + $idLessonRecommended [ 2 ]+ 100 ;
mysqli_select_db ( $tracking2 , $database_tracking2 );
$query_StartedLinkRecoLesson = sprintf ( "SELECT ScoreID, LessonScoreID, QuestionID, ResultScore, StudentAnswer FROM scores WHERE UserScoreID = '$useridnum' AND LessonScoreID = '$idGrammarLessonRecommended' " );
$StartedLinkRecoLesson = mysqli_query ( $tracking2 , $query_StartedLinkRecoLesson ) or die ( mysqli_error ());
while ( $row_StartedLinkRecoLesson = mysqli_fetch_array ( $StartedLinkRecoLesson )) {
$StartedQuestionID = $row_StartedLinkRecoLesson [ 'QuestionID' ];
}
$query_StartedLinkRecoLesson2 = sprintf ( "SELECT ScoreID, LessonScoreID, QuestionID, ResultScore, StudentAnswer FROM scores WHERE UserScoreID = '$useridnum' AND LessonScoreID = '$idGrammarLessonRecommended2' " );
$StartedLinkRecoLesson2 = mysqli_query ( $tracking2 , $query_StartedLinkRecoLesson2 ) or die ( mysqli_error ());
while ( $row_StartedLinkRecoLesson2 = mysqli_fetch_array ( $StartedLinkRecoLesson2 )) {
$StartedQuestionID2 = $row_StartedLinkRecoLesson2 [ 'QuestionID' ];
}
if ( isset ( $StartedQuestionID2 )) {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID2 +26 ). ".php" ;
} elseif ( $StartedQuestionID <= 4 ) {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID +12 ). ".php" ;
} elseif ( $StartedQuestionID > 4 AND $StartedQuestionID < 8 ) {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID +14 ). ".php" ;
} else {
$recoLesson [ 3 ] = $recoLesson [ 3 ]. "/T" .( $StartedQuestionID +16 ). ".php" ;
}
break ;
}
}
require_once ( "enableLevelsN.php" );
$lessonEnableCheck = explode ( " " , $recoLesson [ 1 ]);
switch ( $lessonEnableCheck [ 0 ]) {
case "Beginner" :
if ( $lessonEnableCheck [ 2 ]== 6 && $nextSessionTestName == 'Beg1' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Beginner" ;
$recoLesson [ 0 ] = "Session test 1" ;
} elseif ( $lessonEnableCheck [ 2 ]== 11 && $nextSessionTestName == 'Beg2' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Beginner" ;
$recoLesson [ 0 ] = "Session test 2" ;
}
break ;
case "Elementary" :
if ( $lessonEnableCheck [ 2 ]== 1 && $nextSessionTestName == 'Beg3' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Beginner" ;
$recoLesson [ 0 ] = "Session test 3" ;
} elseif ( $lessonEnableCheck [ 2 ]== 6 && $nextSessionTestName == 'Ele1' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Elementary" ;
$recoLesson [ 0 ] = "Session test 1" ;
} elseif ( $lessonEnableCheck [ 2 ]== 11 && $nextSessionTestName == 'Ele2' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Elementary" ;
$recoLesson [ 0 ] = "Session test 2" ;
}
break ;
case "Intermediate" :
if ( $lessonEnableCheck [ 2 ]== 1 && $nextSessionTestName == 'Ele3' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Elementary" ;
$recoLesson [ 0 ] = "Session test 3" ;
} elseif ( $lessonEnableCheck [ 2 ]== 6 && $nextSessionTestName == 'Int1' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Intermediate" ;
$recoLesson [ 0 ] = "Session test 1" ;
} elseif ( $lessonEnableCheck [ 2 ]== 11 && $nextSessionTestName == 'Int2' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Intermediate" ;
$recoLesson [ 0 ] = "Session test 2" ;
}
break ;
case "Advanced" :
if ( $lessonEnableCheck [ 2 ]== 1 && $nextSessionTestName == 'Int3' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Intermediate" ;
$recoLesson [ 0 ] = "Session test 3" ;
} elseif ( $lessonEnableCheck [ 2 ]== 6 && $nextSessionTestName == 'Adv1' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Advanced" ;
$recoLesson [ 0 ] = "Session test 1" ;
} elseif ( $lessonEnableCheck [ 2 ]== 11 && $nextSessionTestName == 'Adv2' ) {
$recoLesson [ 4 ] = "To do" ;
$recoLesson [ 3 ] = $nextSessionTest ;
$recoLesson [ 2 ] = "img/TO1.jpg" ;
$recoLesson [ 1 ] = "Advanced" ;
$recoLesson [ 0 ] = "Session test 2" ;
}
break ;
}
if ( $recoGra [ 4 ] == 'Started' ) {
$idLessonRecommended = explode ( " " , $recoGra [ 1 ]);
$idGrammarLessonRecommended = 6700 + $idLessonRecommended [ 2 ];
mysqli_select_db ( $tracking2 , $database_tracking2 );
$query_StartedLinkRecoLesson = sprintf ( "SELECT ScoreID, LessonScoreID, QuestionID, ResultScore, StudentAnswer FROM scores WHERE UserScoreID = '$useridnum' AND LessonScoreID = '$idGrammarLessonRecommended' " );
$StartedLinkRecoLesson = mysqli_query ( $tracking2 , $query_StartedLinkRecoLesson ) or die ( mysqli_error ());
while ( $row_StartedLinkRecoLesson = mysqli_fetch_array ( $StartedLinkRecoLesson )) {
$StartedQuestionID = $row_StartedLinkRecoLesson [ 'QuestionID' ];
}
if ( $StartedQuestionID <= 15 ) {
$recoGra [ 3 ] = $recoGra [ 3 ]. "/T" .( $StartedQuestionID +2 ). ".php" ;
} else {
$recoGra [ 3 ] = $recoGra [ 3 ]. "/T" .( $StartedQuestionID +4 ). ".php" ;
}
}
if ( $recoVoc [ 4 ] == 'Started' ) {
$idLessonRecommended = explode ( " " , $recoVoc [ 1 ]);
$idGrammarLessonRecommended = 6500 + $idLessonRecommended [ 2 ];
mysqli_select_db ( $tracking2 , $database_tracking2 );
$query_StartedLinkRecoLesson = sprintf ( "SELECT ScoreID, LessonScoreID, QuestionID, ResultScore, StudentAnswer FROM scores WHERE UserScoreID = '$useridnum' AND LessonScoreID = '$idGrammarLessonRecommended' " );
$StartedLinkRecoLesson = mysqli_query ( $tracking2 , $query_StartedLinkRecoLesson ) or die ( mysqli_error ());
while ( $row_StartedLinkRecoLesson = mysqli_fetch_array ( $StartedLinkRecoLesson )) {
$StartedQuestionID = $row_StartedLinkRecoLesson [ 'QuestionID' ];
}
if ( $StartedQuestionID <= 5 ) {
$recoVoc [ 3 ] = $recoVoc [ 3 ]. "/T" .( $StartedQuestionID +4 ). ".php" ;
} else {
$recoVoc [ 3 ] = $recoVoc [ 3 ]. "/T" .( $StartedQuestionID +7 ). ".php" ;
}
}
$programOpt = (! empty ( $row_rsUserDetails [ 'CommentsUser' ]))? explode ( "*/*" , $row_rsUserDetails [ 'CommentsUser' ]) : [ "" ];
switch ( $programOpt [ 0 ]) {
case "Bronze" :
$optList = [ "Support technique" , "Chat pédagogique" , "Leçons (différents niveaux)" ,
"Grammaire" , "Vocabulaire" , "Warm Up" , "ATTESTATION DE NIVEAU" ];
break ;
case "Silver" :
$optList = [ "Support technique" , "Chat pédagogique" , "Leçons (différents niveaux)" ,
"Grammaire" , "Vocabulaire" , "Warm Up" , "ATTESTATION DE NIVEAU" , "Préparation TOEIC/BRIGHT LANGUAGE" ,
"Weekly Ressources" ];
break ;
case "Gold" :
$optList = [ "Support technique" , "Chat pédagogique" , "Leçons (différents niveaux)" ,
"Grammaire" , "Vocabulaire" , "Warm Up" , "ATTESTATION DE NIVEAU" , "Préparation TOEIC/BRIGHT LANGUAGE" ,
"Weekly Ressources" , "1 par mois" , "1 toutes les 5 heures" , "1 toutes les 5 heures" ];
break ;
case "Diamand" :
$optList = [ "Support technique" , "Chat pédagogique" , "Leçons (différents niveaux)" ,
"Grammaire" , "Vocabulaire" , "Warm Up" , "ATTESTATION DE NIVEAU" , "Préparation TOEIC/BRIGHT LANGUAGE" ,
"Weekly Ressources" , "1 par mois" , "2 toutes les 5 heures" , "2 toutes les 5 heures" ];
break ;
case "Premium" :
$optList = [ "Support technique" , "Chat pédagogique" , "Leçons (différents niveaux)" ,
"Grammaire" , "Vocabulaire" , "Warm Up" , "ATTESTATION DE NIVEAU" , "Préparation TOEIC/BRIGHT LANGUAGE" ,
"Weekly Ressources" , "1 par mois" , "3 toutes les 5 heures" , "3 toutes les 5 heures" ,
"1 aux choix TOEIC / TOEIC ONLINE / BRIGHT LANGUAGE / AUTRE" ];
break ;
case "Millenium" :
$optList = [ "Support technique" , "Chat pédagogique" , "Leçons (différents niveaux)" ,
"Grammaire" , "Vocabulaire" , "Warm Up" , "ATTESTATION DE NIVEAU" , "Préparation TOEIC/BRIGHT LANGUAGE" ,
"Weekly Ressources" , "1 par mois" , "1 par jour" , "1 par jour" ,
"1 aux choix TOEIC / TOEIC ONLINE / BRIGHT LANGUAGE / AUTRE" ];
break ;
}
$today = strtotime ( date ( "Y/m/d" ));
$month1 = strtotime ( '+1 months' , $today );
$days1 = cal_days_in_month ( CAL_GREGORIAN, date ( "m" , $today ), date ( "Y" , $today ));
$days2 = cal_days_in_month ( CAL_GREGORIAN, date ( "m" , $month1 ), date ( "Y" , $month1 ));
$dat1 = strtotime ( date ( "Y" , $today ). "-" . date ( "m" , $today ). "-1" );
$dat2 = strtotime ( date ( "Y" , $month1 ). "-" . date ( "m" , $month1 ). "-1" );
function printMonth ( $month , $year ) {
$dat = strtotime ( $year . "-" . $month . "-1" );
$monthdays = cal_days_in_month ( CAL_GREGORIAN, $month , $year );
switch ( date ( "D" , $dat )) {
case "Mon" :
$weekday = 1 ;
break ;
case "Tue" :
$weekday = 2 ;
break ;
case "Wed" :
$weekday = 3 ;
break ;
case "Thu" :
$weekday = 4 ;
break ;
case "Fri" :
$weekday = 5 ;
break ;
case "Sat" :
$weekday = 6 ;
break ;
case "Sun" :
$weekday = 7 ;
break ;
}
$monthRows = $weekday + $monthdays ;
$monthRows = ( $monthRows <= 35 )? 35 : 42 ;
$wday = 1 ;
$mday = 1 ;
for ( $i = 1 ; $i <= $monthRows ; $i ++) {
if ( date ( "m" )== $month ) {
$disabled = ( $mday - date ( "j" )>= 0 )? false : true;
} else { $disabled = false; }
$arg = date ( "Y" , $dat ). "/" . date ( "m" , $dat ). "/" . $mday ;
if ( $wday == 1 ) {
echo "<tr>" ;
if ( $i >= $weekday && $mday <= $monthdays ) {
if ( $disabled ) { echo "<td class='bg-grayCal'>" . $mday . "</td>" ; $mday ++;
} else { echo "<td class='btn-light'
onclick='checkAvailability(\"" . $arg . "\")' id='" . date ( "Y" , $dat ). "/" . date ( "m" , $dat ). "/" . $mday . "'>"
. $mday . "</td>" ; $mday ++; }
} else { echo "<td></td>" ; }
$wday ++;
} elseif ( $wday == 7 ) {
if ( $i >= $weekday && $mday <= $monthdays ) {
if ( $disabled ) { echo "<td class='bg-grayCal'>" . $mday . "</td>" ; $mday ++;
} else { echo "<td class='btn-light'
onclick='checkAvailability(\"" . $arg . "\")' id='" . date ( "Y" , $dat ). "/" . date ( "m" , $dat ). "/" . $mday . "'>"
. $mday . "</td>" ; $mday ++; }
} else { echo "<td></td>" ; }
echo "</tr>" ;
$wday = 1 ;
} else {
if ( $i >= $weekday && $mday <= $monthdays ) {
if ( $disabled ) { echo "<td class='bg-grayCal'>" . $mday . "</td>" ; $mday ++;
} else { echo "<td class='btn-light'
onclick='checkAvailability(\"" . $arg . "\")' id='" . date ( "Y" , $dat ). "/" . date ( "m" , $dat ). "/" . $mday . "'>"
. $mday . "</td>" ; $mday ++; }
} else { echo "<td></td>" ; }
$wday ++;
}
}
}
function translateMonth ( $month ) {
switch ( $month ) {
case 'January' :
return 'Janvier' ;
break ;
case 'February' :
return 'Février' ;
break ;
case 'March' :
return 'Mars' ;
break ;
case 'April' :
return 'Avril' ;
break ;
case 'May' :
return 'Mai' ;
break ;
case 'June' :
return 'Juin' ;
break ;
case 'July' :
return 'Juillet' ;
break ;
case 'August' :
return 'Août' ;
break ;
case 'September' :
return 'Septembre' ;
break ;
case 'October' :
return 'Octobre' ;
break ;
case 'November' :
return 'Novembre' ;
break ;
case 'December' :
return 'Décembre' ;
break ;
}
}
?>
< html lang= "fr" >
< head>< meta http- equiv= "Content-Type" content= "text/html; charset=utf-8" >
<!-- Required meta tags -->
< meta name= "viewport" content= "width=device-width, initial-scale=1, shrink-to-fit=no" >
<!-- Bootstrap CSS -->
< link rel= "stylesheet" href= "bootstrap.min.css" >
< link rel= "stylesheet" href= "stylemain2.css" >
< link rel= "stylesheet" href= "style5.css" >
< link rel= "stylesheet" href= "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css" >
< link rel= "icon" type= "image/png" href= "../img/logopbs.png" />
< title> Professional Business School</ title>
< script type= "text/javascript" >
window. $zopim ||( function ( d, s) { var z= $zopim = function ( c) { z. _. push ( c) } , $= z. s=
d. createElement ( s), e= d. getElementsByTagName ( s)[ 0 ]; z. set= function ( o) { z. set.
_. push ( o) } ; z. _=[]; z. set. _=[]; $. async=! 0 ; $. setAttribute ( "charset" , "latin1_swedish_ci" );
$. src= "//v2.zopim.com/?3g5anxUAXuUse7nPTOSkIggQJ9il44Jm" ; z. t=+ new Date; $.
type= "text/javascript" ; e. parentNode. insertBefore ( $, e) } )( document, "script" );
</ script>
< script type= "text/javascript" src= "countdown.js" ></ script>
< script>
window. onload = function () { killerSession (); }
function killerSession () {
setTimeout ( "window.open('logout.php','_top');" , 900000 );
}
</ script>
< style>
. text- info- box i {
display: block;
background- clip: padding- box;
margin- top: 3 %;
margin- left: - 20px;
height: 60px;
width: 60px;
border- radius: 100 %;
text- align: center;
font- size: 2em;
position: absolute;
}
. text- info- box . value,
. text- info- box . heading {
display: block;
position: relative;
text- align: right;
z- index: 0 ;
}
. text- info- box . heading {
margin- left: - 20px;
font- size: 0 . 78em;
font- weight: 500 ;
text- transform: uppercase;
}
. text- info- box . value {
font- size: 1 . 2em;
line- height: 20px;
font- weight: 400 ;
margin- top: 10px;
margin- bottom: 10px;
}
. nav- tabs . nav- item . nav- link {
background- color:
color:
}
. nav- tabs . nav- item . nav- link. active {
background- color:
color:
font- weight: bold;
}
. disabled- link {
color:
pointer- events: none;
cursor: default ;
}
</ style>
</ head>
< body>
< div id= "main" ></ div>
< div class = "wrapper" >
< div id= "sidebar" class = "<?php echo $colorm; ?> shadow" >
<?php if ( $detect -> isMobile ()== false) {
require_once ( "leftmenu1.1.php" );
}
elseif ( $detect -> isMobile ()== true) {
require_once ( "leftmenumobile.php" );
} ?>
</ div>
< div class = "content w-100 bg-light" >
< nav class = "navbar navbar-expand-sm navbar-light bg-white py-1" >
< span class = "nav-link text-muted" style= "font-size:9px" >< a href= "intro2adEng.php" class = "mx-1" > EN</ a>< a href= "intro2adSpa.php" class = "mx-1" > ES</ a>< a href= "intro2adDeu.php" class = "mx-1" > DE</ a>< a href= "intro2ad.php" class = "mx-1" > FR</ a>< a href= "intro2adNed.php" class = "mx-1" > NL</ a>< a href= "intro2adPor.php" class = "mx-1" > PT</ a></ span>
< button class = "navbar-toggler" type= "button" data- toggle= "collapse" data- target= "#navbarNav" aria- controls= "navbarNav" aria- expanded= "false" aria- label= "Toggle navigation" >
< span class = "navbar-toggler-icon" ></ span>
</ button>
< div class = "collapse navbar-collapse" id= "navbarNav" >
<?php require_once ( "topmenu.php" ); ?>
</ div>
</ nav>
< div class = "container" >
< div class = "col" >
< h4 class = "ml-4 text-muted" ><?php if ( $detect -> isMobile ()== true) {
echo '<button type="button" onclick="openNav()" class="btn btn-outline-cBlue pr-2">
<i class="fa fa-bars"></i>
</button>' ; } ?> Bienvenue < strong><?php echo $row_rsUserDetails [ 'FirstUser' ]; ?>,</ strong>
votre Niveau <?php echo $studentLevel ; if ( count ( $programOpt )> 1 ) { ?> Formule
< a data- toggle= "modal" data- target= "#myModal" >< u><? echo $programOpt [ 0 ]. " Platinium" ; ?></ u></ a><? } ?></ h4>
</ div>
< div class = "row mt-3" >
< a href= "<?= $row_rsUserDetails['CurrentURL']; ?>" >
< div class = "col-sm-12 col-md-2dot4" >
< div class = "text-info-box bg-cBlue text-light px-3 py-2" >
< i class = "fa fa-book mt-4" ></ i>
< span class = "heading" > Dernières activités</ span>
< span class = "value" >< span> </ span></ span>
< center>< a href= "<?= $row_rsUserDetails['CurrentURL']; ?>" class = "btn btn-outline-light btn-sm pt-1" >< small> Continuez</ small></ a></ center>
</ div>
</ div></ a>
< a href= "results.php" >
< div class = "col-sm-12 col-md-2dot4" >
< div class = "text-info-box bg-cGreen text-light px-3 py-2" >
< i class = "fa fa-pencil-square mt-4" ></ i>
< span class = "heading" > Bonnes réponses</ span>
< span class = "value" >< span><?php echo $progressTotalCorrectQuestions . " / " . $progressTotalQuestions ; ?></ span></ span>
< center>< a href= "results.php" class = "btn btn-outline-light btn-sm" >< small> Leçons terminées</ small></ a></ center>
</ div>
</ div></ a>
<!--< a href= "<?php //echo $nextLesson; ?>" >
< div class = "col-lg-3 col-xs-6" >
< div class = "text-info-box bg-cGreen text-light px-3 py-2" >
< i class = "fa fa-pencil-square mt-4" ></ i>
< span class = "heading" > Prochaine leçon</ span>
< span class = "value" >< span><?php
< center>< a href= "<?php //echo $nextLesson; ?>" class = "btn btn-outline-light btn-sm" > Commencez</ a></ center>
</ div>
</ div></ a>-->
< a href= "rewards.php" >
< div class = "col-sm-12 col-md-2dot4" >
< div class = "text-info-box bg-cRed text-light px-3 py-2" >
< i class = "fa fa-graduation-cap mt-4" ></ i>
< span class = "heading" > Leçons évaluées</ span>
< span class = "value" >< span><?php echo $completedLessons ; ?> </ span></ span>
< center>< a href= "rewards.php" class = "btn btn-outline-light btn-sm" >< small> Forces faiblesses</ small></ a></ center>
</ div>
</ div></ a>
< a href= "tracking.php" >
< div class = "col-sm-12 col-md-2dot4" >
< div class = "text-info-box bg-cGold text-light px-1 py-2" >
< i class = "fa fa-hourglass-half mt-4" ></ i>
< span class = "heading" > Temps passé sur le site</ span>
< span class = "value" >< span><?php echo $totalTimeOnSite ; ?></ span></ span>
< center>< a href= "tracking.php" class = "btn btn-outline-light btn-sm" >< small> Voir les records</ small></ a></ center>
</ div>
</ div></ a>
< a href= "progress.php" >
< div class = "col-sm-12 col-md-2dot4" >
< div class = "text-info-box bg-cOrange text-light px-3 py-2" >
< i class = "fa fa-trophy mt-4" ></ i>
< span class = "heading" > Mes progrès</ span>
< span class = "value" >< span id= "clock" ></ span> <?php if ( is_numeric ( $row_rsUserDetails [ 'enddate' ])) { ?>
< script>
var enddate = "<?php echo date(" M d Y H: i: s", $row_rsUserDetails['enddate']) ?> GMT+0" ;
var elemhtml = "clock" ;
var messg = "0D 0H" ;
countdown ( enddate, elemhtml, messg);
</ script><?php } ?></ span>
< center>< a href= "progress.php" class = "btn btn-outline-light btn-sm" >< small> Toutes les leçons</ small></ a></ center>
</ div>
</ div></ a>
</ div>
<!-- Lessons -->
< div class = "row mt-3" >< div class = "col" >< h4 class = "text-muted pl-3" > Modules recommandés</ h4></ div>
< div class = "col" >< p class = "text-muted text-right mr-2" >< a href= "lessons.php" >< small> Tous les modules</ small></ a></ p></ div></ div>
< div class = "row pb-2" >
< div class = "col-sm-12 col-md-2dot4" >
< div class = "shadow-sm text-dark bg-white size-box" >
<!--< a href= "<?php echo $recoLesson[3]; ?>" >< span class = "notify-badge bg-BadgeBlue" > Commencez votre leçon</ span></ a>-->
< div>< a href= "<?php echo $recoLesson[3]; ?>" >< img src= "<?php echo $recoLesson[2]; ?>" class = "img-fluid" ></ a></ div>
< div class = "px-3 py-2" >
< p class = "text-dark font-weight-bold" >< span style= "font-size:14px" ><?php echo $recoLesson [ 0 ]; ?></ span>
< br>< span class = "clearfix" >< span class = "float-sm-right small" style= "font-size:12px" >
< a href= "<?php echo $seeAllLessons;?>" >< u> Voir tout</ u></ a></ span>
< span class = "float-sm-left" >< small class = "<?php switch($recoLesson[4]){
case 'Completed':
$lessonStatus = 'text-success';
$lStatus='Terminé';
break;
case 'Started':
$lessonStatus = 'text-warning';
$lStatus='Commencé';
break;
case 'To do':
$lessonStatus = 'text-info';
$lStatus='A faire';
break;
} echo $lessonStatus; ?> font-weight-bold" ><?php echo $lStatus ; ?></ small></ span></ span></ p>
< p class = "small text-justify text-dark" ><?php echo $recoLesson [ 1 ]; ?></ p>
< a class = "btn btn-outline-cBlue mt-2" href= "<?php echo $recoLesson[3]; ?>" > Commencez</ a>
</ div>
</ div>
</ div>
< div class = "col-sm-12 col-md-2dot4" >
< div class = "shadow-sm text-dark bg-white size-box" >
<!--< a href= "<?php echo $recoGra[3]; ?>" >< span class = "notify-badge bg-BadgeGreen" > Commencez votre leçon de grammaire</ span></ a>-->
< div>< a href= "<?php echo $recoGra[3]; ?>" >< img src= "<?php echo $recoGra[2]; ?>" class = "img-fluid" ></ a></ div>
< div class = "px-3 py-2" >
< p class = "text-dark font-weight-bold" >< span style= "font-size:14px" ><?php echo $recoGra [ 0 ]; ?></ span>
< br>< span class = "clearfix" >< span class = "float-sm-right small" style= "font-size:12px" >
< a href= "lessonsGra.php" >< u> Voir tout</ u></ a></ span>
< span class = "float-sm-left" >< small class = "<?php switch($recoGra[4]){
case 'Completed':
$lessonStatus = 'text-success';
$lStatus='Terminé';
break;
case 'Started':
$lessonStatus = 'text-warning';
$lStatus='Commencé';
break;
case 'To do':
$lessonStatus = 'text-info';
$lStatus='A faire';
break;
} echo $lessonStatus; ?> font-weight-bold" ><?php echo $lStatus ; ?></ small></ span></ span></ p>
< p class = "small text-justify text-dark" ><?php echo $recoGra [ 1 ]; ?></ p>
< a class = "btn btn-outline-cBlue mt-2" href= "<?php echo $recoGra[3]; ?>" > Commencez</ a>
</ div>
</ div>
</ div>
< div class = "col-sm-12 col-md-2dot4" >
< div class = "shadow-sm text-dark bg-white size-box" >
<!--< a href= "<?php echo $recoVoc[3]; ?>" >< span class = "notify-badge bg-BadgeRed" > Commencez votre leçon de vocabulaire</ span></ a>-->
< div>< a href= "<?php echo $recoVoc[3]; ?>" >< img src= "<?php echo $recoVoc[2]; ?>" class = "img-fluid" ></ a></ div>
< div class = "px-3 py-2" >
< p class = "text-dark font-weight-bold" >< span style= "font-size:14px" ><?php echo $recoVoc [ 0 ]; ?></ span>
< br>< span class = "clearfix" >< span class = "float-sm-right small" style= "font-size:12px" >
< a href= "lessonsVoc.php" >< u> Voir tout</ u></ a></ span>
< span class = "float-sm-left" >< small class = "<?php switch($recoVoc[4]){
case 'Completed':
$lessonStatus = 'text-success';
$lStatus='Terminé';
break;
case 'Started':
$lessonStatus = 'text-warning';
$lStatus='Commencé';
break;
case 'To do':
$lessonStatus = 'text-info';
$lStatus='A faire';
break;
} echo $lessonStatus; ?> font-weight-bold" ><?php echo $lStatus ; ?></ small></ span></ span></ p>
< p class = "small text-justify text-dark" ><?php echo $recoVoc [ 1 ]; ?></ p>
< a class = "btn btn-outline-cBlue mt-2" href= "<?php echo $recoVoc[3]; ?>" > Commencez</ a>
</ div>
</ div>
</ div>
< div class = "col-sm-12 col-md-2dot4" >
< div class = "shadow-sm text-dark bg-white size-box" >
<!--< a href= "<?php echo $recoWar[3]; ?>.php" >< span class = "notify-badge bg-BadgeGold" > Commencez votre leçon d'échauffement</span></a>-->
<div><a href="<?php echo $recoWar[3]; ?>.php"><img src="<?php echo $recoWar[2]; ?>" class="img-fluid"></a></div>
<div class="px-3 py-2">
<p class="text-dark font-weight-bold"><span style="font-size:14px"><?php echo $recoWar[0]; ?></span>
<br><span class="clearfix"><span class="float-sm-right small" style="font-size:12px">
<a href="warmup.php"><u>Voir tout</u></a></span>
<span class="float-sm-left"><small class="<?php switch($recoWar[4]){
case ' Completed':
$lessonStatus = ' text- success';
$lStatus=' Terminé';
break;
case ' Started':
$lessonStatus = ' text- warning';
$lStatus=' Commencé';
break;
case ' To do ':
$lessonStatus = ' text- info';
$lStatus=' A faire';
break;
} echo $lessonStatus; ?> font-weight-bold"><?php echo $lStatus; ?></small></span></span></p>
<p class="small text-justify text-dark"><?php echo $recoWar[1]; ?></p>
<a class="btn btn-outline-cBlue mt-2" href="<?php echo $recoWar[3]; ?>.php">Commencez</a>
</div>
</div>
</div>
<div class="col-sm-12 col-md-2dot4">
<div class="shadow-sm text-dark bg-white size-box">
<!--<a href="resources.php"><span class="notify-badge bg-BadgeGray">Commencez votre leçon de ressources</span></a>-->
<div><a href="resources.php"><img src="img/Resources.jpg" class="img-fluid"></a></div>
<div class="px-3 py-2">
<p class="text-dark font-weight-bold"><span style="font-size:14px">Ressources</span>
<br><span class="text-info" style="font-size:12px">Lire et répeter</span></p>
<p class="small text-dark">Verbes à phrases, expressions et vidéos de la semaine.</p>
<a class="btn btn-outline-cBlue mt-2" href="resources.php">Commencez</a>
</div>
</div>
</div>
</div>
<div class="row pb-2">
<div class="col-sm-12 col-md-2dot4">
<div class="shadow-sm text-dark bg-white">
<div><img src="img/rdv.jpg" class="img-fluid"></div>
<div class="px-3 py-2">
<p><a class="btn btn-outline-cBlue w-100 mt-2" href="" data-toggle="modal" data-target="#erc">Être rappelé</a>
<br><a class="btn btn-outline-cBlue w-100 mt-2" href="" data-toggle="modal" data-target="#rdv">Rendez-vous visio</a></p>
</div>
</div>
</div>
</div>
<!-- ************ End first row* *********************** -->
</div><!-- container -->
</div>
</div>
<div class="modal" id="myModal">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Liste des options</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<p><? for($i=0; $i<count($optList);$i++){
echo $optList[$i]."<br>"; } ?></p>
</ul>
</div>
<!-- Modal footer -->
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<div class="modal" id="rdv">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Rendez-vous visio</h4>
<button type="button" class="close" data-dismiss="modal">×</button>
</div>
<!-- Modal body -->
<div class="modal-body">
<div class="mx-3">
<table class="table table-borderless w-100">
<tr>
<td>Sélectionnez un professeur</td>
<td>
<select id="teacherN" class="custom-select">
<option value="Default">Mon professeur</option>
</select>
</td>
</tr>
</table>
</div>
<div class="form-group mx-3">
<label for="mode">Mode de RDV</label>
<select class="form-control" id="mode">
<option value="Skype">Skype</option>
<option value="Zoom">Zoom</option></option>
<option value="WhatsApp">WhatsApp</option>
</select>
<!--<input type="text" class="form-control" id="mode" placeholder="Mode de RDV">-->
</div>
<ul class="nav nav-tabs nav-justified mx-3">
<li class="nav-item">
<a class="nav-link active" href="#month" data-toggle="tab"><? echo translateMonth(date("F",$today)); ?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="#month2" data-toggle="tab"><? echo translateMonth(date("F",$month1)); ?></a>
</li>
</ul>
<input type="hidden" id="selected" value="">
<div class="tab-content mt-1">
<div id="month" class="container tab-pane active">
<table class="table-bordered w-100">
<thead>
<tr>
<th>Mo</th>
<th>Tu</th>
<th>We</th>
<th>Th</th>
<th>Fr</th>
<th>Sa</th>
<th>Su</th>
</tr>
</thead>
<tbody class="text-center">
<? printMonth(date("m",$today),date("Y",$today)); ?>
</tbody>
</table>
</div>
<div id="month2" class="container tab-pane fade">
<table class="table-bordered w-100">
<thead>
<tr>
<th>Mo</th>
<th>Tu</th>
<th>We</th>
<th>Th</th>
<th>Fr</th>
<th>Sa</th>
<th>Su</th>
</tr>
</thead>
<tbody class="text-center">
<? printMonth(date("m",$month1),date("Y",$month1)); ?>
</tbody>
</table>
</div>
</div>
<div class="m-3">
<ul class="nav nav-tabs nav-justified mx-3">
<li class="nav-item">
<a class="nav-link active" href="#morning" data-toggle="tab">Matin</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#afternoon" data-toggle="tab">APRES-MIDI</a>
</li>
</ul>
<div class="tab-content mt-1">
<div id="morning" class="container tab-pane active">
<table class="table w-100">
<tr>
<td class="w-50 text-center">08:00 - 09:00</td>
<td class=""><button class="btn btn-primary btn-sm" id="b80" onclick="book(' 08 : 00 ')">Reserver</button></td>
<td class="text-right pr-2"><span id="j80">Disponible</span></td>
</tr>
<tr>
<td class="text-center">08:30 - 09:30</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 08 : 30 ')" id="b83">Reserver</button></td>
<td class="text-right pr-2"><span id="j83">Disponible</span></td>
</tr>
<tr>
<td class="text-center">09:00 - 10:00</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 09 : 00 ')" id="b90">Reserver</button></td>
<td class="text-right pr-2"><span id="j90">Disponible</span></td>
</tr>
<tr>
<td class="text-center">09:30 - 10:30</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 09 : 30 ')" id="b93">Reserver</button></td>
<td class="text-right pr-2"><span id="j93">Disponible</span></td>
</tr>
<tr>
<td class="text-center">10:00 - 11:00</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 10 : 00 ')" id="b100">Reserver</button></td>
<td class="text-right pr-2"><span id="j100">Disponible</span></td>
</tr>
<tr>
<td class="text-center">10:30 - 11:30</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 10 : 30 ')" id="b103">Reserver</button></td>
<td class="text-right pr-2"><span id="j103">Disponible</span></td>
</tr>
<tr>
<td class="text-center">11:00 - 12:00</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 11 : 00 ')" id="b110">Reserver</button></td>
<td class="text-right pr-2"><span id="j110">Disponible</span></td>
</tr>
<tr>
<td class="text-center">11:30 - 12:30</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 11 : 30 ')" id="b113">Reserver</button></td>
<td class="text-right pr-2"><span id="j113">Disponible</span></td>
</tr>
</table>
</div>
<div id="afternoon" class="container tab-pane fade">
<table class="table w-100">
<tr>
<td class="w-50 text-center">13:00 - 14:00</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 13 : 00 ')" id="b130">Reserver</button></td>
<td class="text-right pr-2"><span id="j130">Disponible</span></td>
</tr>
<tr>
<td class="text-center">13:30 - 14:30</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 13 : 30 ')" id="b133">Reserver</button></td>
<td class="text-right pr-2"><span id="j133">Disponible</span></td>
</tr>
<tr>
<td class="text-center">14:00 - 15:00</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 14 : 30 ')" id="b140">Reserver</button></td>
<td class="text-right pr-2"><span id="j140">Disponible</span></td>
</tr>
<tr>
<td class="text-center">14:30 - 15:30</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 14 : 30 ')" id="b143">Reserver</button></td>
<td class="text-right pr-2"><span id="j143">Disponible</span></td>
</tr>
<tr>
<td class="text-center">15:00 - 16:00</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 15 : 00 ')" id="b150">Reserver</button></td>
<td class="text-right pr-2"><span id="j150">Disponible</span></td>
</tr>
<tr>
<td class="text-center">15:30 - 16:30</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 15 : 30 ')" id="b153">Reserver</button></td>
<td class="text-right pr-2"><span id="j153">Disponible</span></td>
</tr><tr>
<td class="text-center">16:00 - 17:00</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 16 : 00 ')" id="b160">Reserver</button></td>
<td class="text-right pr-2"><span id="j160">Disponible</span></td>
</tr>
<tr>
<td class="text-center">16:30 - 17:30</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 16 : 30 ')" id="b163">Reserver</button></td>
<td class="text-right pr-2"><span id="j163">Disponible</span></td>
</tr><tr>
<td class="text-center">17:00 - 18:00</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 17 : 00 ')" id="b170">Reserver</button></td>
<td class="text-right pr-2"><span id="j170">Disponible</span></td>
</tr>
<tr>
<td class="text-center">17:30 - 18:30</td>
<td><button class="btn btn-primary btn-sm" onclick="book(' 17 : 30 ')" id="b173">Reserver</button></td>
<td class="text-right pr-2"><span id="j173">Disponible</span></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<p class="text-center" id="mssg"></p>
</div><!-- content -->
</div><!-- modal dialog -->
</div><!-- rdv modal -->
<input type="hidden" class="form-control" id="admin" value="<? echo $row_rsUserDetails[' AdminLoginUser'];?>">
<input type="hidden" class="form-control" id="stud" value="<? echo $row_rsUserDetails[' UserID'];?>">
<input type="hidden" class="form-control" id="nam" value="<? echo $row_rsUserDetails[' FirstUser']." ".$row_rsUserDetails[' LastUser']."*/*".$row_rsUserDetails[' LoginUser']; ?>">
<div class="modal" id="erc">
<div class="modal-dialog">
<div class="modal-content">
<!-- Modal Header -->
<div class="modal-header">
<h4 class="modal-title">Rendez vous sur file d' attente</ h4>
< button type= "button" class = "close" data- dismiss= "modal" > ×</ button>
</ div>
<!-- Modal body -->
< div class = "modal-body" >
< p> Un professeur vous contactera dans les meilleurs delais</ p>
< form>
< div class = "form-group" >
< input type= "number" class = "form-control" id= "phone" placeholder= "Votre numero de telephone" required>
</ div>
< input type= "hidden" class = "form-control" id= "type2" value= "call" >
< center>< button type= "button" class = "btn btn-primary" id= "btnRdc" onclick= "sendF(1)" > OK</ button></ center>
</ form>
< p id= "msg2" ></ p>
</ div>
</ div>
</ div>
</ div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper. js, then Bootstrap JS -->
< script src= "jquery-3.3.1.slim.min.js" ></ script>
< script src= "popper.min.js" ></ script>
< script src= "bootstrap.min.js" ></ script>
< script src= "js/buttons.js" ></ script>
< script>
var admin = <?php echo $row_rsUserDetails [ 'AdminLoginUser' ]; ?>;
var mode = document. getElementById ( 'mode' );
function checkAvailability ( arg) {
if (! booked) { resetButtons (); }
mssg. classList. remove ( "text-danger" );
mssg. classList. remove ( "text-success" );
mssg. classList. remove ( "font-weight-bold" );
mssg. innerText = "" ;
var selEle1 = document. getElementById ( selected);
var selEle2 = document. getElementById ( arg);
var date = arg. split ( "/" );
if ( selected != "" ) {
selEle1. classList. remove ( "btn-light" );
selEle1. classList. remove ( "btn-primary" );
selEle1. classList. add ( "btn-light" );
}
selected = arg;
selEle2. classList. remove ( "btn-light" );
selEle2. classList. add ( "btn-primary" );
var formData = new FormData ();
if ( window. XMLHttpRequest) {
xmlhttp= new XMLHttpRequest ();
} else {
xmlhttp= new ActiveXObject ( "Microsoft.XMLHTTP" );
}
formData. append ( "type" , "check" );
formData. append ( "admin" , admin);
formData. append ( "year" , date[ 0 ]);
formData. append ( "month" , date[ 1 ]);
formData. append ( "day" , date[ 2 ]);
formData. append ( "teacher" , teacher);
xmlhttp. open ( "POST" , "calCheck.php" );
xmlhttp. send ( formData);
xmlhttp. onreadystatechange = function () {
if ( this. readyState == 4 ) {
availabilityUpd ( this. responseText);
} ;
}
}
function book ( time) {
if ( selected!= "" && mode. value!= "" ) {
var date = selected. split ( "/" );
var formData = new FormData ();
if ( window. XMLHttpRequest) {
xmlhttp= new XMLHttpRequest ();
} else {
xmlhttp= new ActiveXObject ( "Microsoft.XMLHTTP" );
}
formData. append ( "type" , "book" );
formData. append ( "type2" , "meeting" );
formData. append ( "lang" , "<? echo $row_rsUserDetails['ProgramScoreID']; ?>" );
formData. append ( "stud" , "<? echo $row_rsUserDetails['UserID']; ?>" );
formData. append ( "admin" , admin);
formData. append ( "nam" , "<? echo $row_rsUserDetails['FirstUser']." ".$row_rsUserDetails['LastUser']."'*/*'".$row_rsUserDetails['LoginUser']; ?>" );
formData. append ( "year" , date[ 0 ]);
formData. append ( "month" , date[ 1 ]);
formData. append ( "day" , date[ 2 ]);
formData. append ( "time" , time);
formData. append ( "mode" , mode. value);
formData. append ( "teacher" , teacher);
xmlhttp. open ( "POST" , "calCheck.php" );
xmlhttp. send ( formData);
mssg. innerText = "Chargement" ;
xmlhttp. onreadystatechange = function () {
if ( this. readyState == 4 ) {
mssg. classList. remove ( "text-danger" );
mssg. classList. remove ( "text-success" );
mssg. classList. remove ( "font-weight-bold" );
if ( this. responseText != 'Error' ) {
mssg. innerText = "Votre demande a été enregistrée" ;
mssg. classList. add ( "text-success" );
mssg. classList. add ( "font-weight-bold" )
disabledButtons ();
} else {
mssg. innerText = "Il y a eu une erreur, SVP réessayer" ;
mssg. classList. add ( "text-danger" );
mssg. classList. add ( "font-weight-bold" )
}
} ;
}
} else {
mssg. classList. remove ( "text-danger" );
mssg. classList. remove ( "text-success" );
mssg. classList. remove ( "font-weight-bold" );
mssg. innerText = "SVP sélectionnez une date et un mode" ;
mssg. classList. add ( "text-danger" );
mssg. classList. add ( "font-weight-bold" )
}
}
</ script>
< script>
$( document). ready ( function () {
$( '#sidebarCollapse' ). on ( 'click' , function () {
$( '#sidebar' ). toggleClass ( 'active' );
} );
} );
function openNav () {
document. getElementById ( "mySidenav" ). style. width = "250px" ;
document. getElementById ( "main" ). style. display = "block" ;
}
function closeNav () {
document. getElementById ( "mySidenav" ). style. width = "0" ;
document. getElementById ( "main" ). style. display = "none" ;
}
function sendF ( arg) {
if ( window. XMLHttpRequest) {
xmlhttp= new XMLHttpRequest ();
} else {
xmlhttp= new ActiveXObject ( "Microsoft.XMLHTTP" );
}
var formData = new FormData ();
var stud = document. getElementById ( 'stud' ). value;
var admin = document. getElementById ( 'admin' ). value;
var nam = document. getElementById ( 'nam' ). value;
var verform = false;
var mssg;
switch ( arg) {
case 0 :
var mode = document. getElementById ( 'mode' ). value;
var type = document. getElementById ( 'type' ). value;
var btn = document. getElementById ( 'btnRdv' );
var msgResult = document. getElementById ( 'msg1' );
formData. append ( "date" , dateV);
formData. append ( "mode" , mode);
formData. append ( "type" , type);
verform = ( mode != "" )? true : mssg = 'Required' ;
break ;
case 1 :
var phone = document. getElementById ( 'phone' ). value;
var type = document. getElementById ( 'type2' ). value;
var btn = document. getElementById ( 'btnRdc' );
var msgResult = document. getElementById ( 'msg2' );
formData. append ( "phone" , phone);
formData. append ( "type" , type);
verform = ( phone != "" )? true : mssg = 'Required' ;
break ;
}
if ( verform == true) {
formData. append ( "lang" , "<? echo $row_rsUserDetails['ProgramScoreID']; ?>" );
formData. append ( "stud" , stud);
formData. append ( "admin" , admin);
formData. append ( "nam" , nam);
xmlhttp. open ( "POST" , "meeting.php" );
xmlhttp. send ( formData);
btn. disabled= true;
btn. innerHTML= '<span class="spinner-border spinner-border-sm"></span> Chargement' ;
xmlhttp. onreadystatechange = function () {
if ( this. readyState == 4 ) {
btn. innerHTML= 'OK' ;
if ( this. responseText != 'Error' ) {
msgResult. innerHTML = '<span class="text-success">Votre demande a été enregistrée</span>' ;
} else {
msgResult. innerHTML = '<span class="text-danger">Il y a eu une erreur, SVP réessayer</span>' ;
}
} ;
}
}
}
</ script>
<?php mysqli_close ( $tracking2 ); ?>
</ body>
</ html>
Configuration: Windows / Chrome 86.0.4240.198
Afficher la suite