Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (21 sloc) 632 Bytes
<?php
include_once 'config.inc.php';
include_once 'templates/style.css';
if(!@$_POST['newdbname'] || @$_POST['newdbname'] == "")
{
die($lang['invalidEntry']);
}
else
{
$transport = new TSocket(HOST, PORT);
$protocol = new TBinaryProtocol($transport);
$client = new ThriftHiveClient($protocol);
$transport->open();
$sql = "CREATE DATABASE IF NOT EXISTS ".$_POST['newdbname']." COMMENT '".$_POST['newdbcomment']."'";
$client->execute($sql);
echo $sql;
//$db_array = $client->fetchOne();
echo '<script>alert(\''.$lang['createDbSuccess'].'\');window.location=\'index.php?frame=right\';</script>';
$transport->close();
}
?>