0% found this document useful (0 votes)
97 views9 pages

Index PHP

This document contains the code for a basic PHP website for a clinic management system. It includes PHP code files for the homepage, login page, menu, database connection, and a data table. The main index.php file includes these component files and establishes the session and database connection. It uses Bootstrap for layout and navigation.

Uploaded by

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

Index PHP

This document contains the code for a basic PHP website for a clinic management system. It includes PHP code files for the homepage, login page, menu, database connection, and a data table. The main index.php file includes these component files and establishes the session and database connection. It uses Bootstrap for layout and navigation.

Uploaded by

delaarvira
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

indexphp

<?php

session_start();

include "library/koneksi.php"

?>

<!doctype html>

<html lang="en">

<head>

<!-- Required meta tags -->

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Bootstrap CSS -->

<link rel="stylesheet" href="assets/css/bootstrap.min.css" integrity="sha384-


xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N"
crossorigin="anonymous">

<title>Kinik 4 SI Pagi</title>

</head>

<body>

<?php include "menu.php";?>

<?php include "bukafile.php";?>

<!-- Optional JavaScript; choose one of the two! -->

<!-- Option 1: jQuery and Bootstrap Bundle (includes Popper) -->


<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"></script>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-Fy6S3B9q64WdZWQUiU+q4/2Lc9npb8tCaSX9FK7E8HnRr0Jz8D6OP9dO5Vg3Q9ct"
crossorigin="anonymous"></script>

<?php include "footer.php";?>

</body>

</html>

mainphp

<?php

if(isset($_SESSION['SES_ADMIN'])){

echo"

<div class='jumbotron>'jumbotron>

<h1 class='display-4'>Klinik 4 SI Pagi</h1>

<p class='lead'>This is a simple hero unit, a simple jumbotron-style component for calling extra
attention to featured content or information.</p>

<hr class='my-4'>

</div>

exit;

else {

echo "<h2>Selamat Datang di Klinik 4 SI Pagi</h2>";

echo "<b>Anda belum login,silahkan <a href</b>"

?>

koneksiphp

<?php
$myHost = "localhost";

$myUser = "root";

$myPass = "";

$myDbs = "klinik_4sipagi";

$koneksidb = mysql_connect($myHost, $myUser, $myPass);

if (! $koneksidb) {

echo "Failed Connection !";

mysql_select_db($myDbs) or die ("Database not Found !");

?>

menuphp

<nav class="navbar navbar-expand-lg navbar-light bg-light">

<a class="navbar-brand" href="#">Menu Klinik</a>

<button class="navbar-toggler" type="button" data-toggle="collapse" data-


target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">

<span class="navbar-toggler-icon"></span>

</button>

<div class="collapse navbar-collapse" id="navbarSupportedContent">

<ul class="navbar-nav mr-auto">

<li class="nav-item active">

<a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a>

</li>

<li class="nav-item">

<a class="nav-link" href="#">Transaksi</a>

</li>
<li class="nav-item dropdown">

<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-


expanded="false">

Data Master

</a>

<div class="dropdown-menu">

<a class="dropdown-item" href="#">Data Pasien</a>

<a class="dropdown-item" href="#">Data Dokter</a>

<div class="dropdown-divider"></div>

<a class="dropdown-item" href="?page=Petugas_Data">Data Petugas</a>

</div>

<li class="nav-item dropdown">

<a class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-


expanded="false">

Laporan

</a>

<div class="dropdown-menu">

<a class="dropdown-item" href="#"> Laporan Data Pasien</a>

<a class="dropdown-item" href="#"> Laporan Data Dokter</a>

<div class="dropdown-divider"></div>

<a class="dropdown-item" href="#"> Laporan Data Petugas</a>

</div>

</li>

<li class="nav-item">

<a class="nav-link disabled">Disabled</a>

</li>

</ul>

<form class="form-inline my-2 my-lg-0">

<input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">

<button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>


</form>

</div>

</nav>

petugasdataphp

<table class="table table-striped">

<thead>

<tr>

<th scope="col">No</th>

<th scope="col">Nama Lengkap</th>

<th scope="col">UserName</th>

<th scope="col">Level</th>

</tr>

</thead>

<tbody>

<tr>

<th scope="row">1</th>

<td>Mark</td>

<td>Otto</td>

<td>@mdo</td>

</tr>

<tr>

<th scope="row">2</th>

<td>Jacob</td>

<td>Thornton</td>

<td>@fat</td>

</tr>

<tr>

<th scope="row">3</th>

<td>Larry</td>

<td>the Bird</td>
<td>@twitter</td>

</tr>

</tbody>

</table>

bukafilephp

<?php

if($_GET){

switch($_GET['page']){

case '':

if(!file_exists("main.php")) die ("Empaty Main Page!");

include "main.php";break;

case 'Halaman Utama':

if(!file_exists("main.php")) die ("Empaty Main Page!");

include "main.php";break;

case 'Login':

if(!file_exists("login.php")) die ("Empaty Main Page!");

include "login.php";break;

case 'Petugas_data':

if(!file_exists("petugas_data.php")) die ("Sorry Main Page!");

include "petugas_data.php";break;

else{

//Jika tidak mendapatkan variabel URL: ? page

if(!file_exists("main.php")) die ("Empaty Main Page!");

include "main.php";

}
loginphp

<!doctype html>

<html lang="en">

<head>

<meta charset="utf-8">

<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<meta name="description" content="">

<meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">

<meta name="generator" content="Hugo 0.101.0">

<title>Log In</title>

<link rel="canonical" href="https://getbootstrap.com/docs/4.6/examples/sign-in/">

<!-- Bootstrap core CSS -->

<link href="assets/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-


xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N"
crossorigin="anonymous">

<!-- Favicons -->

<link rel="icon" href="/docs/4.6/assets/img/favicons/favicon.ico">

<meta name="msapplication-config" content="/docs/4.6/assets/img/favicons/browserconfig.xml">

<meta name="theme-color" content="#563d7c">

<style>

.bd-placeholder-img {

font-size: 1.125rem;

text-anchor: middle;

-webkit-user-select: none;
-moz-user-select: none;

-ms-user-select: none;

user-select: none;

@media (min-width: 768px) {

.bd-placeholder-img-lg {

font-size: 3.5rem;

</style>

<!-- Custom styles for this template -->

<link href="assets/custom/signin.css" rel="stylesheet">

</head>

<body class="text-center">

<form class="form-signin">

<img class="mb-4" src="/docs/4.6/assets/brand/bootstrap-solid.svg" alt="" width="72"


height="72">

<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>

<label for="inputEmail" class="sr-only">Email address</label>

<input type="email" id="inputEmail" class="form-control" placeholder="Email address" required


autofocus>

<label for="inputPassword" class="sr-only">Password</label>

<input type="password" id="inputPassword" class="form-control" placeholder="Password"


required>

<div class="checkbox mb-3">

<label>

<input type="checkbox" value="remember-me"> Remember me

</label>
</div>

<button class="btn btn-lg btn-primary btn-block" type="submit">Sign in</button>

<p class="mt-5 mb-3 text-muted">&copy; 2024 Fidela Adibah Arvira</p>

</form>

</body>

</html>

You might also like