Patty Posted July 11, 2010 Share Posted July 11, 2010 I wanted a way to view all SSL cetificates that are to be renewed some time before expiration date, so I can send clients an email offering to renew it, since WHMCS doesn't do this (at least for the eNom module). So I put this together. It will show on the admin homepage a list of the SSL expiring within the next 45 days (it can be changed to any number of days) based on the due date (date the certificate was created + 1 year, since WHMCS doesn't have a due date for certificates). It could use some improvements (I'm no programmer ), this was the best I could do. It's working fine for my needs, I hope it can be usefull to other people. <!-- START ADMIN UPCOMING SSL RENEWALS --> <h3 align="left"><span class="textred"><b>Upcoming SSL Certificate Renewals - Next 45 Days</b></span></h3> <table bgcolor="#cccccc" align="center" style="margin-bottom:5px;width:100%;" cellspacing="1"> <tr bgcolor="#efefef" style="text-align:center;font-weight:bold;"><td>Company/User Name</td><td>Certificate</td> <td>SSL Order ID</td> <td>Next Due Date</td> <td>Status</td></tr> {php} $i=1; $i<=46; $result = mysql_query("SELECT tblsslorders.*,tblclients.companyname,tblclients.firstname,tblclients.lastname FROM `tblsslorders`,`tblclients` WHERE tblsslorders.status = 'Completed' AND tblsslorders.userid = tblclients.id ORDER BY tblsslorders.completiondate ASC"); while ($data = @mysql_fetch_array ($result)) { $usersname = $data['firstname']. ' ' .$data['lastname']; $cdate = $data['completiondate']; $duedate = strtotime('+1 year', strtotime($cdate)) ; $duedate = date('d/m/Y', $duedate); $today = date('d-m-Y'); $days = (strtotime('+1 year', strtotime($cdate)) - strtotime($today)) / 86400; if ($days <= 46) echo '<tr bgcolor="#ffffff" style="text-align:center;"><td align="left"><a href="clientssummary.php?userid='.$data['userid'].'" target="_blank">'.(($data['companyname'])?$data['companyname']:$usersname).'</a></td><td><a href="clientshosting.php?userid='.$data['userid'].'&id='.$data['serviceid'].'" target="_blank">'.$data['certtype'].'</a></td><td>'.$data['remoteid'].'</td><td>'.$duedate.'</td><td>'.$data['status'].'</td></tr>'; $i=0; } if ($i) echo '<tr bgcolor="#ffffff" style="text-align:center;"><td colspan="6">No upcoming SSL Certificate renewals</td></tr>'; {/php} </table> <br /> <!-- END UPCOMING SSL RENEWALS --> 0 Quote Link to comment Share on other sites More sharing options...
mylove4life Posted July 11, 2010 Share Posted July 11, 2010 looks like you are a programmer now lol But I agree SSL's should be like any other and we and clients should get emails about them.. Anything we can add to this Matt? 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted July 11, 2010 Author Share Posted July 11, 2010 looks like you are a programmer now lol Google helps a lot. Plus CTRL C and CTRL V what was already there. 0 Quote Link to comment Share on other sites More sharing options...
sohouk Posted July 29, 2010 Share Posted July 29, 2010 Google helps a lot. Plus CTRL C and CTRL V what was already there. LOL! Looks like a useful addition and also a framework for other stuff. One small thing - where does it go? There isn't any 'adminxxxx.tpl or anything related to it as far as I can see 0 Quote Link to comment Share on other sites More sharing options...
sohouk Posted July 29, 2010 Share Posted July 29, 2010 Found it! For the benefit of others the template (in my case) is in: whmcs/admin/templates/v4/homepage.tpl 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.