Revision 74d0bea9
Added by Renato Botelho almost 15 years ago
usr/local/www/diag_patterns.php | ||
---|---|---|
40 | 40 |
require("guiconfig.inc"); |
41 | 41 |
|
42 | 42 |
//Move the upload file to /usr/local/share/protocols (is_uploaded_file must use tmp_name as argument) |
43 |
if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
|
|
43 |
if (($_POST['submit'] == gettext("Upload")) && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
|
|
44 | 44 |
if(fileExtension($_FILES['ulfile']['name'])) { |
45 | 45 |
move_uploaded_file($_FILES['ulfile']['tmp_name'], "/usr/local/share/protocols/" . $_FILES['ulfile']['name']); |
46 |
$ulmsg = "Uploaded file to /usr/local/share/protocols/" . htmlentities($_FILES['ulfile']['name']);
|
|
46 |
$ulmsg = gettext("Uploaded file to") . " /usr/local/share/protocols/" . htmlentities($_FILES['ulfile']['name']);
|
|
47 | 47 |
} |
48 | 48 |
else |
49 |
$ulmsg = "Warning: You must upload a file with .pat extension.";
|
|
49 |
$ulmsg = gettext("Warning: You must upload a file with .pat extension.");
|
|
50 | 50 |
} |
51 | 51 |
|
52 | 52 |
//Check if file has correct extension (.pat) |
... | ... | |
55 | 55 |
return ($format == ".pat"); |
56 | 56 |
} |
57 | 57 |
|
58 |
$pgtitle = array("Diagnostics","Add layer7 pattern");
|
|
58 |
$pgtitle = array(gettext("Diagnostics"), gettext("Add layer7 pattern"));
|
|
59 | 59 |
include("head.inc"); |
60 | 60 |
?> |
61 | 61 |
|
... | ... | |
95 | 95 |
</head> |
96 | 96 |
<body link="#0000CC" vlink="#0000CC" alink="#0000CC"> |
97 | 97 |
<?php include("fbegin.inc"); ?> |
98 |
<p><strong>You can upload new layer7 patterns to your system!</strong></p>
|
|
98 |
<p><strong><?=gettext("You can upload new layer7 patterns to your system!");?></strong></p>
|
|
99 | 99 |
<?php if ($ulmsg) echo "<p class=\"red\"><strong>" . $ulmsg . "</strong></p>\n"; ?> |
100 | 100 |
<div id="niftyOutter"> |
101 | 101 |
<form action="diag_patterns.php" method="POST" enctype="multipart/form-data" name="frmPattern"> |
102 | 102 |
<table> |
103 | 103 |
|
104 | 104 |
<tr> |
105 |
<td colspan="2" valign="top" class="vnsepcell">Upload</td>
|
|
105 |
<td colspan="2" valign="top" class="vnsepcell"><?=gettext("Upload");?></td>
|
|
106 | 106 |
</tr> |
107 | 107 |
<tr> |
108 |
<td align="right">File to upload:</td>
|
|
108 |
<td align="right"><?=gettext("File to upload");?>:</td>
|
|
109 | 109 |
<td valign="top" class="label"> |
110 | 110 |
<input name="ulfile" type="file" class="formfld file" id="ulfile"> |
111 | 111 |
</td></tr> |
112 | 112 |
<tr> |
113 | 113 |
<td valign="top"> </td> |
114 | 114 |
<td valign="top" class="label"> |
115 |
<input name="submit" type="submit" class="button" id="upload" value="Upload"></td>
|
|
115 |
<input name="submit" type="submit" class="button" id="upload" value="<?=gettext("Upload");?>"></td>
|
|
116 | 116 |
</tr> |
117 | 117 |
<tr> |
118 | 118 |
<td colspan="2" valign="top" height="16"></td> |
Also available in: Unified diff
Implement gettext() calls