JavaScript must be enabled to use some of the features on this page.

Posters Galore
<?php 
	date_default_timezone_set('America/New_York');
	session_start();	
	
	//==============================================Newest Additions
	$sql = "SELECT  `products`.`productid`, `products`.`name`, `products`.`fullprice`, `products`.`saleprice`, `products`.`onsale`, `products`.`createddate`, `products`.`active`, `images`.`filename`, `images`.`alttag`";
		$sql .= " FROM  `products`"; 
		$sql .= " LEFT JOIN  `images` ON  `products`.`productid` = `images`.`productid`";
		$sql2 .= " WHERE `products`.`active` = '1'";
		$sql .= " ORDER BY `createddate` DESC";
		$sql .= " LIMIT 4;";
	$result = mysql_query($sql);
	
	//==============================================Most Popular
	$sql2 = "SELECT  `products`.`productid`, `products`.`name`, `products`.`fullprice`, `products`.`saleprice`, `products`.`onsale`, `products`.`views`, `products`.`active`, `images`.`filename`, `images`.`alttag`";
		$sql2 .= " FROM  `products`"; 
		$sql2 .= " LEFT JOIN  `images` ON  `products`.`productid` = `images`.`productid`";
		$sql2 .= " WHERE `products`.`active` = '1'";
		$sql2 .= " ORDER BY `views` DESC";
		$sql2 .= " LIMIT 4;";
	$result2 = mysql_query($sql2);
?>
<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
<?php include('lib/inc/meta.inc.php'); ?>
        <link rel="shortcut icon" type="image/x-icon" href="lib/images/favicon.ico"/>
        <link href="lib/css/reset.css" type="text/css" media="screen" rel="stylesheet" />
        <link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold&amp;v1' rel='stylesheet' type='text/css'>
        <link href="lib/css/styles.css" type="text/css" rel="stylesheet" />
        <!--[if gte IE 9]>
          <style type="text/css">
            .gradient {
               filter: none;
            }
          </style>
        <![endif]-->
		<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
        <script>
			$('<span class="simpleCart_quantity"></span>').appendTo('#cart');
		</script>
        <script>
				if($('.simpleCart_quantity').text() == ''){
					$(this).hide;
				}else{
					$(this).show;
				}
		</script>  
		<title>Posters Galore!</title>
    </head>
    <body id="home">
        <header class="gradient">
            <nav>
<?php include('lib/inc/nav.inc.php'); ?>
            </nav>
        </header>
        <h1 class="displace">Welcome to Posters Galore!</h1>
        <div id="frontPageAd">
        	<span class="displace">Over 50 different posters! Style your home with fashionable high quality printed posters >></span>
        </div>
        <div id="container">
        	<section>
            	<h2>Newest Additions</h2>
                <div>
                    <ul>
<?php
						while($row = mysql_fetch_array($result)){
?>
							<li>
                            	<a href="http://afishel.com/postersgalore/posters/index.php?id=<?php echo($row['productid']); ?>" title="<?php echo($row['alttag']); ?>">
                                	<img src="http://afishel.com/postersgalore/lib/img/products/<?php echo($row['productid']."/150_".$row['filename']); ?>" alt="<?php echo($row['alttag']); ?>" />
                                </a>
                                <span>
<?php
									echo($row['name']);
?>
                                </span>
                            	<span class="price">
<?php 								if($row['onsale'] == 1){
										echo('$'.$row['saleprice']);
									}else{
										echo('$'.$row['fullprice']);
									};
?>
                            	</span>
                            </li>
<?php
						}
?>
                    </ul>
                </div>
            </section>
        	<section>
            	<h2>Most Popular</h2>
                <div>
                    <ul>
<?php
						while($row2 = mysql_fetch_array($result2)){
?>
							<li>
                            	<a href="http://afishel.com/postersgalore/posters/index.php?id=<?php echo($row2['productid']); ?>" title="<?php echo($row2['alttag']); ?>">
                                	<img src="http://afishel.com/postersgalore/lib/img/products/<?php echo($row2['productid']."/150_".$row2['filename']); ?>" alt="<?php echo($row2['alttag']); ?>" />
                                </a>
                                <span>
<?php
									echo($row2['name']);
?>
                                </span>
                            	<span class="price">
<?php 								if($row2['onsale'] == 1){
										echo('$'.$row2['saleprice']);
									}else{
										echo('$'.$row2['fullprice']);
									};
?>
                            	</span>
                            </li>
<?php
						}
?>
                    </ul>
                </div>
            </section>
        	<section id="frontPageNews">
            	<h2>Latest News</h2>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nec erat mi, et ullamcorper lorem. Sed ut neque sem, consequat vulputate dolor. In vitae tempus enim. Nunc vel nisl nec lorem sagittis pulvinar vel id eros. Praesent molestie sollicitudin lorem in pulvinar. Suspendisse potenti.</p>
                <h2>About Posters Galore</h2>
                <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin nec erat mi, et ullamcorper lorem. Sed ut neque sem, consequat vulputate dolor. In vitae tempus enim. Nunc vel nisl nec lorem sagittis pulvinar vel id eros. Praesent molestie sollicitudin lorem in pulvinar. Suspendisse potenti.</p>
            </section>
        </div>
        <footer>
<?php include('lib/inc/footer.inc.php'); ?>
        </footer>
    </body>
</html>

Posters Galore

By: Alan Fishel

Posters Galore is a student project I did to make an e-commerce site. The site sells posters and uses jCart as its shopping cart functioning.

Critiques

Alan Fishel

Profile Picture

hi

You must be logged in to leave a comment.

Site Details

Developer: Alan Fishel
URL: http://afishel.com/postersgalore/
Advertisement

Other Info

Submitted:
Views: 1996
Comments: 1

Share

Other Works

LearnHTML - Home LearnHTML - Tutorial Page LearnHTML - Try it! LearnHTML - Test Posters Galore Posters Galore - Browse Posters Galore - Cart