Browse Source

client area functions

andre 6 months ago
parent
commit
a1ffb51d70
1 changed files with 45 additions and 0 deletions
  1. 45 0
      app/Http/Client/Dns.php

+ 45 - 0
app/Http/Client/Dns.php

@@ -0,0 +1,45 @@
+<?php
+
+namespace ThurData\Servers\KerioEmail\App\Http\Client;
+
+
+use ThurData\Servers\KerioEmail\App\Enums\ControllerEnums;
+use ThurData\Servers\KerioEmail\App\Enums\ProductParams;
+use ThurData\Servers\KerioEmail\App\Helpers\BuildUrlExtended;
+use ThurData\Servers\KerioEmail\App\Helpers\KerioManager;
+use ThurData\Servers\KerioEmail\App\Libs\Product\ProductManager;
+use ThurData\Servers\KerioEmail\Core\Http\AbstractClientController;
+use ThurData\Servers\KerioEmail\Core\Models\Whmcs\Hosting;
+use ThurData\Servers\KerioEmail\Core\UI\Traits\WhmcsParams;
+use ThurData\Servers\KerioEmail\Core\Helper;
+use ThurData\Servers\KerioEmail\Core\Helper\DnsHelper;
+
+/**
+ *
+ * Created by PhpStorm.
+ * User: ThurData
+ * Date: 10.09.19
+ * Time: 10:13
+ * Class Webmail
+ */
+class Dns extends AbstractClientController
+{
+    use WhmcsParams;
+
+    /**
+     * @return \ThurData\Servers\KerioEmail\Core\Http\JsonResponse
+     */
+    public function index()
+    {
+        $productManager = new ProductManager();
+        $productManager->loadByHostingId($this->request->get('id'));
+        if ($this->getWhmcsParamByKey('status') === 'Active')
+        {
+            $dnshelper = new DnsHelper;
+            $response = $dnshelper->KerioEmailsetDNS();
+            return $response;
+        } else {
+            return 'error';
+        }
+    }
+}