Bugfixing panel + petite correction makefile

This commit is contained in:
Steven Mondji-Lerider 2012-06-25 07:59:29 +00:00
parent 851beb3244
commit 7371bcd553
7 changed files with 18 additions and 12 deletions

View File

@ -34,7 +34,7 @@ if (!$admin->enabled) {
exit();
}
if($_POST["del_confirm"] == "y"){
if(isset($_POST["del_confirm"]) && $_POST["del_confirm"] == "y"){
if (!is_array($d)) {
$d[]=$d;
}
@ -46,9 +46,9 @@ if($_POST["del_confirm"] == "y"){
exit();
}
if (!($u=$admin->get($val)) || !$admin->del_mem($val)) {
$error.=sprintf(_("Member '%s' does not exist"),$val)."<br />";
$error=sprintf(_("Member '%s' does not exist"),$val)."<br />";
} else {
$error.=sprintf(_("Member %s successfully deleted"),$u["login"])."<br />";
$error=sprintf(_("Member %s successfully deleted"),$u["login"])."<br />";
}
}
include("adm_list.php");

View File

@ -76,7 +76,7 @@ $brlist=array(); /* Liste des dossiers ... */
$maxlevel=0;
if ($select) {
if (isset($select) && $select) {
/* Go ahead, let's send the javascript ...*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">

View File

@ -39,7 +39,7 @@ include_once("head.php");
<hr id="topbar"/>
<br />
<?php
if ($error) {
if (isset($error) && $error) {
echo "<p class=\"error\">$error</p>";
include_once("foot.php");
exit();
@ -51,7 +51,7 @@ include_once("head.php");
<label for="hostname"><?php __("Domain name:"); ?></label></th><td>
<select class="inl" name="hostname" id="hostname"><?php $sta2->select_host_list($hostname); ?></select>
</td></tr>
<tr><th><label for="dir"><?php __("Folder where we will put the log file:"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="<?php ehe($dir); ?>" size="20" maxlength="255" />
<tr><th><label for="dir"><?php __("Folder where we will put the log file:"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="" size="20" maxlength="255" />
<script type="text/javascript">
<!--
document.write("&nbsp;<input type=\"button\" name=\"bff\" class=\"bff\" onclick=\"browseforfolder('main.dir');\" value=\" <?php __("Choose a folder..."); ?> \" />");

View File

@ -42,7 +42,7 @@ include_once("head.php");
</p>
<?php }
if ($error) {
if (isset($error) && $error) {
echo "<p class=\"error\">$error</p>";
}

View File

@ -406,11 +406,17 @@ class m_dom {
$domshort=str_replace("-","",str_replace(".","",$domain));
if (! is_dir($dest_root . "/". $domshort)) {
mkdir($dest_root . "/". $domshort);
if(!mkdir($dest_root . "/". $domshort)){
$err->raise("dom",1);
return false;
}
}
if (! is_dir($dest_root . "/tmp")) {
mkdir($dest_root . "/tmp");
if(!mkdir($dest_root . "/tmp")){
$err->raise("dom",1);
return false;
}
}
//on corrige les permissions

View File

@ -117,7 +117,7 @@ class m_sta2 {
$t[]=$db->f("hostname");
}
// on détruit les jeux de stats associés au préfixe correspondant :
for($i=0;$i<cnt;$i++) {
for($i=0;$i<$cnt;$i++) {
$db->query("DELETE FROM stats2 WHERE mid='$cuid' AND hostname='".$t[$i]."';");
}
return true;

View File

@ -25,7 +25,7 @@
# Purpose of file: Makefile des binaires de /usr/lib/alternc
# ----------------------------------------------------------------------
#
SETUID=mail_add mail_del quota_edit quota_get mem_add mem_del
SETUID=mail_add mail_del quota_edit quota_get mem_add mem_del du.pl
SCRIPTS=sqlbackup.sh rawstat.daily quota_init quota_delete update_domains.sh slave_dns sendmail spoolsize.php fixperms.sh alternc-dboptimize export_account.php cron_users_doit.sh cron_users.sh
LIBS=functions.sh functions_hosting.sh functions_dns.sh
BIN=$(DESTDIR)/usr/lib/alternc/
@ -34,6 +34,6 @@ install:
# Group 1999 references alterncpanel
chown root:1999 $(BIN)
chmod 755 $(BIN)
install -o root -g 1999 -m4750 $(SETUID) du.pl $(BIN)
install -o root -g 1999 -m4750 $(SETUID) $(BIN)
install -o root -g 1999 -m0750 $(SCRIPTS) $(BIN)
install -o root -g 1999 -m0644 $(LIBS) $(BIN)