lamhottt

Welcome.php

Aug 26th, 2017
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.92 KB | None | 0 0
  1. <?php defined('sys_run_app') OR exit('403 You dont have permission to access / on this server...');
  2.  
  3. // Pada halaman welcome ini,
  4. // Contoh bagaimana mengakses controller untuk mendapatkan session
  5. $controller = new User_Controller();       
  6. ?>
  7.  
  8. <!DOCTYPE html>
  9. <html>
  10. <head>
  11.     <title>Welcome User <?= $controller->getSessionLogin("user-login") ?> </title>
  12.     <meta name="viewport" content="width=device-width, initial-scale=1">
  13. </head>
  14.     <?= _importJQuery(); ?>
  15.     <?= _importBootstrap(); ?>
  16.     <?= _importGF(); ?>
  17. <body>
  18.    
  19.     <div class="container">
  20.         <h3 class="well">
  21.             Hello User <?= $controller->getSessionLogin("user-login"); ?>
  22.         </h3>
  23.         <hr>
  24.         <div class="well">
  25.             <a href="#" id="logout">Logout</a>
  26.         </div>
  27.     </div>
  28.        
  29.     <script type="text/javascript">
  30.         _onClick("logout",function(){
  31.             _confirm("Are you sure wannt to logout ?",function(){
  32.                 _refresh(_myUrl()+"logout");
  33.             });
  34.         });
  35.     </script>
  36.  
  37. </body>
  38. </html>
Add Comment
Please, Sign In to add comment