65 lines
1.4 KiB
Diff
65 lines
1.4 KiB
Diff
--- 6/app/admin/DBC.php
|
|
+++ 6/app/admin/DBC.php
|
|
@@ -16,31 +16,17 @@ class DBC
|
|
|
|
private static $instance = null;
|
|
|
|
-
|
|
- /*
|
|
- private static $host = 'wm53.wedos.net';
|
|
- private static $db = 'd61192_disert';
|
|
- private static $user = 'a61192_disert';
|
|
- private static $pass = 'jhdVu9D7';
|
|
-
|
|
- */
|
|
-
|
|
- private static $host = 'localhost';
|
|
- private static $db = 'disertace';
|
|
- private static $user = 'root';
|
|
- private static $pass = '';
|
|
-
|
|
-
|
|
public static function get()
|
|
{
|
|
if(self::$instance == null)
|
|
{
|
|
try
|
|
{
|
|
+ include ('../config.php');
|
|
self::$instance = new PDO(
|
|
- 'mysql:host='.self::$host.';dbname='.self::$db,
|
|
- self::$user,
|
|
- self::$pass,
|
|
+ 'mysql:host='.$GLOBALS['host'].';dbname='.$GLOBALS['db_name'],
|
|
+ $GLOBALS['db_user'],
|
|
+ $GLOBALS['db_password'],
|
|
array(
|
|
PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8",
|
|
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
|
--- 6/app/db.php
|
|
+++ 6/app/db.php
|
|
@@ -6,22 +6,7 @@
|
|
|
|
/* rostanetek.cz */
|
|
|
|
- /*
|
|
-$GLOBALS['host'] = 'wm53.wedos.net';
|
|
-$GLOBALS['db_user'] = 'a61192_disert';
|
|
-$GLOBALS['db_password'] = 'jhdVu9D7';
|
|
-$GLOBALS['db_name'] = 'd61192_disert';
|
|
-*/
|
|
- /* localhost*/
|
|
-
|
|
-$GLOBALS['host'] = 'localhost';
|
|
-$GLOBALS['db_user'] = 'root';
|
|
-$GLOBALS['db_password'] = '';
|
|
-$GLOBALS['db_name'] = 'disertace';
|
|
-
|
|
-
|
|
-
|
|
-
|
|
+include ('config.php');
|
|
|
|
//uzivatele
|
|
define('DB_HOST', $GLOBALS['host']);
|