Register Globals

Fix #1305
This commit is contained in:
Alan Garcia 2012-08-22 12:17:28 +00:00
parent 8e3bfca0c5
commit d42843ad89
3 changed files with 14 additions and 3 deletions

View File

@ -28,6 +28,16 @@
----------------------------------------------------------------------
*/
require_once("../class/config.php");
$fields = array (
"id" => array ("post", "integer", ""),
"pass" => array ("post", "string", ""),
"passconf" => array ("post", "string", ""),
"prefixe" => array ("post", "string", ""),
"login" => array ("post", "string", ""),
"dir" => array ("post", "string", ""),
);
getFields($fields);
if (!$id) {
$error=_("No account selected!");
@ -55,7 +65,7 @@ include_once("head.php");
?>
<div align="center"><h3><?php __("Editing an FTP account"); ?></h3></div>
<?php
if ($error) {
if (isset($error) && $error) {
echo "<p class=\"error\">$error</p>";
}
?>

View File

@ -51,6 +51,7 @@ if (isset($error) && $error) {
include_once("foot.php");
exit();
}
printVar($r);
?>
<form method="post" action="ftp_doedit.php" name="main" id="main">
<table border="1" cellspacing="0" cellpadding="4">
@ -58,7 +59,7 @@ if (isset($error) && $error) {
<label for="login"><?php __("Username"); ?></label></th><td>
<select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select>&nbsp;<b>_</b>&nbsp;<input type="text" class="int" name="login" id="login" value="<?php ehe($r[0]["login"]); ?>" size="20" maxlength="64" />
</td></tr>
<tr><th><label for="dir"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="<?php ehe($r[0]["dir"]); ?>" size="20" maxlength="64" />
<tr><th><label for="dir"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="<?php ehe("/".$r[0]["dir"]); ?>" size="20" maxlength="64" />
<script type="text/javascript">
<!--

View File

@ -82,7 +82,7 @@ while (list($key,$val)=each($r))
<td><div class="ina"><a href="ftp_edit.php?id=<?php echo $val["id"] ?>"><img src="images/edit.png" alt="<?php __("Edit"); ?>" /><?php __("Edit"); ?></a></div></td>
<td><label for="del_<?php echo $val["id"]; ?>"><?php echo $val["login"] ?></label></td>
<td><code><?php echo $val["dir"] ?></code></td>
<td><code><?php echo str_replace(ALTERNC_HTML,'',$val["dir"]) ?></code></td>
</tr>
<?php
}