Welcome Guest [Log In] [Register]
Add Reply
changing time stamp in AdminCP
Topic Started: Dec 8 2008, 04:01 PM (145 Views)
php-coder
Member Avatar

im unsure if anyone has posted this in here but here it is for those who wish to change the time stamp to a readbale format, Replace part of the code in the admin.php (in the displayUsers function) with the following:
Code:
 
<?php
/* Display table contents */
echo "<table align=\"left\" border=\"1\" cellspacing=\"0\" cellpadding=\"3\">\n";
echo "<tr><td><b>Username</b></td><td><b>Level</b></td><td><b>Email</b></td><td><b>Last Active</b></td></tr>\n";
for($i=0; $i<$num_rows; $i++){
$uname = mysql_result($result,$i,"username");
$ulevel = mysql_result($result,$i,"userlevel");
$email = mysql_result($result,$i,"email");
$time = mysql_result($result,$i,"timestamp");
$time2 = date("Y/F/d - H:i:s", $time);

echo "<tr><td>$uname</td><td>$ulevel</td><td>$email</td><td>$time2</td></tr>\n";
}
echo "</table><br>\n";
?>
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Other · Next Topic »
Add Reply