merlinpa1969 Posted November 30, 2014 Share Posted November 30, 2014 Im looking for a way to modify the existing output on the services report, I would like the output to display the actual Server name and Product name rather than just the IPs any help would be much appreciated 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted November 30, 2014 Share Posted November 30, 2014 I won't post the whole file, but you'll need to make two changes... firstly, modify the $filterfields array to add two new checkboxes - "Product Name" and "Server Name"... $filterfields = array("id"=>"ID","userid"=>"User ID","clientname"=>"Client Name","orderid"=>"Order ID","packageid"=>"Product ID","productname"=>"Product Name","server"=>"Server ID","servername"=>"Server Name","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"); and then modify an existing block of code to query the appropriate table for the server and product names... $fieldlist = array(); foreach ($incfields AS $fieldname) { if (array_key_exists($fieldname,$filterfields)) { $reportdata["tableheadings"][] = $filterfields[$fieldname]; if ($fieldname=="clientname") $fieldname = "(SELECT CONCAT(firstname,' ',lastname) FROM tblclients WHERE id=tblhosting.userid)"; if ($fieldname=="productname") $fieldname = "(SELECT name FROM tblproducts WHERE id=tblhosting.packageid)"; if ($fieldname=="servername") $fieldname = "(SELECT name FROM tblservers WHERE server=tblservers.id)"; $fieldlist[] = $fieldname; } } 0 Quote Link to comment Share on other sites More sharing options...
merlinpa1969 Posted November 30, 2014 Author Share Posted November 30, 2014 Totally AWESOME thats exactly what I needed thank you 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.