fixing quote + doms + roundcube & squirrelmail's quoting using PDO
This commit is contained in:
parent
b6eb1e668c
commit
8392c1d84f
|
@ -78,9 +78,9 @@ for($i=0;$i<count($c);$i++) {
|
||||||
<td><?php if ($c[$i]["noerase"]) {
|
<td><?php if ($c[$i]["noerase"]) {
|
||||||
echo "<img src=\"icon/encrypted.png\" width=\"16\" height=\"16\" alt=\""._("Locked Domain")."\" />";
|
echo "<img src=\"icon/encrypted.png\" width=\"16\" height=\"16\" alt=\""._("Locked Domain")."\" />";
|
||||||
} ?></td>
|
} ?></td>
|
||||||
<td><div class="ina"><a href="adm_domlock.php?domain=<?php echo urlencode($c[$i][domaine]); ?>"><?php
|
<td><div class="ina"><a href="adm_domlock.php?domain=<?php echo urlencode($c[$i]["domaine"]); ?>"><?php
|
||||||
if ($c[$i]["noerase"]) __("Unlock"); else __("Lock"); ?></a></div></td>
|
if ($c[$i]["noerase"]) __("Unlock"); else __("Lock"); ?></a></div></td>
|
||||||
<td><a href="http://<?php echo $c[$i][domaine]; ?>" target="_blank"><?php echo $c[$i]["domaine"]; ?></a></td>
|
<td><a href="http://<?php echo $c[$i]["domaine"]; ?>" target="_blank"><?php echo $c[$i]["domaine"]; ?></a></td>
|
||||||
<td><?php echo $c[$i]["login"]; ?></td>
|
<td><?php echo $c[$i]["login"]; ?></td>
|
||||||
<td>
|
<td>
|
||||||
<?php if($admin->checkcreator($c[$i]['uid'])) {
|
<?php if($admin->checkcreator($c[$i]['uid'])) {
|
||||||
|
|
|
@ -257,7 +257,7 @@ class m_quota {
|
||||||
// We check that this ressource exists for this client :
|
// We check that this ressource exists for this client :
|
||||||
$db->query("SELECT * FROM quotas WHERE uid= ? AND name= ? ", array($cuid, $ressource));
|
$db->query("SELECT * FROM quotas WHERE uid= ? AND name= ? ", array($cuid, $ressource));
|
||||||
if ($db->num_rows()) {
|
if ($db->num_rows()) {
|
||||||
$db->query("UPDATE quotas SET total= e WHERE uid= ? AND name= ?;", array($size, $cuid, $ressource));
|
$db->query("UPDATE quotas SET total= ? WHERE uid= ? AND name= ?;", array($size, $cuid, $ressource));
|
||||||
} else {
|
} else {
|
||||||
$db->query("INSERT INTO quotas (uid,name,total) VALUES (?, ?, ?);", array($cuid, $ressource, $size));
|
$db->query("INSERT INTO quotas (uid,name,total) VALUES (?, ?, ?);", array($cuid, $ressource, $size));
|
||||||
}
|
}
|
||||||
|
|
|
@ -6090,7 +6090,7 @@ msgstr "Quotas du compte AlternC"
|
||||||
#: ../class/m_quota.php:78
|
#: ../class/m_quota.php:78
|
||||||
#, php-format
|
#, php-format
|
||||||
msgid "%s%% of %s"
|
msgid "%s%% of %s"
|
||||||
msgstr "%s% de %s"
|
msgstr "%s%% de %s"
|
||||||
|
|
||||||
#: ../class/m_quota.php:78 ../class/m_quota.php:106 ../class/m_quota.php:197
|
#: ../class/m_quota.php:78 ../class/m_quota.php:106 ../class/m_quota.php:197
|
||||||
msgid "quota_"
|
msgid "quota_"
|
||||||
|
|
|
@ -45,7 +45,7 @@ class m_roundcube {
|
||||||
if (count($expl)>=2) {
|
if (count($expl)>=2) {
|
||||||
list($host,$dompart)=$expl;
|
list($host,$dompart)=$expl;
|
||||||
// We search for a 'squirrelmail' subdomain in that domain
|
// We search for a 'squirrelmail' subdomain in that domain
|
||||||
$db->query("SELECT * FROM sub_domaines s WHERE s.domaine='".addslashes($dompart)."' AND s.type='roundcube';");
|
$db->query("SELECT * FROM sub_domaines s WHERE s.domaine=? AND s.type='roundcube';",array($dompart));
|
||||||
if ($db->next_record()) {
|
if ($db->next_record()) {
|
||||||
$domain=$db->Record;
|
$domain=$db->Record;
|
||||||
return "http://".$domain["sub"].(($domain["sub"])?".":"").$domain["domaine"];
|
return "http://".$domain["sub"].(($domain["sub"])?".":"").$domain["domaine"];
|
||||||
|
@ -97,17 +97,17 @@ class m_roundcube {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$req = $dbh->query("SELECT user_id FROM users WHERE username = '$fullmail'");
|
$req = $dbh->query("SELECT user_id FROM users WHERE username = ?;",array($fullmail));
|
||||||
|
|
||||||
foreach ( $req->fetchAll() as $t ) {
|
foreach ( $req->fetchAll() as $t ) {
|
||||||
if (empty($t['user_id'])) continue ;
|
if (empty($t['user_id'])) continue ;
|
||||||
$rcuser_id=$t['user_id'];
|
$rcuser_id=$t['user_id'];
|
||||||
|
|
||||||
$dbh->query("DELETE from contactgroupmembers where contactgroup_id in (select contactgroup_id from contactgroups where user_id = $rcuser_id) ; ");
|
$dbh->query("DELETE from contactgroupmembers where contactgroup_id in (select contactgroup_id from contactgroups where user_id = ?) ; ",array($rcuser_id));
|
||||||
$dbh->query("DELETE from contactgroups where user_id = $rcuser_id ; ");
|
$dbh->query("DELETE from contactgroups where user_id = ? ; ",array($rcuser_id));
|
||||||
$dbh->query("DELETE from contacts where user_id = $rcuser_id ; ");
|
$dbh->query("DELETE from contacts where user_id = ? ; ",array($rcuser_id));
|
||||||
$dbh->query("DELETE from identities where user_id = $rcuser_id ; ");
|
$dbh->query("DELETE from identities where user_id = ? ; ",array($rcuser_id));
|
||||||
$dbh->query("DELETE from users where user_id = $rcuser_id ; ");
|
$dbh->query("DELETE from users where user_id = ? ; ",array($rcuser_id));
|
||||||
} //foreach
|
} //foreach
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ class m_squirrelmail {
|
||||||
if (count($expl)>=2) {
|
if (count($expl)>=2) {
|
||||||
list($host,$dompart)=$expl;
|
list($host,$dompart)=$expl;
|
||||||
// We search for a 'squirrelmail' subdomain in that domain
|
// We search for a 'squirrelmail' subdomain in that domain
|
||||||
$db->query("SELECT * FROM sub_domaines s WHERE s.domaine='".addslashes($dompart)."' AND s.type='squirrelmail';");
|
$db->query("SELECT * FROM sub_domaines s WHERE s.domaine= ? AND s.type='squirrelmail';",array($dompart));
|
||||||
if ($db->next_record()) {
|
if ($db->next_record()) {
|
||||||
$domain=$db->Record;
|
$domain=$db->Record;
|
||||||
return "http://".$domain["sub"].(($domain["sub"])?".":"").$domain["domaine"];
|
return "http://".$domain["sub"].(($domain["sub"])?".":"").$domain["domaine"];
|
||||||
|
|
Loading…
Reference in New Issue