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