|
@@ -63,6 +63,11 @@ $tool_name= get_lang('SubscribeCoursesToSession');
|
|
|
|
|
|
$id_session=intval($_GET['id_session']);
|
|
$id_session=intval($_GET['id_session']);
|
|
|
|
|
|
|
|
+$add_type = 'unique';
|
|
|
|
+if(isset($_GET['add_type']) && $_GET['add_type']!=''){
|
|
|
|
+ $add_type = $_GET['add_type'];
|
|
|
|
+}
|
|
|
|
+
|
|
if(!api_is_platform_admin())
|
|
if(!api_is_platform_admin())
|
|
{
|
|
{
|
|
$sql = 'SELECT session_admin_id FROM '.Database :: get_main_table(TABLE_MAIN_SESSION).' WHERE id='.$id_session;
|
|
$sql = 'SELECT session_admin_id FROM '.Database :: get_main_table(TABLE_MAIN_SESSION).' WHERE id='.$id_session;
|
|
@@ -143,6 +148,7 @@ $noPHP_SELF=true;
|
|
|
|
|
|
if($_POST['formSent'])
|
|
if($_POST['formSent'])
|
|
{
|
|
{
|
|
|
|
+
|
|
$formSent=$_POST['formSent'];
|
|
$formSent=$_POST['formSent'];
|
|
$firstLetterCourse=$_POST['firstLetterCourse'];
|
|
$firstLetterCourse=$_POST['firstLetterCourse'];
|
|
$firstLetterSession=$_POST['firstLetterSession'];
|
|
$firstLetterSession=$_POST['firstLetterSession'];
|
|
@@ -226,10 +232,11 @@ Display::display_header($tool_name);
|
|
|
|
|
|
api_display_tool_title($tool_name);
|
|
api_display_tool_title($tool_name);
|
|
|
|
|
|
-$sql = 'SELECT COUNT(1) FROM '.$tbl_course;
|
|
|
|
|
|
+/*$sql = 'SELECT COUNT(1) FROM '.$tbl_course;
|
|
$rs = api_sql_query($sql, __FILE__, __LINE__);
|
|
$rs = api_sql_query($sql, __FILE__, __LINE__);
|
|
-$count_courses = mysql_result($rs, 0, 0);
|
|
|
|
-$ajax_search = $count_courses > 50 ? true : false;
|
|
|
|
|
|
+$count_courses = mysql_result($rs, 0, 0);*/
|
|
|
|
+
|
|
|
|
+$ajax_search = $add_type == 'unique' ? true : false;
|
|
|
|
|
|
$nosessionCourses = $sessionCourses = array();
|
|
$nosessionCourses = $sessionCourses = array();
|
|
|
|
|
|
@@ -277,8 +284,23 @@ else
|
|
}
|
|
}
|
|
}
|
|
}
|
|
unset($Courses);
|
|
unset($Courses);
|
|
|
|
+
|
|
|
|
+if($add_type == 'multiple'){
|
|
|
|
+ $link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$_GET['add'].'&add_type=unique">'.get_lang('SessionAddTypeUnique').'</a>';
|
|
|
|
+ $link_add_type_multiple = get_lang('SessionAddTypeMultiple');
|
|
|
|
+}
|
|
|
|
+else{
|
|
|
|
+ $link_add_type_unique = get_lang('SessionAddTypeUnique');
|
|
|
|
+ $link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.$_GET['add'].'&add_type=multiple">'.get_lang('SessionAddTypeMultiple').'</a>';
|
|
|
|
+}
|
|
|
|
+
|
|
?>
|
|
?>
|
|
|
|
|
|
|
|
+<div style="text-align: center;">
|
|
|
|
+ <?php echo $link_add_type_unique ?> | <?php echo $link_add_type_multiple ?>
|
|
|
|
+</div>
|
|
|
|
+<br>
|
|
|
|
+
|
|
<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $_GET['page'] ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;">
|
|
<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $_GET['page'] ?>&id_session=<?php echo $id_session; ?><?php if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;">
|
|
<input type="hidden" name="formSent" value="1" />
|
|
<input type="hidden" name="formSent" value="1" />
|
|
|
|
|