@@ -30,8 +30,8 @@ discard block |
||
30 | 30 | $output = array(); |
31 | 31 | if (!empty($_GET['fill'])) { |
32 | 32 | switch ($_GET['fill']) { |
33 | - case 'users': |
|
34 | - require api_get_path(SYS_TEST_PATH).'datafiller/fill_users.php'; |
|
33 | + case 'users': |
|
34 | + require api_get_path(SYS_TEST_PATH).'datafiller/fill_users.php'; |
|
35 | 35 | $output = fill_users(); |
36 | 36 | break; |
37 | 37 | case 'courses': |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | $result .= '<table>'; |
54 | 54 | foreach ($output as $line) { |
55 | 55 | $result .= '<tr>'; |
56 | - $result .= '<td class="filler-report-data-init">'.$line['line-init'].' </td><td class="filler-report-data">'.$line['line-info'].'</td>'; |
|
57 | - $result .= '</tr>'; |
|
56 | + $result .= '<td class="filler-report-data-init">'.$line['line-init'].' </td><td class="filler-report-data">'.$line['line-info'].'</td>'; |
|
57 | + $result .= '</tr>'; |
|
58 | 58 | } |
59 | 59 | $result .= '</table>'; |
60 | 60 | $result .= '</div>'; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $nameTools = get_lang('PlatformAdmin'); |
23 | 23 | |
24 | 24 | // setting breadcrumbs |
25 | -$interbreadcrumb[] = array ("url" => 'index.php', "name" => $nameTools); |
|
25 | +$interbreadcrumb[] = array("url" => 'index.php', "name" => $nameTools); |
|
26 | 26 | |
27 | 27 | // setting the name of the tool |
28 | 28 | $nameTools = get_lang('DataFiller'); |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | Display::display_header($nameTools); |
48 | 48 | |
49 | 49 | $result = ''; |
50 | -if (count($output)>0) { |
|
50 | +if (count($output) > 0) { |
|
51 | 51 | $result = '<div class="filler-report">'."\n"; |
52 | 52 | $result .= '<h3>'.$output[0]['title'].'</h3>'."\n"; |
53 | 53 | $result .= '<table>'; |
@@ -58,15 +58,15 @@ discard block |
||
58 | 58 | } |
59 | 59 | $result .= '</table>'; |
60 | 60 | $result .= '</div>'; |
61 | - Display::display_normal_message($result,false); |
|
61 | + Display::display_normal_message($result, false); |
|
62 | 62 | } |
63 | 63 | ?> |
64 | 64 | <div id="datafiller" class="actions"> |
65 | - <h4><?php echo Display::return_icon('bug.png',get_lang('DataFiller'),null,ICON_SIZE_MEDIUM).' '.get_lang('DataFiller')?></h4> |
|
66 | - <div class="description"><?php echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls');?></div> |
|
65 | + <h4><?php echo Display::return_icon('bug.png', get_lang('DataFiller'), null, ICON_SIZE_MEDIUM).' '.get_lang('DataFiller')?></h4> |
|
66 | + <div class="description"><?php echo get_lang('ThisSectionIsOnlyVisibleOnSourceInstalls'); ?></div> |
|
67 | 67 | <ul class="fillers"> |
68 | - <li><a href="filler.php?fill=users"><?php echo Display::return_icon('user.png',get_lang('FillUsers'),null,ICON_SIZE_SMALL).' '.get_lang('FillUsers');?></a></li> |
|
69 | - <li><a href="filler.php?fill=courses"><?php echo Display::return_icon('new-course.png',get_lang('FillCourses'),null,ICON_SIZE_SMALL).' '.get_lang('FillCourses');?></a></li> |
|
68 | + <li><a href="filler.php?fill=users"><?php echo Display::return_icon('user.png', get_lang('FillUsers'), null, ICON_SIZE_SMALL).' '.get_lang('FillUsers'); ?></a></li> |
|
69 | + <li><a href="filler.php?fill=courses"><?php echo Display::return_icon('new-course.png', get_lang('FillCourses'), null, ICON_SIZE_SMALL).' '.get_lang('FillCourses'); ?></a></li> |
|
70 | 70 | </ul> |
71 | 71 | </div> |
72 | 72 | <?php |
@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | } |
125 | 125 | |
126 | 126 | if ($add_type == 'multiple') { |
127 | - $link_add_type_unique = '<a href="'.api_get_self().'?add_type=unique&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeUnique').'</a>'; |
|
128 | - $link_add_type_multiple = get_lang('SessionAddTypeMultiple'); |
|
127 | + $link_add_type_unique = '<a href="'.api_get_self().'?add_type=unique&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeUnique').'</a>'; |
|
128 | + $link_add_type_multiple = get_lang('SessionAddTypeMultiple'); |
|
129 | 129 | } else { |
130 | - $link_add_type_unique = get_lang('SessionAddTypeUnique'); |
|
131 | - $link_add_type_multiple = '<a href="'.api_get_self().'?add_type=multiple&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeMultiple').'</a>'; |
|
130 | + $link_add_type_unique = get_lang('SessionAddTypeUnique'); |
|
131 | + $link_add_type_multiple = '<a href="'.api_get_self().'?add_type=multiple&access_url_id='.$access_url_id.'">'.get_lang('SessionAddTypeMultiple').'</a>'; |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | $url_list = UrlManager::get_url_data(); |
@@ -192,34 +192,34 @@ discard block |
||
192 | 192 | <?php } else { ?> |
193 | 193 | <select id="origin_users" name="no_course_list[]" multiple="multiple" size="15" style="width:380px;"> |
194 | 194 | <?php |
195 | - foreach ($noUserGroupList as $noItem) { |
|
196 | - ?> |
|
195 | + foreach ($noUserGroupList as $noItem) { |
|
196 | + ?> |
|
197 | 197 | <option value="<?php echo $noItem['id']; ?>"> |
198 | 198 | <?php echo $noItem['name']; ?> |
199 | 199 | </option> |
200 | 200 | <?php |
201 | - } |
|
202 | - ?> |
|
201 | + } |
|
202 | + ?> |
|
203 | 203 | </select> |
204 | 204 | <?php |
205 | - } |
|
206 | - ?> |
|
205 | + } |
|
206 | + ?> |
|
207 | 207 | </div> |
208 | 208 | </td> |
209 | 209 | <td width="10%" valign="middle" align="center"> |
210 | 210 | <?php |
211 | - if ($ajax_search) { |
|
212 | - ?> |
|
211 | + if ($ajax_search) { |
|
212 | + ?> |
|
213 | 213 | <button class="btn btn-default" type="button" onclick="remove_item(document.getElementById('destination_users'))" ></button> |
214 | 214 | <?php |
215 | - } else { |
|
216 | - ?> |
|
215 | + } else { |
|
216 | + ?> |
|
217 | 217 | <button class="arrowr" type="button" onclick="moveItem(document.getElementById('origin_users'), document.getElementById('destination_users'))" ></button> |
218 | 218 | <br /><br /> |
219 | 219 | <button class="btn btn-default" type="button" onclick="moveItem(document.getElementById('destination_users'), document.getElementById('origin_users'))" ></button> |
220 | 220 | <?php |
221 | - } |
|
222 | - ?> |
|
221 | + } |
|
222 | + ?> |
|
223 | 223 | <br /><br /><br /><br /><br /><br /> |
224 | 224 | </td> |
225 | 225 | <td align="center"> |
@@ -240,11 +240,11 @@ discard block |
||
240 | 240 | <td colspan="3" align="center"> |
241 | 241 | <br /> |
242 | 242 | <?php |
243 | - if(isset($_GET['add'])) |
|
244 | - echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>'; |
|
245 | - else |
|
246 | - echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>'; |
|
247 | - ?> |
|
243 | + if(isset($_GET['add'])) |
|
244 | + echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>'; |
|
245 | + else |
|
246 | + echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>'; |
|
247 | + ?> |
|
248 | 248 | </td> |
249 | 249 | </tr> |
250 | 250 | </table> |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | |
25 | 25 | // Setting breadcrumbs |
26 | 26 | $tool_name = get_lang('EditUserGroupToURL'); |
27 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
28 | -$interbreadcrumb[] = array ('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')); |
|
27 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
28 | +$interbreadcrumb[] = array('url' => 'access_urls.php', 'name' => get_lang('MultipleAccessURLs')); |
|
29 | 29 | |
30 | 30 | $add_type = 'multiple'; |
31 | 31 | if (isset($_REQUEST['add_type']) && $_REQUEST['add_type'] != '') { |
@@ -72,10 +72,10 @@ discard block |
||
72 | 72 | } |
73 | 73 | </script>'; |
74 | 74 | |
75 | -$form_sent=0; |
|
76 | -$errorMsg=''; |
|
77 | -$UserList=$SessionList = array(); |
|
78 | -$users=$sessions = array(); |
|
75 | +$form_sent = 0; |
|
76 | +$errorMsg = ''; |
|
77 | +$UserList = $SessionList = array(); |
|
78 | +$users = $sessions = array(); |
|
79 | 79 | |
80 | 80 | if (isset($_POST['form_sent']) && $_POST['form_sent']) { |
81 | 81 | $form_sent = $_POST['form_sent']; |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | |
118 | 118 | foreach ($userGroups as $item) { |
119 | 119 | if ($item['access_url_id'] == $access_url_id) { |
120 | - $userGroupList[$item['id']] = $item ; |
|
120 | + $userGroupList[$item['id']] = $item; |
|
121 | 121 | } |
122 | 122 | } |
123 | 123 | $noUserGroupList = getCourseCategoryNotInList(array_keys($userGroupList)); |
@@ -153,11 +153,11 @@ discard block |
||
153 | 153 | if (!empty($access_url_id)) { |
154 | 154 | if ($url_obj[0] == $access_url_id) { |
155 | 155 | $checked = 'selected=true'; |
156 | - $url_selected=$url_obj[1]; |
|
156 | + $url_selected = $url_obj[1]; |
|
157 | 157 | } |
158 | 158 | } |
159 | - if ($url_obj['active']==1) { ?> |
|
160 | - <option <?php echo $checked;?> value="<?php echo $url_obj[0]; ?>"> <?php echo $url_obj[1]; ?> |
|
159 | + if ($url_obj['active'] == 1) { ?> |
|
160 | + <option <?php echo $checked; ?> value="<?php echo $url_obj[0]; ?>"> <?php echo $url_obj[1]; ?> |
|
161 | 161 | </option> |
162 | 162 | <?php |
163 | 163 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | <td align="center"><b><?php echo get_lang('CourseCategoryInPlatform') ?> :</b> |
181 | 181 | </td> |
182 | 182 | <td></td> |
183 | - <td align="center"><b><?php printf(get_lang('CourseCategoryListInX'),$url_selected); ?></b></td> |
|
183 | + <td align="center"><b><?php printf(get_lang('CourseCategoryListInX'), $url_selected); ?></b></td> |
|
184 | 184 | </tr> |
185 | 185 | |
186 | 186 | <tr> |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | <td align="center"> |
226 | 226 | <select id="destination_users" name="course_list[]" multiple="multiple" size="15" style="width:380px;"> |
227 | 227 | <?php |
228 | -foreach($userGroupList as $item) { |
|
228 | +foreach ($userGroupList as $item) { |
|
229 | 229 | ?> |
230 | 230 | <option value="<?php echo $item['id']; ?>"> |
231 | 231 | <?php echo $item['name']; ?> |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | <td colspan="3" align="center"> |
241 | 241 | <br /> |
242 | 242 | <?php |
243 | - if(isset($_GET['add'])) |
|
243 | + if (isset($_GET['add'])) |
|
244 | 244 | echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>'; |
245 | 245 | else |
246 | 246 | echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>'; |
@@ -240,10 +240,11 @@ |
||
240 | 240 | <td colspan="3" align="center"> |
241 | 241 | <br /> |
242 | 242 | <?php |
243 | - if(isset($_GET['add'])) |
|
244 | - echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>'; |
|
245 | - else |
|
246 | - echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>'; |
|
243 | + if(isset($_GET['add'])) { |
|
244 | + echo '<button class="save" onclick="valide()" >'.get_lang('Add').'</button>'; |
|
245 | + } else { |
|
246 | + echo '<button class="save" onclick="valide()" >'.get_lang('Edit').'</button>'; |
|
247 | + } |
|
247 | 248 | ?> |
248 | 249 | </td> |
249 | 250 | </tr> |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | |
15 | 15 | // Setting the section (for the tabs). |
16 | 16 | $this_section = SECTION_PLATFORM_ADMIN; |
17 | -$_SESSION['this_section']=$this_section; |
|
17 | +$_SESSION['this_section'] = $this_section; |
|
18 | 18 | |
19 | 19 | $action = isset($_GET['action']) ? $_GET['action'] : null; |
20 | 20 | $action_todo = false; |
@@ -35,12 +35,12 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | if (!empty($action)) { |
38 | - $interbreadcrumb[] = array ("url" => "system_announcements.php", "name" => get_lang('SystemAnnouncements')); |
|
38 | + $interbreadcrumb[] = array("url" => "system_announcements.php", "name" => get_lang('SystemAnnouncements')); |
|
39 | 39 | if ($action == 'add') { |
40 | - $interbreadcrumb[] = array ("url" => '#', "name" => get_lang('AddAnnouncement')); |
|
40 | + $interbreadcrumb[] = array("url" => '#', "name" => get_lang('AddAnnouncement')); |
|
41 | 41 | } |
42 | 42 | if ($action == 'edit') { |
43 | - $interbreadcrumb[] = array ("url" => '#', "name" => get_lang('Edit')); |
|
43 | + $interbreadcrumb[] = array("url" => '#', "name" => get_lang('Edit')); |
|
44 | 44 | } |
45 | 45 | } else { |
46 | 46 | $tool_name = get_lang('SystemAnnouncements'); |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | |
68 | 68 | // Actions |
69 | -switch($action) { |
|
69 | +switch ($action) { |
|
70 | 70 | case 'make_visible': |
71 | 71 | case 'make_invisible': |
72 | 72 | $status = false; |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | Display :: display_confirmation_message(get_lang('AnnouncementDeleted')); |
82 | 82 | break; |
83 | 83 | case 'delete_selected': |
84 | - foreach($_POST['id'] as $index => $id) { |
|
84 | + foreach ($_POST['id'] as $index => $id) { |
|
85 | 85 | SystemAnnouncementManager :: delete_announcement($id); |
86 | 86 | } |
87 | 87 | Display :: display_confirmation_message(get_lang('AnnouncementDeleted')); |
@@ -137,11 +137,11 @@ discard block |
||
137 | 137 | $language_list = api_get_languages(); |
138 | 138 | $language_list_with_keys = array(); |
139 | 139 | $language_list_with_keys['all'] = get_lang('All'); |
140 | - for ($i=0; $i<count($language_list['name']) ; $i++) { |
|
140 | + for ($i = 0; $i < count($language_list['name']); $i++) { |
|
141 | 141 | $language_list_with_keys[$language_list['folder'][$i]] = $language_list['name'][$i]; |
142 | 142 | } |
143 | 143 | |
144 | - $form->addElement('select', 'lang',get_lang('Language'), $language_list_with_keys); |
|
144 | + $form->addElement('select', 'lang', get_lang('Language'), $language_list_with_keys); |
|
145 | 145 | $form->addHtmlEditor( |
146 | 146 | 'content', |
147 | 147 | get_lang('Content'), |
@@ -157,9 +157,9 @@ discard block |
||
157 | 157 | |
158 | 158 | $group = array(); |
159 | 159 | |
160 | - $group[]= $form->createElement('checkbox', 'visible_teacher', null, get_lang('Teacher')); |
|
161 | - $group[]= $form->createElement('checkbox', 'visible_student', null, get_lang('Student')); |
|
162 | - $group[]= $form->createElement('checkbox', 'visible_guest', null, get_lang('Guest')); |
|
160 | + $group[] = $form->createElement('checkbox', 'visible_teacher', null, get_lang('Teacher')); |
|
161 | + $group[] = $form->createElement('checkbox', 'visible_student', null, get_lang('Student')); |
|
162 | + $group[] = $form->createElement('checkbox', 'visible_guest', null, get_lang('Guest')); |
|
163 | 163 | |
164 | 164 | $form->addGroup($group, null, get_lang('Visible'), ''); |
165 | 165 | |
@@ -182,15 +182,15 @@ discard block |
||
182 | 182 | |
183 | 183 | $form->addElement('checkbox', 'send_mail', null, get_lang('SendMail')); |
184 | 184 | |
185 | - if (isset($_REQUEST['action']) && $_REQUEST['action']=='add') { |
|
185 | + if (isset($_REQUEST['action']) && $_REQUEST['action'] == 'add') { |
|
186 | 186 | $form->addElement('checkbox', 'add_to_calendar', null, get_lang('AddToCalendar')); |
187 | - $text=get_lang('AddNews'); |
|
188 | - $class='add'; |
|
187 | + $text = get_lang('AddNews'); |
|
188 | + $class = 'add'; |
|
189 | 189 | $form->addElement('hidden', 'action', 'add'); |
190 | 190 | |
191 | 191 | } elseif (isset($_REQUEST['action']) && $_REQUEST['action'] == 'edit') { |
192 | - $text=get_lang('EditNews'); |
|
193 | - $class='save'; |
|
192 | + $text = get_lang('EditNews'); |
|
193 | + $class = 'save'; |
|
194 | 194 | $form->addElement('hidden', 'action', 'edit'); |
195 | 195 | } |
196 | 196 | $form->addElement('checkbox', 'send_email_test', null, get_lang('SendOnlyAnEmailToMySelfToTest')); |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | |
281 | 281 | if ($show_announcement_list) { |
282 | 282 | $announcements = SystemAnnouncementManager :: get_all_announcements(); |
283 | - $announcement_data = array (); |
|
283 | + $announcement_data = array(); |
|
284 | 284 | foreach ($announcements as $index => $announcement) { |
285 | 285 | $row = array(); |
286 | 286 | $row[] = $announcement->id; |
@@ -288,9 +288,9 @@ discard block |
||
288 | 288 | $row[] = $announcement->title; |
289 | 289 | $row[] = api_convert_and_format_date($announcement->date_start); |
290 | 290 | $row[] = api_convert_and_format_date($announcement->date_end); |
291 | - $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_TEACHER."&action=". ($announcement->visible_teacher ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_teacher ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>"; |
|
292 | - $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_STUDENT."&action=". ($announcement->visible_student ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_student ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>"; |
|
293 | - $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_GUEST."&action=". ($announcement->visible_guest ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_guest ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>"; |
|
291 | + $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_TEACHER."&action=".($announcement->visible_teacher ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_teacher ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>"; |
|
292 | + $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_STUDENT."&action=".($announcement->visible_student ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_student ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>"; |
|
293 | + $row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_GUEST."&action=".($announcement->visible_guest ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_guest ? 'eyes.png' : 'eyes-close.png'), get_lang('ShowOrHide'))."</a>"; |
|
294 | 294 | |
295 | 295 | $row[] = $announcement->lang; |
296 | 296 | $row[] = "<a href=\"?action=edit&id=".$announcement->id."\">".Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a> <a href=\"?action=delete&id=".$announcement->id."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."')) return false;\">".Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL)."</a>"; |
@@ -43,15 +43,15 @@ discard block |
||
43 | 43 | $table->set_column_filter(3, 'edit_filter'); |
44 | 44 | |
45 | 45 | function edit_filter($id,$url_params,$row) { |
46 | - global $charset; |
|
47 | - $return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif',get_lang('Edit')).'</a>'; |
|
48 | - $return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.gif',get_lang('Delete')).'</a>'; |
|
49 | - return $return; |
|
46 | + global $charset; |
|
47 | + $return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif',get_lang('Edit')).'</a>'; |
|
48 | + $return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.gif',get_lang('Delete')).'</a>'; |
|
49 | + return $return; |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | if ($_REQUEST['action'] == 'delete') { |
53 | - delete_specific_field($_REQUEST['field_id']); |
|
54 | - header('Location: specific_fields.php?message='.get_lang('FieldRemoved')); |
|
53 | + delete_specific_field($_REQUEST['field_id']); |
|
54 | + header('Location: specific_fields.php?message='.get_lang('FieldRemoved')); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | // Start output |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | echo Display::display_normal_message(get_lang('SpecificSearchFieldsIntro')); |
62 | 62 | |
63 | 63 | if(!empty($_GET['message'])) { |
64 | - Display::display_confirmation_message($_GET['message']); |
|
64 | + Display::display_confirmation_message($_GET['message']); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | echo '<div class="actions">'; |
@@ -15,36 +15,36 @@ discard block |
||
15 | 15 | api_protect_admin_script(); |
16 | 16 | |
17 | 17 | // Breadcrumb |
18 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
19 | -$interbreadcrumb[] = array ('url' => 'settings.php?category=Search', 'name' => get_lang('PlatformConfigSettings')); |
|
18 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
19 | +$interbreadcrumb[] = array('url' => 'settings.php?category=Search', 'name' => get_lang('PlatformConfigSettings')); |
|
20 | 20 | |
21 | 21 | $libpath = api_get_path(LIBRARY_PATH); |
22 | 22 | |
23 | 23 | include_once $libpath.'specific_fields_manager.lib.php'; |
24 | 24 | |
25 | 25 | // Create an add-field box |
26 | -$form = new FormValidator('add_field','post','','',null,false); |
|
27 | -$renderer =& $form->defaultRenderer(); |
|
26 | +$form = new FormValidator('add_field', 'post', '', '', null, false); |
|
27 | +$renderer = & $form->defaultRenderer(); |
|
28 | 28 | $renderer->setCustomElementTemplate('<span>{element}</span> '); |
29 | -$form->addElement('static','search_advanced_link',null,'<a href="specific_fields_add.php">'.Display::return_icon('fieldadd.gif').get_lang('AddSpecificSearchField').'</a>'); |
|
29 | +$form->addElement('static', 'search_advanced_link', null, '<a href="specific_fields_add.php">'.Display::return_icon('fieldadd.gif').get_lang('AddSpecificSearchField').'</a>'); |
|
30 | 30 | |
31 | 31 | // Create a sortable table with specific fields data |
32 | -$column_show = array(1,1,1); |
|
33 | -$column_order = array(3,2,1); |
|
32 | +$column_show = array(1, 1, 1); |
|
33 | +$column_order = array(3, 2, 1); |
|
34 | 34 | $extra_fields = get_specific_field_list(); |
35 | 35 | $number_of_extra_fields = count($extra_fields); |
36 | 36 | |
37 | -$table = new SortableTableFromArrayConfig($extra_fields,2,50,'',$column_show,$column_order); |
|
38 | -$table->set_header(0, ' ', false,null,'width="2%"', 'style="display:none"'); |
|
37 | +$table = new SortableTableFromArrayConfig($extra_fields, 2, 50, '', $column_show, $column_order); |
|
38 | +$table->set_header(0, ' ', false, null, 'width="2%"', 'style="display:none"'); |
|
39 | 39 | $table->set_header(1, get_lang('Code'), TRUE, 'width="10%"'); |
40 | 40 | $table->set_header(2, get_lang('Name')); |
41 | -$table->set_header(3, get_lang('Modify'),false,'width="10%"'); |
|
41 | +$table->set_header(3, get_lang('Modify'), false, 'width="10%"'); |
|
42 | 42 | $table->set_column_filter(3, 'edit_filter'); |
43 | 43 | |
44 | -function edit_filter($id,$url_params,$row) { |
|
44 | +function edit_filter($id, $url_params, $row) { |
|
45 | 45 | global $charset; |
46 | - $return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif',get_lang('Edit')).'</a>'; |
|
47 | - $return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES,$charset))."'".')) return false;">'.Display::return_icon('delete.gif',get_lang('Delete')).'</a>'; |
|
46 | + $return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.Display::return_icon('edit.gif', get_lang('Edit')).'</a>'; |
|
47 | + $return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES, $charset))."'".')) return false;">'.Display::return_icon('delete.gif', get_lang('Delete')).'</a>'; |
|
48 | 48 | return $return; |
49 | 49 | } |
50 | 50 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | Display::display_header(get_lang('SpecificSearchFields')); |
61 | 61 | echo Display::display_normal_message(get_lang('SpecificSearchFieldsIntro')); |
62 | 62 | |
63 | -if(!empty($_GET['message'])) { |
|
63 | +if (!empty($_GET['message'])) { |
|
64 | 64 | Display::display_confirmation_message($_GET['message']); |
65 | 65 | } |
66 | 66 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $skill_profile = new SkillProfile(); |
25 | 25 | $skill_rel_user = new SkillRelUser(); |
26 | 26 | |
27 | -$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php'; |
|
27 | +$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php'; |
|
28 | 28 | |
29 | 29 | $tpl = new Template(get_lang('Skills')); |
30 | 30 | |
@@ -55,16 +55,16 @@ discard block |
||
55 | 55 | $_SESSION['skills'] = $skills; |
56 | 56 | |
57 | 57 | } else { |
58 | - $skills = isset($_SESSION['skills']) ? $_SESSION['skills']: array(); |
|
58 | + $skills = isset($_SESSION['skills']) ? $_SESSION['skills'] : array(); |
|
59 | 59 | } |
60 | 60 | } else { |
61 | - $skills = isset($_SESSION['skills']) ? $_SESSION['skills']: array(); |
|
61 | + $skills = isset($_SESSION['skills']) ? $_SESSION['skills'] : array(); |
|
62 | 62 | } |
63 | 63 | |
64 | 64 | $user_list = array(); |
65 | 65 | $count_skills = count($skills); |
66 | 66 | |
67 | -$users = $skill_rel_user->get_user_by_skills($skills); |
|
67 | +$users = $skill_rel_user->get_user_by_skills($skills); |
|
68 | 68 | |
69 | 69 | if (!empty($users)) { |
70 | 70 | foreach ($users as $user) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $user_list[$user['user_id']]['user'] = $user_info; |
73 | 73 | $my_user_skills = $skill_rel_user->get_user_skills($user['user_id']); |
74 | 74 | $user_skills = array(); |
75 | - $found_counts = 0 ; |
|
75 | + $found_counts = 0; |
|
76 | 76 | foreach ($my_user_skills as $my_skill) { |
77 | 77 | $found = false; |
78 | 78 | if (in_array($my_skill['skill_id'], $skills)) { |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $user_list[$user['user_id']]['total_found_skills'] = $found_counts; |
90 | 90 | } |
91 | 91 | $ordered_user_list = array(); |
92 | - foreach($user_list as $user_id => $user_data) { |
|
92 | + foreach ($user_list as $user_id => $user_data) { |
|
93 | 93 | $ordered_user_list[$user_data['total_found_skills']][] = $user_data; |
94 | 94 | } |
95 | 95 | if (!empty($ordered_user_list)) { |
@@ -103,14 +103,14 @@ discard block |
||
103 | 103 | |
104 | 104 | if (!empty($skills)) { |
105 | 105 | $counter = 0; |
106 | - foreach($skills as $hidden_skill_id) { |
|
106 | + foreach ($skills as $hidden_skill_id) { |
|
107 | 107 | $form->addElement('hidden', 'hidden_skills[]', $hidden_skill_id); |
108 | 108 | $counter++; |
109 | 109 | } |
110 | 110 | } |
111 | 111 | |
112 | 112 | if (!empty($skills)) { |
113 | - foreach($skills as $my_skill) { |
|
113 | + foreach ($skills as $my_skill) { |
|
114 | 114 | $total_skills_to_search[$my_skill] = $my_skill; |
115 | 115 | } |
116 | 116 | } |
@@ -14,24 +14,24 @@ discard block |
||
14 | 14 | $message = ''; |
15 | 15 | |
16 | 16 | if (isset($_POST['activeExtension'])) { |
17 | - switch ($_POST['extension_code']) { |
|
18 | - case 'visio' : |
|
19 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
17 | + switch ($_POST['extension_code']) { |
|
18 | + case 'visio' : |
|
19 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
20 | 20 | selected_value="true" |
21 | 21 | WHERE variable="service_visio" |
22 | 22 | AND subkey="active"'; |
23 | - $rs = Database::query($sql); |
|
24 | - if (Database::affected_rows($rs)>0) { |
|
25 | - // select all the courses and insert the tool inside |
|
26 | - $sql = 'SELECT id FROM '.Database::get_main_table(TABLE_MAIN_COURSE); |
|
27 | - $rs = Database::query($sql); |
|
28 | - while($row = Database::fetch_array($rs)){ |
|
29 | - if(!empty($_POST['visio_host'])) { |
|
30 | - $tool_table = Database::get_course_table(TABLE_TOOL_LIST); |
|
31 | - $select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CONFERENCE."'"; |
|
32 | - $selectres = Database::query($select); |
|
33 | - if (Database::num_rows($selectres)<1) { |
|
34 | - $sql = 'INSERT INTO '.$tool_table.' SET |
|
23 | + $rs = Database::query($sql); |
|
24 | + if (Database::affected_rows($rs)>0) { |
|
25 | + // select all the courses and insert the tool inside |
|
26 | + $sql = 'SELECT id FROM '.Database::get_main_table(TABLE_MAIN_COURSE); |
|
27 | + $rs = Database::query($sql); |
|
28 | + while($row = Database::fetch_array($rs)){ |
|
29 | + if(!empty($_POST['visio_host'])) { |
|
30 | + $tool_table = Database::get_course_table(TABLE_TOOL_LIST); |
|
31 | + $select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CONFERENCE."'"; |
|
32 | + $selectres = Database::query($select); |
|
33 | + if (Database::num_rows($selectres)<1) { |
|
34 | + $sql = 'INSERT INTO '.$tool_table.' SET |
|
35 | 35 | c_id = '.$row['id'].', |
36 | 36 | name="'.TOOL_VISIO_CONFERENCE.'", |
37 | 37 | link="conference/index.php?type=conference", |
@@ -41,12 +41,12 @@ discard block |
||
41 | 41 | address="squaregrey.gif", |
42 | 42 | target="_self", |
43 | 43 | category="interaction"'; |
44 | - Database::query($sql); |
|
45 | - } |
|
46 | - $select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CLASSROOM."'"; |
|
47 | - $selectres = Database::query($select); |
|
48 | - if(Database::num_rows($selectres)<1) { |
|
49 | - $sql = 'INSERT INTO '.$tool_table.' SET |
|
44 | + Database::query($sql); |
|
45 | + } |
|
46 | + $select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CLASSROOM."'"; |
|
47 | + $selectres = Database::query($select); |
|
48 | + if(Database::num_rows($selectres)<1) { |
|
49 | + $sql = 'INSERT INTO '.$tool_table.' SET |
|
50 | 50 | c_id = '.$row['id'].', |
51 | 51 | name="'.TOOL_VISIO_CLASSROOM.'", |
52 | 52 | link="conference/index.php?type=classroom", |
@@ -56,92 +56,92 @@ discard block |
||
56 | 56 | address="squaregrey.gif", |
57 | 57 | target="_self", |
58 | 58 | category="authoring"'; |
59 | - Database::query($sql); |
|
60 | - } |
|
61 | - } |
|
62 | - } |
|
63 | - $message = get_lang('ServiceActivated'); |
|
64 | - |
|
65 | - } |
|
66 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
59 | + Database::query($sql); |
|
60 | + } |
|
61 | + } |
|
62 | + } |
|
63 | + $message = get_lang('ServiceActivated'); |
|
64 | + |
|
65 | + } |
|
66 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
67 | 67 | selected_value="'.Database::escape_string($_POST['visio_host']).'" |
68 | 68 | WHERE variable="service_visio" |
69 | 69 | AND subkey="visio_host"'; |
70 | - $rs = Database::query($sql); |
|
70 | + $rs = Database::query($sql); |
|
71 | 71 | |
72 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
72 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
73 | 73 | selected_value="'.Database::escape_string($_POST['visio_port']).'" |
74 | 74 | WHERE variable="service_visio" |
75 | 75 | AND subkey="visio_port"'; |
76 | - $rs = Database::query($sql); |
|
76 | + $rs = Database::query($sql); |
|
77 | 77 | |
78 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
78 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
79 | 79 | selected_value="'.Database::escape_string($_POST['visio_pass']).'" |
80 | 80 | WHERE variable="service_visio" |
81 | 81 | AND subkey="visio_pass"'; |
82 | - $rs = Database::query($sql); |
|
82 | + $rs = Database::query($sql); |
|
83 | 83 | |
84 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
84 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
85 | 85 | selected_value="'.($_POST['visio_use_rtmpt']=='true'?'true':'false').'" |
86 | 86 | WHERE variable="service_visio" |
87 | 87 | AND subkey="visio_use_rtmpt"'; |
88 | - $rs = Database::query($sql); |
|
88 | + $rs = Database::query($sql); |
|
89 | 89 | |
90 | - if(empty($message)) { |
|
91 | - $message = get_lang('ServiceReconfigured'); |
|
92 | - } |
|
93 | - break; |
|
90 | + if(empty($message)) { |
|
91 | + $message = get_lang('ServiceReconfigured'); |
|
92 | + } |
|
93 | + break; |
|
94 | 94 | |
95 | - case 'ppt2lp' : |
|
96 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
95 | + case 'ppt2lp' : |
|
96 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
97 | 97 | selected_value="true" |
98 | 98 | WHERE variable="service_ppt2lp" |
99 | 99 | AND subkey="active"'; |
100 | 100 | |
101 | - $rs = Database::query($sql); |
|
101 | + $rs = Database::query($sql); |
|
102 | 102 | |
103 | - if (Database::affected_rows($rs)>0){ |
|
104 | - $message = get_lang('ServiceActivated'); |
|
105 | - } |
|
103 | + if (Database::affected_rows($rs)>0){ |
|
104 | + $message = get_lang('ServiceActivated'); |
|
105 | + } |
|
106 | 106 | |
107 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
107 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
108 | 108 | selected_value="'.addslashes($_POST['host']).'" |
109 | 109 | WHERE variable="service_ppt2lp" |
110 | 110 | AND subkey="host"'; |
111 | - Database::query($sql); |
|
111 | + Database::query($sql); |
|
112 | 112 | |
113 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
113 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
114 | 114 | selected_value="'.addslashes($_POST['port']).'" |
115 | 115 | WHERE variable="service_ppt2lp" |
116 | 116 | AND subkey="port"'; |
117 | - Database::query($sql); |
|
117 | + Database::query($sql); |
|
118 | 118 | |
119 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
119 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
120 | 120 | selected_value="'.addslashes($_POST['ftp_password']).'" |
121 | 121 | WHERE variable="service_ppt2lp" |
122 | 122 | AND subkey="ftp_password"'; |
123 | - Database::query($sql); |
|
123 | + Database::query($sql); |
|
124 | 124 | |
125 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
125 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
126 | 126 | selected_value="'.addslashes($_POST['user']).'" |
127 | 127 | WHERE variable="service_ppt2lp" |
128 | 128 | AND subkey="user"'; |
129 | - Database::query($sql); |
|
129 | + Database::query($sql); |
|
130 | 130 | |
131 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
131 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
132 | 132 | selected_value="'.addslashes($_POST['path_to_lzx']).'" |
133 | 133 | WHERE variable="service_ppt2lp" |
134 | 134 | AND subkey="path_to_lzx"'; |
135 | - Database::query($sql); |
|
135 | + Database::query($sql); |
|
136 | 136 | |
137 | - $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
137 | + $sql = 'UPDATE '.$tbl_settings_current.' SET |
|
138 | 138 | selected_value="'.addslashes($_POST['size']).'" |
139 | 139 | WHERE variable="service_ppt2lp" |
140 | 140 | AND subkey="size"'; |
141 | - Database::query($sql); |
|
141 | + Database::query($sql); |
|
142 | 142 | |
143 | - break; |
|
144 | - } |
|
143 | + break; |
|
144 | + } |
|
145 | 145 | |
146 | 146 | } |
147 | 147 | |
@@ -154,14 +154,14 @@ discard block |
||
154 | 154 | |
155 | 155 | $rs = Database::query($sql); |
156 | 156 | while($row = Database::fetch_array($rs)){ |
157 | - $listActiveServices[] = $row['variable']; |
|
157 | + $listActiveServices[] = $row['variable']; |
|
158 | 158 | } |
159 | 159 | |
160 | 160 | // javascript to handle accordion behaviour |
161 | 161 | $javascript_message = ''; |
162 | 162 | if(!empty($message)){ |
163 | - $javascript_message = |
|
164 | - ' |
|
163 | + $javascript_message = |
|
164 | + ' |
|
165 | 165 | document.getElementById("message").style.display = "block"; |
166 | 166 | var timer = setTimeout(hideMessage,5000); |
167 | 167 | '; |
@@ -215,9 +215,9 @@ discard block |
||
215 | 215 | ?> |
216 | 216 | <div id="message" style="display: none"> |
217 | 217 | <?php |
218 | - if(!empty($message)) |
|
219 | - Display::display_normal_message($message) |
|
220 | - ?> |
|
218 | + if(!empty($message)) |
|
219 | + Display::display_normal_message($message) |
|
220 | + ?> |
|
221 | 221 | </div> |
222 | 222 | |
223 | 223 | <div id="content" align="center"> |
@@ -303,63 +303,63 @@ discard block |
||
303 | 303 | <form method="POST" class="form-horizontal" action="<?php echo api_get_self(); ?>"> |
304 | 304 | <?php |
305 | 305 | |
306 | - $form = new FormValidator('ppt2lp'); |
|
307 | - $form -> addElement('text', 'host', get_lang('Host')); |
|
308 | - //$form -> addElement('html','<br /><br />'); |
|
309 | - $form -> addElement('text', 'port', get_lang('Port')); |
|
310 | - //$form -> addElement('html','<br /><br />'); |
|
311 | - $form -> addElement('text', 'user', get_lang('UserOnHost')); |
|
312 | - //$form -> addElement('html','<br /><br />'); |
|
313 | - $form -> addElement('text', 'ftp_password', get_lang('FtpPassword')); |
|
314 | - //$form -> addElement('html','<br /><br />'); |
|
315 | - $form -> addElement('text', 'path_to_lzx', get_lang('PathToLzx')); |
|
316 | - //$form -> addElement('html','<br /><br />'); |
|
317 | - $options = array( |
|
318 | - '540x405'=>'540x405', |
|
319 | - '640x480'=>'640x480', |
|
320 | - '720x540'=>'720x540', |
|
321 | - '800x600'=>'800x600', |
|
322 | - '1000x750'=>'1000x750' |
|
323 | - ); |
|
324 | - $form -> addElement('select', 'size', get_lang('SlideSize'), $options); |
|
325 | - |
|
326 | - |
|
327 | - $form -> addElement('hidden', 'extension_code', 'ppt2lp'); |
|
328 | - |
|
329 | - $defaults = array(); |
|
330 | - $renderer = $form -> defaultRenderer(); |
|
331 | - $renderer -> setElementTemplate('<div style="text-align:left">{label}</div><div style="text-align:left">{element}</div>'); |
|
332 | - //$form -> addElement('html','<br /><br />'); |
|
333 | - if(in_array('service_ppt2lp',$listActiveServices)) |
|
334 | - { |
|
335 | - $sql = 'SELECT subkey, selected_value FROM '.$tbl_settings_current.' |
|
306 | + $form = new FormValidator('ppt2lp'); |
|
307 | + $form -> addElement('text', 'host', get_lang('Host')); |
|
308 | + //$form -> addElement('html','<br /><br />'); |
|
309 | + $form -> addElement('text', 'port', get_lang('Port')); |
|
310 | + //$form -> addElement('html','<br /><br />'); |
|
311 | + $form -> addElement('text', 'user', get_lang('UserOnHost')); |
|
312 | + //$form -> addElement('html','<br /><br />'); |
|
313 | + $form -> addElement('text', 'ftp_password', get_lang('FtpPassword')); |
|
314 | + //$form -> addElement('html','<br /><br />'); |
|
315 | + $form -> addElement('text', 'path_to_lzx', get_lang('PathToLzx')); |
|
316 | + //$form -> addElement('html','<br /><br />'); |
|
317 | + $options = array( |
|
318 | + '540x405'=>'540x405', |
|
319 | + '640x480'=>'640x480', |
|
320 | + '720x540'=>'720x540', |
|
321 | + '800x600'=>'800x600', |
|
322 | + '1000x750'=>'1000x750' |
|
323 | + ); |
|
324 | + $form -> addElement('select', 'size', get_lang('SlideSize'), $options); |
|
325 | + |
|
326 | + |
|
327 | + $form -> addElement('hidden', 'extension_code', 'ppt2lp'); |
|
328 | + |
|
329 | + $defaults = array(); |
|
330 | + $renderer = $form -> defaultRenderer(); |
|
331 | + $renderer -> setElementTemplate('<div style="text-align:left">{label}</div><div style="text-align:left">{element}</div>'); |
|
332 | + //$form -> addElement('html','<br /><br />'); |
|
333 | + if(in_array('service_ppt2lp',$listActiveServices)) |
|
334 | + { |
|
335 | + $sql = 'SELECT subkey, selected_value FROM '.$tbl_settings_current.' |
|
336 | 336 | WHERE variable = "service_ppt2lp" |
337 | 337 | AND subkey <> "active"'; |
338 | - $rs = Database::query($sql); |
|
339 | - while($row = Database::fetch_array($rs,'ASSOC')) |
|
340 | - { |
|
341 | - $defaults[$row['subkey']] = $row['selected_value']; |
|
342 | - } |
|
343 | - $form->addButtonSave(get_lang('ReconfigureExtension'), 'activeExtension'); |
|
344 | - } |
|
345 | - else { |
|
346 | - $defaults['host'] = 'localhost'; |
|
347 | - $defaults['port'] = '2002'; |
|
348 | - $defaults['size'] = '720x540'; |
|
349 | - $form->addButtonSave(get_lang('ActivateExtension'), 'activeExtension'); |
|
350 | - } |
|
351 | - |
|
352 | - $form -> setDefaults($defaults); |
|
353 | - $form -> display(); |
|
354 | - echo '<br />'; |
|
355 | - ?> |
|
338 | + $rs = Database::query($sql); |
|
339 | + while($row = Database::fetch_array($rs,'ASSOC')) |
|
340 | + { |
|
341 | + $defaults[$row['subkey']] = $row['selected_value']; |
|
342 | + } |
|
343 | + $form->addButtonSave(get_lang('ReconfigureExtension'), 'activeExtension'); |
|
344 | + } |
|
345 | + else { |
|
346 | + $defaults['host'] = 'localhost'; |
|
347 | + $defaults['port'] = '2002'; |
|
348 | + $defaults['size'] = '720x540'; |
|
349 | + $form->addButtonSave(get_lang('ActivateExtension'), 'activeExtension'); |
|
350 | + } |
|
351 | + |
|
352 | + $form -> setDefaults($defaults); |
|
353 | + $form -> display(); |
|
354 | + echo '<br />'; |
|
355 | + ?> |
|
356 | 356 | </form> |
357 | 357 | </div> |
358 | 358 | </div> |
359 | 359 | </div> |
360 | 360 | |
361 | 361 | <?php |
362 | - /* |
|
362 | + /* |
|
363 | 363 | <!-- EPHORUS --> |
364 | 364 | <div id="main_ephorus"> |
365 | 365 | <div id="extension_header_ephorus" class="accordion_header"> |
@@ -4,11 +4,11 @@ discard block |
||
4 | 4 | * Edition of extensions configuration |
5 | 5 | * @package chamilo.admin |
6 | 6 | */ |
7 | -$cidReset=true; |
|
7 | +$cidReset = true; |
|
8 | 8 | require_once '../inc/global.inc.php'; |
9 | -$this_section=SECTION_PLATFORM_ADMIN; |
|
9 | +$this_section = SECTION_PLATFORM_ADMIN; |
|
10 | 10 | api_protect_admin_script(); |
11 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
11 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
12 | 12 | // Database Table Definitions |
13 | 13 | $tbl_settings_current = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT); |
14 | 14 | $message = ''; |
@@ -21,16 +21,16 @@ discard block |
||
21 | 21 | WHERE variable="service_visio" |
22 | 22 | AND subkey="active"'; |
23 | 23 | $rs = Database::query($sql); |
24 | - if (Database::affected_rows($rs)>0) { |
|
24 | + if (Database::affected_rows($rs) > 0) { |
|
25 | 25 | // select all the courses and insert the tool inside |
26 | 26 | $sql = 'SELECT id FROM '.Database::get_main_table(TABLE_MAIN_COURSE); |
27 | 27 | $rs = Database::query($sql); |
28 | - while($row = Database::fetch_array($rs)){ |
|
29 | - if(!empty($_POST['visio_host'])) { |
|
28 | + while ($row = Database::fetch_array($rs)) { |
|
29 | + if (!empty($_POST['visio_host'])) { |
|
30 | 30 | $tool_table = Database::get_course_table(TABLE_TOOL_LIST); |
31 | 31 | $select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CONFERENCE."'"; |
32 | 32 | $selectres = Database::query($select); |
33 | - if (Database::num_rows($selectres)<1) { |
|
33 | + if (Database::num_rows($selectres) < 1) { |
|
34 | 34 | $sql = 'INSERT INTO '.$tool_table.' SET |
35 | 35 | c_id = '.$row['id'].', |
36 | 36 | name="'.TOOL_VISIO_CONFERENCE.'", |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | $select = "SELECT id FROM $tool_table WHERE c_id =".$row['id']." AND name='".TOOL_VISIO_CLASSROOM."'"; |
47 | 47 | $selectres = Database::query($select); |
48 | - if(Database::num_rows($selectres)<1) { |
|
48 | + if (Database::num_rows($selectres) < 1) { |
|
49 | 49 | $sql = 'INSERT INTO '.$tool_table.' SET |
50 | 50 | c_id = '.$row['id'].', |
51 | 51 | name="'.TOOL_VISIO_CLASSROOM.'", |
@@ -82,12 +82,12 @@ discard block |
||
82 | 82 | $rs = Database::query($sql); |
83 | 83 | |
84 | 84 | $sql = 'UPDATE '.$tbl_settings_current.' SET |
85 | - selected_value="'.($_POST['visio_use_rtmpt']=='true'?'true':'false').'" |
|
85 | + selected_value="'.($_POST['visio_use_rtmpt'] == 'true' ? 'true' : 'false').'" |
|
86 | 86 | WHERE variable="service_visio" |
87 | 87 | AND subkey="visio_use_rtmpt"'; |
88 | 88 | $rs = Database::query($sql); |
89 | 89 | |
90 | - if(empty($message)) { |
|
90 | + if (empty($message)) { |
|
91 | 91 | $message = get_lang('ServiceReconfigured'); |
92 | 92 | } |
93 | 93 | break; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | $rs = Database::query($sql); |
102 | 102 | |
103 | - if (Database::affected_rows($rs)>0){ |
|
103 | + if (Database::affected_rows($rs) > 0) { |
|
104 | 104 | $message = get_lang('ServiceActivated'); |
105 | 105 | } |
106 | 106 | |
@@ -153,20 +153,20 @@ discard block |
||
153 | 153 | WHERE variable LIKE "service_%" AND subkey="active" and selected_value="true"'; |
154 | 154 | |
155 | 155 | $rs = Database::query($sql); |
156 | -while($row = Database::fetch_array($rs)){ |
|
156 | +while ($row = Database::fetch_array($rs)) { |
|
157 | 157 | $listActiveServices[] = $row['variable']; |
158 | 158 | } |
159 | 159 | |
160 | 160 | // javascript to handle accordion behaviour |
161 | 161 | $javascript_message = ''; |
162 | -if(!empty($message)){ |
|
162 | +if (!empty($message)) { |
|
163 | 163 | $javascript_message = |
164 | 164 | ' |
165 | 165 | document.getElementById("message").style.display = "block"; |
166 | 166 | var timer = setTimeout(hideMessage,5000); |
167 | 167 | '; |
168 | 168 | } |
169 | -$htmlHeadXtra[]= ' |
|
169 | +$htmlHeadXtra[] = ' |
|
170 | 170 | <script type="text/javascript"> |
171 | 171 | var listeDiv; |
172 | 172 | var extensionsHeader = new Array(); |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | ?> |
216 | 216 | <div id="message" style="display: none"> |
217 | 217 | <?php |
218 | - if(!empty($message)) |
|
218 | + if (!empty($message)) |
|
219 | 219 | Display::display_normal_message($message) |
220 | 220 | ?> |
221 | 221 | </div> |
@@ -330,13 +330,13 @@ discard block |
||
330 | 330 | $renderer = $form -> defaultRenderer(); |
331 | 331 | $renderer -> setElementTemplate('<div style="text-align:left">{label}</div><div style="text-align:left">{element}</div>'); |
332 | 332 | //$form -> addElement('html','<br /><br />'); |
333 | - if(in_array('service_ppt2lp',$listActiveServices)) |
|
333 | + if (in_array('service_ppt2lp', $listActiveServices)) |
|
334 | 334 | { |
335 | 335 | $sql = 'SELECT subkey, selected_value FROM '.$tbl_settings_current.' |
336 | 336 | WHERE variable = "service_ppt2lp" |
337 | 337 | AND subkey <> "active"'; |
338 | 338 | $rs = Database::query($sql); |
339 | - while($row = Database::fetch_array($rs,'ASSOC')) |
|
339 | + while ($row = Database::fetch_array($rs, 'ASSOC')) |
|
340 | 340 | { |
341 | 341 | $defaults[$row['subkey']] = $row['selected_value']; |
342 | 342 | } |
@@ -215,8 +215,8 @@ discard block |
||
215 | 215 | ?> |
216 | 216 | <div id="message" style="display: none"> |
217 | 217 | <?php |
218 | - if(!empty($message)) |
|
219 | - Display::display_normal_message($message) |
|
218 | + if(!empty($message)) { |
|
219 | + Display::display_normal_message($message) |
|
220 | 220 | ?> |
221 | 221 | </div> |
222 | 222 | |
@@ -297,7 +297,9 @@ discard block |
||
297 | 297 | </div> |
298 | 298 | <div class="row"> |
299 | 299 | <div class="col-md-5"> |
300 | - <?php Display::display_icon('screenshot_ppt2lp.jpg', get_lang('Ppt2lp'), array('class'=>'img-responsive')); ?> |
|
300 | + <?php Display::display_icon('screenshot_ppt2lp.jpg', get_lang('Ppt2lp'), array('class'=>'img-responsive')); |
|
301 | + } |
|
302 | + ?> |
|
301 | 303 | </div> |
302 | 304 | <div class="col-md-7"> |
303 | 305 | <form method="POST" class="form-horizontal" action="<?php echo api_get_self(); ?>"> |
@@ -341,8 +343,7 @@ discard block |
||
341 | 343 | $defaults[$row['subkey']] = $row['selected_value']; |
342 | 344 | } |
343 | 345 | $form->addButtonSave(get_lang('ReconfigureExtension'), 'activeExtension'); |
344 | - } |
|
345 | - else { |
|
346 | + } else { |
|
346 | 347 | $defaults['host'] = 'localhost'; |
347 | 348 | $defaults['port'] = '2002'; |
348 | 349 | $defaults['size'] = '720x540'; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
19 | 19 | |
20 | 20 | // setting breadcrumbs |
21 | -$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
21 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
22 | 22 | |
23 | 23 | $tool_name = null; |
24 | 24 | |
@@ -39,23 +39,23 @@ discard block |
||
39 | 39 | $token = Security::get_token(); |
40 | 40 | |
41 | 41 | if ($action == 'add') { |
42 | - $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type,'name' => $extra_field->pageName); |
|
43 | - $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'],'name' => $extra_field_info['display_text']); |
|
44 | - $interbreadcrumb[]=array('url' => 'extra_field_options.php?type='.$extra_field->type.'&field_id='.$extra_field_info['id'], 'name' => get_lang('EditExtraFieldOptions')); |
|
45 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('Add')); |
|
42 | + $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type, 'name' => $extra_field->pageName); |
|
43 | + $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'], 'name' => $extra_field_info['display_text']); |
|
44 | + $interbreadcrumb[] = array('url' => 'extra_field_options.php?type='.$extra_field->type.'&field_id='.$extra_field_info['id'], 'name' => get_lang('EditExtraFieldOptions')); |
|
45 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Add')); |
|
46 | 46 | } elseif ($action == 'edit') { |
47 | - $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type,'name' => $extra_field->pageName); |
|
48 | - $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'],'name' => $extra_field_info['display_text']); |
|
49 | - $interbreadcrumb[]=array('url' => 'extra_field_options.php?type='.$extra_field->type.'&field_id='.$extra_field_info['id'], 'name' => get_lang('EditExtraFieldOptions')); |
|
47 | + $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type, 'name' => $extra_field->pageName); |
|
48 | + $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'], 'name' => $extra_field_info['display_text']); |
|
49 | + $interbreadcrumb[] = array('url' => 'extra_field_options.php?type='.$extra_field->type.'&field_id='.$extra_field_info['id'], 'name' => get_lang('EditExtraFieldOptions')); |
|
50 | 50 | |
51 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('Edit')); |
|
51 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit')); |
|
52 | 52 | } else { |
53 | - $interbreadcrumb[]=array('url' => 'extra_fields.php?type='.$extra_field->type,'name' => $extra_field->pageName); |
|
54 | - $interbreadcrumb[]=array( |
|
53 | + $interbreadcrumb[] = array('url' => 'extra_fields.php?type='.$extra_field->type, 'name' => $extra_field->pageName); |
|
54 | + $interbreadcrumb[] = array( |
|
55 | 55 | 'url' => 'extra_fields.php?type='.$extra_field->type.'&action=edit&id='.$extra_field_info['id'], |
56 | 56 | 'name' => $extra_field_info['display_text'] |
57 | 57 | ); |
58 | - $interbreadcrumb[]=array('url' => '#','name' => get_lang('EditExtraFieldOptions')); |
|
58 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditExtraFieldOptions')); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | //jqgrid will use this URL to do the selects |
@@ -108,12 +108,12 @@ discard block |
||
108 | 108 | |
109 | 109 | //With this function we can add actions to the jgrid (edit, delete, etc) |
110 | 110 | $action_links = 'function action_formatter(cellvalue, options, rowObject) { |
111 | - return \'<a href="?action=edit&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>'. |
|
112 | - ' <a onclick="javascript:if(!confirm('."\'".addslashes(get_lang("ConfirmYourChoice"))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>'. |
|
111 | + return \'<a href="?action=edit&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'. |
|
112 | + ' <a onclick="javascript:if(!confirm('."\'".addslashes(get_lang("ConfirmYourChoice"))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'. |
|
113 | 113 | '\'; |
114 | 114 | }'; |
115 | 115 | |
116 | -$htmlHeadXtra[]='<script> |
|
116 | +$htmlHeadXtra[] = '<script> |
|
117 | 117 | $(function() { |
118 | 118 | // grid definition see the $obj->display() function |
119 | 119 | '.Display::grid_js( |
@@ -345,7 +345,10 @@ discard block |
||
345 | 345 | $searchForm->display(); |
346 | 346 | echo '</div>'; |
347 | 347 | ?> |
348 | -<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;"> |
|
348 | +<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) { |
|
349 | + echo '&add=true' ; |
|
350 | +} |
|
351 | +?>" style="margin:0px;"> |
|
349 | 352 | <?php |
350 | 353 | echo '<legend>'.$tool_name.': '.$data['name'].'</legend>'; |
351 | 354 | |
@@ -420,7 +423,10 @@ discard block |
||
420 | 423 | ?> |
421 | 424 | <br /> |
422 | 425 | <label class="control-label"> |
423 | - <input type="checkbox" <?php if ($user_with_any_group) echo 'checked="checked"';?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id"> |
|
426 | + <input type="checkbox" <?php if ($user_with_any_group) { |
|
427 | + echo 'checked="checked"'; |
|
428 | +} |
|
429 | +?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id"> |
|
424 | 430 | <?php echo get_lang('UsersRegisteredInAnyGroup'); ?> |
425 | 431 | </label> |
426 | 432 | </div> |
@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | api_protect_admin_script(true); |
19 | 19 | |
20 | 20 | // setting breadcrumbs |
21 | -$interbreadcrumb[]= array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
22 | -$interbreadcrumb[]= array('url' => 'usergroups.php','name' => get_lang('Classes')); |
|
21 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
22 | +$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes')); |
|
23 | 23 | |
24 | 24 | // Database Table Definitions |
25 | 25 | |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | |
92 | 92 | </script>'; |
93 | 93 | |
94 | -$form_sent = 0; |
|
94 | +$form_sent = 0; |
|
95 | 95 | |
96 | 96 | $extra_field_list = UserManager::get_extra_fields(); |
97 | 97 | $new_field_list = array(); |
98 | 98 | if (is_array($extra_field_list)) { |
99 | 99 | foreach ($extra_field_list as $extra_field) { |
100 | 100 | //if is enabled to filter and is a "<select>" field type |
101 | - if ($extra_field[8]==1 && $extra_field[2]==4 ) { |
|
101 | + if ($extra_field[8] == 1 && $extra_field[2] == 4) { |
|
102 | 102 | $new_field_list[] = array( |
103 | 103 | 'name'=> $extra_field[3], |
104 | 104 | 'variable' => $extra_field[1], 'data'=> $extra_field[9] |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | foreach ($users as $user) { |
147 | 147 | $data[] = array($user['username'], $groupInfo['name']); |
148 | 148 | } |
149 | - $filename = 'export_user_class_' . api_get_local_time(); |
|
149 | + $filename = 'export_user_class_'.api_get_local_time(); |
|
150 | 150 | Export::arrayToCsv($data, $filename); |
151 | 151 | exit; |
152 | 152 | } |
@@ -156,11 +156,11 @@ discard block |
||
156 | 156 | // Filter by Extra Fields |
157 | 157 | $use_extra_fields = false; |
158 | 158 | if (is_array($extra_field_list)) { |
159 | - if (is_array($new_field_list) && count($new_field_list)>0 ) { |
|
159 | + if (is_array($new_field_list) && count($new_field_list) > 0) { |
|
160 | 160 | foreach ($new_field_list as $new_field) { |
161 | 161 | $varname = 'field_'.$new_field['variable']; |
162 | 162 | if (UserManager::is_extra_field_available($new_field['variable'])) { |
163 | - if (isset($_POST[$varname]) && $_POST[$varname]!='0') { |
|
163 | + if (isset($_POST[$varname]) && $_POST[$varname] != '0') { |
|
164 | 164 | $use_extra_fields = true; |
165 | 165 | $extra_field_result[] = UserManager::get_extra_user_data_by_value( |
166 | 166 | $new_field['variable'], |
@@ -174,10 +174,10 @@ discard block |
||
174 | 174 | |
175 | 175 | if ($use_extra_fields) { |
176 | 176 | $final_result = array(); |
177 | - if (count($extra_field_result)>1) { |
|
178 | - for ($i=0; $i<count($extra_field_result)-1; $i++) { |
|
179 | - if (is_array($extra_field_result[$i+1])) { |
|
180 | - $final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i+1]); |
|
177 | + if (count($extra_field_result) > 1) { |
|
178 | + for ($i = 0; $i < count($extra_field_result) - 1; $i++) { |
|
179 | + if (is_array($extra_field_result[$i + 1])) { |
|
180 | + $final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i + 1]); |
|
181 | 181 | } |
182 | 182 | } |
183 | 183 | } else { |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | |
197 | 197 | $searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id); |
198 | 198 | $searchForm->addHeader(get_lang('AdvancedSearch')); |
199 | -$renderer =& $searchForm->defaultRenderer(); |
|
199 | +$renderer = & $searchForm->defaultRenderer(); |
|
200 | 200 | |
201 | 201 | $searchForm->addElement('hidden', 'id', $id); |
202 | 202 | foreach ($filters as $param) { |
@@ -345,13 +345,13 @@ discard block |
||
345 | 345 | $searchForm->display(); |
346 | 346 | echo '</div>'; |
347 | 347 | ?> |
348 | -<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;"> |
|
348 | +<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;"> |
|
349 | 349 | <?php |
350 | 350 | echo '<legend>'.$tool_name.': '.$data['name'].'</legend>'; |
351 | 351 | |
352 | 352 | |
353 | 353 | if (is_array($extra_field_list)) { |
354 | - if (is_array($new_field_list) && count($new_field_list)>0) { |
|
354 | + if (is_array($new_field_list) && count($new_field_list) > 0) { |
|
355 | 355 | echo '<h3>'.get_lang('FilterByUser').'</h3>'; |
356 | 356 | foreach ($new_field_list as $new_field) { |
357 | 357 | echo $new_field['name']; |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | echo ' <select name="'.$varname.'">'; |
360 | 360 | echo '<option value="0">--'.get_lang('Select').'--</option>'; |
361 | 361 | foreach ($new_field['data'] as $option) { |
362 | - $checked=''; |
|
362 | + $checked = ''; |
|
363 | 363 | if (isset($_POST[$varname])) { |
364 | 364 | if ($_POST[$varname] == $option[1]) { |
365 | 365 | $checked = 'selected="true"'; |
@@ -386,15 +386,15 @@ discard block |
||
386 | 386 | <?php if ($data['group_type'] == UserGroup::SOCIAL_CLASS) { ?> |
387 | 387 | <select name="relation" id="relation"> |
388 | 388 | <option value=""><?php echo get_lang('SelectARelationType')?></option> |
389 | - <option value="<?php echo GROUP_USER_PERMISSION_ADMIN ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_ADMIN)?'selected=selected':'') ?> > |
|
389 | + <option value="<?php echo GROUP_USER_PERMISSION_ADMIN ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_ADMIN) ? 'selected=selected' : '') ?> > |
|
390 | 390 | <?php echo get_lang('Admin') ?></option> |
391 | - <option value="<?php echo GROUP_USER_PERMISSION_READER ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_READER)?'selected=selected':'') ?> > |
|
391 | + <option value="<?php echo GROUP_USER_PERMISSION_READER ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_READER) ? 'selected=selected' : '') ?> > |
|
392 | 392 | <?php echo get_lang('Reader') ?></option> |
393 | - <option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_PENDING_INVITATION)?'selected=selected':'') ?> > |
|
393 | + <option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_PENDING_INVITATION) ? 'selected=selected' : '') ?> > |
|
394 | 394 | <?php echo get_lang('PendingInvitation') ?></option> |
395 | - <option value="<?php echo GROUP_USER_PERMISSION_MODERATOR ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_MODERATOR)?'selected=selected':'') ?> > |
|
395 | + <option value="<?php echo GROUP_USER_PERMISSION_MODERATOR ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_MODERATOR) ? 'selected=selected' : '') ?> > |
|
396 | 396 | <?php echo get_lang('Moderator') ?></option> |
397 | - <option value="<?php echo GROUP_USER_PERMISSION_HRM ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_HRM)?'selected=selected':'') ?> > |
|
397 | + <option value="<?php echo GROUP_USER_PERMISSION_HRM ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_HRM) ? 'selected=selected' : '') ?> > |
|
398 | 398 | <?php echo get_lang('Drh') ?></option> |
399 | 399 | </select> |
400 | 400 | <?php } ?> |
@@ -414,13 +414,13 @@ discard block |
||
414 | 414 | 'elements_not_in_name', |
415 | 415 | $elements_not_in, |
416 | 416 | '', |
417 | - array('class'=>'col-md-7', 'multiple'=>'multiple','id'=>'elements_not_in','size'=>'15px'), |
|
417 | + array('class'=>'col-md-7', 'multiple'=>'multiple', 'id'=>'elements_not_in', 'size'=>'15px'), |
|
418 | 418 | false |
419 | 419 | ); |
420 | 420 | ?> |
421 | 421 | <br /> |
422 | 422 | <label class="control-label"> |
423 | - <input type="checkbox" <?php if ($user_with_any_group) echo 'checked="checked"';?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id"> |
|
423 | + <input type="checkbox" <?php if ($user_with_any_group) echo 'checked="checked"'; ?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id"> |
|
424 | 424 | <?php echo get_lang('UsersRegisteredInAnyGroup'); ?> |
425 | 425 | </label> |
426 | 426 | </div> |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | 'elements_in_name[]', |
445 | 445 | $elements_in, |
446 | 446 | '', |
447 | - array('class'=>'col-md-7', 'multiple'=>'multiple','id'=>'elements_in','size'=>'15px'), |
|
447 | + array('class'=>'col-md-7', 'multiple'=>'multiple', 'id'=>'elements_in', 'size'=>'15px'), |
|
448 | 448 | false |
449 | 449 | ); |
450 | 450 | unset($sessionUsersList); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | $this_section = SECTION_PLATFORM_ADMIN; |
12 | 12 | // User permissions |
13 | 13 | api_protect_admin_script(); |
14 | -$interbreadcrumb[] = array ('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
14 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
15 | 15 | Display :: display_header(get_lang('SystemStatus')); |
16 | 16 | $diag = new Diagnoser(); |
17 | 17 | $diag->show_html(); |