Advertisement
Guest User

Repair Code

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