Change all {...} to [...]

This commit is contained in:
Armel Fauveau
2001-07-06 13:17:43 +00:00
parent 429a7d6c88
commit 046824c9ae

View File

@@ -32,7 +32,7 @@ function check_db($dbcheck)
table_grants_header($dbcheck);
while ($row = mysql_fetch_array($result))
table_grants($row{"host"}, $row{"user"}, $dbcheck);
table_grants($row['host'], $row['user'], $dbcheck);
table_grants_tail();
}
@@ -516,7 +516,7 @@ function table_privileges($form, $row = false)
$item = 0;
while ((list(,$priv) = each($list_priv)) && ++$item) {
$priv_priv = $priv . "_priv";
$checked = ($row{$priv_priv} == "Y") ? "checked" : "";
$checked = ($row[$priv_priv] == "Y") ? "checked" : "";
if ($item % 2 == 1) echo "<tr>";
else echo "<td>&nbsp;</td>";
echo "<td><input type=\"checkbox\" name=\"$priv_priv\" $checked></td>";
@@ -607,7 +607,7 @@ function edit_operations($host, $user)
<li><a href="<?php echo "$self?server=$server&lang=$lang&db=mysql&table=user"; ?>"><?php echo $strBack; ?></a></li>
<?php if ($row{"Password"} != "") { ?>
<?php if ($row["Password"] != "") { ?>
<li><td><a href="<?php echo $del_url; ?>"><?php echo $strDeletePassword; ?></a></td></li>
<?php } ?>
@@ -683,20 +683,20 @@ function table_users($host = false, $user = false)
$i % 2 ? 0: $bgcolor = $cfgBgcolorTwo;
$strPriv = "";
if ($row{"Select_priv"} == "Y") $strPriv .= "Select ";
if ($row{"Insert_priv"} == "Y") $strPriv .= "Insert ";
if ($row{"Update_priv"} == "Y") $strPriv .= "Update ";
if ($row{"Delete_priv"} == "Y") $strPriv .= "Delete ";
if ($row{"Create_priv"} == "Y") $strPriv .= "Create ";
if ($row{"Drop_priv"} == "Y") $strPriv .= "Drop ";
if ($row{"Reload_priv"} == "Y") $strPriv .= "Reload ";
if ($row{"Shutdown_priv"} == "Y") $strPriv .= "Shutdown ";
if ($row{"Process_priv"} == "Y") $strPriv .= "Process ";
if ($row{"File_priv"} == "Y") $strPriv .= "File ";
if ($row{"Grant_priv"} == "Y") $strPriv .= "Grant ";
if ($row{"References_priv"} == "Y") $strPriv .= "References ";
if ($row{"Index_priv"} == "Y") $strPriv .= "Index ";
if ($row{"Alter_priv"} == "Y") $strPriv .= "Alter ";
if ($row["Select_priv"] == "Y") $strPriv .= "Select ";
if ($row["Insert_priv"] == "Y") $strPriv .= "Insert ";
if ($row["Update_priv"] == "Y") $strPriv .= "Update ";
if ($row["Delete_priv"] == "Y") $strPriv .= "Delete ";
if ($row["Create_priv"] == "Y") $strPriv .= "Create ";
if ($row["Drop_priv"] == "Y") $strPriv .= "Drop ";
if ($row["Reload_priv"] == "Y") $strPriv .= "Reload ";
if ($row["Shutdown_priv"] == "Y") $strPriv .= "Shutdown ";
if ($row["Process_priv"] == "Y") $strPriv .= "Process ";
if ($row["File_priv"] == "Y") $strPriv .= "File ";
if ($row["Grant_priv"] == "Y") $strPriv .= "Grant ";
if ($row["References_priv"] == "Y") $strPriv .= "References ";
if ($row["Index_priv"] == "Y") $strPriv .= "Index ";
if ($row["Alter_priv"] == "Y") $strPriv .= "Alter ";
if ($strPriv == "") $strPriv = "<font color=\"#002E80\">$strNoPrivileges</font>";
@@ -705,16 +705,16 @@ function table_users($host = false, $user = false)
# Edit
$edit_url = $self;
$edit_url .= "?server=$server&lang=$lang";
$edit_url .= "&edit=1&host=" . urlencode($row{"Host"}) . "&user=" . urlencode($row{"User"});
$edit_url .= "&edit=1&host=" . urlencode($row["Host"]) . "&user=" . urlencode($row["User"]);
# Delete
$delete_url = "$self?$query";
$delete_url .= "&delete=1&confirm=1&delete_host=" . urlencode($row{"Host"}) . "&delete_user=" . urlencode($row{"User"});
$delete_url .= "&delete=1&confirm=1&delete_host=" . urlencode($row["Host"]) . "&delete_user=" . urlencode($row["User"]);
# Grants
$check_url = $self;
$check_url .= "?server=$server&lang=$lang";
$check_url .= "&grants=1&host=" . urlencode($row{"Host"}) . "&user=" . urlencode($row{"User"});
$check_url .= "&grants=1&host=" . urlencode($row["Host"]) . "&user=" . urlencode($row["User"]);
# $check_result = mysql_query("SHOW GRANTS FOR '" . $row{"User"} . "'@'" . $row{"Host"} ."'");
# if (@mysql_num_rows($check_result) == 0) $check_url = ""
@@ -725,9 +725,9 @@ function table_users($host = false, $user = false)
<td><a href="<?php echo $delete_url; ?>"><?php echo $strDelete; ?></a></td>
<td><a href="<?php echo $check_url; ?>"><?php echo $strGrants; ?></a></td>
<!-- <td><a <?php if ($check_url != "") echo "href = \"" . $check_url . "\""; ?>>Grants</a></td> -->
<td><?php echo $row{"Host"}; ?></td>
<td><?php echo $row{"User"} ? "<b>" . $row{"User"}. "</b>" : "<font color=\"#FF0000\">$strAny</font>"; ?></td>
<td><?php echo $row{"Password"} ? $strYes : "<font color=\"#FF0000\">$strNo</font>"; ?></td>
<td><?php echo $row["Host"]; ?></td>
<td><?php echo $row["User"] ? "<b>" . $row["User"]. "</b>" : "<font color=\"#FF0000\">$strAny</font>"; ?></td>
<td><?php echo $row["Password"] ? $strYes : "<font color=\"#FF0000\">$strNo</font>"; ?></td>
<td><?php echo $strPriv; ?></td>
</tr>