<?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_adminname"]) and $_SESSION["sess_adminname"]!= ""){
	$adminname = $_SESSION["sess_adminname"];
}else{
	header("Location:login.php");
	exit;
}
$message_to_seller_id = $_GET['message_to_seller_id'];
$page = isset($_GET['page'])? trim($_GET['page']):1;

	$sql = "SELECT *
		FROM ".$tableprefix."message_to_seller
                WHERE  message_to_seller_id = '". mysql_real_escape_string($message_to_seller_id) . "'";
	$rs = mysql_query($sql) or die(mysql_error());

	

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

?>

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

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

?>
				
				<!--header area end -->
				
				
				
				
				<div align="left" class="main_body">
				<!--main body start -->
				
				
				
<?php
		include_once("../includes/admintopmenu.php")
?>		
																					
								
					<div align="left" class="content_area">
					
					<!--content area start -->
							
					<div align="left" class="page_title">Seller Messages</div>
					<div align="center" class="text_information grey_tr"><?php echo $message?></div>
            		<br>
											
					
						
					<div align="left">					
					
																																				
					<table border="0" width="100%" cellpadding="0" cellspacing="0" class="manage_table">
					
						
						
						<?php
if(mysql_num_rows($result) > 0 )
{
	
	$row = mysql_fetch_array($rs);
	/*
	if($row["read"] == 'N')
        {
            $sql = "UPDATE  ".$tableprefix."message_to_seller
                SET `read` = 'Y'
                WHERE artist_id = ".$_SESSION["sess_artistid"]. " 
                 AND message_to_seller_id = '". mysql_real_escape_string($message_to_seller_id) . "'";
	$rs = mysql_query($sql) or die(mysql_error());
        }
	*/		
						
				
?>
<tr>
    <th width="10%" align="left">From</th>
    <td align="left"><?php echo stripslashes($row["name"]);?></td>
</tr>
<tr>
    <th align="left">Email</th>
    <td align="left"><?php echo stripslashes($row["email"]);?></td>
</tr>
<tr>
    <th align="left">Subject</th>
    <td align="left"><?php echo stripslashes($row["subject"]);?></td>
</tr>
<tr>
    <th align="left">Date Added</th>
    <td align="left"><?php echo dateFormat($row["created_on"], "Y-m-d", "m/d/Y");?></td>
</tr>
<tr>
    <th align="left">Message</th>
    <td align="left"><?php echo nl2br($row["message"]);?></td>
</tr>



<?php
}	
?>
	
<tr>
    <td colspan="3">
        <input type="button" class="button" value="Back" onclick="window.location='messages.php?page=<?php echo $page; ?>'"/>
    </td>
</tr>
	
								
					  </table>
                                        </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";
?>