@@ -70,13 +70,13 @@ |
||
70 | 70 | <tr> |
71 | 71 | <td align="center"> |
72 | 72 | <?php |
73 | - echo Display::select( |
|
74 | - 'sessions[]', |
|
75 | - $sessionList, |
|
76 | - '', |
|
77 | - array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'sessions', 'size'=>'15px'), |
|
78 | - false |
|
79 | - ); |
|
73 | + echo Display::select( |
|
74 | + 'sessions[]', |
|
75 | + $sessionList, |
|
76 | + '', |
|
77 | + array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'sessions', 'size'=>'15px'), |
|
78 | + false |
|
79 | + ); |
|
80 | 80 | ?> |
81 | 81 | </td> |
82 | 82 | <td align="center"> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | // setting breadcrumbs |
16 | 16 | //$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
17 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
17 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
18 | 18 | |
19 | 19 | // Setting the name of the tool |
20 | 20 | $tool_name = get_lang('EnrollTrainersFromExistingSessions'); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | 'sessions[]', |
75 | 75 | $sessionList, |
76 | 76 | '', |
77 | - array('style'=>'width:360px', 'multiple'=>'multiple','id'=>'sessions', 'size'=>'15px'), |
|
77 | + array('style'=>'width:360px', 'multiple'=>'multiple', 'id'=>'sessions', 'size'=>'15px'), |
|
78 | 78 | false |
79 | 79 | ); |
80 | 80 | ?> |
@@ -52,14 +52,14 @@ discard block |
||
52 | 52 | 'course_name', |
53 | 53 | get_lang('SearchCourse'), |
54 | 54 | null, |
55 | - array('url' => api_get_path(WEB_AJAX_PATH) . 'course.ajax.php?a=search_course') |
|
55 | + array('url' => api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=search_course') |
|
56 | 56 | ); |
57 | 57 | |
58 | 58 | if (!empty($courseId)) { |
59 | 59 | $courseInfo = api_get_course_info_by_id($courseId); |
60 | 60 | $parents = getParentsToString($courseInfo['categoryCode']); |
61 | 61 | |
62 | - $courseSelect->addOption($parents . $courseInfo['title'], $courseInfo['code'], ['selected' => 'selected']); |
|
62 | + $courseSelect->addOption($parents.$courseInfo['title'], $courseInfo['code'], ['selected' => 'selected']); |
|
63 | 63 | } |
64 | 64 | |
65 | 65 | $url = api_get_self(); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | // height auto |
112 | 112 | $extra_params['height'] = 'auto'; |
113 | 113 | |
114 | -$extra_params['postData'] =array( |
|
114 | +$extra_params['postData'] = array( |
|
115 | 115 | 'filters' => array( |
116 | 116 | "groupOp" => "AND", |
117 | 117 | "rules" => $result['rules'], |
@@ -125,11 +125,11 @@ discard block |
||
125 | 125 | |
126 | 126 | //With this function we can add actions to the jgrid (edit, delete, etc) |
127 | 127 | $action_links = 'function action_formatter(cellvalue, options, rowObject) { |
128 | - return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'. |
|
129 | - ' <a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png',get_lang('SubscribeUsersToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
130 | - ' <a href="add_courses_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('courses_to_session.png',get_lang('SubscribeCoursesToSession'),'',ICON_SIZE_SMALL).'</a>'. |
|
131 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=copy&idChecked=\'+options.rowId+\'">'.Display::return_icon('copy.png',get_lang('Copy'),'',ICON_SIZE_SMALL).'</a>'. |
|
132 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=delete&idChecked=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'. |
|
128 | + return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'. |
|
129 | + ' <a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png', get_lang('SubscribeUsersToSession'), '', ICON_SIZE_SMALL).'</a>'. |
|
130 | + ' <a href="add_courses_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('courses_to_session.png', get_lang('SubscribeCoursesToSession'), '', ICON_SIZE_SMALL).'</a>'. |
|
131 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=copy&idChecked=\'+options.rowId+\'">'.Display::return_icon('copy.png', get_lang('Copy'), '', ICON_SIZE_SMALL).'</a>'. |
|
132 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="session_list.php?action=delete&idChecked=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'. |
|
133 | 133 | '\'; |
134 | 134 | }'; |
135 | 135 | |
@@ -298,18 +298,18 @@ discard block |
||
298 | 298 | <?php |
299 | 299 | |
300 | 300 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'. |
301 | - Display::return_icon('new_session.png',get_lang('AddSession'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
301 | + Display::return_icon('new_session.png', get_lang('AddSession'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
302 | 302 | if (api_is_platform_admin()) { |
303 | 303 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/add_many_session_to_category.php">'. |
304 | - Display::return_icon('session_to_category.png',get_lang('AddSessionsInCategories'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
304 | + Display::return_icon('session_to_category.png', get_lang('AddSessionsInCategories'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
305 | 305 | echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_category_list.php">'. |
306 | - Display::return_icon('folder.png',get_lang('ListSessionCategory'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
306 | + Display::return_icon('folder.png', get_lang('ListSessionCategory'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | if ($list_type == 'complete') { |
310 | - echo '<a href="'.api_get_self().'?list_type=simple">'.Display::return_icon('view_remove.png',get_lang('Simple'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
310 | + echo '<a href="'.api_get_self().'?list_type=simple">'.Display::return_icon('view_remove.png', get_lang('Simple'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
311 | 311 | } else { |
312 | - echo '<a href="'.api_get_self().'?list_type=complete">'.Display::return_icon('view_text.png',get_lang('Complete'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
312 | + echo '<a href="'.api_get_self().'?list_type=complete">'.Display::return_icon('view_text.png', get_lang('Complete'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
313 | 313 | } |
314 | 314 | |
315 | 315 | echo $actions; |
@@ -29,15 +29,15 @@ discard block |
||
29 | 29 | $sql = "SELECT * FROM $tbl_session_category WHERE id='".$id."' ORDER BY name"; |
30 | 30 | $result = Database::query($sql); |
31 | 31 | if (!$infos = Database::fetch_array($result)) { |
32 | - header('Location: session_list.php'); |
|
33 | - exit(); |
|
32 | + header('Location: session_list.php'); |
|
33 | + exit(); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | list($year_start,$month_start,$day_start)=explode('-',$infos['date_start']); |
37 | 37 | list($year_end,$month_end,$day_end)=explode('-',$infos['date_end']); |
38 | 38 | |
39 | 39 | if (!api_is_platform_admin() && $infos['session_admin_id']!=$_user['user_id'] && !api_is_session_admin()) { |
40 | - api_not_allowed(true); |
|
40 | + api_not_allowed(true); |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | if (isset($_POST['formSent']) && $_POST['formSent']) { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $day_end |
61 | 61 | ); |
62 | 62 | if ($return == strval(intval($return))) { |
63 | - Display::addFlash(Display::return_message(get_lang('SessionCategoryUpdate'))); |
|
63 | + Display::addFlash(Display::return_message(get_lang('SessionCategoryUpdate'))); |
|
64 | 64 | header('Location: session_category_list.php'); |
65 | 65 | exit(); |
66 | 66 | } |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | // display the header |
74 | 74 | Display::display_header($tool_name); |
75 | 75 | if (!empty($return)) { |
76 | - Display::display_error_message($return,false); |
|
76 | + Display::display_error_message($return,false); |
|
77 | 77 | } |
78 | 78 | ?> |
79 | 79 | <div class="row"> |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | exit(); |
34 | 34 | } |
35 | 35 | |
36 | -list($year_start,$month_start,$day_start)=explode('-',$infos['date_start']); |
|
37 | -list($year_end,$month_end,$day_end)=explode('-',$infos['date_end']); |
|
36 | +list($year_start, $month_start, $day_start) = explode('-', $infos['date_start']); |
|
37 | +list($year_end, $month_end, $day_end) = explode('-', $infos['date_end']); |
|
38 | 38 | |
39 | -if (!api_is_platform_admin() && $infos['session_admin_id']!=$_user['user_id'] && !api_is_session_admin()) { |
|
39 | +if (!api_is_platform_admin() && $infos['session_admin_id'] != $_user['user_id'] && !api_is_session_admin()) { |
|
40 | 40 | api_not_allowed(true); |
41 | 41 | } |
42 | 42 | |
@@ -73,24 +73,24 @@ discard block |
||
73 | 73 | // display the header |
74 | 74 | Display::display_header($tool_name); |
75 | 75 | if (!empty($return)) { |
76 | - Display::display_error_message($return,false); |
|
76 | + Display::display_error_message($return, false); |
|
77 | 77 | } |
78 | 78 | ?> |
79 | 79 | <div class="row"> |
80 | 80 | <div class="col-md-12"> |
81 | 81 | <form method="post" name="form" action="<?php echo api_get_self(); ?>?id=<?php echo $id; ?>" class="form-horizontal"> |
82 | 82 | <input type="hidden" name="formSent" value="1"> |
83 | - <legend><?php echo $tool_name;?> </legend> |
|
83 | + <legend><?php echo $tool_name; ?> </legend> |
|
84 | 84 | <div class="form-group"> |
85 | 85 | <label class="col-sm-3 control-label"><?php echo get_lang('SessionName') ?></label> |
86 | 86 | <div class="col-sm-6"> |
87 | - <input class="form-control" type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); else echo api_htmlentities($infos['name'],ENT_QUOTES,$charset); ?>"> |
|
87 | + <input class="form-control" type="text" name="name" size="50" maxlength="50" value="<?php if ($formSent) echo api_htmlentities($name, ENT_QUOTES, $charset); else echo api_htmlentities($infos['name'], ENT_QUOTES, $charset); ?>"> |
|
88 | 88 | </div> |
89 | 89 | <div class="col-sm-3"></div> |
90 | 90 | </div> |
91 | 91 | <div class="form-group"> |
92 | 92 | <div class="col-sm-offset-3 col-sm-6"> |
93 | - <?php echo get_lang('TheTimeLimitsAreReferential');?> |
|
93 | + <?php echo get_lang('TheTimeLimitsAreReferential'); ?> |
|
94 | 94 | <a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('EditTimeLimit') ?></a> |
95 | 95 | </div> |
96 | 96 | </div> |
@@ -100,58 +100,58 @@ discard block |
||
100 | 100 | <div class="col-sm-6"> |
101 | 101 | <select name="day_start"> |
102 | 102 | <option value="1">01</option> |
103 | - <option value="2" <?php if($day_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
104 | - <option value="3" <?php if($day_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
105 | - <option value="4" <?php if($day_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
106 | - <option value="5" <?php if($day_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
107 | - <option value="6" <?php if($day_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
108 | - <option value="7" <?php if($day_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
109 | - <option value="8" <?php if($day_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
110 | - <option value="9" <?php if($day_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
111 | - <option value="10" <?php if($day_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
112 | - <option value="11" <?php if($day_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
113 | - <option value="12" <?php if($day_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
114 | - <option value="13" <?php if($day_start == 13) echo 'selected="selected"'; ?> >13</option> |
|
115 | - <option value="14" <?php if($day_start == 14) echo 'selected="selected"'; ?> >14</option> |
|
116 | - <option value="15" <?php if($day_start == 15) echo 'selected="selected"'; ?> >15</option> |
|
117 | - <option value="16" <?php if($day_start == 16) echo 'selected="selected"'; ?> >16</option> |
|
118 | - <option value="17" <?php if($day_start == 17) echo 'selected="selected"'; ?> >17</option> |
|
119 | - <option value="18" <?php if($day_start == 18) echo 'selected="selected"'; ?> >18</option> |
|
120 | - <option value="19" <?php if($day_start == 19) echo 'selected="selected"'; ?> >19</option> |
|
121 | - <option value="20" <?php if($day_start == 20) echo 'selected="selected"'; ?> >20</option> |
|
122 | - <option value="21" <?php if($day_start == 21) echo 'selected="selected"'; ?> >21</option> |
|
123 | - <option value="22" <?php if($day_start == 22) echo 'selected="selected"'; ?> >22</option> |
|
124 | - <option value="23" <?php if($day_start == 23) echo 'selected="selected"'; ?> >23</option> |
|
125 | - <option value="24" <?php if($day_start == 24) echo 'selected="selected"'; ?> >24</option> |
|
126 | - <option value="25" <?php if($day_start == 25) echo 'selected="selected"'; ?> >25</option> |
|
127 | - <option value="26" <?php if($day_start == 26) echo 'selected="selected"'; ?> >26</option> |
|
128 | - <option value="27" <?php if($day_start == 27) echo 'selected="selected"'; ?> >27</option> |
|
129 | - <option value="28" <?php if($day_start == 28) echo 'selected="selected"'; ?> >28</option> |
|
130 | - <option value="29" <?php if($day_start == 29) echo 'selected="selected"'; ?> >29</option> |
|
131 | - <option value="30" <?php if($day_start == 30) echo 'selected="selected"'; ?> >30</option> |
|
132 | - <option value="31" <?php if($day_start == 31) echo 'selected="selected"'; ?> >31</option> |
|
103 | + <option value="2" <?php if ($day_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
104 | + <option value="3" <?php if ($day_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
105 | + <option value="4" <?php if ($day_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
106 | + <option value="5" <?php if ($day_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
107 | + <option value="6" <?php if ($day_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
108 | + <option value="7" <?php if ($day_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
109 | + <option value="8" <?php if ($day_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
110 | + <option value="9" <?php if ($day_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
111 | + <option value="10" <?php if ($day_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
112 | + <option value="11" <?php if ($day_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
113 | + <option value="12" <?php if ($day_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
114 | + <option value="13" <?php if ($day_start == 13) echo 'selected="selected"'; ?> >13</option> |
|
115 | + <option value="14" <?php if ($day_start == 14) echo 'selected="selected"'; ?> >14</option> |
|
116 | + <option value="15" <?php if ($day_start == 15) echo 'selected="selected"'; ?> >15</option> |
|
117 | + <option value="16" <?php if ($day_start == 16) echo 'selected="selected"'; ?> >16</option> |
|
118 | + <option value="17" <?php if ($day_start == 17) echo 'selected="selected"'; ?> >17</option> |
|
119 | + <option value="18" <?php if ($day_start == 18) echo 'selected="selected"'; ?> >18</option> |
|
120 | + <option value="19" <?php if ($day_start == 19) echo 'selected="selected"'; ?> >19</option> |
|
121 | + <option value="20" <?php if ($day_start == 20) echo 'selected="selected"'; ?> >20</option> |
|
122 | + <option value="21" <?php if ($day_start == 21) echo 'selected="selected"'; ?> >21</option> |
|
123 | + <option value="22" <?php if ($day_start == 22) echo 'selected="selected"'; ?> >22</option> |
|
124 | + <option value="23" <?php if ($day_start == 23) echo 'selected="selected"'; ?> >23</option> |
|
125 | + <option value="24" <?php if ($day_start == 24) echo 'selected="selected"'; ?> >24</option> |
|
126 | + <option value="25" <?php if ($day_start == 25) echo 'selected="selected"'; ?> >25</option> |
|
127 | + <option value="26" <?php if ($day_start == 26) echo 'selected="selected"'; ?> >26</option> |
|
128 | + <option value="27" <?php if ($day_start == 27) echo 'selected="selected"'; ?> >27</option> |
|
129 | + <option value="28" <?php if ($day_start == 28) echo 'selected="selected"'; ?> >28</option> |
|
130 | + <option value="29" <?php if ($day_start == 29) echo 'selected="selected"'; ?> >29</option> |
|
131 | + <option value="30" <?php if ($day_start == 30) echo 'selected="selected"'; ?> >30</option> |
|
132 | + <option value="31" <?php if ($day_start == 31) echo 'selected="selected"'; ?> >31</option> |
|
133 | 133 | </select> |
134 | 134 | / |
135 | 135 | <select name="month_start"> |
136 | 136 | <option value="1">01</option> |
137 | - <option value="2" <?php if($month_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
138 | - <option value="3" <?php if($month_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
139 | - <option value="4" <?php if($month_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
140 | - <option value="5" <?php if($month_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
141 | - <option value="6" <?php if($month_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
142 | - <option value="7" <?php if($month_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
143 | - <option value="8" <?php if($month_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
144 | - <option value="9" <?php if($month_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
145 | - <option value="10" <?php if($month_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
146 | - <option value="11" <?php if($month_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
147 | - <option value="12" <?php if($month_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
137 | + <option value="2" <?php if ($month_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
138 | + <option value="3" <?php if ($month_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
139 | + <option value="4" <?php if ($month_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
140 | + <option value="5" <?php if ($month_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
141 | + <option value="6" <?php if ($month_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
142 | + <option value="7" <?php if ($month_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
143 | + <option value="8" <?php if ($month_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
144 | + <option value="9" <?php if ($month_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
145 | + <option value="10" <?php if ($month_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
146 | + <option value="11" <?php if ($month_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
147 | + <option value="12" <?php if ($month_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
148 | 148 | </select> |
149 | 149 | / |
150 | 150 | <select name="year_start"> |
151 | 151 | <?php |
152 | - for($i=$thisYear-5;$i <= ($thisYear+5);$i++) |
|
152 | + for ($i = $thisYear - 5; $i <= ($thisYear + 5); $i++) |
|
153 | 153 | { ?> |
154 | - <option value="<?php echo $i; ?>" <?php if($year_start == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
154 | + <option value="<?php echo $i; ?>" <?php if ($year_start == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
155 | 155 | <?php |
156 | 156 | } ?> |
157 | 157 | </select> |
@@ -163,61 +163,61 @@ discard block |
||
163 | 163 | <div class="col-sm-6"> |
164 | 164 | <select name="day_end"> |
165 | 165 | <option value="0">--</option> |
166 | - <option value="1" <?php if($day_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
167 | - <option value="2" <?php if($day_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
168 | - <option value="3" <?php if($day_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
169 | - <option value="4" <?php if($day_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
170 | - <option value="5" <?php if($day_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
171 | - <option value="6" <?php if($day_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
172 | - <option value="7" <?php if($day_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
173 | - <option value="8" <?php if($day_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
174 | - <option value="9" <?php if($day_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
175 | - <option value="10" <?php if($day_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
176 | - <option value="11" <?php if($day_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
177 | - <option value="12" <?php if($day_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
178 | - <option value="13" <?php if($day_end == 13) echo 'selected="selected"'; ?> >13</option> |
|
179 | - <option value="14" <?php if($day_end == 14) echo 'selected="selected"'; ?> >14</option> |
|
180 | - <option value="15" <?php if($day_end == 15) echo 'selected="selected"'; ?> >15</option> |
|
181 | - <option value="16" <?php if($day_end == 16) echo 'selected="selected"'; ?> >16</option> |
|
182 | - <option value="17" <?php if($day_end == 17) echo 'selected="selected"'; ?> >17</option> |
|
183 | - <option value="18" <?php if($day_end == 18) echo 'selected="selected"'; ?> >18</option> |
|
184 | - <option value="19" <?php if($day_end == 19) echo 'selected="selected"'; ?> >19</option> |
|
185 | - <option value="20" <?php if($day_end == 20) echo 'selected="selected"'; ?> >20</option> |
|
186 | - <option value="21" <?php if($day_end == 21) echo 'selected="selected"'; ?> >21</option> |
|
187 | - <option value="22" <?php if($day_end == 22) echo 'selected="selected"'; ?> >22</option> |
|
188 | - <option value="23" <?php if($day_end == 23) echo 'selected="selected"'; ?> >23</option> |
|
189 | - <option value="24" <?php if($day_end == 24) echo 'selected="selected"'; ?> >24</option> |
|
190 | - <option value="25" <?php if($day_end == 25) echo 'selected="selected"'; ?> >25</option> |
|
191 | - <option value="26" <?php if($day_end == 26) echo 'selected="selected"'; ?> >26</option> |
|
192 | - <option value="27" <?php if($day_end == 27) echo 'selected="selected"'; ?> >27</option> |
|
193 | - <option value="28" <?php if($day_end == 28) echo 'selected="selected"'; ?> >28</option> |
|
194 | - <option value="29" <?php if($day_end == 29) echo 'selected="selected"'; ?> >29</option> |
|
195 | - <option value="30" <?php if($day_end == 30) echo 'selected="selected"'; ?> >30</option> |
|
196 | - <option value="31" <?php if($day_end == 31) echo 'selected="selected"'; ?> >31</option> |
|
166 | + <option value="1" <?php if ($day_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
167 | + <option value="2" <?php if ($day_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
168 | + <option value="3" <?php if ($day_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
169 | + <option value="4" <?php if ($day_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
170 | + <option value="5" <?php if ($day_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
171 | + <option value="6" <?php if ($day_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
172 | + <option value="7" <?php if ($day_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
173 | + <option value="8" <?php if ($day_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
174 | + <option value="9" <?php if ($day_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
175 | + <option value="10" <?php if ($day_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
176 | + <option value="11" <?php if ($day_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
177 | + <option value="12" <?php if ($day_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
178 | + <option value="13" <?php if ($day_end == 13) echo 'selected="selected"'; ?> >13</option> |
|
179 | + <option value="14" <?php if ($day_end == 14) echo 'selected="selected"'; ?> >14</option> |
|
180 | + <option value="15" <?php if ($day_end == 15) echo 'selected="selected"'; ?> >15</option> |
|
181 | + <option value="16" <?php if ($day_end == 16) echo 'selected="selected"'; ?> >16</option> |
|
182 | + <option value="17" <?php if ($day_end == 17) echo 'selected="selected"'; ?> >17</option> |
|
183 | + <option value="18" <?php if ($day_end == 18) echo 'selected="selected"'; ?> >18</option> |
|
184 | + <option value="19" <?php if ($day_end == 19) echo 'selected="selected"'; ?> >19</option> |
|
185 | + <option value="20" <?php if ($day_end == 20) echo 'selected="selected"'; ?> >20</option> |
|
186 | + <option value="21" <?php if ($day_end == 21) echo 'selected="selected"'; ?> >21</option> |
|
187 | + <option value="22" <?php if ($day_end == 22) echo 'selected="selected"'; ?> >22</option> |
|
188 | + <option value="23" <?php if ($day_end == 23) echo 'selected="selected"'; ?> >23</option> |
|
189 | + <option value="24" <?php if ($day_end == 24) echo 'selected="selected"'; ?> >24</option> |
|
190 | + <option value="25" <?php if ($day_end == 25) echo 'selected="selected"'; ?> >25</option> |
|
191 | + <option value="26" <?php if ($day_end == 26) echo 'selected="selected"'; ?> >26</option> |
|
192 | + <option value="27" <?php if ($day_end == 27) echo 'selected="selected"'; ?> >27</option> |
|
193 | + <option value="28" <?php if ($day_end == 28) echo 'selected="selected"'; ?> >28</option> |
|
194 | + <option value="29" <?php if ($day_end == 29) echo 'selected="selected"'; ?> >29</option> |
|
195 | + <option value="30" <?php if ($day_end == 30) echo 'selected="selected"'; ?> >30</option> |
|
196 | + <option value="31" <?php if ($day_end == 31) echo 'selected="selected"'; ?> >31</option> |
|
197 | 197 | </select> |
198 | 198 | / |
199 | 199 | <select name="month_end"> |
200 | 200 | <option value="0">--</option> |
201 | - <option value="1" <?php if($month_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
202 | - <option value="2" <?php if($month_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
203 | - <option value="3" <?php if($month_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
204 | - <option value="4" <?php if($month_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
205 | - <option value="5" <?php if($month_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
206 | - <option value="6" <?php if($month_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
207 | - <option value="7" <?php if($month_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
208 | - <option value="8" <?php if($month_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
209 | - <option value="9" <?php if($month_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
210 | - <option value="10" <?php if($month_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
211 | - <option value="11" <?php if($month_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
212 | - <option value="12" <?php if($month_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
201 | + <option value="1" <?php if ($month_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
202 | + <option value="2" <?php if ($month_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
203 | + <option value="3" <?php if ($month_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
204 | + <option value="4" <?php if ($month_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
205 | + <option value="5" <?php if ($month_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
206 | + <option value="6" <?php if ($month_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
207 | + <option value="7" <?php if ($month_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
208 | + <option value="8" <?php if ($month_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
209 | + <option value="9" <?php if ($month_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
210 | + <option value="10" <?php if ($month_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
211 | + <option value="11" <?php if ($month_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
212 | + <option value="12" <?php if ($month_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
213 | 213 | </select> |
214 | 214 | / |
215 | 215 | <select name="year_end"> |
216 | 216 | <option value="0">----</option> |
217 | 217 | <?php |
218 | - for($i=$thisYear-5;$i <= ($thisYear+5);$i++) |
|
218 | + for ($i = $thisYear - 5; $i <= ($thisYear + 5); $i++) |
|
219 | 219 | { ?> |
220 | - <option value="<?php echo $i; ?>" <?php if($year_end == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
220 | + <option value="<?php echo $i; ?>" <?php if ($year_end == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
221 | 221 | <?php |
222 | 222 | } ?> |
223 | 223 | </select> |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | |
240 | 240 | <script> |
241 | -<?php if($year_start=="0000") echo "setDisable(document.form.nolimit);\r\n"; ?> |
|
241 | +<?php if ($year_start == "0000") echo "setDisable(document.form.nolimit);\r\n"; ?> |
|
242 | 242 | function setDisable(select){ |
243 | 243 | document.form.day_start.disabled = (select.checked) ? true : false; |
244 | 244 | document.form.month_start.disabled = (select.checked) ? true : false; |
@@ -84,7 +84,12 @@ discard block |
||
84 | 84 | <div class="form-group"> |
85 | 85 | <label class="col-sm-3 control-label"><?php echo get_lang('SessionName') ?></label> |
86 | 86 | <div class="col-sm-6"> |
87 | - <input class="form-control" type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); else echo api_htmlentities($infos['name'],ENT_QUOTES,$charset); ?>"> |
|
87 | + <input class="form-control" type="text" name="name" size="50" maxlength="50" value="<?php if($formSent) { |
|
88 | + echo api_htmlentities($name,ENT_QUOTES,$charset); |
|
89 | +} else { |
|
90 | + echo api_htmlentities($infos['name'],ENT_QUOTES,$charset); |
|
91 | +} |
|
92 | +?>"> |
|
88 | 93 | </div> |
89 | 94 | <div class="col-sm-3"></div> |
90 | 95 | </div> |
@@ -100,58 +105,184 @@ discard block |
||
100 | 105 | <div class="col-sm-6"> |
101 | 106 | <select name="day_start"> |
102 | 107 | <option value="1">01</option> |
103 | - <option value="2" <?php if($day_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
104 | - <option value="3" <?php if($day_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
105 | - <option value="4" <?php if($day_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
106 | - <option value="5" <?php if($day_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
107 | - <option value="6" <?php if($day_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
108 | - <option value="7" <?php if($day_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
109 | - <option value="8" <?php if($day_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
110 | - <option value="9" <?php if($day_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
111 | - <option value="10" <?php if($day_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
112 | - <option value="11" <?php if($day_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
113 | - <option value="12" <?php if($day_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
114 | - <option value="13" <?php if($day_start == 13) echo 'selected="selected"'; ?> >13</option> |
|
115 | - <option value="14" <?php if($day_start == 14) echo 'selected="selected"'; ?> >14</option> |
|
116 | - <option value="15" <?php if($day_start == 15) echo 'selected="selected"'; ?> >15</option> |
|
117 | - <option value="16" <?php if($day_start == 16) echo 'selected="selected"'; ?> >16</option> |
|
118 | - <option value="17" <?php if($day_start == 17) echo 'selected="selected"'; ?> >17</option> |
|
119 | - <option value="18" <?php if($day_start == 18) echo 'selected="selected"'; ?> >18</option> |
|
120 | - <option value="19" <?php if($day_start == 19) echo 'selected="selected"'; ?> >19</option> |
|
121 | - <option value="20" <?php if($day_start == 20) echo 'selected="selected"'; ?> >20</option> |
|
122 | - <option value="21" <?php if($day_start == 21) echo 'selected="selected"'; ?> >21</option> |
|
123 | - <option value="22" <?php if($day_start == 22) echo 'selected="selected"'; ?> >22</option> |
|
124 | - <option value="23" <?php if($day_start == 23) echo 'selected="selected"'; ?> >23</option> |
|
125 | - <option value="24" <?php if($day_start == 24) echo 'selected="selected"'; ?> >24</option> |
|
126 | - <option value="25" <?php if($day_start == 25) echo 'selected="selected"'; ?> >25</option> |
|
127 | - <option value="26" <?php if($day_start == 26) echo 'selected="selected"'; ?> >26</option> |
|
128 | - <option value="27" <?php if($day_start == 27) echo 'selected="selected"'; ?> >27</option> |
|
129 | - <option value="28" <?php if($day_start == 28) echo 'selected="selected"'; ?> >28</option> |
|
130 | - <option value="29" <?php if($day_start == 29) echo 'selected="selected"'; ?> >29</option> |
|
131 | - <option value="30" <?php if($day_start == 30) echo 'selected="selected"'; ?> >30</option> |
|
132 | - <option value="31" <?php if($day_start == 31) echo 'selected="selected"'; ?> >31</option> |
|
108 | + <option value="2" <?php if($day_start == 2) { |
|
109 | + echo 'selected="selected"'; |
|
110 | +} |
|
111 | +?> >02</option> |
|
112 | + <option value="3" <?php if($day_start == 3) { |
|
113 | + echo 'selected="selected"'; |
|
114 | +} |
|
115 | +?> >03</option> |
|
116 | + <option value="4" <?php if($day_start == 4) { |
|
117 | + echo 'selected="selected"'; |
|
118 | +} |
|
119 | +?> >04</option> |
|
120 | + <option value="5" <?php if($day_start == 5) { |
|
121 | + echo 'selected="selected"'; |
|
122 | +} |
|
123 | +?> >05</option> |
|
124 | + <option value="6" <?php if($day_start == 6) { |
|
125 | + echo 'selected="selected"'; |
|
126 | +} |
|
127 | +?> >06</option> |
|
128 | + <option value="7" <?php if($day_start == 7) { |
|
129 | + echo 'selected="selected"'; |
|
130 | +} |
|
131 | +?> >07</option> |
|
132 | + <option value="8" <?php if($day_start == 8) { |
|
133 | + echo 'selected="selected"'; |
|
134 | +} |
|
135 | +?> >08</option> |
|
136 | + <option value="9" <?php if($day_start == 9) { |
|
137 | + echo 'selected="selected"'; |
|
138 | +} |
|
139 | +?> >09</option> |
|
140 | + <option value="10" <?php if($day_start == 10) { |
|
141 | + echo 'selected="selected"'; |
|
142 | +} |
|
143 | +?> >10</option> |
|
144 | + <option value="11" <?php if($day_start == 11) { |
|
145 | + echo 'selected="selected"'; |
|
146 | +} |
|
147 | +?> >11</option> |
|
148 | + <option value="12" <?php if($day_start == 12) { |
|
149 | + echo 'selected="selected"'; |
|
150 | +} |
|
151 | +?> >12</option> |
|
152 | + <option value="13" <?php if($day_start == 13) { |
|
153 | + echo 'selected="selected"'; |
|
154 | +} |
|
155 | +?> >13</option> |
|
156 | + <option value="14" <?php if($day_start == 14) { |
|
157 | + echo 'selected="selected"'; |
|
158 | +} |
|
159 | +?> >14</option> |
|
160 | + <option value="15" <?php if($day_start == 15) { |
|
161 | + echo 'selected="selected"'; |
|
162 | +} |
|
163 | +?> >15</option> |
|
164 | + <option value="16" <?php if($day_start == 16) { |
|
165 | + echo 'selected="selected"'; |
|
166 | +} |
|
167 | +?> >16</option> |
|
168 | + <option value="17" <?php if($day_start == 17) { |
|
169 | + echo 'selected="selected"'; |
|
170 | +} |
|
171 | +?> >17</option> |
|
172 | + <option value="18" <?php if($day_start == 18) { |
|
173 | + echo 'selected="selected"'; |
|
174 | +} |
|
175 | +?> >18</option> |
|
176 | + <option value="19" <?php if($day_start == 19) { |
|
177 | + echo 'selected="selected"'; |
|
178 | +} |
|
179 | +?> >19</option> |
|
180 | + <option value="20" <?php if($day_start == 20) { |
|
181 | + echo 'selected="selected"'; |
|
182 | +} |
|
183 | +?> >20</option> |
|
184 | + <option value="21" <?php if($day_start == 21) { |
|
185 | + echo 'selected="selected"'; |
|
186 | +} |
|
187 | +?> >21</option> |
|
188 | + <option value="22" <?php if($day_start == 22) { |
|
189 | + echo 'selected="selected"'; |
|
190 | +} |
|
191 | +?> >22</option> |
|
192 | + <option value="23" <?php if($day_start == 23) { |
|
193 | + echo 'selected="selected"'; |
|
194 | +} |
|
195 | +?> >23</option> |
|
196 | + <option value="24" <?php if($day_start == 24) { |
|
197 | + echo 'selected="selected"'; |
|
198 | +} |
|
199 | +?> >24</option> |
|
200 | + <option value="25" <?php if($day_start == 25) { |
|
201 | + echo 'selected="selected"'; |
|
202 | +} |
|
203 | +?> >25</option> |
|
204 | + <option value="26" <?php if($day_start == 26) { |
|
205 | + echo 'selected="selected"'; |
|
206 | +} |
|
207 | +?> >26</option> |
|
208 | + <option value="27" <?php if($day_start == 27) { |
|
209 | + echo 'selected="selected"'; |
|
210 | +} |
|
211 | +?> >27</option> |
|
212 | + <option value="28" <?php if($day_start == 28) { |
|
213 | + echo 'selected="selected"'; |
|
214 | +} |
|
215 | +?> >28</option> |
|
216 | + <option value="29" <?php if($day_start == 29) { |
|
217 | + echo 'selected="selected"'; |
|
218 | +} |
|
219 | +?> >29</option> |
|
220 | + <option value="30" <?php if($day_start == 30) { |
|
221 | + echo 'selected="selected"'; |
|
222 | +} |
|
223 | +?> >30</option> |
|
224 | + <option value="31" <?php if($day_start == 31) { |
|
225 | + echo 'selected="selected"'; |
|
226 | +} |
|
227 | +?> >31</option> |
|
133 | 228 | </select> |
134 | 229 | / |
135 | 230 | <select name="month_start"> |
136 | 231 | <option value="1">01</option> |
137 | - <option value="2" <?php if($month_start == 2) echo 'selected="selected"'; ?> >02</option> |
|
138 | - <option value="3" <?php if($month_start == 3) echo 'selected="selected"'; ?> >03</option> |
|
139 | - <option value="4" <?php if($month_start == 4) echo 'selected="selected"'; ?> >04</option> |
|
140 | - <option value="5" <?php if($month_start == 5) echo 'selected="selected"'; ?> >05</option> |
|
141 | - <option value="6" <?php if($month_start == 6) echo 'selected="selected"'; ?> >06</option> |
|
142 | - <option value="7" <?php if($month_start == 7) echo 'selected="selected"'; ?> >07</option> |
|
143 | - <option value="8" <?php if($month_start == 8) echo 'selected="selected"'; ?> >08</option> |
|
144 | - <option value="9" <?php if($month_start == 9) echo 'selected="selected"'; ?> >09</option> |
|
145 | - <option value="10" <?php if($month_start == 10) echo 'selected="selected"'; ?> >10</option> |
|
146 | - <option value="11" <?php if($month_start == 11) echo 'selected="selected"'; ?> >11</option> |
|
147 | - <option value="12" <?php if($month_start == 12) echo 'selected="selected"'; ?> >12</option> |
|
232 | + <option value="2" <?php if($month_start == 2) { |
|
233 | + echo 'selected="selected"'; |
|
234 | +} |
|
235 | +?> >02</option> |
|
236 | + <option value="3" <?php if($month_start == 3) { |
|
237 | + echo 'selected="selected"'; |
|
238 | +} |
|
239 | +?> >03</option> |
|
240 | + <option value="4" <?php if($month_start == 4) { |
|
241 | + echo 'selected="selected"'; |
|
242 | +} |
|
243 | +?> >04</option> |
|
244 | + <option value="5" <?php if($month_start == 5) { |
|
245 | + echo 'selected="selected"'; |
|
246 | +} |
|
247 | +?> >05</option> |
|
248 | + <option value="6" <?php if($month_start == 6) { |
|
249 | + echo 'selected="selected"'; |
|
250 | +} |
|
251 | +?> >06</option> |
|
252 | + <option value="7" <?php if($month_start == 7) { |
|
253 | + echo 'selected="selected"'; |
|
254 | +} |
|
255 | +?> >07</option> |
|
256 | + <option value="8" <?php if($month_start == 8) { |
|
257 | + echo 'selected="selected"'; |
|
258 | +} |
|
259 | +?> >08</option> |
|
260 | + <option value="9" <?php if($month_start == 9) { |
|
261 | + echo 'selected="selected"'; |
|
262 | +} |
|
263 | +?> >09</option> |
|
264 | + <option value="10" <?php if($month_start == 10) { |
|
265 | + echo 'selected="selected"'; |
|
266 | +} |
|
267 | +?> >10</option> |
|
268 | + <option value="11" <?php if($month_start == 11) { |
|
269 | + echo 'selected="selected"'; |
|
270 | +} |
|
271 | +?> >11</option> |
|
272 | + <option value="12" <?php if($month_start == 12) { |
|
273 | + echo 'selected="selected"'; |
|
274 | +} |
|
275 | +?> >12</option> |
|
148 | 276 | </select> |
149 | 277 | / |
150 | 278 | <select name="year_start"> |
151 | 279 | <?php |
152 | 280 | for($i=$thisYear-5;$i <= ($thisYear+5);$i++) |
153 | 281 | { ?> |
154 | - <option value="<?php echo $i; ?>" <?php if($year_start == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
282 | + <option value="<?php echo $i; ?>" <?php if($year_start == $i) { |
|
283 | + echo 'selected="selected"'; |
|
284 | +} |
|
285 | +?> ><?php echo $i; ?></option> |
|
155 | 286 | <?php |
156 | 287 | } ?> |
157 | 288 | </select> |
@@ -163,53 +294,182 @@ discard block |
||
163 | 294 | <div class="col-sm-6"> |
164 | 295 | <select name="day_end"> |
165 | 296 | <option value="0">--</option> |
166 | - <option value="1" <?php if($day_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
167 | - <option value="2" <?php if($day_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
168 | - <option value="3" <?php if($day_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
169 | - <option value="4" <?php if($day_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
170 | - <option value="5" <?php if($day_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
171 | - <option value="6" <?php if($day_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
172 | - <option value="7" <?php if($day_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
173 | - <option value="8" <?php if($day_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
174 | - <option value="9" <?php if($day_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
175 | - <option value="10" <?php if($day_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
176 | - <option value="11" <?php if($day_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
177 | - <option value="12" <?php if($day_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
178 | - <option value="13" <?php if($day_end == 13) echo 'selected="selected"'; ?> >13</option> |
|
179 | - <option value="14" <?php if($day_end == 14) echo 'selected="selected"'; ?> >14</option> |
|
180 | - <option value="15" <?php if($day_end == 15) echo 'selected="selected"'; ?> >15</option> |
|
181 | - <option value="16" <?php if($day_end == 16) echo 'selected="selected"'; ?> >16</option> |
|
182 | - <option value="17" <?php if($day_end == 17) echo 'selected="selected"'; ?> >17</option> |
|
183 | - <option value="18" <?php if($day_end == 18) echo 'selected="selected"'; ?> >18</option> |
|
184 | - <option value="19" <?php if($day_end == 19) echo 'selected="selected"'; ?> >19</option> |
|
185 | - <option value="20" <?php if($day_end == 20) echo 'selected="selected"'; ?> >20</option> |
|
186 | - <option value="21" <?php if($day_end == 21) echo 'selected="selected"'; ?> >21</option> |
|
187 | - <option value="22" <?php if($day_end == 22) echo 'selected="selected"'; ?> >22</option> |
|
188 | - <option value="23" <?php if($day_end == 23) echo 'selected="selected"'; ?> >23</option> |
|
189 | - <option value="24" <?php if($day_end == 24) echo 'selected="selected"'; ?> >24</option> |
|
190 | - <option value="25" <?php if($day_end == 25) echo 'selected="selected"'; ?> >25</option> |
|
191 | - <option value="26" <?php if($day_end == 26) echo 'selected="selected"'; ?> >26</option> |
|
192 | - <option value="27" <?php if($day_end == 27) echo 'selected="selected"'; ?> >27</option> |
|
193 | - <option value="28" <?php if($day_end == 28) echo 'selected="selected"'; ?> >28</option> |
|
194 | - <option value="29" <?php if($day_end == 29) echo 'selected="selected"'; ?> >29</option> |
|
195 | - <option value="30" <?php if($day_end == 30) echo 'selected="selected"'; ?> >30</option> |
|
196 | - <option value="31" <?php if($day_end == 31) echo 'selected="selected"'; ?> >31</option> |
|
297 | + <option value="1" <?php if($day_end == 1) { |
|
298 | + echo 'selected="selected"'; |
|
299 | +} |
|
300 | +?> >01</option> |
|
301 | + <option value="2" <?php if($day_end == 2) { |
|
302 | + echo 'selected="selected"'; |
|
303 | +} |
|
304 | +?> >02</option> |
|
305 | + <option value="3" <?php if($day_end == 3) { |
|
306 | + echo 'selected="selected"'; |
|
307 | +} |
|
308 | +?> >03</option> |
|
309 | + <option value="4" <?php if($day_end == 4) { |
|
310 | + echo 'selected="selected"'; |
|
311 | +} |
|
312 | +?> >04</option> |
|
313 | + <option value="5" <?php if($day_end == 5) { |
|
314 | + echo 'selected="selected"'; |
|
315 | +} |
|
316 | +?> >05</option> |
|
317 | + <option value="6" <?php if($day_end == 6) { |
|
318 | + echo 'selected="selected"'; |
|
319 | +} |
|
320 | +?> >06</option> |
|
321 | + <option value="7" <?php if($day_end == 7) { |
|
322 | + echo 'selected="selected"'; |
|
323 | +} |
|
324 | +?> >07</option> |
|
325 | + <option value="8" <?php if($day_end == 8) { |
|
326 | + echo 'selected="selected"'; |
|
327 | +} |
|
328 | +?> >08</option> |
|
329 | + <option value="9" <?php if($day_end == 9) { |
|
330 | + echo 'selected="selected"'; |
|
331 | +} |
|
332 | +?> >09</option> |
|
333 | + <option value="10" <?php if($day_end == 10) { |
|
334 | + echo 'selected="selected"'; |
|
335 | +} |
|
336 | +?> >10</option> |
|
337 | + <option value="11" <?php if($day_end == 11) { |
|
338 | + echo 'selected="selected"'; |
|
339 | +} |
|
340 | +?> >11</option> |
|
341 | + <option value="12" <?php if($day_end == 12) { |
|
342 | + echo 'selected="selected"'; |
|
343 | +} |
|
344 | +?> >12</option> |
|
345 | + <option value="13" <?php if($day_end == 13) { |
|
346 | + echo 'selected="selected"'; |
|
347 | +} |
|
348 | +?> >13</option> |
|
349 | + <option value="14" <?php if($day_end == 14) { |
|
350 | + echo 'selected="selected"'; |
|
351 | +} |
|
352 | +?> >14</option> |
|
353 | + <option value="15" <?php if($day_end == 15) { |
|
354 | + echo 'selected="selected"'; |
|
355 | +} |
|
356 | +?> >15</option> |
|
357 | + <option value="16" <?php if($day_end == 16) { |
|
358 | + echo 'selected="selected"'; |
|
359 | +} |
|
360 | +?> >16</option> |
|
361 | + <option value="17" <?php if($day_end == 17) { |
|
362 | + echo 'selected="selected"'; |
|
363 | +} |
|
364 | +?> >17</option> |
|
365 | + <option value="18" <?php if($day_end == 18) { |
|
366 | + echo 'selected="selected"'; |
|
367 | +} |
|
368 | +?> >18</option> |
|
369 | + <option value="19" <?php if($day_end == 19) { |
|
370 | + echo 'selected="selected"'; |
|
371 | +} |
|
372 | +?> >19</option> |
|
373 | + <option value="20" <?php if($day_end == 20) { |
|
374 | + echo 'selected="selected"'; |
|
375 | +} |
|
376 | +?> >20</option> |
|
377 | + <option value="21" <?php if($day_end == 21) { |
|
378 | + echo 'selected="selected"'; |
|
379 | +} |
|
380 | +?> >21</option> |
|
381 | + <option value="22" <?php if($day_end == 22) { |
|
382 | + echo 'selected="selected"'; |
|
383 | +} |
|
384 | +?> >22</option> |
|
385 | + <option value="23" <?php if($day_end == 23) { |
|
386 | + echo 'selected="selected"'; |
|
387 | +} |
|
388 | +?> >23</option> |
|
389 | + <option value="24" <?php if($day_end == 24) { |
|
390 | + echo 'selected="selected"'; |
|
391 | +} |
|
392 | +?> >24</option> |
|
393 | + <option value="25" <?php if($day_end == 25) { |
|
394 | + echo 'selected="selected"'; |
|
395 | +} |
|
396 | +?> >25</option> |
|
397 | + <option value="26" <?php if($day_end == 26) { |
|
398 | + echo 'selected="selected"'; |
|
399 | +} |
|
400 | +?> >26</option> |
|
401 | + <option value="27" <?php if($day_end == 27) { |
|
402 | + echo 'selected="selected"'; |
|
403 | +} |
|
404 | +?> >27</option> |
|
405 | + <option value="28" <?php if($day_end == 28) { |
|
406 | + echo 'selected="selected"'; |
|
407 | +} |
|
408 | +?> >28</option> |
|
409 | + <option value="29" <?php if($day_end == 29) { |
|
410 | + echo 'selected="selected"'; |
|
411 | +} |
|
412 | +?> >29</option> |
|
413 | + <option value="30" <?php if($day_end == 30) { |
|
414 | + echo 'selected="selected"'; |
|
415 | +} |
|
416 | +?> >30</option> |
|
417 | + <option value="31" <?php if($day_end == 31) { |
|
418 | + echo 'selected="selected"'; |
|
419 | +} |
|
420 | +?> >31</option> |
|
197 | 421 | </select> |
198 | 422 | / |
199 | 423 | <select name="month_end"> |
200 | 424 | <option value="0">--</option> |
201 | - <option value="1" <?php if($month_end == 1) echo 'selected="selected"'; ?> >01</option> |
|
202 | - <option value="2" <?php if($month_end == 2) echo 'selected="selected"'; ?> >02</option> |
|
203 | - <option value="3" <?php if($month_end == 3) echo 'selected="selected"'; ?> >03</option> |
|
204 | - <option value="4" <?php if($month_end == 4) echo 'selected="selected"'; ?> >04</option> |
|
205 | - <option value="5" <?php if($month_end == 5) echo 'selected="selected"'; ?> >05</option> |
|
206 | - <option value="6" <?php if($month_end == 6) echo 'selected="selected"'; ?> >06</option> |
|
207 | - <option value="7" <?php if($month_end == 7) echo 'selected="selected"'; ?> >07</option> |
|
208 | - <option value="8" <?php if($month_end == 8) echo 'selected="selected"'; ?> >08</option> |
|
209 | - <option value="9" <?php if($month_end == 9) echo 'selected="selected"'; ?> >09</option> |
|
210 | - <option value="10" <?php if($month_end == 10) echo 'selected="selected"'; ?> >10</option> |
|
211 | - <option value="11" <?php if($month_end == 11) echo 'selected="selected"'; ?> >11</option> |
|
212 | - <option value="12" <?php if($month_end == 12) echo 'selected="selected"'; ?> >12</option> |
|
425 | + <option value="1" <?php if($month_end == 1) { |
|
426 | + echo 'selected="selected"'; |
|
427 | +} |
|
428 | +?> >01</option> |
|
429 | + <option value="2" <?php if($month_end == 2) { |
|
430 | + echo 'selected="selected"'; |
|
431 | +} |
|
432 | +?> >02</option> |
|
433 | + <option value="3" <?php if($month_end == 3) { |
|
434 | + echo 'selected="selected"'; |
|
435 | +} |
|
436 | +?> >03</option> |
|
437 | + <option value="4" <?php if($month_end == 4) { |
|
438 | + echo 'selected="selected"'; |
|
439 | +} |
|
440 | +?> >04</option> |
|
441 | + <option value="5" <?php if($month_end == 5) { |
|
442 | + echo 'selected="selected"'; |
|
443 | +} |
|
444 | +?> >05</option> |
|
445 | + <option value="6" <?php if($month_end == 6) { |
|
446 | + echo 'selected="selected"'; |
|
447 | +} |
|
448 | +?> >06</option> |
|
449 | + <option value="7" <?php if($month_end == 7) { |
|
450 | + echo 'selected="selected"'; |
|
451 | +} |
|
452 | +?> >07</option> |
|
453 | + <option value="8" <?php if($month_end == 8) { |
|
454 | + echo 'selected="selected"'; |
|
455 | +} |
|
456 | +?> >08</option> |
|
457 | + <option value="9" <?php if($month_end == 9) { |
|
458 | + echo 'selected="selected"'; |
|
459 | +} |
|
460 | +?> >09</option> |
|
461 | + <option value="10" <?php if($month_end == 10) { |
|
462 | + echo 'selected="selected"'; |
|
463 | +} |
|
464 | +?> >10</option> |
|
465 | + <option value="11" <?php if($month_end == 11) { |
|
466 | + echo 'selected="selected"'; |
|
467 | +} |
|
468 | +?> >11</option> |
|
469 | + <option value="12" <?php if($month_end == 12) { |
|
470 | + echo 'selected="selected"'; |
|
471 | +} |
|
472 | +?> >12</option> |
|
213 | 473 | </select> |
214 | 474 | / |
215 | 475 | <select name="year_end"> |
@@ -217,7 +477,10 @@ discard block |
||
217 | 477 | <?php |
218 | 478 | for($i=$thisYear-5;$i <= ($thisYear+5);$i++) |
219 | 479 | { ?> |
220 | - <option value="<?php echo $i; ?>" <?php if($year_end == $i) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
480 | + <option value="<?php echo $i; ?>" <?php if($year_end == $i) { |
|
481 | + echo 'selected="selected"'; |
|
482 | +} |
|
483 | +?> ><?php echo $i; ?></option> |
|
221 | 484 | <?php |
222 | 485 | } ?> |
223 | 486 | </select> |
@@ -238,7 +501,10 @@ discard block |
||
238 | 501 | |
239 | 502 | |
240 | 503 | <script> |
241 | -<?php if($year_start=="0000") echo "setDisable(document.form.nolimit);\r\n"; ?> |
|
504 | +<?php if($year_start=="0000") { |
|
505 | + echo "setDisable(document.form.nolimit);\r\n"; |
|
506 | +} |
|
507 | +?> |
|
242 | 508 | function setDisable(select){ |
243 | 509 | document.form.day_start.disabled = (select.checked) ? true : false; |
244 | 510 | document.form.month_start.disabled = (select.checked) ? true : false; |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $tool_name = get_lang('ImportSessionListXMLCSV'); |
25 | 25 | |
26 | 26 | //$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
27 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
27 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
28 | 28 | |
29 | 29 | set_time_limit(0); |
30 | 30 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | $form_sent = $_POST['formSent']; |
41 | 41 | $file_type = isset($_POST['file_type']) ? $_POST['file_type'] : null; |
42 | 42 | $send_mail = isset($_POST['sendMail']) && $_POST['sendMail'] ? 1 : 0; |
43 | - $isOverwrite = isset($_POST['overwrite']) && $_POST['overwrite'] ? true: false; |
|
43 | + $isOverwrite = isset($_POST['overwrite']) && $_POST['overwrite'] ? true : false; |
|
44 | 44 | $deleteUsersNotInList = isset($_POST['delete_users_not_in_list']) ? true : false; |
45 | 45 | $sessions = array(); |
46 | 46 | $session_counter = 0; |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $sql = "INSERT IGNORE INTO $tbl_session_user SET |
319 | 319 | user_id ='$user_id', |
320 | 320 | session_id = '$session_id', |
321 | - registered_at = '" . api_get_utc_datetime() . "'"; |
|
321 | + registered_at = '".api_get_utc_datetime()."'"; |
|
322 | 322 | $rs_user = Database::query($sql); |
323 | 323 | $user_counter++; |
324 | 324 | } |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | $sql = "INSERT IGNORE INTO $tbl_session_user SET |
372 | 372 | user_id ='$user_id', |
373 | 373 | session_id = '$session_id', |
374 | - registered_at = '" . api_get_utc_datetime() . "'"; |
|
374 | + registered_at = '".api_get_utc_datetime()."'"; |
|
375 | 375 | $rs_user = Database::query($sql); |
376 | 376 | $user_counter++; |
377 | 377 | // Adding to session_rel_user_rel_course table. |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | |
469 | 469 | echo '<div class="actions">'; |
470 | 470 | echo '<a href="../session/session_list.php">'. |
471 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
471 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
472 | 472 | echo '</div>'; |
473 | 473 | |
474 | 474 | if (!empty($error_message)) { |
@@ -485,7 +485,7 @@ discard block |
||
485 | 485 | get_lang('FileType'), |
486 | 486 | Display::url( |
487 | 487 | get_lang('ExampleCSVFile'), |
488 | - api_get_path(WEB_CODE_PATH) . 'admin/example_session.csv', |
|
488 | + api_get_path(WEB_CODE_PATH).'admin/example_session.csv', |
|
489 | 489 | ['target' => '_blank'] |
490 | 490 | ) |
491 | 491 | ], |
@@ -499,7 +499,7 @@ discard block |
||
499 | 499 | null, |
500 | 500 | Display::url( |
501 | 501 | get_lang('ExampleXMLFile'), |
502 | - api_get_path(WEB_CODE_PATH) . 'admin/example_session.xml', |
|
502 | + api_get_path(WEB_CODE_PATH).'admin/example_session.xml', |
|
503 | 503 | ['target' => '_blank'] |
504 | 504 | ) |
505 | 505 | ], |
@@ -514,7 +514,7 @@ discard block |
||
514 | 514 | $form->addElement('checkbox', 'sendMail', null, get_lang('SendMailToUsers')); |
515 | 515 | $form->addButtonImport(get_lang('ImportSession')); |
516 | 516 | |
517 | -$defaults = array('sendMail' => 'true','file_type' => 'csv'); |
|
517 | +$defaults = array('sendMail' => 'true', 'file_type' => 'csv'); |
|
518 | 518 | $form->setDefaults($defaults); |
519 | 519 | |
520 | 520 | Display::display_normal_message(get_lang('TheXMLImportLetYouAddMoreInfoAndCreateResources')); |
@@ -37,8 +37,8 @@ discard block |
||
37 | 37 | $result = Database::query($sql); |
38 | 38 | |
39 | 39 | if (!list($session_name,$course_title) = Database::fetch_row($result)) { |
40 | - header('Location: session_course_list.php?id_session='.$id_session); |
|
41 | - exit(); |
|
40 | + header('Location: session_course_list.php?id_session='.$id_session); |
|
41 | + exit(); |
|
42 | 42 | } |
43 | 43 | |
44 | 44 | //$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); |
@@ -48,63 +48,63 @@ discard block |
||
48 | 48 | |
49 | 49 | $arr_infos = array(); |
50 | 50 | if (isset($_POST['formSent']) && $_POST['formSent']) { |
51 | - $formSent = 1; |
|
51 | + $formSent = 1; |
|
52 | 52 | |
53 | - // get all tutor by course_code in the session |
|
54 | - $sql = "SELECT user_id |
|
53 | + // get all tutor by course_code in the session |
|
54 | + $sql = "SELECT user_id |
|
55 | 55 | FROM $tbl_session_rel_course_rel_user |
56 | 56 | WHERE session_id = '$id_session' AND c_id = '".$courseId."' AND status = 2"; |
57 | - $rs_coaches = Database::query($sql); |
|
57 | + $rs_coaches = Database::query($sql); |
|
58 | 58 | |
59 | - $coaches_course_session = array(); |
|
60 | - if (Database::num_rows($rs_coaches) > 0){ |
|
61 | - while ($row_coaches = Database::fetch_row($rs_coaches)) { |
|
62 | - $coaches_course_session[] = $row_coaches[0]; |
|
63 | - } |
|
64 | - } |
|
59 | + $coaches_course_session = array(); |
|
60 | + if (Database::num_rows($rs_coaches) > 0){ |
|
61 | + while ($row_coaches = Database::fetch_row($rs_coaches)) { |
|
62 | + $coaches_course_session[] = $row_coaches[0]; |
|
63 | + } |
|
64 | + } |
|
65 | 65 | |
66 | - $id_coaches= $_POST['id_coach']; |
|
66 | + $id_coaches= $_POST['id_coach']; |
|
67 | 67 | |
68 | - if (is_array($id_coaches) && count($id_coaches) > 0) { |
|
68 | + if (is_array($id_coaches) && count($id_coaches) > 0) { |
|
69 | 69 | |
70 | - foreach ($id_coaches as $id_coach) { |
|
71 | - $id_coach = intval($id_coach); |
|
70 | + foreach ($id_coaches as $id_coach) { |
|
71 | + $id_coach = intval($id_coach); |
|
72 | 72 | $rs1 = SessionManager::set_coach_to_course_session( |
73 | 73 | $id_coach, |
74 | 74 | $id_session, |
75 | 75 | $courseId |
76 | 76 | ); |
77 | - } |
|
77 | + } |
|
78 | 78 | |
79 | - // set status to 0 other tutors from multiple list |
|
80 | - $array_intersect = array_diff($coaches_course_session,$id_coaches); |
|
79 | + // set status to 0 other tutors from multiple list |
|
80 | + $array_intersect = array_diff($coaches_course_session,$id_coaches); |
|
81 | 81 | |
82 | - foreach ($array_intersect as $no_coach_user_id) { |
|
83 | - $rs2 = SessionManager::set_coach_to_course_session( |
|
84 | - $no_coach_user_id, |
|
85 | - $id_session, |
|
82 | + foreach ($array_intersect as $no_coach_user_id) { |
|
83 | + $rs2 = SessionManager::set_coach_to_course_session( |
|
84 | + $no_coach_user_id, |
|
85 | + $id_session, |
|
86 | 86 | $courseId, |
87 | - true |
|
88 | - ); |
|
89 | - } |
|
87 | + true |
|
88 | + ); |
|
89 | + } |
|
90 | 90 | |
91 | - header('Location: '.Security::remove_XSS($_GET['page']).'?id_session='.$id_session); |
|
92 | - exit(); |
|
93 | - } |
|
91 | + header('Location: '.Security::remove_XSS($_GET['page']).'?id_session='.$id_session); |
|
92 | + exit(); |
|
93 | + } |
|
94 | 94 | } else { |
95 | - $sql = "SELECT user_id |
|
95 | + $sql = "SELECT user_id |
|
96 | 96 | FROM $tbl_session_rel_course_rel_user |
97 | 97 | WHERE |
98 | 98 | session_id = '$id_session' AND |
99 | 99 | c_id = '".$courseId."' AND |
100 | 100 | status = 2 "; |
101 | - $rs = Database::query($sql); |
|
101 | + $rs = Database::query($sql); |
|
102 | 102 | |
103 | - if (Database::num_rows($rs) > 0) { |
|
104 | - while ($infos = Database::fetch_array($rs)) { |
|
105 | - $arr_infos[] = $infos['user_id']; |
|
106 | - } |
|
107 | - } |
|
103 | + if (Database::num_rows($rs) > 0) { |
|
104 | + while ($infos = Database::fetch_array($rs)) { |
|
105 | + $arr_infos[] = $infos['user_id']; |
|
106 | + } |
|
107 | + } |
|
108 | 108 | } |
109 | 109 | |
110 | 110 | $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username'; |
@@ -36,15 +36,15 @@ discard block |
||
36 | 36 | sc.c_id ='".$courseId."'"; |
37 | 37 | $result = Database::query($sql); |
38 | 38 | |
39 | -if (!list($session_name,$course_title) = Database::fetch_row($result)) { |
|
39 | +if (!list($session_name, $course_title) = Database::fetch_row($result)) { |
|
40 | 40 | header('Location: session_course_list.php?id_session='.$id_session); |
41 | 41 | exit(); |
42 | 42 | } |
43 | 43 | |
44 | 44 | //$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); |
45 | -$interbreadcrumb[]=array('url' => "session_list.php","name" => get_lang("SessionList")); |
|
46 | -$interbreadcrumb[]=array('url' => "resume_session.php?id_session=".$id_session,"name" => get_lang('SessionOverview')); |
|
47 | -$interbreadcrumb[]=array('url' => "session_course_list.php?id_session=$id_session","name" =>api_htmlentities($session_name, ENT_QUOTES, $charset)); |
|
45 | +$interbreadcrumb[] = array('url' => "session_list.php", "name" => get_lang("SessionList")); |
|
46 | +$interbreadcrumb[] = array('url' => "resume_session.php?id_session=".$id_session, "name" => get_lang('SessionOverview')); |
|
47 | +$interbreadcrumb[] = array('url' => "session_course_list.php?id_session=$id_session", "name" =>api_htmlentities($session_name, ENT_QUOTES, $charset)); |
|
48 | 48 | |
49 | 49 | $arr_infos = array(); |
50 | 50 | if (isset($_POST['formSent']) && $_POST['formSent']) { |
@@ -57,13 +57,13 @@ discard block |
||
57 | 57 | $rs_coaches = Database::query($sql); |
58 | 58 | |
59 | 59 | $coaches_course_session = array(); |
60 | - if (Database::num_rows($rs_coaches) > 0){ |
|
60 | + if (Database::num_rows($rs_coaches) > 0) { |
|
61 | 61 | while ($row_coaches = Database::fetch_row($rs_coaches)) { |
62 | 62 | $coaches_course_session[] = $row_coaches[0]; |
63 | 63 | } |
64 | 64 | } |
65 | 65 | |
66 | - $id_coaches= $_POST['id_coach']; |
|
66 | + $id_coaches = $_POST['id_coach']; |
|
67 | 67 | |
68 | 68 | if (is_array($id_coaches) && count($id_coaches) > 0) { |
69 | 69 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | } |
78 | 78 | |
79 | 79 | // set status to 0 other tutors from multiple list |
80 | - $array_intersect = array_diff($coaches_course_session,$id_coaches); |
|
80 | + $array_intersect = array_diff($coaches_course_session, $id_coaches); |
|
81 | 81 | |
82 | 82 | foreach ($array_intersect as $no_coach_user_id) { |
83 | 83 | $rs2 = SessionManager::set_coach_to_course_session( |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname, username' : ' ORDER BY lastname, firstname, username'; |
111 | 111 | |
112 | 112 | if (api_is_multiple_url_enabled()) { |
113 | - $tbl_access_rel_user= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
113 | + $tbl_access_rel_user = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
|
114 | 114 | $access_url_id = api_get_current_access_url_id(); |
115 | 115 | $sql = "SELECT u.user_id,lastname,firstname,username |
116 | 116 | FROM $tbl_user u |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | <div class="col-md-12"> |
153 | 153 | <div class="title"></div> |
154 | 154 | <?php |
155 | - if(!empty($errorMsg)) { |
|
155 | + if (!empty($errorMsg)) { |
|
156 | 156 | Display::display_normal_message($errorMsg); |
157 | 157 | } |
158 | 158 | ?> |
@@ -166,13 +166,13 @@ discard block |
||
166 | 166 | |
167 | 167 | <select name="id_coach[]" class="form-control" multiple> |
168 | 168 | <option value="0">----- <?php echo get_lang("Choose") ?> -----</option> |
169 | - <option value="0" <?php if(count($arr_infos) == 0) echo 'selected="selected"'; ?>> |
|
169 | + <option value="0" <?php if (count($arr_infos) == 0) echo 'selected="selected"'; ?>> |
|
170 | 170 | <?php echo get_lang('None') ?> |
171 | 171 | </option> |
172 | 172 | <?php |
173 | 173 | foreach ($coaches as $enreg) { |
174 | 174 | ?> |
175 | - <option value="<?php echo $enreg['user_id']; ?>" <?php if(((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) echo 'selected="selected"'; ?>> |
|
175 | + <option value="<?php echo $enreg['user_id']; ?>" <?php if (((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) echo 'selected="selected"'; ?>> |
|
176 | 176 | <?php echo api_get_person_name($enreg['firstname'], $enreg['lastname']).' ('.$enreg['username'].')'; ?> |
177 | 177 | </option> |
178 | 178 | <?php |
@@ -166,13 +166,19 @@ |
||
166 | 166 | |
167 | 167 | <select name="id_coach[]" class="form-control" multiple> |
168 | 168 | <option value="0">----- <?php echo get_lang("Choose") ?> -----</option> |
169 | - <option value="0" <?php if(count($arr_infos) == 0) echo 'selected="selected"'; ?>> |
|
169 | + <option value="0" <?php if(count($arr_infos) == 0) { |
|
170 | + echo 'selected="selected"'; |
|
171 | +} |
|
172 | +?>> |
|
170 | 173 | <?php echo get_lang('None') ?> |
171 | 174 | </option> |
172 | 175 | <?php |
173 | 176 | foreach ($coaches as $enreg) { |
174 | 177 | ?> |
175 | - <option value="<?php echo $enreg['user_id']; ?>" <?php if(((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) echo 'selected="selected"'; ?>> |
|
178 | + <option value="<?php echo $enreg['user_id']; ?>" <?php if(((is_array($arr_infos) && in_array($enreg['user_id'], $arr_infos)))) { |
|
179 | + echo 'selected="selected"'; |
|
180 | +} |
|
181 | +?>> |
|
176 | 182 | <?php echo api_get_person_name($enreg['firstname'], $enreg['lastname']).' ('.$enreg['username'].')'; ?> |
177 | 183 | </option> |
178 | 184 | <?php |
@@ -197,12 +197,12 @@ |
||
197 | 197 | if (!empty($rows_session_category)) { |
198 | 198 | foreach($rows_session_category as $category) { |
199 | 199 | if($category['id'] == $categoryId) |
200 | - echo '<option value="'.$category['id'].'" selected>'.$category['name'].'</option>'; |
|
201 | - else |
|
202 | - echo '<option value="'.$category['id'].'">'.$category['name'].'</option>'; |
|
200 | + echo '<option value="'.$category['id'].'" selected>'.$category['name'].'</option>'; |
|
201 | + else |
|
202 | + echo '<option value="'.$category['id'].'">'.$category['name'].'</option>'; |
|
203 | 203 | } |
204 | 204 | } |
205 | - ?> |
|
205 | + ?> |
|
206 | 206 | </select> |
207 | 207 | </td> |
208 | 208 | </tr> |
@@ -196,10 +196,11 @@ discard block |
||
196 | 196 | <?php |
197 | 197 | if (!empty($rows_session_category)) { |
198 | 198 | foreach($rows_session_category as $category) { |
199 | - if($category['id'] == $categoryId) |
|
200 | - echo '<option value="'.$category['id'].'" selected>'.$category['name'].'</option>'; |
|
201 | - else |
|
202 | - echo '<option value="'.$category['id'].'">'.$category['name'].'</option>'; |
|
199 | + if($category['id'] == $categoryId) { |
|
200 | + echo '<option value="'.$category['id'].'" selected>'.$category['name'].'</option>'; |
|
201 | + } else { |
|
202 | + echo '<option value="'.$category['id'].'">'.$category['name'].'</option>'; |
|
203 | + } |
|
203 | 204 | } |
204 | 205 | } |
205 | 206 | ?> |
@@ -223,7 +224,10 @@ discard block |
||
223 | 224 | <?php |
224 | 225 | foreach($rows_session as $enreg) { |
225 | 226 | ?> |
226 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option> |
|
227 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) { |
|
228 | + echo 'selected="selected"'; |
|
229 | +} |
|
230 | +?>><?php echo $enreg['name']; ?></option> |
|
227 | 231 | <?php } ?> |
228 | 232 | </select></div> |
229 | 233 | <?php unset($nosessionCourses); ?> |
@@ -245,7 +249,10 @@ discard block |
||
245 | 249 | <select id='destination' name="SessionCategoryList[]" multiple="multiple" size="20" style="width:320px;"> |
246 | 250 | <?php |
247 | 251 | foreach($rows_category_session as $enreg) { ?> |
248 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option> |
|
252 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) { |
|
253 | + echo 'selected="selected"'; |
|
254 | +} |
|
255 | +?>><?php echo $enreg['name']; ?></option> |
|
249 | 256 | <?php } ?> |
250 | 257 | </select></td> |
251 | 258 | </tr> |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | $this_section = SECTION_PLATFORM_ADMIN; |
17 | 17 | |
18 | 18 | // setting breadcrumbs |
19 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
19 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
20 | 20 | |
21 | 21 | // Database Table Definitions |
22 | 22 | $tbl_session_rel_course_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | } |
39 | 39 | |
40 | 40 | if (!api_is_platform_admin() && !api_is_session_admin()) { |
41 | - $sql = 'SELECT session_admin_id FROM ' . Database:: get_main_table(TABLE_MAIN_SESSION) . ' WHERE id=' . $id_session; |
|
41 | + $sql = 'SELECT session_admin_id FROM '.Database:: get_main_table(TABLE_MAIN_SESSION).' WHERE id='.$id_session; |
|
42 | 42 | $rs = Database::query($sql); |
43 | 43 | if (Database::result($rs, 0, 0) != $_user['user_id']) { |
44 | 44 | api_not_allowed(true); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $sql = "UPDATE $tbl_session SET session_category_id = $categoryId WHERE id in ($session_id) "; |
102 | 102 | Database::query($sql); |
103 | - header('Location: add_many_session_to_category.php?id_category=' . $categoryId . '&msg=ok'); |
|
103 | + header('Location: add_many_session_to_category.php?id_category='.$categoryId.'&msg=ok'); |
|
104 | 104 | exit; |
105 | 105 | } else { |
106 | 106 | header('Location: add_many_session_to_category.php?msg=error'); |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | $rows_category_session = array(); |
129 | 129 | if ((isset($_POST['CategorySessionId']) && $_POST['formSent'] == 0) || isset($_GET['id_category'])) { |
130 | 130 | |
131 | - $where = 'WHERE session_category_id != ' . $categoryId .' OR session_category_id IS NULL'; |
|
132 | - $sql = 'SELECT id, name FROM ' . $tbl_session . ' WHERE session_category_id =' . $categoryId . ' ORDER BY name'; |
|
131 | + $where = 'WHERE session_category_id != '.$categoryId.' OR session_category_id IS NULL'; |
|
132 | + $sql = 'SELECT id, name FROM '.$tbl_session.' WHERE session_category_id ='.$categoryId.' ORDER BY name'; |
|
133 | 133 | $result = Database::query($sql); |
134 | 134 | $rows_category_session = Database::store_result($result); |
135 | 135 | } |
@@ -142,13 +142,13 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | if (api_get_multiple_access_url()) { |
145 | - $table_access_url_rel_session= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
145 | + $table_access_url_rel_session = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
146 | 146 | $access_url_id = api_get_current_access_url_id(); |
147 | 147 | $sql = "SELECT s.id, s.name FROM $tbl_session s INNER JOIN $table_access_url_rel_session u ON s.id = u.session_id $where AND u.access_url_id = $access_url_id ORDER BY name"; |
148 | 148 | } else { |
149 | 149 | $sql = "SELECT id, name FROM $tbl_session $where ORDER BY name"; |
150 | 150 | } |
151 | -$result=Database::query($sql); |
|
151 | +$result = Database::query($sql); |
|
152 | 152 | $rows_session = Database::store_result($result); |
153 | 153 | ?> |
154 | 154 | <form name="formulaire" method="post" |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | if (!empty($_GET['add'])) { |
157 | 157 | echo '&add=true'; |
158 | 158 | } ?>" style="margin:0px;"> |
159 | -<?php echo '<legend>' . $tool_name . '</legend>'; ?> |
|
159 | +<?php echo '<legend>'.$tool_name.'</legend>'; ?> |
|
160 | 160 | <input type="hidden" name="formSent" value="1"/> |
161 | 161 | <?php |
162 | 162 | if (!empty($errorMsg)) { |
@@ -194,8 +194,8 @@ discard block |
||
194 | 194 | <option value="0" ></option> |
195 | 195 | <?php |
196 | 196 | if (!empty($rows_session_category)) { |
197 | - foreach($rows_session_category as $category) { |
|
198 | - if($category['id'] == $categoryId) |
|
197 | + foreach ($rows_session_category as $category) { |
|
198 | + if ($category['id'] == $categoryId) |
|
199 | 199 | echo '<option value="'.$category['id'].'" selected>'.$category['name'].'</option>'; |
200 | 200 | else |
201 | 201 | echo '<option value="'.$category['id'].'">'.$category['name'].'</option>'; |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | <td align="center" width="45%"><b><?php echo get_lang('SessionListInCategory') ?> :</b></td> |
212 | 212 | </tr> |
213 | 213 | |
214 | -<?php if($add_type == 'multiple') { ?> |
|
214 | +<?php if ($add_type == 'multiple') { ?> |
|
215 | 215 | <tr> |
216 | 216 | <td> </td></tr> |
217 | 217 | <?php } ?> |
@@ -220,9 +220,9 @@ discard block |
||
220 | 220 | <div id="ajax_list_courses_multiple"> |
221 | 221 | <select id="origin" name="NoSessionCategoryList[]" multiple="multiple" size="20" style="width:320px;"> |
222 | 222 | <?php |
223 | - foreach($rows_session as $enreg) { |
|
223 | + foreach ($rows_session as $enreg) { |
|
224 | 224 | ?> |
225 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option> |
|
225 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'], ENT_QUOTES).'"'; if (in_array($enreg['id'], $CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option> |
|
226 | 226 | <?php } ?> |
227 | 227 | </select></div> |
228 | 228 | <?php unset($nosessionCourses); ?> |
@@ -243,8 +243,8 @@ discard block |
||
243 | 243 | <td width="45%" align="center"> |
244 | 244 | <select id='destination' name="SessionCategoryList[]" multiple="multiple" size="20" style="width:320px;"> |
245 | 245 | <?php |
246 | - foreach($rows_category_session as $enreg) { ?> |
|
247 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'],ENT_QUOTES).'"'; if(in_array($enreg['id'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option> |
|
246 | + foreach ($rows_category_session as $enreg) { ?> |
|
247 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['name'], ENT_QUOTES).'"'; if (in_array($enreg['id'], $CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['name']; ?></option> |
|
248 | 248 | <?php } ?> |
249 | 249 | </select></td> |
250 | 250 | </tr> |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | |
19 | 19 | api_protect_admin_script(true); |
20 | 20 | |
21 | -$formSent=0; |
|
22 | -$errorMsg=''; |
|
21 | +$formSent = 0; |
|
22 | +$errorMsg = ''; |
|
23 | 23 | //$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin')); |
24 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
25 | -$interbreadcrumb[] = array('url' => "session_category_list.php","name" => get_lang('ListSessionCategory')); |
|
24 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
25 | +$interbreadcrumb[] = array('url' => "session_category_list.php", "name" => get_lang('ListSessionCategory')); |
|
26 | 26 | |
27 | 27 | // Database Table Definitions |
28 | 28 | $tbl_user = Database::get_main_table(TABLE_MAIN_USER); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | //display the header |
62 | 62 | Display::display_header($tool_name); |
63 | 63 | if (!empty($return)) { |
64 | - Display::display_error_message($return,false); |
|
64 | + Display::display_error_message($return, false); |
|
65 | 65 | } |
66 | 66 | ?> |
67 | 67 | <div class="row"> |
@@ -72,13 +72,13 @@ discard block |
||
72 | 72 | <div class="form-group"> |
73 | 73 | <label class="col-sm-3 control-label"><?php echo get_lang('SessionCategoryName') ?></label> |
74 | 74 | <div class="col-sm-6"> |
75 | - <input type="text" class="form-control" name="name" placeholder="<?php echo get_lang('Category') ?>" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); ?>"> |
|
75 | + <input type="text" class="form-control" name="name" placeholder="<?php echo get_lang('Category') ?>" size="50" maxlength="50" value="<?php if ($formSent) echo api_htmlentities($name, ENT_QUOTES, $charset); ?>"> |
|
76 | 76 | </div> |
77 | 77 | <div class="col-md-3"></div> |
78 | 78 | </div> |
79 | 79 | <div class="form-group"> |
80 | 80 | <div class="col-sm-offset-3 col-sm-6"> |
81 | - <?php echo get_lang('TheTimeLimitsAreReferential');?> <a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('AddTimeLimit') ?></a> |
|
81 | + <?php echo get_lang('TheTimeLimitsAreReferential'); ?> <a href="javascript://" onclick="if(document.getElementById('options').style.display == 'none'){document.getElementById('options').style.display = 'block';}else{document.getElementById('options').style.display = 'none';}"><?php echo get_lang('AddTimeLimit') ?></a> |
|
82 | 82 | </div> |
83 | 83 | <div class="col-md-3"></div> |
84 | 84 | </div> |
@@ -90,58 +90,58 @@ discard block |
||
90 | 90 | <div class="col-sm-6"> |
91 | 91 | <select name="day_start"> |
92 | 92 | <option value="1">01</option> |
93 | - <option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
94 | - <option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
95 | - <option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
96 | - <option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
97 | - <option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
98 | - <option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
99 | - <option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
100 | - <option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
101 | - <option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
102 | - <option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
103 | - <option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
104 | - <option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) echo 'selected="selected"'; ?> >13</option> |
|
105 | - <option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) echo 'selected="selected"'; ?> >14</option> |
|
106 | - <option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) echo 'selected="selected"'; ?> >15</option> |
|
107 | - <option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) echo 'selected="selected"'; ?> >16</option> |
|
108 | - <option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) echo 'selected="selected"'; ?> >17</option> |
|
109 | - <option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) echo 'selected="selected"'; ?> >18</option> |
|
110 | - <option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) echo 'selected="selected"'; ?> >19</option> |
|
111 | - <option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) echo 'selected="selected"'; ?> >20</option> |
|
112 | - <option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) echo 'selected="selected"'; ?> >21</option> |
|
113 | - <option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) echo 'selected="selected"'; ?> >22</option> |
|
114 | - <option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) echo 'selected="selected"'; ?> >23</option> |
|
115 | - <option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) echo 'selected="selected"'; ?> >24</option> |
|
116 | - <option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) echo 'selected="selected"'; ?> >25</option> |
|
117 | - <option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) echo 'selected="selected"'; ?> >26</option> |
|
118 | - <option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) echo 'selected="selected"'; ?> >27</option> |
|
119 | - <option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) echo 'selected="selected"'; ?> >28</option> |
|
120 | - <option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) echo 'selected="selected"'; ?> >29</option> |
|
121 | - <option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) echo 'selected="selected"'; ?> >30</option> |
|
122 | - <option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) echo 'selected="selected"'; ?> >31</option> |
|
93 | + <option value="2" <?php if ((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
94 | + <option value="3" <?php if ((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
95 | + <option value="4" <?php if ((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
96 | + <option value="5" <?php if ((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
97 | + <option value="6" <?php if ((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
98 | + <option value="7" <?php if ((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
99 | + <option value="8" <?php if ((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
100 | + <option value="9" <?php if ((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
101 | + <option value="10" <?php if ((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
102 | + <option value="11" <?php if ((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
103 | + <option value="12" <?php if ((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
104 | + <option value="13" <?php if ((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) echo 'selected="selected"'; ?> >13</option> |
|
105 | + <option value="14" <?php if ((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) echo 'selected="selected"'; ?> >14</option> |
|
106 | + <option value="15" <?php if ((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) echo 'selected="selected"'; ?> >15</option> |
|
107 | + <option value="16" <?php if ((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) echo 'selected="selected"'; ?> >16</option> |
|
108 | + <option value="17" <?php if ((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) echo 'selected="selected"'; ?> >17</option> |
|
109 | + <option value="18" <?php if ((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) echo 'selected="selected"'; ?> >18</option> |
|
110 | + <option value="19" <?php if ((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) echo 'selected="selected"'; ?> >19</option> |
|
111 | + <option value="20" <?php if ((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) echo 'selected="selected"'; ?> >20</option> |
|
112 | + <option value="21" <?php if ((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) echo 'selected="selected"'; ?> >21</option> |
|
113 | + <option value="22" <?php if ((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) echo 'selected="selected"'; ?> >22</option> |
|
114 | + <option value="23" <?php if ((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) echo 'selected="selected"'; ?> >23</option> |
|
115 | + <option value="24" <?php if ((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) echo 'selected="selected"'; ?> >24</option> |
|
116 | + <option value="25" <?php if ((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) echo 'selected="selected"'; ?> >25</option> |
|
117 | + <option value="26" <?php if ((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) echo 'selected="selected"'; ?> >26</option> |
|
118 | + <option value="27" <?php if ((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) echo 'selected="selected"'; ?> >27</option> |
|
119 | + <option value="28" <?php if ((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) echo 'selected="selected"'; ?> >28</option> |
|
120 | + <option value="29" <?php if ((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) echo 'selected="selected"'; ?> >29</option> |
|
121 | + <option value="30" <?php if ((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) echo 'selected="selected"'; ?> >30</option> |
|
122 | + <option value="31" <?php if ((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) echo 'selected="selected"'; ?> >31</option> |
|
123 | 123 | </select> |
124 | 124 | / |
125 | 125 | <select name="month_start"> |
126 | 126 | <option value="1">01</option> |
127 | - <option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
128 | - <option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
129 | - <option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
130 | - <option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
131 | - <option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
132 | - <option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
133 | - <option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
134 | - <option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
135 | - <option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
136 | - <option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
137 | - <option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
127 | + <option value="2" <?php if ((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
128 | + <option value="3" <?php if ((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
129 | + <option value="4" <?php if ((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
130 | + <option value="5" <?php if ((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
131 | + <option value="6" <?php if ((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
132 | + <option value="7" <?php if ((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
133 | + <option value="8" <?php if ((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
134 | + <option value="9" <?php if ((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
135 | + <option value="10" <?php if ((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
136 | + <option value="11" <?php if ((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
137 | + <option value="12" <?php if ((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
138 | 138 | </select> |
139 | 139 | / |
140 | 140 | <select name="year_start"> |
141 | 141 | <?php |
142 | - for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) { |
|
142 | + for ($i = $thisYear - 5; $i <= ($thisYear + 5); $i++) { |
|
143 | 143 | ?> |
144 | - <option value="<?php echo $i; ?>" <?php if((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
144 | + <option value="<?php echo $i; ?>" <?php if ((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
145 | 145 | <?php |
146 | 146 | } |
147 | 147 | ?> |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | <select name="year_end"> |
207 | 207 | <option value="0">----</option> |
208 | 208 | <?php |
209 | - for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) { |
|
209 | + for ($i = $thisYear - 5; $i <= ($thisYear + 5); $i++) { |
|
210 | 210 | ?> |
211 | 211 | <option value="<?php echo $i; ?>"><?php echo $i; ?></option> |
212 | 212 | <?php |
@@ -72,7 +72,10 @@ discard block |
||
72 | 72 | <div class="form-group"> |
73 | 73 | <label class="col-sm-3 control-label"><?php echo get_lang('SessionCategoryName') ?></label> |
74 | 74 | <div class="col-sm-6"> |
75 | - <input type="text" class="form-control" name="name" placeholder="<?php echo get_lang('Category') ?>" size="50" maxlength="50" value="<?php if($formSent) echo api_htmlentities($name,ENT_QUOTES,$charset); ?>"> |
|
75 | + <input type="text" class="form-control" name="name" placeholder="<?php echo get_lang('Category') ?>" size="50" maxlength="50" value="<?php if($formSent) { |
|
76 | + echo api_htmlentities($name,ENT_QUOTES,$charset); |
|
77 | +} |
|
78 | +?>"> |
|
76 | 79 | </div> |
77 | 80 | <div class="col-md-3"></div> |
78 | 81 | </div> |
@@ -90,58 +93,184 @@ discard block |
||
90 | 93 | <div class="col-sm-6"> |
91 | 94 | <select name="day_start"> |
92 | 95 | <option value="1">01</option> |
93 | - <option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
94 | - <option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
95 | - <option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
96 | - <option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
97 | - <option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
98 | - <option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
99 | - <option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
100 | - <option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
101 | - <option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
102 | - <option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
103 | - <option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
104 | - <option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) echo 'selected="selected"'; ?> >13</option> |
|
105 | - <option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) echo 'selected="selected"'; ?> >14</option> |
|
106 | - <option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) echo 'selected="selected"'; ?> >15</option> |
|
107 | - <option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) echo 'selected="selected"'; ?> >16</option> |
|
108 | - <option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) echo 'selected="selected"'; ?> >17</option> |
|
109 | - <option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) echo 'selected="selected"'; ?> >18</option> |
|
110 | - <option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) echo 'selected="selected"'; ?> >19</option> |
|
111 | - <option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) echo 'selected="selected"'; ?> >20</option> |
|
112 | - <option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) echo 'selected="selected"'; ?> >21</option> |
|
113 | - <option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) echo 'selected="selected"'; ?> >22</option> |
|
114 | - <option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) echo 'selected="selected"'; ?> >23</option> |
|
115 | - <option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) echo 'selected="selected"'; ?> >24</option> |
|
116 | - <option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) echo 'selected="selected"'; ?> >25</option> |
|
117 | - <option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) echo 'selected="selected"'; ?> >26</option> |
|
118 | - <option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) echo 'selected="selected"'; ?> >27</option> |
|
119 | - <option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) echo 'selected="selected"'; ?> >28</option> |
|
120 | - <option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) echo 'selected="selected"'; ?> >29</option> |
|
121 | - <option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) echo 'selected="selected"'; ?> >30</option> |
|
122 | - <option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) echo 'selected="selected"'; ?> >31</option> |
|
96 | + <option value="2" <?php if((!$formSent && $thisDay == 2) || ($formSent && $day_start == 2)) { |
|
97 | + echo 'selected="selected"'; |
|
98 | +} |
|
99 | +?> >02</option> |
|
100 | + <option value="3" <?php if((!$formSent && $thisDay == 3) || ($formSent && $day_start == 3)) { |
|
101 | + echo 'selected="selected"'; |
|
102 | +} |
|
103 | +?> >03</option> |
|
104 | + <option value="4" <?php if((!$formSent && $thisDay == 4) || ($formSent && $day_start == 4)) { |
|
105 | + echo 'selected="selected"'; |
|
106 | +} |
|
107 | +?> >04</option> |
|
108 | + <option value="5" <?php if((!$formSent && $thisDay == 5) || ($formSent && $day_start == 5)) { |
|
109 | + echo 'selected="selected"'; |
|
110 | +} |
|
111 | +?> >05</option> |
|
112 | + <option value="6" <?php if((!$formSent && $thisDay == 6) || ($formSent && $day_start == 6)) { |
|
113 | + echo 'selected="selected"'; |
|
114 | +} |
|
115 | +?> >06</option> |
|
116 | + <option value="7" <?php if((!$formSent && $thisDay == 7) || ($formSent && $day_start == 7)) { |
|
117 | + echo 'selected="selected"'; |
|
118 | +} |
|
119 | +?> >07</option> |
|
120 | + <option value="8" <?php if((!$formSent && $thisDay == 8) || ($formSent && $day_start == 8)) { |
|
121 | + echo 'selected="selected"'; |
|
122 | +} |
|
123 | +?> >08</option> |
|
124 | + <option value="9" <?php if((!$formSent && $thisDay == 9) || ($formSent && $day_start == 9)) { |
|
125 | + echo 'selected="selected"'; |
|
126 | +} |
|
127 | +?> >09</option> |
|
128 | + <option value="10" <?php if((!$formSent && $thisDay == 10) || ($formSent && $day_start == 10)) { |
|
129 | + echo 'selected="selected"'; |
|
130 | +} |
|
131 | +?> >10</option> |
|
132 | + <option value="11" <?php if((!$formSent && $thisDay == 11) || ($formSent && $day_start == 11)) { |
|
133 | + echo 'selected="selected"'; |
|
134 | +} |
|
135 | +?> >11</option> |
|
136 | + <option value="12" <?php if((!$formSent && $thisDay == 12) || ($formSent && $day_start == 12)) { |
|
137 | + echo 'selected="selected"'; |
|
138 | +} |
|
139 | +?> >12</option> |
|
140 | + <option value="13" <?php if((!$formSent && $thisDay == 13) || ($formSent && $day_start == 13)) { |
|
141 | + echo 'selected="selected"'; |
|
142 | +} |
|
143 | +?> >13</option> |
|
144 | + <option value="14" <?php if((!$formSent && $thisDay == 14) || ($formSent && $day_start == 14)) { |
|
145 | + echo 'selected="selected"'; |
|
146 | +} |
|
147 | +?> >14</option> |
|
148 | + <option value="15" <?php if((!$formSent && $thisDay == 15) || ($formSent && $day_start == 15)) { |
|
149 | + echo 'selected="selected"'; |
|
150 | +} |
|
151 | +?> >15</option> |
|
152 | + <option value="16" <?php if((!$formSent && $thisDay == 16) || ($formSent && $day_start == 16)) { |
|
153 | + echo 'selected="selected"'; |
|
154 | +} |
|
155 | +?> >16</option> |
|
156 | + <option value="17" <?php if((!$formSent && $thisDay == 17) || ($formSent && $day_start == 17)) { |
|
157 | + echo 'selected="selected"'; |
|
158 | +} |
|
159 | +?> >17</option> |
|
160 | + <option value="18" <?php if((!$formSent && $thisDay == 18) || ($formSent && $day_start == 18)) { |
|
161 | + echo 'selected="selected"'; |
|
162 | +} |
|
163 | +?> >18</option> |
|
164 | + <option value="19" <?php if((!$formSent && $thisDay == 19) || ($formSent && $day_start == 19)) { |
|
165 | + echo 'selected="selected"'; |
|
166 | +} |
|
167 | +?> >19</option> |
|
168 | + <option value="20" <?php if((!$formSent && $thisDay == 20) || ($formSent && $day_start == 20)) { |
|
169 | + echo 'selected="selected"'; |
|
170 | +} |
|
171 | +?> >20</option> |
|
172 | + <option value="21" <?php if((!$formSent && $thisDay == 21) || ($formSent && $day_start == 21)) { |
|
173 | + echo 'selected="selected"'; |
|
174 | +} |
|
175 | +?> >21</option> |
|
176 | + <option value="22" <?php if((!$formSent && $thisDay == 22) || ($formSent && $day_start == 22)) { |
|
177 | + echo 'selected="selected"'; |
|
178 | +} |
|
179 | +?> >22</option> |
|
180 | + <option value="23" <?php if((!$formSent && $thisDay == 23) || ($formSent && $day_start == 23)) { |
|
181 | + echo 'selected="selected"'; |
|
182 | +} |
|
183 | +?> >23</option> |
|
184 | + <option value="24" <?php if((!$formSent && $thisDay == 24) || ($formSent && $day_start == 24)) { |
|
185 | + echo 'selected="selected"'; |
|
186 | +} |
|
187 | +?> >24</option> |
|
188 | + <option value="25" <?php if((!$formSent && $thisDay == 25) || ($formSent && $day_start == 25)) { |
|
189 | + echo 'selected="selected"'; |
|
190 | +} |
|
191 | +?> >25</option> |
|
192 | + <option value="26" <?php if((!$formSent && $thisDay == 26) || ($formSent && $day_start == 26)) { |
|
193 | + echo 'selected="selected"'; |
|
194 | +} |
|
195 | +?> >26</option> |
|
196 | + <option value="27" <?php if((!$formSent && $thisDay == 27) || ($formSent && $day_start == 27)) { |
|
197 | + echo 'selected="selected"'; |
|
198 | +} |
|
199 | +?> >27</option> |
|
200 | + <option value="28" <?php if((!$formSent && $thisDay == 28) || ($formSent && $day_start == 28)) { |
|
201 | + echo 'selected="selected"'; |
|
202 | +} |
|
203 | +?> >28</option> |
|
204 | + <option value="29" <?php if((!$formSent && $thisDay == 29) || ($formSent && $day_start == 29)) { |
|
205 | + echo 'selected="selected"'; |
|
206 | +} |
|
207 | +?> >29</option> |
|
208 | + <option value="30" <?php if((!$formSent && $thisDay == 30) || ($formSent && $day_start == 30)) { |
|
209 | + echo 'selected="selected"'; |
|
210 | +} |
|
211 | +?> >30</option> |
|
212 | + <option value="31" <?php if((!$formSent && $thisDay == 31) || ($formSent && $day_start == 31)) { |
|
213 | + echo 'selected="selected"'; |
|
214 | +} |
|
215 | +?> >31</option> |
|
123 | 216 | </select> |
124 | 217 | / |
125 | 218 | <select name="month_start"> |
126 | 219 | <option value="1">01</option> |
127 | - <option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) echo 'selected="selected"'; ?> >02</option> |
|
128 | - <option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) echo 'selected="selected"'; ?> >03</option> |
|
129 | - <option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) echo 'selected="selected"'; ?> >04</option> |
|
130 | - <option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) echo 'selected="selected"'; ?> >05</option> |
|
131 | - <option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) echo 'selected="selected"'; ?> >06</option> |
|
132 | - <option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) echo 'selected="selected"'; ?> >07</option> |
|
133 | - <option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) echo 'selected="selected"'; ?> >08</option> |
|
134 | - <option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) echo 'selected="selected"'; ?> >09</option> |
|
135 | - <option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) echo 'selected="selected"'; ?> >10</option> |
|
136 | - <option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) echo 'selected="selected"'; ?> >11</option> |
|
137 | - <option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) echo 'selected="selected"'; ?> >12</option> |
|
220 | + <option value="2" <?php if((!$formSent && $thisMonth == 2) || ($formSent && $month_start == 2)) { |
|
221 | + echo 'selected="selected"'; |
|
222 | +} |
|
223 | +?> >02</option> |
|
224 | + <option value="3" <?php if((!$formSent && $thisMonth == 3) || ($formSent && $month_start == 3)) { |
|
225 | + echo 'selected="selected"'; |
|
226 | +} |
|
227 | +?> >03</option> |
|
228 | + <option value="4" <?php if((!$formSent && $thisMonth == 4) || ($formSent && $month_start == 4)) { |
|
229 | + echo 'selected="selected"'; |
|
230 | +} |
|
231 | +?> >04</option> |
|
232 | + <option value="5" <?php if((!$formSent && $thisMonth == 5) || ($formSent && $month_start == 5)) { |
|
233 | + echo 'selected="selected"'; |
|
234 | +} |
|
235 | +?> >05</option> |
|
236 | + <option value="6" <?php if((!$formSent && $thisMonth == 6) || ($formSent && $month_start == 6)) { |
|
237 | + echo 'selected="selected"'; |
|
238 | +} |
|
239 | +?> >06</option> |
|
240 | + <option value="7" <?php if((!$formSent && $thisMonth == 7) || ($formSent && $month_start == 7)) { |
|
241 | + echo 'selected="selected"'; |
|
242 | +} |
|
243 | +?> >07</option> |
|
244 | + <option value="8" <?php if((!$formSent && $thisMonth == 8) || ($formSent && $month_start == 8)) { |
|
245 | + echo 'selected="selected"'; |
|
246 | +} |
|
247 | +?> >08</option> |
|
248 | + <option value="9" <?php if((!$formSent && $thisMonth == 9) || ($formSent && $month_start == 9)) { |
|
249 | + echo 'selected="selected"'; |
|
250 | +} |
|
251 | +?> >09</option> |
|
252 | + <option value="10" <?php if((!$formSent && $thisMonth == 10) || ($formSent && $month_start == 10)) { |
|
253 | + echo 'selected="selected"'; |
|
254 | +} |
|
255 | +?> >10</option> |
|
256 | + <option value="11" <?php if((!$formSent && $thisMonth == 11) || ($formSent && $month_start == 11)) { |
|
257 | + echo 'selected="selected"'; |
|
258 | +} |
|
259 | +?> >11</option> |
|
260 | + <option value="12" <?php if((!$formSent && $thisMonth == 12) || ($formSent && $month_start == 12)) { |
|
261 | + echo 'selected="selected"'; |
|
262 | +} |
|
263 | +?> >12</option> |
|
138 | 264 | </select> |
139 | 265 | / |
140 | 266 | <select name="year_start"> |
141 | 267 | <?php |
142 | 268 | for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) { |
143 | 269 | ?> |
144 | - <option value="<?php echo $i; ?>" <?php if((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
|
270 | + <option value="<?php echo $i; ?>" <?php if((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) { |
|
271 | + echo 'selected="selected"'; |
|
272 | +} |
|
273 | +?> ><?php echo $i; ?></option> |
|
145 | 274 | <?php |
146 | 275 | } |
147 | 276 | ?> |
@@ -29,29 +29,29 @@ discard block |
||
29 | 29 | $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION); |
30 | 30 | |
31 | 31 | if (isset($_POST['formSent']) && $_POST['formSent']) { |
32 | - $formSent = 1; |
|
33 | - $name = $_POST['name']; |
|
34 | - $year_start = $_POST['year_start']; |
|
35 | - $month_start = $_POST['month_start']; |
|
36 | - $day_start = $_POST['day_start']; |
|
37 | - $year_end = $_POST['year_end']; |
|
38 | - $month_end = $_POST['month_end']; |
|
39 | - $day_end = $_POST['day_end']; |
|
40 | - $return = SessionManager::create_category_session( |
|
41 | - $name, |
|
42 | - $year_start, |
|
43 | - $month_start, |
|
44 | - $day_start, |
|
45 | - $year_end, |
|
46 | - $month_end, |
|
47 | - $day_end |
|
48 | - ); |
|
49 | - |
|
50 | - if ($return == strval(intval($return))) { |
|
51 | - Display::addFlash(Display::return_message(get_lang('SessionCategoryAdded'))); |
|
52 | - header('Location: session_category_list.php'); |
|
53 | - exit(); |
|
54 | - } |
|
32 | + $formSent = 1; |
|
33 | + $name = $_POST['name']; |
|
34 | + $year_start = $_POST['year_start']; |
|
35 | + $month_start = $_POST['month_start']; |
|
36 | + $day_start = $_POST['day_start']; |
|
37 | + $year_end = $_POST['year_end']; |
|
38 | + $month_end = $_POST['month_end']; |
|
39 | + $day_end = $_POST['day_end']; |
|
40 | + $return = SessionManager::create_category_session( |
|
41 | + $name, |
|
42 | + $year_start, |
|
43 | + $month_start, |
|
44 | + $day_start, |
|
45 | + $year_end, |
|
46 | + $month_end, |
|
47 | + $day_end |
|
48 | + ); |
|
49 | + |
|
50 | + if ($return == strval(intval($return))) { |
|
51 | + Display::addFlash(Display::return_message(get_lang('SessionCategoryAdded'))); |
|
52 | + header('Location: session_category_list.php'); |
|
53 | + exit(); |
|
54 | + } |
|
55 | 55 | } |
56 | 56 | $thisYear = date('Y'); |
57 | 57 | $thisMonth = date('m'); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | //display the header |
62 | 62 | Display::display_header($tool_name); |
63 | 63 | if (!empty($return)) { |
64 | - Display::display_error_message($return,false); |
|
64 | + Display::display_error_message($return,false); |
|
65 | 65 | } |
66 | 66 | ?> |
67 | 67 | <div class="row"> |
@@ -139,12 +139,12 @@ discard block |
||
139 | 139 | / |
140 | 140 | <select name="year_start"> |
141 | 141 | <?php |
142 | - for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) { |
|
143 | - ?> |
|
142 | + for ($i=$thisYear-5;$i <= ($thisYear+5);$i++) { |
|
143 | + ?> |
|
144 | 144 | <option value="<?php echo $i; ?>" <?php if((!$formSent && $thisYear == $i) || ($formSent && $year_start == $i)) echo 'selected="selected"'; ?> ><?php echo $i; ?></option> |
145 | 145 | <?php |
146 | - } |
|
147 | - ?> |
|
146 | + } |
|
147 | + ?> |
|
148 | 148 | </select> |
149 | 149 | </div> |
150 | 150 | <div class="col-md-3"></div> |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | $tool_name = get_lang('ExportSessionListXMLCSV'); |
34 | 34 | |
35 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
35 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
36 | 36 | |
37 | 37 | set_time_limit(0); |
38 | 38 | |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | ORDER BY id"; |
57 | 57 | |
58 | 58 | if (api_is_multiple_url_enabled()) { |
59 | - $tbl_session_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
59 | + $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
60 | 60 | $access_url_id = api_get_current_access_url_id(); |
61 | - if ($access_url_id != -1){ |
|
61 | + if ($access_url_id != -1) { |
|
62 | 62 | $sql = "SELECT s.id, name,id_coach,username,access_start_date,access_end_date,visibility,session_category_id |
63 | 63 | FROM $tbl_session s |
64 | 64 | INNER JOIN $tbl_session_rel_access_url as session_rel_url |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | $archiveFile = 'export_sessions_'.$session_id.'_'.api_get_local_time().'.'.$file_type; |
115 | 115 | while (file_exists($archivePath.$archiveFile)) { |
116 | - $archiveFile ='export_users_'.$session_id.'_'.api_get_local_time().'_'.uniqid('').'.'.$file_type; |
|
116 | + $archiveFile = 'export_users_'.$session_id.'_'.api_get_local_time().'_'.uniqid('').'.'.$file_type; |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | $cvs = false; |
@@ -123,12 +123,12 @@ discard block |
||
123 | 123 | |
124 | 124 | |
125 | 125 | while ($row = Database::fetch_array($result)) { |
126 | - $row['name'] = str_replace(';',',',$row['name']); |
|
127 | - $row['username'] = str_replace(';',',',$row['username']); |
|
128 | - $row['access_start_date'] = str_replace(';',',',$row['access_start_date']); |
|
129 | - $row['access_end_date'] = str_replace(';',',',$row['access_end_date']); |
|
130 | - $row['visibility'] = str_replace(';',',',$row['visibility']); |
|
131 | - $row['session_category'] = str_replace(';',',',$row['session_category_id']); |
|
126 | + $row['name'] = str_replace(';', ',', $row['name']); |
|
127 | + $row['username'] = str_replace(';', ',', $row['username']); |
|
128 | + $row['access_start_date'] = str_replace(';', ',', $row['access_start_date']); |
|
129 | + $row['access_end_date'] = str_replace(';', ',', $row['access_end_date']); |
|
130 | + $row['visibility'] = str_replace(';', ',', $row['visibility']); |
|
131 | + $row['session_category'] = str_replace(';', ',', $row['session_category_id']); |
|
132 | 132 | |
133 | 133 | |
134 | 134 | // users |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | |
143 | 143 | $rsUsers = Database::query($sql); |
144 | 144 | $users = ''; |
145 | - while ($rowUsers = Database::fetch_array($rsUsers)){ |
|
146 | - if($cvs){ |
|
147 | - $users .= str_replace(';',',',$rowUsers['username']).'|'; |
|
145 | + while ($rowUsers = Database::fetch_array($rsUsers)) { |
|
146 | + if ($cvs) { |
|
147 | + $users .= str_replace(';', ',', $rowUsers['username']).'|'; |
|
148 | 148 | } else { |
149 | 149 | $users .= "\t\t<User>$rowUsers[username]</User>\n"; |
150 | 150 | } |
@@ -184,8 +184,8 @@ discard block |
||
184 | 184 | $coachs = implode(",", $coachs); |
185 | 185 | |
186 | 186 | if ($cvs) { |
187 | - $courses .= str_replace(';',',',$rowCourses['code']); |
|
188 | - $courses .= '['.str_replace(';',',',$coachs).']['; |
|
187 | + $courses .= str_replace(';', ',', $rowCourses['code']); |
|
188 | + $courses .= '['.str_replace(';', ',', $coachs).']['; |
|
189 | 189 | } else { |
190 | 190 | $courses .= "\t\t<Course>\n"; |
191 | 191 | $courses .= "\t\t\t<CourseCode>$rowCourses[code]</CourseCode>\n"; |
@@ -208,9 +208,9 @@ discard block |
||
208 | 208 | |
209 | 209 | $rsUsersCourse = Database::query($sql); |
210 | 210 | $userscourse = ''; |
211 | - while ($rowUsersCourse = Database::fetch_array($rsUsersCourse)){ |
|
211 | + while ($rowUsersCourse = Database::fetch_array($rsUsersCourse)) { |
|
212 | 212 | if ($cvs) { |
213 | - $userscourse .= str_replace(';',',',$rowUsersCourse['username']).','; |
|
213 | + $userscourse .= str_replace(';', ',', $rowUsersCourse['username']).','; |
|
214 | 214 | } else { |
215 | 215 | $courses .= "\t\t\t<User>$rowUsersCourse[username]</User>\n"; |
216 | 216 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | if (api_is_multiple_url_enabled()) { |
292 | 292 | $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
293 | 293 | $access_url_id = api_get_current_access_url_id(); |
294 | - if ($access_url_id != -1){ |
|
294 | + if ($access_url_id != -1) { |
|
295 | 295 | $sql = "SELECT s.id, name FROM $tbl_session s |
296 | 296 | INNER JOIN $tbl_session_rel_access_url as session_rel_url |
297 | 297 | ON (s.id = session_rel_url.session_id) |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | |
305 | 305 | echo '<div class="actions">'; |
306 | 306 | echo '<a href="../session/session_list.php">'. |
307 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('SessionList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
307 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('SessionList'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
308 | 308 | echo '</div>'; |
309 | 309 | |
310 | 310 | if (!empty($errorMsg)) { |
@@ -313,8 +313,8 @@ discard block |
||
313 | 313 | |
314 | 314 | $form = new FormValidator('session_export', 'post', api_get_self()); |
315 | 315 | $form->addElement('hidden', 'formSent', 1); |
316 | -$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV' , 'csv', null); |
|
317 | -$form->addElement('radio', 'file_type', '', 'XLS' , 'xls', null); |
|
316 | +$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'CSV', 'csv', null); |
|
317 | +$form->addElement('radio', 'file_type', '', 'XLS', 'xls', null); |
|
318 | 318 | $form->addElement('radio', 'file_type', null, 'XML', 'xml', null, array('id' => 'file_type_xml')); |
319 | 319 | |
320 | 320 | $options = array(); |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | $options[$enreg['id']] = $enreg['name']; |
324 | 324 | } |
325 | 325 | |
326 | -$form->addElement('select', 'session_id', get_lang('WhichSessionToExport'), $options); |
|
326 | +$form->addElement('select', 'session_id', get_lang('WhichSessionToExport'), $options); |
|
327 | 327 | $form->addButtonExport(get_lang('ExportSession')); |
328 | 328 | |
329 | 329 | $defaults = array(); |
@@ -37,11 +37,11 @@ discard block |
||
37 | 37 | set_time_limit(0); |
38 | 38 | |
39 | 39 | if (isset($_POST['formSent'])) { |
40 | - $formSent = $_POST['formSent']; |
|
41 | - $file_type = isset($_POST['file_type']) ? $_POST['file_type'] : 'csv'; |
|
42 | - $session_id = $_POST['session_id']; |
|
43 | - if (empty($session_id)) { |
|
44 | - $sql = "SELECT |
|
40 | + $formSent = $_POST['formSent']; |
|
41 | + $file_type = isset($_POST['file_type']) ? $_POST['file_type'] : 'csv'; |
|
42 | + $session_id = $_POST['session_id']; |
|
43 | + if (empty($session_id)) { |
|
44 | + $sql = "SELECT |
|
45 | 45 | s.id, |
46 | 46 | name, |
47 | 47 | id_coach, |
@@ -55,84 +55,84 @@ discard block |
||
55 | 55 | ON $tbl_user.user_id = s.id_coach |
56 | 56 | ORDER BY id"; |
57 | 57 | |
58 | - if (api_is_multiple_url_enabled()) { |
|
59 | - $tbl_session_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
60 | - $access_url_id = api_get_current_access_url_id(); |
|
61 | - if ($access_url_id != -1){ |
|
62 | - $sql = "SELECT s.id, name,id_coach,username,access_start_date,access_end_date,visibility,session_category_id |
|
58 | + if (api_is_multiple_url_enabled()) { |
|
59 | + $tbl_session_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
60 | + $access_url_id = api_get_current_access_url_id(); |
|
61 | + if ($access_url_id != -1){ |
|
62 | + $sql = "SELECT s.id, name,id_coach,username,access_start_date,access_end_date,visibility,session_category_id |
|
63 | 63 | FROM $tbl_session s |
64 | 64 | INNER JOIN $tbl_session_rel_access_url as session_rel_url |
65 | 65 | ON (s.id= session_rel_url.session_id) |
66 | 66 | INNER JOIN $tbl_user u ON (u.user_id = s.id_coach) |
67 | 67 | WHERE access_url_id = $access_url_id |
68 | 68 | ORDER BY id"; |
69 | - } |
|
70 | - } |
|
69 | + } |
|
70 | + } |
|
71 | 71 | |
72 | - $result = Database::query($sql); |
|
73 | - } else { |
|
74 | - $sql = "SELECT s.id,name,username,access_start_date,access_end_date,visibility,session_category_id |
|
72 | + $result = Database::query($sql); |
|
73 | + } else { |
|
74 | + $sql = "SELECT s.id,name,username,access_start_date,access_end_date,visibility,session_category_id |
|
75 | 75 | FROM $tbl_session s |
76 | 76 | INNER JOIN $tbl_user |
77 | 77 | ON $tbl_user.user_id = s.id_coach |
78 | 78 | WHERE id='$session_id'"; |
79 | - $result = Database::query($sql); |
|
80 | - } |
|
79 | + $result = Database::query($sql); |
|
80 | + } |
|
81 | 81 | |
82 | - if (Database::num_rows($result)) { |
|
82 | + if (Database::num_rows($result)) { |
|
83 | 83 | |
84 | 84 | |
85 | 85 | |
86 | - $sessionListToExport = []; |
|
86 | + $sessionListToExport = []; |
|
87 | 87 | |
88 | - if (in_array($file_type, ['csv', 'xls'])) { |
|
88 | + if (in_array($file_type, ['csv', 'xls'])) { |
|
89 | 89 | |
90 | - $archiveFile = 'export_sessions_'.$session_id.'_'.api_get_local_time(); |
|
90 | + $archiveFile = 'export_sessions_'.$session_id.'_'.api_get_local_time(); |
|
91 | 91 | |
92 | - $cvs = true; |
|
93 | - $sessionListToExport[] = [ |
|
94 | - 'SessionName', |
|
95 | - 'Coach', |
|
96 | - 'DateStart', |
|
97 | - 'DateEnd', |
|
98 | - 'Visibility', |
|
99 | - 'SessionCategory', |
|
100 | - 'Users', |
|
101 | - 'Courses' |
|
102 | - ]; |
|
103 | - } else { |
|
104 | - if (!file_exists($archivePath)) { |
|
105 | - mkdir($archivePath, api_get_permissions_for_new_directories(), true); |
|
106 | - } |
|
92 | + $cvs = true; |
|
93 | + $sessionListToExport[] = [ |
|
94 | + 'SessionName', |
|
95 | + 'Coach', |
|
96 | + 'DateStart', |
|
97 | + 'DateEnd', |
|
98 | + 'Visibility', |
|
99 | + 'SessionCategory', |
|
100 | + 'Users', |
|
101 | + 'Courses' |
|
102 | + ]; |
|
103 | + } else { |
|
104 | + if (!file_exists($archivePath)) { |
|
105 | + mkdir($archivePath, api_get_permissions_for_new_directories(), true); |
|
106 | + } |
|
107 | 107 | |
108 | - if (!file_exists($archivePath.'index.html')) { |
|
109 | - $fp = fopen($archivePath.'index.html', 'w'); |
|
110 | - fputs($fp, '<html><head></head><body></body></html>'); |
|
111 | - fclose($fp); |
|
112 | - } |
|
108 | + if (!file_exists($archivePath.'index.html')) { |
|
109 | + $fp = fopen($archivePath.'index.html', 'w'); |
|
110 | + fputs($fp, '<html><head></head><body></body></html>'); |
|
111 | + fclose($fp); |
|
112 | + } |
|
113 | 113 | |
114 | - $archiveFile = 'export_sessions_'.$session_id.'_'.api_get_local_time().'.'.$file_type; |
|
115 | - while (file_exists($archivePath.$archiveFile)) { |
|
116 | - $archiveFile ='export_users_'.$session_id.'_'.api_get_local_time().'_'.uniqid('').'.'.$file_type; |
|
117 | - } |
|
114 | + $archiveFile = 'export_sessions_'.$session_id.'_'.api_get_local_time().'.'.$file_type; |
|
115 | + while (file_exists($archivePath.$archiveFile)) { |
|
116 | + $archiveFile ='export_users_'.$session_id.'_'.api_get_local_time().'_'.uniqid('').'.'.$file_type; |
|
117 | + } |
|
118 | 118 | |
119 | - $cvs = false; |
|
120 | - $fp = fopen($archivePath.$archiveFile, 'w'); |
|
121 | - fputs($fp, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Sessions>\n"); |
|
122 | - } |
|
119 | + $cvs = false; |
|
120 | + $fp = fopen($archivePath.$archiveFile, 'w'); |
|
121 | + fputs($fp, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Sessions>\n"); |
|
122 | + } |
|
123 | 123 | |
124 | 124 | |
125 | - while ($row = Database::fetch_array($result)) { |
|
126 | - $row['name'] = str_replace(';',',',$row['name']); |
|
127 | - $row['username'] = str_replace(';',',',$row['username']); |
|
128 | - $row['access_start_date'] = str_replace(';',',',$row['access_start_date']); |
|
129 | - $row['access_end_date'] = str_replace(';',',',$row['access_end_date']); |
|
130 | - $row['visibility'] = str_replace(';',',',$row['visibility']); |
|
131 | - $row['session_category'] = str_replace(';',',',$row['session_category_id']); |
|
125 | + while ($row = Database::fetch_array($result)) { |
|
126 | + $row['name'] = str_replace(';',',',$row['name']); |
|
127 | + $row['username'] = str_replace(';',',',$row['username']); |
|
128 | + $row['access_start_date'] = str_replace(';',',',$row['access_start_date']); |
|
129 | + $row['access_end_date'] = str_replace(';',',',$row['access_end_date']); |
|
130 | + $row['visibility'] = str_replace(';',',',$row['visibility']); |
|
131 | + $row['session_category'] = str_replace(';',',',$row['session_category_id']); |
|
132 | 132 | |
133 | 133 | |
134 | - // users |
|
135 | - $sql = "SELECT DISTINCT $tbl_user.username |
|
134 | + // users |
|
135 | + $sql = "SELECT DISTINCT $tbl_user.username |
|
136 | 136 | FROM $tbl_user |
137 | 137 | INNER JOIN $tbl_session_user |
138 | 138 | ON |
@@ -140,33 +140,33 @@ discard block |
||
140 | 140 | $tbl_session_user.relation_type<>".SESSION_RELATION_TYPE_RRHH." AND |
141 | 141 | $tbl_session_user.session_id = '".$row['id']."'"; |
142 | 142 | |
143 | - $rsUsers = Database::query($sql); |
|
144 | - $users = ''; |
|
145 | - while ($rowUsers = Database::fetch_array($rsUsers)){ |
|
146 | - if($cvs){ |
|
147 | - $users .= str_replace(';',',',$rowUsers['username']).'|'; |
|
148 | - } else { |
|
149 | - $users .= "\t\t<User>$rowUsers[username]</User>\n"; |
|
150 | - } |
|
151 | - } |
|
152 | - |
|
153 | - if (!empty($users) && $cvs) { |
|
154 | - $users = api_substr($users, 0, api_strlen($users) - 1); |
|
155 | - } |
|
156 | - |
|
157 | - // Courses |
|
158 | - $sql = "SELECT DISTINCT c.code, sc.id, c_id |
|
143 | + $rsUsers = Database::query($sql); |
|
144 | + $users = ''; |
|
145 | + while ($rowUsers = Database::fetch_array($rsUsers)){ |
|
146 | + if($cvs){ |
|
147 | + $users .= str_replace(';',',',$rowUsers['username']).'|'; |
|
148 | + } else { |
|
149 | + $users .= "\t\t<User>$rowUsers[username]</User>\n"; |
|
150 | + } |
|
151 | + } |
|
152 | + |
|
153 | + if (!empty($users) && $cvs) { |
|
154 | + $users = api_substr($users, 0, api_strlen($users) - 1); |
|
155 | + } |
|
156 | + |
|
157 | + // Courses |
|
158 | + $sql = "SELECT DISTINCT c.code, sc.id, c_id |
|
159 | 159 | FROM $tbl_course c |
160 | 160 | INNER JOIN $tbl_session_course_user sc |
161 | 161 | ON c.id = sc.c_id |
162 | 162 | AND sc.session_id = '".$row['id']."'"; |
163 | 163 | |
164 | - $rsCourses = Database::query($sql); |
|
164 | + $rsCourses = Database::query($sql); |
|
165 | 165 | |
166 | - $courses = ''; |
|
167 | - while ($rowCourses = Database::fetch_array($rsCourses)) { |
|
168 | - // get coachs from a course |
|
169 | - $sql = "SELECT u.username |
|
166 | + $courses = ''; |
|
167 | + while ($rowCourses = Database::fetch_array($rsCourses)) { |
|
168 | + // get coachs from a course |
|
169 | + $sql = "SELECT u.username |
|
170 | 170 | FROM $tbl_session_course_user scu |
171 | 171 | INNER JOIN $tbl_user u |
172 | 172 | ON u.user_id = scu.user_id |
@@ -175,25 +175,25 @@ discard block |
||
175 | 175 | scu.session_id = '".$row['id']."' AND |
176 | 176 | scu.status = 2 "; |
177 | 177 | |
178 | - $rs_coachs = Database::query($sql); |
|
179 | - $coachs = array(); |
|
180 | - while ($row_coachs = Database::fetch_array($rs_coachs)) { |
|
181 | - $coachs[] = $row_coachs['username']; |
|
182 | - } |
|
183 | - |
|
184 | - $coachs = implode(",", $coachs); |
|
185 | - |
|
186 | - if ($cvs) { |
|
187 | - $courses .= str_replace(';',',',$rowCourses['code']); |
|
188 | - $courses .= '['.str_replace(';',',',$coachs).']['; |
|
189 | - } else { |
|
190 | - $courses .= "\t\t<Course>\n"; |
|
191 | - $courses .= "\t\t\t<CourseCode>$rowCourses[code]</CourseCode>\n"; |
|
192 | - $courses .= "\t\t\t<Coach>$coachs</Coach>\n"; |
|
193 | - } |
|
194 | - |
|
195 | - // rel user courses |
|
196 | - $sql = "SELECT DISTINCT u.username |
|
178 | + $rs_coachs = Database::query($sql); |
|
179 | + $coachs = array(); |
|
180 | + while ($row_coachs = Database::fetch_array($rs_coachs)) { |
|
181 | + $coachs[] = $row_coachs['username']; |
|
182 | + } |
|
183 | + |
|
184 | + $coachs = implode(",", $coachs); |
|
185 | + |
|
186 | + if ($cvs) { |
|
187 | + $courses .= str_replace(';',',',$rowCourses['code']); |
|
188 | + $courses .= '['.str_replace(';',',',$coachs).']['; |
|
189 | + } else { |
|
190 | + $courses .= "\t\t<Course>\n"; |
|
191 | + $courses .= "\t\t\t<CourseCode>$rowCourses[code]</CourseCode>\n"; |
|
192 | + $courses .= "\t\t\t<Coach>$coachs</Coach>\n"; |
|
193 | + } |
|
194 | + |
|
195 | + // rel user courses |
|
196 | + $sql = "SELECT DISTINCT u.username |
|
197 | 197 | FROM $tbl_session_course_user scu |
198 | 198 | INNER JOIN $tbl_session_user su |
199 | 199 | ON |
@@ -206,79 +206,79 @@ discard block |
||
206 | 206 | scu.c_id='".$rowCourses['c_id']."' AND |
207 | 207 | scu.session_id='".$row['id']."'"; |
208 | 208 | |
209 | - $rsUsersCourse = Database::query($sql); |
|
210 | - $userscourse = ''; |
|
211 | - while ($rowUsersCourse = Database::fetch_array($rsUsersCourse)){ |
|
212 | - if ($cvs) { |
|
213 | - $userscourse .= str_replace(';',',',$rowUsersCourse['username']).','; |
|
214 | - } else { |
|
215 | - $courses .= "\t\t\t<User>$rowUsersCourse[username]</User>\n"; |
|
216 | - } |
|
217 | - } |
|
218 | - |
|
219 | - if ($cvs) { |
|
220 | - if (!empty($userscourse)) { |
|
221 | - $userscourse = api_substr( |
|
222 | - $userscourse, |
|
223 | - 0, |
|
224 | - api_strlen($userscourse) - 1 |
|
225 | - ); |
|
226 | - } |
|
227 | - |
|
228 | - $courses .= $userscourse.']|'; |
|
229 | - } else { |
|
230 | - $courses .= "\t\t</Course>\n"; |
|
231 | - } |
|
232 | - } |
|
233 | - |
|
234 | - if (!empty($courses) && $cvs) { |
|
235 | - $courses = api_substr($courses, 0, api_strlen($courses) - 1); |
|
236 | - } |
|
237 | - $add = $courses; |
|
238 | - |
|
239 | - if (in_array($file_type, ['csv', 'xls'])) { |
|
240 | - $sessionListToExport[] = [ |
|
241 | - $row['name'], |
|
242 | - $row['username'], |
|
243 | - $row['access_start_date'], |
|
244 | - $row['access_end_date'], |
|
245 | - $row['visibility'], |
|
246 | - $row['session_category'], |
|
247 | - $users, |
|
248 | - $courses |
|
249 | - ]; |
|
250 | - } else { |
|
251 | - $add = "\t<Session>\n" |
|
252 | - ."\t\t<SessionName>$row[name]</SessionName>\n" |
|
253 | - ."\t\t<Coach>$row[username]</Coach>\n" |
|
254 | - ."\t\t<DateStart>$row[access_start_date]</DateStart>\n" |
|
255 | - ."\t\t<DateEnd>$row[access_end_date]</DateEnd>\n" |
|
256 | - ."\t\t<Visibility>$row[visibility]</Visibility>\n" |
|
257 | - ."\t\t<SessionCategory>$row[session_category]</SessionCategory>\n"; |
|
258 | - } |
|
259 | - |
|
260 | - if (!$cvs) { |
|
261 | - $add .= "\t</Session>\n"; |
|
262 | - fputs($fp, $add); |
|
263 | - } |
|
264 | - } |
|
265 | - |
|
266 | - switch ($file_type) { |
|
267 | - case 'xml': |
|
268 | - fputs($fp, "</Sessions>\n"); |
|
269 | - fclose($fp); |
|
270 | - $errorMsg = get_lang('UserListHasBeenExported').'<br/> |
|
209 | + $rsUsersCourse = Database::query($sql); |
|
210 | + $userscourse = ''; |
|
211 | + while ($rowUsersCourse = Database::fetch_array($rsUsersCourse)){ |
|
212 | + if ($cvs) { |
|
213 | + $userscourse .= str_replace(';',',',$rowUsersCourse['username']).','; |
|
214 | + } else { |
|
215 | + $courses .= "\t\t\t<User>$rowUsersCourse[username]</User>\n"; |
|
216 | + } |
|
217 | + } |
|
218 | + |
|
219 | + if ($cvs) { |
|
220 | + if (!empty($userscourse)) { |
|
221 | + $userscourse = api_substr( |
|
222 | + $userscourse, |
|
223 | + 0, |
|
224 | + api_strlen($userscourse) - 1 |
|
225 | + ); |
|
226 | + } |
|
227 | + |
|
228 | + $courses .= $userscourse.']|'; |
|
229 | + } else { |
|
230 | + $courses .= "\t\t</Course>\n"; |
|
231 | + } |
|
232 | + } |
|
233 | + |
|
234 | + if (!empty($courses) && $cvs) { |
|
235 | + $courses = api_substr($courses, 0, api_strlen($courses) - 1); |
|
236 | + } |
|
237 | + $add = $courses; |
|
238 | + |
|
239 | + if (in_array($file_type, ['csv', 'xls'])) { |
|
240 | + $sessionListToExport[] = [ |
|
241 | + $row['name'], |
|
242 | + $row['username'], |
|
243 | + $row['access_start_date'], |
|
244 | + $row['access_end_date'], |
|
245 | + $row['visibility'], |
|
246 | + $row['session_category'], |
|
247 | + $users, |
|
248 | + $courses |
|
249 | + ]; |
|
250 | + } else { |
|
251 | + $add = "\t<Session>\n" |
|
252 | + ."\t\t<SessionName>$row[name]</SessionName>\n" |
|
253 | + ."\t\t<Coach>$row[username]</Coach>\n" |
|
254 | + ."\t\t<DateStart>$row[access_start_date]</DateStart>\n" |
|
255 | + ."\t\t<DateEnd>$row[access_end_date]</DateEnd>\n" |
|
256 | + ."\t\t<Visibility>$row[visibility]</Visibility>\n" |
|
257 | + ."\t\t<SessionCategory>$row[session_category]</SessionCategory>\n"; |
|
258 | + } |
|
259 | + |
|
260 | + if (!$cvs) { |
|
261 | + $add .= "\t</Session>\n"; |
|
262 | + fputs($fp, $add); |
|
263 | + } |
|
264 | + } |
|
265 | + |
|
266 | + switch ($file_type) { |
|
267 | + case 'xml': |
|
268 | + fputs($fp, "</Sessions>\n"); |
|
269 | + fclose($fp); |
|
270 | + $errorMsg = get_lang('UserListHasBeenExported').'<br/> |
|
271 | 271 | <a class="btn btn-default" href="'.$archiveURL.$archiveFile.'">'.get_lang('ClickHereToDownloadTheFile').'</a>'; |
272 | - break; |
|
273 | - case 'csv': |
|
274 | - Export::arrayToCsv($sessionListToExport, $archiveFile); |
|
275 | - exit; |
|
276 | - case 'xls': |
|
277 | - Export::arrayToXls($sessionListToExport, $archiveFile); |
|
278 | - exit; |
|
279 | - break; |
|
280 | - } |
|
281 | - } |
|
272 | + break; |
|
273 | + case 'csv': |
|
274 | + Export::arrayToCsv($sessionListToExport, $archiveFile); |
|
275 | + exit; |
|
276 | + case 'xls': |
|
277 | + Export::arrayToXls($sessionListToExport, $archiveFile); |
|
278 | + exit; |
|
279 | + break; |
|
280 | + } |
|
281 | + } |
|
282 | 282 | } |
283 | 283 | |
284 | 284 | // display the header |
@@ -288,26 +288,26 @@ discard block |
||
288 | 288 | $sql = "SELECT id, name FROM $tbl_session ORDER BY name"; |
289 | 289 | |
290 | 290 | if (api_is_multiple_url_enabled()) { |
291 | - $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
292 | - $access_url_id = api_get_current_access_url_id(); |
|
293 | - if ($access_url_id != -1){ |
|
294 | - $sql = "SELECT s.id, name FROM $tbl_session s |
|
291 | + $tbl_session_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_SESSION); |
|
292 | + $access_url_id = api_get_current_access_url_id(); |
|
293 | + if ($access_url_id != -1){ |
|
294 | + $sql = "SELECT s.id, name FROM $tbl_session s |
|
295 | 295 | INNER JOIN $tbl_session_rel_access_url as session_rel_url |
296 | 296 | ON (s.id = session_rel_url.session_id) |
297 | 297 | WHERE access_url_id = $access_url_id |
298 | 298 | ORDER BY name"; |
299 | - } |
|
299 | + } |
|
300 | 300 | } |
301 | 301 | $result = Database::query($sql); |
302 | 302 | $Sessions = Database::store_result($result); |
303 | 303 | |
304 | 304 | echo '<div class="actions">'; |
305 | 305 | echo '<a href="../session/session_list.php">'. |
306 | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('SessionList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
306 | + Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('SessionList'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
307 | 307 | echo '</div>'; |
308 | 308 | |
309 | 309 | if (!empty($errorMsg)) { |
310 | - Display::display_normal_message($errorMsg, false); //main API |
|
310 | + Display::display_normal_message($errorMsg, false); //main API |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | $form = new FormValidator('session_export', 'post', api_get_self()); |
@@ -5,8 +5,8 @@ |
||
5 | 5 | */ |
6 | 6 | require_once '../inc/global.inc.php'; |
7 | 7 | if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') { |
8 | - header('Location:inbox.php?f=social'); |
|
8 | + header('Location:inbox.php?f=social'); |
|
9 | 9 | } elseif ( api_get_setting('allow_message_tool')=='true') { |
10 | - header('Location:inbox.php'); |
|
10 | + header('Location:inbox.php'); |
|
11 | 11 | } |
12 | 12 | exit; |
@@ -4,9 +4,9 @@ |
||
4 | 4 | * @package chamilo.messages |
5 | 5 | */ |
6 | 6 | require_once '../inc/global.inc.php'; |
7 | -if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') { |
|
7 | +if (api_get_setting('allow_social_tool') == 'true' && api_get_setting('allow_message_tool') == 'true') { |
|
8 | 8 | header('Location:inbox.php?f=social'); |
9 | -} elseif ( api_get_setting('allow_message_tool')=='true') { |
|
9 | +} elseif (api_get_setting('allow_message_tool') == 'true') { |
|
10 | 10 | header('Location:inbox.php'); |
11 | 11 | } |
12 | 12 | exit; |