THT Community (TCom)

Full Version: Admin Client Details IP Expansion
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
MgHq and I made this quick simple mod to show the user's signup ip when the admin is looking at user details. No doubt there is a better way to do this but without any documentation for THT this is a really simple way to add it.

Just add the code to the very bottom of the following to files.

/includes/variables.php
Code:
global $db;
$query= $db->query("SELECT `ip` FROM `tht_users` WHERE id='$_GET[do];'");
$dataquery= mysql_fetch_array($query);
$data = preg_replace("/%IP%/si", $dataquery[ip], $data);


/includes/tpl/clientdetails.tpl
Code:
<div class="subborder">
    <div class="sub">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="50%">Signup Ip:</td>
          <td align="right">%IP%
          <a title="The Ip address that this user signed up with." class="tooltip"><img src="<URL>themes/icons/information.png" /></a></td>
        </tr>
      </table>
    </div>
</div>
Yea, i had got the idea when looking for a users ip in phpmyadmin. I hate sorting through all there names so i decided me and zzbomb should start making a script to do it easier.

We will add more features as we see them needed
Ok this is a kinda late question but um.... Is the IP on file their original signup ip or just the most recent one they used to access the system?
(02-02-2010 03:35 PM)zzbomb Wrote: [ -> ]Ok this is a kinda late question but um.... Is the IP on file their original signup ip or just the most recent one they used to access the system?

The signup as far as i know
(02-02-2010 03:38 PM)mghq2 Wrote: [ -> ]
(02-02-2010 03:35 PM)zzbomb Wrote: [ -> ]Ok this is a kinda late question but um.... Is the IP on file their original signup ip or just the most recent one they used to access the system?

The signup as far as i know

Yup.
Yay I was correct
(02-02-2010 08:28 PM)Kevin Wrote: [ -> ]
(02-02-2010 03:38 PM)mghq2 Wrote: [ -> ]
(02-02-2010 03:35 PM)zzbomb Wrote: [ -> ]Ok this is a kinda late question but um.... Is the IP on file their original signup ip or just the most recent one they used to access the system?

The signup as far as i know

Ok good because that is what i put it down as lol.
Yup.
Thanks, gracias!
I did something similar to this on my setup but I used this code in the clientdetails.tpl file so I can click on the IP and it will do a whois lookup for me:

Code:
<div class="subborder">
    <div class="sub">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="50%">Client IP:</td>
          <td align="right"><a href="http://whois.domaintools.com/%CLIENTIP%" target="_blank">%CLIENTIP%</a>
          <a title="The IP used during registration." class="tooltip"><img src="<URL>themes/icons/information.png" /></a></td>
        </tr>
      </table>
    </div>
</div>
Haha very nice.
Pages: 1 2
Reference URL's