commit existing workshops
This commit is contained in:
20
workshop5/Views/calculator.phtml
Executable file
20
workshop5/Views/calculator.phtml
Executable file
@@ -0,0 +1,20 @@
|
||||
<?php require('template/header.phtml') ?>
|
||||
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="POST">
|
||||
<div class="form-row align-items-center">
|
||||
<div class="col-auto">
|
||||
<label class="visually-hidden" for="exp">Expression</label>
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">Exp</div>
|
||||
</div>
|
||||
<input class="form-control" id="exp" placeholder="Expression" type="text" name="expression" value="<?php if(isset($_POST['expression'])) echo $_POST['expression'] ?>"/>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input class="btn btn-primary" type="submit" value="Submit" name="submit" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php if(isset($view->result)) : ?>
|
||||
<p><?php echo $view->result; ?></p>
|
||||
<?php endif; ?>
|
||||
<?php require('template/footer.phtml') ?>
|
76
workshop5/Views/template/header.phtml
Normal file
76
workshop5/Views/template/header.phtml
Normal file
@@ -0,0 +1,76 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
|
||||
|
||||
<link href="/css/my-style.css" rel="stylesheet">
|
||||
|
||||
<title>Server-Side Programming - <?php echo $view->pageTitle; ?></title>
|
||||
</head>
|
||||
|
||||
|
||||
<body class="d-flex flex-column h-100">
|
||||
|
||||
<!--<body role=""document"> -->
|
||||
|
||||
|
||||
<header>
|
||||
<!-- Fixed navbar -->
|
||||
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
|
||||
<div class="container-fluid">
|
||||
<a class="navbar-brand" href="#">Fixed navbar</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarCollapse">
|
||||
<ul class="navbar-nav me-auto mb-2 mb-md-0">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="index.php">Home</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="page1.php">Page1</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="calculator.php">Calculator</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
<form class="d-flex" role="search">
|
||||
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
|
||||
<button class="btn btn-outline-success" type="submit">Search</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
|
||||
<!-- Begin page content -->
|
||||
<main class="flex-shrink-0">
|
||||
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div id="title" class="col-xs-12">
|
||||
<img src="images/new_uos_logo.jpg" alt="Salford University" />
|
||||
<h1><?php echo $view->pageTitle ?> </h1>
|
||||
|
||||
<!-- https://getbootstrap.com/docs/5.2/examples/sticky-footer-navbar/ -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<section id="content" class="col-xs-6 col-sm-9 col-md-10">
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user