@@ -144,7 +144,10 @@ |
||
144 | 144 | echo '</div>'; |
145 | 145 | ?> |
146 | 146 | |
147 | -<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
147 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) { |
|
148 | + echo '&add=true' ; |
|
149 | +} |
|
150 | +?>" style="margin:0px;" <?php if($ajax_search){echo ' onsubmit="valide();"';}?>> |
|
148 | 151 | <?php echo '<legend>'.$tool_name.' '.$promotion_data['name'].'</legend>'; |
149 | 152 | |
150 | 153 | if ($add_type=='multiple') { |
@@ -254,10 +254,11 @@ |
||
254 | 254 | <td colspan="3" align="center"> |
255 | 255 | <br /> |
256 | 256 | <?php |
257 | - if(isset($_GET['add'])) |
|
258 | - echo '<button class="save" onclick="valide()" >'.get_lang('AddUserGroupToURL').'</button>'; |
|
259 | - else |
|
260 | - echo '<button class="save" onclick="valide()" >'.get_lang('EditUserGroupToURL').'</button>'; |
|
257 | + if(isset($_GET['add'])) { |
|
258 | + echo '<button class="save" onclick="valide()" >'.get_lang('AddUserGroupToURL').'</button>'; |
|
259 | + } else { |
|
260 | + echo '<button class="save" onclick="valide()" >'.get_lang('EditUserGroupToURL').'</button>'; |
|
261 | + } |
|
261 | 262 | ?> |
262 | 263 | </td> |
263 | 264 | </tr> |
@@ -471,8 +471,9 @@ discard block |
||
471 | 471 | $extraction_path = $cssToUpload.$style_name.'/'; |
472 | 472 | for ($i = 0; $i < $num_files; $i++) { |
473 | 473 | $entry = $zip->getNameIndex($i); |
474 | - if (substr($entry, -1) == '/') |
|
475 | - continue; |
|
474 | + if (substr($entry, -1) == '/') { |
|
475 | + continue; |
|
476 | + } |
|
476 | 477 | |
477 | 478 | $pos_slash = strpos($entry, '/'); |
478 | 479 | $entry_without_first_dir = substr($entry, $pos_slash + 1); |
@@ -1231,17 +1232,21 @@ discard block |
||
1231 | 1232 | $hideme = array('disabled'); |
1232 | 1233 | } elseif ($url_info['active'] == 1) { |
1233 | 1234 | // We show the elements. |
1234 | - if (empty($row['variable'])) |
|
1235 | - $row['variable'] = 0; |
|
1236 | - if (empty($row['subkey'])) |
|
1237 | - $row['subkey'] = 0; |
|
1238 | - if (empty($row['category'])) |
|
1239 | - $row['category'] = 0; |
|
1235 | + if (empty($row['variable'])) { |
|
1236 | + $row['variable'] = 0; |
|
1237 | + } |
|
1238 | + if (empty($row['subkey'])) { |
|
1239 | + $row['subkey'] = 0; |
|
1240 | + } |
|
1241 | + if (empty($row['category'])) { |
|
1242 | + $row['category'] = 0; |
|
1243 | + } |
|
1240 | 1244 | |
1241 | 1245 | if (is_array($settings_by_access_list[ $row['variable'] ] [ $row['subkey'] ] [ $row['category'] ])) { |
1242 | 1246 | // We are sure that the other site have a selected value. |
1243 | - if ($settings_by_access_list[ $row['variable'] ] [ $row['subkey'] ] [ $row['category'] ]['selected_value'] != '') |
|
1244 | - $row['selected_value'] = $settings_by_access_list[$row['variable']] [$row['subkey']] [$row['category']]['selected_value']; |
|
1247 | + if ($settings_by_access_list[ $row['variable'] ] [ $row['subkey'] ] [ $row['category'] ]['selected_value'] != '') { |
|
1248 | + $row['selected_value'] = $settings_by_access_list[$row['variable']] [$row['subkey']] [$row['category']]['selected_value']; |
|
1249 | + } |
|
1245 | 1250 | } |
1246 | 1251 | // There is no else{} statement because we load the default $row['selected_value'] of the main Chamilo site. |
1247 | 1252 | } |
@@ -119,7 +119,10 @@ discard block |
||
119 | 119 | <td width="40%" align="center"> |
120 | 120 | <select name="course_list[]" multiple="multiple" size="20" style="width:400px;"> |
121 | 121 | <?php foreach ($db_courses as $course) { ?> |
122 | - <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) echo 'selected="selected"'; ?>><?php echo $course['title'].' ('.$course['code'].')'; ?> |
|
122 | + <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) { |
|
123 | + echo 'selected="selected"'; |
|
124 | +} |
|
125 | +?>><?php echo $course['title'].' ('.$course['code'].')'; ?> |
|
123 | 126 | </option> |
124 | 127 | <?php } ?> |
125 | 128 | </select> |
@@ -130,7 +133,10 @@ discard block |
||
130 | 133 | <td width="40%" align="center"> |
131 | 134 | <select name="url_list[]" multiple="multiple" size="20" style="width:300px;"> |
132 | 135 | <?php foreach ($db_urls as $url_obj) { ?> |
133 | - <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) echo 'selected="selected"'; ?>><?php echo $url_obj['url']; ?> |
|
136 | + <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) { |
|
137 | + echo 'selected="selected"'; |
|
138 | +} |
|
139 | +?>><?php echo $url_obj['url']; ?> |
|
134 | 140 | </option> |
135 | 141 | <?php } ?> |
136 | 142 | </select> |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | echo '</form>'; |
64 | 64 | echo '</div>'; |
65 | 65 | |
66 | -} |
|
67 | -elseif(!empty($annee) && empty($id_session)) |
|
66 | +} elseif(!empty($annee) && empty($id_session)) |
|
68 | 67 | { |
69 | 68 | Display::display_header($tool_name); |
70 | 69 | echo '<div style="align:center">'; |
@@ -142,8 +141,7 @@ discard block |
||
142 | 141 | echo '<br /><br />'; |
143 | 142 | echo '</div>'; |
144 | 143 | |
145 | -} |
|
146 | -elseif (!empty($annee) && !empty($id_session) && ($_POST['confirmed']=='yes')) |
|
144 | +} elseif (!empty($annee) && !empty($id_session) && ($_POST['confirmed']=='yes')) |
|
147 | 145 | { |
148 | 146 | $id=$_POST['username_form']; |
149 | 147 | $UserList=array(); |
@@ -118,7 +118,10 @@ discard block |
||
118 | 118 | <?php |
119 | 119 | foreach ($db_users as $user) { |
120 | 120 | ?> |
121 | - <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'], $users)) echo 'selected="selected"'; ?>> |
|
121 | + <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'], $users)) { |
|
122 | + echo 'selected="selected"'; |
|
123 | +} |
|
124 | +?>> |
|
122 | 125 | <?php echo api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')'; ?> |
123 | 126 | </option> |
124 | 127 | <?php |
@@ -134,7 +137,10 @@ discard block |
||
134 | 137 | <?php |
135 | 138 | foreach ($db_urls as $url_obj) { |
136 | 139 | ?> |
137 | - <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) echo 'selected="selected"'; ?>> |
|
140 | + <option value="<?php echo $url_obj['id']; ?>" <?php if(in_array($url_obj['id'],$url_list)) { |
|
141 | + echo 'selected="selected"'; |
|
142 | +} |
|
143 | +?>> |
|
138 | 144 | <?php echo $url_obj['url']; ?> |
139 | 145 | </option> |
140 | 146 | <?php |
@@ -118,8 +118,7 @@ |
||
118 | 118 | if (isset($included) && ($included)) |
119 | 119 | { |
120 | 120 | $message .= "> $name_session: ".count($UserAdd)." ".get_lang('Added').' '.get_lang('And').' '.count($UserUpdate).' '.get_lang('Modified').'<br/>'; |
121 | - } |
|
122 | - else |
|
121 | + } else |
|
123 | 122 | { |
124 | 123 | print "> $name_session: ".count($UserAdd).get_lang('Added').' '.get_lang('And').' '.count($UserUpdate).' '.get_lang('Modified')."\n"; |
125 | 124 | } |
@@ -505,8 +505,14 @@ |
||
505 | 505 | <p><?php echo get_lang('CSVMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p> |
506 | 506 | <blockquote> |
507 | 507 | <pre> |
508 | -<b>LastName</b>;<b>FirstName</b>;<b>Email</b>;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;<span style="color:red;"><?php if (count($list) > 0) echo implode(';', $list).';'; ?></span>Courses;ClassId; |
|
509 | -<b>xxx</b>;<b>xxx</b>;<b>xxx</b>;xxx;xxx;<?php echo implode('/', $defined_auth_sources); ?>;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;<span style="color:red;"><?php if (count($list_reponse) > 0) echo implode(';', $list_reponse).';'; ?></span>xxx1|xxx2|xxx3;1;<br /> |
|
508 | +<b>LastName</b>;<b>FirstName</b>;<b>Email</b>;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;ExpiryDate;<span style="color:red;"><?php if (count($list) > 0) { |
|
509 | + echo implode(';', $list).';'; |
|
510 | +} |
|
511 | +?></span>Courses;ClassId; |
|
512 | +<b>xxx</b>;<b>xxx</b>;<b>xxx</b>;xxx;xxx;<?php echo implode('/', $defined_auth_sources); ?>;xxx;xxx;user/teacher/drh;0000-00-00 00:00:00;<span style="color:red;"><?php if (count($list_reponse) > 0) { |
|
513 | + echo implode(';', $list_reponse).';'; |
|
514 | +} |
|
515 | +?></span>xxx1|xxx2|xxx3;1;<br /> |
|
510 | 516 | </pre> |
511 | 517 | </blockquote> |
512 | 518 | <p><?php echo get_lang('XMLMustLookLike').' ('.get_lang('MandatoryFields').')'; ?> :</p> |
@@ -244,8 +244,7 @@ |
||
244 | 244 | </button> |
245 | 245 | </div> |
246 | 246 | <?php |
247 | - } |
|
248 | - else |
|
247 | + } else |
|
249 | 248 | { |
250 | 249 | ?> |
251 | 250 | <div class="separate-action"> |