403Webshell
Server IP : 208.122.213.31  /  Your IP : 216.73.216.185
Web Server : Apache
System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64
User : WHMCS_MIA_382 ( 1001)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/httpd/html/baberankings.com.bak/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html/baberankings.com.bak/ptrack.php
<?php
//#!/usr/local/bin/php
$domain     ='baberankings.com';                       //mainly for me.
$secure     ='off';                                 //set this to off to allow a public display of proxy/cheat status.
$thresh     =2499;                                  //2499= 24.99% by default max proxy allowed

$dbuser      ='db1';                       //Your mysql user name
$dbpasswd    ='JF93209';                       //Your mysql database password
$db          ='db1';                       //Your mysql database name
$dbhost      ='localhost';                       //Your mysql hostname
$yourpassword='big38dtits';                       //access password

//RECORD ENVIRONMENT VARIABLES FROM PROXY SERVERS AND WRITE TO A UCJ PROXY LIST
//Tony Hana AKA Sixzeros
//WHAT IS IT?: Its a crude utility I wrote to scan for Proxies and create a list, that can be added
//manualy to the UCJ database, (I decided not to automate it, because some of these proxies might be AOL
//or who knows? I have no idea what port is the proxy port, and make no attempt to find out, I just
//feed a bogus 8080 port ID in there. The main intention is to catch those cheating little bastard
//hit botters

//INSTALLATION: Just input your database settings below, and run proxytrack.php?action=setup
//    $proxyfile       = 'cgi-bin/ucj/protect/ucjdata/proxy.txt'; //Your path to your UCJ proxy.txt file (make sure we have permissions to read/write it too)
ob_start();
$_COOKIE=&$HTTP_COOKIE_VARS;
$sitepath=substr($PHP_SELF,0,strpos($PHP_SELF,'ptrack.php'));
$sitepath=substr($sitepath,0,-1);
$today      =date('YmdH');
if($proxyfile==''){
    if(is_dir("cgi-bin/ucj")){
        $proxyfile       = 'cgi-bin/ucj/protect/ucjdata/proxy.txt';
    }elseif(is_dir("../cgi-bin/ucj")){        
        $proxyfile       = 'cgi-bin/ucj/protect/ucjdata/proxy.txt';
    }elseif(is_dir("../../{$domain}/cgi-bin/ucj")){
        $proxyfile       = "../../{$domain}/cgi-bin/ucj/protect/ucjdata/proxy.txt";
    }else{
        $proxyfile='proxy.txt.php';
    }
}

//$sitepath='/ct';
//$sitepath='';
if($action!='repair'){
    $action=$HTTP_POST_VARS['action'];
    if($HTTP_POST_VARS['action']==''){
        $action=$HTTP_GET_VARS['action'];
    }
    if($action==''){
        $isrc="<img src='{$sitepath}/ptrack.php?action=i&rf=\"+escape(document.referrer)+\"' border='0'>";
        echo "isrc=\"$isrc\";";
	    echo "document.write(isrc);";
        exit();
    }
    if($db==''){
        //require_once('includes/config.inc.php');
        require_once('cf.php');
    }
    $CACHE=3; $VIA=2; $FWD=1; $NORMAL=0;
    if($db=='' || $dbuser =='' || $dbhost=='' || $dbpasswd== ''){
        echo "<center>ERROR: Database Settings are not setup yet, [$db] [$dbuser] [$dbhost] [$dbpasswd] <a href='javascript: history.go(-1);'>click here</a> to set them up.<br></center>";
        exit();
    }
    $conn = @mysql_connect($dbhost,$dbuser,$dbpasswd);
    if(!$conn){
        echo "Unable to connect to SQL server! $dbuser@$dbhost/$dbpasswd";
        exit();
    }
    mysql_select_db($db,$conn);

    if($connection=mysql_error()!=''){
        echo "$connection";
        $action='setup';
    }
}

$mydomain=$domain;
switch($action){
    default:
    break;
    case 'logout':
        setcookie('login','');
        echo "<center>Logged out<br>";
        echo "<center><a href='$PHP_SELF?action=login'><b>Login OK - Click to continue</b></center>";
        echo "</center>";
        exit();
    break;    
    case 'Login':
    case 'auth':
        if($HTTP_POST_VARS['Login']==$yourpassword){
            setcookie('login','ok');
            echo "<center><a href='$PHP_SELF?action=list'><b>Login OK - Click to continue</b></center>";
            exit();
        }
        echo "Bad login";
    case 'login':
    echo "<center>";
    echo "<h1>Hitbot Alert!</h1><b>From The Makers of Comus Thumbs TGP Script</b><br><br>
    <form action='$PHP_SELF' method='post'><br>    
        <input name='Login' value='$Login' size=35><input name='action' type='submit' value='Login'>
    </form>
    </center>
    ";
    case 'out':       
    break;
    case 'i':        
        Header("Content-Type: image/gif"); 
        $fn=fopen("./1pixel.gif","r"); 
        fpassthru($fn); 
       
        $rf=$HTTP_GET_VARS['rf'];
        $_ip=$HTTP_SERVER_VARS['REMOTE_ADDR'];
        $domains=parse_url($rf);
        $domain=strtolower($domains['host']);
        $domain=str_replace('www.','',$domain);
        if(substr($HTTP_SERVER_VARS['HTTP_ACCEPT_LANGUAGE'],0,2)!='en'){
            $english=0;
        }else{
            $english=1;
        }
        if($HTTP_SERVER_VARS['HTTP_CACHE_CONTROL']!='' && strpos($HTTP_SERVER_VARS['HTTP_CACHE_CONTROL'],'no-cache')===false){            
            mysql_query("INSERT INTO tblProxyTrack (ip,type,ref) VALUES ('$_ip','$CACHE','$rf')");
            if(mysql_num_rows($r=mysql_query("SELECT id FROM tblRefTrack WHERE domain='$domain'"))!=0){
                extract(mysql_fetch_assoc($r));
                mysql_query("UPDATE tblRefTrack set proxyhit=proxyhit+1,lang=lang+$english WHERE id=$id");
            }else{
                mysql_query("INSERT INTO tblRefTrack (domain,proxyhit,lang) VALUES ('$domain',1,'$english')");
            }
        }elseif($HTTP_SERVER_VARS['HTTP_VIA']!=''){
            mysql_query("INSERT INTO tblProxyTrack (ip,type,ref) VALUES ('$_ip','$VIA','$rf')");
            if(mysql_num_rows($r=mysql_query("SELECT id FROM tblRefTrack WHERE domain='$domain'"))!=0){
                extract(mysql_fetch_assoc($r));
                mysql_query("UPDATE tblRefTrack set proxyhit=proxyhit+1,lang=lang+$english  WHERE id=$id");
            }else{
                mysql_query("INSERT INTO tblRefTrack (domain,proxyhit,lang) VALUES ('$domain',1,'$english')");
            }            
        }elseif($HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR']!=''){
            mysql_query("INSERT INTO tblProxyTrack (ip,type,ref) VALUES ('$_ip','$FWD','$rf')");
            if(mysql_num_rows($r=mysql_query("SELECT id FROM tblRefTrack WHERE domain='$domain'"))!=0){
                extract(mysql_fetch_assoc($r));
                mysql_query("UPDATE tblRefTrack set proxyhit=proxyhit+1,lang=lang+$english  WHERE id=$id");
            }else{
                mysql_query("INSERT INTO tblRefTrack (domain,proxyhit,lang) VALUES ('$domain',1,'$english')");
            }
        }else{
            //mysql_query("INSERT INTO tblProxyTrack (ip,type,ref) VALUES ('$_ip','$NORMAL','$rf')");
            if(mysql_num_rows($r=mysql_query("SELECT id FROM tblRefTrack WHERE domain='$domain'"))!=0){
                extract(mysql_fetch_assoc($r));
                mysql_query("UPDATE tblRefTrack set normalhit=normalhit+1,lang=lang+$english  WHERE id=$id");
            }else{
                mysql_query("INSERT INTO tblRefTrack (domain,normalhit,lang) VALUES ('$domain',1,'$english')");                
            }
        }
        exit();
    break;
    case 'setup':
        if($_COOKIE['login']!='ok'){
            header("location: $PHP_SELF?action=login");
            exit();
        }
        if($connection=mysql_error()!=''){
            if(!setup_new_db($db)){ //If you dont find the database, then try to set it up.
                exit();
            }
        }
    case 'repair':
        if($_COOKIE['login']!='ok'){
            header("location: $PHP_SELF?action=login");
            exit();
        }
        $connection= 'OK';    
        $res = mysql_query("SHOW TABLES FROM $db");
        $tables='';
        while($r=mysql_fetch_array($res)){ //for each table in the database.
            $tables=$tables.",".$r[0];
        }
    
        if(strpos($tables,'tblProxyTrack')===false){
            $cmSQL="CREATE TABLE tblProxyTrack (
              id int(10) unsigned NOT NULL auto_increment,
              ip varchar(16) NOT NULL default '',
              type tinyint(1) NOT NULL default '0',
              ref varchar(100) NOT NULL default '',
              UNIQUE KEY id (id)
            ) TYPE=MyISAM";
            mysql_query($cmSQL);      
            if (($tblLogs = mysql_error()) == ''){
                echo "tblProxyTrack = 'OK'";
            }
        }else{
            echo "tblProxyTrack = 'OK'"; 
            @mysql_query("ALTER TABLE tblProxyTrack ADD id int(10) unsigned NOT NULL auto_increment");
            @mysql_query("ALTER TABLE tblProxyTrack ADD ip varchar(16) NOT NULL default ''");
            @mysql_query("ALTER TABLE tblProxyTrack ADD type tinyint(1) NOT NULL default '0'");
            @mysql_query("ALTER TABLE tblProxyTrack ADD ref varchar(100) NOT NULL default ''");
        }
        
        if(strpos($tables,'tblRefTrack')===false){
            $cmSQL="CREATE TABLE tblRefTrack (
              id int(10) unsigned NOT NULL auto_increment,              
              domain varchar(100) NOT NULL default '',
              lang int(10) NOT NULL default '0',
              proxyhit int(10) unsigned NOT NULL  default '0',
              normalhit int(10) unsigned NOT NULL  default '0',
              proxyclick int(10) unsigned NOT NULL  default '0',
              normalclick int(10) unsigned NOT NULL  default '0',
              time varchar(10) NOT NULL default '0',
              UNIQUE KEY id (id)
            ) TYPE=MyISAM"; 
            mysql_query($cmSQL);      
            if (($tblLogs = mysql_error()) == ''){
                echo "tblRefTrack = 'OK'";
            }
        }else{
            echo "tblRefTrack = 'OK'"; 
            @mysql_query("ALTER TABLE tblRefTrack ADD id int(10) unsigned NOT NULL auto_increment");
            @mysql_query("ALTER TABLE tblRefTrack ADD domain varchar(100) NOT NULL default ''");
            @mysql_query("ALTER TABLE tblRefTrack ADD proxyhit int(10) NOT NULL default '0'");
            @mysql_query("ALTER TABLE tblRefTrack ADD lang int(10) NOT NULL default '0'");
            @mysql_query("ALTER TABLE tblRefTrack ADD normalhit int(10) NOT NULL default '0'");            
            @mysql_query("ALTER TABLE tblRefTrack ADD proxyclick int(10) NOT NULL default '0'");
            @mysql_query("ALTER TABLE tblRefTrack ADD normalclick int(10) NOT NULL default '0'");
            @mysql_query("ALTER TABLE tblRefTrack ADD time varchar(10) NOT NULL default '0'");
        }
        if($action=='repair'){
            return;
        }
    break;
    case 'list':
        if($_COOKIE['login']!='ok' && $secure=='on'){
            header("location: $PHP_SELF?action=login");
            exit();
        }
        echo"<center>";
//        echo $_COOKIE['login'];
        echo "
        <table width=640><tr><td><center>
        <font face=arial>";
        
        if($_COOKIE['login']!='ok'){
            echo "<h1>Hitbot Alert!</h1><b>From The Makers of Comus Thumbs TGP Script</b><br><br>
                 <a href='{$sitepath}/ptrack.php?action=login'>[Login]</a>&nbsp;&nbsp;&nbsp;&nbsp;
            ";
            
        }else{
            echo "<h1>Hitbot Alert! For Comus thumbs</h1><a href='admin/index.php'><b>Click here to return to main</b></a><br><br>
                 <a href='{$sitepath}/ptrack.php?action=logout'>[Logout]</a>&nbsp;&nbsp;&nbsp;&nbsp;
            ";
        }
        echo "
         <a href='{$sitepath}/ptrack.php?action=clear'>[Clear All]</a>&nbsp;&nbsp;&nbsp;&nbsp;
         <a href='{$sitepath}/ptrack.php?action=list'>[List]</a>&nbsp;&nbsp;&nbsp;&nbsp;
         <a href='{$sitepath}/ptrack.php?action=analyze'>[Analyze]</a>";
         if($proxyfile!=''){
            echo "&nbsp;&nbsp;&nbsp;&nbsp;
             <a href='{$sitepath}/ptrack.php?action=updateucj'>[Update Proxy List]</a>";
         }
         echo "
         <br>
        <b>Stop Hit Bots Dead in Their Tracks!</b><br>        
        Dont waste one second looking for proxy lists, cleaning them up, or worrying about whether you
        have enough proxies to catch the cheaters. Just use this script to catch them ALL and then
        build your OWN list. And no need to worry about whether the cheater knows what proxies you 
        know about, he can rest assured, you know them all, hehe. Good bye cheaters.<br><br>
        ";
        
        if($_COOKIE['login']!='ok'){
            echo "
            I am no longer selling this script, I've decided its better to just give it away
            in exchange for good trades, we can trade cleaner with better productivity. (at least one would hope?)<br>
            Just ICQ me 27303003 and I'll hook you up and help you workout how to use it, works with any trade script.<br><br>";
        }
        echo "<b>Todays Detected Proxies List</b><br>";
        $r=mysql_query("SELECT DISTINCT ip FROM tblProxyTrack WHERE !(type=$NORMAL) order by rand() limit 0,50") or die('ERROR:['.mysql_error().']');
        echo "
        <textarea cols=50 rows=20>";
        while($row=mysql_fetch_assoc($r)){
            extract($row);
            echo "$ip:8080\n"; //I dont think the port really matters for UCJ scanning
        }
        echo "
        </textarea>
        <br>
        ";
        if($_COOKIE['login']!='ok'){
            echo"
        If you're serious about stopping hitbots on your site, or if you are curious to know if someone is 
        sending you junk traffic, and want to do something about it, then ICQ me 27303003.<br><br>
                
        This script also comes as part of Comus Thumbs, ICQ me if you want it.<br>
        ";
        }
        echo "
        Regards... Sixzeros 27303003
<br><br>
        From the makers of the Comus Thumbs TGP script<br><a href='http://easyamateur.net/demo'>click here for a demo.</a><br><br>
        Looking for good trades? I keep a list of <br>
        <a href='http://xxxonfire.com/halist.php'>Other Sites Who Run Hitbot Alert Here</a>
        </center>
        </td></tr></table>
        ";
    break;
    case 'saveproxyfile':
        echo"<center><font face=arial>";
        if($HTTP_COOKIE_VARS['login']=='ok'){
            $fp=fopen($proxyfile,'wb');
            fwrite($fp,$HTTP_POST_VARS['proxylist']);
            fclose($fp);
            echo 'Proxy File Saved';
        }else{
            echo 'You are not authorized to modify the proxy files<br>';
        }        
//    break;
    case 'updateucj':
        if($_COOKIE['login']!='ok' && $secure=='on'){
            header("location: $PHP_SELF?action=login");
            exit();
        }
        echo"<center><font face=arial>";                
        if($_COOKIE['login']!='ok'){
            echo "<h1>Hitbot Alert!</h1><b>From The Makers of Comus Thumbs TGP Script</b><br><br>";
        }else{
            echo "<h1>Hitbot Alert! For Comus thumbs</h1><a href='admin/index.php'><b>Click here to return to main</b></a><br><br>";
        }
        
        echo "
         <a href='{$sitepath}/ptrack.php?action=clear'>[Clear All]</a>&nbsp;&nbsp;&nbsp;&nbsp;
         <a href='{$sitepath}/ptrack.php?action=list'>[List]</a>&nbsp;&nbsp;&nbsp;&nbsp;
         <a href='{$sitepath}/ptrack.php?action=analyze'>[Analyze]</a>";
         if($proxyfile!=''){
            echo "&nbsp;&nbsp;&nbsp;&nbsp;<a href='{$sitepath}/ptrack.php?action=updateucj'>[Update Proxy List]</a>";
         }
         echo "<br>Sort and Remove the Duplicates from the proxy.txt file.<br>";
        $i=0;
        $aProxyList=file($proxyfile);
        $r=mysql_query("SELECT DISTINCT ip FROM tblProxyTrack WHERE !(type=$NORMAL) order by ip ");
        while($row=mysql_fetch_assoc($r)){
            extract($row);
            $aProxyList[]="$ip:8888\n";        
            $i++;            
        }
        //force unique
        
        foreach($aProxyList as $key=>$value){            
            $tip=explode(':',$value);
            $bProxyList[]=trim($tip[0]).":8888\n";            
        }
        $bProxyList=array_unique($bProxyList);
        asort($bProxyList);
        reset($bProxyList);
        
        echo "$i records added to the proxy.txt file";
        if($HTTP_COOKIE_VARS['login']!='ok'){
            echo "<br>(sample only - first 100 proxy records)";
        }
        echo"<br>
        <form action='{$sitepath}/ptrack.php?action=saveproxyfile' method=post>
        <textarea rows=20 cols=50 name=proxylist>";
        $i=0;        
        foreach($bProxyList as $key=>$value){
            echo trim("$value")."\n";
            $i++;
            if($HTTP_COOKIE_VARS['login']!='ok' && $i>100){
                break;
            }
        }
        echo "</textarea><br>
        <input type='submit' name='submit' value='Save Proxy File'>
        </form>
        <br>
        From the makers of the Comus Thumbs TGP script, <a href='http://easyamateur.net/demo'>click here for a demo.</a>
        </td></tr></table>
        </center>";
    break;    
    case 'analyze':
        if($_COOKIE['login']!='ok' && $secure=='on'){
            header("location: $PHP_SELF?action=login");
            exit();
        }
        echo"<center><font face=arial>";
        if($_COOKIE['login']!='ok'){
            echo "<h1>Hitbot Alert!</h1><b>From The Makers of Comus Thumbs TGP Script</b><br><br>";
        }else{
            echo "<h1>Hitbot Alert! For Comus thumbs</h1><a href='admin/index.php'><b>Click here to return to main</b></a><br><br>";
        }        
        echo "<center>
         <a href='{$sitepath}/ptrack.php?action=clear'>[Clear All]</a>&nbsp;&nbsp;&nbsp;&nbsp;
         <a href='{$sitepath}/ptrack.php?action=list'>[List]</a>&nbsp;&nbsp;&nbsp;&nbsp;
         <a href='{$sitepath}/ptrack.php?action=analyze'>[Analyze]</a>";
         if($proxyfile!=''){
            echo "&nbsp;&nbsp;&nbsp;&nbsp;
             <a href='{$sitepath}/ptrack.php?action=updateucj'>[Update Proxy List]</a>";
         }
         echo "
         <br>
         <table width=640><tr><td>
         This script will red flag any trade who is over 20% proxy hits with a minimum of 100 hits sent.<br>
         NOTE: A high ranking on this list does not necesarily mean the person is cheating you, it could well
         mean that they are victims of hitbots themselves, so its a good idea to try and contact them to try and
         help them root out the source of their bad traffic. Ideally this data needs to be taken into context 
         with its productivity, hence the need to work with a trade script like UCJ which can anaylze the ratios
         in relation to the hits and outgoing clicks. If you can split the normal outgoing hits from the
         proxied outgoing hits, you may notice an extremely productive proxy click ratio in relation to your
         normal click ratios, this is one indication that you are being hitbotted. The other case that can
         happen is extremly low proxy click ratios, this is a sign that your trade is being slammed, and is unknowingly 
         sending you garbage. Either way this script will red flag them first, and functions as a first step in investigation.<br>
         </td></tr></table><br>";
        echo "
        <table><tr bgcolor=#fff0f0>
        <td align=left><b><a href='$PHP_SELF?action=analyze&orderby=referer'><font color=blue>Referer</font></a></b></td>
        <td align=center><b><a href='$PHP_SELF?action=analyze&orderby=hits'><font color=blue>Hits</font></b></td>
        <td align=center><b><a href='$PHP_SELF?action=analyze&orderby=normal'><font color=blue>Normal</font></b></td>
        <td align=center><b><a href='$PHP_SELF?action=analyze&orderby=proxy'><font color=blue>Proxy</font></b></td>
        <td align=center><b><a href='$PHP_SELF?action=analyze&orderby=foreign'><font color=blue>Foreign</font></b></td>
        <td align=center><b><a href='$PHP_SELF?action=analyze&orderby=fratio'><font color=blue>F-Ratio</font></b></td>
        <td align=right><b><a href='$PHP_SELF?action=analyze&orderby=pratio'><font color=blue>P-Ratio</font></b></td>
        </tr>";
        extract(mysql_fetch_assoc(mysql_query("SELECT sum(normalhit) AS normalhits,sum(proxyhit) AS proxyhits, sum(lang) AS tlang FROM tblRefTrack")));
        $totalhits=$normalhits+$proxyhits;
        $foreign=$totalhits-$tlang;
        if($totalhits){        
            $fper=($foreign*10000)/($totalhits);
            $per=($proxyhits*10000)/$totalhits;
        }else{
            $per=0;
            $fper=0;
        }

        if($per>$thresh){
            echo  "<tr>
                <td align=left><font color=red>Totals</font></td>
                <td align=center><font color=red>$totalhits</font></td>
                <td align=center><font color=red>$normalhits</font></td>
                <td align=center><font color=red>$proxyhits</font></td>
                <td align=center><font color=red>$foreign</font></td>                
                <td align=center><font color=red>".sprintf('%02.2f',(float) ($fper/100))."%</font></td>
                <td align=right><font color=red>".sprintf('%02.2f',(float) ($per/100))."%</font></td>
                </tr>";
        }else{
            echo  "<tr>
                <td align=left>Totals</td>
                <td align=center>$totalhits</td>
                <td align=center>$normalhits</td>
                <td align=center>$proxyhits</td>
                <td align=center>$foreign</td>
                <td align=center>".sprintf('%02.2f',(float) ($fper/100))."%</td>
                <td align=right>".sprintf('%02.2f',(float) ($per/100))."%</td>
                </tr>";
        }
        switch($_GET['orderby']){
            case 'pratio':
            default:
                $r=mysql_query("SELECT domain,normalhit,proxyhit,lang FROM tblRefTrack ORDER BY proxyhit/(normalhit+proxyhit) DESC,((normalhit+proxyhit)-lang)/(normalhit+proxyhit) DESC,((normalhit+proxyhit)-lang) DESC ");
            break;
            case 'fratio':
                $r=mysql_query("SELECT domain,normalhit,proxyhit,lang FROM tblRefTrack ORDER BY ((normalhit+proxyhit)-lang)/(normalhit+proxyhit) DESC,proxyhit/(normalhit+proxyhit) DESC,((normalhit+proxyhit)-lang) DESC ");
            break;
            case 'referer':
                $r=mysql_query("SELECT domain,normalhit,proxyhit,lang FROM tblRefTrack ORDER BY domain ");
            break;
            case 'normal':
                $r=mysql_query("SELECT domain,normalhit,proxyhit,lang FROM tblRefTrack ORDER BY normalhit DESC ");            
            break;
            case 'proxy':
                $r=mysql_query("SELECT domain,normalhit,proxyhit,lang FROM tblRefTrack ORDER BY proxyhit DESC ");            
            break;
            case 'hits':
                $r=mysql_query("SELECT domain,normalhit,proxyhit,lang FROM tblRefTrack ORDER BY normalhit+proxyhit DESC ");
            break;
            case 'foreign':
                $r=mysql_query("SELECT domain,normalhit,proxyhit,lang FROM tblRefTrack ORDER BY ((normalhit+proxyhit)-lang) DESC ");
            break;
        }        
        while($row=mysql_fetch_assoc($r)){
            extract($row);
            //if(strpos($domain,$mydomain)===false || $_COOKIE['support']=='ok'){ //dont show yourself
                if($domain==''){
                    $domain='<b>NO REF</b>';
                    $tdomain="";
                }else{
                    $tdomain="http://$domain/";                    
                }
                $totalhits=$normalhit+$proxyhit;
                $foreign=$totalhits-$lang;
                if($totalhits){             
                    $fper=($foreign*10000)/($totalhits);                
                    $per=($proxyhit*10000)/$totalhits;
                }else{
                    $per=0;
                    $fper=0;
                }        
                if($per>$thresh && $totalhits>100){
                    echo "<tr>
                    <td align=left><a href='$tdomain' target=_blank><font color=red><b>$domain</b></font></a></td>
                    <td align=center><font color=red>$totalhits</font></td>
                    <td align=center><font color=red>$normalhit</font></td>
                    <td align=center><font color=red>$proxyhit</font></td>
                    <td align=center><font color=red>$foreign</font></td>
                    <td align=center><font color=red>".sprintf('%02.2f',(float) ($fper/100))."%</font></td>
                    <td align=right><font color=red>".sprintf('%02.2f',(float) ($per/100))."%</font></td>
                    </tr>";
                }else{
                    echo "<tr>
                    <td align=left><a href='$tdomain' target=_blank>$domain</a></td>
                    <td align=center>$totalhits</td>
                    <td align=center>$normalhit</td>
                    <td align=center>$proxyhit</td>
                    <td align=center>$foreign</td>
                    <td align=center>".sprintf('%02.2f',(float) ($fper/100))."%</td>
                    <td align=right>".sprintf('%02.2f',(float) ($per/100))."%</td>
                    </tr>";
                }
            //}
        }
        echo "</table><br>
        From the makers of the Comus Thumbs TGP script, <a href='http://easyamateur.net/demo'>click here for a demo.</a>
        </center>";
    break;
    case 'clear':
        if($_COOKIE['login']!='ok' && $secure=='on'){
            header("location: $PHP_SELF?action=login");
            exit();
        }
        if($HTTP_COOKIE_VARS['login']=='ok'){
            mysql_query("DELETE FROM tblProxyTrack WHERE 1");
            mysql_query("DELETE FROM tblRefTrack WHERE 1");
            echo "<center><br>All records cleared <a href='{$sitepath}/ptrack.php?action=list'>click here to Continue</a></center>";
        }else{
            echo "<center><br>You are not authorized to clear the records <a href='{$sitepath}/ptrack.php?action=list'>click here to Continue</a></center>";
        }
        exit();        
    break;
}

function setup_new_db($db){
   global $connection,$dbhost,$dbuser,$dbpasswd,$action;
   mysql_query("CREATE DATABASE $db");
   mysql_query("grant all on {$db}.* to $dbuser@$dbhost identified by '$dbpasswd'");   
   $c2 = mysql_error();
   if($c2==''){
        echo "<center>New database $db created<br></center>";
        @mysql_select_db($db);
        if(($c=mysql_error())!=''){
            $connection.=$c;
            echo "<center>Could Not connect to the $db new database, could be permissions??</center>";
            return(0);
        }
   }else{
        echo "<center>[$action]Tried to create a new Database $db $dbuser @ $dbhost / $dbpasswd but there seems to be an unknown problem [$c2]</center>";
        return(0);
   }
   return(1);
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit