PDA

View Full Version : Log Clients details before changing in admin



bigjat69
09-02-08, 03:59 PM
Hi guys im using the 'How to stop customers change their account name details' mod by Si (Many thanks for this Si, not only did you help me out but also gave me the confidence to try this for myself) and came up with a small mod that will let you log the current details (from the client summary page) before taking you into the profile page where you will edit and save the new details.

From the summary page you can also view and then print the log report.

This may be helpful to those who have not used the mod by Si but just want to keep an eye on accounts that seem to be changing details far to regularly.

This has been tested on v3.6.2 (i will post v3.6.1 later)

INSTALLATION

There is only one .tpl to edit and one file to upload after creating the new table.

1. run the SQL in the attached file tblclientlog_SQL.txt in your WHMCS database (PLEASE BACK UP YOUR DB FIRST!!)

2. Download (from your WHMCS root) /admin/templates/clientssummary.tpl
and save as a backup.

3. Upload the following code as clientssummary.tpl

clientssummary.tpl


<div style="font-size:18px;">#{$clientsdetails.userid} - {$clientsdetails.firstname} {$clientsdetails.lastname}</div>
<img src="images/spacer.gif" width="1" height="6" /><br />

<table width=100%>
<tr><td width=34% valign=top>

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width=100% cellpadding=2>
<tr><td align=center colspan=2 class="fieldareasmall"><strong>Client Information</strong></td></tr>
<tr><td width=90 align=right>First Name</td><td class="fieldarea" style="height:20px;">{$clientsdetails.firstname}</td></tr>
<tr><td align=right>Last Name</td><td class="fieldarea" style="height:20px;">{$clientsdetails.lastname}</td></tr>
<tr><td align=right>Company Name</td><td class="fieldarea" style="height:20px;">{$clientsdetails.companyname}</td></tr>
<tr><td align=right>Email Address</td><td class="fieldarea" style="height:20px;">{$clientsdetails.email}</td></tr>
<tr><td align=right>Address 1</td><td class="fieldarea" style="height:20px;">{$clientsdetails.address1}</td></tr>
<tr><td align=right>Address 2</td><td class="fieldarea" style="height:20px;">{$clientsdetails.address2}</td></tr>
<tr><td align=right>City</td><td class="fieldarea" style="height:20px;">{$clientsdetails.city}</td></tr>
<tr><td align=right>State</td><td class="fieldarea" style="height:20px;">{$clientsdetails.state}</td></tr>
<tr><td align=right>Postcode</td><td class="fieldarea" style="height:20px;">{$clientsdetails.postcode}</td></tr>
<tr><td align=right>Country</td><td class="fieldarea" style="height:20px;">{$clientsdetails.country} - {$clientsdetails.countrylong}</td></tr>
<tr><td align=right>Phone Number</td><td class="fieldarea" style="height:20px;">{$clientsdetails.phonenumber}</td></tr>
</table>

</td></tr>
</table>

<img src="images/spacer.gif" width="1" height="4" /><br />

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width="100%" cellpadding="2">
<tr><td align="center" class="fieldareasmall"><strong>Additional Contacts</strong></td></tr>
<tr><td align="center">
{foreach key=num from=$contacts item=contact}
{$contact.firstname} {$contact.lastname} - {$contact.email}<br />
{foreachelse}
No additional contacts setup
{/foreach}

</td></tr></table>
</td></tr></table>

<img src="images/spacer.gif" width="1" height="4" /><br />

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width=100% cellpadding=2>
<tr><td align=center colspan=2 class="fieldareasmall"><strong>Other Information</strong></td></tr>
<tr><td width=90 align=right>Status</td><td class="fieldarea" style="height:20px;">{$clientsdetails.status}</td></tr>
<tr><td align=right>Tax Exempt</td><td class="fieldarea" style="height:20px;">{$clientsdetails.taxstatus}</td></tr>
<tr><td align=right>Signup Date</td><td class="fieldarea" style="height:20px;">{$signupdate}</td></tr>
<tr><td align=right>Client For</td><td class="fieldarea" style="height:20px;">{$clientfor}</td></tr>
<tr><td align=right>Last Login</td><td class="fieldarea" style="height:20px;">{$lastlogin}</td></tr>
</table>

</td></tr></table>

</td><td width=33% valign=top>

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width=100% cellpadding=2>
<tr><td align=center colspan=2 class="fieldareasmall"><strong>Client Stats</strong></td></tr>
<tr><td width=125 align=right>Invoices Paid</td><td class="fieldarea" style="height:20px;">{$invoicespaidnum} ({$invoicespaidamount})</td></tr>
<tr><td align=right>Invoices Due</td><td class="fieldarea" style="height:20px;">{$invoicesduenum} ({$invoicesdueamount})</td></tr>
<tr><td align=right>Invoices Cancelled</td><td class="fieldarea" style="height:20px;">{$invoicescancellednum} ({$invoicescancelledamount})</td></tr>
<tr><td align=right>Profit</td><td class="fieldarea" style="height:20px;">{$profit}</td></tr>
<tr><td align=right>Credit Balance</td><td class="fieldarea" style="height:20px;">{$credit}</td></tr>
<tr><td align=right>Hosting Accounts</td><td class="fieldarea" style="height:20px;">{$hosting} ({$hostingtotal} Total)</td></tr>
<tr><td align=right>Reseller Accounts</td><td class="fieldarea" style="height:20px;">{$reseller} ({$resellertotal} Total)</td></tr>
<tr><td align=right>Dedicated/VPS Servers</td><td class="fieldarea" style="height:20px;">{$dedicated} ({$dedicatedtotal} Total)</td></tr>
<tr><td align=right>Products/Services</td><td class="fieldarea" style="height:20px;">{$other} ({$othertotal} Total)</td></tr>
<tr><td align=right>Domains</td><td class="fieldarea" style="height:20px;">{$domains} ({$domainstotal} Total)</td></tr>
<tr><td align=right>Support Tickets</td><td class="fieldarea" style="height:20px;">{$tickets} ({$ticketstotal} Total)</td></tr>
<tr><td align=right>Affiliate Signups</td><td class="fieldarea" style="height:20px;">{$affiliates}</td></tr>
</table>

</td></tr>
</table>

<img src="images/spacer.gif" width="1" height="4" /><br />

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width="100%" cellpadding="2">
<tr><td align="center" class="fieldareasmall"><strong>Last 5 Emails</strong></td></tr>
<tr><td>
{foreach key=num from=$lastfivemail item=email}
{$email.date} - <a href="#" onclick="window.open('clientsemails.php?&displaymessage=true&id={$email.id}','','width=650,height=400,scrollbar s=yes');return false">{$email.subject}</a><br />
{foreachelse}
<div style='text-align:center;'>No emails sent</div>
{/foreach}
</td></tr></table>
</td></tr></table>

</td><td width=33% valign=top>

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width="100%" cellpadding="2">
<tr><td align="center" class="fieldareasmall"><strong>Actions</strong></td></tr>
<tr><td align="center">

<a href="../logfile/logclient.php?userid={$clientsdetails.userid}&action=logclient">Log Cient Info & Edit</a><br />
<a href="../logfile/logclient.php?userid={$clientsdetails.userid}&action=viewclient">View Client Log</a><br />
<a href="../logfile/logclient.php?userid={$clientsdetails.userid}&action=deletelog" onclick="return confirm('You cannot undo a delete function. If you are NOT sure click CANCEL');">Delete Client Log</a><br /><br />
<a href="../dologin.php?username={$clientsdetails.email}">Login as Client</a><br /><br />
<a href="ordersadd.php?userid={$clientsdetails.userid}">Add New Order</a><br />
<a href="invoices.php?action=createinvoice&userid={$clientsdetails.userid}">Create Invoice</a><br />
<a href="clientssummary.php?userid={$clientsdetails.userid}&generateinvoices=true">Generate Due Invoices</a><br /><br />
<a href="#" onclick="window.open('clientscredits.php?userid={$clientsde tails.userid}','','width=750,height=350,scrollbars =yes');return false">Manage Credits</a><br />
<a href="clientstransactions.php?userid={$clientsdetails.us erid}">View Transactions History</a><br />
<a href="#" onclick="openCCDetails();return false">View/Edit Credit Card Information</a><br /><br />
<a href="supporttickets.php?action=open&userid={$clientsdetails.userid}">Open New Support Ticket</a><br />
<a href="supporttickets.php?view=any&client={$clientsdetails.userid}">View all Support Tickets</a><br /><br />
{$afflink}
<a href="#" onclick="window.open('clientsmerge.php?userid={$clientsdeta ils.userid}','movewindow','width=500,height=280,to p=100,left=100');return false">Merge Clients Accounts</a><br />
<a href="#" onclick="deleteClient();return false">Delete Clients Account</a><br /><br />
</td></tr></table>
</td></tr></table>

<img src="images/spacer.gif" width="1" height="4" /><br />

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width="100%" cellpadding="2">
<tr><td align="center" class="fieldareasmall"><strong>Send Email</strong></td></tr>
<tr><td align="center">
<form action="clientsemails.php?userid={$clientsdetails.userid}&action=send&type=general" method="post">
<input type="hidden" name="id" value="{$clientsdetails.userid}">
{$messages}
<input type="submit" value="Send" class="button">
</form>

</td></tr></table>
</td></tr></table>

<img src="images/spacer.gif" width="1" height="4" /><br />
<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width="100%" cellpadding="2">
<tr><td align="center" class="fieldareasmall"><strong>Admin Notes</strong></td></tr>
<tr><td align="center">
<form method="post" action="?userid={$clientsdetails.userid}">
<textarea name="adminnotes" rows="6" cols="38" />{$clientsdetails.notes}</textarea>
<div align="center"><input type="submit" value="Submit" class="button" /></div>
</form>
</td></tr></table>
</td></tr></table>
</td></tr>
<tr><td colspan="3">

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width="100%" cellpadding="2">
<tr><td align="center" class="fieldareasmall"><strong>Products/Services</strong></td></tr>
<tr><td align="center">
<table width="100%" cellspacing="1" class="admindatatable">
<tr class="admindatatableheader">
<td width=40>ID</td>
<td>Product/Service</td>
<td>Amount</td>
<td>Billing Cycle</td>
<td>Signup Date</td>
<td>Next Due Date</td>
<td>Status</td>
<td width="20"></td>
</tr>
{foreach key=num from=$productsummary item=product}
<tr onmouseover="this.className='admindatatablehighlight'" onmouseout="this.className=''"><td align=center><a href="clientshosting.php?userid={$clientsdetails.userid}&hostingid={$product.id}">{$product.idshort}</a></td><td style="padding-left:5px;padding-right:5px">{$product.dpackage} - <a href="http://{$product.domain}" target="_blank">{$product.domain}</a></td><td align="center">{$product.amount}</td><td align=center>{$product.dbillingcycle}</td><td align=center>{$product.regdate}</td><td align=center>{$product.nextduedate}</td><td align="center">{$product.domainstatus}</td><td align="center"><a href="clientshosting.php?userid={$clientsdetails.userid}&hostingid={$product.id}"><img src="images/edit.gif" width="16" height="16" border="0" alt="Edit"></a></td></tr>
{foreachelse}
<tr><td bgcolor=#ffffff align=center colspan=8>No Products/Services Found</td></tr>
{/foreach}
</table>

</td></tr></table>
</td></tr></table>

<img src="images/spacer.gif" width="1" height="4" /><br />

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width="100%" cellpadding="2">
<tr><td align="center" class="fieldareasmall"><strong>Addons</strong></td></tr>
<tr><td align="center">
<table width="100%" cellspacing="1" class="admindatatable">
<tr class="admindatatableheader">
<td width=40>ID</td>
<td>Addon Details</td>
<td>Amount</td>
<td>Billing Cycle</td>
<td>Signup Date</td>
<td>Next Due Date</td>
<td>Status</td>
<td width="20"></td>
</tr>
{foreach key=num from=$addonsummary item=addon}
<tr onmouseover="this.className='admindatatablehighlight'" onmouseout="this.className=''"><td align=center><a href="clientshosting.php?userid={$clientsdetails.userid}&hostingid={$addon.hostingid}">{$addon.idshort}</a></td><td style="padding-left:5px;padding-right:5px">{$addon.addonname}<br>{$addon.dpackage} - <a href="http://{$addon.domain}" target="_blank">{$addon.domain}</a></td><td align="center">{$addon.amount}</td><td align=center>{$addon.dbillingcycle}</td><td align=center>{$addon.regdate}</td><td align=center>{$addon.nextduedate}</td><td align="center">{$addon.status}</td><td align="center"><a href="clientshosting.php?userid={$clientsdetails.userid}&hostingid={$addon.hostingid}"><img src="images/edit.gif" width="16" height="16" border="0" alt="Edit"></a></td></tr>
{foreachelse}
<tr><td bgcolor=#ffffff align=center colspan=8>No Addons Found</td></tr>
{/foreach}
</table>

</td></tr></table>
</td></tr></table>

<img src="images/spacer.gif" width="1" height="4" /><br />

<table width="100%" cellspacing="1" cellpadding="0" bgcolor="#8FBCE9"><tr><td bgcolor="#ffffff">
<table width="100%" cellpadding="2">
<tr><td align="center" class="fieldareasmall"><strong>Domains</strong></td></tr>
<tr><td align="center">
<table width="100%" cellspacing="1" class="admindatatable">
<tr class="admindatatableheader">
<td width=40>ID</td>
<td>Domain</td>
<td>Registrar</td>
<td>Reg Date</td>
<td>Next Due Date</td>
<td>Expiry Date</td>
<td>Status</td>
<td width="20"></td>
</tr>
{foreach key=num from=$domainsummary item=domain}
<tr onmouseover="this.className='admindatatablehighlight'" onmouseout="this.className=''"><td align=center><a href="clientsdomains.php?userid={$clientsdetails.userid}&domainid={$domain.id}">{$domain.idshort}</a></td><td style="padding-left:5px;padding-right:5px"><a href="http://{$domain.domain}" target="_blank">{$domain.domain}</a></td><td align="center">{$domain.registrar}</td><td align=center>{$domain.registrationdate}</td><td align=center>{$domain.nextduedate}</td><td align="center">{$domain.expirydate}</td><td align="center">{$domain.status}</td><td align="center"><a href="clientsdomains.php?userid={$clientsdetails.userid}&domainid={$domain.id}"><img src="images/edit.gif" width="16" height="16" border="0" alt="Edit"></a></td></tr>
{foreachelse}
<tr><td bgcolor=#ffffff align=center colspan=8>No Domains Found</td></tr>
{/foreach}
</table>

</td></tr></table>
</td></tr></table>

</td></tr></table>

continues below......

bigjat69
09-02-08, 04:00 PM
4. Inside your WHMCS root create a new folder called 'logfile' and upload the following code as logclient.php into this new folder.

logclient.php

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<?php
/*
Log client info page created by kalvinder khabra 'bigjat' of web-junkies.net on 09/02/2008
*/
// colours for the lists on mouseovers
$tr_bg_colour = "#E2E2E2";
$tr_bg_out_colour = "#E2E2E2";
$tr_bg_over_colour = "#CCCCCC";

// colours for the list header
$tr_header_colour = "#CBD6E8";


require('../configuration.php');

$db_connection = mysql_connect($db_host, $db_username, $db_password) or die(mysql_error());
mysql_select_db($db_name, $db_connection);

$my_t =getdate(date("U"));
$logtime = ("$my_t[hours]:$my_t[minutes] $my_t[mon] /$my_t[mday]/ $my_t[year]");
$id = (isset($HTTP_GET_VARS['userid']) ? $HTTP_GET_VARS['userid'] : '');
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
switch ($action) {
case 'logclient':
$sql = "select id, firstname, lastname, companyname, email, address1, address2, city, state, postcode, country, phonenumber, lastlogin, ip from tblclients where id = '". $id ."'";
$mysql_result = mysql_query($sql,$db_connection);
$get_user = mysql_fetch_assoc($mysql_result);

$logid = $get_user["id"];
$logfirstname = $get_user["firstname"];
$loglastname = $get_user["lastname"];
$logcompanyname = $get_user["companyname"];
$logemail = $get_user["email"];
$logaddress1 = $get_user["address1"];
$logaddress2 = $get_user["address2"];
$logcity = $get_user["city"];
$logstate = $get_user["state"];
$logpostcode = $get_user["postcode"];
$logcountry = $get_user["country"];
$logphonenumber = $get_user["phonenumber"];
$loglastlogin = $get_user["lastlogin"];
$logip = $get_user["ip"];

$sql_insert = "insert into tblclientlog (logtime,id,firstname, lastname, companyname, email, address1, address2, city, state, postcode, country, phonenumber, lastlogin, ip) values('$logtime','$logid','$logfirstname','$logla stname','$logcompanyname','$logemail','$logaddress 1','$logaddress2','$logcity','$logstate','$logpost code','$logcountry','$logphonenumber','$loglastlog in','$logip')";
$mysql_result_insert = mysql_query($sql_insert,$db_connection);

echo "<meta http-equiv='refresh' content='0; url=../admin/clientsprofile.php?userid=". $id ."'>";
exit;

case 'deletelog':
$deletequery = "delete from tblclientlog where id = '". $id ."'";
$mysql_delete = mysql_query($deletequery,$db_connection);

echo "<meta http-equiv='refresh' content='0; url=../admin/clientssummary.php?userid=". $id ."'>";
exit;

case 'viewclient':
$sql = "select logid, logtime, id, firstname, lastname, companyname, email, address1, address2, city, state, postcode, country, phonenumber, lastlogin, ip from tblclientlog where id = '". $id ."' order by logid desc";
$mysql_result = mysql_query($sql,$db_connection);
$num_rows = mysql_num_rows($mysql_result);




?>

<head>
<title>Client Info Log</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0">

<tr bgcolor="<?php echo $tr_header_colour;?>">
<td><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><A href="javascript:window.print()">Click
To <br />
Print Report</a></font></td>
<td><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="../admin/clientssummary.php?userid=<?php echo $id; ?>">Return
To <br />
Admin Area</a></font></td>
<td colspan="13"><div align="left"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><font color="#000000">Client ID = <?php echo $id; ?></font></font></font></div></td>
</tr>
<tr bgcolor="<?php echo $tr_header_colour;?>">
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Last
Updated<br />
(Month/Day/Year)</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">First<br />
Name</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Last<br />
Name</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Company<br />
Name</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Email</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Address1</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Address2</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">City</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">State</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Postcode</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Country</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Phone
</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Last Login</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">Last IP Address</font></font></font></div></td>
<td><div align="center"><font size="2"><font size="2"><font color="#000000">&nbsp;&nbsp;</font></font></font></div></td>
</tr>
<?php
if ($num_rows == 0); {
?>
<tr bgcolor="<?php echo $tr_header_colour;?>">
<td><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><A href="javascript:window.print()">Click
To <br />
Print Report</a></font></td>
<td><font color="#000000" size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="../admin/clientssummary.php?userid=<?php echo $id; ?>">Return
To <br />
Admin Area</a></font></td>
<td colspan="13"><div align="left"><font color="#000000" face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><font color="#000000">NO RECORDS FOUND FOR CLIENT ID = <?php echo $id; ?></font></font></font></div></td>
</tr>
<?php
}
?>
<?php
while ($row = mysql_fetch_array($mysql_result))
{

$loglastedit = $row["logtime"];
$logid = $row["id"];
$logfirstname = $row["firstname"];
$loglastname = $row["lastname"];
$logcompanyname = $row["companyname"];
$logemail = $row["email"];
$logaddress1 = $row["address1"];
$logaddress2 = $row["address2"];
$logcity = $row["city"];
$logstate = $row["state"];
$logpostcode = $row["postcode"];
$logcountry = $row["country"];
$logphonenumber = $row["phonenumber"];
$loglastlogin = $row["lastlogin"];
$logip = $row["ip"];

?>
<tr bgcolor="<?php echo $tr_bg_colour;?>" onMouseOver="this.bgColor='<?php echo $tr_bg_over_colour;?>'" onMouseOut="this.bgColor='<?php echo $tr_bg_out_colour;?>'">
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $loglastedit; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logfirstname; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $loglastname; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logcompanyname; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logemail; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logaddress1; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logaddress2; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logcity; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logstate; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logpostcode; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logcountry; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logphonenumber; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $loglastlogin; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2"><?php echo $logip; ?></font></font></div></td>
<td><div align="center"><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2">&nbsp;&nbsp;</font></font></div></td>
</tr>
<?php }
}
?>
</table>
</body>
</html>

FINISHED

Now when you view client summary there will be two links above 'Client Information'.

The first will simply save the surrent details to the new tblclientlog along with the current time and date as a string, as the debate with time between versions of php has gotten very confusing, and will then redirect you to the profile page to edit.

The second will take you to a page where all of the changes you decided to log for that client are shown by decending id (there fore time/date desc also)

There are links on this page (ugly i know!!) to fire a javascript print or return to the client summary page.

Hope some of you find it useful.

Regards bigjat @web-junkies.net :)

bigjat69
09-02-08, 07:29 PM
No difference in files for v3.6.1, use same as above.

Si
09-11-08, 03:02 PM
Hi,
Interesting mod.

However a couple of issues.

While deleting a test clients logs it actually deleted the entire logs of all of my clients. ?
wiping out the records of all the money they had paid over the years, invoices due on their accounts etc, invoices cancelled. I'd appreciate a quick explanation on how to get this info back into my DB without doing an entire db backup.

Clicking on the first link 'Log Client Info and Edit' produces an error IF, like most people you have changed your admin folder from admin/ to something else. (I suspect that's the reason). The forwarding on the 2nd url doesn't work, or it falls over at that point.

Otherwise, an intriging idea and I'd be interested to see this working.

Si

Si
09-11-08, 03:10 PM
Hmmm, uploaded the original clientssummary.tpl file and the logs started showing again so I guess it's a session/browser issue that's taking place here.

Strange.

LemonBarley
10-15-08, 04:20 AM
same error too.

Invoices Paid ()
Invoices Due ()
Invoices Cancelled ()
Profit
Credit Balance
Hosting Accounts ( Total)
Reseller Accounts ( Total)
Dedicated/VPS Servers ( Total)
Products/Services ( Total)
Domains ( Total)
Support Tickets ( Total)
Affiliate Signups


those with (total) means they are not showing.

LemonBarley
10-15-08, 04:49 AM
Client Stats showing all NONE.

damn. even restoring a previous database does not gain back the correct information in client area. how do fix this?