Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ########################################
- # @Author Xenous(Lucas)
- # @Regards to Limez,XenoGFX &
- # @others who supported me during dev
- ########################################
- //define ("XenCMS", true);
- if (!defined("XenCMS")) {
- die('404 Page not found');
- }
- # Security Class #
- class xSecurity {
- # Hash for crypting passwords, please don't change it after opening your hotel otherwise you will have to delete alot of users accounts. #
- public function xCrypt($pass) {
- global $config;
- if($config['user']['hashType'] == 'sha1') {
- return sha1($pass);
- }
- else if($config['user']['hashType'] == 'md5') {
- return md5($pass);
- }
- else if($config['user']['hashType'] == 'pCrypt') {
- return sha1(md5($pass));
- }
- else if($config['user']['hashType'] == 'xCrypt') {
- return sha1(md5($pass . $config['user']['hash']));
- }
- else if ($config['user']['hashType'] == 'shaHash') {
- return sha1($pass . $config['user']['hash']);
- }
- else if($config['user']['hashType'] == 'md5Hash') {
- return md5($pass . $config['user']['hash']);
- }
- }
- public function xSecure($string) {
- # Securing using every method I know, just to make sure a skid can't sqli you and ruin your hotel :) #
- return mysql_real_escape_string(strip_tags(stripslashes(htmlspecialchars(htmlentities($string)))));
- }
- public function xEscape($string) {
- return mysql_real_escape_string($string);
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement