Bugfixes niveau panel, correction notices PHP
This commit is contained in:
parent
da002cf69f
commit
3d2c9b72b7
|
@ -32,7 +32,7 @@ $list_ip = $authip->list_ip_whitelist();
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
|
||||
<?php if ($error) { ?>
|
||||
<?php if (isset($error) && $error) { ?>
|
||||
<p class="error"><?php echo $error ?></p>
|
||||
<?php } ?>
|
||||
<center>
|
||||
|
|
|
@ -43,7 +43,7 @@ include_once ("head.php");
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
|
@ -93,11 +93,13 @@ foreach($qlist as $type => $q) {
|
|||
foreach($q as $name => $value) {
|
||||
$key = $type . ":" . $name;
|
||||
$col=3-$col;
|
||||
//TODO fix notice
|
||||
?>
|
||||
|
||||
<tr class="lst<?php echo $col; ?>">
|
||||
<td><label for="<?php echo $key; ?>"><?php echo $qarray[$name]; ?></label></td>
|
||||
<td><label for="<?php echo $key; ?>"><?php $name= ($name=="stats")? 'sta2': $name ;echo $qarray[$name]= ($qarray[$name]=="quota_sta2") ? 'quota_stats': $qarray[$name] ; ?></label></td>
|
||||
<td><input type="text" class="int" size="16" maxlength="16" name="<?php echo $key; ?>" id="<?php echo $name; ?>" value="<?php ehe($value); ?>" /></td></tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -41,7 +41,7 @@ include_once("head.php");
|
|||
<hr id="topbar" />
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,6 @@ $db->query("select sd.compte, m.login, sd.domaine, if(length(sub)>0,concat_ws('.
|
|||
|
||||
while($db->next_record()) {
|
||||
++$pair;
|
||||
print_r($d);
|
||||
?>
|
||||
<tr class="lst<?php echo $pair%2+1 ?>">
|
||||
<td><?php echo $db->f('compte');?></td>
|
||||
|
|
|
@ -46,7 +46,7 @@ if($_POST["action"] == "add") {
|
|||
}
|
||||
include("adm_defquotas.php");
|
||||
} else if($_POST["action"] == "delete") {
|
||||
if($_POST["del_confirm"] == "y"){
|
||||
if(@$_POST["del_confirm"] == "y"){
|
||||
if($_POST['type']) {
|
||||
if($quota->deltype($_POST['type'])) {
|
||||
$error=_("Account type"). " \"$type\" "._("deleted");
|
||||
|
|
|
@ -39,13 +39,14 @@ include_once ("head.php");
|
|||
?>
|
||||
<h3><?php __("Manage installed domains"); ?></h3>
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
// List the domains. If the first parameter is true, also check their DNS & other IPs actual parameters.
|
||||
// If the second parameter is true, check the domains whatever the dis cache is.
|
||||
$forcecheck=($_REQUEST["force"]!="");
|
||||
|
||||
$forcecheck=@($_REQUEST["force"]!="");
|
||||
$c=$admin->dom_list(true,$forcecheck);
|
||||
|
||||
?>
|
||||
|
|
|
@ -50,14 +50,14 @@ include_once("head.php");
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
$c=$admin->listPasswordPolicies();
|
||||
//echo "<pre>"; print_r($c); echo "</pre>";
|
||||
|
||||
if ($doedit) {
|
||||
if (isset($doedit) && $doedit) {
|
||||
if (!$c[$doedit]) {
|
||||
echo "<p class=\"error\">"._("Policy not found")."</p>";
|
||||
} else {
|
||||
|
|
|
@ -63,7 +63,7 @@ include_once ("head.php");
|
|||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ include_once("head.php");
|
|||
<hr id="topbar" />
|
||||
<br />
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
}
|
||||
|
||||
|
|
|
@ -35,11 +35,11 @@ $texte=ssla($texte);
|
|||
$R=$bro->convertabsolute($R,1);
|
||||
$p=$bro->GetPrefs();
|
||||
|
||||
if ($cancel) {
|
||||
if (isset($cancel) && $cancel) {
|
||||
include("bro_main.php");
|
||||
exit();
|
||||
}
|
||||
if ($saveret) {
|
||||
if (isset($saveret) && $saveret) {
|
||||
if ($bro->Save($editfile,$R,$texte)) {
|
||||
$error=sprintf(_("Your file %s has been saved"),$editfile)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
|
||||
} else {
|
||||
|
@ -48,7 +48,7 @@ if ($saveret) {
|
|||
include("bro_main.php");
|
||||
exit();
|
||||
}
|
||||
if ($save) {
|
||||
if (isset($save) && $save) {
|
||||
if ($bro->Save($editfile,$R,$texte)) {
|
||||
$error=sprintf(_("Your file %s has been saved"),$editfile)." (".format_date('%3$d-%2$d-%1$d %4$d:%5$d',date("Y-m-d H:i:s")).")";
|
||||
} else {
|
||||
|
@ -60,7 +60,7 @@ include_once("head.php");
|
|||
|
||||
?>
|
||||
<p>
|
||||
<?php if ($error) echo "<p class=\"error\">$error</p>"; ?>
|
||||
<?php if (isset($error) && $error) echo "<p class=\"error\">$error</p>"; ?>
|
||||
<?php echo _("File editing")." <code>$R/<b>$editfile</b></code><br />"; ?>
|
||||
</p>
|
||||
<form action="bro_editor.php" method="post"><br />
|
||||
|
|
|
@ -72,11 +72,11 @@ if (isset($formu) && $formu) {
|
|||
break;
|
||||
case 2: // act vaut Supprimer Copier ou Renommer.
|
||||
if ($actdel) {
|
||||
if ($del_confirm != "") {
|
||||
if (isset($del_confirm) && $del_confirm != "") {
|
||||
if (!$bro->DeleteFile($d,$R)) {
|
||||
$error = $err->errstr();
|
||||
}
|
||||
} elseif (!$cancel && is_array($d)) {
|
||||
} elseif (!isset($cancel) && is_array($d)) {
|
||||
include_once("head.php");
|
||||
?>
|
||||
<h3><?php printf(_("Deleting files and/or directories")); ?> : </h3>
|
||||
|
@ -122,7 +122,7 @@ if (isset($formu) && $formu) {
|
|||
}
|
||||
break;
|
||||
case 7: // Changement de permissions [ML]
|
||||
if (!$bro->ChangePermissions($R, $d, $perm)) {
|
||||
if (!@$bro->ChangePermissions($R, $d, $perm)) {
|
||||
$error = $err->errstr();
|
||||
}
|
||||
break;
|
||||
|
@ -198,7 +198,7 @@ if ($c===false) $error=$err->errstr();
|
|||
|
||||
<?php
|
||||
/* Renommer / Copier / Déplacer les fichiers : */
|
||||
if (isset($formu) && $formu==2 && $actrename && count($d)) {
|
||||
if (isset($formu) && $formu==2 && isset($actrename) && $actrename && count($d)) {
|
||||
echo "<table cellpadding=\"6\">\n";
|
||||
echo "<form action=\"bro_main.php\" method=\"post\">\n";
|
||||
echo "<input type=\"hidden\" name=\"R\" value=\"$R\" />\n";
|
||||
|
@ -215,7 +215,7 @@ if (isset($formu) && $formu==2 && $actrename && count($d)) {
|
|||
}
|
||||
|
||||
/* [ML] Changer les permissions : */
|
||||
if (isset($formu) && $formu==2 && $_REQUEST['actperms'] && count($d)) {
|
||||
if (isset($formu) && $formu==2 && isset($_REQUEST['actperms']) && $_REQUEST['actperms'] && count($d)) {
|
||||
echo "<form action=\"bro_main.php\" method=\"post\">\n";
|
||||
echo "<input type=\"hidden\" name=\"R\" value=\"$R\" />\n";
|
||||
echo "<input type=\"hidden\" name=\"formu\" value=\"7\" />\n";
|
||||
|
|
|
@ -38,7 +38,7 @@ include_once("head.php");
|
|||
<?php __("Enter the name of the folder you want to protect. It must already exists."); ?>
|
||||
</p>
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p>";
|
||||
include_once("foot.php");
|
||||
exit;
|
||||
|
@ -48,7 +48,7 @@ include_once("head.php");
|
|||
<table border="1" cellspacing="0" cellpadding="4">
|
||||
<tr>
|
||||
<td><label for="dir"><?php __("Folder"); ?></label></td>
|
||||
<td><input type="text" class="int" name="dir" id="dir" value="<?php ehe($dir); ?>" maxlength="255" />
|
||||
<td><input type="text" class="int" name="dir" id="dir" value="<?php (isset($dir)) ? : $dir="";ehe($dir); ?>" maxlength="255" />
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.dir');\" value=\" <?php __("Choose a folder..."); ?> \" class=\"bff\">");
|
||||
|
|
|
@ -31,7 +31,7 @@ require_once("../class/config.php");
|
|||
|
||||
include_once("head.php");
|
||||
|
||||
if ($help_setting) {
|
||||
if (isset($help_setting) && $help_setting) {
|
||||
$mem->set_help_param($showhelp);
|
||||
$error=_("Your help setting has been updated.");
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ if ($help_setting) {
|
|||
?>
|
||||
<div align="center"><h3><?php __("Settings of your account"); ?></h3></div>
|
||||
<?php
|
||||
if ($error) {
|
||||
if (isset($error) && $error) {
|
||||
echo "<font color=red>$error</font>";
|
||||
include_once("foot.php");
|
||||
exit();
|
||||
|
@ -60,9 +60,9 @@ if (!$mem->user["canpass"]) {
|
|||
</p>
|
||||
<form method="post" action="mem_passwd.php" name="main" id="main">
|
||||
<table border="1" cellspacing="0" cellpadding="4">
|
||||
<tr><th><?php __("Old password"); ?></th><td><input type="password" class="int" name="oldpass" value="<?php echo $oldpass; ?>" size="20" maxlength="128" /></td></tr>
|
||||
<tr><th><?php __("New password"); ?> (1)</th><td><input type="password" class="int" name="newpass" value="<?php echo $newpass; ?>" size="20" maxlength="60" /></td></tr>
|
||||
<tr><th><?php __("New password"); ?> (2)</th><td><input type="password" class="int" name="newpass2" value="<?php echo $newpass2; ?>" size="20" maxlength="61" /></td></tr>
|
||||
<tr><th><?php __("Old password"); ?></th><td><input type="password" class="int" name="oldpass" value="<?php isset($oldpass) ? : $oldpass=""; echo $oldpass; ?>" size="20" maxlength="128" /></td></tr>
|
||||
<tr><th><?php __("New password"); ?> (1)</th><td><input type="password" class="int" name="newpass" value="<?php isset($newpass) ? : $newpass=""; echo $newpass; ?>" size="20" maxlength="60" /></td></tr>
|
||||
<tr><th><?php __("New password"); ?> (2)</th><td><input type="password" class="int" name="newpass22" value="<?php isset($newpass2) ? : $newpass2=""; echo $newpass2;?>" size="20" maxlength="61" /></td></tr>
|
||||
<tr class="trbtn"><td colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Change my password"); ?>" /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
@ -74,7 +74,7 @@ if (!$mem->user["canpass"]) {
|
|||
<tr><td colspan="2"><?php __("Change the email of the account"); ?><br />
|
||||
<?php __("help_chg_mail"); ?></td></tr>
|
||||
<tr><th><?php __("Current mailbox"); ?></th><td><big><code><?php echo $mem->user["mail"]; ?></code></big></td></tr>
|
||||
<tr><th><?php __("New mailbox"); ?></th><td><input type="text" class="int" name="newmail" value="<?php echo $newmail; ?>" size="40" maxlength="128" /></td></tr>
|
||||
<tr><th><?php __("New mailbox"); ?></th><td><input type="text" class="int" name="newmail" value="<?php isset($newmail) ? : $newmail=""; echo $newmail;?>" size="40" maxlength="128" /></td></tr>
|
||||
<tr class="trbtn"><td colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("Change my email address"); ?>" /></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
|
|
|
@ -86,9 +86,9 @@ if (!defined("QUOTASONE")) return;
|
|||
$pc=intval(100*$ds/$totaldb);
|
||||
else
|
||||
$pc=0;
|
||||
if ($mode==0) {
|
||||
if (isset($mode) && $mode==0) {
|
||||
echo sprintf("%.1f", $ds / 1024/1024)." "._("MB");
|
||||
} elseif ($mode==1) {
|
||||
} elseif (isset($mode) &&$mode==1) {
|
||||
echo sprintf("%.1f", $pc)." %";
|
||||
} else {
|
||||
echo "<img src=\"hippo_bleue.gif\" style=\"width: ".(2*$pc)."px; height: 16px\" alt=\"".$pc."%\" title=\"".$pc."%\"/>";
|
||||
|
|
|
@ -414,7 +414,7 @@ class m_dom {
|
|||
}
|
||||
|
||||
//on corrige les permissions
|
||||
exec("sudo /usr/lib/alternc/fixperms.sh -u ".$uid);
|
||||
exec("sudo /usr/lib/alternc/fixperms.sh -u ".$cuid);
|
||||
|
||||
// Creation des 3 sous-domaines par défaut : Vide, www et mail
|
||||
$this->set_sub_domain($domain, '', $this->type_url, 'http://www.'.$domain);
|
||||
|
|
Loading…
Reference in New Issue