Bugfix: corrections de notices php au niveau du panel
This commit is contained in:
parent
a465a09e49
commit
8910c3e604
|
@ -39,6 +39,13 @@ if (!$admin->enabled) {
|
||||||
|
|
||||||
$fields = array (
|
$fields = array (
|
||||||
"canpass" => array ("request", "integer", 1),
|
"canpass" => array ("request", "integer", 1),
|
||||||
|
"login" => array ("request", "string", null),
|
||||||
|
"pass" => array ("request", "string", null),
|
||||||
|
"passconf" => array ("request", "string", null),
|
||||||
|
"notes" => array ("request", "string", null),
|
||||||
|
"nom" => array ("request", "string", null),
|
||||||
|
"prenom" => array ("request", "string", null),
|
||||||
|
"nmail" => array ("request", "string", null),
|
||||||
);
|
);
|
||||||
getFields($fields);
|
getFields($fields);
|
||||||
|
|
||||||
|
@ -47,7 +54,7 @@ getFields($fields);
|
||||||
<hr id="topbar"/>
|
<hr id="topbar"/>
|
||||||
<br />
|
<br />
|
||||||
<?php
|
<?php
|
||||||
if ($error) {
|
if (isset($error) && $error) {
|
||||||
echo "<p class=\"error\">$error</p>";
|
echo "<p class=\"error\">$error</p>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -73,7 +80,7 @@ if ($error) {
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="notes"><?php __("Notes"); ?></label></th>
|
<th><label for="notes"><?php __("Notes"); ?></label></th>
|
||||||
<td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php echo $notes; ?></textarea></td>
|
<td><textarea name="notes" id="notes" class="int" cols="32" rows="5"><?php ehe($notes); ?></textarea></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th>
|
<th><label for="nom"><?php echo _("Surname")."</label> / <label for=\"prenom\">"._("First Name"); ?></label></th>
|
||||||
|
|
|
@ -59,7 +59,7 @@ if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type,
|
||||||
*
|
*
|
||||||
* 1 = force = ne tient pas compte du whois ou des droits de tld
|
* 1 = force = ne tient pas compte du whois ou des droits de tld
|
||||||
*/
|
*/
|
||||||
if (($create_dom == 1) && !is_null($create_dom_list)) {
|
if (isset($create_dom) && ($create_dom == 1) && !is_null($create_dom_list)) {
|
||||||
// make sure we don't have multiple dots there
|
// make sure we don't have multiple dots there
|
||||||
$dom->lock();
|
$dom->lock();
|
||||||
$dom->add_domain($login.".".preg_replace("/^\.\.*/", "", $create_dom_list),1,1,1);
|
$dom->add_domain($login.".".preg_replace("/^\.\.*/", "", $create_dom_list),1,1,1);
|
||||||
|
|
|
@ -50,7 +50,7 @@ if (!$quota->cancreate("dom")) { ?>
|
||||||
<?php
|
<?php
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
if ($error) echo "<p class=\"error\">$error</p>";
|
if (isset($error) && $error) echo "<p class=\"error\">$error</p>";
|
||||||
?>
|
?>
|
||||||
<form method="post" action="dom_doadd.php" id="main">
|
<form method="post" action="dom_doadd.php" id="main">
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -40,7 +40,7 @@ if (!$quota->cancreate("ftp")) {
|
||||||
<hr id="topbar"/>
|
<hr id="topbar"/>
|
||||||
<br />
|
<br />
|
||||||
<?php
|
<?php
|
||||||
if ($error) {
|
if (isset($error) && $error) {
|
||||||
echo "<p class=\"error\">$error</p>";
|
echo "<p class=\"error\">$error</p>";
|
||||||
if ($fatal) {
|
if ($fatal) {
|
||||||
include_once("foot.php");
|
include_once("foot.php");
|
||||||
|
|
|
@ -43,7 +43,6 @@ if (!$id) {
|
||||||
$error=$err->errstr();
|
$error=$err->errstr();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<h3><?php __("Editing an FTP account"); ?></h3>
|
<h3><?php __("Editing an FTP account"); ?></h3>
|
||||||
<?php
|
<?php
|
||||||
|
@ -57,9 +56,9 @@ if (isset($error) && $error) {
|
||||||
<table border="1" cellspacing="0" cellpadding="4">
|
<table border="1" cellspacing="0" cellpadding="4">
|
||||||
<tr><th><input type="hidden" name="id" value="<?php echo $id ?>" />
|
<tr><th><input type="hidden" name="id" value="<?php echo $id ?>" />
|
||||||
<label for="login"><?php __("Username"); ?></label></th><td>
|
<label for="login"><?php __("Username"); ?></label></th><td>
|
||||||
<select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="<?php ehe($r["login"]); ?>" size="20" maxlength="64" />
|
<select class="inl" name="prefixe"><?php $ftp->select_prefix_list($r["prefixe"]); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="<?php ehe($r[0]["login"]); ?>" size="20" maxlength="64" />
|
||||||
</td></tr>
|
</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["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">
|
<script type="text/javascript">
|
||||||
<!--
|
<!--
|
||||||
|
|
|
@ -30,7 +30,10 @@
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
include_once ("head.php");
|
include_once ("head.php");
|
||||||
|
|
||||||
if ($confirm=="y") {
|
if(!isset($error)){
|
||||||
|
$error="";
|
||||||
|
}
|
||||||
|
if (isset($confirm) && $confirm=="y" ) {
|
||||||
reset($_POST);
|
reset($_POST);
|
||||||
while (list($key,$val)=each($_POST)) {
|
while (list($key,$val)=each($_POST)) {
|
||||||
if (substr($key,0,4)=="del_") {
|
if (substr($key,0,4)=="del_") {
|
||||||
|
|
|
@ -93,7 +93,7 @@ for($i=0;$i<count($r);$i++) {
|
||||||
<table class="tedit">
|
<table class="tedit">
|
||||||
<tr><th><?php __("Username"); ?></th><td><code><?php echo $mem->user["login"]; ?></code></td></tr>
|
<tr><th><?php __("Username"); ?></th><td><code><?php echo $mem->user["login"]; ?></code></td></tr>
|
||||||
<tr><th><label for="pass"><?php __("Password"); ?></label></th><td><code><input class="int" type="password" name="pass" id="pass" value="" /></code></td></tr>
|
<tr><th><label for="pass"><?php __("Password"); ?></label></th><td><code><input class="int" type="password" name="pass" id="pass" value="" /></code></td></tr>
|
||||||
<tr><th><?php __("SQL Server"); ?></th><td><code><?php echo $mysql->server; ?></code></td></tr>
|
<tr><th><?php __("SQL Server"); ?></th><td><code><?php echo $L_MYSQL_HOST; ?></code></td></tr>
|
||||||
<tr><th><?php __("Database"); ?></th><td><code><?php echo $mem->user["login"]; ?></code></td></tr>
|
<tr><th><?php __("Database"); ?></th><td><code><?php echo $mem->user["login"]; ?></code></td></tr>
|
||||||
<tr class="trbtn"><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create my main database"); ?>" /></td></tr>
|
<tr class="trbtn"><td colspan="2"><input type="submit" class="inb" name="submit" value="<?php __("Create my main database"); ?>" /></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -47,7 +47,7 @@ if (!$quota->cancreate("mysql_users")) {
|
||||||
<hr id="topbar"/>
|
<hr id="topbar"/>
|
||||||
<br />
|
<br />
|
||||||
<?php
|
<?php
|
||||||
if ($error) {
|
if (isset($error) && $error) {
|
||||||
echo "<p class=\"error\">$error</p>";
|
echo "<p class=\"error\">$error</p>";
|
||||||
if ($fatal) {
|
if ($fatal) {
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -28,8 +28,10 @@
|
||||||
----------------------------------------------------------------------
|
----------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
|
if(!isset($error)){
|
||||||
if ($confirm=="y") {
|
$error="";
|
||||||
|
}
|
||||||
|
if (isset($confirm) && ($confirm=="y")) {
|
||||||
reset($_POST);
|
reset($_POST);
|
||||||
while (list($key,$val)=each($_POST)) {
|
while (list($key,$val)=each($_POST)) {
|
||||||
if (substr($key,0,4)=="del_") {
|
if (substr($key,0,4)=="del_") {
|
||||||
|
|
|
@ -1224,8 +1224,6 @@ EOF;
|
||||||
|
|
||||||
if (!$pol["allowlogin"]) {
|
if (!$pol["allowlogin"]) {
|
||||||
// We do misc check on password versus login :
|
// We do misc check on password versus login :
|
||||||
$l2=str_replace("_","@",$l2);
|
|
||||||
$l2=str_replace(".","@",$l2);
|
|
||||||
$logins=explode("@",$login);
|
$logins=explode("@",$login);
|
||||||
$logins[]=$login;
|
$logins[]=$login;
|
||||||
foreach($logins as $l) {
|
foreach($logins as $l) {
|
||||||
|
|
|
@ -119,18 +119,19 @@ class m_ftp {
|
||||||
$db->query("SELECT id, name, homedir FROM ftpusers WHERE uid='$cuid' AND id='$id';");
|
$db->query("SELECT id, name, homedir FROM ftpusers WHERE uid='$cuid' AND id='$id';");
|
||||||
if ($db->num_rows()) {
|
if ($db->num_rows()) {
|
||||||
$db->next_record();
|
$db->next_record();
|
||||||
$tr=preg_match("/^\/var\/alternc\/html\/.\/[^\/]*\/(.*)$/", $db->f("homedir"),$match); /*"*/
|
$tr=preg_match("/^\/var\/alternc\/html\/.\/[^\/]*\/(.*)$/", $db->f("homedir"),$match);
|
||||||
$lg=explode("_",$db->f("name"));
|
$lg=explode("_",$db->f("name"));
|
||||||
if (!is_array($lg)) {
|
if ((!is_array($lg)) || (count($lg)!=2)) {
|
||||||
$lg[0]=$db->f("name");
|
$lg[0]=$db->f("name");
|
||||||
$lg[1]="";
|
$lg[1]="";
|
||||||
}
|
}
|
||||||
return array(
|
$r[]=array(
|
||||||
"id"=>$db->f("id"),
|
"id"=>$db->f("id"),
|
||||||
"prefixe"=> $lg[0],
|
"prefixe"=> $lg[0],
|
||||||
"login"=>$lg[1],
|
"login"=>$lg[1],
|
||||||
"dir"=>$match[1]
|
"dir"=>$match[1]
|
||||||
);
|
);
|
||||||
|
return $r;
|
||||||
} else {
|
} else {
|
||||||
$err->raise("ftp",2);
|
$err->raise("ftp",2);
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -97,9 +97,15 @@ class m_mail {
|
||||||
global $db,$err,$cuid;
|
global $db,$err,$cuid;
|
||||||
$err->log("mail","enum_domains_mail");
|
$err->log("mail","enum_domains_mail");
|
||||||
$db->query("select * from address where domain_id=$dom_id order by address asc;");
|
$db->query("select * from address where domain_id=$dom_id order by address asc;");
|
||||||
|
if (!$db->num_rows()) {
|
||||||
|
//TODO verifier numero erreur
|
||||||
|
$err->raise("mysql",19);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
while($db->next_record()){
|
while($db->next_record()){
|
||||||
$this->enum_domain_mails[]=$db->Record;
|
$this->enum_domain_mails[]=$db->Record;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->enum_domain_mails;
|
return $this->enum_domain_mails;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,7 +385,6 @@ class m_mail {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} /* Class m_mail */
|
} /* Class m_mail */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue