";
$accfoldername = substr($tempname, 0, strpos($tempname, '/') );
$nameminus = strlen($accfoldername)-strlen("shop001");
if ($pid!="" || 1) {
$templist = "";
$sql = "SELECT * from eshopframe where display='1' and framefile='".basename($_SERVER['PHP_SELF'])."' ORDER BY sorting ASC";
$result=$db->query($sql.$sql_limit);
$total = mysql_num_rows($result);
$rs = $db->query($sql);
while($row = $db->fetch_array($rs)) {
$cattitle = $row["catname"]; $subcattitle = $row["subcatname"]; $subcatdesc = $row["subcatdesc"];
$sql2 = "SELECT * FROM attachment where table_name='products' and col_name='Photo Large' and table_id='".$row["id"]."' ORDER BY sorting ASC";
$rs2 = $db->query($sql2);
while($row2 = $db->fetch_array($rs2)) {
$filephoto = " src='../".$row2["path"]."thumb_l/".$row2["file_name"]."' ";
$width = " width=".$row2["width"]." ";
$height = " height=".$row2["height"]." ";
$title = " title=".$row2["title"]." ";
$alt = " alt='".$row2["alt"]."' ";
}
if ( $_SESSION['curr']=='RMB' ) { $tempunitprice = $row["price1unit"]; $tempunitprice2 .= $row["price1"] ; }
if ( $_SESSION['curr']=='HKD' ) { $tempunitprice = $row["price2unit"]; $tempunitprice2 .= $row["price2"] ; }
if ( $_SESSION['curr']=='USD' ) { $tempunitprice = $row["price3unit"]; $tempunitprice2 .= $row["price3"] ; }
$templist .= '
'.$row["{$_SESSION['lang']}name"].'
'.$row["{$_SESSION['lang']}brief"].'
';
$templist2 .= '
-
'.$row["{$_SESSION['lang']}_name"].'
';
$sql2 = "SELECT * FROM leveltwo where display=1 and levelone_id='".$row["id"]."' ORDER BY sorting ASC, {$_SESSION['lang']}_name ASC";
$rs2 = $db->query($sql2);
while($row2 = $db->fetch_array($rs2)) {
$templist .= ''.$row2["{$_SESSION['lang']}_name"].'';
}
$templist .= '' ;
}
//echo $templist;
}
?>
$sqlsearch = "SELECT * from eshopframe where display='1' and framefile='".basename($_SERVER['PHP_SELF'])."' ORDER BY sorting ASC";
$rs=$db->query($sqlsearch);
while ($row = $db->fetch_array($rs)) { $subcattitle = $row["filecontenten1"]; }
$sqlsearch = "SELECT * from products where displaysp='1' ORDER BY sortingsp ASC, {$_SESSION['lang']}_name ASC ";
$resultsearch=$db->query($sqlsearch);
$totalsearch = mysql_num_rows($resultsearch);
?>
=$subcattitle?> =$totalsearch.$total?> products are available
$temptext= '
Special Offer
';
$sql = 'SELECT * FROM products where display="1" and displaysp="1" ORDER BY sortingsp ASC,sorting ASC, sc_name asc limit 0,6';
$rs = $db->query($sql);
while($row = $db->fetch_array($rs)) {
$tempcounter++;
// if ( $tempcounter==5 )
if ( $_SESSION['curr']=='USD' ) $tempcurr= $row['price1unit'].' '.$row["price1"];
if ( $_SESSION['curr']=='RMB' ) $tempcurr= $row['price2unit'].' '.$row["price2"];
if ( $_SESSION['curr']=='HKD' ) $tempcurr= $row['price3unit'].' '.$row["price3"];
$tempcurr= $_SESSION['curr'].' '.$row["price1"] * $_SESSION['currency'];
$sql_productphoto = "SELECT * FROM attachment WHERE table_name='products' and col_name='Photo Large' and table_id ='".$row["id"] ."'";
$rs_productphoto = $db->query($sql_productphoto);
while ( $row_productphoto = $db->fetch_array($rs_productphoto)){
$photo1 = $row_productphoto["file_name"];
$photopath1 = $row_productphoto["path"];
}
$temptext .= ' -
'.$row["{$_SESSION['lang']}_name"].'
'.$row["{$_SESSION['lang']}_desc"].'
';
$temptext2 .= '
';
$temptext2 .= '
';
$temptext .= '
'.$tempcurr.'
';
/* Add to */
}
$temptext .= '
';
echo ''.$temptext.'
';
?>