New plugin loader, page features, API0.2b, Bugfixes

This commit is contained in:
2016-11-19 16:13:37 +01:00
parent 6d1eef25ca
commit b97faf21fd
230 changed files with 36532 additions and 36346 deletions

View File

@ -1,65 +1,65 @@
<?php
Class Check
{
public static function name($str) {
if(preg_match('/^[a-zA-ZÖÜÓŐÚÉÁŰÍöüóőúéáűí\.\d_\- ]{3,20}$/i', $str))
return true;
return false;
}
public static function link($str) {
if(!preg_match('/^[a-z0-9\d_\-]{3,20}$/i', $str))
return true;
return false;
}
public static function email($str) {
if(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/',$str) && strlen($str)<51)
return true;
return false;
}
public static function password($str) {
if(strlen($str)<6 || strlen($str)>20)
return true;
return false;
}
public static function domain($str) {
if (filter_var(gethostbyname($str), FILTER_VALIDATE_IP))
return true;
return false;
}
public static function title($title) {
if (strlen($title) > 0 && strlen($title) < 250)
return true;
return false;
}
public static function slug($str) {
if(preg_match('/^[a-zA-Z\d_\- ]{1,100}$/i', $str))
return true;
return false;
}
public static function url($url, $lazy = false) {
if (($lazy && !$url) || !filter_var($url, FILTER_VALIDATE_URL) === false) return true;
return false;
}
<?php
Class Check
{
public static function name($str) {
if(preg_match('/^[a-zA-ZÖÜÓŐÚÉÁŰÍöüóőúéáűí\.\d_\- ]{3,20}$/i', $str))
return true;
return false;
}
public static function link($str) {
if(!preg_match('/^[a-z0-9\d_\-]{3,20}$/i', $str))
return true;
return false;
}
public static function email($str) {
if(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/',$str) && strlen($str)<51)
return true;
return false;
}
public static function password($str) {
if(strlen($str)<6 || strlen($str)>20)
return true;
return false;
}
public static function domain($str) {
if (filter_var(gethostbyname($str), FILTER_VALIDATE_IP))
return true;
return false;
}
public static function title($title) {
if (strlen($title) > 0 && strlen($title) < 250)
return true;
return false;
}
public static function slug($str) {
if(preg_match('/^[a-zA-Z\d_\- ]{1,100}$/i', $str))
return true;
return false;
}
public static function url($url, $lazy = false) {
if (($lazy && !$url) || !filter_var($url, FILTER_VALIDATE_URL) === false) return true;
return false;
}
}