SHARE
TWEET

Untitled

a guest May 25th, 2019 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $ProductionContainer = new Models\Database\Product\ProductContainer($conn);
  3. $Usercontainer = new Models\Database\User\UserContainer($conn);
  4. if (isset($_POST['logout'])) {
  5.     $Usercontainer->logout();
  6. }
  7.  
  8.  
  9.  
  10. ?>
  11.  
  12. <?php
  13.  
  14.  
  15.  
  16. $home = "btnz";
  17. $contact = "btnz";
  18. $admin = "btnz";
  19. $login = "btnz";
  20. $register = "btnz";
  21.  
  22. $menuLinkid = $request_uri[1];
  23. if($menuLinkid == "Home" || $menuLinkid == ''){
  24.   $home = 'myActiveButton';
  25. }else if($menuLinkid == "Contact") {
  26.   $contact = "myActiveButton";
  27. }else if($menuLinkid == "Admin") {
  28.   $admin = "myActiveButton";
  29. }else if($menuLinkid == "Login") {
  30.   $login = "myActiveButton";
  31. }else if($menuLinkid == "Register") {
  32.   $register = "myActiveButton";
  33. }
  34. ?>
  35.  
  36.     <nav class="navbar navbar-dark navbar-expand-md" id="app-navbar">
  37.         <div class="container-fluid"><a class="navbar-brand" href="Home"> <img src="../img/Logo/logo.png" alt="The logo" style="width:42px;height:42px;border:0;"></a><button data-toggle="collapse" class="navbar-toggler" data-target="#navcol-1"><span class="sr-only">Toggle navigation</span><span class="navbar-toggler-icon"></span></button>
  38.             <li class="nav-item"><a id="websitename" class="navbar-brand" href="Home">  <div class="intro"></div>
  39.                     <div class="caption v-middle text-center">
  40.                         <h1 class="cd-headline clip" >
  41.                             <span class="blc">The  |</span>
  42.                             <span class="cd-words-wrapper">
  43.                                 <b class="is-visible">Edge Tuition</b>
  44.                             </span>
  45.                         </h1>
  46.                     </div></a></li>
  47.  
  48.             <div class="collapse navbar-collapse" id="navcol-1">
  49.                 <ul class="nav navbar-nav ml-auto">
  50.  
  51.  
  52.  
  53.                   <li class="nav-item"><a class="nav-link" href="/"><button type="button" class=" <?php echo $home;   ?>" name="button1">Home</button></a></li>
  54.  
  55.  
  56.                   <li class="nav-item"><a class="nav-link" href="/Contact"><button type="button" class="<?php echo $contact;   ?>" name="button1">Contact Us</button></a></li>
  57.  
  58.  
  59.                   <li class="nav-item"><a class="nav-link" href="/Admin"><button type="button" class="<?php echo $admin;  ?>" name="button1">Admin</button></a></li>
  60.                   <?php
  61.                   if (isset($_SESSION['user']) && $_SESSION['user'] != 'Guest') {
  62.                 ?>
  63.                 <li>
  64.                     <form class="form-group" method="POST" action="Home">
  65.                         <button type="submit" class="btn btn-link">Logout</button>
  66.                         <input type="hidden" name="logout" value="true" />
  67.                     </form>
  68.                 </li>
  69.                 <li class="nav-item"><a class="nav-link" >|</a></li>
  70.                 <li class="nav-item"><a class="nav-link" href="/Account"><?PHP echo $Usercontainer->getSessionUser(); ?></a></li>
  71.     <?php
  72. } else {
  73.     $_SESSION['user'] = 'Guest';
  74.     ?>
  75.                 <li class="nav-item"><a class="nav-link" ><button type="button" class="<?php echo $login;   ?>" name="button1" data-toggle="modal" data-target="#exampleModalCenter">Login</button></a></li>
  76.  
  77.                   <li class="nav-item"><a class="nav-link"><button type="button" class="<?php echo $register;   ?>" name="button1" data-toggle="modal" data-target="#exampleModalCenter1">Register</button></a></li>
  78.                 <?php
  79.             };
  80.             ?>
  81.  
  82.                  
  83.  
  84.  
  85.                 </ul>
  86.             </div>
  87.         </div>
  88.     </nav>
  89.  
  90. <!-- Modal -->
  91. <div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  92.   <div class="modal-dialog modal-dialog-centered" role="document">
  93.     <div class="modal-content">
  94.       <div class="modal-header">
  95.         <h5 class="modal-title" id="exampleModalLongTitle">Login</h5>
  96.         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  97.           <span aria-hidden="true">&times;</span>
  98.         </button>
  99.       </div>
  100.       <div class="modal-body">
  101.  
  102.             <div class="container container container container-fluid" >
  103.                 <form id="form" >
  104.  
  105.                     <div><img class="rouns beaded img-fluid" id="image" style="width: auto;height: auto;margin: 32px;" src="" /></div>
  106.                   <label>Email</label>
  107.                     <div class="input-field text primary"><input type="email" class="form-control" id="formum" placeholder="Email" /></div>
  108.                   <label>Password</label>
  109.                     <div class="form-group"><input type="password" class="form-control" id="formum2" placeholder="Password"/></div>
  110.                     <a
  111.                         id="linkas" href="Forgot">Forgot your password?</a> <!--  Change href to /Forgot -->
  112.                     <br>
  113.                 </form>
  114.             </div>
  115.       </div>
  116.       <div class="modal-footer">
  117.         <button class="btn btn-primary" id="butonas" type="button">Login</button>
  118.       </div>
  119.     </div>
  120.   </div>
  121. </div>
  122.  
  123.  
  124.  
  125.  
  126. <div class="modal fade" id="exampleModalCenter1" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
  127.   <div class="modal-dialog modal-dialog-centered" role="document">
  128.     <div class="modal-content">
  129.       <div class="modal-header">
  130.         <h5 class="modal-title" id="exampleModalLongTitle">Register</h5>
  131.         <button type="button" class="close" data-dismiss="modal" aria-label="Close">
  132.           <span aria-hidden="true">&times;</span>
  133.         </button>
  134.       </div>
  135.       <div class="modal-body">
  136.  
  137.         <div class="col-lg-offset-1 col-lg-10">
  138.             <form method="POST" action="Register" onkeyup='check();checkAll();'>
  139.                 <label>Name: </label>
  140.                 <br>
  141.                 <input id='txt_name' type="text" class="form-control-sm" name="Name" value="" size="30" />
  142.                 <br><br><br>
  143.                 <label>Surname: </label>
  144.                 <br>
  145.                 <input id='txt_surname'  type="text" class="form-control-sm" name="Surname" value="" size="30" />
  146.                 <br><br><br>
  147.                 <label>Password: </label>
  148.                 <br>
  149.                 <input id="password" type="password" class="form-control-sm" name="Password" value="" size="30" />
  150.                 <br><br><br>
  151.                 <label>Re-Enter Password: </label>
  152.                 <br>
  153.                 <input id="confirm_password" type="password" class="form-control-sm" name="Password2"  value="" size="30" />
  154.                 <span id='message'></span>
  155.                 <br><br><br>
  156.                 <label>Email: </label>
  157.                 <br>
  158.                 <input id='txt_email' type="text" class="form-control-sm" name="Email" value="" size="30" />
  159.                 <br><br>
  160.                 <input id="register-btn" type="submit" class="btn btn-primary" value="Register" name="btn_reg" disabled="disabled" />
  161.             </form>
  162.         </div>
  163.  
  164.  
  165.       </div>
  166.       <div class="modal-footer">
  167.  
  168.         <button class="btn btn-primary" id="butonas" type="button">Login</button>
  169.  
  170.       </div>
  171.     </div>
  172.   </div>
  173. </div>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top