$page = "solutions"; $jspopcode = "height=570,width=519,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=1,status=0,toolbar=0"; include("inc/header.php"); //session_destroy(); $arrParams = array(); $arrParams = explode( '/', substr( $_SERVER['PATH_INFO'], 1) ); $zero = $arrParams[0]; $dwa = $arrParams[2]; $cztery = $arrParams[4]; $_REQUEST[$zero] = $arrParams[1]; $_REQUEST[$dwa] = $arrParams[3]; $_REQUEST[$cztery] = $arrParams[5]; function howmany($field) { // have any extras been selected? foreach($_SESSION as $v => $k) { if (substr($v, 0, 3) == "VAR") { if ($k == "1D2D") { } else { $stepQuery .= " AND `" . $k . "`='1'"; } } } if ($field == "400dpi") { $stepQuery .= " AND (`400dpi`='1' OR `600dpi`='1')"; } elseif ($field == "1D2D") { $stepQuery .= " AND (`1DBarcodes`='1' AND `2DBarcodes`='1')"; } else { $stepQuery .= " AND `" . $field . "`='1'"; } // find variations of this product $variPrids = ""; $result = sql("S", "variations", "`type`='1' AND `availableOnWeb`='1'" . $stepQuery, "", "", ""); while($row = @mysql_fetch_array($result, MYSQL_ASSOC)) { $variPrids .= $row['prid'] . ','; } $variPrids = substr($variPrids, 0, -1); $variNum = @mysql_num_rows($result); if ($variNum != 0) { // find how many products actually meet the criteria $result = sql("S", "products", "`discontinued`='0' AND `gid`='" . $_SESSION['gid'] . "' AND `prid` IN (" . $variPrids . ")", "", "", ""); $prodNum = @mysql_num_rows($result); } else { $prodNum = 0; } // echo $prodNum; // Print the number of reuslts found on each row return $prodNum; } ?>
| Solution Builder |
|
// if back is pressed then unset the last variable -----------------------
if (isset($_REQUEST['unset'])) { $value = $_REQUEST['unset']; unset($_SESSION[$value]); }
// if going forward then set the variable into the session
foreach($_REQUEST as $v => $k) {
if (substr($v, 0, 3) == "VAR" AND $k != "np") { $_SESSION[$v] = $k; $_SESSION['laststep'] = $v; }
}
// get the gid if this is the first step
if (isset($_REQUEST['gid'])) { $_SESSION['gid'] = $_REQUEST['gid']; }
// get whatever step we are on
if (isset($_REQUEST['step'])) { $_SESSION['step'] = $_REQUEST['step']; }
// have any extras been selected?
foreach($_SESSION as $v => $k) {
if (substr($v, 0, 3) == "VAR") {
if ($k == "400dpi") {
$stepQuery .= " AND (`400dpi`='1' OR `600dpi`='1')";
} elseif ($k == "1D2D") {
$stepQuery .= " AND (`1DBarcodes`='1' AND `2DBarcodes`='1')";
} else {
$stepQuery .= " AND `" . $k . "`='1'";
}
}
}
// find variations of this product
$variPrids = "";
$result = sql("S", "variations", "`type`='1' AND `availableOnWeb`='1'" . $stepQuery, "", "", "");
while($row = @mysql_fetch_array($result, MYSQL_ASSOC)) {
$variPrids .= $row['prid'] . ',';
}
$variPrids = substr($variPrids, 0, -1);
$variNum = @mysql_num_rows($result);
// find how many products actually meet the criteria
$result = sql("S", "products", "`discontinued`='0' AND `gid`='" . $_SESSION['gid'] . "' AND `prid` IN (" . $variPrids . ")", "", "", "");
$row = @mysql_fetch_array($result, MYSQL_ASSOC);
$prodNum = @mysql_num_rows($result);
// --------- Group 1 --------------------------------------------------------------------
if ($_SESSION['gid'] == 1) {
// Make sure there are some products
if ($_REQUEST['cmd'] != "view") { ?>
We have found echo $prodNum; ?> products that match your criteria so far, follow the options below to narrow it down or click here to view them:
} else {
echo 'Below are product matching your requirements. '; } // show products if ($_REQUEST['cmd'] == "view") { echo '
What kind of Barcodes do you want to read? } else { ?> What kind of Scanner connection do you require? } ?> // --------- Group 2 -------------------------------------------------------------------- } elseif ($_SESSION['gid'] == 2) { // Make sure there are some products if ($_REQUEST['cmd'] != "view") { ?> We have found echo $prodNum; ?> products that match your criteria so far, follow the options below to narrow it down or click here to view them: } else { echo 'Below are product matching your requirements. '; } // show products if ($_REQUEST['cmd'] == "view") { echo '
Which type of Keypad would you like? } elseif ($_SESSION['step'] == 3) { ?> Which type of Screen do you prefer? } elseif ($_SESSION['step'] == 2) { ?> Which Operating System do you prefer? } elseif ($_SESSION['step'] == 1) { ?> Which Data Capture Method do you want? } else { ?> What kind of Mobile Computer are you looking for? } // --------- Group 5 -------------------------------------------------------------------- } elseif ($_SESSION['gid'] == 5) { // Make sure there are some products if ($_REQUEST['cmd'] != "view") { ?> We have found echo $prodNum; ?> products that match your criteria so far, follow the options below to narrow it down or click here to view them: } else { echo 'Below are product matching your requirements. '; } // show products if ($_REQUEST['cmd'] == "view") { echo '
What resolution of printer do you require? } elseif ($_SESSION['step'] == 2) { ?> What width of label do you want to print? } elseif ($_SESSION['step'] == 1) { ?> What type of Printer do you require? } else { ?> What kind of Printer do you require? } ?> } else { session_destroy(); ?> This has been designed to help choose the correct equipment for a specified requirement by offering suitably matched equipment from the range displayed on the website. It is intended only as a guide. Jivili offers carefully selected equipment that has been tried and tested in operation and as such do not list every piece of equipment by every manufacturer on this site. We only offer the equipment that we know to be reliable, value for money and that we can support with confidence. If you cannot find what you are looking for then please contact us with your exact requirements and we will use our expertise to find you the best solution. What are you looking for? } ?> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||