Advertisement
| 10.07.2008 at 12:38PM PDT, ID: 23795026 |
|
[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: |
<?php
$heading='Product Viewer';
require './include/prodview_common.php';
$totalimages=0;
$product='';
$productArray = array();
$productDescriptionArray = array();
//if(isset($_GET['name'])) {
$product=$_GET['name'];
if(($link=mysql_connect("xxx.xxxx","xxxxx","xxxx"))!=false) {
if(mysql_select_db("ptcommerce_products")!=false) {
$result=mysql_query("SELECT PRODUCT_ID, TYPE FROM new_products");
$totalimages = mysql_num_rows($result);
while ($tempProd = mysql_fetch_row($result))
{
array_push($productArray, $tempProd[0]);
array_push($productDescriptionArray, $tempProd[1]);
}
} else
echo "FAILURE!!";
mysql_close($link);
}
else
echo "Could not connect";
//echo str_replace("-", "/-", $product);
//$filestem=preg_replace('/[^a-z|0-9]++/i','', $product);
$filestem = $product;
$index=@$_GET['index'];
if($index<1) $index=1; elseif($index>$totalimages) $index=$totalimages;
$numberArray=array();
$zeroFill='0';
while($i<$totalimages) {
$i++;
if($i==10) $zeroFill='';
$numberArray[$i]=$zeroFill.$i;
}
outputHeaderBegin($heading,2);
//echo '<link rel=stylesheet type="text/css" href="/css/product.css">';
echo '<script type="text/javascript" src="/js/lib/imageViewerJB.js"></script>';
echo '<script type="text/javascript">';
echo 'var imageViewer;';
echo 'function initialize() {';
echo 'imageViewer={'.
'callbackPeriod:80,'.
'fixedPointPlaces:2,'.
'velocityDecayShift:2,'.
'driftSpeed:3,'.
'thumbHeight:64,'.
'thumbWidth:64,'.
'thumbSeperator:2,'.
'thumbBackgroundColor:\'white\','.
'thumbBorderThickness:2,'.
'thumbBorderColor:\'black\','.
'selectedBorderThickness:3,'.
'selectedBorderColor:\'blue\','.
'hoverBorderColor:\'#BD2226\','.
'emptyThumbColor:\'#666666\','.
'emptyThumbImage:\'/images/style/empty.gif\','.
'scrollBlock:document.getElementById(\'scrollBlock\'),'.
'scrollBlock:document.getElementById(\'scrollBlock2\'),'.
'viewImgTag:document.getElementById(\'viewImgTag\'),'.
'arrowLeftImgTag:document.getElementById(\'arrowLeftImgTag\'),'.
'arrowRightImgTag:document.getElementById(\'arrowRightImgTag\'),'.
'arrowLeftImages:[\'/images/style/leftArrowDi.gif\',\'/images/style/leftArrow.gif\',\'/images/style/leftArrowHi.gif\'],'.
'arrowRightImages:[\'/images/style/rightArrowDi.gif\',\'/images/style/rightArrow.gif\',\'/images/style/rightArrowHi.gif\'],'.
'thumbImages:[';
foreach($productArray as $product) echo '\'http://10.1.0.2/Plastic-Enclosures-Thumbs/'.$product.'.jpg\',';
echo '\'\'],viewImages:[';
foreach($productArray as $product) echo '\'http://10.1.0.2/Plastic-Enclosures-Thumbs/'.$product.'.jpg\',';
echo '\'\'],totalImages:'.$totalimages.','.'currentImage:'.$index.',';
echo 'link_url:[';
foreach($productArray as $product) echo '\'http://10.1.0.2/Plastic-Enclosures/'.$product.'.html\',';
echo '\'\'],';
echo 'link_text:[';
foreach($productArray as $product) echo '\''.$product.'\',';
echo '\'\'],';
echo 'link_description:[';
foreach($productDescriptionArray as $product) echo '\''.$product.'\',';
echo '\'\']';
echo '};';
echo 'initializeImageViewer.call(imageViewer);';
echo '}';
echo '</script>';
outputHeaderEnd('onload="initialize();"',1);
outputFormatWideCenterStart();
echo '<table ><tr>';
echo '<td valign=top colspan=2>';
echo '<table style="width:100%;"><tr>';
echo '<td style="width: 32px;border:1px solid black;"><img id=arrowLeftImgTag style="cursor:pointer;" src="/images/style/leftArrowDi.gif" alt=""></td>';
echo '<td align=left style="border:1px solid black;"><div id=scrollBlock style="height:92px;width:600px;"><div id=scrollBlock2 style="height:50px;width:50px;"></div></div></td>';
echo '<td style="width: 32px;border:1px solid black;"><img id=arrowRightImgTag style="cursor:pointer;" src="/images/style/rightArrowDi.gif" alt=""></td>';
echo '</tr></table>';
echo '<p style="clear:both;"><font face="Arial">New Products: Click on the product name to goto the product page.</font></p>';
echo '</td></tr><tr><td class=imageBox align=center valign=middle colspan=2>';
echo '<img id=viewImgTag src="/images/style/empty.gif" alt="">';
echo '</td></tr></table>';
|
Advertisement