#!/usr/local/bin/perl
$mail_prog = '/usr/sbin/sendmail' ;
$htp = 'http://wm-clicks.net' ;
&GetFormInput;
$login = $field{'login'} ;	 
$pass = $field {'pass'};

sub GetFormInput {

	(*fval) = @_ if @_ ;

	local ($buf);
	if ($ENV{'REQUEST_METHOD'} eq 'POST') {
		read(STDIN,$buf,$ENV{'CONTENT_LENGTH'});
	}
	else {
		$buf=$ENV{'QUERY_STRING'};
	}
	if ($buf eq "") {
			return 0 ;
		}
	else {
 		@fval=split(/&/,$buf);
		foreach $i (0 .. $#fval){
			($name,$val)=split (/=/,$fval[$i],2);
			$val=~tr/+/ /;
			$val=~ s/%(..)/pack("c",hex($1))/ge;
			$name=~tr/+/ /;
			$name=~ s/%(..)/pack("c",hex($1))/ge;

			if (!defined($field{$name})) {
				$field{$name}=$val;
			}
			else {
				$field{$name} .= ",$val";
				
			}


		   }
		}
return 1;
}

use Fcntl;
use NDBM_File;

tie %hashy, "NDBM_File", "/web/012/wmclicks/public_html/adv/logs/$login", O_RDWR, 0644;

$ps=$hashy{pass};

untie %hashy;

if ($ps eq $pass)
{



print "Content-Type: text/html\n\n";
print "<html><head><meta http-equiv=Content-Type content='text/html;'><title>Your Balance.</title><link rel=stylesheet type=text/css href=http://wmclicks.com/1.css></head>";
print "<body bgcolor=#00c392 background=http://wmclicks.com/bg.gif topmargin=0><script language=javascript>";
print "u=\"u1542.50.spylog.com\";d=document;nv=navigator;na=nv.appName;p=1;";
print "bv=Math.round(parseFloat(nv.appVersion)*100);";
print "n=(na.substring(0,2)==\"Mi\")?0:1;rn=Math.random();z=\"p=\"+p+\"&rn=\"+rn+\"&tl=0&ls=0&ln=0\";y=\"\";";
print "y+=\"<img src='http://\"+u+\"/cnt?\"+z+";
print "\"&r=\"+escape(d.referrer)+\"&pg=\"+escape(window.location.href)+\"' border=0 width=1 height=1 alt='SpyLOG'>\";";
print "d.write(y);if(!n) { d.write(\"<\"+\"!--\"); }//--></script><noscript>";
print "<img src=\"http://u1542.50.spylog.com/cnt?p=1\" alt='SpyLOG' border='0' width=1 height=1 >";
print "</noscript><script language=javascript1.2><!--";
print "if(!n) { d.write(\"--\"+\">\"); }//--></script><hr color=#006c00 width=600>";
print "<table width=600 border=0 align=center cellspacing=0 cellpadding=0><tr><td align=center width=230 colspan=2><img src=http://wmclicks.com/logo.gif></td>";
print "<td width=475>";

print "<!-- Russian LinkExchange code START (468x60)-->\n";
print "  <iframe src=http://www.linkexchange.ru/cgi-bin/erle.cgi?28805?44 \n";
print "  frameborder=0 vspace=0 hspace=0 width=468 height=60 \n";
print "  marginwidth=0 marginheight=0 scrolling=no>\n";
print "  <a href=http://www.linkexchange.ru/users/028805/goto.map target=_top> \n";
print "  <img src=http://www.linkexchange.ru/cgi-bin/rle.cgi?28805?44 \n";
print "  alt=\"RLE Banner Network\" border=0 height=60 width=468></a> \n";
print "  </iframe> \n";
print "<!-- Russian LinkExchange code END --> \n";


print "</td></tr></table><p class=mn><table width=600 border=0 cellspacing=0 cellpadding=0 align=center height=100%>";
print "<tr><td width=13><img src=http://wmclicks.com/corn.gif></td><td bgcolor=#006c00 width=100% valign=middle><font color=#91e1cd>W M - C L I C K S -&gt; IP list &nbsp; f o r &nbsp; $login</font></td><td width=13 align=right><img src=http://wmclicks.com/cornr.gif></td></tr><tr>"; 
print "<td colspan=3><table width=100% border=1 cellspacing=0 cellpadding=3 bordercolor=#006c00><tr><td rowspan=5 valign=top bgcolor=#91e1cd>";
print "<p align=center><b>Список сегодняшних IP-адресов</b><p align=left>&nbsp;<div align=center><center><table border=0 cellpadding=0 cellspacing=20><tr>";

open (FILE,"/web/012/wmclicks/public_html/admin/ips/$login.dat");
@mass=<FILE>;
close (FILE);
open (FILE,"/web/012/wmclicks/public_html/admin/logs/$login.dat");
@list=<FILE>;
close (FILE);

$i=0;
foreach $d (@mass)
{
print "$i. $d<br>";
$i=$i+1;
}






print "<p align=center><FORM METHOD=POST ACTION=http://www.wmclicks.com/cgi-bin/adventer.pl><input type=hidden name=login value=$login><input type=hidden name=pass value=$ps><input type=submit value='     Вернуться     ' style='background: #00c392; font-face:Verdana; font-size: 9pt'></FORM>";

print "<p class=mn align=left><script language=javascript>";
print "d=document;rn=Math.random();";
print "y=\"<a href='http://u1542.50.spylog.com/cnt?f=3&rn=\"+rn+\"' target=_blank><img src='http://u1542.50.spylog.com/cnt?\";";
print "y+=\"p=1&f=4&rn=\"+rn+\"' border=0 width=88 height=31 ></a>\"; d.write(y);";
print "</script><noscript><a href=http://u1542.50.spylog.com/cnt?f=3&p=1 target=_blank>";
print "<img src=http://u1542.50.spylog.com/cnt?p=1&f=4 alt='SpyLOG' border='0' width=88 height=31 ></a></noscript></p><font color=#91e1cd size=1>Web Design by<br><a href=mailto:admin\@wmclicks.com>WM-Clicks</a> &copy;</font></td></tr></table></td></tr></table></body></html>";


}
