From 355ea0c2e21612d7d37ed2e5c8cdc6ff61ac9ee8 Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Ramos Date: Tue, 13 Jul 2010 17:05:53 -0300 Subject: Implement gettext() calls on services_captiveportal_filemanager.php --- .../www/services_captiveportal_filemanager.php | 53 +++++++++++----------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'usr/local/www/services_captiveportal_filemanager.php') diff --git a/usr/local/www/services_captiveportal_filemanager.php b/usr/local/www/services_captiveportal_filemanager.php index efef6b7..9e99395 100755 --- a/usr/local/www/services_captiveportal_filemanager.php +++ b/usr/local/www/services_captiveportal_filemanager.php @@ -49,7 +49,6 @@ function cpelements_sort() { usort($config['captiveportal']['element'],"cpelementscmp"); } -$pgtitle = array("Services","Captive portal"); $statusurl = "status_captiveportal.php"; $logurl = "diag_logs_auth.php"; @@ -60,6 +59,8 @@ require("filter.inc"); require("shaper.inc"); require("captiveportal.inc"); +$pgtitle = array(gettext("Services"),gettext("Captive portal")); + if (!is_array($config['captiveportal']['element'])) $config['captiveportal']['element'] = array(); @@ -85,14 +86,14 @@ if ($_POST) { // is there already a file with that name? foreach ($a_element as $element) { if ($element['name'] == $name) { - $input_errors[] = "A file with the name '$name' already exists."; + $input_errors[] = sprintf(gettext("A file with the name '%s' already exists."), $name); break; } } // check total file size if (($total_size + $size) > $g['captiveportal_element_sizelimit']) { - $input_errors[] = "The total size of all files uploaded may not exceed " . + $input_errors[] = gettext("The total size of all files uploaded may not exceed ") . format_bytes($g['captiveportal_element_sizelimit']) . "."; } @@ -135,24 +136,24 @@ include("head.inc"); - - + + @@ -162,14 +163,14 @@ include("head.inc"); 0): ?> - + @@ -178,9 +179,9 @@ include("head.inc"); + "> @@ -190,7 +191,7 @@ include("head.inc");
NameSize - +
" width="17" height="17" border="0">
- + ')">" width="17" height="17" border="0">
TOTAL
- - + " width="17" height="17" border="0">
- +
" width="17" height="17" border="0">
@@ -198,21 +199,21 @@ include("head.inc"); - Note:
+ :
- Any files that you upload here with the filename prefix of captiveportal- will - be made available in the root directory of the captive portal HTTP(S) server. - You may reference them directly from your portal page HTML code using relative paths. - Example: you've uploaded an image with the name 'captiveportal-test.jpg' using the - file manager. Then you can include it in your portal page like this:

+ :

<img src="captiveportal-test.jpg" width=... height=...>

- In addition, you can also upload .php files for execution. You can pass the filename - to your custom page from the initial page by using text similar to: + :

- <a href="/captiveportal-aup.php?redirurl=$PORTAL_REDIRURL$">Acceptable usage policy</a> + <a href="/captiveportal-aup.php?redirurl=$PORTAL_REDIRURL$"></a>

- The total size limit for all files is .
+ . -- cgit v1.1