| 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/cgi-bin/ |
Upload File : |
#!/usr/bin/perl
################################################################################
#
#Rate a site version 1
#GB Resources http://cgi-resource.co.uk
#
#Links in success and error page must be left intact
#
################################################################################
getdata(%fields);
#paths to where you want to put the data files and where your graph images are.
$dpaths = "votedata";
$ipaths = "/cgi-bin/votedata";
if ($fields{'rating'}){
&vote;
}
else {
&display;
}
sub vote {
################################################################################
my ($data, $id, $votes, $nvotes, $rating, $nrating, $ip);
print "Content-type: text/html\n\n";
print "error no rating given, please go back and select a rating" and return unless (($fields{'rating'} > 0) and ($fields{'rating'} < 11));
$id = $fields{'id'};
if (open(VOTE,"$dpaths/ratem$id.txt")) {
chomp ($data = <VOTE>);
close(VOTE);
($votes, $rating, $ip) = split(/\|/,$data);
&vote_error and return if ($ENV{'REMOTE_ADDR'} eq $ip);
$nvotes = $votes + 1;
$nrating = sprintf ("%.2f", ((($rating*$votes) + $fields{'rating'})/$nvotes));
open (VOTE, ">$dpaths/ratem$id.txt") or die("doh, there is the following problem: $! \n");
print VOTE "$nvotes|$nrating|$ENV{'REMOTE_ADDR'}";
close VOTE;
}
else {
open (VOTE, ">$dpaths/ratem$id.txt") or die("doh, there is the following problem: $! \n");
print VOTE "1|$fields{'rating'}|$ENV{'REMOTE_ADDR'}";
close VOTE;
}
&vote_success;
}
sub display {
################################################################################
#display the current results in a graph
my ($data, $id, $votes, $nvotes, $rating, $nrating, $ip);
print "Content-type: text/html\n\n";
$id = $fields{'id'};
print "error" and return if (!$id);
print qq|<form action="$ENV{'SCRIPT_NAME'}" METHOD=POST target="_blank">
<input type="hidden" name="id" value="$id">
<SELECT name="rating" style="font-size: 8">
<OPTION>---</OPTION>
<OPTION>1</OPTION>
<OPTION>2</OPTION>
<OPTION>3</OPTION>
<OPTION>4</OPTION>
<OPTION>5</OPTION>
<OPTION>6</OPTION>
<OPTION>7</OPTION>
<OPTION>8</OPTION>
<OPTION>9</OPTION>
<OPTION>10</OPTION>
</SELECT>
<input type="submit" value="Vote" style="font-size: 8">
<font FACE="Verdana,Sans-Serif" SIZE="-1">|;
if (open (VOTE,"$dpaths/ratem$id.txt")){
chomp ($data = <VOTE>);
close(VOTE);
($votes, $rating, $ip) = split(/\|/,$data);
$rate = int($rating);
#print out the html
print qq|
<br>Rating = $rating</form></font>
|;
}
else {
print qq|
vote Now!</font></form>|;
}
}
sub vote_success {
################################################################################
#print a success page
print qq|
<html>
<head>
<title>
BabeRankings.com - Thanks for voting
</title>
</head>
<BODY bgcolor=#179AD1 topmargin=0 rightmargin=0 leftmargin=0 text=#ffffff>
<CENTER>
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0>
<TR VALIGN=MIDDLE ALIGN=CENTER>
<TD STYLE="background-image: url(/images/header-bg.gif);"><IMG SRC="/images/babe-rankings.gif" ALT="BabeRankings babes & pornstars" WIDTH=646 HEIGHT=133 BORDER=0></TD>
</TR>
</TABLE>
<br><b> Vote added: Thanks for Rating this Babe!<br><br>Please BOOKMARK Babe Rankings and return daily!
<br>
<br>
<br>
<font color="#FFFF00"><b>Check out the Penthouse Picture of the Day</b></font>
<br><br>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td align="center">Picture of the day (opens in a new window)</td>
</tr>
<tr>
<td>
<a href="http://www.penthouse.com/potd/?nats=OTQ6Mzox" target="_blank">
<img alt="Pic of the Day" src="http://www.penthouse.com/potd/images/penthouse-pet.php?240x180" width=240 height=180 border=0></a>
</td>
</tr>
</table>
<br><br>
<br><font size="+1">Brought to you by <a href="http://preview.Penthouse.com/track/OTQ6Mzox/">PENTHOUSE BABES</a><br>
<br><br>
<p><font size="+1" COLOR="#ffff00">CLOSE THIS WINDOW TO RETURN TO BABE RANKINGS</font></p>
<br><br><br><br><br>
Rate a site by <font size="-1"><a href="http://cgi-resource.co.uk">GB Resources</font></a>
</body>
</html>
|;
}
sub vote_error {
################################################################################
#print an error page
print "Content-type: text/html\n\n";
print qq|
<html>
<head>
<title>
BabeRankings.com - Voting Error
</title>
</head>
<BODY bgcolor=#179AD1 topmargin=0 rightmargin=0 leftmargin=0 text=#ffffff>
<CENTER>
<TABLE BORDER=0 WIDTH=100% CELLPADDING=0 CELLSPACING=0>
<TR VALIGN=MIDDLE ALIGN=CENTER>
<TD STYLE="background-image: url(/images/header-bg.gif);"><IMG SRC="/images/babe-rankings.gif" ALT="BabeRankings babes & pornstars" WIDTH=646 HEIGHT=133 BORDER=0></TD>
</TR>
</TABLE>
<br><b>Vote error:</b><br><br>
<font size="4">You have already voted today on this model! Only vote once per day per girl.</font>
<br><br><br>
<br> <center>
<script language='JavaScript' type='text/javascript' src='http://www.baberankings.com/phpmyadmin/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
if (!document.phpAds_used) document.phpAds_used = ',';
phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
document.write ("http://www.baberankings.com/phpmyadmin/adjs.php?n=" + phpAds_random);
document.write ("&what=zone:1&withText=1");
document.write ("&exclude=" + document.phpAds_used);
if (document.referrer)
document.write ("&referer=" + escape(document.referrer));
document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://www.baberankings.com/phpmyadmin/adclick.php?n=aea77688'><img src='http://www.baberankings.com/phpmyadmin/adview.php?what=zone:1&n=aea77688' border='0' alt=''></a></noscript>
</center>
</td>
</tr>
</table>
<br>
<br><br>
<p><font size="+1" COLOR="#ffff00">CLOSE THIS WINDOW TO RETURN TO BABE RANKINGS</font></p>
</center>
<br><br><br><br><br>
Rate a site by <font size="-1"><a href="http://cgi-resource.co.uk">GB Resources</font></a>
</body>
</html>
|;
}
sub getdata {
################################################################################
my ($buffer);
if ($ENV{'REQUEST_METHOD'} eq 'GET') {
$buffer = $ENV{'QUERY_STRING'};
}
else {
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
}
foreach (split(/&/, $buffer)) {
my($key, $value) = split(/=/, $_);
$value =~ tr/+/ /;
$value =~ s/%(..)/pack('c', hex($1))/eg;
$fields{$key} = $value;
}
}