Autor |
Nachricht |
NinjaTurtle
Einsteiger
Anmeldedatum: 19.12.2007 Beiträge: 10
|
Verfasst am: Do 27 Dez 2007, 02:52 Titel:
anzeige userlist |
|
Hallo,
ich hätte eine Frage bezüglich der Anzeige in der Userlist im Adminbereich.
Wo kann man umstellen, das statt dem Unixtimestamp eine Datum/Zeitanzeige angezeigt wird.
Nr Name E-Mail IP Regestrierungsdatum Zuletzt online Ban Gebannt
1 Lord_Anubis 1198193097 1198719025 1198222003 0
So wird das bei mir angezeit (eMail, IP hab ich raus genommen, ist eh schon arg unübersichtlich, deswegen farblich markiert)
Würd mich über ein Antwort freuen.
Danke schon mal im voraus
mfg
P.S. Hoffe, das es im richtigen Forum ist.
|
Nach oben
|
|
|
House
Neuling
Anmeldedatum: 26.12.2007 Beiträge: 6 Wohnort: Österreich
|
Verfasst am: Do 27 Dez 2007, 11:16 Titel:
|
|
Hier die Datei:
userlist.php
Code: |
<?php
define('INSIDE', true);
$ugamela_root_path = './../';
include($ugamela_root_path . 'extension.inc');
include($ugamela_root_path . 'common.'.$phpEx);
$dpath = (!$user["dpath"]) ? DEFAULT_SKINPATH : $user["dpath"];
//checkeamos que el usuario este logueado y que tenga los permisos de admin
if(!check_user()){ header("Location: ./../login.php"); }
if($user['authlevel']!="3"){message("Puto de mierda","pero vo so loko?");}
$r = doquery("SELECT * FROM {{table}} ORDER BY user_lastip ASC","users");
$page .= "<center><br><br><br><br><br><table> \n";
$page .= "<tr> \n";
$page .= "<td><th><b><font color=\"orange\">Nr</b></th></td> \n";
$page .= "<td><th><b><font color=\"orange\">Name</b></th></td> \n";
$page .= "<td><th><b><font color=\"orange\">E-Mail</b></th></td> \n";
$page .= "<td><th><b><font color=\"orange\">IP</b></th></td> \n";
$page .= "<td><th><b><font color=\"orange\">Regestrierungsdatum</b></th></td> \n";
$page .= "<td><th><b><font color=\"orange\">Zuletzt online</b></th></td> \n";
$page .= "<td><th><b><font color=\"orange\">Ban</b></th></td> \n";
$page .= "<td><th><b><font color=\"orange\">Gebannt</b></th></td> \n";
$page .= "</tr> \n";
while ($row = mysql_fetch_row($r)){
$page .= "<tr> \n";
$page .= "<td><th><font color=\"lime\">$row[0]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[1]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[3]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[15]</th></td> \n";
$page .= "<td><th><font color=\"lime\">".date("d.m.y H:i:s",$row[16])."</th></td> \n";
$page .= "<td><th><font color=\"lime\">".date("d.m.y H:i:s",$row[17])."</th></td> \n";
if ($row[67] >1) {
$page .= "<td><th><b><font color=\"red\">".date("d.m.y H:i:s",$row[67])."</b></th></td> \n";
} else {
$page .= "<td><th><b><font color=\"red\">-</b></th></td> \n";
}
$page .= "<td><th><b><font color=\"red\">$row[68]</b></th></td> \n";
$page .= "</tr> \n";
}
$page .= "</table> \n";
display($page,'Userlist');
?>
<link rel="stylesheet" type="text/css" media="screen" href="http://80.237.203.201/download/use/epicblue/formate.css" />
</style>
|
mfg House
_________________
|
Nach oben
|
|
|
bulletleo
UGamela-Kenner
Anmeldedatum: 14.12.2007 Beiträge: 83
|
Verfasst am: Do 27 Dez 2007, 12:13 Titel:
tt dem Unixtimestamp eine Datum/Zeitanzeige angezeigen: Themen-Beschreibung: userlist.php |
|
statt dem Unixtimestamp eine Datum/Zeitanzeige angezeigen:
1. 'includes/functions.php' mit einem editor öffnen:
in etwa Zeile 15 diese function einfügen:
Code: |
function date_gmt($time){
$datum=date("d.m.Y",$time); # Format: DD.MM.JJJJJ
$uhrzeit=date("H:i:s",$time); # Format: HH:MM:SS
$time=$datum." - ".$uhrzeit; # Format: GMT
return $time;
}
|
2. 'admin/userlist.php' mit einem editor öffnen:
suche:
Code: |
while ($row = mysql_fetch_row($r)){
$page .= "<tr> \n";
$page .= "<td><th><font color=\"lime\">$row[0]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[1]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[3]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[15]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[16]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[17]</th></td> \n";
$page .= "<td><th><b><font color=\"red\">$row[67]</b></th></td> \n";
$page .= "<td><th><b><font color=\"red\">$row[68]</b></th></td> \n";
$page .= "</tr> \n";
}
|
ersetze mit:
Code: |
while ($row = mysql_fetch_row($r)){
if($row[67]>0){$bantime=date_gmt($row[67]);}else{$bantime=0;}
if($row[68]>0){$gebanttime=date_gmt($row[68]);}else{$gebanttime=0;}
$page .= "<tr> \n";
$page .= "<td><th><font color=\"lime\">$row[0]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[1]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[3]</th></td> \n";
$page .= "<td><th><font color=\"lime\">$row[15]</th></td> \n";
$page .= "<td><th><font color=\"lime\">".date_gmt($row[16])."</th></td> \n";
$page .= "<td><th><font color=\"lime\">".date_gmt($row[17])."</th></td> \n";
$page .= "<td><th><b><font color=\"red\">".$bantime."</b></th></td> \n";
$page .= "<td><th><b><font color=\"red\">".$gebanttime."</b></th></td> \n";
$page .= "</tr> \n";
}
|
alles upladen fertig...
//**EDIT**/
Übrigens: du kannst überall da, wo du unixtimestamp ins GMT time umwandeln willst die geleihce function verwenden 'date_gmt($time)', die function sorg dafür, dass unixtimestamp ins GMT Time umgewandelt wird.
Gruss
_________________ <?php ?>
|
Nach oben
|
|
|
NinjaTurtle
Einsteiger
Anmeldedatum: 19.12.2007 Beiträge: 10
|
Verfasst am: Do 27 Dez 2007, 13:29 Titel:
|
|
super, vielen Dank für die Hilfe. Endlich seh ich auch das Zeitformat
Ihr sein einfach Spitze
mfg
|
Nach oben
|
|
|
Phoscur
Site Admin
Anmeldedatum: 07.12.2007 Beiträge: 919
|
Verfasst am: Do 27 Dez 2007, 16:05 Titel:
|
|
ich habe die userlist sowieso nochmal ganz umgeschrieben, kommt mit version 0.2 von Ph-Admin.
_________________
Wenn du Hilfe brauchst wende dich an einen >Supporter<.
|
Nach oben
|
|
|
|