<?php

/******************************************************
 * CjOverkill version 3.0.1
 * © Kaloyan Olegov Georgiev
 * http://www.icefire.org/
 * spam@icefire.org
 * 
 * Please read the lisence before you start editing this script.
 * 
********************************************************/

include ("../cj-conf.inc.php");
include ("../cj-functions.inc.php");   
cjoverkill_connect();
 
include ("security.inc.php");

if ((!isset($_GET["id"]) || $_GET["id"]=="") && $_POST["id"]=="") { 
    cjoverkill_print_error("Please select a trade first"); 
}
else {
    $tid=$_GET["id"];
    if ($tid==""){
	$tid=$_POST["id"];
    }
    $sql=@mysql_query("SELECT domain from cjoverkill_trades WHERE trade_id='$tid'") OR
      cjoverkill_db_error(mysql_error());
    $tmp=@mysql_fetch_array($sql);
    extract($tmp);
    $sql=@mysql_query("SELECT site_url FROM cjoverkill_settings") OR 
      cjoverkill_db_error(mysql_error());
    $tmp=@mysql_fetch_array($sql);
    extract($tmp);
    $tms="Reverse Link For $domain";
    $link_code1="$site_url?tid=$tid";
    $link_code2="$site_url?td=$domain";
}

cjoverkill_disconnect();

echo ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
	<html>
	<head>
	<title>$tms</title>
	<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
	<link href=\"../cj-style.css\" rel=\"stylesheet\" type=\"text/css\">
	</head>
	<body bgcolor=\"#FFFFFF\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\" alink=\"#000000\">
	<div align=\"center\"><b><font size=\"4\">$tms<br>
	<br>
	$link_code1<br>
	$link_code2<br>
	</font></b>
	<br><br><font size=\"2\"><a href=\"javascript:window.close()\">Close Window</a></font>
	</div>
	</form>
	</body>
	</html>
	");
    

?>
