From accb00c5671cacd4c1897362f73dec51b1cca5bb Mon Sep 17 00:00:00 2001 From: Ricsi Date: Wed, 12 Apr 2017 20:54:37 +0200 Subject: [PATCH] docker #1 --- _ajax/get_parent_data.php | 2 +- _ajax/get_user_list.php | 2 +- _ajax/update_presence.php | 2 +- common.php | 5 +++-- phpinfo.php | 3 +++ 5 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 phpinfo.php diff --git a/_ajax/get_parent_data.php b/_ajax/get_parent_data.php index c3e5829..bf04e13 100644 --- a/_ajax/get_parent_data.php +++ b/_ajax/get_parent_data.php @@ -2,7 +2,7 @@ ini_set('include_path', '../_class/'); include('class_sql.php'); -if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('localhost','root','','badminton_coach'); +if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach'); else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos'); if ($_POST['parent_id'] == 'null') { diff --git a/_ajax/get_user_list.php b/_ajax/get_user_list.php index 56a2bec..acf528e 100644 --- a/_ajax/get_user_list.php +++ b/_ajax/get_user_list.php @@ -2,7 +2,7 @@ //tag listánál ez adja vissza a keresés eredményét ini_set('include_path', '../_class/'); include('class_sql.php'); -if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('localhost','root','','badminton_coach'); +if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach'); else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos'); $filter1 = ""; diff --git a/_ajax/update_presence.php b/_ajax/update_presence.php index a4894db..60a777d 100644 --- a/_ajax/update_presence.php +++ b/_ajax/update_presence.php @@ -8,7 +8,7 @@ foreach ($_POST as $key => $value) { } */ if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('localhost','root','','badminton_coach'); -else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos'); +else $sql = new sql('bc_mysql','tollashodos','uprRscU8bGpJ','tollashodos'); if ($_POST['checked'] == "true") { diff --git a/common.php b/common.php index 9febdc4..a4e715d 100644 --- a/common.php +++ b/common.php @@ -25,7 +25,8 @@ spl_autoload_register(function ($class_name) { 'Smarty_Internal_Extension_CodeFrame', 'Smarty_Internal_CompileBase', 'Smarty_Undefined_Variable', - 'Smarty_Internal_ParseTree_DqContent' + 'Smarty_Internal_ParseTree_DqContent', + 'Smarty_Internal_ParseTree_Dq' ); if (!in_array($class_name, $exception)) include '_class/class_' . $class_name . '.php'; @@ -73,7 +74,7 @@ $smarty->assign('days', $days); $smarty->assign('today', date('Y-m-d')); //SQL KAPCSOLAT BEÁLLÍTÁSA -if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('localhost','root','','badminton_coach'); +if ($_SERVER['HTTP_HOST'] == 'badmintoncoach.hu') $sql = new sql('bc_mysql','root','','badminton_coach'); else $sql = new sql('localhost','tollashodos','uprRscU8bGpJ','tollashodos'); //var_dump($sql); diff --git a/phpinfo.php b/phpinfo.php new file mode 100644 index 0000000..968c8df --- /dev/null +++ b/phpinfo.php @@ -0,0 +1,3 @@ + \ No newline at end of file