Jump to content

HTML isn't showing with PHP


ueon

Recommended Posts

My html code isn't showing now that I've added the PHP portion. Any ideas?

 

<HTML>
<HEAD>
<title>CHARMSKY</title>

<link rel="stylesheet" href="content.css" type="text/css" />
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />

<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
<script type="text/javascript" src="js/lightbox.js"></script>

</head>

<body>

<div class="box1">


<div class="logo" onClick="location.href='index.html';" style="cursor:pointer;" alt="charmsky logo"></div>

<div class="testimonials" onClick="location.href='testimonials.html';" style="cursor:pointer;" alt="charmsky testimonials"></div>

<div class="faq" onClick="location.href='faq.html';" style="cursor:pointer;" alt="charmsky faq"></div>

<div class="contact" onClick="location.href='contact.html';" style="cursor:pointer;" alt="charmsky contact"></div>


</div>

<div class="nav_bg">


<div class="nav_home" onClick="location.href='index.html';" style="cursor:pointer;" alt="home"></div>

<div class="nav_women" onClick="location.href='women.html';" style="cursor:pointer;" alt="women"></div>

<div class="nav_men" onClick="location.href='men.html';" style="cursor:pointer;" alt="men"></div>

<div class="nav_acc" onClick="location.href='accesory.html';" style="cursor:pointer;" alt="acessory"></div>

<div class="nav_bags" onClick="location.href='bags.html';" style="cursor:pointer;" alt="bags"></div>

<div class="nav_htb" onClick="location.href='htb.html';" style="cursor:pointer;" alt="htb"></div>

<div class="nav_ship" onClick="location.href='shipping.html';" style="cursor:pointer;" alt="shipping policies"></div>

<div class="nav_refund" onClick="location.href='bags.html';" style="cursor:pointer;" alt="refund"></div>


</div>


<div class="content_box">
  <div class="column">
    	<div class="nav_col"></div><BR \>
    	<div class="nav_new"></div><BR \>
    	<div class="nav_rec"></div><BR \>   
        <div class="nav_bundles"></div><BR \>
        
    <div class="nav_cate"></div><BR \>
        <div class="nav_shirts"></div><BR \>
    	<div class="nav_vests"></div><BR \>
    	<div class="nav_sweaters"></div><BR \>   
        <div class="nav_jackets"></div><BR \>  
        <div class="nav_jeans"></div><BR \>
    	<div class="nav_others"></div><BR \>
  </div>
    <div class="head">
    <span class="title">SHIRTS</span><BR \>
    <HR \>
    
<?php
  	function num_files($dir, $recursive=false, $counter=0) 
{
    		static $counter;
    		if(is_dir($dir)) {
      			if($dh = opendir($dir)) {
        			while(($file = readdir($dh)) !== false) {
          				if($file != "." && $file != "..") {
              					$counter = (is_dir($dir."/".$file)) ? num_files($dir."/".$file, $recursive, $counter) : $counter+1;
          				}
        			}
        			closedir($dh);
      			}
    		}
    		return $counter;
  	}
/*
$con = mysql_connect("localhost", "", "");

if (!$con)
{
	die("Could not connect: ' . mysql_error())";
}

mysql_select_db("db" , $con);

$total = mysql_query("SELECT * FROM total"); //100

*/
$total = 8;
$count_thumb = 1;
$count_group = 1;
$div_top = 300;
$div_left = 200;
$max = 20;
$totalpages = $total / $max;


$page = $_GET['page'];

if(empty($page) || $page == 0)
{
	$count_thumb = 1;
	$count_group = 1;
}

if ($page != 1 || $page != 0)
{
	$count_thumb = (($page - 1) * 20) + 1;
	$count_group = (($page - 1) * 20) + 1;
}

//positions the thumbnails
while ($count_thumb <= $total)
{
	echo "<div style='position: absolute; top: ".$div_top."px; left: ".$div_left."px;'>\n";
	echo "<a href='products/men/jackets/detail/".$count_thumb."/1.jpg' rel='lightbox[".$count_thumb."]'><img src='products/men/jackets/thumb/".$count_thumb.".jpg' \></a>\n";	
	echo "</div>\n";

	$div_left = $div_left + 150;
	if ($div_left == 800)
	{
		$div_left = $div_left - 600;
		$div_top = $div_top + 150;
		echo "<BR \>\n";
	}

	$count_thumb = $count_thumb + 1;
}

while ($count_group <= $total)
{	
	$file_count = 2;
	$num_file = num_files("products/men/jackets/detail/$count_group");

	while ($file_count <= $num_file)
	{
		echo "<a href='products/men/jackets/detail/".$count_group."/".$file_count.".jpg' rel='lightbox[".$count_group."]'></a>\n";
		$file_count = $file_count + 1;
	}

	$count_group = $count_group + 1;
}
?>
  </div>
</div>

</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/149552-html-isnt-showing-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.