<?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($_GET["productid"]) and $_GET["productid"] != "") {
    $productid = $_GET["productid"];
} else if (isset($_POST["productid"]) and $_POST["productid"] != "") {
    $productid = $_POST["productid"];
}



$sess_back= $_SERVER["PHP_SELF"] . "?begin=" . $begin . "&num=" . $num . "&numBegin=" . $numBegin . "&cmbSearchType=" . $cmbSearchType . "&txtSearch=" . $txtSearch."&catid=" . $catid;
//$_SESSION["gbackurl"] = $sess_back;
$rs = mysql_query($sql);
if(mysql_num_rows($rs)!=0){
	$prow = mysql_fetch_array($rs);
	$artistid =$prow["product_artist_id"];
}

include "includes/htmltop.php";


/*display the active template*/

$active_template = displayTemplate();

?>
<script language="JavaScript" type="text/JavaScript">
function clickSearch()
{
	document.frmCatalog.submit();
}
function openWindow(id)
{
	var url = "viewimage.php?id="+id;
	window.open(url,"Image","height=500,width=500,scrollbars=yes");
}
</script>

<body topmargin="0">
<table width="804" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td align="center" >
			<table width="802" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
					<td >
						<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
            				<tr>
              					<td>
									<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="maintext">
                  						<tr>
                    						<td>
												<form name="frmTop" method="post" action="#">
												<?php include "includes/".$active_template[0]; /* Top File Name */?> 
											</form>
												<table width="100%"  border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td valign="top" bgcolor="#FFFFFF">
															<?php
																include "includes/topmenu.php";
																include "includes/dotline.php";
																//include "includes/centermain.php";
															?>
																<table width="100%"  border="0" cellspacing="0" cellpadding="0">
																<tr>

																	<td width="100%">
																		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
																			<tr>
																				<td width="15%" valign="top">
																					<?php include "includes/categorylist.php";?>
																					<?php include "includes/newitemslist.php";?>
																				</td>
																				<td align="center" valign="top">
																					<p>&nbsp;</p>
																						<table width="100%"  border="0" cellspacing="0" cellpadding="0">
																							<tr>
																								<td width="4%">&nbsp;</td>
																								<td width="93%">

																								</td>
																								<td width="3%">&nbsp;</td>
																							</tr>
																						</table>
																						<table width="100%"  border="0" cellspacing="0" cellpadding="0">
																							<tr>
																								<td width="4%">&nbsp;</td>
																								<td width="93%">
																									<table width="100%"  border="0" cellspacing="0" cellpadding="5">
																										<tr>
																											<td height="37" class="headingbig" align=left>Product Images</td>
																											<td width="4%">&nbsp;</td>
																										</tr>
																									</table>
																								</td>
																								<td width="3%">&nbsp;</td>
																							</tr>
																						</table>
																						<table width="100%">
																							<tr>
																								<td width="2%" colspan="3">
																								
																					<!------PRODUCT MORE IMAGES START -->			
																								
																								<table width="100%"  border="0" cellpadding="5" cellspacing="10" class="text" height="400">
																								<tr>
																								<td  align="left" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
																								  
																								</table>
																								  <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="boxborder">
																									<tr>
																									  <td><table width="100%"  border="0" cellspacing="1" cellpadding="0">
																										   <?php
																										   
																										   if($_GET['product_id'] != '')
																										   {
																										   
																												$prodimagedir = "products/bulk_images/";
																												$i=1;
																												$j=1;
																												$sql=" SELECT vimage_name,vimage_description
																													   FROM ".$tableprefix."product_view_images 
																														WHERE vproduct_image_delete_status != 'Y' AND nimage_productid = ".$_GET['product_id']." LIMIT 0,9 ";
																												$result=mysql_query($sql) or die(mysql_error());
																												if(mysql_num_rows($result) > 0 )
																												{
																													while($row = mysql_fetch_array($result))
																													{
																													   
																																$imageurl = "<img src='$prodimagedir".urlencode($row["vimage_name"])."' border='0' >";
																															
																														 if($j==1){
																														   echo "<tr align=\"center\" bgcolor=\"#FFFFFF\">";
																														 }
																														 if($i==2){
																														   echo "<td width=\"34%\" valign=\"middle\" bgcolor=\"#FFFFFF\" class=\"boxalternatecolor\">";
																														   $i=0;
																								
																														 }else{
																														   echo "<td width=\"34%\" valign=\"middle\" bgcolor=\"#FFFFFF\" class=\"whitebg\">";
																														 }
																														 
																												?>
																												  <table width="100%"  border="0" cellspacing="0" cellpadding="5">
																													<tr>
																													  <td align="center" ><?php echo $imageurl;?></td>
																													</tr>
																													<tr>
																													  <td align="center" ><?php echo $row['vimage_description']?></td>
																													</tr>
																												  </table>
																												</td>
																												<?php
																													$j++;
																													$i++;
																													$tdclosed="no";
																													if($j==4){
																													 $j=1;
																													 echo "</tr>";
																													 $tdclosed="yes";
																													}
																													if($i==4){
																													 $i=1;
																													}
																												}
																												 if($tdclosed=="no"){
																												   $cspan=4-$j;
																												   echo "<td colspan=\"$cspan\"></tr>";
																												 }
																								
																												}else{
																												   echo "<tr class=whitebg align=center><td class=maintext>No item</td></tr>";
																								
																												}
																												
																										}		
																										?>
																								
																												</table></td>
																											 </tr>
																										 </table></td>
																									   </tr>
																								</table>																								
														<!------PRODUCT MORE IMAGES END -->
																								
																								</td>
																								

                                      </tr>
                                    </tbody>
</table>
</form>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="sidecoloumn"><A class=links1
href="./postartistfeedback.php?artistid=<?php echo $artistid;?>&productid=<?php echo $productid;?>">Post Feedback about seller</A>&nbsp;&nbsp;|&nbsp;&nbsp;<A
class=links1
href="./artistfeedbacks.php?artistid=<?php echo $artistid;?>&productid=<?php echo $productid;?>">View feedbacks about seller</A> &nbsp;&nbsp;|&nbsp;&nbsp;<A class=links1
href="showportfolio.php?artistid=<?php echo $artistid;?>"
target=_blank>View seller's Portfolio</A> </td>
</tr>
</table><br>



																									<!-- ***************************************************** -->
																								</td>
																							</tr>
																						</table>


																				</td>
                                											</tr>
                           												</table>
                             										</td>
                              										<td style="width:1px" class="siteborder"><img src="./images/spacer.gif"></td>
                                  								</tr>
                     										</table>



																<?php
																include "includes/dotline.php";
																include "includes/bottommenu.php";
																include "includes/bottomband.php";
															?>
														</td>
                          							</tr>
                      							</table>
											</td>
                  						</tr>
									</table>
								</td>
 							</tr>
						</table>
					</td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<?php
include "includes/".$active_template[2];
?>
</body>
</html>




