Jump to content

[SOLVED] two different layouts in Firefox og Internet Explorer?


JJohnsenDK

Recommended Posts

Hey

 

I created this photo album for my website it works great in IE but when i test it in FF it looks bad, and i mean REAL bad.

 

Here is the link for the album:

 

http://www.sifnet.dk/gallery.php?action=2&cat=6

 

And the code im using. The code marked with ///, is where the script screw up. I think it something with the div classes im using, maybe FF reacts different end IE?

 

<?php
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
include('mysql_connect.php');
include('functions2.php');

if($_GET['action'] == "3"){
	// Adder brugerens IP adresse til brugeren.
	$ip = $_SERVER['REMOTE_ADDR'];		
	mysql_query("INSERT INTO `".$db_prefix."counter` SET `counter_counter` = '1', `counter_user_ip` = '$ip', `counter_dato` = NOW(), `counter_pic` = '".$_GET['no']."'");
}

$picQuery = mysql_query("SELECT download_title, download_url, download_description FROM ".$db_prefix."downloads WHERE download_id = '".$_GET['no']."' AND download_cat = '".$_GET['cat']."'");
$picRow = mysql_fetch_array($picQuery);

$countQuery = mysql_query("SELECT COUNT(download_id) AS total FROM ".$db_prefix."downloads WHERE `download_cat` = '".$_GET['cat']."'");
$countRow = mysql_fetch_array($countQuery);

$searchQuery = mysql_query("SELECT download_id, download_url, download_cat, download_title, download_description FROM ".$db_prefix."downloads WHERE `download_cat` = '".$_GET['cat']."'");

$catNameQuery = mysql_query("SELECT download_cat_name, download_cat_description FROM ".$db_prefix."download_cats WHERE download_cat_id = '".$_GET['cat']."'");
$catNameRow = mysql_fetch_array($catNameQuery);

$catQuery = mysql_query("SELECT download_cat_name, download_cat_description, download_cat_id FROM ".$db_prefix."download_cats");

function get_filetype($filepath){
return strtolower(substr($filepath, strpos($filepath, strrchr($filepath, "."))));
}

function checkCategoryForImages($cat){
$checkQuery = mysql_query("SELECT download_url FROM fusion_downloads WHERE download_cat = '$cat'");
while($checkRow = mysql_fetch_array($checkQuery)){
	if(get_filetype($checkRow['download_url']) == ".jpg"){
		$isImage = 1;
	}else{
		$isImage = 0;
	}		
}
return $isImage;
}

function getImageUrl($id){
$query = mysql_query("SELECT download_url FROM fusion_downloads WHERE `download_id` = '$id'");
$row = mysql_fetch_array($query);
return $row['download_url'];
}
?>
<table width='100%' class='storybox'>
    <tr>
        <td>
            <table width='100%'>
                <tr align='left' class='table-cellpic'>
                    <th colspan='3'>Billedegalleri</th>
                </tr>
            </table>
		<div class="gallery_easy_nav">
			<?php
				if($_GET['action'] == "1"){
					echo "<a href='gallery.php?action=1'>Billedegalleri</a>";
				}else if($_GET['action'] == "2"){
					echo "<a href='gallery.php?action=1'>Billedegalleri</a> --> <a href='gallery.php?action=2&cat=".$_GET['cat']."'>".$catNameRow['download_cat_name']."</a>";
				}else if($_GET['action'] == "3"){
					echo "<a href='gallery.php?action=1'>Billedegalleri</a> --> <a href='gallery.php?action=2&cat=".$_GET['cat']."'>".$catNameRow['download_cat_name']."</a>  --> <a href='gallery.php?action=3&no=".$_GET['no']."&cat=".$_GET['cat']."'>".$picRow['download_title']."</a>";
				}
			?>
		</div>
		<div class="gallery_main">
			<div class="gallery_header">
				<?php
					if($_GET['action'] == "1"){
						echo "";
					}else if($_GET['action'] == "2"){
						echo "";
					}else if($_GET['action'] == "3"){
						echo "<table width='100%'><tr><td class='gallery_header_font'>".$picRow['download_title']."</td><td align='right'><a href='".getImageUrl($_GET['no'])."' target='_BLANK'>Fuld størrelse</a></td></tr></table>";
				 	}
				 ?>
			</div>
			<div class="gallery_picture">
				<?php
					if($_GET['action'] == "1"){
						echo "<table width='100%'>";
						echo "<tr><td width = '200'><b>Kategori</b></td><td><b>Beskrivelse</b></td></tr>";			
						while($catRow = mysql_fetch_array($catQuery)){
							if(checkCategoryForImages($catRow['download_cat_id']) == 1){
								echo "<tr><td><p><a href='gallery.php?action=2&cat=".$catRow['download_cat_id']."'>".$catRow['download_cat_name']."</a></p></td><td>".$catRow['download_cat_description']."</td></tr><tr><td colspan='2'><img src='images/black.jpg' height='1' width='100%' alt='' /></td></tr>";
							}else{
							}
						}
						echo "</table>";
					}else if($_GET['action'] == "2"){
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////// HERE IS THE PROBLEM ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
						$i = 0;
						while($catListRow = mysql_fetch_array($searchQuery)){
							$i++;
							echo "<div class='gallery_polaroid'>
								  	<div class='gallery_polaroid_border'>
										<div class='gallery_frame'>
											<a href='gallery.php?action=3&no=".$catListRow['download_id']."&cat=".$catListRow['download_cat']."'><img src='".$catListRow['download_url']."' height='100' alt='".$catListRow['download_title']."' /></a>
										</div>
									</div>
									<br /><br />
									<a href='gallery.php?action=3&no=".$catListRow['download_id']."&cat=".$catListRow['download_cat']."'><font face='Vivaldi' size='+1'>".$catListRow['download_title']."</font></a>
								  </div>";
							if($i == 3){
								echo "<br /><br /><br />";
								$i = 0;
							}
						}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////// HERE IT ENDS ////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
					}else if($_GET['action'] == "3"){
				?>
						<img src="<?php echo $picRow['download_url'];?>" width="500" alt="" />			 
						</div>
						<div class="gallery_pic_info">
							<?php
								$countQuery = mysql_query("SELECT COUNT(counter_counter) AS counter FROM ".$db_prefix."counter WHERE `counter_pic` = '".$_GET['no']."' GROUP BY counter_counter");
								$countRow = mysql_fetch_array($countQuery);
								echo "<div><p>Visninger: ".$countRow['counter']."</p></div>";
							?>
						</div>
						<div class="gallery_navigation">					
							<p>
								<?php
									$i = 1;
									while($searchRow = mysql_fetch_array($searchQuery)){
										echo "<a href='gallery.php?action=3&no=".$searchRow['download_id']."&cat=".$searchRow['download_cat']."'>".$i."</a> | ";
										$i++;
									}
								?>
							</p>
						</div>
						<div class="gallery_title">
							<p><b><?php echo $picRow['download_title']; ?></b></p>
						</div>
						<div class="gallery_description">
							<p><?php echo $picRow['download_description']; ?></p>
						</div>
					<?php
					}
					?>
		</div>
	</td>
</tr>
</table>

<?php
require_once "side_right.php";
require_once "footer.php";
?>

Link to comment
Share on other sites

Firefox and IE render stuff on the CLIENT SIDE. PHP runs on the server.

 

So, firefox and IE have not idea what PHP (if any) is running. Your problem is with how IE renders HTML.

 

I expect you have a problem in your HTML and CSS.

 

IE is written by people who want your money. Firefox is written by people who want to give you access to as much of the internet as possible. Firefox is free as in freedom.

 

monk.e.boy

Link to comment
Share on other sites

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.