diff --git a/lab11/Lab11.php b/lab11/Lab11.php index 9235de0..806c6bb 100755 --- a/lab11/Lab11.php +++ b/lab11/Lab11.php @@ -3,8 +3,12 @@ //****** Hint ****** //connect database and fetch data here - - +include 'functions.inc.php'; +$dbhost='localhost'; +$dbuser='root'; +$dbpass='15298526406zyff'; +$conn=mysqli_connect($dbhost,$dbuser,$dbpass); +mysqli_select_db($conn,'travel'); ?> @@ -37,6 +41,9 @@
Filters
+ + +
@@ -69,29 +83,31 @@
-
- +
+ diff --git a/lab11/functions.inc.php b/lab11/functions.inc.php index c7b6f38..96bcab3 100644 --- a/lab11/functions.inc.php +++ b/lab11/functions.inc.php @@ -1,5 +1,25 @@ fetch_assoc()) { + $imgid = $row['ImageID']; + $path = $row['Path']; + $title = $row['Title']; + $continent = $row['ContinentCode']; + echo "
  • + + $continent +
    +
    +
    +

    $title

    +
    +
    +
    +
  • "; + } +} + function generateLink($url, $label, $class) { $link = ''; $link .= $label; diff --git a/lab4/lab4.css b/lab4/lab4.css index 8f2715d..0c88f8f 100755 --- a/lab4/lab4.css +++ b/lab4/lab4.css @@ -1,29 +1,91 @@ -h1 { font-size: 3em; font-weight: bold; margin-top: 0;} +span1 { font-size: 3em; + font-weight: bold; + margin-top: 0; + display: inline; +} div#topHeaderRow { - font-size: 0.9em; + font-size: 0.9em; +} + +nav li{ + display: inline-block; +} + +#logo{ + margin-right: 100px; + color: silver; +} + + +header{ + margin-left: 80px; + margin-right: 80px; } -.price { +section{ + margin-left: 80px; + margin-right: 80px; +} +#mainNavigationRow{ + font-size: large; } -.similarTitle { } +.price { + color: red; + font-weight: bold; + font-size: 1.5em; + +} + +.similarTitle { + +} .cartText { } + + + + footer { margin-top: 1em; background-color: #E7E7E7; + padding-bottom: 0; +} +.list-group li{ + list-style: none; + margin: 20px; +} +.container1{ + padding-left: 80px; + padding-right: 80px; } + + .tight-form-group { } -#copyrightRow { - background-color: #3A3A3A; +#copyrightRow { + + background-color: #3A3A3A; + color: silver; + margin-top:15px; + padding: 1px; +} + +#copyrightRow p{ + margin-left: 100px; + margin-top: 3px; +} + +#copyrightRow span{ + float: right; + margin-right: 50px; +} -} \ No newline at end of file diff --git a/lab4/lab4.html b/lab4/lab4.html index e3de0be..f9cce03 100755 --- a/lab4/lab4.html +++ b/lab4/lab4.html @@ -12,252 +12,330 @@ - +
    -
    - +
    + +
    + Art Store + +
    +
    + + +
    +
    +
    + + - -
    -

    Art Store

    - -
    - - - - -
    -
    - - - +
    + +
    +

    Self-portrait in a Straw Hat

    +

    By Louise Elisabeth Lebrun

    + +
    + + Self-portrait in a Straw Hat + +
    +

    + The painting appears, after cleaning, to be an autograph replica of a picture, the
    original of which was painted in + Brussels in 1782 in free imitation of Rubens's
    'Chapeau de Paille', which LeBrun had seen in Antwerp. It was + exhibited in Paris in
    1782 at the Salon de la Correspondance. LeBrun's original is recorded in a private
    collection + in France. +

    +
    +

    $700

    + + +

     

    + +
    +
    + Product Details +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    Date:1782
    Medium:Oil on canvas
    Dimensions:98cm x 71cm
    Home:National Gallery, London
    Genres:Realism, Rococo
    Subjects:People, Arts
    +
    +
    +
    + +

     

    + + + + +
    +

    Similar Products

    +
    +
    + ... +
    +

    Artist Holding a Thistle

    + + + +
    +
    + + +
    + ... +
    +

    Portrait of Eleanor of Toledo

    + + + +
    +
    + + +
    + ... +
    +

    Madame de Pompadour

    + + + +
    +
    + + +
    + ... +
    +

    Girl with a Pearl Earring

    + + + +
    +
    +
    +
    + -

    Self-portrait in a Straw Hat

    -

    By Louise Elisabeth Lebrun

    - - Self-portrait in a Straw Hat - -

    - The painting appears, after cleaning, to be an autograph replica of a picture, the original of which was painted in Brussels in 1782 in free imitation of Rubens's 'Chapeau de Paille', which LeBrun had seen in Antwerp. It was exhibited in Paris in 1782 at the Salon de la Correspondance. LeBrun's original is recorded in a private collection in France. -

    -

    $700

    -
    - - -
    -

     

    -
    - Product Details - - - - - - - - - - - - - - - - - - - - - - - - - -
    Date:1782
    Medium:Oil on canvas
    Dimensions:98cm x 71cm
    Home:National Gallery, London
    Genres:Realism, Rococo
    Subjects:People, Arts
    -
    - -

     

    - -

    Similar Products

    -
    - ... -
    -

    Artist Holding a Thistle

    - - - -
    -
    - -
    - ... -
    -

    Portrait of Eleanor of Toledo

    - - - -
    -
    -
    - ... -
    -

    Madame de Pompadour

    - - - + +
    +
    +

    Cart

    + -
    - ... - - -

    Cart

    + Subtotal: $1200
    - - ... - -

    Artist Holding a Thistle

    - - - ... - -

    Self-portrait in a Straw Hat

    - - Subtotal: $1200 -
    - - - + +
    - -
    -

    Popular Artists

    - +
    +
    + + +
    +
    +

    Popular Artists

    -
    - -
    -

    Popular Genres

    - -
    - - -
    +
    + + + + +
    - - -

    Contact us

    -
    - - - - - - - - - - - -
    - - -
    -

    All images are copyright to their owners. This is just a hypothetical site - © 2014 Copyright Art Store

    -
    - - - - - + + + + + diff --git a/lab5/lab5.html b/lab5/lab5.html index 30b4e61..a2db267 100644 --- a/lab5/lab5.html +++ b/lab5/lab5.html @@ -59,7 +59,7 @@

    Art Store

    - +
    - Still Life with Flowers in a Glass Vase
    - Jan Davidsz. de Heem, 1650 - 1683 + Still Life with Flowers in a Glass Vase
    + Jan Davidsz. de Heem, 1650 - 1683
    @@ -37,6 +37,47 @@

    Art Filters

    diff --git a/lab8/functions.inc.php b/lab8/functions.inc.php index 5ee3342..bfb59ec 100644 --- a/lab8/functions.inc.php +++ b/lab8/functions.inc.php @@ -1,8 +1,16 @@ "; - //TODO - echo ""; - } + + echo ""; + echo ""; + echo "$title"; + echo "$quantity"; + echo "$$price"; + echo "$$total"; + echo ""; +} ?> \ No newline at end of file diff --git a/lab8/lab8.php b/lab8/lab8.php index 7e70377..9df9061 100644 --- a/lab8/lab8.php +++ b/lab8/lab8.php @@ -1,18 +1,19 @@ -= $shippingThreshold ){ + $shipping = 100; +} +else { + $shipping = $shippingFlatAmount; +} +$grandTotal = $subtotal + $shipping; ?> @@ -22,111 +23,113 @@ Lab 08 - PHP - + - + - +
    -
    -
    -

    Order Summaries

    -

    Examine your customer orders

    -
    -
    - -
    - - -
    -
    -

    My Orders

    -
    -
    - - - -
    -
    - - - - - -
    -
    -

    Selected Order: #520

    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Customer: Mount Royal University
    CoverTitleQuantityPriceAmount
    Subtotal$
    Shipping$
    Grand Total$
    -
    - -
    - - - - -
    - - -
    -
    - - + + + +
    +
    +

    Order Summaries

    +

    Examine your customer orders

    +
    +
    + +
    + + +
    +
    +

    My Orders

    +
    +
    + + + +
    +
    + + + + + +
    +
    +

    Selected Order: #520

    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Customer: Mount Royal University
    CoverTitleQuantityPriceAmount
    Subtotal$
    Shipping$
    Grand Total$
    +
    + +
    + + + + +
    + + +
    +
    + +
    - + \ No newline at end of file diff --git a/lab9/Lab09.php b/lab9/Lab09.php index 6599d57..ab4f67b 100644 --- a/lab9/Lab09.php +++ b/lab9/Lab09.php @@ -1,5 +1,6 @@ Canada + // Canada + $short = array ("CA","DE","GR","IT","GB","US"); + for ($i=0;$i<=5;$i++){ + $j = $short[$i]; + echo generateLink($countries[$j],$countries[$j],"btn btn-default"); + } ?> @@ -57,20 +63,11 @@ /* hint: use array and loop */ //the next lines are one of the elements //you need to fill the elements with data provided - - - //
  • - // - // View of Cologne - //
    - //
    - //
    - //
    - //

    View of Cologne

    - //
    - //
    - //
    - //
  • + $numarr = array(22,54,7,19,46,6,60,58,75,77,27,2,24,13,101,102); + for ($i=0;$i<=15;$i++) { + $number=$numarr[$i]; + outputPostRow($number); + } ?> diff --git a/lab9/functions.inc.php b/lab9/functions.inc.php index c7b6f38..b329035 100644 --- a/lab9/functions.inc.php +++ b/lab9/functions.inc.php @@ -1,7 +1,7 @@ '; + $link = ''; $link .= $label; $link .= ''; return $link; @@ -10,6 +10,22 @@ function generateLink($url, $label, $class) { function outputPostRow($number) { include("travel-data.inc.php"); + $images=$GLOBALS['images']; + $img=$images[$number]; + $imgpath = $img["path"]; + $imgalt = $img["title"]; + echo "
  • + + $imgalt +
    +
    +
    +
    +

    $imgalt

    +
    +
    +
    +
  • "; } /*