ER-Sourceviewer 2007 v2.0

Alle Dateien, die hier eingesehen werden können, sind unter der GNU GPL lizenziert. Wenn du etwas darin findest, das du gerne hättest, so schreibe mir doch bitte eine Anfrage damit ich, wenn ich es rausgeben will, alle Änderungen raussuchen könnte. Denn ich übernehme keine Verantwortung, solltest du was rausnehmen und es geht nicht. Und Support deswegen geb ich schon gar nicht.

Solltest du eine Schwachstelle im Code finden, sei es eine kritische Lücke oder eine Möglichkeit zu cheaten, dann bitte ich dich, mir das mitzuteilen. Solltest du beim cheaten erwischt werden, werde ich deinen Account eigenhändig löschen & bannen; Solltest du meinen Server angreifen, so werde ich meine Rechtsschutzversicherung kontaktieren.

Zur Source springen

Verzeichnisse:


Source anzeigen

Nach Oben


<?php

// 15082004

require_once "common.php";


if (
$session['user']['loggedin']) {
    
addcommentary();
    
checkday();
    
addnav("Bewohnerliste");
    
addnav("Gerade Online","list.php?ret=" $_GET['ret'] . "");

} else {
    
addnav("Bewohnerliste");
    
addnav("Gerade Online","list.php");
}

page_header("Einwohnerliste");

$session['user']['standort'] = "Einwohnerliste";

output("`n`c<font size='6' face='times-new-roman'>Die Einwohnerliste</font>`c`n",true);
output("`cWillkommen in der Einwohnerliste Saint-Omars!`n 
Hier findest du jeden, der in unserem Land wohnt.`n 
Außerdem kannst du dich hier über deine Mitbürger informieren und ihren Status sehen.`0`c`n`n"
);

$playersperpage 15;

$sql             "SELECT count(acctid) AS c FROM accounts WHERE locked=0";
$result             db_query($sql);
$row             db_fetch_assoc($result);
$totalplayers     $row['c'];

if (
$_GET['op'] == "search") {
    
$search "%";
    for (
$x 0$x strlen($_POST['name']); $x++) {
        
$search .= substr($_POST['name'],$x,1) . "%";
    }
    
$search " AND name LIKE '" addslashes($search) . "' ";
} else {
    
$pageoffset     = (int) $_GET['page'];
    if (
$pageoffset 0)
        
$pageoffset--;
    
$pageoffset *= $playersperpage;
    
$from         $pageoffset 1;
    
$to             min($pageoffset $playersperpage,$totalplayers);

    
$limit " LIMIT $pageoffset,$playersperpage ";
}

addnav("Hilfe");
addnav("Ansprechpartner","list_adv.php?op=team&ret=" $_GET['ret'] . "");
addnav("Avatarliste","avatarlist.php?ret=" $_GET['ret'] . "");
//addnav("NPC-Auflistung","list_adv.php?op=npc&ret=" . $_GET['ret'] . "");

addnav("Zurück");
if (
$session['user']['loggedin']) {
    
$village false;
    if (
$session['user']['alive']) {
        if (
$_GET['ret'] == 'village') {
            
addnav("nach Saint-Omar","village.php");
        } else if (
$_GET['ret'] == 'navaria') {
            
addnav("nach Navaria","navaria.php");
        } else if (
$_GET['ret'] == 'tor') {
            
addnav("zum Stadttor","dorftor.php");
        } else if (
$_GET['ret'] == 'koori') {
            
addnav("nach Koori","koori.php");
        } else if (
$_GET['ret'] == 'aiedail') {
            
addnav("nach Aiedail","aiedail.php");
        } else if (
$_GET['ret'] == 'nurkash') {
            
addnav("nach Nurkash","nurkash.php");
        } else if (
$_GET['ret'] == 'surki') {
            
addnav("nach Surkinaraknos","surki.php?op=platz");
        } else if (
$_GET['ret'] == 'karthago') {
            
addnav("nach Karthago","karthago.php");
        } else if (
$_GET['ret'] == 'maeri') {
            
addnav("nach Maerimydrae","maeri.php");
        } else {
            
$village true;
        }
    } else {
        if (
$_GET['ret'] == 'shades') {
            
addnav("zu den Schatten","shades.php");
        }
    }

    if (!
$_GET['ret'] || $_GET['ret'] == "" || $village)
        
addnav("nach Saint-Omar","village.php");
} else {
    
addnav("zur Login Seite","index.php");
}

addnav("Seiten");
for (
$i 0$i $totalplayers$i += $playersperpage) {
    
addnav("Seite " . ($i $playersperpage 1) . " (" . ($i 1) . "-" min($i $playersperpage,$totalplayers) . ")","list.php?page=" . ($i $playersperpage 1) . "&ret=" $_GET['ret'] . "");
}

// Order the list by level,dragonkills,name so that the ordering is total!
// Without this,some users would show up on multiple pages and some users
// wouldn't show up

if ($session['user']['prefs']['list_type']) {

    
output("<link href='lib/styles/list_style.css' rel='stylesheet' type='text/css'>",true);

    if (
$session['user']['loggedin']) {
        
output("`c<form action='list.php?op=search&ret=" $_GET['ret'] . "' method='POST'>Nach Name suchen: <input name='name'><input type='submit' class='button' value='Suchen'></form>`c`n`n",true);
        
addnav("","list.php?op=search&ret=" $_GET['ret'] . "");
    }

    
output("<table border='0' cellpadding='2' cellspacing='2' align='center' bgcolor='#000' id='bio'>",true);

    if (
$_GET['page'] == "" && $_GET['op'] == "") {
        
output("<tr class='trdark'><td colspan='9'><span class='title'>`c`bFolgende Bewohner sind online:`b`c</span></td></tr>",true);
        
$sql "SELECT rp_char,plotplayer,acctid,rpbulb,superuser,superuser2,name,login,alive,location,sex,level,laston,loggedin,lastip,uniqueid,race,urace,prefs,dragonkills,punch,standort,ghost_mode,ZMeister FROM accounts WHERE locked=0 AND loggedin=1 AND laston>'" date("Y-m-d H:i:s",strtotime(date("c") . "-" getsetting("LOGINTIMEOUT",3600) . " seconds")) . "' AND ghost_mode!=1 
            ORDER BY 
                CASE superuser 
                 WHEN 0 THEN 0
                 WHEN 1 THEN 1
                 WHEN 2 THEN 2
                 WHEN 3 THEN 4
                 WHEN 4 THEN 3
                 WHEN 5 THEN 0
                 WHEN 6 THEN 0
                END DESC, 
                CASE rpbulb
                 WHEN 0 THEN 4
                 WHEN 1 THEN 0
                 WHEN 2 THEN 2
                 WHEN 3 THEN 1
                 WHEN 4 THEN 3
                END ASC,
                level DESC,dragonkills DESC,login ASC    
                "
;
    } else {
        
output("<tr class='trdark'><td colspan='9'><span class='title'>`c`bBewohner des Landes (Seite " . ($pageoffset $playersperpage 1) . ": $from-$to von $totalplayers)`b`c</span></td></tr>",true);
        
$sql "SELECT acctid,name,plotplayer,login,alive,rp_char,rpbulb,superuser,superuser2,location,sex,level,laston,loggedin,lastip,uniqueid,race,urace,prefs,standort,ghost_mode, ZMeister FROM accounts WHERE locked=0 $search ORDER BY level DESC,dragonkills DESC,login ASC $limit";
    }


    
$result     db_query($sql) or die(db_error(LINK));
    
$max     db_num_rows($result);
    if (
$max 100) {
        
output("`\$Es treffen zu viele Namen auf diese Suche zu. Nur die ersten 100 werden angezeigt.`0`n");
    }

    for (
$i 0$i $max$i++) {
        
$row     db_fetch_assoc($result);
        
$prefs     unserialize($row['prefs']);

        
$sql_bio     "SELECT avatar FROM bios WHERE acctid=" $row['acctid'] . "";
        
$result_bio     db_query($sql_bio) or die(db_error(LINK));
        
$row_bio     db_fetch_assoc($result_bio);

        if (
$row['rp_char'] == 0)
            
$rp     "Keine Klasse";
        if (
$row['rp_char'] == 1)
            
$rp     "#4a4a4aR#676767P#858585-#949494C#a2a2a2h#b1b1b1a#c0c0c0r`0";
        if (
$row['rp_char'] == 2)
            
$rp     "#c0c0c0M#b1b1b1i#a2a2a2x#949494-#949494C#7b7b7bh#626262a#4a4a4ar`0";
        if (
$row['rp_char'] == 3)
            
$rp     "#c0c0c0L#a2a2a2e#949494v#6f6f6fe#4a4a4al#4a4a4a-#6f6f6fC#949494h#949494a#b1b1b1r`0";
        if (
$row['rp_char'] == 4)
            
$rp     "`\$Spezielle-Charas";

if (
$row['superuser'] == 0){
            
$rank     "#636363B#838383ü#a4a4a4r#b5b5b5g#cdcdcde#e6e6e6r`0";

if (
$row['sex'] == 1){
            
$rank     "#636363B#7a7a7aü#919191r#a9a9a9g#b5b5b5e#c7c7c7r#dadadai#ecececn`0";

 }
}
            
if (
$row['superuser'] == && $row['ZMeister'] == 1){
                
$rank     "#476b0aZ#4e750de#567f11r#5e8915e#669419m#6e9e1do#76a821n#7eb225i#82b827e#90c03fn#9fc958m#add270e#bcdb89i#cbe4a1s#d9edbat#e8f6d2e#f7ffebr`0";

if (
$row['superuser'] == && $row['sex'] == && $row['ZMeister'] == 1){
                
$rank     "#476b0aZ#4d740de#547d10r#5b8614e#628f17m#69981bo#70a11en#77aa21i#7eb325e#82b827n#8fbf3cm#9cc752e#a9cf68i#b6d77es#c3df93t#d0e7a9e#ddefbfr#eaf7d5i#f7ffebn`0";

 }
}
        
if (
$row['superuser'] == 1){
            
$rank     "#0a3f6bV#125081e#1a6197r#2272adw#277bb8a#589cc9l#89bddat#badeebe#ebfffcr`0";
if (
$row['sex'] == 1){
            
$rank     "#0a3f6bV#104c7ce#16598dr#1d679ew#2374afa#277bb8l#4e95c5t#75afd3e#9ccae0r#c3e4eei#ebfffcn`0";
 }
}
        
if (
$row['superuser'] == 2){
            
$rank     "#656b0aK#798112ü#8e971an#a3ad22s#aeb827t#c2c958l#d6db89e#eaedbar`0";
                                           
if (
$row['sex'] == 1){
                        
$rank     "#656b0aK#757c10ü#858d16n#959e1ds#a5af23t#aeb827l#bec64ee#ced475r#dee29ci#eef0c3n`0";
 }
}
        
if (
$row['superuser'] == 3){
            
$rank     "#ebfffcA#c8816dd#b74226m#90261ai#6a0a0fn`0";

if (
$row['sex'] == 1){
                        
$rank     "#ebfffcA#d1a091d#b74226m#b74226i#90261an#6a0a0fa`0";

if (
$row['acctid'] == 1){
                        
$rank     "#6a0a0fS#781413e#861e17r#94281bv#a2321fe#b03c23r#b74226l#bf6149e#c8816di#d1a091t#d9c0b4u#e2dfd8n#ebfffcg`0";
  }
 }
}



        
if (
$row['superuser'] == 4){
            
$rank     "#6b4c0aI#815c12n#976c1ag#ad7c22e#b88527n#c9a258i#dbbf89e#eddcbau#fff9ebr`0";
if (
$row['sex'] == 1){
            
$rank     "#6b4c0aI#7c5810n#8d6516g#9e721de#af7e23n#b88527i#c69c4ee#d4b375u#e2ca9cr#f0e1c3i#fff9ebn`0";
 }
}
        
if (
$row['superuser'] == 5){
            
$rank     "#636363B#838383ü#a4a4a4r#b5b5b5g#cdcdcde#e6e6e6r`0";
if (
$row['sex'] == 1){
            
$rank     "#636363B#7a7a7aü#919191r#a9a9a9g#b5b5b5e#c7c7c7r#dadadai#ecececn`0";
 }
}

        
//if ($row['superuser'] == 6)
        
if ($row['superuser'] == 7)
                        
$rank     "#008080B#008e8ai#009c95o#00aaa0w#00b8abä#00c7b6c#00c7b6h#00cec0t#00d5cbe#00dcd5r#00e3e0I#00ebebn`0";
        
/*
          if ($row['superuser'] == 5) $rank = "`PBerater`0";
          if ($row['superuser'] == 6) $rank = "`6Kreativler`0";
          if ($row['superuser'] == 7) $rank = "`ÒHerrscher`0";
          if ($row['superuser'] == 8) $rank = "`9Programmierer`0";
          if ($row['superuser'] == 9) $rank = "`@Bürger`0";
         */


if ($row['superuser2'] == 0){
            
$rank2     "";

if (
$row['sex'] == 1){
            
$rank2     "";

 }
}
            
if (
$row['superuser2'] == && $row['ZMeister2'] == 1){
                
$rank2     "#476b0aZ#4e750de#567f11r#5e8915e#669419m#6e9e1do#76a821n#7eb225i#82b827e#90c03fn#9fc958m#add270e#bcdb89i#cbe4a1s#d9edbat#e8f6d2e#f7ffebr`0";

if (
$row['superuser2'] == && $row['sex'] == && $row['ZMeister2'] == 1){
                
$rank2     "#476b0aZ#4d740de#547d10r#5b8614e#628f17m#69981bo#70a11en#77aa21i#7eb325e#82b827n#8fbf3cm#9cc752e#a9cf68i#b6d77es#c3df93t#d0e7a9e#ddefbfr#eaf7d5i#f7ffebn`0";

 }
}
        
if (
$row['superuser2'] == 1){
            
$rank2     "#0a3f6bV#125081e#1a6197r#2272adw#277bb8a#589cc9l#89bddat#badeebe#ebfffcr`0";
if (
$row['sex'] == 1){
            
$rank2     "#0a3f6bV#104c7ce#16598dr#1d679ew#2374afa#277bb8l#4e95c5t#75afd3e#9ccae0r#c3e4eei#ebfffcn`0";
 }
}
        
if (
$row['superuser2'] == 2){
            
$rank2     "#656b0aK#798112ü#8e971an#a3ad22s#aeb827t#c2c958l#d6db89e#eaedbar`0";
                                           
if (
$row['sex'] == 1){
                        
$rank2     "#656b0aK#757c10ü#858d16n#959e1ds#a5af23t#aeb827l#bec64ee#ced475r#dee29ci#eef0c3n`0";
 }
}
        
if (
$row['superuser2'] == 3){
            
$rank2     "#ebfffcA#c8816dd#b74226m#90261ai#6a0a0fn`0";

if (
$row['sex'] == 1){
                        
$rank2     "#ebfffcA#d1a091d#b74226m#b74226i#90261an#6a0a0fa`0";

if (
$row['acctid'] == 1){
                        
$rank2     "#6a0a0fS#781413e#861e17r#94281bv#a2321fe#b03c23r#b74226l#bf6149e#c8816di#d1a091t#d9c0b4u#e2dfd8n#ebfffcg`0";
  }
 }
}



        
if (
$row['superuser2'] == 4){
            
$rank2     "#6b4c0aI#815c12n#976c1ag#ad7c22e#b88527n#c9a258i#dbbf89e#eddcbau#fff9ebr`0";
if (
$row['sex'] == 1){
            
$rank2     "#6b4c0aI#7c5810n#8d6516g#9e721de#af7e23n#b88527i#c69c4ee#d4b375u#e2ca9cr#f0e1c3i#fff9ebn`0";
 }
}
        
if (
$row['superuser2'] == 5){
            
$rank2     "#636363B#838383ü#a4a4a4r#b5b5b5g#cdcdcde#e6e6e6r`0";
if (
$row['sex'] == 1){
            
$rank2     "#636363B#7a7a7aü#919191r#a9a9a9g#b5b5b5e#c7c7c7r#dadadai#ecececn`0";
 }
}

        
//if ($row['superuser2'] == 6)

if ($row['superuser2'] == 7)
                        
$rank2     "#008080B#008e8ai#009c95o#00aaa0w#00b8abä#00c7b6c#00c7b6h#00cec0t#00d5cbe#00dcd5r#00e3e0I#00ebebn`0";
        
/*
          if ($row['superuser2'] == 5) $rank2 = "`PBerater`0";
          if ($row['superuser2'] == 6) $rank2 = "`6Kreativler`0";
          if ($row['superuser2'] == 7) $rank2 = "`ÒHerrscher`0";
          if ($row['superuser2'] == 8) $rank2 = "`9Programmierer`0";
         */



        
if ($row['rpbulb'] == 0)
            
$rpbulb     "<img src='images/system/common/bulb0.gif' alt='Keine Zeit/Lust' titel='Keine Zeit/Lust'>";
        if (
$row['rpbulb'] == 1)
            
$rpbulb     "<img src='images/system/common/bulb1.gif' alt='Suche für später RPs' titel='Suche für später RPs'>";
        if (
$row['rpbulb'] == 2)
            
$rpbulb     "<img src='images/system/common/bulb2.gif' alt='Im RP - Weitere Partner erwünscht' titel='Im RP - Weitere Partner erwünscht'>";
        if (
$row['rpbulb'] == 3)
            
$rpbulb     "<img src='images/system/common/bulb3.gif' alt='Suche jetzt ein RP' titel='Suche jetzt ein RP'>";
        if (
$row['rpbulb'] == 4)
            
$rpbulb     "<img src='images/system/common/bulb4.gif' alt='Momentan im RP' titel='Momentan im RP'>";

        
output("<tr class='bio_bg'><td>",true);

        
output("<div class='table'>",true);
        
output("<table border='0' width='100%' style='max-width: 600px;' class='biotable'><tr><td width='110px' rowspan='8'>",true);

        
output("<div class='avatar'>",true);
        if (
$row_bio['avatar']) {
            if (
$session['user']['loggedin']) {
                
output("<a href=\"popup_bio.php?char=" rawurlencode($row['login']) . "\" onClick=\"" popup_bio("popup_bio.php?char=" rawurlencode($row['login']) . "") . ";return false;\"> <img src='" $row_bio['avatar'] . "' border='0' width='100' alt='" preg_replace("/#[0-9a-f]{6}|[`]./i","",$row['name']) . "' /> </a>",true);
            } else {
                
output("<img src='" $row_bio['avatar'] . "' border='1' width='100' alt='" preg_replace("/#[0-9a-f]{6}|[`]./i","",$row['name']) . "' />",true);
            }
        } else {
            
output("kein Avatar",true);
        }
        
output("</div>",true);

        
output("</td></tr><tr><td colspan='2'>",true);

        
output("<div class='name'>",true);
        if (
$session['user']['loggedin']) {
            
output("<a href=\"popup_mail.php?op=write&to=" rawurlencode($row['login']) . "\" target=\"_blank\" title=\"Nachricht senden\" onClick=\"" popup("popup_mail.php?op=write&to=" rawurlencode($row['login']) . "") . ";return false;\"><img src='images/system/common/newscroll.GIF' width='16' height='16' alt='Mail schreiben' border='0'></a>",true);
            
output("<a href=\"popup_bio.php?char=" rawurlencode($row['login']) . "\" onClick=\"" popup_bio("popup_bio.php?char=" rawurlencode($row['login']) . "") . ";return false;\">" $row['name'] . "</a>",true);
            
output($row['sex'] ? "<img src=\"images/system/common/female.gif\">" "<img src=\"images/system/common/male.gif\">",true);

            if (
$session['user']['superuser'] > && $session['user']['superuser'] < 6) {
                
output("<span class='admin'>",true);
                
output("[<a href='su_repnav.php?char=" rawurlencode($row['login']) . "&ret=" $_GET['ret'] . "'>Fix Nav</a>] ",true);
                
addnav("","su_repnav.php?char=" rawurlencode($row['login']) . "&ret=" $_GET['ret']);

                if (
$session['user']['loggedin']) {
                    
$rights_sql     'SELECT editor_blocks FROM su_rights WHERE su_id = ' $session['user']['acctid'];
                    
$rights_res     db_query($rights_sql);

                                      if (
db_num_rows($rights_res) == 1) {
                                       
$blockedUsers = array(0);
                                       
$allowUser true;
                                       if(
in_array($session['user']['acctid'], $blockedUsers)) $allowUser false;

                    if (
db_num_rows($rights_res) == 1) {
                        
$rights_row db_fetch_assoc($rights_res);

                        if (!empty(
$rights_row['editor_blocks']) && $allowUser) {
                            
output(' [<a href="su_user.php?op=edit&userid=' $row['acctid'] . '&ret=list">Edit</a>]',true);
                            
addnav('','su_user.php?op=edit&userid=' $row['acctid'] . '&ret=list');
                        }
                    }
                }
                         }

                
output("</div>",true);
            }
        } else {
            
output($row['name'], true);
        }
                
$wappen     "<a href='popup_wappen.php?op=wappen&id=" $row['acctid'] . "' target='window_popup' onClick=\"" popup_wappen("popup_wappen.php?op=wappen&id=" $row['acctid']) . "; return false;\">`&".($row['plotplayer'] > 0'<img src="images/icons/plotwappenn.png">' '')."`0</a>";        


        
output("</div>",true);

        
output("</td></tr><tr><td>",true);

        
output("<div class='race'>",true);
        
output("`iRasse`i: " $row['race']);
        
output("</div>",true);

        
output("<div class='urace'>",true);
        
output("`iSpezifikation`i: " $row['urace']);
        
output("</div>",true);

        
output("</td><td width='200px' rowspan='4'>",true);

        
output("<div class='bulb'>",true);
        
output($wappen,true);
        
output($rpbulb,true);
        
output("</div>",true);

        
output("</td></tr><tr><td>",true);

        
output("<div class='char_type'>",true);
        
output("`iChar-Klasse`i: " $rp);
        
output("</div>",true);

        
output("</td></tr><tr><td>",true);

        
output("<div class='amt'>",true);
        
output("`iAmt`i: " $rank " " . ($rank2 '`&(' $rank2 '`&)' ''),true);
        
output("</div>",true);

        
output("</td></tr><tr><td>",true);

        
output("<div class='alive'>",true);
        
output("`iStatus`i: ");
        
output($row['alive'] ? "`2Lebt`0" "`4Tot`0");
        
output("</div>",true);

        
output("</td></tr><tr><td>",true);

        
output("<div class='laston'>",true);
        
$loggedin     = (date("U") - strtotime($row['laston']) < getsetting("LOGINTIMEOUT",900) && $row['loggedin']);
        
$laston         round((strtotime(date("c")) - strtotime($row['laston'])) / 86400,0) . " Tage";
        if (
substr($laston,0,2) == "1 ")
            
$laston         "`$1 Tag";
        if (
date("Y-m-d",strtotime($row['laston'])) == date("Y-m-d"))
            
$laston         "`6Heute";
        if (
date("Y-m-d",strtotime($row['laston'])) == date("Y-m-d",strtotime(date("c") . "-1 day")))
            
$laston         "`6Gestern";
        if (
$loggedin && $row['ghost_mode'] == 0) {
            
$timeDelta round((strtotime(date("c")) - strtotime($row['laston'])) / 60,0);
            if (
$timeDelta == 0) {
                
$laston "gerade eben.";
            } else {
                
$laston "vor " $timeDelta " Minute" . ($timeDelta 'n' '') . ".";
            }
        } else if (
$loggedin && $row['ghost_mode'] == 1) {
            
$laston "`6Heute";
        }
        
output("`iZuletzt da`i: " $laston);
        
output("</div>",true);

        
output("</td><td>`c",true);
        
output("<div class='places'>",true);

        
$place $row['standort'];
        if (
$place == "Adminkram machen" && $row['superuser'] == 5) {
            
$place "Einwohnerliste";
        }
        
output("`iOrt`i: ");
        
output($place);
        
output("</div>",true);

        
output("`c</td></tr>",true);
        
output("<tr><td colspan='2'>",true);

        
output("<div class='afk'>",true);
        if (
$prefs['afk2'] == "1") {
            
output("`7`iAFK`i: " stripslashes($prefs['afk']) . "`0",true);
        }
        
output("</div>",true);

        
output("</td></tr></table>",true);

        
output("</div>",true);

        
output("</td></tr>",true);
    }
    
output("</table>",true);
} else {
    
output("<script type=\"text/javascript\" src=\"templates/common/wz_tooltip.js\"></script>",true);

    if (
$_GET['page'] == "" && $_GET['op'] == "") {
        
output("`c`bDiese Bewohner sind gerade online`b`c");
        
$sql "SELECT acctid,plotplayer,name,login,alive,location,sex,laston,loggedin,lastip,uniqueid,race,urace,standort,rpbulb,prefs,rp_char,punch,dragonkills,c_memberid,superuser,superuser2,ghost_mode, ZMeister FROM accounts WHERE locked=0 AND loggedin=1 AND laston>'" date("Y-m-d H:i:s",strtotime(date("c") . "-" getsetting("LOGINTIMEOUT",900) . " seconds")) . "' AND ghost_mode!=1 ORDER BY CASE superuser 
 WHEN 0 THEN 0
 WHEN 1 THEN 1
 WHEN 2 THEN 2
 WHEN 3 THEN 3
 WHEN 4 THEN 4
 WHEN 5 THEN 0
END DESC,level DESC,dragonkills DESC,login ASC"
;
    } else {
        
output("`c`bBewohner in dieser Welt (Seite " . ($pageoffset $playersperpage 1) . ": $from-$to von $totalplayers)`b`c");
        
$sql "SELECT acctid,plotplayer,name,login,alive,location,sex,laston,loggedin,lastip,uniqueid,race,urace,standort,rpbulb,prefs,rp_char,punch,dragonkills,c_memberid,superuser,superuser2,ghost_mode, ZMeister FROM accounts WHERE locked=0 $search ORDER BY CASE superuser 
 WHEN 0 THEN 0
 WHEN 1 THEN 1
 WHEN 2 THEN 2
 WHEN 3 THEN 3
 WHEN 4 THEN 4
 WHEN 5 THEN 0
END DESC, level DESC,dragonkills DESC,login ASC 
$limit";
    }
    if (
$session['user']['loggedin']) {
        
output("`n`c<form action='list.php?op=search&ret=" $_GET['ret'] . "' method='POST'>Nach Name suchen: <input name='name'> <input type='submit' class='button' value='Suchen'></form>`c`n",true);
        
addnav("","list.php?op=search&ret=" $_GET['ret'] . "");
    }

    
$result     db_query($sql) or die(sql_error($sql));
    
$max     db_num_rows($result);
    if (
$max 100) {
        
output("`\$Es treffen zu viele Namen auf diese Suche zu. Nur die ersten 100 werden angezeigt.`0`n");
    }

    
output("<table border='0' align='center' cellpadding='1' cellspacing='1' bgcolor='#28211f'>",true);
    
output("<tr class='trhead' align='center'><td><b>Name</b></td><td><b>Rasse</b></td><td><b>Spezifikation</b></td><td><b>Char-Klasse</b></td><td><b><img src=\"images/system/common/female.gif\">/<img src=\"images/system/common/male.gif\"></b></td><td><b>Amt</b></td><td><b>Ort</b></td><td><b>Status</b></td><td><b>RP-Bereit?</b></td><td><b>Zuletzt da</b></td>",true);
    if (
$session['user']['superuser'] > 0)
        
output("<td><b>Navs</b></td>",true);
    if (
$session['user']['superuser'] > 0)
        
output("<td><b>Edit</b></td>",true);
    
output("</tr>",true);

    for (
$i 0$i $max$i++) {
        
$row     db_fetch_assoc($result);
        
$prefs     unserialize($row['prefs']);

        if (
$row['c_memberid'] > 0) {
            
$sql_clan     "SELECT clanid,clanname FROM clans WHERE clanid=" $row['c_memberid'] . "";
            
$result_clan db_query($sql_clan) or die(sql_error(LINK));
            
$row_clan     db_fetch_assoc($result_clan);

            if (
$session['user']['loggedin']) {
                
$clan     "<a href='popup_showdetail.php?op=clan&id=" $row_clan['clanid'] . "' target='window_popup' onClick=\"" popup_edit("popup_showdetail.php?op=clan&id=" $row_clan['clanid']) . "; return false;\">`&" $row_clan['clanname'] . "`0</a>";
                
$charbio "<a href=\"popup_bio.php?char=" rawurlencode($row['login']) . "\"  onmouseover=\"TagToTip('" $row['acctid'] . "',TITLEBGCOLOR,'#550000',BGCOLOR,'#050505',FONTCOLOR,'#EEEEEE' ,BORDERWIDTH,2,BORDERCOLOR,'#880000',TITLE,'Kurzinformationen über " preg_replace("/#[a-f0-9]{6}|[`]./i","",$row['name']) . "`0')\" onmouseout=\"UnTip()\" onClick=\"" popup_bio("popup_bio.php?char=" rawurlencode($row['login']) . "") . ";return false;\">" appoencode($row['name']) . " " $clan "`0</a>";
            } else {
                
$clan     $row_clan['clanname'];
                
$charbio $row['name'] . " " $clan "`0";
            }
        } else {
            if (
$session['user']['loggedin']) {
                
$charbio "<a href='popup_bio.php?char=" rawurlencode($row['login']) . "'  onmouseover=\"TagToTip('" $row['acctid'] . "',TITLEBGCOLOR,'#550000',BGCOLOR,'#050505',FONTCOLOR,'#EEEEEE' ,BORDERWIDTH,2,BORDERCOLOR,'#880000',TITLE,'Kurzinformationen über " preg_replace("/#[a-f0-9]{6}|[`]./i","",$row['name']) . "`0')\" onmouseout=\"UnTip()\" onClick=\"" popup_bio("popup_bio.php?char=" rawurlencode($row['login']) . "") . ";return false;\">" appoencode($row['name'], true) . "`0</a>";
            } else {
                
$charbio $row['name'] . "`0";
            }
        }

        if (
$row['rp_char'] == 0)
            
$rp     "Keine Klasse";
        if (
$row['rp_char'] == 1)
            
$rp     "#4a4a4aR#676767P#858585-#949494C#a2a2a2h#b1b1b1a#c0c0c0r`0";
        if (
$row['rp_char'] == 2)
            
$rp     "#c0c0c0M#b1b1b1i#a2a2a2x#949494-#949494C#7b7b7bh#626262a#4a4a4ar`0";
        if (
$row['rp_char'] == 3)
            
$rp     "#c0c0c0L#a2a2a2e#949494v#6f6f6fe#4a4a4al#4a4a4a-#6f6f6fC#949494h#949494a#b1b1b1r`0";

        
output("<tr class='" . ($i "trdark" "trlight") . "'><td>",true);
        if (
$session['user']['loggedin']) {
            
output("<a href=\"popup_mail.php?op=write&to=" rawurlencode($row['login']) . "\" target=\"_blank\" title=\"Nachricht senden\" onClick=\"" popup("popup_mail.php?op=write&to=" rawurlencode($row['login']) . "") . ";return false;\"><img src='images/system/common/newscroll.GIF' width='16' height='16' alt='Mail schreiben' border='0'></a>",true);
    
        
$wappen     "<a href='popup_wappen.php?op=wappen&id=" $row['acctid'] . "' target='window_popup' onClick=\"" popup_wappen("popup_wappen.php?op=wappen&id=" $row['acctid']) . "; return false;\">`&".($row['plotplayer'] > 0'<img src="images/icons/plotwappenn.png">' '')."`0</a>";        

        
output(" ".$charbio." ".$wappen." ",true);

            
$sql_bio     "SELECT avatar FROM bios WHERE acctid=" $row['acctid'] . "";
            
$result_bio     db_query($sql_bio) or die(sql_error($sql_bio));
            
$row_bio     db_fetch_assoc($result_bio);

            
/*                 if ($row_bio['avatar'] != '') {
              $table_width = 100;

              $ava_pic = img_resize($row_bio['avatar'],100,1);
              if ($ava_pic != '') {
              $ava = img_resize($row_bio['avatar'],100,1)." border=\"2\" alt=\"".preg_replace("/[`]./","",$row['name'])."\">";
              } else {
              $ava = "<img src='' border=\"2\" alt=\"Bildfehler\">";
              }
              } else {
              $table_width = 100;
              $ava = "Kein Avatar";
              }
             */
            
if ($row_bio['avatar']) {
                
$ava "<img src='" $row_bio['avatar'] . "' border='1' width='100' alt='" preg_replace("/#[0-9a-f]{6}|[`]./i","",$row['name']) . "' />";
            } else {
                
$ava "kein Avatar";
            }

            
output("<span id=" $row['acctid'] . ">
                            <table>
                                <tr>
                                    <td width=\"" 
$table_width "\">`c" $ava "`c</td>
                                    <td width=\"200\">Charklasse: " 
$rp "<br />`&Rasse: " $row['race'] . "<br />`&Spezifikation: " $row['urace'] . "<br />`&Bester Angriff: " $row['punch'] . "<br />`&Drachenkills: " $row['dragonkills'] . "</td>
                                </tr>
                            </table>
                        </span>"
,true);
        } else {
        
//    output($charbio,true);
                
$wappen1     "<a href='popup_wappen.php?op=wappen&id=" $row['acctid'] . "' target='window_popup' onClick=\"" popup_wappen("popup_wappen.php?op=wappen&id=" $row['acctid']) . "; return false;\">`&".($row['plotplayer'] > 0'<img src="images/icons/plotwappenn.png">' '')."`0</a>";        

        
output(" ".$charbio." ".$wappen1." ",true);    
        }

        if (
$prefs['afk2'] == "1") {
            
output("`n`7Info: " stripslashes($prefs['afk']) . "`0",true);
        }


        
output("</td><td align=\"center\">",true);
        
output($row['race']);
        
output("</td><td align=\"center\">",true);
        
output($row['urace']);
        
output("</td><td align=\"center\">",true);
        
output($rp);
        
output("</td><td align=\"center\">",true);
        
output($row['sex'] ? "<img src=\"images/system/common/female.gif\">" "<img src=\"images/system/common/male.gif\">",true);
        
output("</td><td align=\"center\">",true);

        
/* if ($row['superuser'] == 0) $rank = "`@Bürger`0";
          if ($row['superuser'] == 1) $rank = "`@Bürger `Z(Eventler)`0";
          if ($row['superuser'] == 2) $rank = "`@Bürger `m(Priester)`0";

          if ($row['superuser'] == 3) $rank = "`!Lehrer`0";
          if ($row['superuser'] == 4) $rank = "`èRichter`0";
          if ($row['superuser'] == 5) $rank = "`^Berater`0";
          if ($row['superuser'] == 6) $rank = "`PKreativler`0";
          if ($row['superuser'] == 7) $rank = "`ÒHerrscher`0";
          if ($row['superuser'] == 8) $rank = "`9Programmierer`0";

          if ($row['superuser2'] == 0) $rank2 = "";
          if ($row['superuser2'] == 1) $rank2 = "`ZEventler`0";
          if ($row['superuser2'] == 2) $rank2 = "`mPriester`0";

          if ($row['superuser2'] == 3) $rank2 = "`!Lehrer`0";
          if ($row['superuser2'] == 4) $rank2 = "`èRichter`0";
          if ($row['superuser2'] == 5) $rank2 = "`PBerater`0";
          if ($row['superuser2'] == 6) $rank2 = "`6Kreativler`0";
          if ($row['superuser2'] == 7) $rank2 = "`ÒHerrscher`0";
          if ($row['superuser2'] == 8) $rank2 = "`9Programmierer`0";
         */


if ($row['superuser'] == 0){
            
$rank     "#636363B#838383ü#a4a4a4r#b5b5b5g#cdcdcde#e6e6e6r`0";

if (
$row['sex'] == 1){
            
$rank     "#636363B#7a7a7aü#919191r#a9a9a9g#b5b5b5e#c7c7c7r#dadadai#ecececn`0";

 }
}
            
if (
$row['superuser'] == && $row['ZMeister'] == 1){
                
$rank     "#476b0aZ#4e750de#567f11r#5e8915e#669419m#6e9e1do#76a821n#7eb225i#82b827e#90c03fn#9fc958m#add270e#bcdb89i#cbe4a1s#d9edbat#e8f6d2e#f7ffebr`0";

if (
$row['superuser'] == && $row['sex'] == && $row['ZMeister'] == 1){
                
$rank     "#476b0aZ#4d740de#547d10r#5b8614e#628f17m#69981bo#70a11en#77aa21i#7eb325e#82b827n#8fbf3cm#9cc752e#a9cf68i#b6d77es#c3df93t#d0e7a9e#ddefbfr#eaf7d5i#f7ffebn`0";

 }
}
        
if (
$row['superuser'] == 1){
            
$rank     "#0a3f6bV#125081e#1a6197r#2272adw#277bb8a#589cc9l#89bddat#badeebe#ebfffcr`0";
if (
$row['sex'] == 1){
            
$rank     "#0a3f6bV#104c7ce#16598dr#1d679ew#2374afa#277bb8l#4e95c5t#75afd3e#9ccae0r#c3e4eei#ebfffcn`0";
 }
}
        
if (
$row['superuser'] == 2){
            
$rank     "#656b0aK#798112ü#8e971an#a3ad22s#aeb827t#c2c958l#d6db89e#eaedbar`0";
                                           
if (
$row['sex'] == 1){
                        
$rank     "#656b0aK#757c10ü#858d16n#959e1ds#a5af23t#aeb827l#bec64ee#ced475r#dee29ci#eef0c3n`0";
 }
}
        
if (
$row['superuser'] == 3){
            
$rank     "#ebfffcA#c8816dd#b74226m#90261ai#6a0a0fn`0";

if (
$row['sex'] == 1){
                        
$rank     "#ebfffcA#d1a091d#b74226m#b74226i#90261an#6a0a0fa`0";

if (
$row['acctid'] == 1){
                        
$rank     "#6a0a0fS#781413e#861e17r#94281bv#a2321fe#b03c23r#b74226l#bf6149e#c8816di#d1a091t#d9c0b4u#e2dfd8n#ebfffcg`0";
  }
 }
}



        
if (
$row['superuser'] == 4){
            
$rank     "#6b4c0aI#815c12n#976c1ag#ad7c22e#b88527n#c9a258i#dbbf89e#eddcbau#fff9ebr`0";
if (
$row['sex'] == 1){
            
$rank     "#6b4c0aI#7c5810n#8d6516g#9e721de#af7e23n#b88527i#c69c4ee#d4b375u#e2ca9cr#f0e1c3i#fff9ebn`0";
 }
}
        
if (
$row['superuser'] == 5){
            
$rank     "#636363B#838383ü#a4a4a4r#b5b5b5g#cdcdcde#e6e6e6r`0";
if (
$row['sex'] == 1){
            
$rank     "#636363B#7a7a7aü#919191r#a9a9a9g#b5b5b5e#c7c7c7r#dadadai#ecececn`0";
 }
}

        
//if ($row['superuser'] == 6)
        
if ($row['superuser'] == 7)
                        
$rank     "#008080B#008e8ai#009c95o#00aaa0w#00b8abä#00c7b6c#00c7b6h#00cec0t#00d5cbe#00dcd5r#00e3e0I#00ebebn`0";



if (
$row['superuser2'] == 0){
            
$rank2     "";

if (
$row['sex'] == 1){
            
$rank2     "";

 }
}
            
if (
$row['superuser2'] == && $row['ZMeister2'] == 1){
                
$rank2     "#476b0aZ#4e750de#567f11r#5e8915e#669419m#6e9e1do#76a821n#7eb225i#82b827e#90c03fn#9fc958m#add270e#bcdb89i#cbe4a1s#d9edbat#e8f6d2e#f7ffebr`0";

if (
$row['superuser2'] == && $row['sex'] == && $row['ZMeister2'] == 1){
                
$rank2     "#476b0aZ#4d740de#547d10r#5b8614e#628f17m#69981bo#70a11en#77aa21i#7eb325e#82b827n#8fbf3cm#9cc752e#a9cf68i#b6d77es#c3df93t#d0e7a9e#ddefbfr#eaf7d5i#f7ffebn`0";

 }
}
        
if (
$row['superuser2'] == 1){
            
$rank2     "#0a3f6bV#125081e#1a6197r#2272adw#277bb8a#589cc9l#89bddat#badeebe#ebfffcr`0";
if (
$row['sex'] == 1){
            
$rank2     "#0a3f6bV#104c7ce#16598dr#1d679ew#2374afa#277bb8l#4e95c5t#75afd3e#9ccae0r#c3e4eei#ebfffcn`0";
 }
}
        
if (
$row['superuser2'] == 2){
            
$rank2     "#656b0aK#798112ü#8e971an#a3ad22s#aeb827t#c2c958l#d6db89e#eaedbar`0";
                                           
if (
$row['sex'] == 1){
                        
$rank2     "#656b0aK#757c10ü#858d16n#959e1ds#a5af23t#aeb827l#bec64ee#ced475r#dee29ci#eef0c3n`0";
 }
}
        
if (
$row['superuser2'] == 3){
            
$rank2     "#ebfffcA#c8816dd#b74226m#90261ai#6a0a0fn`0";

if (
$row['sex'] == 1){
                        
$rank2     "#ebfffcA#d1a091d#b74226m#b74226i#90261an#6a0a0fa`0";

if (
$row['acctid'] == 1){
                        
$rank2     "#6a0a0fS#781413e#861e17r#94281bv#a2321fe#b03c23r#b74226l#bf6149e#c8816di#d1a091t#d9c0b4u#e2dfd8n#ebfffcg`0";
  }
 }
}



        
if (
$row['superuser2'] == 4){
            
$rank2     "#6b4c0aI#815c12n#976c1ag#ad7c22e#b88527n#c9a258i#dbbf89e#eddcbau#fff9ebr`0";
if (
$row['sex'] == 1){
            
$rank2     "#6b4c0aI#7c5810n#8d6516g#9e721de#af7e23n#b88527i#c69c4ee#d4b375u#e2ca9cr#f0e1c3i#fff9ebn`0";
 }
}
        
if (
$row['superuser2'] == 5){
            
$rank2     "#70481fB#805223e#905c27w#a1662bo#a1662bh#af6e2dn#be762fe#cd7f32r`0";
if (
$row['sex'] == 1){
            
$rank2     "#636363B#7a7a7aü#919191r#a9a9a9g#b5b5b5e#c7c7c7r#dadadai#ecececn`0";
 }
}

        
//if ($row['superuser2'] == 6)

if ($row['superuser2'] == 7)
                        
$rank2     "#008080B#008e8ai#009c95o#00aaa0w#00b8abä#00c7b6c#00c7b6h#00cec0t#00d5cbe#00dcd5r#00e3e0I#00ebebn`0";



        
output($rank ' ' . ($rank2 '`&(' $rank2 '`&)' ''));
        
output("</td><td>",true);
        
$place $row['standort'];
        if (
$place == "Adminkram machen" && $row['superuser'] == 5) {
            
$place "Einwohnerliste";
        }
        
output("`c" $place "`c");
        
output("</td><td>",true);
        
output($row['alive'] ? "`1`c`bLebt`b`c`0" "`4`c`bTot`b`c`0");
        
output("</td><td align=\"center\">",true);
        if (
$row['rpbulb'] == 0)
            
$rpbulb     "<img src='images/system/common/bulb0.gif' alt='Keine Zeit/Lust' titel='Keine Zeit/Lust'>";
        if (
$row['rpbulb'] == 1)
            
$rpbulb     "<img src='images/system/common/bulb1.gif' alt='Suche für später RPs' titel='Suche für später RPs'>";
        if (
$row['rpbulb'] == 2)
            
$rpbulb     "<img src='images/system/common/bulb2.gif' alt='Im RP - Weitere Partner erwünscht' titel='Im RP - Weitere Partner erwünscht'>";
        if (
$row['rpbulb'] == 3)
            
$rpbulb     "<img src='images/system/common/bulb3.gif' alt='Suche jetzt ein RP' titel='Suche jetzt RP'>";
        if (
$row['rpbulb'] == 4)
            
$rpbulb     "<img src='images/system/common/bulb4.gif' alt='Momentan im RP' titel='Momentan im RP'>";

        
output($rpbulb,true);
        
output("</td><td>",true);
        
$loggedin     = (date("U") - strtotime($row['laston']) < getsetting("LOGINTIMEOUT",900) && $row['loggedin']);
        
$laston         round((strtotime(date("c")) - strtotime($row['laston'])) / 86400,0) . " Tage";
        if (
substr($laston,0,2) == "1 ")
            
$laston         "1 Tag";
        if (
date("Y-m-d",strtotime($row['laston'])) == date("Y-m-d"))
            
$laston         "Heute";
        if (
date("Y-m-d",strtotime($row['laston'])) == date("Y-m-d",strtotime(date("c") . "-1 day")))
            
$laston         "Gestern";
        if (
$loggedin && $row['ghost_mode'] == 0) {
            
$timeDelta round((strtotime(date("c")) - strtotime($row['laston'])) / 60,0);
            if (
$timeDelta == 0) {
                
$laston "gerade eben";
            } else {
                
$laston "vor " $timeDelta " Minute" . ($timeDelta 'n' '') . "";
            }
        } else if (
$loggedin && $row['ghost_mode'] == 1) {
            
$laston "Heute";
        }

        
output("`c" $laston "`c");
        
output("</td>",true);
        if (
$session['user']['superuser'] > 0) {
            
output("<td align=\"center\"><a href='su_repnav.php?char=" rawurlencode($row['login']) . "&ret=" $_GET['ret'] . "'>Rep</a>",true);
            
addnav("","su_repnav.php?char=" rawurlencode($row['login']) . "&ret=" $_GET['ret'] . "");

            if (
$session['user']['loggedin']) {
                
$rights_sql     'SELECT editor_blocks FROM su_rights WHERE su_id = ' $session['user']['acctid'];
                
$rights_res     db_query($rights_sql);

                if (
db_num_rows($rights_res) == 1) {
                    
$rights_row db_fetch_assoc($rights_res);

                    if (!empty(
$rights_row['editor_blocks'])) {
                        
output('<td align="center"><a href="su_user.php?op=edit&userid=' $row['acctid'] . '&ret=list">Edit</a>',true);
                        
addnav('','su_user.php?op=edit&userid=' $row['acctid'] . '&ret=list');
                    }
                }
            }

            
rawoutput('</td>');
        }
        
output("</tr>",true);
    }
    
output("</table>`n`n`n`n`n",true);
}

output("`n`n
    <table border='0' align='center' cellspacing='1' cellpadding='2' bgcolor='#999999'>
    <tr><td>
      <table border='0' cellspacing='2' cellpadding='2' bgcolor='#000000'>
        <tr>
            <td colspan='6'><font size='2'>`b`cRP Status:`c`b`0</font></td>
        </tr>
        <tr>
            <td><img src='images/system/common/bulb0.gif'></td><td>`b-> Keine Zeit/Lust`b</td>
            <td><img src='images/system/common/bulb2.gif'></td><td>`b-> Im RP - Weitere Partner erwünscht`b</td>
            <td>&nbsp</td><td>&nbsp</td>
        </tr>
        <tr>
            <td><img src='images/system/common/bulb3.gif'></td><td>`b-> Suche für später RPs`b</td>
            <td><img src='images/system/common/bulb4.gif'></td><td>`b-> Momentan im RP`b</td>
            <td><img src='images/system/common/bulb1.gif'></td><td>`b-> Suche jetzt ein RP`b</td>
        </tr>
      </table>
    </td></tr>
</table>`n`n"
,true);

if (
$session['user']['loggedin']) 
    {
    
viewcommentary("ooc","Plaudern:`0");
    }
    
page_footer();
?>