@@ -186,7 +186,10 @@ |
||
186 | 186 | <select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:320px;"> <?php |
187 | 187 | foreach($nosessionCourses as $enreg) { |
188 | 188 | ?> |
189 | - <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) echo 'selected="selected"'; ?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option> |
|
189 | + <option value="<?php echo $enreg['id']; ?>" <?php echo 'title="'.htmlspecialchars($enreg['title'].' ('.$enreg['visual_code'].')',ENT_QUOTES).'"'; if(in_array($enreg['code'],$CourseList)) { |
|
190 | + echo 'selected="selected"'; |
|
191 | +} |
|
192 | +?>><?php echo $enreg['title'].' ('.$enreg['visual_code'].')'; ?></option> |
|
190 | 193 | <?php |
191 | 194 | } |
192 | 195 | ?> </select></div> <?php |
@@ -98,9 +98,10 @@ discard block |
||
98 | 98 | $cond_user_id = ''; |
99 | 99 | |
100 | 100 | // Only for single & multiple |
101 | - if (in_array($type, array('single','multiple'))) |
|
102 | - if (!empty($id_session)) { |
|
101 | + if (in_array($type, array('single','multiple'))) { |
|
102 | + if (!empty($id_session)) { |
|
103 | 103 | $id_session = intval($id_session); |
104 | + } |
|
104 | 105 | // check id_user from session_rel_user table |
105 | 106 | $sql = 'SELECT user_id FROM '.$tbl_session_rel_user.' |
106 | 107 | WHERE session_id = "'.$id_session.'" AND relation_type<>'.SESSION_RELATION_TYPE_RRHH.' '; |
@@ -558,7 +559,10 @@ discard block |
||
558 | 559 | echo $newLinks; |
559 | 560 | ?> |
560 | 561 | </div> |
561 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($addProcess)) echo '&add=true' ; ?>" <?php if ($ajax_search) { echo ' onsubmit="valide();"';}?>> |
|
562 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($addProcess)) { |
|
563 | + echo '&add=true' ; |
|
564 | +} |
|
565 | +?>" <?php if ($ajax_search) { echo ' onsubmit="valide();"';}?>> |
|
562 | 566 | <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?> |
563 | 567 | <?php |
564 | 568 | if ($add_type=='multiple') { |
@@ -613,7 +617,10 @@ discard block |
||
613 | 617 | <?php |
614 | 618 | foreach ($nosessionUsersList as $uid => $enreg) { |
615 | 619 | ?> |
616 | - <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>> |
|
620 | + <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) { |
|
621 | + echo 'selected="selected"'; |
|
622 | +} |
|
623 | +?>> |
|
617 | 624 | <?php |
618 | 625 | $personName = api_get_person_name($enreg['fn'], $enreg['ln']).' ('.$enreg['un'].') '.$enreg['official_code']; |
619 | 626 | if ($showOfficialCode) { |
@@ -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 |
@@ -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> |
@@ -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 | ?> |
@@ -121,8 +121,9 @@ discard block |
||
121 | 121 | $new_session_list = UserManager::get_personal_session_course_list(api_get_user_id()); |
122 | 122 | $my_session_list = array(); |
123 | 123 | foreach($new_session_list as $item) { |
124 | - if (!empty($item['id_session'])) |
|
125 | - $my_session_list[] = $item['id_session']; |
|
124 | + if (!empty($item['id_session'])) { |
|
125 | + $my_session_list[] = $item['id_session']; |
|
126 | + } |
|
126 | 127 | } |
127 | 128 | if (!in_array($session_id, $my_session_list)) { |
128 | 129 | break; |
@@ -254,8 +255,9 @@ discard block |
||
254 | 255 | $new_session_list = UserManager::get_personal_session_course_list(api_get_user_id()); |
255 | 256 | $my_session_list = array(); |
256 | 257 | foreach($new_session_list as $item) { |
257 | - if (!empty($item['id_session'])) |
|
258 | - $my_session_list[] = $item['id_session']; |
|
258 | + if (!empty($item['id_session'])) { |
|
259 | + $my_session_list[] = $item['id_session']; |
|
260 | + } |
|
259 | 261 | } |
260 | 262 | if (!in_array($session_id, $my_session_list)) { |
261 | 263 | break; |
@@ -384,8 +386,9 @@ discard block |
||
384 | 386 | $new_session_list = UserManager::get_personal_session_course_list(api_get_user_id()); |
385 | 387 | $my_session_list = array(); |
386 | 388 | foreach($new_session_list as $item) { |
387 | - if (!empty($item['id_session'])) |
|
388 | - $my_session_list[] = $item['id_session']; |
|
389 | + if (!empty($item['id_session'])) { |
|
390 | + $my_session_list[] = $item['id_session']; |
|
391 | + } |
|
389 | 392 | } |
390 | 393 | if (!in_array($session_id, $my_session_list)) { |
391 | 394 | break; |
@@ -29,8 +29,9 @@ |
||
29 | 29 | while (($file = readdir($dh)) !== false) { |
30 | 30 | if ($file[0] <> '.' && substr($file, -4, strlen($file)) == '.php') { |
31 | 31 | if ($only_main_name) { |
32 | - if ($file != '' && strpos($file, '.inc.php')) |
|
33 | - $content_dir[] = substr($file, 0, strpos($file, '.inc.php')); |
|
32 | + if ($file != '' && strpos($file, '.inc.php')) { |
|
33 | + $content_dir[] = substr($file, 0, strpos($file, '.inc.php')); |
|
34 | + } |
|
34 | 35 | } else { |
35 | 36 | $content_dir[] = $file; |
36 | 37 | } |
@@ -158,8 +158,9 @@ discard block |
||
158 | 158 | $array[] = $this->build_setting($status, '[INI]', 'display_errors', 'http://www.php.net/manual/en/ini.core.php#ini.display_errors', $setting, $req_setting, 'on_off', get_lang('DisplayErrorsInfo')); |
159 | 159 | |
160 | 160 | $setting = ini_get('default_charset'); |
161 | - if ($setting == '') |
|
162 | - $setting = null; |
|
161 | + if ($setting == '') { |
|
162 | + $setting = null; |
|
163 | + } |
|
163 | 164 | $req_setting = null; |
164 | 165 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_ERROR; |
165 | 166 | $array[] = $this->build_setting($status, '[INI]', 'default_charset', 'http://www.php.net/manual/en/ini.core.php#ini.default-charset', $setting, $req_setting, null, get_lang('DefaultCharsetInfo')); |
@@ -177,22 +178,25 @@ discard block |
||
177 | 178 | $setting = ini_get('memory_limit'); |
178 | 179 | $req_setting = '>= '.REQUIRED_MIN_MEMORY_LIMIT.'M'; |
179 | 180 | $status = self :: STATUS_ERROR; |
180 | - if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT) |
|
181 | - $status = self :: STATUS_OK; |
|
181 | + if ((float)$setting >= REQUIRED_MIN_MEMORY_LIMIT) { |
|
182 | + $status = self :: STATUS_OK; |
|
183 | + } |
|
182 | 184 | $array[] = $this->build_setting($status, '[INI]', 'memory_limit', 'http://www.php.net/manual/en/ini.core.php#ini.memory-limit', $setting, $req_setting, null, get_lang('MemoryLimitInfo')); |
183 | 185 | |
184 | 186 | $setting = ini_get('post_max_size'); |
185 | 187 | $req_setting = '>= '.REQUIRED_MIN_POST_MAX_SIZE.'M'; |
186 | 188 | $status = self :: STATUS_ERROR; |
187 | - if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE) |
|
188 | - $status = self :: STATUS_OK; |
|
189 | + if ((float)$setting >= REQUIRED_MIN_POST_MAX_SIZE) { |
|
190 | + $status = self :: STATUS_OK; |
|
191 | + } |
|
189 | 192 | $array[] = $this->build_setting($status, '[INI]', 'post_max_size', 'http://www.php.net/manual/en/ini.core.php#ini.post-max-size', $setting, $req_setting, null, get_lang('PostMaxSizeInfo')); |
190 | 193 | |
191 | 194 | $setting = ini_get('upload_max_filesize'); |
192 | 195 | $req_setting = '>= '.REQUIRED_MIN_UPLOAD_MAX_FILESIZE.'M'; |
193 | 196 | $status = self :: STATUS_ERROR; |
194 | - if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) |
|
195 | - $status = self :: STATUS_OK; |
|
197 | + if ((float)$setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) { |
|
198 | + $status = self :: STATUS_OK; |
|
199 | + } |
|
196 | 200 | $array[] = $this->build_setting($status, '[INI]', 'upload_max_filesize', 'http://www.php.net/manual/en/ini.core.php#ini.upload_max_filesize', $setting, $req_setting, null, get_lang('UploadMaxFilesizeInfo')); |
197 | 201 | |
198 | 202 | $setting = ini_get('variables_order'); |
@@ -205,7 +209,7 @@ discard block |
||
205 | 209 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING; |
206 | 210 | $array[] = $this->build_setting($status, '[SESSION]', 'session.gc_maxlifetime', 'http://www.php.net/manual/en/ini.core.php#session.gc-maxlifetime', $setting, $req_setting, null, get_lang('SessionGCMaxLifetimeInfo')); |
207 | 211 | |
208 | - if (api_check_browscap()){$setting = true;}else{$setting=false;} |
|
212 | + if (api_check_browscap()){$setting = true;} else{$setting=false;} |
|
209 | 213 | $req_setting = true; |
210 | 214 | $status = $setting == $req_setting ? self :: STATUS_OK : self :: STATUS_WARNING; |
211 | 215 | $array[] = $this->build_setting($status, '[INI]', 'browscap', 'http://www.php.net/manual/en/misc.configuration.php#ini.browscap', $setting, $req_setting, 'on_off', get_lang('BrowscapInfo')); |
@@ -219,10 +219,10 @@ |
||
219 | 219 | // action links |
220 | 220 | echo '<div class="actions">'; |
221 | 221 | if (!api_is_anonymous()) { |
222 | - if (api_get_session_id() == 0) |
|
223 | - echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
|
222 | + if (api_get_session_id() == 0) { |
|
223 | + echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
|
224 | 224 | Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32') . '</a>'; |
225 | - elseif (api_is_allowed_to_session_edit(false, true)) { |
|
225 | + } elseif (api_is_allowed_to_session_edit(false, true)) { |
|
226 | 226 | echo '<a href="index.php?' . api_get_cidreq() . '&action=addnote">' . |
227 | 227 | Display::return_icon('new_note.png', get_lang('NoteAddNew'), '', '32') . '</a>'; |
228 | 228 | } |