-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
52 lines (44 loc) · 1.66 KB
/
index.php
File metadata and controls
52 lines (44 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html lang="en">
<head>
<!-- https://www.bootdey.com/snippets/view/team-user-resume#html -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous"><link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css" integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk=" crossorigin="anonymous"
<title>ASE 230 - class of Fall 2021 Great Authors - Index Page</title>
</head>
<?php
include('csv_util.php');
?>
<body style="text-align:center;">
<a href="auth/auth/signup.phpSignup</a>
<?php
if(!isset($_SESSION['username'])) {
$_SESSION['msg'] = "Please log in to view this page";
echo '<a href="auth/auth/signin.php">Sign in</a>';
if (isset($_SESSION['username'])){
echo '<a href="auth/auth/signout.php">Sign out</a>';
}
?>
<?php
$quotes = readContentHeader('quotes.csv');
//echo '<br>';
//print_r($quotes);
for($i=0;$i<count($quotes);$i++){
?>
<h2><?= $quotes[$i]['Quote']?> </h2>
<p> <?= $quotes[$i]['Author']?> </p>
<a href="detail.php?index=<?= $i ?>">See Quote</a>
<hr>
<?php
}?>
<form method="post" action="create.php">
<p>
<input type="submit" name="create" value="Create New Quote">
</p>
</form>
<?php
echo "<p>Copyright © 2017-" . date("Y") . " Noah R Gestiehr</p>";
?>
</body>
</html>