Location: PHPKode > scripts > WH Social > wh_social/newest.php
<?php

    require('framework/session.php');
    require('framework/work/start.php');
    require('framework/ready.php');

?>
<!DOCTYPE HTML>
<html>

<head>
    <title><?php echo $title; ?></title>

    <meta charset="ISO-8859-1" />
    <meta name="robots" content="INDEX,FOLLOW" />

    <link href="style/css/design.css" rel="stylesheet" />
    <link href="style/images/favicon.ico" rel="shortcut icon" />

    <noscript><span class="noscript"><?php echo $lang['no_java']; ?></span></noscript>
</head>

<body>

<?php

    $sql = "SELECT id, name, date, status FROM members ORDER BY date DESC LIMIT 10";
	$members = mysql_query($sql) OR die(mysql_error());

	if(!$members) {

	echo '<p class="false">' . $lang['no_members'] . '</p>' . mysql_error();

	   }else{

		if(intval(mysql_num_rows($members)) == 0) {

		echo '<p class="false">' . $lang['no_members'] . '</p>' . mysql_error();

    }else{

    echo '<table width="100%" class="tables">
    <tr>
    <td width="10%"><span class="blue_span">ID</span></td>
    <td width="45%"><span class="blue_span">' . $lang['re_name'] . '</span></td>
    <td width="25%" align="right"><span class="blue_span">' . $lang['last_signin'] . '</span></td>
    <td width="20%" align="right"><span class="blue_span">' . $lang['date_of_register'] . '</span></td>
    </tr>';

	while($row = mysql_fetch_assoc($members)) {

		echo '<tr>
	    <td width="10%">' . (int)$row['id'] . '</td>
		<td width="45%"><span class="blue_span">' . htmlentities($row['name'], ENT_QUOTES) . '</span></td>
		<td width="25%" align="right"><small>'; if($row['status'] > 0) { echo date('d.m.Y', strtotime($row['status'])); }else{ echo $lang['no_signins']; }

		echo '</small></td><td width="20%" align="right"><small>' . date('d.m.Y - H:i', strtotime($row['date'])) . '</small></td></tr>';
		}

	echo '</table>';
	}
    }

?>

</body>
</html>
<?php include_once('framework/work/end.php'); ?>
Return current item: WH Social