Esempio n. 1
0
     $smarty->assign('disabled', $disabled);
     $smarty->assign('goods_types', $goods_types);
     $smarty->assign('show_timezone', $show_timezone);
     $smarty->assign('local_timezone', get_local_timezone());
     $smarty->assign('timezones', $timezones);
     $smarty->assign('userinterface', empty($_GET['ui']) ? 'ecshop' : $_GET['ui']);
     $smarty->display('setting.php');
     break;
 case 'get_db_list':
     $db_host = isset($_POST['db_host']) ? trim($_POST['db_host']) : '';
     $db_port = isset($_POST['db_port']) ? trim($_POST['db_port']) : '';
     $db_user = isset($_POST['db_user']) ? trim($_POST['db_user']) : '';
     $db_pass = isset($_POST['db_pass']) ? trim($_POST['db_pass']) : '';
     include_once ROOT_PATH . 'includes/cls_json.php';
     $json = new JSON();
     $databases = get_db_list($db_host, $db_port, $db_user, $db_pass);
     if ($databases === false) {
         echo $json->encode(implode(',', $err->get_all()));
     } else {
         $result = array('msg' => 'OK', 'list' => implode(',', $databases));
         echo $json->encode($result);
     }
     break;
 case 'create_config_file':
     $db_host = isset($_POST['db_host']) ? trim($_POST['db_host']) : '';
     $db_port = isset($_POST['db_port']) ? trim($_POST['db_port']) : '';
     $db_user = isset($_POST['db_user']) ? trim($_POST['db_user']) : '';
     $db_pass = isset($_POST['db_pass']) ? trim($_POST['db_pass']) : '';
     $db_name = isset($_POST['db_name']) ? trim($_POST['db_name']) : '';
     $prefix = isset($_POST['db_prefix']) ? trim($_POST['db_prefix']) : '';
     $timezone = isset($_POST['timezone']) ? trim($_POST['timezone']) : 'Asia/Shanghai';
Esempio n. 2
0
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/xhtml1-loose.dtd">

<?php 
/*
	Copyright (C) GPLv2 2011 Nathan A. Mourey II <*****@*****.**>
*/
?>

<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
	<title>MySQL Database Managment.</title>
	<link rel="stylesheet" type="text/css" href="css/users.css" />
</head>

<body>
<div id="user"><h2>Databases on system.</h2></div>
<?php 
// include rutines.
include "config/functions.php";
// get a list of users.
$usr_list = get_db_list();
print $usr_list;
?>

</body>
</html>