Explorar o código

clientareafunctions

andre %!s(int64=3) %!d(string=hai) anos
pai
achega
dfc26034c4
Modificáronse 1 ficheiros con 23 adicións e 0 borrados
  1. 23 0
      cwp7.php

+ 23 - 0
cwp7.php

@@ -319,6 +319,29 @@ function cwp7_UsageUpdate($params) {
 }
 
 function cwp7_ClientAreaCustomButtonArray ($params) {
+	$cwp7 = new cwp7_Admin($params['serverhostname'], $params['serveraccesshash']);
+	$response = $cwp7->getAccount($params['username']);
+	if($response['status'] != 'OK') {
+		logModuleCall(
+			'cwp7',
+			__FUNCTION__,
+			$params,
+			'debug',
+			$response
+		);
+	}
+	logModuleCall(
+		'cwp7',
+		__FUNCTION__,
+		$response,
+		'debug',
+		count($response['result']['domains'])
+	);
+	if(count($response['result']['domains']) < 1) {
+		return array(
+			'Neue Domaine' => 'newDomain',
+		);
+	};
 	return array(
 		'Neue Domaine' => 'newDomain',
 		'Neue Subdomaine' => 'newSubdomain',