cyberneticos Posted June 9, 2008 Share Posted June 9, 2008 I think this wonderful contrib should be a new feature for WHMCS. Matt, what are the possibilities of having this as part of whmcs rather than a contrib? 0 Quote Link to comment Share on other sites More sharing options...
andymcculloch Posted July 3, 2008 Share Posted July 3, 2008 I've just added this in, and it works perfectly. Thanks for the hard work Chaps. 0 Quote Link to comment Share on other sites More sharing options...
goddess_dix Posted July 4, 2008 Share Posted July 4, 2008 Thank you. This works beautifully and is a very user-friendly addition for my clients. 0 Quote Link to comment Share on other sites More sharing options...
nikos Posted August 4, 2008 Share Posted August 4, 2008 although it is asked before, i m still not sure how to make the date look like d-m-y instead of y-m-d. Any help please? 0 Quote Link to comment Share on other sites More sharing options...
cyberneticos Posted August 4, 2008 Share Posted August 4, 2008 configuration->general settings->Localisation->Date Format 0 Quote Link to comment Share on other sites More sharing options...
nikos Posted August 4, 2008 Share Posted August 4, 2008 no, i ve done that, everywere looks fine, only in this modification looks "opposite". 0 Quote Link to comment Share on other sites More sharing options...
magga Posted August 11, 2008 Share Posted August 11, 2008 Nikos, if you change the SQL query in the code to this: mysql_query("SELECT *, DATE_FORMAT(expirydate, '%d/%m/%Y') AS fdate FROM tbldomains WHERE userid='".$_SESSION['uid']."' AND DATEDIFF(expirydate, NOW()) ".$range." AND status='Active' ORDER BY `expirydate` ASC "); Then where it outputs the result, change the date part to this: '.$data['fdate'].' This should the output the date in format you require. Alternatively you can change the SQL query part '%d/%m/%Y if you want to display it differently. Changing the date in the WHMCS config page will make no difference to this date. Hope this helps. 0 Quote Link to comment Share on other sites More sharing options...
nikos Posted August 11, 2008 Share Posted August 11, 2008 that really solved the problem, thank you! 0 Quote Link to comment Share on other sites More sharing options...
HostingBegins Posted September 1, 2008 Share Posted September 1, 2008 Many thanks for this, makes thing much clearer for my clients. Appreciated. Thanks 0 Quote Link to comment Share on other sites More sharing options...
Allosunshine Posted September 5, 2008 Share Posted September 5, 2008 Thanks very much. I just wish I had the knowledge and knowhow to contribute myself. Cheers 0 Quote Link to comment Share on other sites More sharing options...
carlsilver Posted October 4, 2008 Share Posted October 4, 2008 Great little addon - many thanks 0 Quote Link to comment Share on other sites More sharing options...
cyberneticos Posted October 4, 2008 Share Posted October 4, 2008 Congrats on the MOD,. using it now 0 Quote Link to comment Share on other sites More sharing options...
gingerol Posted March 17, 2009 Share Posted March 17, 2009 Thank you! 0 Quote Link to comment Share on other sites More sharing options...
apollo1 Posted March 17, 2009 Share Posted March 17, 2009 Thanks everyone! 0 Quote Link to comment Share on other sites More sharing options...
Gazza Posted March 20, 2009 Share Posted March 20, 2009 great addition thank you just one small point, the renew date reads 2009-05-09 is it possible to change so it reads 09-05-2009 or 09/05/2009 thank you 0 Quote Link to comment Share on other sites More sharing options...
RPS Posted March 20, 2009 Author Share Posted March 20, 2009 Check the line that reads: $date=$year."-".$month."-".$day; Notice the variables? You can change the position of the variables, as well as change the dash - to a forwardslash / You can also replace the word year with month, and month with year, so it will display as month - year - day. Any format you want. 0 Quote Link to comment Share on other sites More sharing options...
Gazza Posted March 21, 2009 Share Posted March 21, 2009 Check the line that reads: $date=$year."-".$month."-".$day; Notice the variables? You can change the position of the variables, as well as change the dash - to a forwardslash / You can also replace the word year with month, and month with year, so it will display as month - year - day. Any format you want. sorted thank you 0 Quote Link to comment Share on other sites More sharing options...
Gazza Posted March 21, 2009 Share Posted March 21, 2009 just added a domain icon by Upcoming Domain Renewals text just to match rest of account <p><img src="images/domains.gif" border="0" hspace="5" align="absmiddle" alt="" /><strong>Upcoming Domain Renewals</strong> 0 Quote Link to comment Share on other sites More sharing options...
RPS Posted March 21, 2009 Author Share Posted March 21, 2009 Gazza, mind explaining where you make that modification at so others know as well? 0 Quote Link to comment Share on other sites More sharing options...
Gazza Posted March 22, 2009 Share Posted March 22, 2009 sure can show but if you can see a better way as code is not my stong point. just changed font size and colour and added image in this part of code. <p><img src="images/domains.gif" border="0" hspace="5" align="absmiddle" alt="" /><font color="FF0000"><font size="4"><strong>Upcoming Domain Renewals</strong></font></font size></p> Full working code {php} $display_domain=0; $result = mysql_query("SELECT *, DATE_FORMAT(expirydate, '%d/%m/%Y') AS fdate FROM tbldomains WHERE userid='".$_SESSION['uid']."' AND DATEDIFF(expirydate, NOW()) ".$range." AND status='Active' ORDER BY `expirydate` ASC "); while($data = mysql_fetch_array($result)) { $display_domain=1; } if($display_domain){ {/php} <p><img src="images/domains.gif" border="0" hspace="5" align="absmiddle" alt="" /><font color="FF0000"><font size="4"><strong>Upcoming Domain Renewals</strong></font></font size></p> <table align="center" style="width:90%" class="clientareatable" cellspacing="1"> <tr class="clientareatableheading"><td>Domain</td><td>Expiration Date</td><td></td></tr> {php} $i=1; //$range = "<= 30"; //$range = "<= 45"; $range = "<= 60"; //$range = "BETWEEN 15 AND 60"; //$range = "BETWEEN 30 AND 60"; $result = $result = mysql_query("SELECT *, DATE_FORMAT(expirydate, '%d/%m/%Y') AS fdate FROM tbldomains WHERE userid='".$_SESSION['uid']."' AND DATEDIFF(expirydate, NOW()) ".$range." AND status='Active' ORDER BY `expirydate` ASC "); while($data = mysql_fetch_array($result)) { echo '<tr class="clientareatableactive"><td>'.$data['domain'].'</td><td>'.$data['fdate'].'</td><td><form method="post" action="clientarea.php?action=domainrenew"><input name="domainid" value="'.$data['id'].'" type="hidden"><input value="Renew Domain" class="button" type="submit"></form></td></tr>'; $i=0; } if($i)echo '<tr class="clientareatableactive"><td colspan="2">No upcoming domain renewals</td><td><a href="clientarea.php?action=domains">View Domains</a></td></tr>'; {/php} </table> {php} } {/php} screen capture of client account added 0 Quote Link to comment Share on other sites More sharing options...
flip Posted March 25, 2009 Share Posted March 25, 2009 I think there is something wrong with this. As it doesn't show the message... "There are no upcoming domain renewals" So the entire Table is ommitted. p.s. is it meant to be: if($i)echo '<tr class="clientareatableactive"><td colspan="2">No upcoming domain renewals</td><td><a href="clientarea.php?action=domains">View Domains</a></td></tr>'; or: if($i) { echo '<tr class="clientareatableactive"><td colspan="2">No upcoming domain renewals</td><td><a href="clientarea.php?action=domains">View Domains</a></td></tr>'; } ??? Thanks! {php} $display_domain=0; $result = mysql_query("SELECT * FROM tbldomains WHERE userid = ".$_SESSION['uid']." AND status = 'Active' LIMIT 1"); while($data = mysql_fetch_array($result)) { $display_domain=1; } if($display_domain){ {/php} <p><strong>Upcoming Domain Renewals</strong></p> <table align="center" style="width:90%" class="clientareatable" cellspacing="1"> <tr class="clientareatableheading"><td>Domain</td><td>Expiration Date</td><td></td></tr> {php} $i=1; $range = "<= 28"; // 28 = 4 wks || 42 = 6 wks || 56 = 8wks. //$range = "<= 42"; //$range = "<= 56"; //$range = "BETWEEN 15 AND 60"; //$range = "BETWEEN 30 AND 60"; $result = mysql_query("SELECT * FROM tbldomains WHERE userid='".$_SESSION['uid']."' AND DATEDIFF(expirydate, NOW()) ".$range." AND status='Active' ORDER BY `expirydate` ASC "); while($data = mysql_fetch_array($result)) { echo '<tr class="clientareatableactive"><td>'.$data['domain'].'</td><td>'.fromMySQLDate($data['expirydate']).'</td><td><form method="post" action="clientarea.php?action=domainrenew"><input name="domainid" value="'.$data['id'].'" type="hidden"><input value="Renew Domain" class="button" type="submit"></form></td></tr>'; $i=0; } if($i) echo '<tr class="clientareatableactive"><td colspan="2">No Upcoming Domain Renewals! | </td><td><a href="clientarea.php?action=domains">View Domain Names</a></td></tr>'; {/php} </table> {php} } {/php} 0 Quote Link to comment Share on other sites More sharing options...
AndyW Posted May 16, 2009 Share Posted May 16, 2009 {php} $display_domain=0; $result = mysql_query("SELECT * FROM tbldomains WHERE userid = ".$_SESSION['uid']." AND status = 'Active' LIMIT 1"); while($data = mysql_fetch_array($result)) { $display_domain=1; } if($display_domain){ {/php} <h2>Upcoming Domain Renewals</h2> <table width="100%" border="0" align="center" cellpadding="10" cellspacing="0" class="data"> <tr><th>Domain</th><th>Expiration Date</th><th></th></tr> {php} $i=1; //$range = "<= 30"; //$range = "<= 45"; $range = "<= 60"; //$range = "BETWEEN 15 AND 60"; //$range = "BETWEEN 30 AND 60"; $result = mysql_query("SELECT * FROM tbldomains WHERE userid='".$_SESSION['uid']."' AND DATEDIFF(expirydate, NOW()) ".$range." AND status='Active' ORDER BY `expirydate` ASC "); while($data = mysql_fetch_array($result)) { echo '<tr class="clientareatableactive"><td>'.$data['domain'].'</td><td>'.fromMySQLDate($data['expirydate']).'</td><td><form method="post" action="clientarea.php?action=domainrenew"><input name="domainid" value="'.$data['id'].'" type="hidden"><input value="Renew Domain" class="button" type="submit"></form></td></tr>'; $i=0; } if($i)echo '<tr><td colspan="2">No upcoming domain renewals</td><td><a href="clientarea.php?action=domains">View Domains</a></td></tr>'; {/php} </table> {php} } {/php} 0 Quote Link to comment Share on other sites More sharing options...
UH-Matt Posted September 21, 2009 Share Posted September 21, 2009 Thanks for this mod, works perfectly. 0 Quote Link to comment Share on other sites More sharing options...
JumpNetwork Posted September 25, 2009 Share Posted September 25, 2009 This code will display the date correctly, as per the setting in WHMCS. {php} $display_domain=0; $result = mysql_query("SELECT * FROM tbldomains WHERE userid = ".$_SESSION['uid']." AND status = 'Active' LIMIT 1"); while($data = mysql_fetch_array($result)) { $display_domain=1; } if($display_domain){ {/php} <p><strong>Upcoming Domain Renewals</strong></p> <table align="center" style="width:90%" class="clientareatable" cellspacing="1"> <tr class="clientareatableheading"><td>Domain</td><td>Expiration Date</td><td></td></tr> {php} $i=1; $range = "<= 30"; //$range = "<= 45"; //$range = "<= 60"; //$range = "BETWEEN 15 AND 60"; //$range = "BETWEEN 30 AND 60"; $result = mysql_query("SELECT * FROM tbldomains WHERE userid='".$_SESSION['uid']."' AND DATEDIFF(expirydate, NOW()) ".$range." AND status='Active' ORDER BY `expirydate` ASC "); while($data = mysql_fetch_array($result)) { echo '<tr class="clientareatableactive"><td>'.$data['domain'].'</td><td>'.fromMySQLDate($data['expirydate']).'</td><td><form method="post" action="clientarea.php?action=domainrenew"><input name="domainid" value="'.$data['id'].'" type="hidden"><input value="Renew Domain" class="button" type="submit"></form></td></tr>'; $i=0; } if($i)echo '<tr class="clientareatableactive"><td colspan="2">No upcoming domain renewals</td><td><a href="clientarea.php?action=domains">View Domains</a></td></tr>'; {/php} </table> {php} } {/php} This Code is absolutly EXCELLENT!!!! Thank you very much. I have no knowledge in coding at all, and my eyes are boggling at the moment at all of this, however I am trying to learn. Can someone please help me out on the following??? Can we change it to show domains from 90 days down to 30 days, with having the renew button there for people to renew the domain right now? Once 30 days comes, how can I setup WHMCS to automatically generate a new invoice for the domain for customers to pay? Once this 30 days has reached, is it possible for the Renew button to change to pay invoice, and then the invoice that was created in the above point, is brough up by clicking on the Pay Invoice? I know I may be asking alot, but I am sure others would like this. I am only new, and trying to learn, and in my code i even managed to put the little domain logo before the words Upcoming Domain Renewals, and I was impressed i got that right. Thanks heaps guys, one day I hope I can help people like you do :):) 0 Quote Link to comment Share on other sites More sharing options...
Jo Stonehouse Posted September 30, 2009 Share Posted September 30, 2009 Once 30 days comes, how can I setup WHMCS to automatically generate a new invoice for the domain for customers to pay? I believe this is 'Default Auto Renewal Setting' in the Domains tage of General Settings. Make sure it's switched on and an invoice will automatically be generated, if the client has set auto renew to on in their profile. Once this 30 days has reached, is it possible for the Renew button to change to pay invoice, and then the invoice that was created in the above point, is brough up by clicking on the Pay Invoice? This would be an excellent addition. Currently if the invoice is already generated (ours generate 15 days before) it is still possible for a customer to renew. Perhaps a more simple mod would be to somehow disable the renew button if auto-renew is set, to avoid the likelyhood of someone renewing AND paying the auto generated invoice? Fantastic script by the way, many thanks! 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.