Advertisement
Advertisement
| 03.29.2008 at 10:30AM PDT, ID: 23279627 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: |
------view_category.php-----
<form id="compare" name="compare" method="post" action="camparetest.php">
<td colspan="2" align="center"><table width="800" border="0" cellspacing="3" cellpadding="1">
<tr align="center">
<td><table width="100%" cellpadding="5" cellspacing="10" >
<tr>
<?php
$products_endRow = 0;
$products_columns = 4; // number of columns
$products_hloopRow1 = 0; // first row flag
do {
if($products_endRow == 0 && $products_hloopRow1++ != 0) echo "<tr>";
?>
<td valign="top" bgcolor="#FFFFFF" class="productborder"><table width="100%" border="0" cellpadding="3" cellspacing="2">
<tr><td>
<input name="compare[]" type="checkbox" class="emailbox" id="compare[]" value="<?PHP echo $row_products['prod_id']; ?>" />
Compare Item
</td></tr><tr>
<td align="center"><img src="images/products/thumbnail/small/<?php echo htmlentities($row_products['small_thumb']); ?>" alt="<?php echo $row_products['prod_name']; ?>" /></td>
</tr>
<tr>
<td align="left"><a href="view_details.php?prod_id=<?PHP echo $row_products['prod_id']; ?>&cat_id=<?PHP echo $row_products['cat_id']; ?>&cat_parent=<?PHP echo $row_products['cat_parent']; ?>" class="brownlinks"><strong><?php echo htmlentities($row_products['prod_name']); ?></strong></a></td>
</tr>
<tr>
<td align="left">Item #: <?php echo htmlentities($row_products['item_num']); ?></td>
</tr>
<tr>
<td>Price: $<?php echo htmlentities($row_products['price']); ?></td>
</tr>
<?PHP if ($row_products['clearance'] == '1') { ?>
<tr>
<td>Clearance Price: $<?php echo htmlentities($row_products['clear_price']); ?></td>
</tr><?PHP } ?>
<?PHP if ($row_products['weekly_spec'] == '1') { ?>
<tr>
<td>Weekly Special: $<?php echo htmlentities($row_products['spec_price']); ?></td>
</tr><?PHP } ?>
<?PHP if ($row_products['weekly_spec'] == '1') { ?>
<tr>
<td align="left"><strong>
<?PHP
$price = $row_products['price'];
$clearance = $row_products['spec_price'];
$clearprice = $price - $clearance;
$clearpercent = ($clearprice/$price)*100;
echo 'You can save $'.$clearprice.' ('.round($clearpercent,0).'%';
?>
)</strong></td>
</tr>
<?PHP } ?>
</table></td>
<?php $products_endRow++;
if($products_endRow >= $products_columns) {
?>
</tr>
<?php
$products_endRow = 0;
}
} while ($row_products = mysql_fetch_assoc($products));
if($products_endRow != 0) {
while ($products_endRow < $products_columns) {
echo("<td> </td>");
$products_endRow++;
}
echo("</tr>");
}?>
</table></td>
</tr>
<tr align="center">
<td><input type="submit" name="compare" id="compare" value="Compare Items" /></td>
</tr>
</table></td>
</form>
----camparetest.php----------
<?php
session_start();
$compareItems = isset($_REQUEST['compare']) ? $_REQUEST['compare'] : array();
//if $_SESSION["items_to_compare"] not exist or not an array, initialize this
if(!is_array($_SESSION["items_to_compare"]) || !isset($_SESSION["items_to_compare"]))
$_SESSION["items_to_compare"] = array();
//if user has selected something to compare
if(count($compareItems)>0)
{
//add the selected values in the session
if(count($_SESSION["items_to_compare"])>0)
{
$_SESSION["items_to_compare"] = array_merge($compareItems, $_SESSION["items_to_compare"]);
//remove the duplicate entries if any
$_SESSION["items_to_compare"] = array_unique($_SESSION["items_to_compare"]);
}
else
$_SESSION["items_to_compare"] = $compareItems;
}
if(!is_array($_SESSION["items_to_compare"]) || count($_SESSION["items_to_compare"]) == 0) {
echo 'You havent selected any items to compare';
} else {
require_once('../Connections/catalog.php');
mysql_select_db($database_catalog, $catalog);
$query = 'SELECT * FROM tblProducts WHERE prod_id IN ('.implode(',', $_SESSION["items_to_compare"]).')';
$result = mysql_query($query) or die (mysql_error());
while( $row = mysql_fetch_array($result) )
{
$photoId = $row[0];
$caption = $row[1];
$filename = $row[2];
$enddate = $row[3];
$result = array();
}
}
?>
|