Himeko Posted July 27, 2015 Share Posted July 27, 2015 Hi, I used to have a small "mod" in the v4 admin template to display upcoming domain/hosting renewals on top, but after moving to 6.x it doesn't work anymore, as the {php} part does not get processed now. Was this changed to something else or is there a way to enable it back? Thanks. <!-- START ADMIN UPCOMING DOMAIN RENEWALS --> <h3 align="center">Upcoming Domain Renewals</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>Domain</td><td>Registrar</td><td>Period</td><td>Next Due Date</td><td>Expiration Date</td><td>Amount</td><td>Do Not<br />Renew</td></tr> {php} $x=1; $range = "<= 45"; $result = mysql_query("SELECT * FROM `tbldomains` WHERE DATEDIFF(`expirydate`, Now()) $range AND `status` = 'Active' ORDER BY `expirydate` ASC"); while ($data = @mysql_fetch_array ($result)) { echo '<tr bgcolor="#ffffff" style="text-align:center;"><td><a href="clientsdomains.php?userid='.$data['userid'].'&id='.$data['id'].'">'.$data['domain'].'</a></td><td>'.$data['registrar'].'</td><td>'.$data['registrationperiod'].'</td><td>'.fromMySQLDate($data['nextduedate']).'</td><td>'.fromMySQLDate($data['expirydate']).'</td><td>'.formatCurrency($data['recurringamount']).'</td><td>'.$data['donotrenew'].'</td></tr>'; $x=0; } if($x) echo '<tr bgcolor="#ffffff" style="text-align:center;"><td colspan="7">No upcoming domain renewals</td></tr>'; {/php} </table> <br /> <!-- END ADMIN UPCOMING DOMAIN RENEWALS --> <!-- START ADMIN UPCOMING HOSTING RENEWALS --> <h3 align="center">Upcoming Hosting Renewals (Next 30 Days)</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>Domain</td><td>Billing Cycle</td><td>Payment Method</td><td>Next Due Date</td><td>Amount</td></tr> {php} $i=1; $range = "<= 30"; $result = mysql_query("SELECT * FROM `tblhosting` WHERE DATEDIFF(`nextduedate`, Now()) $range AND `server` > 0 ORDER BY `nextduedate` ASC"); while ($data = @mysql_fetch_array ($result)) { echo '<tr bgcolor="#ffffff" style="text-align:center;"><td><a href="clientshosting.php?userid='.$data['userid'].'&id='.$data['id'].'">'.$data['domain'].'</a></td><td>'.$data['billingcycle'].'</td><td>'.$data['paymentmethod'].'</td><td>'.fromMySQLDate($data['nextduedate']).'</td><td>'.formatCurrency($data['amount']).'</td></tr>'; $i=0; } if($i) echo '<tr bgcolor="#ffffff" style="text-align:center;"><td colspan="7">No upcoming hosting renewals</td></tr>'; {/php} </table> <br /> <!-- END UPCOMING HOSTING RENEWALS --> 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 27, 2015 Share Posted July 27, 2015 http://forum.whmcs.com/showthread.php?20319-Sparky-s-Admin-Upcoming-Domain-Renewals-V4-template&p=429142#post429142 it's a widget - not template code! http://docs.whmcs.com/Widgets 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.