$categ[1]/$categ[2]" ; } echo "
Your Site URL :

Site Name :

Site Description :

Site Category :

Your Working E-Mail, Please :

Address of Page where you have placed our Button or Textlink to Us :

Password (to Upload your banner and to edit your entry later) :

>\">
"; @include("$addftr"); exit(); } //////////////////////////////// //// Show reg. form end //////////////////////////////// //////////////////////////////// //// Show confirm form //////////////////////////////// if ($action == "add") { $addhdr = SETTINGSDIR . ADDHDR ; $addftr = SETTINGSDIR . ADDFTR ; @include("$addhdr"); echo "Step 1: Checking Your Input...

"; if (!$url or strlen($url) < 10) { echo "WRONG Site URL.
Go Back and Fix, Please.
"; exit(); } if (strlen($sitename) < 1) { echo "WRONG Site Name.
Go Back and Fix, Please.
"; exit(); } if (strlen($sitedesc) < 1) { echo "WRONG Site Description.
Go Back and Fix, Please.
"; exit(); } if (strlen($category) < 1) { echo "WRONG Site Category.
Go Back and Fix, Please.
"; exit(); } if (strlen($pass) < 1) { echo "WRONG Password.
Go Back and Fix, Please.
"; exit(); } if (strlen($email) < 5 or !ereg("\@",$email) or !ereg("\.",$email)) { echo "WRONG E-mail.
Go Back and Fix, Please.
"; exit(); } if (!$recipurl or strlen($recipurl) < 10) { echo "WRONG Return Link URL. Please enter URL of page where you placed (or going to place) a link to us.
Go Back and Fix, Please.
"; exit(); } echo "It seems to be OK...

"; echo "Step 2: Our Link robot will try to Open Your Site...

"; echo "Trying to open $url ...
"; @ $htp = fopen("$url","r"); if (!$htp) { echo "WARNING: Couldn't open URL $url...
This can be a temporary problem or probably you've entered wrong URL ?

"; } if ($htp) { while (!feof($htp)) { $fcontent .= fgets($htp,512); } fclose($htp); echo "Link robot could open this URL... OK.

"; } echo "Step 3: Our Link robot will try to Open Page where you placed (or going to place)
our Button or Textlink...


"; echo "Trying to open URL where you placed (or going to place) link to us...
$recipurl ...
"; @ $htp = fopen("$recipurl","r"); if (!$htp) { echo "WARNING: Couldn't open URL $recipurl...
This can be a temporary problem or probably you've entered wrong URL ?

"; } if ($htp) { while (!feof($htp)) { $fcontent1 .= fgets($htp,512); } fclose($htp); echo "Link robot could open this URL... OK.

"; } if ($fcontent1) { $recips = split("\,",RECIPURL); $i = 0 ; while ($recips[$i]) { if (eregi($recips[$i],$fcontent1)) { $CoolResult = 1; } $i ++ ; } } if ($CoolResult) { echo "Seems that you have placed a link to us, Thanks!

"; } else { echo "Seems that you haven't placed a link to us yet! Please place our Button ot Textlink!

"; } echo "Step 4: If everything is correct - Please Press \"Submit\" Button
to Submit your info for Our Approval! Otherwize go back and fix your info.


Site Name: $sitename
Site Description: $sitedesc
Site URL: $url
URL where you placed (or going to place) a link to us: $recipurl
Password to upload banner and to make changes: $pass
Your E-Mail: $email


>\">
"; @include("$addftr"); exit(); } //////////////////////////////// //// Show confirm form end //////////////////////////////// //////////////////////////////// //// Insert data to DB //////////////////////////////// if ($action == "add1") { $addhdr = SETTINGSDIR . ADDHDR ; $addftr = SETTINGSDIR . ADDFTR ; @include("$addhdr"); if (!$url or strlen($url) < 10) { echo "WRONG Site URL.
Go Back and Fix, Please.
"; exit(); } if (strlen($sitename) < 1) { echo "WRONG Site Name.
Go Back and Fix, Please.
"; exit(); } if (strlen($sitedesc) < 1) { echo "WRONG Site Description.
Go Back and Fix, Please.
"; exit(); } if (strlen($category) < 1) { echo "WRONG Site Category.
Go Back and Fix, Please.
"; exit(); } if (strlen($email) < 5 or !ereg("\@",$email) or !ereg("\.",$email)) { echo "WRONG E-mail.
Go Back and Fix, Please.
"; exit(); } if (!$recipurl or strlen($recipurl) < 10) { echo "WRONG Return Link URL. Please enter URL of page where you placed (or going to place) a link to us.
Go Back and Fix, Please.
"; exit(); } //////// checking category $lnk = mysql_connect("localhost",MYSQLUSER,MYSQLPASS); if (!$lnk) { echo "cant connect to db"; exit() ; } mysql_select_db(MYSQLDB); $catz = mysql_query("SELECT * FROM categories WHERE catid='$category' ",$lnk); if (!$catz) { echo "Database error. Link not added."; exit(); } $categs = mysql_fetch_row($catz); if (!$categs[0]) { echo "Wrong category! Link Not added."; exit(); } //////// checking category end $linkid = time(); $qq = "INSERT INTO links (linkid,siteurl,sitename,sitedesc,siteemail,siterecip,posvalue,catid,category1,category2,pass) VALUES ('$linkid','$url','$sitename','$sitedesc','$email','$recipurl',0,$category,'$categs[1]','$categs[2]','$pass') "; $rr = mysql_query($qq,$lnk); if (!$rr) { echo " Some database error happened... link not added"; exit(); } else { echo " Success, Your Link is Added to Database!
Thanks for Adding a Link!


Your link will be reviewed and put to a list soon!
We have to approve all sites manually before they appear in a listing
because of too many crap sites being submitted.
You will receive a confirmation email when your site is approved and put to listing!

Upload Your Banner Please (GIF or JPEG, 468x60 pixels - slightly bigger or smaller banners are OK too)
MAXIMUM Banner size is 20 Kilobytes :

"; } @include("$addftr"); exit(); } //////////////////////////////// //// Insert data to DB end //////////////////////////////// ?>