Fehlerkorrekturen
This commit is contained in:
parent
8c10b2753d
commit
0377b47c39
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
smarty_tmp/*
|
||||
config/datenbankanbindung.php
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 451 B |
Binary file not shown.
Before Width: | Height: | Size: 1007 B |
Binary file not shown.
Before Width: | Height: | Size: 166 B |
Binary file not shown.
Before Width: | Height: | Size: 918 B |
@ -1,12 +1,16 @@
|
||||
<?php
|
||||
//--Funktion-Datenbankverbindung--------------------------------------------------------------------
|
||||
|
||||
$db_host = 'localhost';
|
||||
$db_user = 'schwaral';
|
||||
$db_pw = 'schnatz';
|
||||
$db_name = 'kurs';
|
||||
header('Content-Type: text/html; charset=utf-8');
|
||||
function dbconnect() //--Prozedur - kein return-Wert
|
||||
{
|
||||
$db = @new mysqli( 'localhost', 'root', '', 'kurs' );
|
||||
$db = @new mysqli( '193.196.151.221', 'schwaral', 'schnatz', 'kurs' );
|
||||
$db->query("SET NAMES 'utf8'");
|
||||
$db->query("set sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'");
|
||||
$db->set_charset('utf8mb4');
|
||||
$db->query("SET NAMES 'utf8mb4'");
|
||||
return $db;
|
||||
}
|
||||
|
||||
|
14
config/datenbankanbindung.php_bak
Normal file
14
config/datenbankanbindung.php_bak
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
//--Funktion-Datenbankverbindung--------------------------------------------------------------------
|
||||
|
||||
function dbconnect() //--Prozedur - kein return-Wert
|
||||
{
|
||||
$db = @new mysqli( '193.196.151.221', 'schwaral', 'schnatz', 'kurs' );
|
||||
$db->query("set sql_mode = 'ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'");
|
||||
$db->set_charset('utf8mb4');
|
||||
$db->query("SET NAMES 'utf8mb4'");
|
||||
return $db;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
?>
|
@ -4,6 +4,9 @@ if (!isset($_SESSION))
|
||||
{
|
||||
session_start();
|
||||
}
|
||||
if(!isset($_SESSION['global_uid'])) {
|
||||
header("location:../php/login.php");
|
||||
}
|
||||
include_once '../config/smarty.php';
|
||||
$smarty = new SmartyAdmin();
|
||||
require_once ("../config/datenbankanbindung.php");
|
||||
@ -26,4 +29,4 @@ else
|
||||
}
|
||||
|
||||
$smarty->display("$templatename");
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user