コード例 #1
0
ファイル: controller.ext.php プロジェクト: Boter/madmin-core
 static function ExecuteUpdateMailbox($mid, $password, $enabled)
 {
     global $zdbh;
     global $controller;
     runtime_hook::Execute('OnBeforeUpdateMailbox');
     $numrows = $zdbh->prepare("SELECT * FROM x_mailboxes WHERE mb_id_pk=:mid");
     $numrows->bindParam(':mid', $mid);
     $numrows->execute();
     $rowmailbox = $numrows->fetch();
     if ($enabled != 0) {
         self::ExecuteEnableMailbox($mid);
     } else {
         self::ExecuteDisableMailbox($mid);
     }
     self::$update = true;
     // Include mail server specific file here.
     $MailServerFile = 'modules/' . $controller->GetControllerRequest('URL', 'module') . '/code/' . ctrl_options::GetSystemOption('mailserver_php');
     if (file_exists($MailServerFile)) {
         include $MailServerFile;
     }
     runtime_hook::Execute('OnAfterUpdateMailbox');
     self::$ok = true;
     return;
 }