<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts Multicart                     |
// +----------------------------------------------------------------------+
// | Authors: Programmer<programmer@armia.com>        		              |
// +----------------------------------------------------------------------+
// | Copyrights Armia Systems, Inc and iScripts.com � 2005                |
// | All rights reserved                                                  |
// +----------------------------------------------------------------------+
// | This script may not be distributed, sold, given away for free to     |
// | third party, or used as a part of any internet services such as      |
// | webdesign etc.                                                       |
// +----------------------------------------------------------------------+
?>
<?php
include "../includes/config.php";
include "../includes/session.php";
include "../includes/functions.php";

if (get_magic_quotes_gpc()) {
    $_POST = array_map('stripslashes_deep', $_POST);
    $_GET = array_map('stripslashes_deep', $_GET);
    $_COOKIE = array_map('stripslashes_deep', $_COOKIE);
}

if(isset( $_SESSION["sess_affiliateid"]) and $_SESSION["sess_affiliateid"]!= ""){
	$affiliateid = $_SESSION["sess_affiliateid"];
}else{
	header("Location:login.php");
	exit;
}
$url  = "register.php?aid=".$affiliateid;

include "../includes/htmltop.php";

$select_affiliate_banner = "SELECT naff_banner_id,vaff_banner_name FROM ".$tableprefix."affiliate_banner WHERE 1";
$result_affiliate_banner = mysql_query($select_affiliate_banner) or die(mysql_error());


?>


		<body>
		
		<center>
		
		<div align="left" id="layout">
		
		
				
				
				<!--header area start -->
<?php

	include_once("../includes/topheader_affiliate.php")

?>
				
				<!--header area end -->
				
				
				
				
				<div align="left" class="main_body">
				<!--main body start -->
				
				
				
<?php
		include_once("../includes/afftopmenu.php")
?>		
																					
								
					<div align="left" class="content_area">
					
					<!--content area start -->
							
					<div align="left" class="page_title"><?php echo TEXT_GET_URL_PUB;?></div>
					<div align="center" class="text_information grey_tr"><?php echo $message?></div>
            		<br>
											
					<div align="left">																			
		
					<form name="frmProfile" action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST" enctype="multipart/form-data" class="manage_table">
					<input type="hidden" name="userid" value="<?php echo htmlentities($affiliateid);?>">
						<table cellpadding="2" cellspacing="2" width="100%" border=0>
							<tr><td  colspan="3">&nbsp;</td></tr>
							<tr>
								<td colspan="3">
								<p align =justify>
									 <?php echo MSG_PLC_BNR;?> <?php echo htmlentities(SITE_NAME);?>.<?php echo MSG_PASTE_LINK;?>
									</p>
									<div align=center>
							<?php
							
								if(mysql_num_rows($result_affiliate_banner) > 0)
								{
									while($banner_row = mysql_fetch_array($result_affiliate_banner))
									{


if(ENABLE_AMAZON_S3_IMAGES == "Y"){  
          
                 $affiliateBanner = AMAZON_S3_DOMAIN_URL."banners/". $banner_row["vaff_banner_name"] ;
           
 }
else { $affiliateBanner =  SITE_URL . "/banners/". $banner_row["vaff_banner_name"]; }
									
							?>		
									
									<br>
									 <img src="<?php echo $affiliateBanner;?>"><br>
									<br>
									<strong><?php echo MSG_COPY_TEXT;?><?php echo htmlentities(SITE_NAME);?>  :<strong>
									<br>
									<br>

									<textarea rows="5" class="textarea2" cols="25"><a href="<?php echo SITE_URL."/".$url;?>"><img src="<?php echo SITE_URL?>/banners/<?php echo $banner_row['vaff_banner_name']?>" border="0"></a></textarea>
						 <?php
						 
									}
						 
								}
						
						 ?>          

									
									
									<hr width="96%" align="left" size="1">



									<b><?php echo TEXT_TXT_LINK;?></b><br>
									<br>
									<strong><?php echo MSG_COPY_TEXT;?> <?php echo htmlentities(SITE_NAME);?>  :</strong>
									<br>
									<br>

									<textarea class="textarea2" style=width:340px;height:60px;><a href="<?php echo SITE_URL."/".$url;?>">
									<?php echo TEXT_REG_WITH;?> <?php echo htmlentities(SITE_NAME);?></a>
									</textarea>


									</div>
								</td>
							</tr>
							<tr><td colspan="3">&nbsp;</td></tr>
							<tr><td colspan="3">&nbsp;</td></tr>
						</table>
					</form>
				</div>
										
				<!--content area end-->
								
				</div>
				
								
					<div align="left" class="clear_float"><img src="<?php echo $imagefolder;?>/clear.gif" alt="" width="1" height="1" /></div>
				<!--main body end -->
				</div>
				
				
<?php
	include "../includes/footer.php";
?>