Fehlerkorrekturen

This commit is contained in:
aschwarz 2024-02-29 10:58:13 +01:00
parent 8c10b2753d
commit 0377b47c39
8 changed files with 26 additions and 4 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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;
}

View 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;
}
//--------------------------------------------------------------------------------------------------
?>

View File

@ -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");
?>
?>