Smarty Template korrekt; LDAP Connects mit DB Connects
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
function dbconnect() //--Prozedur - kein return-Wert
|
||||
{
|
||||
$db = @new mysqli( 'localhost', 'root', '', 'ams_stammdaten' );
|
||||
//$db = @new mysqli( 'localhost', 'lgadmin', '!S1ge1nA', 'leitgedanken' );
|
||||
$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'");
|
||||
|
19
config/smarty.php
Normal file
19
config/smarty.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
date_default_timezone_set("Europe/Berlin");
|
||||
$path = dirname(__FILE__);
|
||||
$pos = stripos($path, 'login');
|
||||
$dir = substr($path,0,$pos).'login/';
|
||||
define('SMARTY_DIR', $dir);
|
||||
require(SMARTY_DIR . 'vendor/autoload.php');
|
||||
use Smarty\Smarty;
|
||||
class SmartyAdmin extends Smarty{
|
||||
|
||||
public function __construct(){
|
||||
parent::__construct(); // this must be called
|
||||
$this->template_dir = SMARTY_DIR.'html';
|
||||
$this->compile_dir = SMARTY_DIR.'smarty_tmp/templates_c';
|
||||
$this->config_dir = SMARTY_DIR.'smarty_tmp/config';
|
||||
$this->cache_dir = SMARTY_DIR.'smarty_tmp/cache';
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user