Click to See Complete Forum and Search --> : My Art display Part 2


mabans
01-07-2004, 05:26 PM
I have evolved the art display is now working functionally but now it's within a 2 column views. I'm having some issues with 1 part of the code but I'm gonna address that on another topic in a different forum. but I want to know if this looks well done. I look forward to any and all input..



<?PHP
//The Required Files to access the data base
require("../../../includes/configs/config.cfg");
require("../../../includes/configs/select_db.cfg");
//The Required Files to access the data base

$columns = 2;

// Database Queries //

$poster_sql = "SELECT * FROM `poster` WHERE category=". $_GET['show_cat'] ." ORDER BY 'code' ASC LIMIT 60";

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

$num_rows = mysql_num_rows($result);

echo "<TABLE BORDER=\"0\" WIDTH=\"99%\">\n";

for($i = 0; $i < $num_rows; $i++) {

$poster = mysql_fetch_array($result);

if($i % $columns == 0) {

echo "<TR>\n";

}

echo "<TD>"

// This display the image artwork//
."<!---- This display the image artwork--->\n"
."<table cellspacing=\"5\" cellpadding=\"0\" border=\"0\" width=\"100%\">\n"
."<tr>\n"
."<td align=\"left\" valign=\"top\" width=\"35\">\n"
."<a href=\"full_view.php?show_cat="
.$poster['ID']
."\">\n"
."\n<img src=\"../../../images/"
.$poster['imagethumb']
."\">\n"
."</a>\n</td>\n"
."<!---- This display the image artwork--->\n"
// This display the image artwork //

."<td align=\"left\" valign=\"top\" height=\"167\">\n"

// This is the information table with all the proper artwork info//
."<!---- This is the information table with all the proper artwork info --->\n"
."<table cellpadding=\"2\" cellspacing=\"0\" border=\"0\" height=\"136\" width=\"100%\">\n\n"
."<tr>\n\n"


// This is the art Item Code //
."<!----This is the art Item Code--->\n"
."<td>\n"
."<div class=\"unnamed1\">\n"
."<a href=\"full_view.php?show_cat="
.$poster['ID']
."\">\n"
.$poster['code']
."</a>\n"
."</td>\n"
."</tr>\n"
."<!----This is the art Item Code--->\n\n"
// This is the art Item Code //

// This is the Artwork Name //
."<!----This is the Artwork Name--->\n"
."<tr>\n"
."<td bgcolor=\"#eaeaea\">\n"
."<div class=\"unnamed1\">\n<font color=\"#000000\">\n"
.$poster['postername']
."</font>\n</div>\n"
."</td>\n"
."</tr>\n\n"
."<!----This is the Artwork Name--->\n"
// This is the Artwork Name //


// This is the Artist Name //
//I know this isn't working properly

."<!----This is the Artist Name--->\n"
."<tr>\n"
."<td>\n"
."<div class=\"unnamed1\">\n"
.$artist_row['artistname']
.$artist_row['artistlastname']
."</div>\n"
."</td>\n"
."</tr>\n"
."<!----This is the Artist Name--->\n"

//I know this isn't working properly
// This is the Artist Name //

// Poster Size Text //

."<!----Poster Size Text--->\n"
."<tr>\n"
."<td>\n"
."<div class=\"unnamed1\">\nPaper Size:</div>\n"
."</td>\n"
."</tr>\n"
."<!----Poster Size Text--->\n"

// Poster Size Text //


."<!----Paper Size info--->\n"
."<tr>\n"
."<td>\n"
."<div class=\"unnamed1\">\n"
.$poster['papersizeincheswt']
." x "
.$poster['papersizeinchesht']
." In | "
.$poster['papersizecmwt']
." x "
.$poster['papersizecmht']
." Cm"
."</div>\n"
."</td>\n"
."</tr>\n"
."<!----Paper Size Info--->\n"

// Paper Size Info//

// Image Size Text //

."<!----Image Size Text--->\n"
."<tr>\n"
."<td>\n"
."<div class=\"unnamed1\">\nImage Size:</div>\n"
."</td>\n"
."</tr>\n"
."<!----Image Size Text--->\n"

// Image Size Text //

// Image Size Info//

."<!----Image Size Info--->\n"
."<tr>\n"
."<td>\n"
."<div class=\"unnamed1\">\n"
.$poster['imagesizeincheswt']
." x "
.$poster['imagesizeinchesht']
." In | "
.$poster['imagesizecmwt']
." x "
.$poster['imagesizecmht']
." Cm"
."</div>\n"
."</td>\n"
."</tr>\n"
."<!----Image Size Info--->\n"

// Image Size Info//

// Pricing Info //

."<!----Pricing Info--->\n"
."<tr>\n"
."<td>\n"
."<div class=\"unnamed1\">\n"
."$"
.$poster['price']
."</div>\n"
."</td>\n"
."</tr>\n"
// Pricing Info //
."</table>\n"
."</td>\n"
."</tr>\n"
."</table>\n"
."<!----Pricing Info--->\n"
."<!---- This is the end of the information table with all the proper artwork info --->\n"

."</TD>\n";


if(($i % $columns) == ($columns - 1) || ($i + 1) == $num_rows) {

echo "</TR>\n";

}
}
echo "</TABLE>\n";
?>