Little changes to test PHP analyser
This commit is contained in:
parent
7aa7aa7907
commit
c564af24db
|
@ -60,8 +60,8 @@ class m_mailman {
|
||||||
## when raising an error, use the following syntax ##
|
## when raising an error, use the following syntax ##
|
||||||
$err->raise("classname",_("text in english"));
|
$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 ?> */
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
include("/usr/share/alternc/panel/class/config_nochk.php");
|
include("/usr/share/alternc/panel/class/config_nochk.php");
|
||||||
|
|
||||||
$db->query("SELECT id,hostname FROM aws;");
|
$db->query("SELECT id,hostname FROM aws;");
|
||||||
|
$d=array();
|
||||||
while ($db->next_record()) {
|
while ($db->next_record()) {
|
||||||
$d[]=$db->Record;
|
$d[]=$db->Record;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,32 @@
|
||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
AlternC - Web Hosting System
|
AlternC - Web Hosting System
|
||||||
Copyright (C) 2000-2012 by the AlternC Development Team.
|
Copyright (C) 2000-2012 by the AlternC Development Team.
|
||||||
https://alternc.org/
|
https://alternc.org/
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
LICENSE
|
LICENSE
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License (GPL)
|
modify it under the terms of the GNU General Public License (GPL)
|
||||||
as published by the Free Software Foundation; either version 2
|
as published by the Free Software Foundation; either version 2
|
||||||
of the License, or (at your option) any later version.
|
of the License, or (at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
To read the license please visit http://www.gnu.org/copyleft/gpl.html
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
Purpose of file: Edit a statistic set
|
Purpose of file: Edit a statistic set
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
|
|
||||||
$fields = array (
|
$fields = array (
|
||||||
"id" => array ("request", "integer", 0),
|
"id" => array ("request", "integer", 0),
|
||||||
);
|
);
|
||||||
getFields($fields);
|
getFields($fields);
|
||||||
|
|
||||||
if (!$id) {
|
if (!$id) {
|
||||||
|
@ -35,15 +35,15 @@ if (!$id) {
|
||||||
$r=$aws->get_stats_details($id);
|
$r=$aws->get_stats_details($id);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
$error=$err->errstr();
|
$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");
|
include("aws_add.php");
|
||||||
exit();
|
exit();
|
||||||
|
|
||||||
|
|
|
@ -49,6 +49,7 @@ if (!$id && !$create) {
|
||||||
|
|
||||||
if (!$id && $create) { //creation
|
if (!$id && $create) { //creation
|
||||||
echo "<h3>"._("Create a FTP account")."</h3>";
|
echo "<h3>"._("Create a FTP account")."</h3>";
|
||||||
|
$rr=false;
|
||||||
} else {
|
} else {
|
||||||
echo "<h3>"._("Editing a FTP account")."</h3>";
|
echo "<h3>"._("Editing a FTP account")."</h3>";
|
||||||
$rr=$ftp->get_ftp_details($id);
|
$rr=$ftp->get_ftp_details($id);
|
||||||
|
|
|
@ -148,17 +148,19 @@ $lac = $authip->list_affected();
|
||||||
foreach($list_ip as $i) {
|
foreach($list_ip as $i) {
|
||||||
if (checkip($i['ip'])) {
|
if (checkip($i['ip'])) {
|
||||||
if ($i['subnet']==32) {
|
if ($i['subnet']==32) {
|
||||||
$txt="Address IPv4";
|
$txt=_("Address IPv4");
|
||||||
} else {
|
} else {
|
||||||
$txt="Subnet IPv4";
|
$txt=_("Subnet IPv4");
|
||||||
}
|
}
|
||||||
} elseif (checkipv6($i['ip'])) {
|
} elseif (checkipv6($i['ip'])) {
|
||||||
if ($i['subnet']==128) {
|
if ($i['subnet']==128) {
|
||||||
$txt="Address IPv6";
|
$txt=_("Address IPv6");
|
||||||
} else {
|
} 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>";
|
echo "<tr class='lst' ><td>{$i['infos']}</td><td>{$i['ip_human']}</td><td>$txt</td>";
|
||||||
?>
|
?>
|
||||||
<td><div class="ina edit"><a href="javascript:edit_ip(<?php echo "'".htmlentities($i['id'])."','".htmlentities($i['ip_human'])."','".htmlentities($i['infos'])."'"; ?>);"><?php __("Edit"); ?></a></div></td>
|
<td><div class="ina edit"><a href="javascript:edit_ip(<?php echo "'".htmlentities($i['id'])."','".htmlentities($i['ip_human'])."','".htmlentities($i['infos'])."'"; ?>);"><?php __("Edit"); ?></a></div></td>
|
||||||
|
|
Loading…
Reference in New Issue