Jump to content


Level 2 Member
  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About DewlanceHosting

  • Rank
    Level 2 Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. DewlanceHosting

    [Urgent] WHMCS Report - Not displaying datecreated in my code

    Thank you so so much. Now I can export Product Date and Client Date with other options 😀😊
  2. DewlanceHosting

    [Urgent] WHMCS Report - Not displaying datecreated in my code

    Not working ;( And need it quickly.
  3. I want to display datecreated in WHMCS Report. I am using this code and modified it. My Modified code: <?php if (!defined("WHMCS")) die("This file cannot be accessed directly"); $reportdata["title"] = "Services"; $filterfields = array("datecreated"=>"datecreated","id"=>"ID","userid"=>"User ID","clientname"=>"Client Name","orderid"=>"Order ID","packageid"=>"Product ID","packagename"=>"Product Name","server"=>"Server ID","domain"=>"Domain Name","dedicatedip"=>"Dedicated IP","assignedips"=>"Assigned IPs","firstpaymentamount"=>"First Payment Amount","amount"=>"Recurring Amount","billingcycle"=>"Billing Cycle","nextduedate"=>"Next Due Date","paymentmethod"=>"Payment Method","domainstatus"=>"Status","username"=>"Username","password"=>"Password","notes"=>"Notes","subscriptionid"=>"Subscription ID","suspendreason"=>"Suspend Reason"); $reportdata["description"] = $reportdata["headertext"] = ''; $incfields = $whmcs->get_req_var('incfields'); $filterfield = $whmcs->get_req_var('filterfield'); $filtertype = $whmcs->get_req_var('filtertype'); $filterq = $whmcs->get_req_var('filterq'); if (!is_array($incfields)) $incfields = array(); if (!is_array($filterfield)) $filterfield = array(); if (!is_array($filtertype)) $filtertype = array(); if (!is_array($filterq)) $filterq = array(); if (!$print) { $reportdata["description"] = "This report can be used to generate a custom export of services by applying up to 5 filters. CSV Export is available via the download link at the bottom of the page."; $reportdata["headertext"] = '<form method="post" action="reports.php?report='.$report.'"> <table class="form" width="100%" border="0" cellspacing="2" cellpadding="3"> <tr><td width="20%" class="fieldlabel">Fields to Include</td><td class="fieldarea"><table width="100%"><tr>'; $i=0; foreach ($filterfields AS $k=>$v) { $reportdata["headertext"] .= '<td width="20%"><input type="checkbox" name="incfields[]" value="'.$k.'" id="fd'.$k.'"'; if (in_array($k,$incfields)) $reportdata["headertext"] .= ' checked'; $reportdata["headertext"] .= ' /> <label for="fd'.$k.'">'.$v.'</label></td>'; $i++; if (($i%5)==0) $reportdata["headertext"] .= '</tr><tr>'; } $reportdata["headertext"] .= '</tr></table></td></tr>'; for ( $i = 1; $i <= 5; $i ++ ) { $reportdata["headertext"] .= '<tr><td width="20%" class="fieldlabel">Filter '.$i.'</td><td class="fieldarea"><select name="filterfield['.$i.']"><option value="">None</option>'; foreach ($filterfields AS $k=>$v) { $reportdata["headertext"] .= '<option value="'.$k.'"'; if (isset($filterfield[$i]) && $filterfield[$i]==$k) $reportdata["headertext"] .= ' selected'; $reportdata["headertext"] .= '>'.$v.'</option>'; } $reportdata["headertext"] .= '</select> <select name="filtertype['.$i.']"><option>Exact Match</option><option value="like"'; if (isset($filtertype[$i]) && $filtertype[$i]=="like") $reportdata["headertext"] .= ' selected'; $reportdata["headertext"] .= '>Containing</option></select> <input type="text" name="filterq['.$i.']" size="30" value="'.(isset($filterq[$i])?$filterq[$i]:'').'" /></td></tr>'; } $reportdata["headertext"] .= '</table> <p align="center"><input type="submit" value="Filter" /></p> </form>'; } if (count($incfields)) { $filters = array(); foreach ($filterfield as $i => $val) { if ($val && array_key_exists($val, $filterfields)) { if ($val == 'clientname') { $val = "(SELECT CONCAT(firstname,' ',lastname) FROM tblclients WHERE id=tblhosting.userid)"; } $filters[] = ($filtertype[$i]=="like") ? $val . " LIKE '%" . db_escape_string($filterq[$i]) . "%'" : $val . "='" . db_escape_string($filterq[$i]) . "'"; } } $fieldlist = array(); foreach ($incfields AS $fieldname) { if (array_key_exists($fieldname,$filterfields)) { $reportdata["tableheadings"][] = $filterfields[$fieldname]; if ($fieldname=="clientname") $fieldname = "(SELECT CONCAT(firstname,' ',lastname, datecreated) FROM tblclients WHERE id=tblhosting.userid)"; if ($fieldname=="packagename") $fieldname = "(SELECT `name` FROM `tblproducts` WHERE `tblproducts`.`id`=`tblhosting`.`packageid`)"; if ($fieldname=="datecreated") $fieldname = "(SELECT `datecreated` FROM `tblclients` WHERE `tblclients`.`id`=`tblhosting`.`packageid`)"; $fieldlist[] = $fieldname; } } $result = select_query("tblhosting", implode(',', $fieldlist), implode(' AND ', $filters)); while ($data = mysql_fetch_assoc($result)) { if (isset($data['paymentmethod'])) $data['paymentmethod'] = $gateways->getDisplayName($data['paymentmethod']); if (isset($data['password'])) $data['password']=decrypt($data['password']); $reportdata["tablevalues"][] = $data; } } Output is unexpected: (Datecreated data should be shown in datecreated fieled)
  4. Hello, I want something like: Other Country Invoice format: #CompanyName-Number. India Invoice format: #India-Number(Must be separate from Other country's invoice number) Example Invoice No: #Dewlance-1 #Dewlance-2 Indian Invoice Example: #India-1 #India-2 Any Idea? This is required in India ;/ Thanks.
  5. DewlanceHosting

    New Name Server Tracker Module: Free on GitHub

    Does it means it will show result of all customer's doman with their current nameserver they are using?
  6. DewlanceHosting

    WHMCS Gift Card - By PreMadeKB

    v1.3 Released: - Minor bug fixed. - License issue resolved. - Added some modification to support WHMCS's latest version.
  7. DewlanceHosting

    WHMCS Gift Card - By PreMadeKB

    We updated existing v1.2 files and now its support: PHP: 5.6, 7.0, 7.1 and 7.2+ WHMCS Version: 6 to 7.7+
  8. Hello, Sometimes I need to send abuse email which contains sensitive information and sometimes it contains spam email abuse report. I need some code which can hide text in email. For example: [hide]This text will only display in ticket but it will not send to email[/hide] Any help or any module is exist for this task? Thanks.
  9. v1.8 Released - Total 287 Articles 18 New Articles Added 5 Articles on cPanel (SSL, AutoSSL, CSR, etc) 8 New Articles on Softaculous. FTP Client - FileZilla (5+ Articles on FileZilla) 50+ Images added. If you like or dislike our KB then don't forget to post your review on WHMCS Marketplace. Note: It can take some time to reply to your ticket but we will surely reply you as soon as possible ;) Be Happy!
  10. DewlanceHosting

    Display Credit Balance In Six Template

    Any solution for fixing this issue? If I remove this hook then it go back to exact position. I tried to add space, <br>, etc code but can't get success from last 4 to 6 hours 😢
  11. DewlanceHosting

    Display Credit Balance In Six Template

    Yes, I will not add this. I saw this Widget already showing on most of pages.
  12. DewlanceHosting

    Display Credit Balance In Six Template

    Oh, You are right. I was thinking about adding it to non-logged in sidebar order category page but now I think it will be distraction to customer and they will start adding fund instead of purchasing product. ;) How can I move css box to center. I use this css code in class ="col-sm-offset-3" (I even use col-sm-offset-4 but does not set in center) Any help? Screenshot attached.
  13. DewlanceHosting

    Display Credit Balance In Six Template

    Thanks a lot, I am using it from many years 😉 How to show this in Sidebar panel of every page whichever contain Sidebar? (Secondary Sidebar or every type of sidebar)
  14. DewlanceHosting

    WHMCS Gift Card - By PreMadeKB

    v1.2 Released. Minor bug fixes, Now it support PHP 7.2 and support for WHMCS 7.6 Added.
  15. Hello, Any plugin is available which allow to login to WHMCS only from IPs which is belong to their country? If Client "A" is from Spain then force him to only login from Spanish IP Address and not from any other country's IP or send 2step authentication to his/her email or mobile. Thanks.

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated