close(); /////////// Config AREA ///////////////// $dbhost="localhost"; $dbuser="versuri_links"; $dbpass="R94G687757c2hEa3"; $dbase="versuri_versuri"; $dbtable="links"; $admin_email="links@adecy.com"; $site_url="http://www.lyrics4mp3.com"; $site_title="Lyrics 4 Mp3 . com"; $site_description="A huge lyrics collection."; /////////// End Config AREA ///////////////// ///////////////////////////// Links Query /////////////////////////////////// function clean($buffer) { $holdit=$buffer; $holdit=str_replace(" ", " ", $holdit); $holdit=str_replace("\n", "", $holdit); $holdit=str_replace("\r", "", $holdit); return $holdit; } if($_GET['action']=='adlink') { $buffer='

We are here to welcome you to be our partner!

We require a reciprocal link for all our partners. A reciprocal link is a link on your site to our site. The Reciprocal URL in the form below refers to the specific page on your site where our link is located. To create a link to our site, you may copy the HTML inside the box and paste it in your related page.


 

Please fill out the form completely. Remember, you should add our link first before we add your link. If we don\'t find our link on your site than your link will not be added here.

Your site URL*:
Your site TITLE*:
Your site DESCRIPTION:
Your E-MAIL*:
Reciprocal URL
(where you added our link)*:
Comments:

'; } elseif(strlen($_POST['submit'])>1){ ///// instert shit if(eregi("^http://", $_POST['url']) or eregi("^https://", $_POST['url']) or eregi("^ftp://", $_POST['url'])) { $surl=clean(mysql_escape_string($_POST['url'])); } if(strlen($_POST['title'])>0) { $stitle=clean(mysql_escape_string($_POST['title'])); } if(strlen($_POST['description'])>0) { $sdescription=clean(mysql_escape_string($_POST['description'])); } if(strlen($_POST['email'])>0) { $semail=clean(mysql_escape_string($_POST['email'])); } if(eregi("^http://", $_POST['linkback'])) { $slinkback=clean(mysql_escape_string($_POST['linkback'])); } if(strlen($surl)>0 and strlen($stitle)>0 and strlen($semail)>0 and strlen($slinkback)>0) { // $db = mysql_connect($dbhost, $dbuser, $dbpass) or die('Could not connect: ' . mysql_error()); // mysql_select_db($dbase) or die('Could not select database'); $sql="INSERT INTO `$dbtable` ( `link_id` , `link_link` , `link_title` , `link_desc` , `link_hits` , `link_linkback` , `link_approved` , `link_email` ) VALUES (NULL , '$surl', '$stitle', '$sdescription', '0', '$slinkback', '0', '$semail');"; $result = mysql_query($sql) or $sql_error=mysql_error(); // mysql_close($db); if(eregi("Duplicate entry", $sql_error)) { $buffer="
Your web page is already in our listings.
"; } else { $message.="Link: ".$surl."\n"; $message.="Title: ".$stitle."\n"; $message.="Description: ".$sdescription."\n"; $message.="Email: ".$semail."\n"; $message.="Linkback: ".$slinkback."\n"; $message.="Comments \n---------------------------------------\n".trim($_POST['comments'])."\n---------------------------------------\n"; $message.="\n"; $message.="http://".$_SERVER['HTTP_HOST']."/control/links/"; mail($admin_email, "Link exchange request from ".$_SERVER['HTTP_HOST']." with $surl", $message, "From: $semail\r\n"."Reply-To: $semail\r\n"."X-Mailer: PHP/" . phpversion()); header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?action=done"); } } else { $buffer="Please complete all required fields marked by an asterisk (*)."; } } elseif($_GET['action']=='done'){ $buffer="

Your site will be queued for review by our editors.

"; } else { // $db = mysql_connect($dbhost, $dbuser, $dbpass) or die('Could not connect: ' . mysql_error()); // mysql_select_db($dbase) or die('Could not select database'); $buffer=''; $sql="SELECT * FROM `$dbtable` WHERE `link_approved`=1 ORDER BY `link_title`;"; $dbrez=mysql_query($sql) or die("Invalid query: " . mysql_error()); // mysql_close($db); $count = 0; $rez = array(); while ( $row = mysql_fetch_array($dbrez)) {$rez[$count] = $row; $count++;} // print_r($rez); exit; $buffer="

Related links

"; while (list($key, $val)=each($rez)) { $buffer.="\n\t".'

'.stripslashes($val['link_title']).''; if(strlen($val['link_desc'])>0) { $buffer.=" - ".stripslashes($val['link_desc']); } $buffer.="

"; } $buffer=$buffer.'

For Link Exchange please contact us.

'; } ///////////////////////////// End Links Query /////////////////////////////////// ////////////////////// Output ///////////////////////////////// $menu=alfamenu(strtolower($cat[0])); $norandlink=true; $body=$buffer; $topmem="";//topmem(); $page_content=array( "topmem"=>$topmem, "title"=>$title, "description"=>"Lyrics4Mp3.com: lyrics for mp3 music.", "extraheader"=>$extraheader, "q"=>$keywords, "alphamenu"=>$menu, "login"=>$loginmenu, "top10"=>$topten, "content"=>$body); include('include/end.inc.php'); ?>