Super Monday Sweater Sale!

| Number of Sweaters 1 | Original Amount $0 | Sale Price $0 |
| Number of Sweaters 2 | Original Amount $16 | Sale Price $12 |
| Number of Sweaters 3 | Original Amount $24 | Sale Price $18 |
LzyDaz Designs
www.lzydaz.com

| Number of Sweaters 1 | Original Amount $0 | Sale Price $0 |
| Number of Sweaters 2 | Original Amount $16 | Sale Price $12 |
| Number of Sweaters 3 | Original Amount $24 | Sale Price $18 |
Bonnie Lincicome © 2010 All Rights Reserved
This page was last updated on December 01, 2008 22:35:57
Source Code for Navigation Bar
<?php $currentPage = basename ($_SERVER['PHP_SELF']); ?>
<ul>
<li>
<a href="<?php ($_SERVER['DOCUMENT_ROOT']); ?>/lvs/php101/index.php" title="PHP Course Syllabus"
<?php
if($currentPage=="index.php"){
echo 'id="current"';
}
?>
>Index</a><!--close anchor tag-->
</li>
<li>
<a href="<?php ($_SERVER['DOCUMENT_ROOT']); ?>/lvs/php101/week1.php" title="Week One"
<?php
if($currentPage=="week1.php"){
echo 'id="current"';
}
?>
>About</a><!--close anchor tag-->
</li>
<li>
<a href="<?php ($_SERVER['DOCUMENT_ROOT']); ?>/lvs/php101/week2.php" title="Week Two"
<?php
if($currentPage=="week2.php"){
echo 'id="current"';
}
?>
>Photos</a><!--close anchor tag-->
</li>
<li>
<a href="<?php ($_SERVER['DOCUMENT_ROOT']); ?>/lvs/php101/week3.php" title="Week Three"
<?php
if($currentPage=="week3.php"){
echo 'id="current"';
}
?>
>Store</a><!--close anchor tag-->
</li>
<li>
<a href="<?php ($_SERVER['DOCUMENT_ROOT']); ?>/lvs/php101/week4.php" title="Week Four"
<?php
if($currentPage=="week4.php"){
echo 'id="current"';
}
?>
>Cards</a><!--close anchor tag-->
</li>
<li>
<a href="<?php ($_SERVER['DOCUMENT_ROOT']); ?>/lvs/php101/week5.php" title="Week Five"
<?php
if($currentPage=="week5.php"){
echo 'id="current"';
}
?>
>Forms</a><!--close anchor tag-->
</li>
<li>
<a href="<?php ($_SERVER['DOCUMENT_ROOT']); ?>/lvs/php101/week6.php" title="Week Six"
<?php
if($currentPage=="week6.php"){
echo 'id="current"';
}
?>
>Database</a><!--close anchor tag-->
</li>
</ul>
Source Code for sale-heading
<h1>
<?php
if(date('D')=="Sun"){
echo "Super Sunday Sweater Sale!";
}
elseif(date('D')=="Mon"){
echo "Super Monday Sweater Sale!";
}
elseif(date('D')=="Tue"){
echo "Super Tuesday Sweater Sale!";
}
elseif(date('D')=="Wed"){
echo "Super Wednesday Sweater Sale!";
}
elseif(date('D')=="Fri"){
echo "Super Friday Sweater Sale!";
}
elseif(date('D')=="Sat"){
echo "Super Saturday Sweater Sale!";
}
else{
echo "Super Thursday Sweater Sale!";
}
?>
</h1>
Source Code for sweater-table
<table>
<?php
$sweater = 3;//Number of sweaters
for($i=1; $i<=$sweater; $i++){
$originalAmount = ($i * $amount);
$amount = 8;
$percent = 25/100;//25% off
$total = $originalAmount -($originalAmount * $percent);
echo("<tr><td>Number of Sweaters ".$i."</td><td>Original Amount $".$originalAmount."</td><td>Sale Price $".$total."</td></tr>");
}//end forloop
?>
</table>
Source Code for chart
<h2>Manager's Chart</h2>
<?php
$a=14; $b=2; $c=7; $y=9;
echo('<p>$a=14 | $b=2 | $c=7 | $y=9</p>');
echo('<p>$a + ($b + $c) + $y = '.$z = $a + ($b + $c) + $y.'<br />');
echo('($a / $b) + ($c * $y) = '.$z = ($a / $b) + ($c * $y).'<br />');
echo('($y * $b) + ($c + $a) = '.$z = ($y * $b) + ($c + $a)).'<br />';
echo('($y - $b) / ($a - $c) = '.$z = ($y - $b) / ($a - $c)).'</p>';
?>
Source Code for Current Page
<?php $siteName = 'LzyDaz Designs<br /><em><span class="white-text">www.lzydaz.com</span></em>'; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Calculations</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../common/site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="head">
<p><?php echo $siteName; ?></p>
</div><!--close #head-->
<div id="wrap">
<div id="content">
<div id="bar-nav">
<?php include($_SERVER['DOCUMENT_ROOT'] . '/lvs/php101/includes/bar-nav.php'); ?>
</div><!--close bar-nav-->
<div id="navcontainer">
<ul>
<li><a href="../week2.php" title="Return to Main">Main</a></li>
<li><a href="game.php" title="Try your luck!">Game</a></li>
<li class="last"><a href="gallery.php" title="Photos">Gallery</a></li>
</ul>
<div id="calculations">
<?php include('includes/chart.php'); ?>
</div><!--end #calculations-->
</div><!-- close #navcontainer-->
<div id="right-container">
<?php include('includes/sale-heading.php'); ?>
<p><img src="images/birdie.jpg" height="300" width="264" alt="What White Elephant?" /></p>
<?php include('includes/sweater-sale.php'); ?>
</div><!--close #right-container-->
</div><!--close #content-->
</div><!--close #wrap-->
<div id="foot">
<?php include($_SERVER['DOCUMENT_ROOT'] . '/lvs/php101/includes/copyright.php'); ?>
</div><!--close #foot-->
<div id="source">
<?php echo phpversion(); ?>
<hr />
<p>Source Code for Navigation Bar</p>
<?php show_source($_SERVER['DOCUMENT_ROOT'] . '/lvs/php101/includes/bar-nav.php'); ?>
<hr />
<p>Source Code for sale-heading</p>
<?php show_source('includes/sale-heading.php'); ?>
<hr />
<p>Source Code for sweater-table</p>
<?php show_source('includes/sweater-sale.php'); ?>
<hr />
<p>Source Code for chart</p>
<?php show_source('includes/chart.php'); ?>
<hr />
<p><strong>Source Code for Current Page</strong></p>
<?php show_source('calculations.php'); ?>
</div><!--close #source-->
</body>
</html>