<?php

//When you want to run this panel.php you have to config some variables manualy.
//If your page where you want this panel has already a connection to the database you can delete is.
$host = "localhost"; // Host name (Mostly localhost)
$username = "root"; // Mysql username
$password = ""; // Mysql password
$db_name = "linktrader_data"; // Database name
$prefix = "lt_"; // the name before the tables (handy when you have more then one installation in a database).

//You have to edit these variables.
$prefix="lt_"; //The prefix you choose when you install this script
$script_url = "https://ez-promotion4u.com/free-link-posting/"; //the url to 'My Link Trader'. (End wihth '/')

//END CONFIGURATION
mysql_connect("$host", "$username", "$password")or die("cannot connect to the database."); 
mysql_select_db("$db_name")or die("cannot select the database.");

//below it will search for websites and show them in a horizontal list.
	$query2 = mysql_query("SELECT * FROM ".$prefix."websites WHERE active='1' ORDER BY hits_in");
	while ($row2 = mysql_fetch_array($query2)) {
		$id = $row2['id'];
		$website_name = $row2['website_name'];
		$website_url = $row2['website_url'];
		$website_description = $row2['website_description'];

		echo "<a target='_blank' title='$website_description' href='".$script_url."out.php?id=$id'>$website_name</a><br>";
	}
echo "<br><a target='_blank' href='".$script_url."add_website.php'>Add Your Website</a>";//maybe you have to edit the link 'add to website'.
echo "<h6>Powered by: <a href='http://software.friendsinwar.com'>My Link Trader</a></h6>";
?>
