Florian Schaal
2016-03-22 5ca959fa688255a8de61f89fe2751eb4d24a6912
interface/web/sites/ajax_get_json.php
@@ -92,7 +92,7 @@
      $sql_where .= ")";
   }
   if($php_type == 'php-fpm'){
   if($php_type == 'php-fpm' || ($php_type == 'hhvm' && $server_type == 'nginx')){
      $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ?".$sql_where, $server_id);
   } elseif($php_type == 'fast-cgi'){
      $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ?".$sql_where, $server_id);
@@ -100,7 +100,7 @@
   $php_select = "";
   if(is_array($php_records) && !empty($php_records)) {
      foreach( $php_records as $php_record) {
         if($php_type == 'php-fpm'){
         if($php_type == 'php-fpm' || ($php_type == 'hhvm' && $server_type == 'nginx')){
            $php_version = $php_record['name'].':'.$php_record['php_fpm_init_script'].':'.$php_record['php_fpm_ini_dir'].':'.$php_record['php_fpm_pool_dir'];
         } else {
            $php_version = $php_record['name'].':'.$php_record['php_fastcgi_binary'].':'.$php_record['php_fastcgi_ini_dir'];
@@ -192,12 +192,13 @@
if ($type == 'getdirectivesnippet') {
   $server_type = 'apache';
   $web_config = $app->getconf->get_server_config($server_id, 'web');
   if (!empty($web_config['server_type']))
      $server_type = $web_config['server_type'];
   if (!empty($web_config['server_type'])) $server_type = $web_config['server_type'];
   $snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND type = ? ORDER BY name ASC", $server_type);
   $m_snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND master_directive_snippets_id > 0 AND type = ? ORDER BY name ASC", $server_type);
   $snippets = $app->db->queryAllRecords("SELECT directive_snippets_id, name FROM directive_snippets WHERE customer_viewable = 'y' AND active = 'y' AND master_directive_snippets_id = 0 AND type = ? ORDER BY name ASC", $server_type);
   $json = json_encode($snippets);
   $json = json_encode(array('m_snippets' => $m_snippets, 'snippets' => $snippets));
}
if($type == 'getclientssldata'){