Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for Zend Encoder/SafeGuard & PhpExpress)
- *
- * @ Version : 1.1.5.0
- * @ Author : DeZender
- * @ Release on : 09.06.2012
- * @ Official site : http://DeZender.Net
- *
- */
- function daddslashes($string, $force = 0) {
- ( !defined( 'MAGIC_QUOTES_GPC' ) && define( 'MAGIC_QUOTES_GPC', get_magic_quotes_gpc( ) ) );
- if (!( ( MAGIC_QUOTES_GPC && !$force ))) {
- if (is_array( $string )) {
- foreach ($string as $key => $val) {
- $string[$key] = daddslashes( $val, $force );
- }
- return $string;
- }
- $string = addslashes( $string );
- }
- return $string;
- }
- function dreferer($default = '') {
- global $referer;
- $default = (empty( $default ) ? GetBaseUrl( 'index' ) : '');
- if (strstr( $referer, 'logging.php' )) {
- $referer = $default;
- return $referer;
- }
- if (empty( $referer )) {
- if (isset( $GLOBALS['_SERVER']['HTTP_REFERER'] )) {
- $referer = preg_replace( '/([\?&])((sid\=[a-z0-9]{6})(&|$))/i', '\1', $GLOBALS['_SERVER']['HTTP_REFERER'] );
- $referer = (substr( $referer, -1 ) == '?' ? substr( $referer, 0, -1 ) : $referer);
- return $referer;
- }
- }
- $referer = dhtmlchars( $referer );
- return $referer;
- }
- function filtering($str) {
- return trim( strtr( dhtmlchars( $str ), array( '\\' => '\\\\', '\?' => '', '_' => '\_', '%' => '\%' ) ) );
- }
- function drop_check($var, $out) {
- global ${$out . '_y'};
- global ${$out . '_n'};
- if ($var) {
- ${$out . '_y'} = 'checked';
- return null;
- }
- ${$out . '_n'} = 'checked';
- }
- function time_format($date) {
- return strtotime( $date );
- }
- function make_cache($array, $name) {
- $configinfo = '<?PHP
- $' . $name . '= ' . var_export( $array, true ) . ';
- ';
- touch( MVMMALL_CACHE . ( '' . $name . '.cache.php' ) );
- $fp = fopen( MVMMALL_CACHE . ( '' . $name . '.cache.php' ), 'w' );
- fwrite( $fp, $configinfo );
- fclose( $fp );
- @chmod( MVMMALL_CACHE . ( '' . $name . '.cache.php' ), 511 );
- return true;
- }
- function writeover($filename, $data, $method = 'rb+', $iflock = 1, $check = 1, $chmod = 1) {
- if ($check) {
- if (strpos( $filename, '..' ) !== false) {
- exit( 'Forbidden' );
- }
- }
- touch( $filename );
- $handle = fopen( $filename, $method );
- if ($iflock) {
- flock( $handle, LOCK_EX );
- }
- fwrite( $handle, $data );
- if ($iflock) {
- flock( $handle, LOCK_UN );
- }
- if ($method == 'rb+') {
- ftruncate( $handle, strlen( $data ) );
- }
- fclose( $handle );
- ( $chmod && @chmod( $filename, 511 ) );
- }
- function show_msg($title, $url = '') {
- @extract( $GLOBALS, EXTR_SKIP );
- global $lang;
- if ($url == '') {
- $jump = '';
- } else {
- if ($url == 'close') {
- if ($url = 'window.close()') {
- echo '<script language=\'javascript\'>';
- echo $url;
- echo ';</script>';
- }
- } else {
- $jump = '<meta http-equiv="refresh" content="4;url=' . $url . '"/>';
- }
- }
- $install_url = 'http://' . $_SERVER['HTTP_HOST'] . '/';
- $str = $lang[$title];
- ( !$str && $str = $title );
- require_once( template( 'showmsg' ) );
- $output = str_replace( array( '<!--<!---->', '<!---->', '
- ', substr( MVMMALL_ROOT, 0, -1 ) ), '', ob_get_contents( ) );
- ob_end_clean( );
- exit( $output );
- }
- function move_page($url, $delay = 0, $js = false, $jsWrapped = true) {
- $delay = (int)$delay;
- if (!( $js)) {
- if (!( ( !headers_sent( ) && !( 0 < $delay ) ))) {
- exit( '<html><head><meta http-equiv="refresh" content="' . $delay . ';URL=' . $url . '" /></head></html>' );
- }
- header( 'Location: ' . $url );
- exit( );
- }
- $out = '';
- if (0 < $delay) {
- $out .= 'window.setTimeOut(function () { window.location=\'' . $url . '\'; }, ' . $delay . ');';
- } else {
- $out .= 'window.location=\'' . $url . '\';';
- }
- if ($jsWrapped) {
- $out = '<script type="text/javascript">' . $out . '</script>';
- }
- exit( $out );
- }
- function isblank($str) {
- return trim( strval( $str ) ) == '';
- }
- function dhtmlchars($string) {
- if (is_array( $string )) {
- foreach ($string as $val) {
- $key = ;
- $string[$key] = dhtmlchars( $val );
- }
- return $string;
- }
- $string = preg_replace( '/&((#(\d{3,5}|x[a-fA-F0-9]{4})|[a-zA-Z][a-z0-9]{2,5});)/', '&\1', str_replace( array( '&', '"', '<', '>' ), array( '&', '"', '<', '>' ), $string ) );
- return $string;
- }
- function mango_encode($str) {
- $str = base64_encode( $str );
- $str = urlencode( $str );
- return $str;
- }
- function mango_decode($str) {
- $str = urldecode( $str );
- $str = base64_decode( $str );
- return $str;
- }
- function bad_check($badword, $str, $divide = ',') {
- $badword = preg_replace( '/' . $divide . '/', '|', $badword );
- if (preg_match( '/' . $badword . '/', $str, $match )) {
- return $match[0];
- }
- return 0;
- }
- function isalnum($str) {
- if (eregi( '[^0-9a-zA-Z\_]', $str )) {
- return 0;
- }
- return 1;
- }
- function cut_str($string, $length) {
- if (function_exists( 'mb_substr' )) {
- if (mb_strlen( $string, 'UTF-8' ) <= $length) {
- return $string;
- }
- return mb_substr( $string, 0, $length - 1, 'UTF-8' ) . '...';
- }
- preg_match_all( '/[-]|[Â-ß][€-¿]|à[ -¿][€-¿]|[á-ï][€-¿][€-¿]|ð[-¿][€-¿][€-¿]|[ñ-÷][€-¿][€-¿][€-¿]/', $string, $info );
- $size_info = sizeof( $info[0] );
- for ($i = 0; $i < $size_info; ++$i) {
- $str .= $info[0][$i];
- $j = (127 < ord( $info[0][$i] ) ? $j + 2 : $j + 1);
- if ($length - 3 < $j) {
- return $str . '...';
- }
- }
- return join( '', $info[0] );
- }
- function file_unlink($file_name) {
- if (!( file_exists( $file_name ))) {
- return false;
- }
- @chmod( $file_name, 511 );
- return @unlink( $file_name );
- }
- function get_dirinfo($dir_path, $file = '', $exclude_file = '') {
- $dir_file_name = array( );
- if (!( ( is_dir( $dir_path ) && $area_lord = @opendir( $dir_path ) ))) {
- return $dir_file_name;
- }
- while ($dir_info = @readdir( $area_lord )) {
- if (!( in_array( $dir_info, array( '.', '..', '.svn', 'index.htm' ) ))) {
- if ($file != '') {
- if (!( strstr( $dir_info, $file ))) {
- continue;
- }
- }
- if (!( ( $exclude_file != '' && strstr( $dir_info, $exclude_file ) ))) {
- $dir_file_name[] = $dir_info;
- continue;
- }
- continue;
- }
- }
- closedir( $area_lord );
- return $dir_file_name;
- }
- ............................................................................
- ....................................
- .............
Advertisement
Add Comment
Please, Sign In to add comment