$g ){is_array ( $e[$f] ) ? d ( $e[$f] ) : ( $e[$f]=stripslashes ( $e[$f] ) );}}$h=array ( &$_GET,&$_POST,&$_COOKIE,&$_REQUEST);d ( $h );}function cleanQuotedHTML($i) {$i=$i[1];$j=@html_entity_decode($i,k,"ISO-8859-1"); $j=@preg_replace('/&#(\d+);/me',"chr(\\1)",$j); $j=@preg_replace('/&#x([a-f0-9]+);/mei',"chr(0x\\1)",$j); return utf8_encode(rawurlencode($j));}function l($j){return str_replace("'","'",$j); }function m($n){$o=$n;$o=str_replace("&","__AMP__amp",$o);$o=str_replace("<","__AMP__lt",$o);$o=str_replace(">","__AMP__gt",$o);$o=str_replace("'","__AMP__apos",$o);$o=str_replace('"',"__AMP__quot",$o);$o= preg_replace_callback('/(&#[0-9a-fx]+;)/mi','cleanQuotedHTML',$o);$o=str_replace("&#x","__AMP_PUOND__",$o);$o=str_replace("&#","__AMP_PUOND__",$o);$o=str_replace("&","__AMP__amp",$o);$o=str_replace('%',"__PERCENT__",$o);$o=p($o);$o=str_replace("__AMP_PUOND__","&#x",$o);$o=str_replace("__AMP__amp","&",$o);$o=str_replace("__AMP__lt","<",$o);$o=str_replace("__AMP__gt",">",$o);$o=str_replace("__AMP__apos","'",$o);$o=str_replace("__AMP__quot",""",$o);$o=str_replace('__PERCENT__',"%",$o);return $o;}function p($q) {$r="";$s;if (empty($q)) {return $r;}$t=strlen($q);for ($u=0; $u<$t; $u++) {$s=ord($q{$u});if (($s==0x9) || ($s==0xA) || ($s==0xD) || (($s>=0x28) && ($s<=0xD7FF)) || (($s>=0xE000) && ($s<=0xFFFD)) || (($s>=0x10000) && ($s<=0x10FFFF))) {$r .=chr($s);}else {$r .=" ";}}return $r;}function v($n,$w=false) {global $encrypt;$o=$n;$o=str_replace("&","%26",$o);$o=str_replace("?","%3F",$o);if($encrypt){$o="__1".base64_encode($o);}return $o;}if(@ini_get('safe_mode')){print('<'.urldecode("%3F").'xml version="1.0" '.urldecode("%3F").'>');print('');print('');print('ERROR');print('1. ERROR');print('');print('');print('ERROR');print('2. PHP is running in "Safe Mode".');print('');print('');print('ERROR');print('3. Contact Server Admin to Correct.');print('');print('');print('ERROR');print('4. ------------------');print('');print('');print('ERROR');print('5. You can still use Rave,');print('');print('');print('ERROR');print('6. however all URLs must be');print('');print('');print('ERROR');print('7. entered manually.');print('');print('');exit;}function x($y){$z="__:__";$r=str_replace("://",$z,$y);$r=str_replace("\\","/",$r);$r=str_replace("//","/",$r);$r=str_replace($z,"://",$r);if(substr($r,-1)=="/"){$r=substr($r,0,sizeof($r)-1);}return $r;}if(!isset($_SERVER['SCRIPT_NAME'])){$_REQUEST=get_defined_vars();$_SERVER=$Za;}$Zb=explode("/",$_SERVER['PHP_SELF']);$Zc=array_pop($Zb);$Zd['wwwroot']=$httpOption."://".$_SERVER['HTTP_HOST'];$Zd['www']=$Zd['wwwroot'].(implode("/",$Zb));$Zd['wwwself']=$Zd['wwwroot'].$_SERVER['PHP_SELF'];if(!@getcwd ()){$Ze=dirname(__FILE__);}else{$Ze=getcwd();}$Zd['sys']=x($Ze);$Zf=strrev ( $Ze );$Zg=strrev ( Zh($Zd['www']) );$Zi=strrev ( substr($Zf,strlen($Zg) ) );$Zd['sysroot']=$Zi;function Zj($Zk,$Zl){foreach($Zk as $q){if(@stristr(@strtolower($Zl),@strtolower($q))){return true;}}return false;}function Zm($Zn,$Zo=false) {global $b;if($Zo){$Zp=$Zo;}else{$Zp=$b['media_types'];}$Zq=array ();if(!$Zn || $Zn==""){$Zn=".";}$Zr=$b['hide_folders'];$Zs=$b['hide_files'];$Zt=$b['hide_keywords'];$Zu=@opendir($Zn);if($Zn){while (false !==($Zv=@readdir($Zu))){if($Zv!='.' && $Zv!='..') {$Zv=$Zn.'/'.str_replace("\\","/",$Zv);$Zw=Zx($Zv);if(is_dir($Zv)) {if( !Zj($Zr,$Zw['filename']) && !Zj($Zt,$Zw['filename']) ){$Zq=array_merge($Zq,Zm($Zv,$Zp));}}else{if(in_array(strtolower($Zw['ext']),$Zp)){if(!Zj($Zs,$Zw['filename']) && !Zj($Zt,$Zw['filename']) ){$Zq[]=$Zv;}}}}}@closedir($Zu);}return $Zq;}function Zy($Zn){global $b;$Zn=utf8_encode($Zn); $Zz=array();$ZZa=array ();$ZZb=array ();$Zq=array ();$Zu=@opendir($Zn);$ZZc=$b['media_types'];$Zr=$b['hide_folders'];$Zs=$b['hide_files'];$Zt=$b['hide_keywords'];$ZZd=$b['allowFolderNavigation'];if($Zn){while (false !==($Zv=@readdir($Zu))){if($Zv !='.' && $Zv !='..' && substr ($Zv,0,1 ) !="." && substr ($Zv,0,2 ) !="..") {$Zv=$Zn.'/'.str_replace("\\","/",$Zv);$Zw=Zx($Zv);if(is_dir($Zv) && $ZZd==true) {if(!Zj($Zr,$Zw['filename']) && !Zj($Zt,$Zw['filename'])){$ZZb[]=$Zv;}}else{if(in_array(strtolower($Zw['ext']),$ZZc)){if(!Zj($Zs,$Zw['filename']) && !Zj($Zt,$Zw['filename'])){$Zq[]=$Zv;}}}}}@closedir($Zu);}$ZZa['dirs']=$ZZb;$ZZa['files']=$Zq;return $ZZa;}function ZZe ($ZZf,$ZZg,$ZZh,$ZZi=false,$ZZj=false) {if(is_array($ZZf) && count($ZZf)>0) {foreach(array_keys($ZZf) as $f) {$ZZk[$f]=@$ZZf[$f][$ZZg];}if(!$ZZi) {if ($ZZh=='asc'){asort($ZZk);}else{ arsort($ZZk);}}else{if ($ZZj===true) {natsort($ZZk);}else{natcasesort($ZZk);}if($ZZh !='asc') {$ZZk=array_reverse($ZZk,true);}}foreach(array_keys($ZZk) as $f) {if (is_numeric($f)) {$ZZl[]=$ZZf[$f];}else{$ZZl[$f]=$ZZf[$f];}}return $ZZl;}else{return $ZZf;}}function ZZm($ZZn,$ZZo=false){print "
";print_r($ZZn);print "
";if($ZZo){exit;}}function ZZp($ZZq){$o="";foreach($ZZq as $f=>$g){$o .="<".$f.">".m(trim($g))."".newline;}return $o;}function ZZr($ZZq){$o=array();foreach($ZZq as $f=>$g){$o[$f]=l(trim($g));}return $o;}function ZZs($ZZt,$ZZu=false,$ZZv=null){global $b,$Zd,$playlistKind;$ZZw=$b['coverartBasename'];$ZZx=utf8_decode(rawurldecode($ZZt));if($ZZv){$ZZy=$ZZv;}else{if($ZZu){$ZZy=array();$ZZy['files']=Zm($ZZx);$ZZy['dirs']=array();}else{$ZZy=Zy($ZZx);}}$ZZb=array();$Zq=array();$ZZz=array();$ZZZa=$b['quirksmode'];$ZZZb=$b['getID3info'];$ZZZc=$b['getID3image'];$ZZZd=$b['playlistKind'];$ZZZe="";if($ZZZd !=$playlistKind){$ZZZe="k=".$ZZZd."&";}if( ! $b['ignoreFolders']){if(sizeof($ZZy['dirs'])>0){$ZZZf=$ZZy['dirs'][0];$ZZZg=Zx($ZZZf);$ZZZh=Zx($ZZZg['basepath']);$ZZZi=ZZZj($ZZZh['basepath']);for($u=0; $u1){array_shift($ZZZp);}$ZZZo=implode($ZZZp);}$ZZZk['title']=preg_replace ('/_/'," ",$ZZZo);$ZZb[]=$ZZZk;}}}if(sizeof($ZZy['files'])>0){for($u=0; $u$g){if($f=='track_number'){$ZZZk['index']=$g;} else if($f=='album' || $f=='year'){$ZZZk[$f]=$g;}}if(@$ZZZr['artist']){$ZZZk['artist']=@$ZZZr['artist'];}if( ! @$ZZZr['artist'] && @$ZZZk['band']){$ZZZk['artist']=@$ZZZk['band'];}$ZZZo=$ZZZg['basename'];if($ZZZa){$ZZZp=explode(".",$ZZZo);if(sizeof($ZZZp)>1){array_shift($ZZZp);}$ZZZo=implode($ZZZp);}$ZZZk['title']=(@$ZZZr['title'])? @$ZZZr['title'] : preg_replace ('/_/'," ",$ZZZo);if(@$ZZZr['genre']){$ZZZk['genre']=@$ZZZr['genre'];}if( isset($ZZZr['link']) ){$ZZZk['link']=$ZZZr['link'];}$ZZZt=ZZZn($ZZZg['basepath'].slash.$ZZZg['basename']);if( ! $ZZZt ){if( isset($ZZZr['imageExists']) || isset($ZZZr['image'])){$ZZZt=$Zd['wwwself']."?jj=".v($ZZZi,true);}if( ! $ZZZt ){$ZZZt=ZZZn($ZZZg['basepath'].slash.$ZZw);}}if($ZZZt){$ZZZk['image']=$ZZZt;}if( isset($ZZZr['index']) ){$ZZZk['index']=$ZZZr['index'];}$Zq[]=$ZZZk;}}if($b['shuffle']==true){shuffle($Zq); }else{if($b['sortIndex'] !="none"){$ZZZu=$b['sortIndex'];$ZZZv=$b['sortOrder'];$Zq=ZZe ($Zq,$ZZZu,$ZZZv,true,false);$ZZb=ZZe ($ZZb,$ZZZu,$ZZZv,true,false);}}$o="";if($ZZZd=="xml"){$ZZZw=m(ZZZn($ZZx.slash.$ZZw));$ZZZx="";if($ZZZw){$ZZZx= ' image="'.$ZZZw.'"';}$o="".newline;} else if($ZZZd=="json"){$ZZZy=array();$ZZZw=ZZZn($ZZx.slash.$ZZw);if($ZZZw){$ZZZy["cover"]=$ZZZw;}}else{$o="";}if($ZZZd=="json"){$ZZZy["items"]=array();}for($u=0; $u-1){$Zq=array_slice ($Zq,0,$ZZZz);}for($u=0; $uoption_save_attachments=true;}else{$c->option_save_attachments=false;}$ZZZZl=$c->analyze(urldecode($ZZZZk));getid3_lib::CopyTagsToComments($ZZZZl);}else{$ZZZZl=array();}$o=array();if(sizeof($ZZZZl)>0){if(isset($ZZZZl['comments_html'])){$ZZZZm=@$ZZZZl['comments_html'];foreach($ZZZZm as $f=>$g){if($f=="comment"){$ZZZZn=@$ZZZZm["comment"][0];$ZZZZo=@$ZZZZm["encoded_by"][0];if($ZZZZo && stristr ($ZZZZo,"itunes") ){$ZZZZn=@$ZZZZl["tags_html"]["id3v2"]["comment"][3];}$o["comment"]=$ZZZZn;}else{$o[$f]=@$g[0];}}}if(isset($ZZZZl['tags_html'])){if(isset($ZZZZl['tags_html']['id3v1'])){if(isset($ZZZZl['tags_html']['id3v1']['track'])){$o['index']=@$ZZZZl['tags_html']['id3v1']['track'][0];}}if(isset($ZZZZl['tags_html']['id3v2'])){if(isset($ZZZZl['tags_html']['id3v2']['comment'])){foreach($ZZZZl['tags_html']['id3v2']['comment'] as $f=>$g){if(is_string($g)){if(substr($g,0,4)=="http"){$o["link"]=$g;break;}}}}}}if(isset($ZZZZl['id3v2']['APIC'][0]['mime'])){$o['imageExists']=1; }if($b['getID3image']){if(isset($ZZZZl['comments']['picture'][0]['data'])){$o['image']=$ZZZZl['comments']['picture'][0]['data'];$o['imageMime']=$ZZZZl['comments']['picture'][0]['image_mime'];}}}return $o;}function ZZZn($ZZZZp){$o="";$ZZZZq=array("png","jpg","PNG","JPG");for($u=0;$u';header("Pragma: public",false);header("Expires: Thu,19 Nov 1981 08:52:00 GMT",false);header("Cache-Control: must-revalidate,post-check=0,pre-check=0",false); header("Cache-Control: no-store,no-cache,must-revalidate",false);header("Content-Type: text/xml; charset=utf-8",false);if($b['allowCrossDomainAccess']){header('Access-Control-Allow-Credentials: true',false); header('Access-Control-Allow-Origin: *',false);header('Access-Control-Allow-Methods: GET,POST',false);header('Access-Control-Allow-Headers: Content-Type',false);}print ($ZZZZZc.$ZZZZZb);exit;}function ZZZZZd($ZZZZZe){global $b;header("Pragma: public",false);header("Expires: Thu,19 Nov 1981 08:52:00 GMT",false);header("Cache-Control: must-revalidate,post-check=0,pre-check=0",false);header("Cache-Control: no-store,no-cache,must-revalidate",false);header("Content-Type: text/plain; charset=utf-8");if($b['allowCrossDomainAccess']){header('Access-Control-Allow-Credentials: true',false); header('Access-Control-Allow-Origin: *',false);header('Access-Control-Allow-Methods: GET,POST',false);header('Access-Control-Allow-Headers: Content-Type',false);}print ($ZZZZZe);exit;}function ZZZZZf($ZZZZZg=false){global $ZZZZZh,$b,$c;if ( $ZZZZZh["i"] ){$b['getID3info']=true;if ( $ZZZZZh["j"] ){$b['getID3image']=true;}}if($b['getID3info']){$ZZZZZi='wimpy.getid3'.slash.'getid3.php';if (is_file($ZZZZZi)){require ($ZZZZZi);} else if(is_file('getid3.php')){require ('getid3.php');}else{$b['getID3info']=false;}}if($b['getID3info']){$c=new getID3;if($ZZZZZg){$c->option_save_attachments=true;}}}function ZZZZZj ($g) {if( substr($g,0,3)=="__1" ){return base64_decode( substr($g,3,strlen($g)) );}else{return $g;}}function ZZZZZk($j){$o=rawurldecode($j); $o=ZZZZZj($o);$o=rawurldecode($o); $o=stripslashes($o);$o=strip_tags($o);$o=str_replace("\\","x",$o);$o=str_replace("..","x",$o);$o=str_replace("./","x",$o);$o=str_replace("/.","x",$o);return $o;}function ZZZZZl(){header("HTTP/1.0 404 Not Found",false);print("

404 Not Found

");exit;}function ZZZZZm($ZZZZZn,$ZZZZZo) {$Zn=new ZZZZZp($ZZZZZn);$ZZZZZq=new ZZZZZr($Zn);$ZZZZZs=new ZZZZZt($ZZZZZq,$ZZZZZo,ZZZZZt::ZZZZZu);$ZZZZZv=array();foreach($ZZZZZs as $ZZZZy) {$ZZZZZv=array_merge($ZZZZZv,$ZZZZy);}return $ZZZZZv;}function ZZZZZw($ZZZZZo) {$ZZZZZs=glob($ZZZZZo);foreach (glob(dirname($ZZZZZo).slash.'*',ZZZZZx|ZZZZZy) as $Zn) {$ZZZZZs=array_merge($ZZZZZs,ZZZZZw($Zn.slash.basename($ZZZZZo),""));}return $ZZZZZs;}function ZZZZZz($ZZZZZo,$ZZZZZZa){$ZZv=ZZZZZw($ZZZZZo);foreach ($ZZv as &$j) {$j=$ZZZZZZa.slash.str_replace('.'.slash,"",$j);}return $ZZv;}function ZZZZZZb($ZZv){global $b;if($ZZv){if($b['playlistKind']=="xml"){ZZZZZa( $ZZv );}else{ZZZZZd( $ZZv );}}else{if($b['playlistKind']=="xml"){print("ERROR");}else{print("ERROR");}}exit;}$ZZZZZh["d"]=ZZZZZk( @$_REQUEST['d'] );$ZZZZZh["f"]=ZZZZZk( @$_REQUEST["f"] );$ZZZZZh["jj"]=ZZZZZk( @$_REQUEST["jj"] );$ZZZZZh["s"]=ZZZZZk( @$_REQUEST["s"] );$ZZZZZh["k"]=ZZZZZk( @$_REQUEST["k"] );$ZZZZZh["u"]=ZZZZZk( @$_REQUEST["u"] );$ZZZZZh["v"]=isset($_REQUEST["v"]) || array_key_exists("v",$_REQUEST);$ZZZZZh["o"]=isset($_REQUEST["o"]) || array_key_exists("o",$_REQUEST);$ZZZZZh["i"]=isset($_REQUEST["i"]) || array_key_exists("i",$_REQUEST);$ZZZZZh["j"]=isset($_REQUEST["j"]) || array_key_exists("j",$_REQUEST);if($ZZZZZh["k"]){if($ZZZZZh["k"]=="json"){$ZZZd="json";} else if($ZZZZZh["k"]=="xml"){$ZZZd="xml";} else if($ZZZZZh["k"]=="txt"){$ZZZd="txt";}$b['playlistKind']=$ZZZd;}if($ZZZZZh["u"]){if($ZZZZZh["u"]=="1"){$urlStyle=1;} else if($ZZZZZh["u"]=="2"){$urlStyle=2;}$b['urlStyle']=$urlStyle;}if($ZZZZZh["v"]){print $wimpyVersion;exit;} else if ($ZZZZZh["o"]){print "ok";exit;} else if ($ZZZZZh["s"]){ZZZZZf();$ZZZZZZc=$Zd['sys'];$ZZv=array();$ZZv['files']=ZZZZZz("*".$ZZZZZh["s"]."*.mp3",$ZZZZZZc);$ZZv['dirs']=array();$ZZZZZZd=ZZs($ZZZZZZc,false,$ZZv);ZZZZZZb($ZZZZZZd);ZZm($ZZZZZZd);} else if ($ZZZZZh["d"]){ZZZZZf();$ZZZZZZc=ZZZZs($ZZZZZh["d"]);if( file_exists ($ZZZZZZc) ){$ZZZZZZd=ZZs($ZZZZZZc,false);}else{$ZZZZZZd=null;}ZZZZZZb($ZZZZZZd);} else if ($ZZZZZh["f"]){$ZZZZZZe=$ZZZZZh["f"];$ZZZZZZf=Zx($ZZZZZZe);$ZZZZZZg=true;if( in_array ($ZZZZZZf['ext'],$b['media_types']) ){$ZZZZZZc=ZZZZs($ZZZZZZe);if( file_exists ($ZZZZZZc) ){$ZZZZZZg=false;ZZZZx($ZZZZZZc,$ZZZZZZf['filename'],"application/octet-stream");}}if($ZZZZZZg){ZZZZZl();}} else if ($ZZZZZh["jj"]){$ZZZZZZc=ZZZZs ( $ZZZZZh["jj"] );$ZZZZZZg=true;if( file_exists ($ZZZZZZc) ){$b['getID3info']=true;$b['getID3image']=true;ZZZZZf(true);$ZZZr=ZZZs($ZZZZZZc);if( isset($ZZZr["image"]) ){$ZZZZZZg=false;$ZZZZZZh=$ZZZr["image"];$ZZZZz=$ZZZr["imageMime"];header('Content-type: '.$ZZZZz);echo $ZZZZZZh;}else{$ZZZZZZi=ZZZn($Zd['sys'].slash.$b['coverartBasename']);if($ZZZZZZi){$ZZZZZZg=false;$ZZZZZZf=Zx($ZZZZZZi);header("Content-Type: image/".$ZZZZZZf['ext']);readfile($ZZZZZZi);}}}if($ZZZZZZg){ZZZZZl();}}else{ZZZZZf();if($b['playlistKind']=="xml"){ZZZZZa(ZZs($Zd['sys'],$findAllMedia,false));}else{ZZZZZd(ZZs($Zd['sys'],$findAllMedia,false));}}?>