All pastes #746764 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-10-23 13:46 UTC
rendered paste body
<?php require_once('Connections/stoneply.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $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;
}
}

mysql_select_db($database_stoneply, $stoneply);
$query_typeSelect = "SELECT DISTINCT type_of_stone FROM stones ORDER BY type_of_stone ASC";
$typeSelect = mysql_query($query_typeSelect, $stoneply) or die(mysql_error());
$row_typeSelect = mysql_fetch_assoc($typeSelect);
$totalRows_typeSelect = mysql_num_rows($typeSelect);

mysql_select_db($database_stoneply, $stoneply);
$query_colorSelect = "SELECT DISTINCT country_of_origin FROM stones ORDER BY country_of_origin ASC";
$colorSelect = mysql_query($query_colorSelect, $stoneply) or die(mysql_error());
$row_colorSelect = mysql_fetch_assoc($colorSelect);
$totalRows_colorSelect = mysql_num_rows($colorSelect);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Stoneply | A Stromberg Company</title>
<link rel="stylesheet" href="styles.css" type="text/css" media="screen" />
<meta name="robots" content="all" />
<meta name='keywords' content='' />
<link rel="shortcut icon" href="./images/favicon.ico" type="image/x-icon" />
<script src="./includes/sifr.js" type="text/javascript"></script>
<script src="./includes/sifr-addons.js" type="text/javascript"></script>
<!--[if lt IE 7]><script src="./ie7/ie7-standard-p.js" type="text/javascript"></script><![endif]-->
<!--[if lt IE 7]>
<style type="text/css">
div#container{background:#fff url('./images/left.jpg') repeat-y bottom left; width:830px;}
div#footer{clear:both; text-align:center; margin:0 -20px 0 22px;  padding:0 0 5px 0;background:#efe9d6; border:1px solid #7a6236;border-bottom:none;width:auto;} 
</style><![endif]-->
<script src="includes/sifrstatements.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<div id="left">
<div id="headermenu"> <img class="stoneply_logo" src="./images/stoneply_logo.jpg" alt="StonePly Logo" />
<h1><a href="http://www.stoneply.com" name="top" id="top" title="StonePly">StonePly</a></h1>
<br />
<br class="clear" />
<p>A Division of</p>
<img class="stromberg_logo" src="./images/stromberg_logo.jpg" alt="Stomberg Logo" />
<h2><a href="http://www.4stromberg.com">The Stromberg Group</a></h2>
</div>
<div id="stoneselect">
<h3>StoneSelect<sup>&copy;</sup></h3>
<form action="" enctype="multipart/form-data" id="form_stoneselect" method="post">
<fieldset>
<label>Color</label>
<select  name="color">
<?php
do {  
?>
<option value="<?php echo $row_colorSelect['country_of_origin']?>"><?php echo $row_colorSelect['country_of_origin']?></option>
<?php
} while ($row_colorSelect = mysql_fetch_assoc($colorSelect));
$rows = mysql_num_rows($colorSelect);
if($rows > 0) {
mysql_data_seek($colorSelect, 0);
$row_colorSelect = mysql_fetch_assoc($colorSelect);
}
?>
</select>
				<label>Type</label>
				<select  name="">
				  <?php
do {  
?>
				  <option value="<?php echo $row_typeSelect['type_of_stone']?>"><?php echo $row_typeSelect['type_of_stone']?></option>
				  <?php
} while ($row_typeSelect = mysql_fetch_assoc($typeSelect));
  $rows = mysql_num_rows($typeSelect);
  if($rows > 0) {
      mysql_data_seek($typeSelect, 0);
	  $row_typeSelect = mysql_fetch_assoc($typeSelect);
  }
?>
					
</select>
<input class="find" type="submit" id="find" value="Find" title="Find" name="Find" />
</fieldset>
</form>
<div id="process">
<h2>See our Process</h2>
<p><a href="" title="Process 1"><img src="./images/process_1.jpg" alt="Process 1" /></a>&nbsp;<a href="" title="Process 2"><img src="./images/process_2.jpg" alt="Process 2" /></a></p>
</div>
</div>
<div id="featured">
<div id="learn_textures"> <img src="./images/special_textures_img.jpg" alt="Learn more about special textures" /> <img class="text" src="./images/special_textures.jpg" alt="Learn more about special textures" />
<p class="learn"><a href="" title="Learn more about special textures">Learn More</a></p>
</div>
<div id="learn_special"> <img src="./images/special_applications.jpg" alt="Learn more about  Special Applications" />
<p class="learn"><a href="" title="Learn more about special applications">Learn More</a></p>
</div>
</div>
</div>
<div id="main">
<div id="headernav">
<p><a href="samples.htm" title="Click here to get samples">Get Samples</a>&nbsp;|&nbsp; <a href="contact_us.htm" title="Click here to contact us">Contact Us</a>&nbsp;|&nbsp;<a href="stoneply_sitemap.htm" title="Click here to view the site map">Site Map</a></p>
<dl>
<dt>Navigation</dt>
<dd>
<?php include 'includes/main_nav.htm'; ?>
</dd>
</dl>
</div>
<div id="featured_project"> <img src="./images/featured_project.jpg"  alt="Featured Project"/></div>
<div id="content">
</div>
<div id="footer"><p class="top"><img src="./images/arrow_px_up.gif" alt="Back to top" />&nbsp;<a href="#top" title="Back to top">Back to top</a></p>
<p id="copy">&copy; 2007 <a href="http://www.4stromberg.com" title="The Stromberg Group">The Stromberg Group</a>. All rights reserved</p>	
</div>
</div>
</body>
</html>
<?php
mysql_free_result($typeSelect);
mysql_free_result($colorSelect);
?>