#PHP for featured styles
$pageno = 1;
$no_of_records_per_page = 10;
$offset = ($pageno-1) * $no_of_records_per_page;
$approved = "approved";
$sel_query="SELECT id, Catalogue_name, Tailor_name, Product_descript, Product_code, Price, product_images, color_swatch_count, CAT_Author FROM tshed_catalogues WHERE prerogative='$approved' AND Views >='1' ORDER BY TimeStamp DESC LIMIT $offset, $no_of_records_per_page";
$result = mysqli_query($con,$sel_query);
if ($result->num_rows > 0){
while($row = mysqli_fetch_assoc($result)) {
#check for new ui
$images = unserialize(base64_decode($row["product_images"]));
$images = $images[0];
#find current tailor name
$findTailor = $row["CAT_Author"];
$tailor_name_query="SELECT Business_Name FROM tshed_tailors WHERE Created_by='$findTailor'";
$cur_Business_Name= mysqli_query($con,$tailor_name_query);
if($cur_Business_Name->num_rows > 0){
while($row_tailor_name = mysqli_fetch_assoc($cur_Business_Name)) {
$Business_Name = $row_tailor_name["Business_Name"];
}
}
$num = $row["Price"];
$price_convert= number_format($num);
$imageLink="";
$f444 = $row["product_images"];
if(!empty($f444)){
$imageLink = "https://tailorshed.com/Web/Apps/core/imgs/tShed_Cat_$images.jpg";
}else{
$imageLink = "https://tailorshed.com/Web/Apps/core/imgs/tShed_Cat_". $row["Product_code"].".jpg";
}
echo "
".$Business_Name."
" . $row["Catalogue_name"] . "
₦ " . $price_convert . "
";
}
} else {
echo "Catalogues are temporarily not available";
}
$con->close();
#PHP for featured styles
?>