Skip to content

Instantly share code, notes, and snippets.

View laszlokorte's full-sized avatar

Laszlo Korte laszlokorte

View GitHub Profile
<?php
final class Secure
{
const LINEBREAK_WIDTH = 50;
private static $charset = 'utf-8';
/*
*
* Alle HTML-Befehlszeichen aus einem String in HTML-Entities umwandeln
<?php
//Startguthaben definieren
define("startguthaben", 100);
define("waehrung", "$");
session_start();
<?php
/*
*
* Secure Class
*
*/
class Secure
<?php
/*
*
* Secure Class
*
*/
class Secure
<?php
class Secure
{
private static $charset = 'utf-8';
/*
*
* Alle HTML-Befehlszeichen aus einem String in HTML-Entities umwandeln
*
*/
<?php
final class VideoAbcode
{
public static function load()
{
// Die ABCodes sollen in die Gruppe video registriert werden
$group = array('video');
<?php
class ClansphereAbcode {
# alle registered patter
private static $patterns = array();
public static function convert($string, $options = array()) {
$string = self::secure($string);
foreach(self::$patterns AS $pat => $func) {
$string = preg_replace_callback($pat, $func, $string);
<?php
class Abcode {
const RES_STRING = 0;
const RES_FUNC_OBJECT = 1;
const RES_FUNC_NAME = 2;
const POS_START_KEY = 'start';
private static $patterns = array();
private static $patterns_count=0;
<?php
class Secure
{
private static $charset = 'utf-8';
/*
*
* Alle HTML-Befehlszeichen aus einem String in HTML-Entities umwandeln
*
*/
<?php
final class ClansphereAbcode
{
private static $cache = array();
public static function load()
{
Abcode::register(new AbcodePattern('bold', "/\[b\](.*?)\[\/b\]/si","<strong>$1</strong>"), TRUE);