Current File : /home/bassmoto/public_html.oct5/cardetail.phpold
<?php
function extractText($array){
	if(count($array) <= 1){
		//we only have one tag to process!
		for ($i = 0; $i<count($array); $i++){
			$node = $array[$i];
			$value = $node->get_content();
		}
		return $value;
	} 
	
}	
?>
<html>
<head>
	<title>Bass Sports Motor</title>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
	<META NAME="DESCRIPTION" CONTENT="vehicle sales website">
	<META NAME="KEYWORDS" CONTENT="automotive, car">

	<style>
		.BlackLink {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:bold; text-decoration:none}
		a.BlackLink:hover {text-decoration: underline}
		
		.BlackLinkB {font-family:tahoma, verdana, helvetica, arial; font-size:13; color:black; font-weight:bold; text-decoration:none}
		a.BlackLinkB:hover {text-decoration: underline}
		
		.BlackLinkC {font-family:tahoma, verdana, helvetica, arial; font-size:13; color:white; font-weight:bold; text-decoration:none}
		a.BlackLinkC:hover {text-decoration: underline}

		.BlueLink {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:blue; font-weight:bold; text-decoration:underline}
		a.BlueLink:hover {text-decoration: underline}

		.RedLink {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:red; font-weight:bold; text-decoration:none}
		a.RedLink:hover {text-decoration: underline}

		a.CatLinks {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:white; font-weight:bold; text-decoration:none}
		a.CatLinks:hover {text-decoration:underline}

		a.SubCatLinks {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:#878888; font-weight:normal; text-decoration:none}
		a.SubCatLinks:hover {text-decoration:underline}
		
		a.SubCatLinksB {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:normal; text-decoration:none}
		a.SubCatLinksB:hover {text-decoration:underline}

		.TitleLinks {font-family:tahoma, verdana, helvetica, arial; font-size:12; color:black; font-weight:bold; text-decoration:none}
		a.TitleLinks:hover {text-decoration:underline}

		.ItemText {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:regular; text-decoration:none}
	
		body {background-color:white; font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; font-weight:regular; text-align:left}

		td {font-family:tahoma, verdana, helvetica, arial; font-size:11; font-weight:regular; text-decoration:none}

		.sm {font-family:tahoma, verdana, helvetica, arial; font-size:11}

		input, select, textarea {font-family:tahoma, verdana, helvetica, arial; font-size:11; color:black; border-width:1; border-color:black}

	</style>

</head>

<body bgcolor="#CCCCCC" background="images/bg.gif" topmargin=0>
<table width="693" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr valign="top">     
          <td width="693" colspan="2"><img src="images/logo.jpg" width="693" height="287"></td>
     
  </tr>
  
  <tr height="800"> 
  
  <td bgcolor="#FFFF01" width="60%" align="center" valign="top">

<?php

$file = $_GET["file"];
if ($file == ""){

	echo "<h2>You didn't choose a file name!</h2>";
	echo "<a href=\"car.php\">Go back to index and choose a file</a>";
	exit;
} else {
	
	$filename = "./xml/".$file;
	$xml = domxml_open_file($filename);
	$root = $xml->root();
	$id = $root->get_attribute("id");

	$mimage_array = $root->get_elements_by_tagname("mimage");	
    $mainimage = extractText($mimage_array); 

    $price_array = $root->get_elements_by_tagname("price");	
    $price = extractText($price_array); 
    
    $name_array = $root->get_elements_by_tagname("vname");	
    $name = extractText($name_array); 
    
    $mileage_array = $root->get_elements_by_tagname("mileage");	
    $mileage = extractText($mileage_array); 

	$stock_array = $root->get_elements_by_tagname("stockNum");	
    $stocknumber = extractText($stock_array); 
	
}
?>      
 
   <table cellspacing="0" cellpadding="0">
		    <tr>
		      
		      <td background="images/box_title_bg.gif"><img src="images/box_title_vehiclepictures.gif"></td>
		      
		    </tr>
<?php

$images_array = $root->get_elements_by_tagname("image");
foreach ($images_array as $image) {
   	       
?>
<tr height="10"><td><p></p></td></tr>
 		    <tr>
		       <td><img src="images/<?php echo $image->get_content(); ?>" border="0"></a></td>
            </tr>
<?php

}
?>
		    
            
	</table>	                 
   </td> 
  
   <td bgcolor="#FFFF01" width="40% align="center" valign="top">
    
		  <table cellspacing="0" cellpadding="0">
		    
		    <tr><td background="images/title1_bg.gif" ><img src="images/tab_generalinfo.gif"></td></tr>
		  
          <tr><td>
		  <b><?php echo $name; ?></b><br>

		  Price: <b>$<?php echo $price; ?></b><br>
		  <b>Stock #:</b> <?php echo $stocknumber; ?><br>		  <b>VIN #:</b> 3G2JD12T41S145837<br>		  <b>Status:</b> For Sale<br>		  <b>Addition Date:</b> January 20, 2006<br><br>

		  <b>Mileage:</b> <?php echo $mileage; ?> <br>		  <b>Type:</b> Coupe<br>		  <b>Exterior Color:</b> BLACK<br>		  <b>Interior Color:</b> BLACK<br>		  <b>Transmission:</b> Automatic<br>		  		  		  
                  
          </td></tr>
		  
		</table>  
    </td>
  </tr>

                 
   	          
   	         
  <tr> 
    <td bgcolor="#000000" colspan="2"><table width="693" border="0" align="center" cellpadding="6" cellspacing="0">
        <tr> 
          <td width="223" height="31" bgcolor="#CCCCCC"><font color="#000000"><strong>Copyright 
            2005- 2006 
            Al Bass            </strong></font></td>
          <td width="534" bgcolor="#000000"><div align="center"><a href="index.php" class="CatLinks">home</a> 
            | <a href="advanced.php" class="CatLinks">search</a> | <a href="login.php" class="CatLinks">login</a> 
            | <a href="r1.php" class="CatLinks">register</a> | <a href="mailto:mbz600sel@yahoo.com" class="CatLinks">contact 
            us</a> | <a href="agreement.php" class="CatLinks">terms of use</a></div></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>

</html>