Show sourcecode

The following files exists in this folder. Click to view.

test/

.idea/
audio/
blokket.php
blokket2.php
dbtest.php
edit-stylesheet-process.php
edit-stylesheet.php
edit-stylesheet_original.php
ex/
favorites.php
img/
incl/
kmom03_get.php
kmom03_getform.php
kmom03_postform.php
kmom03_validate.php
login.php
login_MOS.php
me.php
report.php
select-stylesheet-process.php
select-stylesheet.php
select-stylesheet_original.php
social.php
src/
style/
style-default.php
style-default_original.php
style.php
style_original.php
test.php
viewsource.php

login_MOS.php

1 lines UTF-8 Unix (LF)
1
 <?php 
include("incl/config.php");
$pageId = "login";


// Check if the url contains a querystring with a page-part.
$p = null;
if(isset($_GET["p"])) 
{
  $p = $_GET["p"];
}


// Is the action a known action?
$content = null;
$output = null;
if($p == "login") 
{
  $pageTitle = "Logga in";
  $content = userLogin();
}
else if ($p == "logout") 
{
  $pageTitle = "Logga ut";
  $content = userLogout();
} 
else
{
  $pageTitle = "Status login / logout";
}

?>


<?php include("incl/header.php"); ?>
<div id="content">
  <div class="left border" style="width:80%;">

    <?php if(isset($content)):
      echo $content;
    else: ?> 
      <h1>Status login / logout</h1>
      <p>Denna webbplats har skyddade delar. Du måste logga in för att komma åt dem.</p>
      <p>För tillfället är du: 
      <?php if(userIsAuthenticated()): ?>
        <strong>inloggad</strong>.</p>
        <p><a href="?p=logout">Vill du logga ut</a>?</p>
      <?php else: ?>
        <strong>ej inloggad</strong>.</p>
        <p><a href="?p=login">Vill du logga in</a>?</p>
      <?php endif; ?>  
    <?php endif; ?>

    <hr>
  </div>
</div>
<?php include("incl/footer.php"); ?>