Selaa lähdekoodia

add unset DNS

andre 3 vuotta sitten
vanhempi
commit
0c9c40261a
2 muutettua tiedostoa jossa 100 lisäystä ja 0 poistoa
  1. 29 0
      cwp7.php
  2. 71 0
      cwp7_unset_DNS_confirm.tpl

+ 29 - 0
cwp7.php

@@ -511,9 +511,11 @@ function cwp7_ClientAreaAllowedFunctions() {
 		"Enable SSL" => "enableSSL",
 		"Renew SSL" => "renewSSL",
 		"Set DNS" => "setDNS",
+		"Unset DNS" => "unsetDNS",
 		"Confirm Enable SSL" => "enableSSLConfirm",
 		"Confirm Renew SSL" => "renewSSLConfirm",
 		"Confirm Set DNS" => "setDNSConfirm",
+		"Confirm Unset DNS" => "unsetDNSConfirm",
 		"Info DNS" => "infoDNS",
 		"Add Domain" => "addDomain",
 		"Add Subdomain" => "addSubdomain",
@@ -891,6 +893,33 @@ function cwp7_setDNSConfirm($params) {
     );
 }
 
+/**
+ * Opens a form to unsset a DNS record for a subdomain or domain of a CWP7 account.
+ *
+ * @param array $params common module parameters
+ *
+ * @see https://developers.whmcs.com/provisioning-modules/supported-functions/
+ *
+ * @return array template information
+ */
+function cwp7_unsetDNSConfirm($params) {
+	if(isset($_POST['s'])){
+		return array(
+			'templatefile' => 'cwp7_unset_DNS_confirm',
+			'vars' => array(
+				'DNSdomain' => $_POST['d'],
+				'DNSsubdomain' => $_POST['s'],
+			),
+		);
+	}
+	return array(
+		'templatefile' => 'cwp7_unset_DNS_confirm',
+		'vars' => array(
+			'DNSdomain' => $_POST['d'],
+		),
+    );
+}
+
 /**
  * Update a DNS zone for a domain setting a new record for a domain or subdomain of a CWP7 account.
  *

+ 71 - 0
cwp7_unset_DNS_confirm.tpl

@@ -0,0 +1,71 @@
+<h2>DNS deaktivieren</h2>
+<hr>
+<div class="tab-content margin-bottom">
+	<div class="section">
+		<div class="product-details">
+			<div class="row row-eq-height row-eq-height-sm">
+				<div class="col-md-6">
+					<div class="product-holder product-status-{$rawstatus|strtolower}" style="min-height: unset; height:210px">
+						<div class="product-content">
+							<div class="product-image">
+								<div class="feature-icon">
+									<img src="/templates/croster/thurdata/productgroups/{$gid}.svg" class="img-fluid" style="height:100px;">
+								</div>
+							</div>
+							<h4><small>Hosting Account</small> - {$domain}</h4>
+							<div class="status-sticker-wrapper">
+								<div class="status-sticker product-status-{$rawstatus|strtolower}">
+									{$status}
+								</div>
+							</div>
+						</div>
+					</div>
+				</div>
+				<div class="col-md-6">
+					<table width="100%" border="0">
+						<tbody>
+							<tr>
+								<td>
+									<div class="alert alert-warning">
+										DNS Deaktivierung für Domain<br />
+										<b>{if $DNSsubdomain}{$DNSsubdomain}.{/if}{$DNSdomain}</b><br /><br />
+										<i class="fa fa-exclamation-circle"></i>
+										Achtung: Beachten Sie bitte, das die die Daktivierung erst dann in der Übersicht angezeigt wird, wenn die DNS-Propagation beendet wurde. Versuchen Sie eine Dektivierung daher nicht mehrmals hintereinander! 
+										</div>
+								</td>
+							</tr>
+							<tr>
+								<td>						
+									<form style="display:flex;flex-direction:row;align-items:center;justify-content: space-between;" method="post" action="clientarea.php?action=productdetails">
+										<input type="hidden" name="id" value="{$id}" />
+										<input type="hidden" name="modop" value="custom" />
+										<input type="hidden" name="a" value="unsetDNS" />
+										<input type="hidden" name="d" value="{$DNSdomain}" />
+										{if $DNSsubdomain}
+											<input type="hidden" name="s" value="{$DNSsubdomain}" />
+										{/if}
+										<button type="submit" class="btn btn-primary btn-block">
+											Deaktivieren
+										</button>
+									</form>
+								</td>
+							</tr>
+						</tbody>
+					</table>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div class="section">
+		<div class="row row-eq-height row-eq-height-sm">
+			<div class="col-md-4">
+				<form method="post" action="clientarea.php?action=productdetails">
+					<input type="hidden" name="id" value="{$id}" />
+					<button type="submit" class="btn btn-default btn-block">
+							{$LANG.clientareabacklink}
+					</button>
+				</form>
+			</div>
+		</div>
+	</div>
+</div>