Little changes to test PHP analyser

This commit is contained in:
Alan Garcia 2014-03-20 09:35:11 +00:00
parent 7aa7aa7907
commit c564af24db
5 changed files with 38 additions and 34 deletions

View File

@ -60,8 +60,8 @@ class m_mailman {
## when raising an error, use the following syntax ##
$err->raise("classname",_("text in english"));
}
## at the end of a php-only file, we don't put a ?> ##
}
/* at the end of a php-only file, we don't put a ?> */
?>

View File

@ -4,6 +4,7 @@
include("/usr/share/alternc/panel/class/config_nochk.php");
$db->query("SELECT id,hostname FROM aws;");
$d=array();
while ($db->next_record()) {
$d[]=$db->Record;
}

View File

@ -21,12 +21,12 @@
----------------------------------------------------------------------
Purpose of file: Edit a statistic set
----------------------------------------------------------------------
*/
*/
require_once("../class/config.php");
$fields = array (
"id" => array ("request", "integer", 0),
);
);
getFields($fields);
if (!$id) {
@ -35,15 +35,15 @@ if (!$id) {
$r=$aws->get_stats_details($id);
if (!$r) {
$error=$err->errstr();
} else {
$id=$r["id"];
$hostname=$r["hostname"];
$awsusers=$r["users"];
$hostaliases=$r["hostaliases"];
$public=$r["public"];
}
}
$id=$r["id"];
$hostname=$r["hostname"];
$awsusers=$r["users"];
$hostaliases=$r["hostaliases"];
$public=$r["public"];
include("aws_add.php");
exit();

View File

@ -49,6 +49,7 @@ if (!$id && !$create) {
if (!$id && $create) { //creation
echo "<h3>"._("Create a FTP account")."</h3>";
$rr=false;
} else {
echo "<h3>"._("Editing a FTP account")."</h3>";
$rr=$ftp->get_ftp_details($id);

View File

@ -148,16 +148,18 @@ $lac = $authip->list_affected();
foreach($list_ip as $i) {
if (checkip($i['ip'])) {
if ($i['subnet']==32) {
$txt="Address IPv4";
$txt=_("Address IPv4");
} else {
$txt="Subnet IPv4";
$txt=_("Subnet IPv4");
}
} elseif (checkipv6($i['ip'])) {
if ($i['subnet']==128) {
$txt="Address IPv6";
$txt=_("Address IPv6");
} else {
$txt="Subnet IPv6";
$txt=_("Subnet IPv6");
}
} else {
$txt=_("Error with this IP");
}
echo "<tr class='lst' ><td>{$i['infos']}</td><td>{$i['ip_human']}</td><td>$txt</td>";
?>