HEAD

Conflicts:
	string.php
This commit is contained in:
stitz 2020-04-17 15:36:31 +02:00
commit 90fe919d65
4 changed files with 146 additions and 146 deletions

View File

@ -1,10 +1,10 @@
<?php <?php
// include ('config.php'); // include ('config.php');
include ('sql.php'); include_once ('sql.php');
$sql = new SQL (); $sql = new SQL ();
include ('string.php'); include_once ('string.php');
include ('numbers.php'); include_once ('numbers.php');
include ('mail.php'); include_once ('mail.php');
include ('debug.php'); include_once ('debug.php');
include ('markdown.php'); include_once ('markdown.php');
?> ?>

View File

@ -1,5 +1,5 @@
<?php <?php
define ( 'SQL_LOG', 1 ); // schreibt sql querys in eine log if (!defined('SQL_LOG')) define ( 'SQL_LOG', 1 ); // schreibt sql querys in eine log
$_m['host'] = 'localhost'; $_m['host'] = 'localhost';
$_m['user'] = ''; $_m['user'] = '';

View File

@ -8,7 +8,7 @@ class SQL {
public $cnt_get = 0; public $cnt_get = 0;
public $cnt_set = 0; public $cnt_set = 0;
public function __construct() { public function __construct() {
require ('secret.php'); require_once ('secret.php');
$this->m = $_m; $this->m = $_m;
$this->pre = $_m ['pre']; $this->pre = $_m ['pre'];

View File

@ -50,8 +50,8 @@ function endsWith($haystack, $needle) {
return $length === 0 || (substr ( $haystack, - $length ) === $needle); return $length === 0 || (substr ( $haystack, - $length ) === $needle);
} }
function onlyAlpha($str, $auch = '') { function onlyAlpha($str) {
return preg_replace ( "/[^a-zA-Z0-9 \-\_" . $auch . "]+/", "", $str ); return preg_replace ( "/[^a-zA-Z0-9 \-\_]+/", "", $str );
} }
function shortener($str, $len = 50, $fill = '...') { function shortener($str, $len = 50, $fill = '...') {
if (strlen ( $str ) > $len) { if (strlen ( $str ) > $len) {