Webbserverprogrammering 1

Show sourcecode

The following files exists in this folder. Click to view.

webbsrvprg/exercises/include/

include_1.php
include_2_bottom.php
include_2_rnd_nr.php
include_2_top.php
index.php
ovn_in1.php
ovn_in2-4_sid1.php
ovn_in2-4_sid2.php
ovn_in2-4_sid3.php
ovn_in2_sid1.php
ovn_in2_sid2.php
ovn_in2_sid3.php

include_2_top.php

208 lines UTF-8 Windows (CRLF)
<?php
error_reporting
(-1); // Report all type of errors
ini_set('display_errors'1); // Display all errors
ini_set('output_buffering'0); // Do not buffer outputs, write directly

echo('
<!DOCTYPE HTML>
<html lang="sv">

<head>

    <title>S_' 
$sid_nr '</title>

    <meta charset="utf-8">

    <style>
    body {
  font-size: 14px;
  width: 100%;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  display: flex;
  flex-direction: row;
  justify-content: center;
}

.fruktlådan {
  margin: auto;
  display: grid;
  grid-template-areas:
    "header header aside"
    "section article aside"
    "footer footer footer"
  ;
  grid-template-columns: 200px 400px 200px;
  grid-template-rows: 100px auto 100px;
}

header {
  border: 1px solid black;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  grid-area: header;
  font-size: 2em;
  color: white;
  font-weight: bold;
  background-color: crimson;
}

.navigering {
  border: 1px solid black;
  grid-area: section;
  background-color: chartreuse;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 10px;
}

nav {
  font: black;
  background-color: white;
  border: 1px solid black;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

aside {
  border: 1px solid black;
  grid-area: aside;
  background-color: yellow;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  row-gap: 23px;
}

footer {
  border: 1px solid black;
  grid-area: footer;
  background-color: grey;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

article {
  border: 1px solid black;
  grid-area: article;
  padding: 5px;
}

.rubrik1 {
  font-size: 1.4em;
  font-weight: bold;
}

.rubrik2 {
  font-size: 1.8em;
  font-weight: bold;
}

.rubrik3 {
  font-size: 1.2em;
  font-weight: bold;
}

.stortext {
  font-size: 3em;
  font-weight: bold;
}

.reklam {
  background-color: white;
  border: 2px solid red;
}

aside>div {
  width: 150px;
  text-align: center;
  padding: 8px;
}

img {
  border: 2px solid black;
  width: 150px;
}

.fetstil {
  font-weight: bold;
}
a{
  background-color: rgb(158, 162, 166);
  border: 1px solid black;
  width: 152px;
  margin: 1px;
  text-align: center;
  text-decoration: none;
  color: black;
  margin: 0px;
  padding: 3px;
}
a:hover {
  background-color: lime;
}

#nowin {
  background-color: red;
  font-weight: bold;
}

#navovning10 {
  margin: 2px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
    </style>
</head>

<body>
    <div class="fruktlådan">
        <header>Läste fel i uppgiften men fixar snart hela layouten</header>
        <section class="navigering">
            <nav>
                <div class="rubrik1">
                    Aktuella nummer
                </div>
                <a href="ovn_in2-4_sid1.php">1</a><br>
                <a href="ovn_in2-4_sid2.php">2</a><br>
                <a href="ovn_in2-4_sid3.php">3</a><br>
            </nav>
            <nav role="hemlis">
                <div class="rubrik1">
                    Layout
                </div>
            </nav>
        </section>
        <aside>
            <div class="rubrik2">Reklam</div>
            <div class="reklam">
                <span class="rubrik3">Superpris!</span>
                <br>
                9,90kr/kg
            </div>
            <div class="reklam"><span class="rubrik3">Kanonpris!</span>
                <br>
                0,99kr/hg
            </div>
            <div class="reklam">
                <span class="rubrik3">Fantompris!</span>
                <br>
                4,95kr/<sup>1</sup>/<sub>2</sub>kr
            </div>
        </aside>
        <footer>
            <span><span class="stortext">&copy; Harry Molin</span>20231114</span>
        </footer>
        <article><span class="rubrik2">Siffra: </span><br>
'
)
?>