/home/techb158/exp.abdallabala.com/application/autoload
NameSizeModeActions
Ib/-0755rm
IBilling/-0755rm
Models/-0755rm
Notify/-0755rm
Admin.php16260644editdlrm
App.php870644editdlrm
Arr.php4160644editdlrm
Asset.php18220644editdlrm
Auth.php12460644editdlrm
Backup.php116500644editdlrm
Cache.php840644editdlrm
Ccavenue.php84580644editdlrm
class.smtp.php394380644editdlrm
Companies.php25640644editdlrm
Contacts.php66070644editdlrm
Countries.php311520644editdlrm
Currency.php232370644editdlrm
Dashboard.php206250644editdlrm
DB.php620644editdlrm
Demo.php248440644editdlrm
Dev.php16660644editdlrm
Ed.php17580644editdlrm
Event.php4490644editdlrm
ExtendedZip.php13810644editdlrm
Finance.php58740644editdlrm
Fsubmit.php44890644editdlrm
Gravatar.php27210644editdlrm
Image.php693950644editdlrm
index.html1120644editdlrm
Invoice.php155570644editdlrm
Make.php9660644editdlrm
Misc.php13850644editdlrm
Model.php237280644editdlrm
ORM.php840360644editdlrm
Paginator.php61220644editdlrm
parseCSV.php390090644editdlrm
Parsedown.php381370644editdlrm
Password.php21360644editdlrm
PHPMailer.php1114110644editdlrm
Plugins.php29730644editdlrm
Quote.php80900644editdlrm
Reorder.php20170644editdlrm
Repeating.php57710644editdlrm
Schema.php48990644editdlrm
Sms.php10470644editdlrm
Syscpanel.php60580644editdlrm
Syscurl.php10750644editdlrm
Sysfile.php5790644editdlrm
Tags.php8310644editdlrm
Template.php5400644editdlrm
Timezone.php11710644editdlrm
Transaction.php10730644editdlrm
Uploader.php33690644editdlrm
User.php3740644editdlrm
Util.php97600644editdlrm
Validator.php86340644editdlrm
View.php21700644editdlrm
Edit: /home/techb158/exp.abdallabala.com/application/autoload/Validator.php (8634B)
= $max) return false; return true; } /** * Email addres check * * @access public * @param string $string * @param array $exclude * @return bool */ public static function Email($string, $exclude=""){ if(self::textHit($string, $exclude)) return false; return (bool)preg_match("/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])(([a-z0-9-])*([a-z0-9]))+(\.([a-z0-9])([-a-z0-9_-])?([a-z0-9])+)+$/i", $string); } /** * URL check * * @access public * @param strin $string * @return bool */ public static function Url($string, $exclude=""){ if(self::textHit($string, $exclude)) return false; return (bool)preg_match("/^(http|https|ftp):\/\/([A-Z0-9][A-Z0-9_-]*(?:\.[A-Z0-9][A-Z0-9_-]*)+):?(\d+)?\/?/i", $string); } /** * IP * * @access public * @param string $string * @return void */ public static function Ip($string){ return (bool)preg_match("/^(1?\d{1,2}|2([0-4]\d|5[0-5]))(\.(1?\d{1,2}|2([0-4]\d|5[0-5]))){3}$/", $string); } /** * Check if it is an number * * @access public * @param int $integer * @param int $max * @param int $min * @return bool */ public static function Number($integer, $max=null, $min=0){ if(preg_match("/^\-?\+?[0-9e1-9]+$/",$integer)){ if(!self::numberBetween($integer, $max, $min)) return false; return true; } return false; } /** * Check if it is an unsigned number * * @access public * @param int $integer * @return bool */ public static function UnsignedNumber($integer){ return (bool)preg_match("/^\+?[0-9]+$/",$integer); } /** * Float * * @access public * @param string $string * @return bool */ public static function Float($string){ return (bool)($string==strval(floatval($string)))? true : false; } /** * Alpha check * * @access public * @param string $string * @return void */ public static function Alpha($string){ return (bool)preg_match("/^[a-zA-Z]+$/", $string); } /** * Alpha numeric check * * @access public * @param string $string * @return void */ public static function AlphaNumeric($string){ return (bool)preg_match("/^[0-9a-zA-Z]+$/", $string); } /** * Specific chars check * * @access public * @param string $string * @param array $allowed * @return void */ public static function Chars($string, $allowed=array("a-z")){ return (bool)preg_match("/^[" . implode("", $allowed) . "]+$/", $string); } /** * Check length of an string * * @access public * @param string $stirng * @param int $max * @param int $min * @return bool */ public static function Length($string, $max=null, $min=0){ $length = strlen($string); if(!self::numberBetween($length, $max, $min)) return false; return true; } /** * Hex color check * * @access public * @param string $string * @return void */ public static function HexColor($string){ return (bool)preg_match("/^(#)?([0-9a-f]{1,2}){3}$/i", $string); } /** * Data validation * * Does'nt matter how you provide the date * dd/mm/yyyy * dd-mm-yyyy * yyyy/mm/dd * yyyy-mm-dd * * @access public * @param string $string * @return bool */ public static function Date($string){ $date = date('Y', strtotime($string)); return ($date == "1970" || $date == '') ? false : true; } /** * Older than check * * @access public * @param string $string * @param int $age * @return bool */ public static function OlderThan($string, $age){ $date = date('Y', strtotime($string)); if($date == "1970" || $date == '') return false; return (date('Y') - $date) > $age ? true : false; } /** * XML valid * * @access public * @param string $string * @return bool */ public static function Xml($string){ $Xml = @simplexml_load_string($string); return ($Xml === false) ? false : true; } /** * Is filesize between * * @access public * @param string $file * @param int $max * @param int $min * @return bool */ public static function FilesizeBetween($file, $max=null, $min=0){ $filesize = filesize($file); return self::numberBetween($filesize, $max, $min); } /** * Is image width between * * @access public * @param string $image * @param int $max_width * @param int $min_width * @param int $max_height * @param int $min_height * @return void */ public static function ImageSizeBetween($image, $max_width="", $min_width=0, $max_height="", $min_height=0){ $size = getimagesize($image); if(!self::numberBetween($size[0], $max_width, $min_width)) return false; if(!self::numberBetween($size[1], $max_height, $min_height)) return false; return true; } /** * Phone numbers * * @access public * @param string $phone * @return bool */ public static function Phone($phone){ $formats = array( '###-###-####', '####-###-###', '(###) ###-###', '####-####-####', '##-###-####-####', '####-####', '###-###-###', '#####-###-###', '##########', '####-##-##-##'); $format = trim(preg_replace("/[0-9]/", "#", $phone)); return (bool)in_array($format, $formats); } public static function Domain($domain_name){ return (preg_match("/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i", $domain_name) //valid chars check && preg_match("/^.{1,253}$/", $domain_name) //overall length check && preg_match("/^[^\.]{1,63}(\.[^\.]{1,63})*$/", $domain_name) ); //length of each label } }