All pastes #750424 Raw Edit

Mine

public text v1 · immutable
#750424 ·published 2007-10-26 14:31 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);
mysql_select_db($database_stoneply, $stoneply);
$query_indStone = "SELECT * FROM stones WHERE ID = 1";
$indStone = mysql_query($query_indStone, $stoneply) or die(mysql_error());
$row_indStone = mysql_fetch_assoc($indStone);
$totalRows_indStone = mysql_num_rows($indStone);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<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; width:auto;} 
</style><![endif]-->
<style type="text/css">
div#content ul#stoneinfo li{list-style-type:none;}
strong{font-weight:bold;font-size:14px;}
</style>
<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="../stoneselect_results.php" enctype="multipart/form-data" id="form_stoneselect" method="post">
				<fieldset>
                <legend>Filter by:</legend>
				<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="type">
					<?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="../process.php" title="Process 1"><img src="../images/process_1.jpg" alt="Process 1"></a>&nbsp;<a href="../process.php" 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">
		<?php include '../includes/main_nav.htm'; ?>
		<div id="featured_project"> <img src="../images/featured_project.jpg"  alt="Featured Project"/></div>
		<div id="content">
			<ul id="stoneinfo">
            <?php do { ?>
                <li><strong>Name:</strong> <?php echo $row_indStone['title']; ?></li>
                <li><img src="../<?php echo $row_indStone['picture']; ?>"></li>
                <li><strong>Other names:</strong> <?php echo $row_indStone['pseudonymes']; ?></li>
                <li><strong>Country of Origin:</strong> <?php echo $row_indStone['country_of_origin']; ?></li>
                <li><strong>Application:</strong> <?php echo $row_indStone['application']; ?></li>
                <li><strong>Texture:</strong> <?php echo $row_indStone['texture']; ?></li>
                <li><strong>Availability:</strong> <?php echo $row_indStone['availibility']; ?></li>
                <li><strong>Type of Stone:</strong> <?php echo $row_indStone['type_of_stone']; ?></li>
                <li><strong>Uses:</strong> <?php echo $row_indStone['keywords']; ?></li>
                <li><strong>Color:</strong> <?php echo $row_indStone['full_color_name']; ?></li>
              <?php } while ($row_indStone = mysql_fetch_assoc($indStone)); ?>
			</ul>
		</div>
  </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>		<dl>
			<dt>Useful Links</dt>
			<dd>
				<ul>
					<li class="first"><a href="../samples.php" title="Click here to get samples">Get Samples</a></li>
					<li><a href="../contact_us.php" title="Click here to contact us">Contact Us</a></li>
					<li><a href="../stoneply_sitemap.php" title="Click here to view the site map">Site Map</a></li>
				</ul>
			</dd>
		</dl>
		<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);
mysql_free_result($indStone);
?>