@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | SubLanguageManager::make_unavailable_language($_POST['id']); |
36 | 36 | echo 'set_hidden'; |
37 | 37 | } else { |
38 | - echo 'confirm:' . intval($_POST['id']); |
|
38 | + echo 'confirm:'.intval($_POST['id']); |
|
39 | 39 | } |
40 | 40 | } |
41 | 41 | } |
@@ -57,21 +57,21 @@ discard block |
||
57 | 57 | var disabledLang = "'.$disabledLang.'" |
58 | 58 | |
59 | 59 | if (msgLang == 1) { |
60 | - $("#id_content_message").html("<div class=\"warning-message alert alert-warning\">' . get_lang('ThereAreUsersUsingThisLanguagesDisableItManually') . ' </br> " + disabledLang + "</div"); |
|
60 | + $("#id_content_message").html("<div class=\"warning-message alert alert-warning\">' . get_lang('ThereAreUsersUsingThisLanguagesDisableItManually').' </br> " + disabledLang + "</div"); |
|
61 | 61 | } |
62 | 62 | |
63 | 63 | $("#disable_all_except_default").click(function () { |
64 | - if(confirm("'. get_lang('ConfirmYourChoice') .'")) { |
|
64 | + if(confirm("'. get_lang('ConfirmYourChoice').'")) { |
|
65 | 65 | $.ajax({ |
66 | 66 | contentType: "application/x-www-form-urlencoded", |
67 | 67 | beforeSend: function(objeto) { |
68 | - $("#id_content_message").html("<div class=\"warning-message alert alert-warning\"><em class=\"fa fa-refresh fa-spin\"></em> ' . get_lang('Loading') . '</div>"); |
|
68 | + $("#id_content_message").html("<div class=\"warning-message alert alert-warning\"><em class=\"fa fa-refresh fa-spin\"></em> ' . get_lang('Loading').'</div>"); |
|
69 | 69 | }, |
70 | 70 | type: "GET", |
71 | 71 | url: "../admin/languages.php", |
72 | 72 | data: "action=disable_all_except_default", |
73 | 73 | success: function(datos) { |
74 | - window.location.href = "' . api_get_self() . '"; |
|
74 | + window.location.href = "' . api_get_self().'"; |
|
75 | 75 | } |
76 | 76 | }); |
77 | 77 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $.ajax({ |
108 | 108 | contentType: "application/x-www-form-urlencoded", |
109 | 109 | beforeSend: function(objeto) { |
110 | - $("#id_content_message").html("<div class=\"warning-message alert alert-warning\"><em class=\"fa fa-refresh fa-spin\"></em> ' . get_lang('Loading') . '</div>"); |
|
110 | + $("#id_content_message").html("<div class=\"warning-message alert alert-warning\"><em class=\"fa fa-refresh fa-spin\"></em> ' . get_lang('Loading').'</div>"); |
|
111 | 111 | }, |
112 | 112 | type: "POST", |
113 | 113 | url: "../admin/languages.php", |
@@ -118,26 +118,26 @@ discard block |
||
118 | 118 | $("#"+id_img_link_tool).attr("src",path_name_of_imglinktool); |
119 | 119 | |
120 | 120 | if (my_image_tool=="visible.png") { |
121 | - $("#"+id_img_link_tool).attr("alt","' . get_lang('MakeAvailable', '') . '"); |
|
122 | - $("#"+id_img_link_tool).attr("title","' . get_lang('MakeAvailable', '') . '"); |
|
121 | + $("#"+id_img_link_tool).attr("alt","' . get_lang('MakeAvailable', '').'"); |
|
122 | + $("#"+id_img_link_tool).attr("title","' . get_lang('MakeAvailable', '').'"); |
|
123 | 123 | } else { |
124 | - $("#"+id_img_link_tool).attr("alt","' . get_lang('MakeUnavailable', '') . '"); |
|
125 | - $("#"+id_img_link_tool).attr("title","' . get_lang('MakeUnavailable', '') . '"); |
|
124 | + $("#"+id_img_link_tool).attr("alt","' . get_lang('MakeUnavailable', '').'"); |
|
125 | + $("#"+id_img_link_tool).attr("title","' . get_lang('MakeUnavailable', '').'"); |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | if (datos=="set_visible") { |
129 | - $("#id_content_message").html("<div class=\"confirmation-message alert alert-success\">' . get_lang('LanguageIsNowVisible', '') . '</div>"); |
|
129 | + $("#id_content_message").html("<div class=\"confirmation-message alert alert-success\">' . get_lang('LanguageIsNowVisible', '').'</div>"); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | if (datos=="set_hidden") { |
133 | - $("#id_content_message").html("<div class=\"confirmation-message alert alert-success\">' . get_lang('LanguageIsNowHidden', '') . '</div>"); |
|
133 | + $("#id_content_message").html("<div class=\"confirmation-message alert alert-success\">' . get_lang('LanguageIsNowHidden', '').'</div>"); |
|
134 | 134 | } |
135 | 135 | } |
136 | 136 | |
137 | 137 | var action = datos.split(":")[0]; |
138 | 138 | if (action && action == "confirm") { |
139 | 139 | var id = datos.split(":")[1]; |
140 | - var sure = "<div class=\"warning-message alert alert-warning\">'.get_lang('ThereAreUsersUsingThisLanguageYouWantToDisableThisLanguageAndSetUsersWithTheDefaultPortalLanguage').'</br></br><a href=\"languages.php?action=make_unavailable_confirmed&id="+id+"\" class=\"btn btn-default\"><em class=\"fa fa-eye\"></em> ' . get_lang('MakeUnavailable') . '</a></div>"; |
|
140 | + var sure = "<div class=\"warning-message alert alert-warning\">'.get_lang('ThereAreUsersUsingThisLanguageYouWantToDisableThisLanguageAndSetUsersWithTheDefaultPortalLanguage').'</br></br><a href=\"languages.php?action=make_unavailable_confirmed&id="+id+"\" class=\"btn btn-default\"><em class=\"fa fa-eye\"></em> '.get_lang('MakeUnavailable').'</a></div>"; |
|
141 | 141 | $("#id_content_message").html(sure); |
142 | 142 | $("html, body").animate({ scrollTop: 0 }, 200); |
143 | 143 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | SubLanguageManager::make_unavailable_language($language['id']); |
183 | 183 | } else { |
184 | 184 | if (intval(SubLanguageManager::get_platform_language_id()) !== intval($language['id'])) { |
185 | - $failedDisabledLanguages .= ' - ' .$language['english_name'] . '</br>'; |
|
185 | + $failedDisabledLanguages .= ' - '.$language['english_name'].'</br>'; |
|
186 | 186 | $checkFailed = true; |
187 | 187 | } |
188 | 188 | } |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | foreach ($_POST['id'] as $index => $id) { |
214 | 214 | $ids[] = intval($id); |
215 | 215 | } |
216 | - $sql = "UPDATE $tbl_admin_languages SET available='1' WHERE id IN ('" . implode("','", $ids) . "')"; |
|
216 | + $sql = "UPDATE $tbl_admin_languages SET available='1' WHERE id IN ('".implode("','", $ids)."')"; |
|
217 | 217 | Database::query($sql); |
218 | 218 | } |
219 | 219 | break; |
@@ -223,7 +223,7 @@ discard block |
||
223 | 223 | foreach ($_POST['id'] as $index => $id) { |
224 | 224 | $ids[] = intval($id); |
225 | 225 | } |
226 | - $sql = "UPDATE $tbl_admin_languages SET available='0' WHERE id IN ('" . implode("','", $ids) . "')"; |
|
226 | + $sql = "UPDATE $tbl_admin_languages SET available='0' WHERE id IN ('".implode("','", $ids)."')"; |
|
227 | 227 | Database::query($sql); |
228 | 228 | } |
229 | 229 | break; |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | // displaying the explanation for this tool |
253 | 253 | Display::display_normal_message(get_lang('PlatformLanguagesExplanation')); |
254 | 254 | |
255 | -echo '<a id="disable_all_except_default" href="javascript:void(0)" class="btn btn-primary"><em class="fa fa-eye"></em> ' . get_lang('LanguagesDisableAllExceptDefault') . '</a></br></br>'; |
|
255 | +echo '<a id="disable_all_except_default" href="javascript:void(0)" class="btn btn-primary"><em class="fa fa-eye"></em> '.get_lang('LanguagesDisableAllExceptDefault').'</a></br></br>'; |
|
256 | 256 | |
257 | 257 | // selecting all the languages |
258 | 258 | $sql_select = "SELECT * FROM $tbl_admin_languages"; |
@@ -273,8 +273,8 @@ discard block |
||
273 | 273 | $checked = ' checked="checked" '; |
274 | 274 | } |
275 | 275 | |
276 | - $row_td[] = '<input type="hidden" name="edit_id" value="' . Security::remove_XSS($_GET['id']) . '" /><input type="text" name="txt_name" value="' . $row['original_name'] . '" /> ' |
|
277 | - . '<input type="checkbox" ' . $checked . 'name="platformlanguage" id="platformlanguage" value="' . $row['english_name'] . '" /><label for="platformlanguage">' . $row['original_name'] . ' ' . get_lang('AsPlatformLanguage') . '</label> <input type="submit" name="Submit" value="' . get_lang('Ok') . '" /><a name="value" />'; |
|
276 | + $row_td[] = '<input type="hidden" name="edit_id" value="'.Security::remove_XSS($_GET['id']).'" /><input type="text" name="txt_name" value="'.$row['original_name'].'" /> ' |
|
277 | + . '<input type="checkbox" '.$checked.'name="platformlanguage" id="platformlanguage" value="'.$row['english_name'].'" /><label for="platformlanguage">'.$row['original_name'].' '.get_lang('AsPlatformLanguage').'</label> <input type="submit" name="Submit" value="'.get_lang('Ok').'" /><a name="value" />'; |
|
278 | 278 | } else { |
279 | 279 | $row_td[] = $row['original_name']; |
280 | 280 | } |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | if ($row['english_name'] == $row_lang['selected_value']) { |
289 | 289 | $setplatformlanguage = Display::return_icon('languages.png', get_lang('CurrentLanguagesPortal'), '', ICON_SIZE_SMALL); |
290 | 290 | } else { |
291 | - $setplatformlanguage = "<a href=\"javascript:if (confirm('" . addslashes(get_lang('AreYouSureYouWantToSetThisLanguageAsThePortalDefault')) . "')) { location.href='" . api_get_self() . "?action=setplatformlanguage&id=" . $row['id'] . "'; }\">" . Display::return_icon('languages_na.png', get_lang('SetLanguageAsDefault'), '', ICON_SIZE_SMALL) . "</a>"; |
|
291 | + $setplatformlanguage = "<a href=\"javascript:if (confirm('".addslashes(get_lang('AreYouSureYouWantToSetThisLanguageAsThePortalDefault'))."')) { location.href='".api_get_self()."?action=setplatformlanguage&id=".$row['id']."'; }\">".Display::return_icon('languages_na.png', get_lang('SetLanguageAsDefault'), '', ICON_SIZE_SMALL)."</a>"; |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | $allow_delete_sub_language = null; |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | |
301 | 301 | if ($verified_if_is_sub_language === false) { |
302 | 302 | $verified_if_is_father = SubLanguageManager::check_if_language_is_father($row['id']); |
303 | - $allow_use_sub_language = " <a href='sub_language_add.php?action=definenewsublanguage&id=" . $row['id'] . "'>" . Display::return_icon('new_language.png', get_lang('CreateSubLanguage'), array(), ICON_SIZE_SMALL) . "</a>"; |
|
303 | + $allow_use_sub_language = " <a href='sub_language_add.php?action=definenewsublanguage&id=".$row['id']."'>".Display::return_icon('new_language.png', get_lang('CreateSubLanguage'), array(), ICON_SIZE_SMALL)."</a>"; |
|
304 | 304 | if ($verified_if_is_father === true) { |
305 | 305 | //$allow_add_term_sub_language = " <a href='sub_language.php?action=registersublanguage&id=".$row['id']."'>".Display::return_icon('2rightarrow.png', get_lang('AddWordForTheSubLanguage'),array('width'=>ICON_SIZE_SMALL,'height'=>ICON_SIZE_SMALL))."</a>"; |
306 | 306 | $allow_add_term_sub_language = ''; |
@@ -310,8 +310,8 @@ discard block |
||
310 | 310 | } else { |
311 | 311 | $allow_use_sub_language = ''; |
312 | 312 | $all_information_of_sub_language = SubLanguageManager::get_all_information_of_language($row['id']); |
313 | - $allow_add_term_sub_language = " <a href='sub_language.php?action=registersublanguage&id=" . Security::remove_XSS($all_information_of_sub_language['parent_id']) . "&sub_language_id=" . Security::remove_XSS($row['id']) . "'>" . Display::return_icon('2rightarrow.png', get_lang('AddWordForTheSubLanguage'), array('width' => ICON_SIZE_SMALL, 'height' => ICON_SIZE_SMALL)) . "</a>"; |
|
314 | - $allow_delete_sub_language = " <a href='sub_language_add.php?action=deletesublanguage&id=" . Security::remove_XSS($all_information_of_sub_language['parent_id']) . "&sub_language_id=" . Security::remove_XSS($row['id']) . "'>" . Display::return_icon('delete.png', get_lang('DeleteSubLanguage'), array('width' => ICON_SIZE_SMALL, 'height' => ICON_SIZE_SMALL)) . "</a>"; |
|
313 | + $allow_add_term_sub_language = " <a href='sub_language.php?action=registersublanguage&id=".Security::remove_XSS($all_information_of_sub_language['parent_id'])."&sub_language_id=".Security::remove_XSS($row['id'])."'>".Display::return_icon('2rightarrow.png', get_lang('AddWordForTheSubLanguage'), array('width' => ICON_SIZE_SMALL, 'height' => ICON_SIZE_SMALL))."</a>"; |
|
314 | + $allow_delete_sub_language = " <a href='sub_language_add.php?action=deletesublanguage&id=".Security::remove_XSS($all_information_of_sub_language['parent_id'])."&sub_language_id=".Security::remove_XSS($row['id'])."'>".Display::return_icon('delete.png', get_lang('DeleteSubLanguage'), array('width' => ICON_SIZE_SMALL, 'height' => ICON_SIZE_SMALL))."</a>"; |
|
315 | 315 | } |
316 | 316 | } else { |
317 | 317 | $allow_use_sub_language = ''; |
@@ -319,13 +319,13 @@ discard block |
||
319 | 319 | } |
320 | 320 | |
321 | 321 | if ($row['english_name'] == $row_lang['selected_value']) { |
322 | - $row_td[] = Display::return_icon('visible.png', get_lang('Visible'))."<a href='" . api_get_self() . "?action=edit&id=" . $row['id'] . "#value'>" . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . "</a> |
|
323 | - " . $setplatformlanguage . $allow_use_sub_language . $allow_add_term_sub_language . $allow_delete_sub_language; |
|
322 | + $row_td[] = Display::return_icon('visible.png', get_lang('Visible'))."<a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL)."</a> |
|
323 | + " . $setplatformlanguage.$allow_use_sub_language.$allow_add_term_sub_language.$allow_delete_sub_language; |
|
324 | 324 | } else { |
325 | 325 | if ($row['available'] == 1) { |
326 | - $row_td[] = "<a class=\"make_visible_and_invisible\" id=\"linktool_" . $row['id'] . "\" href='" . api_get_self() . "?action=makeunavailable&id=" . $row['id'] . "'>" . Display::return_icon('visible.png', get_lang('MakeUnavailable'), array('id' => 'imglinktool_' . $row['id']), ICON_SIZE_SMALL) . "</a> <a href='" . api_get_self() . "?action=edit&id=" . $row['id'] . "#value'>" . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . "</a> " . $setplatformlanguage . $allow_use_sub_language . $allow_add_term_sub_language . $allow_delete_sub_language; |
|
326 | + $row_td[] = "<a class=\"make_visible_and_invisible\" id=\"linktool_".$row['id']."\" href='".api_get_self()."?action=makeunavailable&id=".$row['id']."'>".Display::return_icon('visible.png', get_lang('MakeUnavailable'), array('id' => 'imglinktool_'.$row['id']), ICON_SIZE_SMALL)."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL)."</a> ".$setplatformlanguage.$allow_use_sub_language.$allow_add_term_sub_language.$allow_delete_sub_language; |
|
327 | 327 | } else { |
328 | - $row_td[] = "<a class=\"make_visible_and_invisible\" id=\"linktool_" . $row['id'] . "\" href='" . api_get_self() . "?action=makeavailable&id=" . $row['id'] . "'>" . Display::return_icon('invisible.png', get_lang('MakeAvailable'), array('id' => 'imglinktool_' . $row['id']), ICON_SIZE_SMALL) . "</a> <a href='" . api_get_self() . "?action=edit&id=" . $row['id'] . "#value'>" . Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL) . "</a> " . $setplatformlanguage . $allow_use_sub_language . $allow_add_term_sub_language . $allow_delete_sub_language; |
|
328 | + $row_td[] = "<a class=\"make_visible_and_invisible\" id=\"linktool_".$row['id']."\" href='".api_get_self()."?action=makeavailable&id=".$row['id']."'>".Display::return_icon('invisible.png', get_lang('MakeAvailable'), array('id' => 'imglinktool_'.$row['id']), ICON_SIZE_SMALL)."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL)."</a> ".$setplatformlanguage.$allow_use_sub_language.$allow_add_term_sub_language.$allow_delete_sub_language; |
|
329 | 329 | } |
330 | 330 | } |
331 | 331 | $language_data[] = $row_td; |