Advertisement
Guest User

index.php

a guest
Dec 21st, 2012
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.46 KB | None | 0 0
  1. <?php    
  2.            
  3.             session_start();
  4.            
  5. ?>
  6.                     <?php if(isset($_GET['op'])){ require_once("login.php"); }
  7.                     ?>
  8. <!DOCTYPE html>
  9. <html xmlns="http://www.w3.org/1999/xhtml">
  10. <head>
  11.    
  12.     <title>FileStore - Home</title>
  13.     <link rel="stylesheet" href="./CSS/style.css" type="text/css" media="screen, projection" />
  14. </head>
  15.  
  16. <body>
  17.  
  18. <div id="wrapper">
  19.  
  20.     <header id="header">
  21.    
  22.     <div id="header-content">
  23.         <strong><h1>FileStore</h1></strong> Upload multiple files at once!
  24.     </div>
  25.    
  26.  
  27.                     <div class="login-info" align="right">
  28.                    
  29. <?php
  30.  
  31.                 require_once("logincheck.php");
  32.    
  33.                             if (!isset($_SESSION['username'])) {
  34.                            
  35.                            
  36.  
  37.                 echo '  <form action="?op" method="POST">
  38.                             Username: <input name="username" >
  39.                             Password: <input type="password" name="password" size="8">
  40.                                       <input type="submit" name="submit" value="Login">
  41.                     </form>';
  42.                    
  43.                    
  44.                             } else
  45.                            
  46.                            
  47.                             echo $welcomeMsg;
  48. ?>
  49.                    
  50.                     </div>
  51.                    
  52.                     <?php
  53.                    
  54.                        
  55.                        
  56.                         if(isset($_SESSION['username'])){
  57.  
  58.                                 echo "<p align='right'>Welcome, </p>" . $_SESSION['username'];
  59.  
  60.                                 //redirect("../TASK2PHP/upload.php");
  61.  
  62.                         } else {
  63.  
  64.                             echo "<p align='right'>You are not logged in.</p>";
  65.                             echo "<b><a href='../registration.php'>Register</a></b>";
  66.                         }
  67.                        
  68.                     ?>
  69.  
  70.  
  71.     </header><!-- #header-->
  72.  
  73.     <section id="middle" align="center">
  74.  
  75.         <div id="container">
  76.        
  77.         <br><br>
  78.             <div id="content">
  79.                 <strong><h1>Welcome to FileStore!</h1></strong><br><br>
  80.                
  81.                 <h3> Please Login on your top right.</h3>
  82.                                            
  83.             </div><!-- #content-->
  84.         </div><!-- #container-->
  85.  
  86.         <aside id="sideLeft">
  87.            
  88.             <div id="menu-x" align="center"><br>
  89.             <strong>Menu</strong><br><br>
  90.            
  91.                     <div class="menu">
  92.                         <ul>
  93.                         <li><a href="index.php">Home</a></li>
  94.                         <li><a href="upload.php">Upload</a></li>
  95.                         <li><a href="files.php">Files</a></li>
  96.                         <li><a href="about.php">About</a></li>
  97.                         <li><a href="help.php">Help</a></li>
  98.                         <li><a href="logout.php">Logout</a></li>
  99.                         </ul>
  100.                         <br style="clear:left"/>
  101.                     </div>
  102.                    
  103.             </div>
  104.  
  105.            
  106.         </aside><!-- #sideLeft -->
  107.  
  108.     </section><!-- #middle-->
  109.  
  110.     <footer id="footer">
  111.         <strong>FileStore:</strong> A CMT 3315 Project by Brian Livori
  112.     </footer><!-- #footer -->
  113.  
  114. </div><!-- #wrapper -->
  115.  
  116. </body>
  117. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement