aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/archive/index.php20
-rw-r--r--views/header.php2
-rw-r--r--views/home/index.php12
-rw-r--r--views/login/index.php2
-rw-r--r--views/profile/index.php6
-rw-r--r--views/register/index.php2
-rw-r--r--views/test/index.php4
7 files changed, 24 insertions, 24 deletions
diff --git a/views/archive/index.php b/views/archive/index.php
index 0b5dff6..de01503 100644
--- a/views/archive/index.php
+++ b/views/archive/index.php
@@ -5,10 +5,10 @@
?>
<?php if ($page !== null): ?>
- <iframe src="<?php echo "/archives/{$page->WID}" ?>" scrolling="no"></iframe>
+ <iframe src="<?= "/archives/{$page->WID}" ?>" scrolling="no"></iframe>
<form action="/sample_archive/index.php" method="POST">
- <input type="hidden" name="page_url" value="<?php echo $_GET["page_url"] ?>">
+ <input type="hidden" name="page_url" value="<?= $_GET["page_url"] ?>">
<input type="submit" value="Archive Now!">
</form>
<!-- Button to add to list -->
@@ -19,13 +19,13 @@
<section class="item">
<section>
<div>
- <img src="<?php echo "/archives/{$page->WID}/favicon.ico" ?>" class="favicon">
- <a href="<?php echo "/archives/{$page->WID}" ?>"><?php echo $page->URL ?></a>
- <span class="float-right"><?php echo $page->Date ?></span>
+ <img src="<?= "/archives/{$page->WID}/favicon.ico" ?>" class="favicon">
+ <a href="<?= "/archives/{$page->WID}" ?>"><?= $page->URL ?></a>
+ <span class="float-right"><?= $page->Date ?></span>
</div>
<div class="details">
- <span>Visits: <?php echo $page->Visits ?></span>
- <span class="float-right"><?php echo Database\User::fromDBuid($page->RequesterUID)->Username ?></span>
+ <span>Visits: <?= $page->Visits ?></span>
+ <span class="float-right"><?= Database\User::fromDBuid($page->RequesterUID)->Username ?></span>
</div>
</section>
<?php if (false): # If user logged-in ?>
@@ -38,15 +38,15 @@
<?php endforeach; ?>
<?php elseif(!doesWebsiteExist($_GET["page_url"])): ?>
- <h2>"<?php echo $_GET["page_url"] ?>" Does not exist!</h2>
+ <h2>"<?= $_GET["page_url"] ?>" Does not exist!</h2>
<p>Submit another request or check the spelling of the site and try again</p>
<a href="/home/index.php">Go back!</a>
<?php else: ?>
- <h2>"<?php echo $_GET["page_url"] ?>" hasn't been archived yet!</h2>
+ <h2>"<?= $_GET["page_url"] ?>" hasn't been archived yet!</h2>
<form action="/sample_archive/index.php" method="POST">
- <input type="hidden" name="page_url" value="<?php echo $_GET["page_url"] ?>">
+ <input type="hidden" name="page_url" value="<?= $_GET["page_url"] ?>">
<input type="submit" value="Archive Now!">
</form>
diff --git a/views/header.php b/views/header.php
index 30e9638..7a874d4 100644
--- a/views/header.php
+++ b/views/header.php
@@ -6,7 +6,7 @@
<meta name="theme-color" content="#2b2b2e">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/styles.css">
- <title><?php echo htmlspecialchars($title ?? "No Way Forward Human");?></title>
+ <title><?= htmlspecialchars($title ?? "No Way Forward Human");?></title>
</head>
<body>
<header>
diff --git a/views/home/index.php b/views/home/index.php
index 37aa1f0..6fbad4c 100644
--- a/views/home/index.php
+++ b/views/home/index.php
@@ -15,17 +15,17 @@
<h1>Most popular archives</h1>
<?php foreach(Database\Webpage::mostVisited(10) as $page): ?>
- <section class="card" onclick="open_archive('<?php echo $page->URL ?>')">
+ <section class="card" onclick="open_archive('<?= $page->URL ?>')">
<section class="quickinfo">
- <a href="<?php echo $page->URL ?>"><?php echo $page->URL ?></a>
- <span class="float-right"><?php echo $page->Date ?></span>
+ <a href="<?= $page->URL ?>"><?= $page->URL ?></a>
+ <span class="float-right"><?= $page->Date ?></span>
</section>
<section class="title">
- <img src="<?php echo '/archives/' . $page->FaviconPath ?>"></span>
- <span><?php echo $page->Title ?></span>
+ <img src="<?= '/archives/' . $page->FaviconPath ?>"></span>
+ <span><?= $page->Title ?></span>
</section>
<section>
- <strong>Visits: <?php echo $page->Visits ?></strong>
+ <strong>Visits: <?= $page->Visits ?></strong>
<strong><!-- Archives count --></strong>
</section>
</section>
diff --git a/views/login/index.php b/views/login/index.php
index a77f106..1580cf2 100644
--- a/views/login/index.php
+++ b/views/login/index.php
@@ -10,7 +10,7 @@
<?php if ($status !== null): ?>
<?php if ($status !== ""): ?>
<p>
- Fail: <?php echo $status ?>
+ Fail: <?= $status ?>
</p>
<?php else: ?>
<p>
diff --git a/views/profile/index.php b/views/profile/index.php
index 3e79d71..54da307 100644
--- a/views/profile/index.php
+++ b/views/profile/index.php
@@ -8,9 +8,9 @@
<?php if ($user !== null): ?>
<section>
- <?php echo $user->Username ?>
- <?php echo $user->Role ?>
+ <?= $user->Username ?>
+ <?= $user->Role ?>
</section>
<?php else: ?>
- <h2>User "<?php echo $_GET["user"] ?>" doesn't exist!</h2>
+ <h2>User "<?= $_GET["user"] ?>" doesn't exist!</h2>
<?php endif; ?>
diff --git a/views/register/index.php b/views/register/index.php
index 4e2abb1..1dc7bea 100644
--- a/views/register/index.php
+++ b/views/register/index.php
@@ -9,7 +9,7 @@
<?php if ($status !== null): ?>
<?php if ($status !== ""): ?>
<p>
- Fail: <?php echo $status ?>
+ Fail: <?= $status ?>
</p>
<?php else: ?>
<p>
diff --git a/views/test/index.php b/views/test/index.php
index e5656e1..bce8371 100644
--- a/views/test/index.php
+++ b/views/test/index.php
@@ -13,8 +13,8 @@
<section class="quickinfo">
<?php print_r($user); ?>
</section>
- <strong><?php echo $user->Username ?></strong>
- <em><?php echo $user->Role ?></em>
+ <strong><?= $user->Username ?></strong>
+ <em><?= $user->Role ?></em>
</section>
<?php endforeach;?>