close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

remove background and hover from img

Thread began 1/20/2011 3:23 pm by segalmedia367166 | Last modified 1/24/2011 4:11 pm by segalmedia367166 | 3328 views | 13 replies

segalmedia367166

code from details.php

Hey Neil,

Rather than me destroy my site I copied the code from my detail.php file. Perhaps you can direct me to the correct part of my page to add a white background.

<?php require_once('../../../Connections/PowerStoreConnection.php'); ?>
<?php require_once('../../../WA_DigitalFilePro/HelperPHP.php'); ?>
<?php
if(!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") {
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
$WAAddToCart = new WA_Include('../shopping_cart/add_to_cart.php');
require($WAAddToCart->BaseName);
$WAAddToCart->Initialize(true);
?>
<?php
$ParamProductID_WADAProducts = "-1";
if(isset($_GET['ProductID'])) {
$ParamProductID_WADAProducts = (get_magic_quotes_gpc()) ? $_GET['ProductID'] : addslashes($_GET['ProductID']);
}
mysql_select_db($database_PowerStoreConnection, $PowerStoreConnection);
$query_WADAProducts = sprintf("SELECT * FROM ps4_products WHERE ProductID = %s", GetSQLValueString($ParamProductID_WADAProducts, "int"));
$WADAProducts = mysql_query($query_WADAProducts, $PowerStoreConnection) or die(mysql_error());
$row_WADAProducts = mysql_fetch_assoc($WADAProducts);
$totalRows_WADAProducts = mysql_num_rows($WADAProducts);
?>
<html>
<head>
<?php echo($WAAddToCart->Head); ?>
<link rel="stylesheet" type="text/css" href="css/products_detail.css"/>
<title><?php echo str_replace("|","<br />",$row_WADAProducts["ProductName"]); ?></title>
</head>
<body>
<a name="top"></a>
<h1 class="larger">
<span id="WADAPageTitle"><?php echo str_replace("|","<br />",$row_WADAProducts["ProductName"]); ?></span>
<span class="price">
<span class="ProductPrice">Price: $<span id="ProductPrice"><?php echo number_format($row_WADAProducts["ProductPrice"], 2); ?></span></span>
<span id="retailRow" class="ProductRetailPrice errorText" <?php echo((!empty($row_WADAProducts["ProductRetailPrice"]) && $row_WADAProducts["ProductRetailPrice"] > $row_WADAProducts["ProductPrice"])?' style="display:block"':' style="display:none"'); ?>>Retail Price: $<span id="ProductRetailPrice" class="strike"><?php echo number_format($row_WADAProducts["ProductRetailPrice"], 2); ?></span> (Save $<span id="ProductRetailPriceSave"><?php echo number_format(floatval($row_WADAProducts["ProductRetailPrice"]) - floatval($row_WADAProducts["ProductPrice"]), 2); ?></span>)</span>
</span>
</h1>

<div class="contentBox ps_pod1 borderColor block">
<?php if ($totalRows_WADAProducts > 0) { // Show if recordset not empty ?>
<div class="productDetailWrapper">
<div class="image">
<div class="imageWrapper">
<?php
$imgWidth = 300;
$imgSrc = "../../../" . ($WAGLOBAL_Images_Folder) . ((isset($row_WADAProducts['ProductImage']) && $row_WADAProducts['ProductImage'] != "default-product.png")?$row_WADAProducts['ProductImage']:$row_WADAProducts['ProductThumb']);
$imgSrc = abs2rel(rel2abs($imgSrc,dirname(__FILE__)),dirname($_SERVER['PHP_SELF']));
$WAResultsImage = new WA_Include('scripts/resize_image.php');
require($WAResultsImage->BaseName);
$WAResultsImage->Initialize(true);
?>
<img class="WADAResultThumb" border="0" src="<?php echo(abs2rel(rel2abs($WAResultsImage->Body,dirname($_SERVER['PHP_SELF'])),dirname(__FILE__))); ?>" id="ProductImage" />
</div>
</div>
<div class="addToCart"><?php echo($WAAddToCart->Body); ?></div>
</div>
<div id="ProductLongDesc"><?php echo wa_evaluate($row_WADAProducts["ProductLongDesc"]); ?></div>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_WADAProducts == 0) { // Show if recordset empty ?>
<em>No product found.</em>
<?php } // Show if recordset empty ?>
</div>
<div class="productDetails-bottomShadow"></div>

<div class="bottomLinkWrapper">
<div class="links">
<span class="button"><a href="../../../products_results.php" class="ps_buttons">Back to Product Catalog</a></span>
</div>
</div>
</body>
</html>
<?php
if(isset($WADAProducts)) mysql_free_result($WADAProducts); ?>

Thanks,

Lisa

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...