Fixed DB types

This commit is contained in:
Malishev Dmitry 2011-09-05 19:03:40 +03:00
commit 809d0a22c6
2 changed files with 7 additions and 14 deletions

View file

@ -61,7 +61,7 @@ class MAIN extends AjaxHandler
$data_web_domain = array('ips' => $ips); $data_web_domain = array('ips' => $ips);
$data_ip = array('user_names' => $user_names, 'interfaces' => $interfaces); $data_ip = array('user_names' => $user_names, 'interfaces' => $interfaces);
$data_dns = array('ips' => $ips); $data_dns = array('ips' => $ips);
$data_db = array('db_types' => $db_types); $data_db = array('db_types' => $this->getDBTypes());
$data_users = array('user_names' => $user_names); $data_users = array('user_names' => $user_names);
$reply = array( $reply = array(
@ -187,13 +187,18 @@ class MAIN extends AjaxHandler
*/ */
public function getDbParams($data = array()) public function getDbParams($data = array())
{ {
$db_types = array('mysql' => 'mysql', 'postgre' => 'postgre'); $db_types = $this->getDBTypes();
return array( return array(
'TYPE' => $db_types, 'TYPE' => $db_types,
'HOST' => array('vestacp.com' => 'vestacp.com', 'askcow.org' => 'askcow.org') 'HOST' => array('vestacp.com' => 'vestacp.com', 'askcow.org' => 'askcow.org')
); );
} }
public function getDBTypes()
{
return array('mysql' => 'mysql', 'postgre' => 'postgre');
}
/** /**
* Users initial params * Users initial params
* *

View file

@ -1,17 +1,5 @@
<?php <?php
$url = "http://dev.vestacp.com:8083/dispatch.php";
$useragent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
$ch = curl_init();
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($_POST));
$result= curl_exec ($ch);
curl_close ($ch);
die();
define('V_ROOT_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR); define('V_ROOT_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
require_once V_ROOT_DIR . 'config/Config.class.php'; require_once V_ROOT_DIR . 'config/Config.class.php';