Methods

fatal_error()

fatal_error(  $error,   $line,   $file, boolean  $maintenance = false) 

FATAL error function

Breaks on critical exception and notify admin via mail

Parameters

$error
$line
$file
boolean $maintenance

mail_error()

mail_error(  $error, boolean  $line = false, boolean  $file = false, integer  $error_number, string  $errortype = "fataler") : boolean

Send error mail to admin

Parameters

$error
boolean $line
boolean $file
integer $error_number
string $errortype

Returns

boolean

send_styled_html_mail()

send_styled_html_mail(  $to,   $subject,   $sender_name,   $sender_address,   $title,   $subtitle,   $content) : boolean

Send styled html mail

Parameters

$to
$subject
$sender_name
$sender_address
$title
$subtitle
$content

Returns

boolean

mail()

mail(  $to,   $subject,   $message,   $from_name,   $from_mail, string  $headers_in = "", string  $params = "", string  $content_type = "text/plain", string  $priority = "1", string  $sensitivity = "Normal") : boolean

Send mail

Parameters

$to
$subject
$message
$from_name
$from_mail
string $headers_in
string $params
string $content_type
string $priority
string $sensitivity

Returns

boolean

send_adminmail()

send_adminmail(  $message,   $subject) : boolean

Send admin mail

Parameters

$message
$subject

Returns

boolean

checkmail()

checkmail(  $email, boolean  $dns_check = true) : boolean

Check mail address

Validates if email is an valid e-mail address.

If DNS check is enabled: Check DNS records corresponding to a given Internet host name. Searches DNS for records of type type corresponding to host.

Parameters

$email
boolean $dns_check

Returns

boolean

checkurl()

checkurl(  $url) : boolean

Check url

Check if the variable $url is a valid URL.

Parameters

$url

Returns

boolean

checkip()

checkip(  $ip) : boolean

Check ip (IPv4)

Check if the variable $ip is a valid IP address.

Parameters

$ip

Returns

boolean

is_private_ip()

is_private_ip(  $ip) : boolean

Is private ip

FILTER_FLAG_NO_PRIV_RANGE: Validate an IPv4 address but not allow private range addresses. FILTER_FLAG_NO_RES_RANGE: Validate any IPv4 and IPv6 IP address which is not a reserved or private range IP address

Parameters

$ip

Returns

boolean

verify_captcha()

verify_captcha(  $cc) : boolean

Verify captcha

Verify captcha to match an saved and unsolved code from the database.

Parameters

$cc

Returns

boolean

stringcheck()

stringcheck(  $str) : mixed|string

Check string against xss and html

Parameters

$str

Returns

mixed|string

refresh()

refresh(  $url) 

Refresh

Redirect per header() to new location given in $url.

Parameters

$url

input_check()

input_check(  $input, boolean  $minlength = false, boolean  $maxlength = false, boolean  $regex = false, boolean  $case_sensitive = false) : boolean|false|integer

Input check

Validate input to match a given minlength, maxlength and pattern

Parameters

$input
boolean $minlength
boolean $maxlength
boolean $regex
boolean $case_sensitive

Returns

boolean|false|integer

get_global_keywords()

get_global_keywords() : mixed

Set global keywords

Output as template variable in

Returns

mixed

get_pagetitle_global()

get_pagetitle_global() : mixed

Get pagetitle global

Output as template variable in title

Returns

mixed

get_monthname()

get_monthname(  $month) : mixed

Get month name

Return month mane for a give language by month id

Parameters

$month

Returns

mixed

date_strip_zero()

date_strip_zero(  $date) : string

Date strip zero

Remone 0(zero) from month id

Parameters

$date

Returns

string

date_add_zero()

date_add_zero(  $date) : string

Date add zero

Add 0(zero) to month id

Parameters

$date

Returns

string

check_log_event_type()

check_log_event_type(  $event) : boolean

Prüfen, ob log_event gültig ist

Parameters

$event

Returns

boolean

array_extract()

array_extract(  $array,   $element) : array

Aus einem Element in mehrdimensionalem Array ein neues Array erstellen

Parameters

$array
$element

Returns

array

http_error()

http_error(  $error) 

Http error

Call HTTP-Errorhandler.

Parameters

$error

hash()

hash(  $data, string  $algo = "sha512") : string

Hash

Generate a hash value from data with given algorithm (default SHA512)

Parameters

$data
string $algo

Returns

string

print_r()

print_r(  $array, boolean  $echo = false) : string

Print readable

Prints human-readable information about a variable Format in HTML-Code.

Parameters

$array
boolean $echo

Returns

string

generate_id()

generate_id(  $length, string  $charset = "ABCDEFGHJKLMNPQRSTUVWXYZ123456789") : string

Generate id

Generate a random value via the Mersenne Twister Random Number Generator with a given lenght and charset.

Parameters

$length
string $charset

Returns

string

zip_check()

zip_check(  $zip) : false|integer

Zip check

Validate postcode (German, 5 digits)

Parameters

$zip

Returns

false|integer

strstr()

strstr(  $haystack,   $needle, boolean  $part = false) : false|string

Strstr

Finds first occurrence of a string within another. Overwrite strstr with multibyte strstr.

Parameters

$haystack
$needle
boolean $part

Returns

false|string

stristr()

stristr(  $haystack,   $needle, boolean  $part = false) : false|string

Stristr

Find the first occurrence of a string (Case-insensitive). Overwrite stristr with multibyte stristr.

Parameters

$haystack
$needle
boolean $part

Returns

false|string

substr()

substr(  $str,   $start, null  $length = NULL) : string

Substr

Return part of a string. Overwrite substr with multibyte substr.

Parameters

$str
$start
null $length

Returns

string

strpos()

strpos(  $haystack,   $needle, integer  $offset) : false|integer

Strpos

Find the position of the first occurrence of a substring in a string. Overwrite strpos with multibyte strpos.

Parameters

$haystack
$needle
integer $offset

Returns

false|integer

strrpos()

strrpos(  $haystack,   $needle, integer  $offset) : false|integer

Strrpos

Find the position of the last occurrence of a substring in a string. Overwrite strrpos with multibyte strrpos.

Parameters

$haystack
$needle
integer $offset

Returns

false|integer

stripos()

stripos(  $haystack,   $needle, integer  $offset) : false|integer

Stripos

Find the position of the first occurrence of a case-insensitive substring in a string. Overwrite stripos with multibyte stripos.

Parameters

$haystack
$needle
integer $offset

Returns

false|integer

strripos()

strripos(  $haystack,   $needle, integer  $offset) : false|integer

Strripos

Find the position of the last occurrence of a case-insensitive substring in a string. Overwrite strripos with multibyte strripos.

Parameters

$haystack
$needle
integer $offset

Returns

false|integer

strlen()

strlen(  $str, string  $encoding = 'UTF-8') : integer

Strlen

Get string length. Overwrite strlen with multibyte strlen.

Parameters

$str
string $encoding

Returns

integer

strtolower()

strtolower(  $sourcestring, string  $encoding = 'UTF-8') : string

Strtolower

Make a string lowercase. Overwrite strtolower with multibyte strtolower.

Parameters

$sourcestring
string $encoding

Returns

string

strtoupper()

strtoupper(  $sourcestring, string  $encoding = 'UTF-8') : string

Strtoupper

Make a string uppercase. Overwrite strtoupper with multibyte strtoupper.

Parameters

$sourcestring
string $encoding

Returns

string

strrchr()

strrchr(  $haystack,   $needle, boolean  $part = false, string  $encoding = 'UTF-8') : false|string

Strrchr

Find the last occurrence of a character in a string. Overwrite strrchr with multibyte strrchr.

Parameters

$haystack
$needle
boolean $part
string $encoding

Returns

false|string

substr_count()

substr_count(  $haystack,   $needle, string  $encoding = 'UTF-8') : integer

Substr count

Count the number of substring occurrences. Overwrite substr_count with multibyte substr_count.

Parameters

$haystack
$needle
string $encoding

Returns

integer

split()

split(  $pattern,   $string, null  $limit = NULL) : array<mixed,string>

Split

Split multibyte string using regular expression. Overwrite split with multibyte split.

Parameters

$pattern
$string
null $limit

Returns

array<mixed,string>

headers_sent()

headers_sent(string  $errortype = "error") : boolean

Headers sent

Checks if or where headers have been sent.

Parameters

string $errortype

Returns

boolean

disable_cache()

disable_cache(string  $errortype = "error") : boolean

Disable cache

Disable browser cache control.

Parameters

string $errortype

Returns

boolean

htmlentities()

htmlentities(  $text) : string

Htmlentities

Convert all applicable characters to HTML entities.

Parameters

$text

Returns

string

create_upload_dir()

create_upload_dir(  $date,   $path) : boolean|string

Create upload directory

Create folder based on timestamp

Parameters

$date
$path

Returns

boolean|string