include_once('ressources/class.ocs.inc'); include_once(dirname(__FILE__). "/ressources/class.cyrus.inc"); $usr=new usersMenus(); if($usr->AsMailBoxAdministrator==false){ $tpl=new Templates(); echo "alert('".$tpl->javascript_parse_text('{ERROR_NO_PRIVS}')."');"; die(); } if(isset($_GET["popup"])){popup();exit;} if(isset($_GET["Status"])){echo Status($_GET["Status"]);exit;} if(isset($_GET["checkrights"])){checkrights();exit;} if(isset($_GET["CreateMBX"])){CreateMBX();exit;} if(isset($_GET["MBXSetACL"])){MBXSetACL();exit;} if(isset($_GET["MBXSubscribe"])){MBXSubscribe();exit;} if(isset($_GET["StatusFailed"])){StatusFailed();exit;} js(); //error_creating_mailbox function js(){ $page=CurrentPageName(); $tpl=new templates(); $uid=$_GET["uid"]; $title=$tpl->_ENGINE_parse_body('{mailbox_main_settings}'); $html="
die; } if (isset($_GET["popup"])) { popup(); exit; } if (isset($_GET["Status"])) { echo Status($_GET["Status"]); exit; } if (isset($_GET["checkrights"])) { checkrights(); exit; } if (isset($_GET["CreateMBX"])) { CreateMBX(); exit; } if (isset($_GET["MBXSetACL"])) { MBXSetACL(); exit; } if (isset($_GET["MBXSubscribe"])) { MBXSubscribe(); exit; } if (isset($_GET["StatusFailed"])) { StatusFailed(); exit; } js();
$dir = dirname(__FILE__); include_once $dir . '/ressources/class.templates.inc'; include_once $dir . '/ressources/class.ldap.inc'; include_once $dir . '/ressources/class.users.menus.inc'; include_once $dir . '/ressources/class.artica.inc'; include_once $dir . '/ressources/class.mysql.inc'; include_once $dir . '/ressources/class.ini.inc'; include_once $dir . '/ressources/class.cyrus.inc'; include_once $dir . '/ressources/class.cron.inc'; include_once $dir . '/ressources/class.system.network.inc'; include_once $dir . '/ressources/class.user.inc'; if (posix_getuid() != 0) { die("Cannot be used in web server mode\n\n"); } if ($argv[1] == "--create-mbx") { CreateMBX($argv[2], $argv[3]); } if ($argv[1] == "--mbx-exists") { IfMailBoxExists($argv[2], $argv[3]); } function build_progress($text, $pourc) { echo "******************** {$pourc}% {$text} ********************\n"; $cachefile = "/usr/share/artica-postfix/ressources/logs/cyrus.mbx.progress"; $array["POURC"] = $pourc; $array["TEXT"] = $text; @file_put_contents($cachefile, serialize($array)); @chmod($cachefile, 0755); } function IfMailBoxExists($uid) {