meine Source sieht so aus, das ist die, die ich hier her habe.
Ich konnte sie ja nicht rein setzen weil er wirklich alle datein auflistet, die hochgezogen sind (inkl. dbconnect)
Ich hab [php]$url=$_GET['url'];
$dir = str_replace("\\","/",dirname($url)."/");
$subdir = str_replace("\\","/",dirname($_SERVER['SCRIPT_NAME'])."/"); [/php]
gegen das [php]$url=$_GET['url'];
$dir = str_replace("\\","/",dirname($url)."/");
$subdir='/'; [/php]
ausgetauscht. aber hat nichts gebracht.
Wäre schön wenn mir jemand helfen könnte
[php]<?php
/**
* @desc NEW SOURCE.PHP by ALUCARD :>
* @longdesc Die Source.php zeigt nur noch explizit freigegebene Dateien an und sieht hübscher aus als das Original.
* Dies ist eine spezielle angepasste Version für die Veröffentlichung im Anpera Forum
* @author Alucard
* @version V1.0 for DS v2.5
* @copyright Alucard for Atrahor.de (2006)
*/
require_once 'common.php';
/**
* Trage hier alle Dateien ein, die durch den Sourcecodeeditor angezeigt werden
*/
$legal_files = array(
'about.php',
'academy.php',
'admin.php',
'adventsiliena.php',
'alchimist.php',
'anticheat.php',
'appoencode.php',
'armor.php',
'armoreditor.php',
'avatars.php',
'badehaus.php',
'badnav.php',
'badword.php',
'bank.php',
'banker.php',
'barbier.php',
'battle.php',
'battlearena.php',
'beggar.php',
'bio.php',
'bios.php',
'brunnen.php',
'brunnenschatz.php',
'center.php',
'chat.php',
'chatdelete.php',
'chocobo.php',
'classes.php',
'clothes.php',
'colorpicker.php',
'colors.php',
'common.php',
'configuration.php',
'connector.php',
'create.php',
'createrpg.php',
'creatures.php',
'dag.php',
'dbwrapper.php',
'donators.php',
'drabru.php',
'dracula.php',
'dragru.php',
'draker.php',
'drasch',
'drushop',
'edel.php',
'eisturm.php',
'elemententurm.php',
'elwus.php',
'enter.php',
'farbcodes.php',
'forest.php',
'fri.php',
'friedhof.php',
'gardens.php',
'gartenrp.php',
'gartensee.php',
'gaya.php',
'goetter2.php',
'goettertempel.php',
'gottwahl.php',
'graveyard.php',
'gypsy.php',
'götter.php',
'healer.php',
'hexe.php',
'hof.php',
'houses.php',
'huegel.php',
'index.php',
'innbord.php',
'invhandler.php',
'itemeditor.php',
'jail.php',
'kalender.php',
'library.php',
'list.php',
'lodge.php',
'lodgerp.php',
'logdnet.php',
'login.php',
'logs.php',
'lottery.php',
'lotto.php',
'mail.php',
'man.php',
'moor.php',
'modt.php',
'mounts.php',
'mystischersee.php',
'nagel.php',
'newday.php',
'newgiftshop.php',
'news.php',
'nhmaster.php',
'nhouses.php',
'nordstrasse.php',
'olddraw.php',
'orte.php',
'outhouse.php',
'path.php',
'petition.php',
'phiolendesrisiko.php',
'pvp.php',
'prefs.php',
'pvparena.php',
'raceeditor.php',
'reanda.php',
'rebirth.php',
'referers.php',
'referral.php',
'registratur.php',
'retitle.php',
'richtplatz.php',
'rock.php',
'rpwiederbeleben.php',
'sanela.php',
'sanelabrunnen.php',
'sanelaschmiede.php',
'sanelasee.php',
'sanelastrand.php',
'setnewday.php',
'shades.php',
'shrine.php',
'stables.php',
'stats.php',
'stonesgame.php',
'styx.php',
'suhouser.php',
'taunt.php',
'thehell.php',
'todolist.php',
'topwebvote.php',
'train.php',
'training.php',
'treeofdeath.php',
'turm.php',
'vendor.php',
'user.php',
'verfifi.php',
'viewpetition.php',
'village.php',
'weaponeditor.php',
'weapons.php',
'weihnachten.php',
'weihnachtsmarkt.php',
'well.php',
'work.php',
'wurf.php',
'zimmer.php',
'zulan.php'
);
$url=$_GET['url'];
$dir = str_replace("\\","/",dirname($url)."/");
$subdir = str_replace("\\","/",dirname($_SERVER['SCRIPT_NAME'])."/");
while(substr($subdir,0,2)=="//" ){
$subdir = substr($subdir,1);
}
$legal_dirs = array(
array('dir'=>$subdir,'td'=>1),
array('dir'=>$subdir.'special/','td'=>1),
);
$str_out = '<html><head><title>Quellcodeviewer der Dragonslayer-Edition</title><link href="newstyle.css" rel="stylesheet" type="text/css"><style type="text/css">
@import url(templates/colors.css);
</style></head><body bgcolor="#000000" text="#CCCCCC"><table cellpadding=5 cellspacing=0 width="100%"><tr><td class="popupheader"><b>Quellcodeviewer der Dragonslayer-Edition</b></td></tr><tr><td valign="top" width="100%">';
$str_out .= '`c`b`&Quellcodeviewer der Dragonslayer-Edition : '.$logd_version.'`0`b`c`n`n';
$str_out .= 'Anmerkung: Dies ist nur ein Auszug aus dem Source. Um das jeweils aktuelle, vollständige Release zu erhalten,
ist eine Anfrage mit gültiger Email-Adresse erforderlich. Ebenso sollte darin die Serveradresse bzw.
sonstiger Verwendungszweck aufgeführt sein. 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']);
$check = preg_replace('/(.*?)\//','',$file);
$dir = str_replace( $check, '', $file );
$file = '.'.$file;
$str_out .= '`n`c`&`b'.$file.'`b`c`n';
$str_out .= '<a href="source.php">zurück</a>`n';
if($session['user']['superuser']>0 || (in_array( $check, $legal_files )) && in_dir( $dir ))
{
$buffer = highlight_file( $file, true );
$rows = count(explode('<br />',$buffer));
$znr = '';
for($i=1; $i <= $rows; $i++) {
$znr .= "$i:<br />";
}
$buffer = '<code><nobr>'.$buffer.'</nobr></code>';
$str_out .= '<table style="width: 100%;padding:0px;margin:0px;" cellspacing="0">
<tr>
<td style="text-align: right; width: 25px; background: #AFAFAF; border-right: 1px solid #000000;">
<code><nobr>'.$znr.'</nobr></code>
</td>
<td style="background: #EFEFEF;" valign="top">';
output($str_out,true);
$output .= $buffer;
$str_out = '</td>
</tr>
</table>';
}
else
{
$str_out .= '`4`b<big><big>Datei kann nicht angezeigt werden!</big></big>`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' ){
continue;
}
$files[$curr_dir['dir']][] = $entry;
}
sort($files[$curr_dir['dir']]);
}
$str_out .= '`c<table cellspacing="2" cellpadding="2"><tr>';
$lasttd = 1;
foreach( $legal_dirs as $curr_dir ){
if( $lasttd ){
$str_out .= '<td valign="top"><table cellspacing="2" cellpadding="2">';
}
$str_out .= '<tr class="trhead"><td colspan="4">`c.'.$curr_dir['dir'].'`c</td></tr>';
foreach( $files[$curr_dir['dir']] as $file ){
if($session['user']['superuser'] == 0)
{
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 .= '<tr class="'.$style.'">
<td>'.$file.'</td>
<td><nobr>[ <a href="'.$showlink.'">show</a> ]</nobr></td>
</tr>';
}
//$str_out .= '';
if( $curr_dir['td'] ){
$str_out .= '</table></td>';
}
$lasttd = $curr_dir['td'];
}
$str_out .= '</tr></table>`c';
break;
}
$str_out .= '</td></tr><tr><td bgcolor="#000000" align="center">'.$logd_version.'</td></tr>
</table></body></html>';
output($str_out, true );
echo $output;
?>[/php]