Refaktorering for å ha ha med flere moduler for en innlevering
parent
15ed8f1e6b
commit
fc0da38d0e
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
$dir = array_diff(scandir("./"), array('..','.','index.php','common.php'));
|
||||
$dir = array_diff(scandir("./"), array('..','.','index.php'));
|
||||
|
||||
$modul = substr($_SERVER['REQUEST_URI'],-2,1);
|
||||
|
||||
|
@ -14,12 +14,17 @@ function getModuleName($input): string {
|
|||
<html lang="no">
|
||||
<head>
|
||||
<title>IS-115 - Webprogrammering i PHP</title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<h1>IS-115 - Webprogrammering i PHP</h1>
|
||||
<h3>Modul <?=$modul;?></h3>
|
||||
<h3>
|
||||
Modul <?=$modul;?>
|
||||
</h3>
|
||||
<h5>
|
||||
<strong><a href="../">Tilbake til alle moduler</a></strong>
|
||||
</h5>
|
||||
|
||||
<?php
|
||||
foreach($dir as $item){
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
<style>
|
||||
h1 {
|
||||
font-size: 32px !important;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
<style>
|
||||
input[type=number] {
|
||||
width: 50px;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../modul1/common.php
|
|
@ -1 +0,0 @@
|
|||
../modul1/index.css
|
|
@ -1,9 +1,9 @@
|
|||
<?php include 'common.php'; header('Content-Type: text/html; charset=utf-8'); ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; header('Content-Type: text/html; charset=utf-8'); ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<meta charset='UTF-8'>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../modul1/common.php
|
|
@ -1 +0,0 @@
|
|||
../modul1/index.css
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
|
||||
<style>
|
||||
td {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../modul1/common.php
|
|
@ -1 +0,0 @@
|
|||
../modul1/index.css
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php include 'common.php';
|
||||
<?php include '../common.php';
|
||||
|
||||
$err = array();
|
||||
$msg = array();
|
||||
|
@ -107,7 +107,7 @@ if(!empty($_POST)){
|
|||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<?php include 'common.php';
|
||||
<?php include '../common.php';
|
||||
|
||||
$err = array();
|
||||
$msg = array();
|
||||
|
@ -112,7 +112,7 @@ if(!empty($_POST)){
|
|||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<?php include 'common.php'; ?><!DOCTYPE html>
|
||||
<?php include '../common.php'; ?><!DOCTYPE html>
|
||||
<html lang="no">
|
||||
<head>
|
||||
<title><?=title();?></title>
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<link rel="stylesheet" href="../index.css">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
Loading…
Reference in New Issue