0% found this document useful (0 votes)
12 views2 pages

PHP Dashboard Implementation Guide

This document is the code for a PHP dashboard. It checks if the user is logged in with a username and password stored in sessions. If not logged in, it redirects to the login page. If logged in, it includes files for the header, navbar, and content based on a GET parameter, and links to Bootstrap, icons, and JavaScript files for the dashboard functionality.

Uploaded by

Siau Tong
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

PHP Dashboard Implementation Guide

This document is the code for a PHP dashboard. It checks if the user is logged in with a username and password stored in sessions. If not logged in, it redirects to the login page. If logged in, it includes files for the header, navbar, and content based on a GET parameter, and links to Bootstrap, icons, and JavaScript files for the dashboard functionality.

Uploaded by

Siau Tong
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

7/18/22, 1:55 PM dashboard.

php

1 <?php
2  session_start();
3  if (!isset($_SESSION['username']) || !isset($_SESSION['password'])) {
4    ?>
5      <script language="javascript">
6        alert('Login dulu')
7        [Link]='[Link]';
8      </script>
9    <?php
10 } else {
11 ?>
12 <!doctype html>
13 <html lang="en">
14  <head>
15    <meta charset="utf-8">
16    <meta name="viewport" content="width=device-width, initial-scale=1">
17    <meta name="description" content="">
18    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap
contributors">
19    <meta name="generator" content="Hugo 0.88.1">
20    <title>Dashboard - [Link]</title>
21
22    <!-- Bootstrap CSS -->
23    <link
href="[Link]
rel="stylesheet" integrity="sha384-
1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous">
24    <link rel="canonical"
href="[Link]
25    <!-- Icon Bootstrap CSS -->
26    <link rel="stylesheet" href="[Link]
icons@1.8.1/font/[Link]">
27
28    <!-- Trix Editor -->
29    <link rel="stylesheet" type="text/css" href="[Link]">
30    <script type="text/javascript" src="[Link]"></script>
31
32    <style>
33      .bd-placeholder-img {
34        font-size: 1.125rem;
35        text-anchor: middle;
36        -webkit-user-select: none;
37        -moz-user-select: none;
38        user-select: none;
39     }
40      @media (min-width: 768px) {
41        .bd-placeholder-img-lg {
42          font-size: 3.5rem;
43       }
44     }
45    </style>
46    <link href="[Link]" rel="stylesheet">
47  </head>
48  <body>
49    <?php include "[Link]";?>
50    <div class="container-fluid">
51      <div class="row">
52        <?php include "[Link]";?>

localhost:4649/?mode=php 1/2
7/18/22, 1:55 PM [Link]

53        <main class="col-md-9 ms-sm-auto col-lg-10 px-md-4">


54          <?php
55            if(isset($_GET['dashboard'])){
56              include $_GET['dashboard'].".php";
57           }
58              else{
59                include "[Link]";
60             }
61          ?>
62        </main>
63      </div>
64    </div>
65    <script
src="[Link]
integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p"
crossorigin="anonymous"></script>
66
67    <script src="[Link]
icons@4.28.0/dist/[Link]" integrity="sha384-
uO3SXW5IuS1ZpFPKugNNWqTZRRglnUJK6UAZ/gxOX80nxEkN9NcGZTftn6RzhGWE"
crossorigin="anonymous"></script>
68    <script src="[Link]
integrity="sha384-zNy6FEbO50N+Cg5wap8IKA4M/ZnLJgzc6w2NqACZaK0u0FXfOWRRJOnQtpZun8ha"
crossorigin="anonymous"></script>
69    <script src="[Link]"></script>
70  </body>
71 </html>
72 <?php
73 }
74 ?>

localhost:4649/?mode=php 2/2

You might also like