|
|
@@ -1,9 +1,23 @@
|
|
|
<?php
|
|
|
+/**
|
|
|
+ * Helper script to check the availibility of a Zimbra mailbox useable with ajax requests
|
|
|
+ *
|
|
|
+ * @see https://www.zimbra.com
|
|
|
+ * @copyright Copyright (c) Thurdata GmbH 2020
|
|
|
+ * @license GPL
|
|
|
+ *
|
|
|
+ */
|
|
|
+
|
|
|
+
|
|
|
$pos = strpos($_SERVER['HTTP_REFERER'],getenv('HTTP_HOST'));
|
|
|
if($pos===false) {
|
|
|
die('Restricted access');
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * Requires the whmcs init
|
|
|
+ * Requires this PHP api to make soap calls and parse responses
|
|
|
+ */
|
|
|
require_once(__DIR__ . '/../../../init.php');
|
|
|
require_once("api/Zm/Auth.php");
|
|
|
require_once("api/Zm/Account.php");
|
|
|
@@ -42,7 +56,7 @@ if(is_a($login, "Exception")) {
|
|
|
'zimbrasingle',
|
|
|
__FUNCTION__,
|
|
|
$accessData,
|
|
|
- "Error : cannot login to " . $accessData['zimbraServer'],
|
|
|
+ "Error: cannot login to " . $accessData['zimbraServer'],
|
|
|
$login->getMessage()
|
|
|
);
|
|
|
exit();
|