Created
January 10, 2021 09:22
-
-
Save mzaini30/e342dcacc80ee4b689f9d267d5d8b929 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ob_start(); | |
//cek session | |
session_start(); | |
if(empty($_SESSION['admin'])){ | |
$_SESSION['err'] = '<center>Anda harus login terlebih dahulu!</center>'; | |
header("Location: ./"); | |
die(); | |
} else { | |
?> | |
<!-- | |
Name : Aplikasi Sederhana Manajemen Surat Menyurat | |
Version : v1.0.1 | |
Description : Aplikasi untuk mencatat data surat masuk dan keluar secara digital. | |
Date : 2020 | |
Developer : Bayu Tuto | |
Phone/WA : 0895-3151-8231 | |
Email : [email protected] | |
Website : https://bayututor.com | |
--> | |
<!doctype html> | |
<html lang="en"> | |
<!-- Include Head START --> | |
<?php include('include/head.php'); ?> | |
<!-- Include Head END --> | |
<!-- Body START --> | |
<body class="bg"> | |
<!-- Header START --> | |
<header> | |
<!-- Include Navigation START --> | |
<?php include('include/menu.php'); ?> | |
<!-- Include Navigation END --> | |
</header> | |
<!-- Header END --> | |
<!-- Main START --> | |
<main> | |
<!-- container START --> | |
<div class="container"> | |
<?php | |
if(isset($_REQUEST['page'])){ | |
$page = $_REQUEST['page']; | |
switch ($page) { | |
case 'tsm': | |
include "transaksi_surat_masuk.php"; | |
break; | |
case 'tfk': | |
include "transaksi_fasilitas_keselamatan.php"; | |
break; | |
case 'ctk': | |
include "cetak_disposisi.php"; | |
break; | |
case 'tsk': | |
include "transaksi_surat_keluar.php"; | |
break; | |
case 'asm': | |
include "agenda_surat_masuk.php"; | |
break; | |
case 'ask': | |
include "agenda_surat_keluar.php"; | |
break; | |
case 'ref': | |
include "referensi.php"; | |
break; | |
case 'sett': | |
include "pengaturan.php"; | |
break; | |
case 'pro': | |
include "profil.php"; | |
break; | |
case 'gsm': | |
include "galeri_sm.php"; | |
break; | |
case 'gsk': | |
include "galeri_sk.php"; | |
break; | |
} | |
} else { | |
?> | |
<!-- Row START --> | |
<div class="row"> | |
<!-- Include Header Instansi START --> | |
<?php include('include/header_instansi.php'); ?> | |
<!-- Include Header Instansi END --> | |
<!-- Welcome Message START --> | |
<div class="col s12"> | |
<div class="card"> | |
<div class="card-content"> | |
<center> | |
<h4>Selamat Datang <?php echo $_SESSION['nama']; ?></h4> | |
</center> | |
<center> | |
<img src="./asset/img/logo-dishub-200.png" style="height:600px; padding-top: 5px" alt="dishub" /> <span></span></a></li> | |
</center> | |
<center> | |
<p class="description">Anda login sebagai | |
<?php | |
if($_SESSION['admin'] == 1){ | |
echo "<strong>Super Admin</strong>. Anda memiliki akses penuh terhadap sistem."; | |
} elseif($_SESSION['admin'] == 2){ | |
echo "<strong>Administrator</strong>. Berikut adalah statistik data yang tersimpan dalam sistem."; | |
} else { | |
echo "<strong>Petugas Disposisi</strong>. Berikut adalah statistik data yang tersimpan dalam sistem."; | |
} | |
?></p> | |
</center> | |
</div> | |
</div> | |
</div> | |
<!-- Welcome Message END --> | |
<?php | |
//menghitung jumlah surat masuk | |
$count1 = mysqli_num_rows(mysqli_query($config, "SELECT * FROM tbl_surat_masuk")); | |
//menghitung jumlah surat masuk | |
$count2 = mysqli_num_rows(mysqli_query($config, "SELECT * FROM tbl_surat_keluar")); | |
//menghitung jumlah surat masuk | |
$count3 = mysqli_num_rows(mysqli_query($config, "SELECT * FROM tbl_disposisi")); | |
//menghitung jumlah klasifikasi | |
$count4 = mysqli_num_rows(mysqli_query($config, "SELECT * FROM tbl_klasifikasi")); | |
//menghitung jumlah pengguna | |
$count5 = mysqli_num_rows(mysqli_query($config, "SELECT * FROM tbl_user")); | |
//menghitung jumlah fasilitas keselamatan | |
$count6 = mysqli_num_rows(mysqli_query($config, "SELECT * FROM tbl_fasilitas_keselamatan")); | |
?> | |
<!-- Info Statistic START --> | |
<a href="?page=tsm"> | |
<div class="col s12 m4"> | |
<div class="card cyan"> | |
<div class="card-content"> | |
<span class="card-title white-text"><i class="material-icons md-36">mail</i> Jumlah Surat Masuk</span> | |
<?php echo '<h5 class="white-text link">'.$count1.' Surat Masuk</h5>'; ?> | |
</div> | |
</div> | |
</div> | |
</a> | |
<a href="?page=tfk"> | |
<div class="col s12 m4"> | |
<div class="card cyan"> | |
<div class="card-content"> | |
<span class="card-title white-text"><i class="material-icons md-36">mail</i> Jumlah Fasilitas Keselamatan</span> | |
<?php echo '<h5 class="white-text link">'.$count1.' Fasilitas Keselamatan</h5>'; ?> | |
</div> | |
</div> | |
</div> | |
</a> | |
<a href="?page=tsk"> | |
<div class="col s12 m4"> | |
<div class="card lime darken-1"> | |
<div class="card-content"> | |
<span class="card-title white-text"><i class="material-icons md-36">drafts</i> Jumlah Surat Keluar</span> | |
<?php echo '<h5 class="white-text link">'.$count2.' Surat Keluar</h5>'; ?> | |
</div> | |
</div> | |
</div> | |
</a> | |
<div class="col s12 m4"> | |
<div class="card yellow darken-3"> | |
<div class="card-content"> | |
<span class="card-title white-text"><i class="material-icons md-36">description</i> Jumlah Disposisi</span> | |
<?php echo '<h5 class="white-text link">'.$count3.' Disposisi</h5>'; ?> | |
</div> | |
</div> | |
</div> | |
<a href="?page=ref"> | |
<div class="col s12 m4"> | |
<div class="card deep-orange"> | |
<div class="card-content"> | |
<span class="card-title white-text"><i class="material-icons md-36">class</i> Jumlah Klasifikasi Surat</span> | |
<?php echo '<h5 class="white-text link">'.$count4.' Klasifikasi Surat</h5>'; ?> | |
</div> | |
</div> | |
</div> | |
</a> | |
<?php | |
if($_SESSION['id_user'] == 1 || $_SESSION['admin'] == 2){ | |
?> | |
<a href="?page=sett&sub=usr"> | |
<div class="col s12 m4"> | |
<div class="card blue accent-2"> | |
<div class="card-content"> | |
<span class="card-title white-text"><i class="material-icons md-36">people</i> Jumlah Pengguna</span> | |
<?php echo '<h5 class="white-text link">'.$count5.' Pengguna</h5>'; ?> | |
</div> | |
</div> | |
</div> | |
</a> | |
<?php | |
if($_SESSION['id_user'] == 1 || $_SESSION['admin'] == 2){ | |
?> | |
<a href="?page=sett&sub=usr"> | |
<div class="col s12 m4"> | |
<div class="card blue accent-2"> | |
<div class="card-content"> | |
<span class="card-title white-text"><i class="material-icons md-36">people</i> Jumlah Fasilitas Keseleamatan</span> | |
<?php echo '<h6 class="white-text link">'.$count6.' Fasilitas Keselamatan</h6>'; ?> | |
</div> | |
</div> | |
</div> | |
</a> | |
<!-- Info Statistic START --> | |
<?php | |
} | |
?> | |
</div> | |
<!-- Row END --> | |
<?php | |
} | |
?> | |
</div> | |
<!-- container END --> | |
</main> | |
<!-- Main END --> | |
<!-- Include Footer START --> | |
<?php include('include/footer.php'); ?> | |
<!-- Include Footer END --> | |
</body> | |
<!-- Body END --> | |
</html> | |
<?php | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment