Current time: 09-28-2024, 02:19 PM Hello There, Guest! (LoginRegister)


Thread Closed 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TICKET/PATCH]: Mailboxquota im GUI einstellen.
Author Message
FISA4 Offline
Member
***

Posts: 668
Joined: Feb 2008
Reputation: 15
Post: #25
RE: [TICKET/PATCH]: Mailboxquota im GUI einstellen.
Voraussetzung ist das Patch hier:
Quota im GUI

PHPMyAdmin Öffnen, in die ispcp Datenbank einloggen und folgende SQL Befehle ausführen:
Code:
ALTER TABLE `domain` ADD `mailbox_quota` INT( 12 ) NOT NULL;
UPDATE `domain` SET `mailbox_quota` = '104857600' WHERE `mailbox_quota` = '0';

Jetzt haben wir schon mal jedem Account eine Quota von 100 MB zugeteilt.

in domain_edit.php

EDIT Zeile 63:
Text ändern in
Code:
'TR_MAIL_QUOTA' => tr('Max. Mailbox Quota [MB]'),

Edit Zeile 225:
änder "quota" in "mailbox_quota"

Edit Zeile 227
ändere "mail_user" in "domain"

EDIT Zeile 456
ändere `mail_user` in `domain` und `quota` in `mailbox_quota`



in ../gui/themes/omega_original/client/mail_edit.tpl

nach:
Code:
<tr>
                <td width="200" class="content2"><label for="pass_rep">{TR_PASSWORD_REPEAT}</label></td>
                <td class="content">
                 <input type="password" name="pass_rep" id="pass_rep" value="" style="width:210px" class="textinput">
                </td>
               </tr>

einfügen:
Code:
<tr>
                <td width="200" class="content2">{TR_MAIL_QUOTA}</td>
                <td class="content">
                 <input type="text" name="mail_quota" value="{MAIL_QUOTA}" style="width:100px" class="textinput">
                </td>
               </tr>

in ../gui/client/mail_edit.php

nach:
Code:
$mail_forward = $rs->fields['mail_forward'];
                $sub_id = $rs->fields['sub_id'];

einfügen (ca. Zeile 71):
Code:
$mail_quota = $rs->fields['quota']/1024/1024;

ca. Zeile 143 ändere:
Code:
'MAIL_ID'               => $mail_id

in
Code:
    'MAIL_ID'               => $mail_id,
        'MAIL_QUOTA'            => $mail_quota

ca. Zeile 214:

vor:
Code:
$pass=encrypt_db_password($pass);

einfügen:
Code:
$mail_quota = clean_input($_POST['mail_quota']*1024*1024);

Zeile 195:
einfügen:
Code:
$dmn_name = $_SESSION['user_logged'];
$query = "
                SELECT
                        `mailbox_quota`
                FROM
                        `domain`
                WHERE
                        `domain_name` = ?
        ";

        $rs = exec_query($sql, $query, array($dmn_name));

$maxquota = $rs->fields['mailbox_quota'];

Zeile: 212

nach:
Code:
$mail_id = $_GET['id'];
$mail_account = clean_input($_POST['mail_account']);

einfügen:
Code:
if($maxquota < clean_input($_POST['mail_quota']*1024*1024))
{
set_page_message(tr('Quota is more then your maximum!'));
                return false;
}
else{

ca. Zeile 218 + 219:
änder :
Code:
     $query = "UPDATE `mail_users` SET `mail_pass` = ?, `status` = ? WHERE `mail_id` = ?";
         $rs = exec_query($sql, $query, array($pass, $status, $mail_id));

in:
Code:
$query = "UPDATE `mail_users` SET `mail_pass` = ?, `quota` = ?, `status` = ? WHERE `mail_id` = ?";
$rs = exec_query($sql, $query, array($pass, $mail_quota, $status, $mail_id));

Zeile 241:

nach:
Code:
}

einfügen:
Code:
}


ca. Zeile 331:
ändere :
Code:
'TR_PASSWORD_REPEAT'    => tr('Repeat password'),
'TR_FORWARD_MAIL'               => tr('Forward mail'),

in

Code:
'TR_PASSWORD_REPEAT'    => tr('Repeat password'),
'TR_MAIL_QUOTA'         => tr('Mailbox Quota [MB]'),
'TR_FORWARD_MAIL'               => tr('Forward mail'),


Das war es dann auch schon.
Die Quota lässt sich aber nur ändern, wenn auch das Passwort geändert wird. Ließ sich auf die schnelle nicht anders bewerkstelligen.
Wenn mal zwischendurch Zeit ist, werd ich da mal ne änderung vornehmen so das man die Quota auch ohne Passwortänderung ändern kann.
Aber wie ich TheCry kenne macht er das fertig bevor ich angefangen hab darüber nachzudenken. Wink
(This post was last modified: 03-15-2009 01:35 PM by FISA4.)
03-15-2009 01:31 PM
Find all posts by this user
Thread Closed 


Messages In This Thread
RE: [TICKET/PATCH]: Mailboxquota im GUI einstellen. - FISA4 - 03-15-2009 01:31 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)