debug supression des bdd, step1

This commit is contained in:
Benjamin Sonntag 2010-11-18 09:12:55 +00:00
parent 9f980cec02
commit c9f00b1db3
4 changed files with 5 additions and 5 deletions

View File

@ -68,7 +68,7 @@ if (!($u=$admin->add_mem($login, $pass, $nom, $prenom, $nmail, $canpass, $type,
$ftp->add_ftp($login,"",$pass,"/");
$mem->unsu();
$error=_("The new member has been successfully created");
$error=_("The new member has been successfully created");
include("adm_list.php");
exit;

View File

@ -35,7 +35,7 @@ if ($confirm=="y") {
while (list($key,$val)=each($_POST)) {
if (substr($key,0,4)=="del_") {
// Effacement de la base $val
$r=$mysql->del_db($val);
$r=$mysql->del_db(substr($key,4));
if (!$r) {
$error.=$err->errstr()."<br />";
} else {
@ -48,7 +48,7 @@ if ($confirm=="y") {
}
$found=false;
foreach($_POST as $k) {
foreach($_POST as $key=>$val) {
if (substr($key,0,4)=="del_") {
$found=true;
}

View File

@ -58,7 +58,7 @@ for($i=0;$i<count($r);$i++) {
$col=3-$col;
?>
<tr class="lst<?php echo $col; ?>">
<td align="center"><input type="checkbox" class="inc" id="del_<?php echo $val["name"]; ?>" name="del_<?php echo $val["name"]; ?>" value="<?php echo $val["name"]; ?>" /></td>
<td align="center"><input type="checkbox" class="inc" id="del_<?php echo $val["name"]; ?>" name="del_<?php echo $val["name"]; ?>" value="<?php echo ($val["name"])?$val["name"]:"_"; ?>" /></td>
<td><label for="del_<?php echo $val["name"]; ?>"><?php echo $val["db"]; ?></label></td>
<td><div class="ina"><a href="sql_bck.php?id=<?php echo $val["name"] ?>"><?php __("Backup"); ?></a></div></td>
<td><div class="ina"><a href="sql_restore.php?id=<?php echo $val["name"] ?>"><?php __("Restore"); ?></a></div></td>

View File

@ -329,7 +329,7 @@ class m_mysql {
// OK, creation now...
$db->query("INSERT INTO db (uid,login,pass,db) VALUES ('$cuid','".$login."','$password','".$dbname."');");
// give everything but GRANT on $user.*
$db->query("GRANT ALL PRIVILEGES ON `".$dbname."`.* TO '".$login."'@'$this->client' IDENTIFIED BY '".$password."'");
$db->query("GRANT ALL PRIVILEGES ON `".$dbname."`.* TO '".$login."'@'$this->client' IDENTIFIED BY '".addslashes($password)."'");
$db->query("CREATE DATABASE `".$dbname."`;");
return true;
}