From f0ed72bf69ac76b872d8040d85efaf5b0c51040a Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Wed, 07 Mar 2012 09:57:53 -0500
Subject: [PATCH] - JavaScript: Removed reloadFastcgiPHPVersions() function from #php change event.

---
 interface/web/sites/ajax_get_json.php |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php
index a910dce..3ad1463 100644
--- a/interface/web/sites/ajax_get_json.php
+++ b/interface/web/sites/ajax_get_json.php
@@ -38,7 +38,7 @@
 $web_id = intval($_GET["web_id"]);
 $type = $_GET["type"];
 
-if($_SESSION["s"]["user"]["typ"] == 'admin') {
+//if($_SESSION["s"]["user"]["typ"] == 'admin') {
 
 	if($type == 'getservertype'){
 		$json = '{"servertype":"';
@@ -59,8 +59,24 @@
 		unset($server);
 		$json .= '"}';
 	}
+	
+	if($type == 'getphpfastcgi'){
+		$json = '{';
+		$sql = "SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = $server_id";
+		$php_records = $app->db->queryAllRecords($sql);
+		$php_select = "";
+		if(is_array($php_records) && !empty($php_records)) {
+			foreach( $php_records as $php_record) {
+				$php_version = $php_record['name'].':'.$php_record['php_fastcgi_binary'].':'.$php_record['php_fastcgi_ini_dir'];
+				$json .= '"'.$php_version.'": "'.$php_record['name'].'",';
+			}
+		}
+		unset($php_records);
+		if(substr($json,-1) == ',') $json = substr($json,0,-1);
+		$json .= '}';
+	}
 
-}
+//}
 
 echo $json;
 ?>
\ No newline at end of file

--
Gitblit v1.9.1