Show sourcecode
The following files exists in this folder. Click to view.
webbserverprogrammering/projekt/snake_oil_seller/
about_us.php
admin.php
contact.php
create_products
createtable.php
css/
dbconnection.php
deletepost.php
deletetable.php
entry.php
header.php
insertposts.php
js/
leaderboard.php
log_in.php
log_out.php
main.php
my_account.php
php/
question_maker.php
quiz_form.php
quiz_list.php
quiz_maker.php
result.php
selectposts.php
shop.php
shopping_cart.php
sign_in.php
snake_oil.css
style.js
title_card.php
updateposts.php
user_verified.php
verify_page.php
header.php
73 lines UTF-8 Windows (CRLF)
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
<?php
// Kollar och ändrar vald flik beroende på vald sida
$currentPage = basename($_SERVER["PHP_SELF"]);
if ($currentPage === "main.php") {
echo '
<div id="rubrics">
<a href="main.php" style="font-weight: bold; font-size: 1.5em;">Main</a>
<a href="shop.php">Shop</a>
<a href="about_us.php">About us</a>
<a href="contact.php">Contact</a>
<a href="shopping_cart.php">Shopping cart</a>
<a href="my_account.php">My account</a>
<a href="log_out.php">Lämna sidan</a>
</div>';
} else if ($currentPage === 'shop.php') {
echo '
<div id="rubrics">
<a href="main.php">Main</a>
<a href="shop.php" style="font-weight: bold; font-size: 1.5em;">Shop</a>
<a href="about_us.php">About us</a>
<a href="contact.php">Contact</a>
<a href="shopping_cart.php">Shopping cart</a>
<a href="my_account.php">My account</a>
<a href="log_out.php">Lämna sidan</a>
</div>';
} else if ($currentPage === 'about_us.php') {
echo '
<div id="rubrics">
<a href="main.php">Main</a>
<a href="shop.php">Shop</a>
<a href="about_us.php" style="font-weight: bold; font-size: 1.5em;">About us</a>
<a href="contact.php">Contact</a>
<a href="shopping_cart.php">Shopping cart</a>
<a href="my_account.php">My account</a>
<a href="log_out.php">Lämna sidan</a>
</div>';
} else if ($currentPage === 'contact.php') {
echo '
<div id="rubrics">
<a href="main.php">Main</a>
<a href="shop.php">Shop</a>
<a href="about_us.php">About us</a>
<a href="contact.php" style="font-weight: bold; font-size: 1.5em;">Contact</a>
<a href="shopping_cart.php">Shopping cart</a>
<a href="my_account.php">My account</a>
<a href="log_out.php">Lämna sidan</a>
</div>';
} else if ($currentPage === 'shopping_cart.php') {
echo '
<div id="rubrics">
<a href="main.php">Main</a>
<a href="shop.php">Shop</a>
<a href="about_us.php">About us</a>
<a href="contact.php">Contact</a>
<a href="shopping_cart.php" style="font-weight: bold; font-size: 1.5em;">Shopping cart</a>
<a href="my_account.php">My account</a>
<a href="log_out.php">Lämna sidan</a>
</div>';
} else if ($currentPage === 'my_account.php') {
echo '
<div id="rubrics">
<a href="main.php">Main</a>
<a href="shop.php">Shop</a>
<a href="about_us.php">About us</a>
<a href="contact.php">Contact</a>
<a href="shopping_cart.php">Shopping cart</a>
<a href="my_account.php" style="font-weight: bold; font-size: 1.5em;">My account</a>
<a href="log_out.php">Lämna sidan</a>
</div>';
}
?>