$headers = array("../store/images/mainheaders/header_cwu.jpg",
"../store/images/mainheaders/header_downtown.jpg",
"../store/images/mainheaders/header_firstlight.jpg",
"../store/images/mainheaders/header_harbormaster.jpg",
"../store/images/mainheaders/header_maiden.jpg",
"../store/images/mainheaders/header_skullcove.jpg",
"../store/images/mainheaders/header_som.jpg");
?>
$host = "localhost";
$id = "wwguser";
$pw = "4l4nn4";
$db = "wwg_zencart";
if (!($mylink = mysql_pconnect($host, $id, $pw) ) )
{
print "
could not connect to database: " . mysql_error() . "
\n";
exit;
}
mysql_select_db($db);
$product_image_map = array(
'137' => 'downtown.gif',
'149' => 'industrial.gif',
'2' => 'streets.gif',
'218' => 'marina.gif',
'10' => 'armoury.gif',
'38' => 'bits.gif',
'29' => 'castclas.gif',
'201' => 'mayhempd.gif',
'165' => 'mayhemrail.gif',
'264' => 'megamall.gif',
'103' => 'dlinxlotdg.gif',
'15' => 'castleult.gif',
'16' => 'chunkydungeons.gif',
'114' => 'minichunk.gif',
'31' => 'encounters.gif',
'17' => 'castleskeeps.gif',
'29' => 'dungeonworks.gif',
'24' => 'village.gif',
'19' => 'arena.gif',
'25' => 'caveworks.gif',
'18' => 'pubsinns.gif',
'21' => 'siege.gif',
'161' => 'watchtower.gif',
'22' => 'firstlight.gif',
'23' => 'retrofit.gif',
'52' => 'platfrom.gif',
'189' => 'redsector.gif',
'30' => 'mars.gif',
'140' => 'shadowcore.gif',
'256' => 'wormhole.gif',
'203' => 'uncharted.gif',
'27' => 'maiden.gif',
'194' => 'maidens20.gif',
'20' => 'skullcove.gif',
'45' => 'harbormaster.gif',
'178' => 'shellendrak.gif',
'26' => 'gothic.gif',
'211' => 'hellworks.gif',
'164' => 'dinas.gif',
'37' => 'somethingbelow.gif',
'139' => "missingpersons.gif",
"78" => "toc.gif",
"145" => "coins.gif",
"260" => "hinterland.gif",
"248" => "celestus.gif",
"232" => "Cathedrae.gif",
"257" => "requiem.gif",
"217" => "shellendrakreturn.gif",
"219" => "coh1.gif",
"240" => "coh2.gif",
"234" => "fl20.gif",
"263" => "battleground.gif",
"268" => "urbangrind.gif",
"271" => "thoumonts.gif",
"9992" => "utv.gif",
"9994" => "soh.gif");
if( isset($_POST["ownedproducts"])) {
$sql = "SELECT zp.products_id, zpd.products_name, zp.master_categories_id"
. " FROM zen_products zp"
. " JOIN zen_products_description zpd ON zpd.products_id = zp.products_id"
. " WHERE zp.products_id in (" . $products . ")"
. " ORDER BY zp.master_categories_id, zp.products_date_added";
if( !($result = mysql_query($sql) ) ) {
echo "Error querying data: " . mysql_error();
} else {
$currCat = 0;
$count = 0;
$productsShown = "";
$productsCode = "";
$productLink = "http://worldworksgames.com/store/index.php?main_page=product_info&products_id=";
$colsPerRow = (isset($_POST["colsPerRow"]) ? $_POST["colsPerRow"] : 5);
while( $r = mysql_fetch_array($result) ) {
if( (isset($_POST["breakOnCat"]) && $currCat != $r["master_categories_id"])
|| ($count != 0 && $count % $colsPerRow == 0) ) {
if( !isset($_POST["breakOnCat"]) || $currCat != 0 ) {
$productsShown .= "
\n";
$productsCode .= "\n";
}
$currCat = $r["master_categories_id"];
$count = 1;
} else { $count++; }
if( isset( $_POST["linkToProduct"] ) && $r["products_id"] != 9999 ) {
$productsShown .= "
";
$productsCode .= "[url=" . $productLink . $r["products_id"] . "]";
}
$productsShown .= "
";
$productsCode .= "[img]http://www.worldworksgames.com/cat_images/owners/" . $product_image_map[$r["products_id"]] . "[/img]";
if( isset( $_POST["linkToProduct"] ) && $r["products_id"] != 9999 ) {
$productsShown .= "";
$productsCode .= "[/url]";
}
}
?>
Here's what it looks like:
Your code:
Cut and paste the following into the Signature of your profile:
echo "
";
}
?>
Back to pick again
} else {
$count = 0;
$backgrounds = array("#330000", "#333300", "#663300", "#336600", "#003300", "#003333", "#006633", "#003366", "#000033", "#333333", "#666666");
?>
} ?>