Thread: PHP Script Help
View Single Post
Old 02-03-2004, 07:20 PM  
WankTank
Confirmed User
 
Join Date: Jan 2004
Location: toronto
Posts: 595
PHP Script Help

Hey everyone.
At the new version of my site im adding a new link dump script.
Check it out here.
http://fuckedupdump.net/test/

The php for submit.php (the link dump file) is...


PHP Code:
<?php
if ($submit) {
$url "$_POST[url]";
$date "$_POST[date]";
$ip getenv("REMOTE_ADDR");

$host "localhost";
$login_name "fuckedup_fuckup";
$password "--------";

MySQL_connect("$host","$login_name","$password");

MySQL_select_db("fuckedup_dump") or die("Could not select database");

$query "SELECT * FROM mainlinks WHERE url='$url'";
$urlcheckresult MySQL_query($query);

While( 
$urlcheckrows MySQL_fetch_array($urlcheckresult) ) {
$urlcheckurl $urlcheckrows[url];
}
if (
$urlcheckurl hahahaha $url)
{
print 
"<br><b>Fuck You! You already submitted your fucking link. Stupid fuck!<p><a href=\"index.php\">Return Home</a><br>";
}
else
{

$sql "INSERT INTO mainlinks (url,ip) VALUES ('$url','$ip')";

$result mysql_query($sql);

if (
$result) {
print 
"<br><b>Link submitted you stupid fuck</b><p>URL: $url <p><a href=\"index.php\">Return Home</a><br>";
}
}
}
else
{
?>

hahahahahaha method=hahahahahaha action="submit.php" enctype="multipart/form-data">
<table border="0" cellpadding="1" cellspacing="0" class=table1>
<tr>
<td valign=top><b>URL: &nbsp;</b> hahahahahahaha type="text" name="url" style="background:#000000; font-size:11px;font-family:verdana;border-width:1px; border-style:solid; border-color:#80869F; color:#EEEEEE;" value="http://" size="42"> </td>
<td align="right" valign=top> &nbsp; 
hahahahahahaha type="submit" name="submit" style="background:#323454; font-size:11px;font-family:verdana;border-width:1px; border-style:solid; border-color:#80869F; color:#EEEEEE;" value="Submit"> <a href="#" target="_blank" onClick="windowhahahahahaha('rules.php','9039','width=400,height=285,location=no,menubar=no,scrollbars=no,status=no,toolbar=no');return false"> &nbsp;&nbsp;<b>Rules</b></a>
</FORM></td></tr></table>

<?php
$server 
"localhost";
$username "fuckedup_fuckup";
$password "--------";
$database "fuckedup_dump";
$table "mainlinks";

@
mysql_connect($server$username$password) or die("Couldn't Connect to Database");

@
mysql_select_db($database) or die("Couldn't Select Database");

$pagelimit "25";

$strSQL mysql_query("SELECT * FROM $table");

$totalrows mysql_num_rows($strSQL);

$pagenums ceil ($totalrows/$pagelimit);

if (
$pagehahahaha''){
$page='1';
}

$start = ($page-1) * $pagelimit;

print 
"<b>Links:&nbsp;</b> $totalrows &nbsp;";

$starting_no $start 1;

if (
$totalrows $start $pagelimit) {
$end_count $totalrows;
} elseif (
$totalrows $start >= $pagelimit) {
$end_count $start $pagelimit;
}


print 
" ( $starting_no"."-"."$end_count ) <br><b>Pages: </b>";

if (
$totalrows $end_count $pagelimit) {
$var2 $pagelimit;
} elseif (
$totalrows $end_count <= $pagelimit) {
$var2 $totalrows $end_count;
}

$space "&nbsp;";

if (
$page>1) {
echo 
"<a href='index.php?page=".($page-1)."'>«</a> |";
}

for (
$i=1$i<=$pagenums$i++) {
if (
$i!=$page) {
echo 
" <a href='index.php?page=$i' class=submit>$i</a> |";
}
else {
print 
" <b class='red'>$i</b> |";
}
}

if (
$page<$pagenums) {
print 
" <a href='index.php?page=".($page+1)."'>»</a>";
}

$strSQL mysql_query("SELECT * FROM $table ORDER BY id DESC LIMIT $start,$pagelimit");

print 
"<br><br>";

while(
$row mysql_fetch_array($strSQL)){

    
$url $row["url"];
    
$date $row["date"];
$string "$date";

$year substr ($string04);

$month substr ($string42);

$day substr ($string62);

$hour substr ($string62);

$minute substr ($string82);

$second substr ($string102);

    print 
"<a href=\"$url\" target=\"_blank\" class=submit>$url</a> | $month.$day.$year <br>";
    }
?>
<?
}
?>

Last edited by WankTank; 02-03-2004 at 07:22 PM..
WankTank is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote