Jump to content

Recommended Posts

My code doesn't seem to want to display the images in the location provided.  I get renderings but floorplans are not working, any suggestions in what i am doing wrong?

 

I checked permissions, i made sure the file exists, and thats what my code is suppose to be doing is if it exists than print the file, which i t does

 

 

 

 

 

 

 

 

 

<?php
		  	print "<h1><img src='http://homes.pacificscene.com/images/browse/logos/" . $row[0] . ".jpg' alt='" . $row[1] . "' /></h1>";
		  	print "<p>" . $row[6]; 
			$linkresult = mysql_query("SELECT * from psh_commlinks where commID = '" . $row[0] . "'");
			while ($linkrow = mysql_fetch_row($linkresult)) {
					print "<br />For more information about " . $linkrow[1];
					print ", please visit:<br /><a href='" . $linkrow[2] . "'>" . $linkrow[2] . "</a>.";
			}
			print "</p>";
			if (file_exists("http://homes.pacificscene.com/browse/features/" . $row[10])) {
				print "<p><a href='features/" . $row[10] . "' target='_blank'>View Features List</a></p>";
			}
			if (file_exists("http://homes.pacificscene.com/browse/brochures/" . $row[8])) {
				print "<p><a href='brochures/" . $row[8] . "' target='_blank'>Download PDF brochure</a></p>";
			}
			$query = "SELECT * from psh_siteplans WHERE communityID = '$ID' ORDER BY orderID";
			  	 $result = mysql_query($query);
				 while ($row = mysql_fetch_row($result)) {
					print "<form action=" . $_SERVER['PHP_SELF'] . "?ID=" . $ID . "&siteID=" . $row[0] . " method='POST'>";
					print "<table border='0' cellspacing='0' cellpadding='5'><tr>";
  	                  	$window = "'http://homes.pacificscene.com/popup.php?type=renderings&ID=" . $row[0] . "','popUp','width=775,height=550'";

					print "<td width='206' rowspan='8' valign='top'>";
					print '<a href="javascript:;"><img border="0" src="http://homes.pacificscene.com/images/browse/renderings/' . $row[0] . '-TH.jpg" onclick="MM_openBrWindow(' . $window . ')" /></a>';
					print "</td>";
					print "<td width='135'><strong>Model</strong></td>";
                  		print "<td>" . $row[1] . "</td></tr>";
  						print "<tr><td><strong>Appx Sq. Ft</strong>.</td>";
                  		print "<td>" . $row[2] . "</td></tr>";
					print "<tr><td><strong>Stories</strong>.</td>";
                  		print "<td>" . $row[3] . "</td></tr>";
					print "<tr><td><strong>Bedrooms</strong>.</td>";
                  		print "<td>" . $row[4] . "</td></tr>";
					print "<tr><td><strong>Baths</strong>.</td>";
                  		print "<td>" . $row[5] . "</td></tr>";
  						print "<tr><td><strong>Garage</strong>.</td>";
                  		print "<td>" . $row[6] . "</td></tr>";

					$window = "'http://homes.pacificscene.com/popup.php?type=floorplans&ID=" . $row[0] . "','popUp','width=825,height=625,scrollbars=yes'";
					if (file_exists("http://homes.pacificscene.com/images/browse/floorplans/" . $row[0] . ".jpg")) {
						print '<tr><td><a href="javascript:;" onclick="MM_openBrWindow(' . $window . ')">Floorplan</td></a>';
						print "<td> </td></tr>";
					}
					$window = "'http://homes.pacificscene.com/popup.php?type=renderings&ID=" . $row[0] . "','popUp','width=775,height=550'";
					if (file_exists("http://homes.pacificscene.com/images/browse/renderings/" . $row[0] . "-TH.jpg")) {
					print '<tr><td><a href="javascript:;" onclick="MM_openBrWindow(' . $window . ')">Enlarged Rendering                         </td></a>';
					print "<td> </td></tr>";
				}                  			
    					print "</table><br />";
				}
		  ?>

Link to comment
https://forums.phpfreaks.com/topic/66894-solved-image-not-displaying/
Share on other sites

<?php

$window = "'http://homes.pacificscene.com/popup.php?type=floorplans&ID=" . $row[0] . "','popUp','width=825,height=625,scrollbars=yes'";
					if (file_exists("http://homes.pacificscene.com/images/browse/floorplans/" . $row[0] . ".jpg")) {
						print '<tr><td><a href="javascript:;" onclick="MM_openBrWindow(' . $window . ')">Floorplan</td></a>';
						print "<td> </td></tr>";
?>

 

This piece of code is what i am having the must trouble with. Renderings work correctly, but the floorplans aren't.

From the source:

 

<a href="javascript:;">
<img border="0" src="http://homes.pacificscene.com/images/browse/renderings/33-TH.jpg" onclick="MM_openBrWindow(http://homes.pacificscene.com/popup.php?type=renderings&ID=33','popUp','width=775,height=550')" /></a>

 

Move the onclick to the link instead of putting it in your image tag.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.