Patty Posted March 11, 2009 Share Posted March 11, 2009 This will show the newest 10 clients on the admin homepage. Just place the following code after the last </table> on file admin/templates/homepage.tpl Based on the contribution by jasonhk here http://forum.whmcs.com/showthread.php?t=18507 I just improved it a little to show the IP and host and increased the listing to 10. All credits go to jasonhk. <h1>New clients - <a href="clients.php">View All</a></h1> <table width=100% bgcolor="#cccccc" cellspacing=1> <tr style="background-color:#efefef;font-weight:bold;text-align:center"><td width="33%" align="center">Client Name</td><td width="20%">Sign up Date</td> <td width="12%">IP</td> <td width="35%">Host</td> </tr> {php} $sql = 'SELECT * FROM `tblclients` ORDER BY `tblclients`.`datecreated` DESC limit 10'; $result=mysql_query($sql) or die(mysql_error()); //-create while loop and loop through result set while($row=mysql_fetch_array($result)){ $name =$row['firstname']; $surname =$row['lastname']; $datecreated =$row['datecreated']; $id =$row['id']; $ip =$row['ip']; $host =$row['host']; print '<tr bgcolor="#ffffff"><td align="center"><a href="clientssummary.php?userid='.$id.'"/>'.$name.' '.$surname.'</a></td><td align="center">'.$datecreated.'</td> <td align="center">'.$ip.'</td> <td align="center">'.$host.'</td> </tr>'; } {/php} </table> 0 Quote Link to comment Share on other sites More sharing options...
flip Posted March 24, 2009 Share Posted March 24, 2009 Is there any different with this? http://forum.whmcs.com/showpost.php?p=95995&postcount=14 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted March 24, 2009 Share Posted March 24, 2009 One suppose to be Newest Clients and the other suppose to be Last Clients To Login. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.