<?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.                                                       |
// +----------------------------------------------------------------------+
?>
<?
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);
}


/*$pattern = strpos($_SERVER['REQUEST_URI'],'.php');

$seller_name = substr($_SERVER['REQUEST_URI'],$pattern+5,strlen($_SERVER['REQUEST_URI'])-$pattern);


$select_artist_id = "SELECT artist_id FROM ".$tableprefix."artists WHERE artist_name = '".$seller_name."'";
$result_artist_id = mysql_query($select_artist_id) or die(mysql_error());  

$artist_id_row = mysql_fetch_assoc($result_artist_id);

$artistid = $artist_id_row['artist_id'];*/

if (isset($_GET["artistid"]) and $_GET["artistid"] != "") {
    $artistid = $_GET["artistid"];
} else if (isset($_POST["artistid"]) and $_POST["artistid"] != "") {
    $artistid = $_POST["artistid"];
}


/*----------Multicart 2.0 Upgradation Starts------------*/


$select_artist_id = "SELECT artist_id,artist_name FROM ".$tableprefix."artists WHERE artist_name = ".GetSQLValueString($artistid,"text");

$result_artist_id = mysql_query($select_artist_id) or die(mysql_error());

if(mysql_num_rows($result_artist_id) > 0)
{

	$artist_row = mysql_fetch_assoc($result_artist_id);
	$artistid = $artist_row['artist_id'];
	$artist_name = $artist_row['artist_name'];


}


/*----------Multicart 2.0 Upgradation Ends------------*/



$portfoliodir = SITE_URL."/portfolios/";

$sql = "SELECT ap.*, a.artist_name,a.first_name,a.last_name,a.state, a.country FROM ".$tableprefix."artists a LEFT JOIN ".$tableprefix."artist_portfolios ap ON a.artist_id = ap.artist_id  WHERE a.artist_id = '".addslashes($artistid)."' ";

$res = mysql_query($sql);
if(mysql_num_rows($res) > 0 ){
	$row= mysql_fetch_array($res);
	$portfolioid = $row["artist_portfolio_id"];
	$txtArtistDescription = $row["artist_description"];
	$txtArtistPhoto= $row["artist_photo"];
	$arrSamples = array();
	$txtArtistSampleWork1= $row["artist_sample_work_1"];
	$txtArtistSampleWork2= $row["artist_sample_work_2"];
	$txtArtistSampleWork3= $row["artist_sample_work_3"];
	$txtArtistSampleWork4= $row["artist_sample_work_4"];
	$txtArtistSampleWork5= $row["artist_sample_work_5"];
	$txtArtistSampleWork6= $row["artist_sample_work_6"];

	if($txtArtistSampleWork1!=""){
		array_push($arrSamples, $txtArtistSampleWork1);
	}
	if($txtArtistSampleWork2!=""){
		array_push($arrSamples, $txtArtistSampleWork2);
	}
	if($txtArtistSampleWork3!=""){
		array_push($arrSamples, $txtArtistSampleWork3);
	}
	if($txtArtistSampleWork4!=""){
		array_push($arrSamples, $txtArtistSampleWork4);
	}
	if($txtArtistSampleWork5!=""){
		array_push($arrSamples, $txtArtistSampleWork5);
	}
	if($txtArtistSampleWork6!=""){
		array_push($arrSamples, $txtArtistSampleWork6);
	}

	$txtArtistName = $row["artist_name"];
	$txtArtistFirstName = $row["first_name"];
	$txtArtistLastName = $row["last_name"];
	$txtArtistFullName = $txtArtistFirstName;
	if($txtArtistLastName!=""){
		$txtArtistFullName .= " ". $txtArtistLastName;
	}
	$txtArtistState = $row["state"];
	$txtArtistCountry = $row["country"];
	
	if($txtArtistPhoto == ""){
		$imageurl = "<img src='".$portfoliodir . "noimage.jpg' width='100' height='100' border='0' >";
	}else{
		if(!function_exists('gd_info')){
			$imageurl = "<img src='".$portfoliodir.$txtArtistPhoto."' border='0' width='100' height='100' >";
		}else{
			$imageurl = "<img src='getimagethumbnailnew.php?imagename=".$txtArtistPhoto."' border='0' >";
		}
	}
}

include "includes/htmltop_portfolio.php";

/*display the active template*/

$active_template = displayTemplate();

?>

<script>
function clickSearch()
{
	document.frmCatalog.submit();
}
</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";
															?>
															<table width="100%"  border="0" cellspacing="0" cellpadding="0">
																<tr>
																	<td width="1%">&nbsp;</td>
																	<td width="100%">
																		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
																			<tr>
																				<td width="15%" valign="top">
																					<?php include "includes/categorylist_portfolio.php";?>
																					<?php include "includes/newitemslist.php";
																					?>
																				</td>
																				<td align="center" valign="top">
																					<?php //include "includes/searchbar.php";?>
                                       												<?php //include "includes/maintop.php";?>

                             														<p>&nbsp;</p>




																				<table width="100%"  border="0" cellspacing="0" cellpadding="5">
																										<tr>
																											<td height="37" class="headingbig" align=left>Seller's Portfolio </td>
																											<td width="4%">&nbsp;</td>
																										</tr>
																				</table>
																				 <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="toplinkbar">
																                      <tr>
																                        <td width="1%"></td>
																                        <td width="1%" align="right"></td>
																                        <td width="80%" align="center" class="linksbg">




																								<table width="60%"  border="0" cellpadding="0" cellspacing="0" class="toplinks">
																								 <tr align="center">
																								<td class="toplinks"><a class="topanchor" href="<?php echo SITE_URL?>/portfolio/<?php echo $artist_name?>">Home</a></td>
																								<td class="toplinks"><a class="topanchor" href="<?php echo SITE_URL?>/showportfolio.php?artistid=<?php echo $artistid?>&mode=catlog">Catalog</a></td>

																								<td class="toplinks"><a class="topanchor" href="<?php echo SITE_URL?>/showportfolio.php?artistid=<?php echo $artistid?>&mode=feedback">Feedbacks</a></td>
																								          </tr>
																		                        </table>







																						</td>
																                        <td width="1%"></td>
																                        <td width="1%"></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 align="left"></td>
																										<td width="4%">&nbsp;</td>
																									</tr>
																								</table>
																							</td>
																							<td width="3%">&nbsp;</td>
																						</tr>
																					</table>







																					<!-- _______________________________________________ -->

																					<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="heading">
										                                              <tr>
										                                                <td width="4%">&nbsp;</td>
										                                                <td width="93%">
																							<table width="100%"  border="0" cellspacing="0" cellpadding="5">
										                                                    	<tr>
										                                                      		<td align="left">
																										<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="heading">
										                                                        			<tr>
										                                                          				<td width="59%" valign="top">
																													<table width="100%"  border="0" cellspacing="0" cellpadding="0">
										                                                            					<tr>
										                                                              						<td ></td>
										                                                     							</tr>
										                                                          					</table>
										                                                            				<table width="93%"  border="0" cellpadding="5" cellspacing="0" class="tableheading">
										                                                              					<tr>
										                                                                					<td align="left" class="bigheading"><?php echo $txtArtistName;?></td>
										                                                              					</tr>
																														<tr>
										                                                                					<td align="left">
																																<table width="100%"  border="0" cellspacing="0" cellpadding="0">
										                                                                    						<tr>
										                                                                      							<td width="100%"  background="<?php echo SITE_URL?>/images/dotss.jpg"><img src="images/dotss.jpg" width="14" height="1"></td>
										                                                                    						</tr>
										                                                                						</table>
																															</td>
										                                                              					</tr>
										                                                              					<tr>
										                                                        							<td align="left" class="heading">Seller's Full Name: <span class="innertextCopy2"><?php echo  $txtArtistFullName;?></span></td>
										                                                          						</tr>
										                                                     							<tr>
										                                                       								<td align="left">
																																<table width="100%"  border="0" cellspacing="0" cellpadding="0">
										                                                                    						<tr>
										                                                                      							<td height="1" background="<?php echo SITE_URL?>/images/dotss.jpg"><img src="<?php echo SITE_URL?>/images/dotss.jpg" width="14" height="1"></td>
										                                                                    						</tr>
										                                                                						</table>
																															</td>
										                                                              					</tr>
										                                                              					<tr>
										                                                                					<td align="left" class="heading">State/Province: <span class="innertextCopy2"><?php echo  $txtArtistState;?></span></td>
										                                                              					</tr>
										                                                              					<tr>
										                                                                					<td align="left">
																																<table width="100%"  border="0" cellspacing="0" cellpadding="0">
										                                                                    						<tr>
										                                                                      							<td height="1" background="<?php echo SITE_URL?>/images/dotss.jpg"><img src="<?php echo SITE_URL?>/images/dotss.jpg" width="14" height="1"></td>
										                                                                    						</tr>
										                                                                						</table>
																															</td>
										                                                              					</tr>
										                                                              					<tr>
										                                                                					<td align="left" class="heading">Country: <span class="innertextCopy2"><?php echo  $txtArtistCountry;?></span></td>
										                                                              					</tr>
										                                                              					<tr>
										                                                                					<td align="left">
																																<table width="100%"  border="0" cellspacing="0" cellpadding="0">
										                                                                    						<tr>
										                                                                      							<td height="1" background="<?php echo SITE_URL?>/images/dotss.jpg"><img src="<?php echo SITE_URL?>/images/dotss.jpg" width="14" height="1"></td>
										                                                                    						</tr>
										                                                                						</table>
																															</td>
										                                                              					</tr>
										                                                            				</table>
																												</td>
										                                                          				<td width="41%" valign="top">
																													<table width="100%"  border="0" cellspacing="0" cellpadding="0">
															                                                            <tr>
															                                                              <td width="33%" align="right"></td>
															                                                              <td width="62%">&nbsp;</td>
															                                                              <td width="5%">&nbsp;</td>
															                                                            </tr>
										                                                            					<tr>
										                                                              						<td align="right" background="images/bg3.gif">&nbsp;</td>
										                                                              						<td align="center">
																																<table width="100%"  border="0" cellspacing="0" cellpadding="0">
																	                                                        		<tr>
																	                                                           			<td width="8%" align="right" valign="top" ></td>
																	                                                                	<td width="76%" background="images/topbg.gif">&nbsp;</td>
																	                                                                  	<td width="16%" align="left" valign="top" ></td>
																	                                                                </tr>
																		                                                          	<tr>
																		                                                                  <td background="images/leftbg.gif">&nbsp;</td>
																		                                                                  <td align="center"><?php echo $imageurl;?></td>
																		                                                                  <td background="images/rightbg.gif">&nbsp;</td>
																		                                                         	</tr>
																	                                                                <tr>
																	                                                                  <td align="right" valign="top"></td>
																	                                                                  <td >&nbsp;</td>
																	                                                                  <td align="left" valign="top"></td>
																	                                                                </tr>
										                                                              							</table>
																															</td>
										                                                              						<td>&nbsp;</td>
										                                                            					</tr>
															                                                            <tr>
															                                                              <td align="right"></td>
															                                                              <td align="right" valign="bottom" background="images/btmbg2.gif"></td>
															                                                              <td>&nbsp;</td>
															                                                            </tr>
										                                                          					</table>
																												</td>
										                                                        			</tr>
										                                                      			</table>
																										<?php
																												if (isset($_GET["mode"]) and $_GET["mode"] != "") {
																											    $mode = $_GET["mode"];
																												} else if (isset($_POST["mode"]) and $_POST["mode"] != "") {
																																    $mode = $_POST["mode"];
																												}
																												if( $mode==""){
																										?>
										                                                        		<table width="100%" height="128"  border="0" cellpadding="10" cellspacing="0">
										                                                          			<tr>
										                                                            			<td align="left" valign="top" class="artiststext" style='word-break:break-all;'>
																												  <?php echo nl2br(htmlentities($txtArtistDescription));?>
																												</td>
										                                                          			</tr>
										                                                        		</table>
																										<?php } ?>
																									</td>
										                                                    	</tr>
										                                                	</table>
																						</td>
										                                                <td width="3%">&nbsp;</td>
										                                              </tr>
										                                            </table>
																					<?php

																					if(count($arrSamples) > 0 and $mode==""){
																					?>
										                                            <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>
																										
										                                                      			<table width="100%"  border="0" cellpadding="0" cellspacing="0" >
										                                                      				<tr>
										                                                        			<td>
										                                                        			<!--sample works-->

										                                                        			<table width="100%"  border="0" cellpadding="0" cellspacing="0" class="boxborder">
																											    <tr>
																											      <td><table width="100%"  border="0" cellspacing="1" cellpadding="0">
																												       <?php

																															$i=1;
																															$j=1;
																															if(count($arrSamples) > 0 ){
																															while($row = array_pop($arrSamples)){
																																   if($arrSamples == ""){
																																	$imageurl = "<img src='".$prodimagedir . "noimage.jpg' width='100' height='100' border='0' >";
																																	}else{
																																		if(!function_exists('gd_info')){
																																			$imageurl = "<img src='".$portfoliodir.urlencode($row)."' border='0' width='100' height='100' >";
																																		}else{
																																			$imageurl = "<img src='getimagethumbnailnew.php?imagename=".urlencode($row)."' border='0' >";
																																		}
																																	}
																																	 if($j==1){
																																	   echo "<tr align=\"center\" bgcolor=\"#FFFFFF\">";
																																	 }
																																	 if($i==2){
																																	   echo "<td width=\"34%\" valign=\"middle\" bgcolor=\"#FFFFFF\" class=\"boxalternatecolor2\">";
																																	   $i=0;

																																	 }else{
																																	   echo "<td width=\"34%\" valign=\"middle\" bgcolor=\"#FFFFFF\" class=\"whitebg\">";
																																	 }
																																	 if(strlen($row["product_name"])>30)
																																	  $productname=substr($row["product_name"],0,30)."...";
																																	 else
																																	    $productname =$row["product_name"];
																															?>
																															  <table width="100%"  border="0" cellspacing="0" cellpadding="5">
																															    <tr>
																															      <td align="center" ><?php echo $imageurl;?></td>
																															    </tr>
																															    <tr>
																															      <td align="center" style='word-break:break-all;'>&nbsp;</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 records found</td></tr>";

																															}
																															?>

																											                </table></td>
																											             </tr>
																											         </table>
										                                                        			<!-- Sample works-->


																											</td>
																										</tr>
										                                   							</table>
																								</td>
																								<td width="3%">&nbsp;</td>
										                                            		</tr>
										                                          		</table>
																						<?}?>
																						<table width="100%">
																						    <tr>
																							 <td>&nbsp;</td>
																							</tr>
																							<tr>
																								<td  colspan=5 width="100%">
																								<?php


																								if($mode=="catlog"){
																									if (isset($_GET["catid"]) and $_GET["catid"] != "") {
																									    $catid = $_GET["catid"];
																									} else if (isset($_POST["catid"]) and $_POST["catid"] != "") {
																									    $catid = $_POST["catid"];
																									}





																								?>
																								 <form name="frmCatalog" action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST" enctype="multipart/form-data">
																												<input type="hidden" name="catid" value="<?php echo htmlentities($catid);?>" >
																												<input type="hidden" name="artistid" value="<?php echo htmlentities($artistid);?>" >
																												<input type="hidden" name="mode" value="<?php echo htmlentities($mode);?>" >


																								<TABLE width="100%" border=0>
																								  <tr>
																								  <td width="4%">&nbsp;</td>
																								  <td>
																									  	<table width="100%"  border="0" cellspacing="0" cellpadding="5">
																										<tr>
																											<td height="37" class="headingbig" align=left>Catalog </td>
																											<td width="4%">&nbsp;</td>
																										</tr>
																				                       </table>
																									          <FIELDSET>
																												<table width="100%"  border=0  align='left' cellpadding="2" cellspacing="2">
																																<?
																																if(!isset($catid) || $catid ==""){
																																	$catid = 0;
																																}
																																$showproducts=false;
																																$artistid=addslashes($artistid);
																															    $qry="select  p.product_artist_id,p.product_category,count(product_category) as cnt ,
																																			c.category_name,c.category_id from ".$tableprefix."products
																																			p left join ".$tableprefix."categories  c on  p.product_category= c.category_id
																																			where product_artist_id='".$artistid."' group by product_category";



																																$result = mysql_query($qry) or die(mysql_error());

																																if(mysql_num_rows($result)!= 0){
																																		                while($row = mysql_fetch_array($result) ){
																																						        $displayctegory="".getCategory("",$row["category_id"])."";
																																		                        echo "<tr>";
																																		                       // echo "<td width='10%' align=right><img src=images/dot.jpg></td><td width='40%' class=maintext align=left><a href=\"".$PHP_SELF."?artistid=$artistid&mode=catlog&catid=" . $row["category_id"] . "&categorydesc=" . urlencode($row["cnt"]) . "\" class=textblack>". htmlentities($row["category_name"]) ."</a>&nbsp;(" . $row["cnt"] . ")</td>";
																																		                           echo "<td width='10%' align=right><img src=images/dot.jpg></td><td width='40%' class=\"links\" align=left style='word-break:break-all;'><a href=\"".$PHP_SELF."?artistid=$artistid&mode=catlog&catid=" . $row["category_id"] . "&categorydesc=" . urlencode($row["cnt"]) . "\" class=\"links\">".$displayctegory ."</a>&nbsp;(" . $row["cnt"] . ")</td>";
																																		                        if($row = mysql_fetch_array($result)){
																																								     $displayctegory1="<b>".getCategory("",$row["category_id"])."</b>";
																																									echo "<td width='10%' align=right><img src=images/dot.jpg></td><td width=40% class=maintext valign=middle  align=left style='word-break:break-all;'>";
																																		                           //	echo "<a href=\"".$PHP_SELF."?artistid=$artistid&mode=catlog&catid=" . $row["category_id"] . "&categorydesc=" .  urlencode($row["vCategoryDesc"])   . "\" class=textblack>" . htmlentities($row["category_name"]) ."</a>&nbsp;(" . $row["cnt"] . ")";
																																								   	echo "<a class=\"links\" href=\"".$PHP_SELF."?artistid=$artistid&mode=catlog&catid=" . $row["category_id"] . "&categorydesc=" .  urlencode($row["vCategoryDesc"])   . "\" class=textblack>" . $displayctegory1 ."</a>&nbsp;(" . $row["cnt"] . ")";
																																									echo "&nbsp;</td>";
																																		                        }

																																		                        echo "</tr>";
																																		                }
																														        }




																																?>


																																</table>
																																</FIELDSET>

																									</td>
																								  </tr>

																								  <!-- product listing heree-->

																								  <tr>
																								    <td width="4%">&nbsp;</td>
																								    <td>
																									 <table width="100%" border=0>
																									  <?php
																									  if(isset($_GET["txtSearch"]) and $_GET["txtSearch"]!=""){
																											$txtSearch = $_GET["txtSearch"];
																											$cmbSearchType = $_GET["cmbSearchType"];
																										}else if(isset($_POST["txtSearch"]) and $_POST["txtSearch"]!=""){
																											$txtSearch = $_POST["txtSearch"];
																											$cmbSearchType = $_POST["cmbSearchType"];
																										}
																										$begin=($_GET["begin"] != "")?$_GET["begin"]:$_POST["begin"];
																										$num=($_GET["num"] != "")?$_GET["num"]:$_POST["num"];
																										$numBegin=($_GET["numBegin"] != "")?$_GET["numBegin"]:$_POST["numBegin"];
																										$start=($_GET["start"] != "")?$_GET["start"]:$_POST["start"];

																										$cmbSearchType==($_GET["cmbSearchType"] != "")?$_GET["cmbSearchType"]:$_POST["cmbSearchType"];

																										$qryopt="";
																										if($txtSearch != ""){
																										   if($cmbSearchType == "artistname"){
																										            $qryopt .= "  AND  s.artist_name like '" . addslashes($txtSearch) . "%'";
																										   }else if($cmbSearchType == "dateadded"){
																										   		$dt = $txtSearch;
																												$arrdt = explode("-",$dt) ;
																												$day = $arrdt[1];
																												$month = $arrdt[0];
																												$year = $arrdt[2];
																												$dt = $year."-". $month ."-".$day;
																												$qryopt .= "  AND  p.date_added like '" . addslashes($dt) . "%'";
																										   }else if($cmbSearchType == "productname"){
																										            $qryopt .= "  AND  p.product_name like '" . addslashes($txtSearch) . "%'";
																										   }
																										}
																									   require("./includes/artistproductlist.php");
																									  ?>
																									 </table>
																									</td>
																								  </tr>
																								</TABLE>
																								</form>
																								<?php }elseif($mode=="feedback"){
																								        $begin=($_GET["begin"] != "")?$_GET["begin"]:$_POST["begin"];
																										$num=($_GET["num"] != "")?$_GET["num"]:$_POST["num"];
																										$numBegin=($_GET["numBegin"] != "")?$_GET["numBegin"]:$_POST["numBegin"];
																										$start=($_GET["start"] != "")?$_GET["start"]:$_POST["start"];

																										$sql=" SELECT f.*, u.user_name FROM ".$tableprefix."artist_feedbacks f
																											INNER JOIN ".$tableprefix."users u ON f.user_id = u.user_id
																											WHERE f.artist_id = '".addslashes($artistid)."' AND f.published='Y' order by date_added DESC   ";

																										$sess_back= $_SERVER["PHP_SELF"] . "?artistid=$artistid&mode=feedback&catid=$catid&begin=" . $begin . "&num=" . $num . "&numBegin=" . $numBegin . "&cmbSearchType=" . $cmbSearchType . "&txtSearch=" . $txtSearch;
																										$_SESSION["gbackurl"] = $sess_back;

																										$totalrows = mysql_num_rows(mysql_query($sql));

																										$navigate = pageBrowser($totalrows,10,1,"&artistid=$artistid&mode=feedback&catid=$catid&cmbSearchType=$cmbSearchType&txtSearch=$txtSearch",$numBegin,$start,$begin,$num);
																										$sql = $sql.$navigate[0];
																										$rs = mysql_query($sql);


																								?>
																								 <form name="frmFeedback" action="<?php echo $_SERVER["PHP_SELF"]?>" method="POST" enctype="multipart/form-data">
																												<input type="hidden" name="catid" value="<?php echo htmlentities($catid);?>" >
																												<input type="hidden" name="artistid" value="<?php echo htmlentities($artistid);?>" >
																												<input type="hidden" name="mode" value="<?php echo htmlentities($mode);?>" >

																								 <table width="100%">
																								   <tr>
																								    <td width="4%">&nbsp;</td>
																								    <td>
																										   <table width="100%"  border="0" cellspacing="0" cellpadding="5">
																										<tr>
																											<td height="37" class="headingbig" align=left>Feedbacks </td>
																											<td width="4%">&nbsp;</td>
																										</tr>
																				                       </table>
																									  <table width="98%"  border="0" cellpadding="0" cellspacing="0"  align="center">
																											<tr>
																												<td >
																													<table width="100%" cellpadding="2" cellspacing="2" border=0>
																														<tr><td>&nbsp;</td><td colspan="2" align="center"></td></tr>
																														<?php
																														$i=1;
																														while($row  = mysql_fetch_array($rs)){
																															echo "<tr><td width='5%' valign='top' class='message'><b>#".$i."</b></td><td align='left' colspan=2><div align='left' class='innertext' style='word-break:break-all;'>".nl2br(htmlentities($row["feedback_content"]))."</div></td></tr>";
																															echo "<tr><td width='5%' valign='top' style='word-break:break-all;'>&nbsp;	</td><td align='left' colspan=2 class='innertextCopy2' style='word-break:break-all;'>By: <b>".nl2br(htmlentities($row["user_name"]))."</b>&nbsp;&nbsp;&nbsp;&nbsp;<span class='innertextCopy2'>Rating:</span>&nbsp;&nbsp;<b>".htmlentities($row["rating"])."</b></td></tr>";
																															echo "<tr><td width='100%' colspan=3 style='word-break:break-all;'>&nbsp;</td></tr>";

																															$i++;
																														}
																														?>
																														<tr><td colspan=3 align='center'><?php echo($navigate[2]); ?></td></tr>
																													</table>
																												</td>
																											</tr>

																										</table>
																									</td>
																								   </tr>
																								 </table>
																								 </form>
																							    <?php
																								} ?>
																								</td>
																							</tr>
																						</table>

																					<!-- _______________________________________________ -->



																				</td>
                                											</tr>


                           												</table>
                             										</td>
                              										<td style="width:1px" class="siteborder"><img src="<?php echo SITE_URL ?>/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>
<?
include "includes/footer_portfolio.php";
?>
</body>
</html>