$subdir,'td'=>1), array('dir'=>$subdir.'special/','td'=>1), ); //User die den Sourcecode sehen dürfen, bekommen noch ein paar andere Ordner angezeigt if($access_control->su_check(access_control::SU_RIGHT_SOURCEVIEW)) { $legal_dirs[] = array('dir'=>$subdir.'lib/','td'=>0); $legal_dirs[] = array('dir'=>$subdir.'item_modules/','td'=>0); $legal_dirs[] = array('dir'=>$subdir.'houses_modules/extensions/','td'=>0); $legal_dirs[] = array('dir'=>$subdir.'houses_modules/builds/','td'=>0); $legal_dirs[] = array('dir'=>$subdir.'module/specialty_modules/','td'=>0); $legal_dirs[] = array('dir'=>$subdir.'module/boss_modules/','td'=>0); $legal_dirs[] = array('dir'=>$subdir.'lib/classes/','td'=>0); } //popup_header('Quellcode der Dragonslayer-Edition'); $str_out = ' Quellcode der Dragonslayer-Edition
Quellcode der Dragonslayer-Edition
'; $str_out .= '`c`b`&Quellcode der Dragonslayer-Edition: '.GAME_VERSION.'`0`b`c`n`n'; $str_out .= 'Anmerkung: Dies ist nur ein Auszug aus dem Source. Ein etwas älteres, abgespecktes Release der Dragonslayer-Edition ist für jeden Interessenten frei zum Download verfügbar. Was wir uns unbedingt verbitten, ist Diebstahl unserer Arbeit ohne Nennung des Copyrights.`n Falls beim Lesen des Source ein Bug entdeckt werden sollte, bitten wir um sofortige Meldung per Anfrage!`n`n'; if($session['message'] != '') { output('`n`b'.$session['message'].'`b`n`n'); $session['message'] = ''; } function in_dir( $dir ){ global $legal_dirs; foreach($legal_dirs as $d){ if( $d['dir'] == $dir ){ return 1; } } return 0; } switch($_GET['op']) { case 'show': $file = urldecode($_GET['file']); $subdir = str_replace("\\","/",dirname($_SERVER['SCRIPT_NAME'])."/"); $file = str_replace($subdir,'/',$file); $check = preg_replace('/(.*?)\//','',$file); $dir = str_replace( $check, '', $file ); $file = '.'.$file; $str_out .= '`n`c`&`b'.$file.'`b`c`n'; $str_out .= 'zurück`n'; if(($access_control->su_check(access_control::SU_RIGHT_SOURCEVIEW) == true || (in_array($check, $legal_files )) && in_dir( $dir )) && !in_array( $check, $illegal_files )) { $buffer = highlight_file( $file, true ); $buffer = str_mask_email($buffer); $rows = count(explode('
',$buffer)); $znr = ''; for($i=1; $i <= $rows; $i++) { $znr .= "$i:
"; } $buffer = ''.$buffer.''; $str_out .= '
'.$znr.' '; output($str_out); $output .= $buffer; $str_out = '
'; } else { $str_out .= '`4`bDatei kann nicht angezeigt werden!`b`n'; } break; // Standardansicht, Auswahl default: $session['disablevital'] = false; $files = array(); foreach( $legal_dirs as $curr_dir ){ $d = dir('./'.$curr_dir['dir']); $files[$curr_dir['dir']] = array(); while (false !== ($entry = $d->read())) { $end = substr($entry,strrpos($entry,".")); if( $end != '.php' && $end != '.lib.php' && $end != '.inc.php' ){ continue; } if( in_array( $entry, $illegal_files ) ){ continue; } array_push($files[$curr_dir['dir']],$entry); } sort($files[$curr_dir['dir']]); } $str_out .= '`c'; $lasttd = 1; foreach( $legal_dirs as $curr_dir ){ if( $lasttd ){ $str_out .= ''; } $lasttd = $curr_dir['td']; } $str_out .= '
'; } $str_out .= ''; $style=''; foreach( $files[$curr_dir['dir']] as $file ){ if($access_control->su_check(access_control::SU_RIGHT_SOURCEVIEW) == false) { if( !in_array( $file, $legal_files ) ) { continue; } } $style = ($style == 'trlight' ? 'trdark' : 'trlight'); $showlink = 'source.php?op=show&file='.urlencode($curr_dir['dir'].$file); $str_out .= ''; } //$str_out .= ''; if( $curr_dir['td'] ){ $str_out .= '
.'.$curr_dir['dir'].'
'.$file.'
`c'; break; } $str_out .= '
'.GAME_VERSION.'
'; output($str_out); echo $output; ?>