Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- $config['site'] = parse_ini_file('config/config.ini');
- session_start();
- //save config in ini file
- function saveconfig_ini($config) {
- $file = fopen("config/config.ini", "w");
- foreach($config as $param => $data) {
- $file_data .= $param.' = "'.str_replace('"', '', $data).'"
- ';
- }
- rewind($file);
- fwrite($file, $file_data);
- fclose($file);
- }
- function check_password($pass)
- {
- $temp = strspn("$pass", "qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890");
- if ($temp != strlen($pass)) {
- return false;
- }
- else
- {
- $ok = "/[a-zA-Z0-9]{1,40}/";
- return (preg_match($ok, $pass))? true: false;
- }
- }
- function password_ency($password)
- {
- $ency = $GLOBALS['passwordency'];
- if($ency == 'sha1')
- return sha1($password);
- elseif($ency == 'md5')
- return md5($password);
- elseif($ency == '')
- return $password;
- }
- if($_REQUEST['page']'' && !isset($_REQUEST['step']))
- echo '<html>
Add Comment
Please, Sign In to add comment