diff --git a/main/admin/resume_session.php b/main/admin/resume_session.php index 5c82654f0a..fb3074ecb3 100644 --- a/main/admin/resume_session.php +++ b/main/admin/resume_session.php @@ -189,7 +189,7 @@ else { '.get_lang('Tracking').'  - + '; } @@ -233,7 +233,7 @@ else { '.$user['lastname'].' '.$user['firstname'].' ('.$user['username'].') - '.get_lang('Reporting').'  + '.get_lang('Reporting').'  '; } diff --git a/main/admin/session_add.php b/main/admin/session_add.php index 707abb38fa..c84cb59bfc 100644 --- a/main/admin/session_add.php +++ b/main/admin/session_add.php @@ -45,9 +45,9 @@ if($_POST['formSent']) $date_end="000-00-00"; } if(empty($name)) $errorMsg=get_lang('SessionNameIsRequired'); - elseif(empty($_POST['nolimit']) && (!$month_start || !$day_start || !$year_start || !checkdate($month_start,$day_start,$year_start))) $errorMsg="Veuillez introduire une date de début valide !"; - elseif(empty($_POST['nolimit']) && (!$month_end || !$day_end || !$year_end || !checkdate($month_end,$day_end,$year_end))) $errorMsg="Veuillez introduire une date de fin valide !"; - elseif(empty($_POST['nolimit']) && $date_start >= $date_end) $errorMsg="La date de fin doit être postérieure à la date de début !"; + elseif(empty($_POST['nolimit']) && (!$month_start || !$day_start || !$year_start || !checkdate($month_start,$day_start,$year_start))) $errorMsg=get_lang('InvalidStartDate'); + elseif(empty($_POST['nolimit']) && (!$month_end || !$day_end || !$year_end || !checkdate($month_end,$day_end,$year_end))) $errorMsg=get_lang('InvalidEndDate'); + elseif(empty($_POST['nolimit']) && $date_start >= $date_end) $errorMsg=get_lang('StartDateShouldBeBeforeEndDate'); else { $rs = api_sql_query("SELECT 1 FROM $tbl_session WHERE name='".addslashes($name)."'"); @@ -57,7 +57,7 @@ if($_POST['formSent']) else { api_sql_query("INSERT INTO $tbl_session(name,date_start,date_end,id_coach) VALUES('".addslashes($name)."','$date_start','$date_end','$id_coach')",__FILE__,__LINE__); $id_session=mysql_insert_id(); - + header('Location: add_courses_to_session.php?id_session='.$id_session.'&add=true'); exit(); } @@ -110,7 +110,7 @@ if(!empty($errorMsg))    - + function setDisable(select){ - + document.form.day_start.disabled = (select.checked) ? true : false; document.form.month_start.disabled = (select.checked) ? true : false; document.form.year_start.disabled = (select.checked) ? true : false; - + document.form.day_end.disabled = (select.checked) ? true : false; document.form.month_end.disabled = (select.checked) ? true : false; document.form.year_end.disabled = (select.checked) ? true : false; - - + + } -
+
diff --git a/main/admin/session_course_user_list.php b/main/admin/session_course_user_list.php index 690e305bba..466f657838 100644 --- a/main/admin/session_course_user_list.php +++ b/main/admin/session_course_user_list.php @@ -53,11 +53,11 @@ $Users=api_store_result($result); $nbr_results=sizeof($Users); -$tool_name = "Liste des utilisateurs inscrits au cours "".htmlentities($course_title)."" pour la session "".htmlentities($session_name)."""; +$tool_name = get_lang('ListOfUsersSubscribedToCourse').' "'.htmlentities($course_title).'" '.get_lang('ForTheSession').' "'.htmlentities($session_name).'"'; $interbredcrump[]=array("url" => "index.php","name" => get_lang('AdministrationTools')); -$interbredcrump[]=array("url" => "session_list.php","name" => "Liste des sessions"); -$interbredcrump[]=array("url" => "session_course_list.php?id_session=$id_session","name" => "Liste des cours de la session "".htmlentities($session_name)."""); +$interbredcrump[]=array("url" => "session_list.php","name" => get_lang('SessionList')); +$interbredcrump[]=array("url" => "session_course_list.php?id_session=$id_session","name" => get_lang('ListOfCoursesOfSession')." "".htmlentities($session_name)."""); Display::display_header($tool_name); @@ -66,7 +66,7 @@ api_display_tool_title($tool_name);
- +
@@ -75,17 +75,13 @@ if($page) { ?> -Précédent + - -Précédent - - @@ -96,17 +92,13 @@ if($nbr_results > $limit) { ?> -Suivant + - -Suivant - - @@ -140,7 +132,7 @@ foreach($Users as $key=>$enreg) - + @@ -162,17 +154,13 @@ if($page) { ?> -Précédent + - -Précédent - - @@ -183,17 +171,13 @@ if($nbr_results > $limit) { ?> -Suivant + - -Suivant - - @@ -202,7 +186,7 @@ Suivant
diff --git a/main/admin/session_edit.php b/main/admin/session_edit.php index ac9a942e52..d6522bcc10 100644 --- a/main/admin/session_edit.php +++ b/main/admin/session_edit.php @@ -38,7 +38,7 @@ if($_POST['formSent']) $month_end=intval($_POST['month_end']); $day_end=intval($_POST['day_end']); $id_coach=intval($_POST['id_coach']); - + if(empty($_POST['nolimit'])){ $date_start="$year_start-".(($month_start < 10)?"0$month_start":$month_start)."-".(($day_start < 10)?"0$day_start":$day_start); $date_end="$year_end-".(($month_end < 10)?"0$month_end":$month_end)."-".(($day_end < 10)?"0$day_end":$day_end); @@ -48,17 +48,17 @@ if($_POST['formSent']) $date_end="000-00-00"; } if(empty($name)) $errorMsg=get_lang('SessionNameIsRequired'); - elseif(empty($_POST['nolimit']) && (!$month_start || !$day_start || !$year_start || !checkdate($month_start,$day_start,$year_start))) $errorMsg="Veuillez introduire une date de début valide !"; - elseif(empty($_POST['nolimit']) && (!$month_end || !$day_end || !$year_end || !checkdate($month_end,$day_end,$year_end))) $errorMsg="Veuillez introduire une date de fin valide !"; - elseif(empty($_POST['nolimit']) && $date_start >= $date_end) $errorMsg=get_lang('DateStartMoreThanDateEnd'); + elseif(empty($_POST['nolimit']) && (!$month_start || !$day_start || !$year_start || !checkdate($month_start,$day_start,$year_start))) $errorMsg=get_lang('InvalidStartDate'); + elseif(empty($_POST['nolimit']) && (!$month_end || !$day_end || !$year_end || !checkdate($month_end,$day_end,$year_end))) $errorMsg=get_lang('InvalidEndDate'); + elseif(empty($_POST['nolimit']) && $date_start >= $date_end) $errorMsg=get_lang('StartDateShouldBeBeforeEndDate'); else { - + $rs = api_sql_query("SELECT id FROM $tbl_session WHERE name='".addslashes($name)."'"); $exists = false; while($row = mysql_fetch_array($rs)){ if($row['id']!=$id) - $exists = true; + $exists = true; } if($exists){ $errorMsg = get_lang('SessionNameSoonExists'); @@ -305,16 +305,16 @@ for($i=$thisYear-5;$i <= ($thisYear+5);$i++) function setDisable(select){ - + document.form.day_start.disabled = (select.checked) ? true : false; document.form.month_start.disabled = (select.checked) ? true : false; document.form.year_start.disabled = (select.checked) ? true : false; - + document.form.day_end.disabled = (select.checked) ? true : false; document.form.month_end.disabled = (select.checked) ? true : false; document.form.year_end.disabled = (select.checked) ? true : false; - - + + } '; $emailsubject='['.get_setting('siteName').'] '.get_lang('YourReg').' '.get_setting('siteName'); - $emailbody="[NOTE:] Ceci est un e-mail automatique, veuillez ne pas y répondre.\n\n".get_lang('langDear')." $firstname $lastname,\n\n".get_lang('langYouAreReg')." ". get_setting('siteName') ." ".get_lang('langSettings')." $username\n". get_lang('langPass')." : $password\n\n".get_lang('langAddress') ." ". get_lang('langIs') ." ". $serverAddress ."\n\nVous recevrez prochainement un e-mail de votre coach responsable. Nous vous invitons à bien lire ses recommandations.\n\n". get_lang('langProblem'). "\n\n". get_lang('langFormula'); + $emailbody="[NOTE:] ".get_lang('ThisIsAutomaticEmailNoReply').".\n\n".get_lang('langDear')." $firstname $lastname,\n\n".get_lang('langYouAreReg')." ". get_setting('siteName') ." ".get_lang('langSettings')." $username\n". get_lang('langPass')." : $password\n\n".get_lang('langAddress') ." ". get_lang('langIs') ." ". $serverAddress ."\n\n".get_lang('YouWillSoonReceiveMailFromCoach')."\n\n". get_lang('langProblem'). "\n\n". get_lang('langFormula'); //#287 modifiée par Stéphane DEBIEVE - FOREM $emailheaders='From: '.get_setting('administratorName').' '.get_setting('administratorSurname').' <'.get_setting('emailAdministrator').">\n"; $emailheaders.='Reply-To: '.get_setting('emailAdministrator'); @@ -263,7 +263,7 @@ if($_POST['formSent']) } if($timeEnd - $timeStart < 0) { - $errorMsg .= get_lang('DateStartMoreThanDateEnd').' : '.$DateEnd.'
'; + $errorMsg .= get_lang('StartDateShouldBeBeforeEndDate').' : '.$DateEnd.'
'; } } diff --git a/main/admin/session_list.php b/main/admin/session_list.php index eb82d29dce..5d2e4f7b99 100644 --- a/main/admin/session_list.php +++ b/main/admin/session_list.php @@ -69,7 +69,7 @@ if(isset($_GET['action'])){ -
+
@@ -79,64 +79,56 @@ if(count($Sessions)==0 && isset($_POST['keyword'])) { echo get_lang('NoSearchResults'); } -else +else { if($page) { ?> - - Précédent - + + + - - Précédent - - - + | - + $limit) { ?> - - Suivant - + + + - - Suivant - - - +
- +
- + - - - - - + + + + + - + $enreg) { if($key == $limit) @@ -144,12 +136,12 @@ else break; } $sql = 'SELECT COUNT(course_code) FROM '.$tbl_session_rel_course.' WHERE id_session='.intval($enreg['id']); - + $rs = api_sql_query($sql, __FILE__, __LINE__); list($nb_courses) = mysql_fetch_array($rs); - + ?> - + @@ -160,70 +152,62 @@ else - + - + - +
 Nom de la sessionNombre de coursDate de débutDate de finActions
- +
- +
- + - - Précédent - + + + - - Précédent - - - + | - + $limit) { ?> - - Suivant - + + + - - Suivant - - - +
- +
- +