You are on page 1of 300

SMART UPIM SYSTEM (SUS)

MOHAMAD NUR ADERIN BIN MOHD YUSOF 13DDT17F22028

AHMAD AZHAR BIN ALIAS 13DDT17F2034

A project report submitted in partial fulfillment of the requirements for the award of
Diploma in Information Technology

(programming)

DEPARTMENT OF INFORMATION TECHNOLOGY AND


COMMUNICATION
POLITEKNIK SULTAN ZAINAL ABIDIN

SESSION DECEMBER 2019


ACKNOWLEDGEMENT

In the name of Allah SWT, the Most Gracious, the Most Merciful. Praise to Him the
Almighty that in his will and blessing in giving us the strength and opportunity to accomplish
this Final Year Project.

The deepest gratitude and thank you goes to our supervisor Mrs.Ramlah Binti MD.Zain , for
being supportive, understanding and for giving us detailed and constructive comments
throughout this project. Her wide knowledge and logical way in thinking has been a big help
and encouragement for me in exploring and widen my knowledge in electronics and
programming area. Also, her personal guidance in writing a good thesis has given us a good
start to write this Final Year Project report. Under her continuous supervision, the project is
able to complete within the scheduled time frame.

Next our sincere appreciation is extended to UPIM (Unit Pembangunan Instrusional Dan
Multimedia) Politeknik Sultan Mizan Zainal Abidin. Head unit, Mr Hasni Bin Mahmood a
Head of unit in UPIM, was assisting us throughout our project. Not forgetting our fellow
classmate who have given us several suggestions and ideas for our Final Year Project. We
also would like to express us most gratitude to our family, for their continuous support
towards us upon completing this project

Hopefully, this project would be beneficial for our future undertaking and our career
development. Our special appreciation is going to all people that us have mentioned earlier as
the success of this Final Year Project is partly due to their support, help, guidance and
blessings. Thank you.
ABSTRACT

The project is about Smart UPIM System is a Web/App based system, this is the system for
booking the equipment from UPIM (Unit Pembangunan Instrusional Dan Multimedia) in online
remotely in any type of location in Polytechnic sultan Mizan Zainal Abidin and also helps the
UPIM staff to manage their traditional booking method by using this system, it’s also help the
staff or admin to record the data of booking information also the equipment that was booked. The
main purpose of our system is to help Polytechnic staff if they’re having an important event they
can book equipment from UPIM faster and easier using this system, the polytechnic staff can
easily use this system to book equipment from anywhere and in any location if they’re out or
busy from the polytechnic, the polytechnic staff can choose the equipment from the form that is
from the system, the form is very easy to use and to understand staff only need to click “SEND”
and the form will be delivered directly to the admin and also to the head of the department where
the form sender works at the department, also they can cancel or delete their booking application
using a form that was in system. The admin in this system can add, update and delete the data in
the system in the simple term the admin is the one that managing this system. This system also
can be use by the Head of each department (Ketua jabatan) in polytechnic they can check if their
department staff has made a reservation at any date and also they can confirm or verify the
application by their own staff. This system also had its own database that will be save details of
the sender, ID of the staff, date and time, events name, events location, and also the equipment
that they booking. This system will enable the polytechnic staff to contact with the admin if they
want to do that. This systems is developed by using Notepad++, WAMP and ATOM also PHP
and MySQL as it programming language.
ABSTRAK

Projek ini mengenai Smart Upim System adalah sistem berasaskan Web / Aplikasi, ini
merupakan sistem untuk memesan peralatan dari UPIM (Unit Pembangunan Instruksional dan
Multimedia) secara dalam talian dari semua jenis lokasi di Politeknik Sultan Mizan Zainal Abidin
dan juga membantu staf UPIM untuk menguruskan kaedah Pesanan tradisional mereka dengan
menggunakan sistem ini, juga membantu kakitangan atau pentadbir untuk merekodkan data
maklumat pesanan serta peralatan yang dipesan. Tujuan utama sistem kami adalah untuk
membantu kakitangan Politeknik jika mereka mempunyai peristiwa penting yang dapat mereka
memesan peralatan dari UPIM lebih cepat dan lebih mudah menggunakan sistem ini, staf
politeknik dengan mudah dapat menggunakan sistem ini untuk memesan peralatan dari mana saja
dan di mana-mana lokasi jika mereka keluar atau sibuk dari politeknik, staf politeknik boleh
memilih peralatan dari bentuk yang ada dalam sistem, bentuknya sangat mudah digunakan dan
untuk memahami staf hanya perlu mengklik "SEND" dan borang tersebut akan dihantar terus ke
admin dan juga kepada ketua jabatan di mana pengirim bentuk bekerja di jabatan, mereka juga
boleh membatalkan atau memadam permohonan tempahan mereka menggunakan borang dalam
sistem. Pentadbir dalam sistem ini boleh menambah, mengemas kini, dan memadam data dalam
sistem dengan admin terma mudah adalah pengurus sistem ini. Sistem ini juga boleh digunakan
oleh Pengerusi setiap jabatan (politeknik) di politeknik mereka untuk memeriksa sama ada
kakitangan jabatan mereka telah membuat tempahan pada bila-bila masa dan mereka juga boleh
mengesahkan atau mengesahkan permohonan oleh kakitangan mereka sendiri. Sistem ini juga
mempunyai pangkalan data sendiri yang akan menyimpan butiran penghantar, ID kakitangan,
tarikh dan masa, nama acara, lokasi acara, dan juga peralatan yang mereka pesan. Sistem ini akan
membolehkan kakitangan politeknik menghubungi pentadbir jika mereka ingin berbuat demikian.
Sistem ini dibangunkan menggunakan Notepad ++, WAMP dan ATOM dan PHP dan MySQL
sebagai bahasa pengaturcaraan.
Table of content

CHAPTER 1: INTRODUCTION

1.1 Introduction 1
1.2 Problem Statement 2
1.3 Project Scope 3
1.4 Project Objectives 4
1.5 Project Significant
1.6 Conclusion 5
CHAPTER 2 : LITERATURE REVIEW

2.1 Introduction 6
2.2 Research With Other
2.3 Open Library (Case Study 1) 7
2.3.1 Comparison
2.4 Borrow-it (Case Study 2) 8
2.4.1 Comparison
2.5 Borroclub (Case Study 3) 9
2.5.1 Comparison
2.6 Comparison for case study 1,2 and 3 10
2.7 Programming Tool 10 - 12
2.7.1 Notepad++ 10
2.7.2 WAMP 11
2.7.3 ATOM 12
2.8 Hardware 13
2.8.1 Lenovo 500
2.9 Conclusion 14
CHAPTER 3 : METHODOLOGY

3.1 Methodology 15
3.2 Introduction 15 – 268
3.2.1 Requirement Gathering and Analysis Phase 17
3.2.2 System Design Phase 18
3.2.3 Implementation Phase 30
3.2.4 Integration and Testing Phase 265
3.2.5 Deployment of System 268
3.2.6 Maintenance Phase 268
3.3 Conclusion 268
CHAPTER 4: FINAL DESIGN
4.1 Introduction 269
4.2 Logical Design 269
4.2.1 Flow Chart 270
4.3 Manual User 271
4.3.1 User 271 – 273
4.3.2 Ketua jabatan 274 – 276
4.3.3 Pentadbiran/Admin 277 – 280
CHAPTER 5 : TEST DESCRIPTION AND RESULTS
5.1 Unit testing plan 281 - 283
5.2 Integration Testing Plan 284 – 285
5.3 User Acceptance Test 286 - 287
CHAPTER 6 : DISCUSSIONS
6.1 Advantages of The Project 288
6.2 Limitation of The Project
CHAPTER 7 : CONCLUSIONS AND RECOMMENDATION

7.1 Recommendations 289 - 290


7.2 Conclusion
CHAPTER 8 : REFERENCE 291

CHAPTER 9 : APPENDIX

9.1 Gantt Chart 292 - 293

9.2 Cast Planning 294


CHAPTER 1
INTRODUCTION

1.1 INTRODUCTION

Each student majoring in Digital Technology (Programming) at Polytechnic Sultan


Mizan Zainal Abidin was obliged to take DFT6014 Integrated Project course if they want
to be awarded the diploma in programming at polytechnic. In this course, student must
develop a system that can be used by the polytechnic or any company that has been
chosen by the student themselves. The system that student will develop should meet the
characteristics that have been specified by the polytechnic. Students will be divided in
group of 2 or 3 before they can start their system development.

The student project is a compulsory course to be taken by polytechnic diploma


student. Each student will complete a project based on their study fields. This project will
allow students the opportunity to practise their theoretical knowledge and to solve
problems in the area of Digital Technology. Student will assessed on their skill in
designing, problem solving, and performing technical management work

We will also develop a system to fulfil the requirement to be awarded the Diploma in
Programming. This system will be developing for usability of UPIM (Unit Pembangunan
Instrusional Dan Multimedia). Our system name is Smart Upim System. Unit
pembangunan instrusional dan multimedia was located inside Polytechnic Sultan Mizan
Zainal Abidin, Dungun. This unit is using the manual borrowing type. This system was
developed to make borrowing more easily and faster. The aim of this system is to
facilitate the staff to make online borrowing. This system provides online borrowing for
“Microphones”, “Speakers” and etc.

1
1.2 PROBLEM STATEMENT

i. It’s easy to lose oversight when loaning out equipment


ii. Manually searching through documents to retrieve information or to check availability
becomes increasingly ineffective and inconvenient
iii. If an item is returned in dubious condition, it can be hard to verify or prove that the
damage was caused by a specific person, resulting in unnecessary confusion or disputes.

Based on our research at UPIM (Unit Pembangunan Instrusional Dan


Multimedia), there are some problems that occurred, such as:

1. Traditional Forms

UPIM is still using the traditional way of filling forms, this traditional practise
is not a really good way to save or store the data of the form, the data can be
loss and sometimes it can be eaten by some insects.

2. No access record of users

Admin would have no idea if the equipment was booked by irresponsible


people that didn’t fill the form correctly. If there is a loss of equipment, admin
is not responsible for such loss. It also can lead for admin to trace the exactly
unauthorized/authorized user was booking the equipment.

3. Manual record for user’s data

A user's outbound record by way of writing in a paper, it will enable data loss,
overlapping data and more. If the record is lost, it's hard to admin to find back
the data it will take a long time to gather to all the data perfectly.

2
1.3 PROJECT SCOPE

They are two types of scopes related to this product which is user scope and system
scope.

1.3.1 User Scope

The user scope involve are:

1. Admin

Admin is the one who control whole Smart UPIM system, its staff, and
every other person or thing that is associated with Polytechnic.

2. Ketua Jabatan (Head of Department)


Ketua jabatan can approve and disapprove the application of their own
staff when they book equipment at upim and KJ also can see data of the
application from him/her department.

3. Staff
- The staff is one of the important entities for a Polytechnic. The staff
will be the one that borrowing the equipment.
 Able to apply for borrowing of equipment from UPIM
 Able to see the updates or progress of their application

1.3.2 System Scope

1.3.2.1 Admin

The system will be organized by admin. Only admin can access this system.
For security measures the administrator must enter the password and username before
using system. Admin can view the record. Furthermore, admin can also add, update
and delete list record.

3
1.4 PROJECT OBJECTIVES

In developing this system, some project objectives had been specified. The main purpose of
this project is to improve the current existing borrowing system that in use by UPIM (Unit
Pembangunan Instrusional Dan Multimedia) by developing Smart Upim system. Some
objectives of this project had been identified and listed below.

i. resolve borrowing issues on the same day and time often

ii. giving the staff a single but scalable and efficient platform and it will be easier for them
to make loan or renting equipment from UPIM easier and fast

iii. keep track the user time and date of loaning the equipment

1.5 PROJECT SIGNIFICANT

The proposed system will give more advantages to staff. This system gives the
advantages such as:

i. Easy to use. Staff do not have to misunderstand how to use the system.

ii. Save cost. Can save on cost because of using web form rather than using the paper
form.

iii. The web/apps design. Use the concepts that suits every type of browser and phone.

iv. improve the UPIM traditional system to become more digitalize

4
1.6 CONCLUSION

The conclusion that we provide from this system is will facilitate UPIM (Unit
Pembangunan Instrusional Dan Multimedia) to make their borrowing system more digitalize
and easy to use. When the system has been fully developed it may be used as a stepping stone
to other Polytechnic to digitalize their own units.

Objective is really important in achieve the project goal. We also know the problem
statement for our project and from the problem statement we can observe the solution to
solve the problem. This system is developed for this Units to solve the problem when they
use manually system and user friendly. The system will be going to be develop by using the
methodology that suitable for this system and also based on the literature review that we
study.

5
CHAPTER 2

LITERATURE REVIEW

2.1 INTRODUCTION

A literature review is a survey and discussion of the literature in a given area of study.
It is a concise overview of what has been studied, argued, and established about a topic, and it
usually organized chronologically or thematically. A literature review is written in essay
format. It is not annotated bibliography

Because its groups related works together and discusses trends and developments
rather than focusing on one time at a time. It is not a summary; rather, it evaluates previous
and current research in regard to how relevant and or useful it and how it relates to your own
research.

2.2 RESEARCH WITH OTHERS

Before we developed the Smart Upim System, we have conducted a research on


existing online trading system. We have chosen three online trading systems that similar to
the function of Smart Upim System. Three systems that we have choose namely

6
2.3 Case Study 1( OPEN LIBRARY)

FIGURE 1: Openlibrary.org website

Figure 1 shows the OpenLibrary.org website. This is the homepage for this website.

Table 2.3.1: Comparison between OpenLibrary and Smart Upim System

OPEN LIBRARY SMART UPIM SYSTEM


The website design is not really attractive to The website is design based on what user
the user, the colour and font is not suitable for wanted to see and feel easy to use and the
the “Library” website and it is too small. website also is user-friendly.

7
2.4 Case Study 2 (Borrow-It)

Figure 2: Borrow-itapp.com Main Pages

Figure 2 show Borrow-itapp.com website. This is the homepage for this website.

Table 2.4.1: Comparison between Borrow it and Smart Upim System

BORROW IT SMART UPIM SYSTEM


Really hard for user to understand what is Well organized websites and user
the website about. The design is not well understand what the websites was about.
organized.

8
2.5 Case Study 3(Borroclub)

Figure 3: Borroclub.co.uk Main Pages

Figure 3 show Borroclub.com website. This is the homepage for this website.

Table 2.5.1: Comparison between Borrow it and Smart Upim System

BORROCLUB SMART UPIM SYSTEM

the website is simpler than any other Easy to know what the website is all
website and it’s hard to understand the about and the design is great.
concept of it.

9
2.6 Comparison for case study 1, 2, and 3

We have done the comparison between three online borrowing systems that we
survey. The result is as shown at Table 2.2:

Table 2.6.1: Comparison for Case Study 1, 2, and 3

Characteristic Case Study 1 Case Study 2 Case Study 3


(Open Library) (Borrow-It) (Borroclub)
Detail Information A good Less information Not much
Guide information that was intended information
detail details
Interface Not So Not so attractive Not so attractive
Attractive
Content Quite attractive Not attractive Not so much
content

2.7 PROGRAMMING TOOL

A programming tool is a computer program that software developers use to create, debug,
maintain or otherwise support other programs and applications. In this subtopic, some tools
that are commonly used for development of air quality monitoring system application will be
discussed.

2.7.1 NOTEPAD++

Figure 4: NOTEPAD++

10
Notepad++ is a text and source code editor for use with Microsoft Windows. It
supports tabbed editing, which allows working with multiple open files in a single
window. The project's name comes from the C increment operator. Notepad++ is
distributed as free software. At first the project was hosted on SourceForge.net, from
where it has been downloaded over 28 million times, and twice won the SourceForge
Community Choice Award for Best Developer Tool. The project was hosted on
TuxFamily from 2010 to 2015; since 2015 Notepad++ has been hosted on
GitHub.Notepad++ uses the Scintilla editor component.

2.7.2 WAMP

Figure 5: WAMP

WampServer refers to a software stack for the Microsoft Windows operating system,
created by Romain Bourdon and consisting of the Apache web server, OpenSSL for
SSL support, MySQL database and PHP programming language.

11
2.7.3 ATOM

Figure 6: ATOM

Atom is a free and open-source text and source code editor for macOS, Linux, and
Microsoft Windows with support for plug-ins written in Node.js, and embedded Git
Control, developed by GitHub. Atom is a desktop application built using web
technologies. Most of the extending packages have free software licenses and are
community-built and maintained. Atom is based on Electron (formerly known as
Atom Shell) a framework that enables cross-platform desktop applications using
Chromium and Node.js. It is written in Coffee Script and Less.

12
2.8 HARDWARE

Figure 6: LENOVO 500

2.8.1 Lenovo 500

Flexible: wide-range, anti-glare multitouch display

• Adaptable: Laptop, Stand, Tent, & Tablet

• Portable: ergonomic, lightweight design

• Colors: available in black, white, & red

• Hi-fidelity: superior sound with enhanced audio

• Intelligent: built-in responsive software

13
2.9 Conclusion

The conclusion is we had gone through many of the existing system as the examples
that we can use to be implementing on our project. Through this chapter, advantages of the
system to be built will be described in more detail. The creation of this system will require a
lot of research to ensure that all features of the system can be built to meet the needs of users.

The next chapter will discuss further about the meaning and types of methodology
that our use for development the system project. Besides, we also will state the project
requirement that used for developing this system.

14
CHAPTER 3
METHODOLOGY

3.1 METHODOLOGY

Methodology means the systematic, theoretical analysis of the method applied to a


field of study. It comprises the theoretical analysis of the body of the method and
principles associated with a branch of knowledge. Typically, it encompasses concepts
such as paradigm, theoretical model, phases and quantities or qualitative techniques.

3.2 INTRODUCTION

FIGURE 7: Waterfall

15
The Waterfall Model was the first Process Model to be introduced. It is also referred

to as a linear-sequential life cycle model. It is very simple to understand and use. In a

waterfall model, each phase must be completed before the next phase can begin and there is

no overlapping in the phases.

The waterfall Model illustrates the software development process in a linear

sequential flow. This means that any phase in the development process begins only if the

previous phase is complete. In this waterfall model, the phases do not overlap.

Waterfall approach was first SDLC Model to be used widely in Software Engineering

to ensure success of the project. In "The Waterfall" approach, the whole process of software

development is divided into separate phases. In this Waterfall model, typically, the outcome

of one phase acts as the input for the next phase sequentially.

16
3.2.1 Requirement and Analysis Phase

This phase includes activities such as problems identifying and analysis, and even predicting
potential problems that may arise in the future regarding the system. We need do some
research about our requirements devices or components need to buy to proceed this project.
And also learn some coding language and software to make our devices is useful.

In this phase, the current system is studied in detail. A person responsible for the analysis of
the system is known as analyst. We did some research on UPIM traditional form is simple
but with our online form it will be easier and faster to use.

Figure 8: TRADITIONAL UPIM FORM

17
Figure 9: MODERN UPIM FORM

3.2.2 System Design Phase

The requirement specifications from first phase are studied in this phase and the system
design is prepared. This system design helps in specifying hardware and system requirements
and helps in defining the overall system architecture.

I. User interface design

Interface design of our system for this administration was develop to make it user
friendly and easier

18
SMART UPIM SYSTEM
1. This is the mainpage

Figure 10: Homepage

2. This is Permohonan (Request form page)

Figure 11: Permohonan


19
3. This is Semakan (Review page)

Figure 12: Semakan

4. This is the Pembatalan Form Page (Cancellation Form)

Figure 13: Pembatalan

20
5. This is the Hubungi page (Contact Form)

Figure 14:
Hubungi

6. This is the Homepage for admin

Figure 15:
Admin
Homepage
e

7. This is the List Permohonan Page

Figure 16: List


Permohonan

21
8. This is the Laporan Page

Figure 17: Laporan

9. This is the Tambah Barang Page

Figure 18: Tambah Barang

10. This is the Senarai Barang Page

Figure 19: Senarai Barang

22
11. This is the Mohon Batal Page

Figure 20: Mohon Batal

12. This is the Urus Halaman Page

Figure 21:Urus Halaman

13. This is the Mohon Balas Page

Figure 22: Mohon Balas

23
14. This is the Pengurus Pengguna Page

Figure 23: Pengurusan Pengguna

15. This is the Daftar Pengguna Page

Figure 24: Daftar Pengguna


16. This is the Senarai Pengguna Page

Figure 25: Senarai pengguna


24
17. This is the Tukar Password Page

Figure 26: Tukar Password


18. This is the KJ(Ketua Jabatan) HomePage

Figure 27: KJ Homepage


19. This is the KJ Senarai Permohonan Page

Figure 28: Senarai Pemohon

25
20. This is the KJ Laporan Page

Figure 29: Laporan


21. This is the KJ Pengurus Pengguna Page

Figure 30: Pengurusan pengguna


22. This is the KJ Daftar Pengguna Page

Figure 31: Daftar Pengguna

26
23. This is the KJ Tukar Password Page

Figure 32: Tukar Password

ii Database and Design Model


Smart Door Access System is identified to use Real-time Database and
can view at smartphone application (Smart Door App)

PHPmyadmin
DATABASE

Figure 33: Database

KAKITANGAN: TABLE

Figure 34: Table


27
MAKLUMAT_PINJAMAN: TABLE

Figure 34: Maklumat Pinjaman

PEMBATALAN: TABLE

Figure 34: Pembatalan

PERALATAN: TABLE

Figure 35: Peralatan

28
PERMOHONAN_PERALATAN

Figure 36: Permohonan

TBLCONTACTQUERY

Figure 37: Contact Query

TBLPAGE

Figure 38: Table Page

29
3.2.3 Implementation Phase

In this stage is where our project be demonstrated and this is where the
system is developed. It is followed by testing and then implementation.
This phase is also known as coding and verification phase. This is the
phase that if the system, coding and database shown if the correct output
and is received.

HOME PAGE

30
INDEX.PHP
<?php
include 'dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;

31
}
?>

<!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="">

<title>SMART UPIM SYSTEM</title>


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="css/modern-business.css" rel="stylesheet">

<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}
.carousel-item.active,
.carousel-item-next,
.carousel-item-prev {
display: block;
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;

32
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;

33
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>

<link href="js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jcalendar-source.js"></script>

<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="lib/jquery.js" type="text/javascript"></script>


<script src="src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage :'src/closelabel.png'

})
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'index.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = 'index.php?month='+(month+1)+'&year='+year;

34
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>

</head>

<body>

<!-- Navigation -->


<?php include('includes/header.php');?>
<?php // include('includes/slider.php');?>

<!-- Page Content -->


<div class="container">

<!-- Features Section -->


<br><br>
<div class="row">
<div class="col-lg-6">
<h2 align="left">SMART UPIM SYSTEM</h2>
<p> Unit Pembangunan Instrusional Dan Multimedia (UPIM) ditubuhkan sebagai unit sokongan yang
menyediakan kemudahan dan perkhidmatan audio visual</p>

35
<P>Peralatan ICT yang disediakan seperti :-</P>
<ul>

<li>PA SISTEM</li>
<li>MIKROFON</li>
<li>PORTABLE PA SYSTEM</li>
<li>FOTOGRAFI / KAMERA</li>
<li>RAKAMAN VIDEO</li>
<li>LCD PROJECTOR</li>
<li>SKRIN PUTIH</li>
</ul>
</div>
<div class="col-lg-6">
<div class="jcalendar">

<p style="color:red; text-align:center;">Semak permohonan disini!</p><br />

<table align="center" width="150" cellpadding="0" cellspacing="0" class="tableClass">


<tr>
<td colspan="1">
<div class="btn btn-mini" onclick="goLastMonth(<?php echo $month . ", " . $year; ?>);"><font
color="#313" size="3">&laquo;</font></div>
</td>
<td colspan="5"><span class="title"><?php echo $monthName . " " . $year; ?></span><br /></td>
<td colspan="1" align="right">
<div class="btn btn-mini" onclick="goNextMonth(<?php echo $month . ", " . $year; ?>);"><font
color="#313" size="3">&raquo;</font></div>
</td>
</tr>
<tr>
<td colspan="7">&nbsp; </td>

</tr>
<tr style="background-color:#313">
<th><font color="#fff">S</font></td></th>
<th><font color="#fff">M</font></td></th>
<th><font color="#fff">T</font></td></th>
<th><font color="#fff">W</font></td></th>
<th><font color="#fff">T</font></td></th>
<th><font color="#fff">F</font></td></th>
<th><font color="#fff">S</font></td></th>
</tr>
<tr>
<?php

for($i = 1; $i < $numDays+1; $i++, $counter++){

36
$dateToCompare = $month . '/' . $i . '/' . $year;
$timeStamp = strtotime("$year-$month-$i");

if($i == 1){

$firstDay = date("w", $timeStamp);


for($j = 0; $j < $firstDay; $j++, $counter++){
echo "<td>&nbsp;</td>";
}
}
if($counter % 7 == 0){
?>
</tr>
<tr>
<?php
}
?>
<td <?php echo hiLightEvt($month,$i,$year);?>><a href="<?php echo
'borang_permohonan_lanjut.php' . '?tarikh='. $i . '/' . $month . '/' . $year;?>"><?php echo
$i;?></a></td>
<?php
}
?>
</tr>
</table>
</div>
</div>
</div>
<!-- /.row -->

<hr>

<!-- Call to Action Section -->


<div class="row mb-4">
<div class="col-md-8">
<h4>SYARAT-SYARAT PEMINJAM</h4>
<Ul>
<li>Hanya staf politeknik dibenarkan meminjam</li>
<li>Dijaga dengan rapi</li>
<li>Bertanggungjawab atas kerosakan</li>

</ul>
</div>
<div class="col-md-4">
<a class="btn btn-lg btn-secondary btn-block" href="daftar.php">DAFTAR</a>
</div>
</div>
<hr>

37
<div class="row mb-4">
<div class="col-md-8">
<h4 >MUAT TURUN DI ANDROID</h4>
<Ul>
<li>Mudah dan pantas.</li>

</ul>

<img border="0" alt="UPIM" src="phone.jpg" width="350" height="180">


<div class="col-md-8"><br>
<a class="btn btn-lg btn-secondary btn-block" href="/_SMARTUPIMSYSTEM_10402755.apk">Muat
Turun!!</a>
</div>

</div>
<div class="col-md-4">

<br><br>
<br>
<center>
<img border="0" alt="W3Schools" src="qr UPIM.png" width="250" height="250">

</center>

</div>
</div>

</div>
<!-- /.container -->

<!-- Footer -->


<?php include('includes/footer.php');?>

<!-- Bootstrap core JavaScript -->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

</body>

</html>

38
BORANG_PERMOHONAN.PHP
<?php
include 'dbconnect.php';
?>

<?php require_once('Connections/eperalatan.php'); ?>


<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = "SELECT * FROM peralatan";
$Recordset1 = mysql_query($query_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

39
?>

<?php
include 'dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}

40
}
return $aClass;
}
?>

<!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="">

<title>SMART UPIM SYSTEM | PENDAFTARAN</title>


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="css/modern-business.css" rel="stylesheet">

<!--tTESTTTT-->

<!--TEASDAS-->

<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}
</style>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;

41
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{

42
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}

</style>

<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">


<link rel="stylesheet" href="/resources/demos/style.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
$( function() {
$( "#datepicker" ).datepicker();
} );
</script>
<link href="js/jcalendar.css" rel="stylesheet">

<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />


<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})

43
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'borang_permohonan.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = 'borang_permohonan.php?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

44
}

</script>

<script type="text/javascript">
function tarikh()
{
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var date=(day + "/" + month + "/" + year)

document.getElementById("tarikh_guna").value =date ;
document.getElementById("tarikh_pulang").value =date;
}
</script>

<script language="JavaScript">
function check1()
{

if ((document.getElementById("pinjaman1").value==5) ||
(document.getElementById("pinjaman1").value==6))
{
document.getElementById("bil1").readOnly = true;
}
else
{
document.getElementById("bil1").readOnly = false;
}

if ((document.getElementById("pinjaman2").value==5) ||
(document.getElementById("pinjaman2").value==6))
{
document.getElementById("bil2").readOnly = true;
}
else
{
document.getElementById("bil2").readOnly = false;
}

if ((document.getElementById("pinjaman3").value==5) ||
(document.getElementById("pinjaman3").value==6))

45
{
document.getElementById("bil3").readOnly= true;
}
else
{
document.getElementById("bil3").readOnly = false;
}

if ((document.getElementById("pinjaman4").value==5) ||
(document.getElementById("pinjaman4").value==6))
{
document.getElementById("bil4").readOnly = true;
}
else
{
document.getElementById("bil4").readOnly = false;
}

if ((document.getElementById("pinjaman5").value==5) ||
(document.getElementById("pinjaman5").value==6))
{
document.getElementById("bil5").readOnly = true;
}
else
{
document.getElementById("bil5").readOnly = false;
}

}</script>

<!--DATE-->

<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css"
rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>

<script type="text/javascript">
$(function() {
$("#startdate").datepicker({ dateFormat: "dd/mm/yy" }).val()
$("#enddate").datepicker({ dateFormat: "dd/mm/yy" }).val()
});

</script>
<!--DATE NAME START DATE-->
</head>

<body>

46
<?php include('includes/header.php');?>

<!-- Page Content -->


<div class="container">

<!-- Page Heading/Breadcrumbs -->


<h1 class="mt-4 mb-3">BORANG PERMOHONAN</h1>

<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">Borang Permohonan</li>
</ol>

<div class="row">

<div class="col-lg-6">
<form class="form-horizontal" method="post" name="fsystem" id="fsystem"
action="borang_permohonan-exec.php" onsubmit="if(document.getElementById('agree').checked) {
return true; } else { alert('Sila nyatakan bahawa anda telah membaca dan bersetuju dengan Syarat
yang ditetapkan.'); return false; }">
<div class="row">
<div class="col-lg-9 mb-4">
<div >ID KAKITANGAN<span style="color:red">*</span></div>
<div><input type="text" name="id_kakitangan" id="id_kakitangan" class="form-control"
required></div>
</div>

</div>

<!--ROW-->

<div class="row">
<div class="col-lg-5 mb-4">
<div >TARIKH GUNA <span style="color:red">*</span></div>
<div><input type="text" id="startdate" name="tarikh_guna" class="form-control" size="30"></div>

</div>

<div class="col-lg-4 mb-4">


<div>MASA GUNA<span style="color:red">*</span></div>
<select class="form-control" name="masa_guna" id="masa_guna">

47
<option value="" selected="selected">Pilih</option>
<option value="08.00">08.00</option>
<option value="08.15">08.15</option>
<option value="08.30">08.30</option>
<option value="08.45">08.45</option>
<option value="09.00">09.00</option>
<option value="09.15">09.15</option>
<option value="09.30">09.30</option>
<option value="09.45">09.45</option>
<option value="10.00">10.00</option>
<option value="10.15">10.15</option>
<option value="10.30">10.30</option>
<option value="10.45">10.45</option>
<option value="11.00">11.00</option>
<option value="11.15">11.15</option>
<option value="11.30">11.30</option>
<option value="11.45">11.45</option>
<option value="12.00">12.00</option>
<option value="12.15">12.15</option>
<option value="12.30">12.30</option>
<option value="12.45">12.45</option>
<option value="01.00">01.00</option>
<option value="01.15">01.15</option>
<option value="01.30">01.30</option>
<option value="01.45">01.45</option>
<option value="02.00">02.00</option>
<option value="02.15">02.15</option>
<option value="02.30">02.30</option>
<option value="02.45">02.45</option>
<option value="03.00">03.00</option>
<option value="03.15">03.15</option>
<option value="03.30">03.30</option>
<option value="03.45">03.45</option>
<option value="04.00">04.00</option>
<option value="04.15">04.15</option>
<option value="04.30">04.30</option>
<option value="04.45">04.45</option>
<option value="05.00">05.00</option>
<option value="05.15">05.15</option>
<option value="05.30">05.30</option>
<option value="05.45">05.45</option>
</select>

</div>
<div class="col-lg-3 mb-4">
<div>AM/PM<span style="color:red">*</span></div>
<select class="form-control" name="masa_guna1" id="masa_guna1">
<option value="">Pilih</option>

48
<option value="AM" selected="selected">AM</option>
<option value="PM">PM</option>
</select>

</div>
<!--aCUT-->

</div>
<!--ROW-->
<div class="row">
<div class="col-lg-5 mb-4">
<div >TARIKH PULANG <span style="color:red">*</span></div>
<div><input type="text" id="enddate" name="tarikh_pulang" class="form-control" required></div>

</div>

<div class="col-lg-4 mb-4">


<div>MASA PULANG<span style="color:red">*</span></div>
<select class="form-control" name="masa_pulang" id="masa_pulang">
<option value="" selected="selected">Pilih</option>
<option value="08.00">08.00</option>
<option value="08.15">08.15</option>
<option value="08.30">08.30</option>
<option value="08.45">08.45</option>
<option value="09.00">09.00</option>
<option value="09.15">09.15</option>
<option value="09.30">09.30</option>
<option value="09.45">09.45</option>
<option value="10.00">10.00</option>
<option value="10.15">10.15</option>
<option value="10.30">10.30</option>
<option value="10.45">10.45</option>
<option value="11.00">11.00</option>
<option value="11.15">11.15</option>
<option value="11.30">11.30</option>
<option value="11.45">11.45</option>
<option value="12.00">12.00</option>
<option value="12.15">12.15</option>
<option value="12.30">12.30</option>
<option value="12.45">12.45</option>
<option value="01.00">01.00</option>
<option value="01.15">01.15</option>
<option value="01.30">01.30</option>
<option value="01.45">01.45</option>
<option value="02.00">02.00</option>
<option value="02.15">02.15</option>

49
<option value="02.30">02.30</option>
<option value="02.45">02.45</option>
<option value="03.00">03.00</option>
<option value="03.15">03.15</option>
<option value="03.30">03.30</option>
<option value="03.45">03.45</option>
<option value="04.00">04.00</option>
<option value="04.15">04.15</option>
<option value="04.30">04.30</option>
<option value="04.45">04.45</option>
<option value="05.00">05.00</option>
<option value="05.15">05.15</option>
<option value="05.30">05.30</option>
<option value="05.45">05.45</option>
</select>

</div>
<div class="col-lg-3 mb-4">
<div>AM/PM<span style="color:red">*</span></div>
<select class="form-control" name="masa_pulang1" id="masa_pulang1">
<option value="">Pilih</option>
<option value="AM" selected="selected">AM</option>
<option value="PM">PM</option>
</select>

</div>
</div>

<div class="row">
<div class="col-lg-5 mb-4">
<div >NAMA PROGRAM<span style="color:red">*</span></div>
<div><textarea class="form-control" name="nprogram" id="nprogram" required></textarea></div>
</div>

<div class="col-lg-7 mb-4">


<div >LOKASI PROGRAM</div>
<div><textarea class="form-control" name="tujuan2" id="tujuan2" > </textarea></div>
</div>
</div>

<!--
<div class="row">
<div class="col-lg-5 mb-4">
<div >TENTATIF</div>
<input type="file" class="form-control" name="file" id="file">
</div>
<div class="col-lg-5 mb-4">
<div >TAJUK</div>

50
<input type="text" class="form-control" name="title" id="title">
</div>
</div>-->

<hr>

<h2>PERALATAN & PERKHIDMATAN</h2>

<div class="row">
<div class="col-lg-8 mb-4">
<div >PERALATAN & PERKHIDMATAN 1</div>
<select class="form-control" name="pinjaman1" id="pinjaman1" onchange="check1()" >
<option value="">Pilih</option>
<?php
do {
?>
<option value="<?php echo $row_Recordset1['id_peralatan']?>"><?php echo
$row_Recordset1['nama_peralatan']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select>

</div>
<div class="col-lg-3 mb-4">

<div >KUANTITI 1</div>


<div><input type="text" name="bil1" id="bil1" class="form-control" ></div>
</div>

</div> <!-- ROW-->


<div class="row">
<div class="col-lg-8 mb-4">
<div >PERALATAN & PERKHIDMATAN 2</div>
<select class="form-control" name="pinjaman2" id="pinjaman2" onchange="check1()" >
<option value="">Pilih</option>
<?php
do {
?>

51
<option value="<?php echo $row_Recordset1['id_peralatan']?>"><?php echo
$row_Recordset1['nama_peralatan']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select>

</div>
<div class="col-lg-3 mb-4">

<div >KUANTITI 2</div>


<div><input type="text" name="bil2" id="bil2" class="form-control" ></div>
</div>

</div>

<div class="row">
<div class="col-lg-8 mb-4">
<div >PERALATAN & PERKHIDMATAN 3</div>
<select class="form-control" name="pinjaman3" id="pinjaman3" onchange="check1()" >
<option value="">Pilih</option>
<?php
do {
?>
<option value="<?php echo $row_Recordset1['id_peralatan']?>"><?php echo
$row_Recordset1['nama_peralatan']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select>

</div>
<div class="col-lg-3 mb-4">

<div >KUANTITI 3</div>


<div><input type="text" name="bil3" id="bil3" class="form-control" ></div>
</div>

52
</div>

<div class="row">
<div class="col-lg-8 mb-4">
<div >PERALATAN & PERKHIDMATAN 4</div>
<select class="form-control" name="pinjaman4" id="pinjaman4" onchange="check1()" >
<option value="">Pilih</option>
<?php
do {
?>
<option value="<?php echo $row_Recordset1['id_peralatan']?>"><?php echo
$row_Recordset1['nama_peralatan']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select>

</div>
<div class="col-lg-3 mb-4">

<div >KUANTITI 4</div>


<div><input type="text" name="bil4" id="bil4" class="form-control" ></div>
</div>

</div>

<div class="row">
<div class="col-lg-8 mb-4">
<div align="center">PERALATAN & PERKHIDMATAN 5</div>
<select class="form-control" name="pinjaman5" id="pinjaman5" onchange="check1()" >
<option value="">Pilih</option>
<?php
do {
?>
<option value="<?php echo $row_Recordset1['id_peralatan']?>"><?php echo
$row_Recordset1['nama_peralatan']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}

53
?>
</select>

</div>
<div class="col-lg-3 mb-4">

<div >KUANTITI 5</div>


<div><input type="text" name="bil5" id="bil5" class="form-control" ></div>
</div>

</div>

<div class="row">
<div class="col-lg-8 mb-4">
<div >LAIN-LAIN</div>
<div> <textarea class="form-control" name="lain-lain" id="lain-lain" > </textarea></div>
</div>
</div>
<!--DEWAN-->

<div class="row">
<div class="col-lg-12 mb-4">

<div> <input type="checkbox" name="checkbox" value="check" id="agree" /> Saya telah membaca
dan bersetuju dengan<a rel="facebox" href="page.php?type=syarat" > syarat yang
ditetapkan.</a></div>
</div>
</div>

<div class="row">
<div class="col-lg-8 mb-4">
<div><input type="submit" name="submit" class="btn btn-primary" value="Hantar"
style="cursor:pointer"></div>
</div>

</div>

<!-- /.row -->


</form>
<!-- /.row --></div> <div class="col-lg-6">

<div class="jcalendar">

54
<p style="color:red; text-align:center;">Semak permohonan disini!</p><br />

<table align="center" width="150" cellpadding="0" cellspacing="0" class="tableClass">


<tr>
<td colspan="1">
<div class="btn btn-mini" onclick="goLastMonth(<?php echo $month . ", " . $year; ?>);"><font
color="#313" size="3">&laquo;</font></div>
</td>
<td colspan="5"><span class="title"><?php echo $monthName . " " . $year; ?></span><br /></td>
<td colspan="1" align="right">
<div class="btn btn-mini" onclick="goNextMonth(<?php echo $month . ", " . $year; ?>);"><font
color="#313" size="3">&raquo;</font></div>
</td>
</tr>
<tr>
<td colspan="7">&nbsp; </td>

</tr>
<tr style="background-color:#313">
<th><font color="#fff">S</font></td></th>
<th><font color="#fff">M</font></td></th>
<th><font color="#fff">T</font></td></th>
<th><font color="#fff">W</font></td></th>
<th><font color="#fff">T</font></td></th>
<th><font color="#fff">F</font></td></th>
<th><font color="#fff">S</font></td></th>
</tr>
<tr>
<?php

for($i = 1; $i < $numDays+1; $i++, $counter++){


$dateToCompare = $month . '/' . $i . '/' . $year;
$timeStamp = strtotime("$year-$month-$i");

if($i == 1){

$firstDay = date("w", $timeStamp);


for($j = 0; $j < $firstDay; $j++, $counter++){
echo "<td>&nbsp;</td>";
}
}
if($counter % 7 == 0){
?>
</tr>
<tr>
<?php
}

55
?>
<td <?php echo hiLightEvt($month,$i,$year);?>><a href="<?php echo
'borang_permohonan_lanjut.php' . '?tarikh='. $i . '/' . $month . '/' . $year;?>"><?php echo
$i;?></a></td>
<?php
}
?>
</tr>
</table>

</div>
<!-- Content Row -->
</div></div>
</div>
<?php include('includes/footer.php');?>
<!-- Bootstrap core JavaScript -->

<!--<script src="vendor/jquery/jquery-ui.min.js"></script>
<script src="vendor/jquery/jquery-3.4.1.min.js"></script>-->

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

56
BORANG_PERINCI.PHP

<?php require_once('Connections/eperalatan.php'); ?>


<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_Recordset1 = "-1";
if (isset($_GET['no_rujukan'])) {
$colname_Recordset1 = $_GET['no_rujukan'];
}
mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = sprintf("SELECT * FROM permohonan_peralatan,kakitangan WHERE
permohonan_peralatan.id_pemohon=kakitangan.id_kakitangan AND no_rujukan = %s",
GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

57
$colname_Recordset2 = "-1";
if (isset($_GET['no_rujukan'])) {
$colname_Recordset2 = $_GET['no_rujukan'];
}
mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset2 = sprintf("SELECT lain_lain FROM maklumat_pinjaman WHERE no_rujukan = %s",
GetSQLValueString($colname_Recordset2, "text"));
$Recordset2 = mysql_query($query_Recordset2, $eperalatan) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sistem UPIM</title>

</head>

<body><br><br>
<table width="700" border="0">

<tr style="font-family:Arial, Helvetica, sans-serif">


<td><strong>Nama Pemohon :</strong></td>
<td><?php echo $row_Recordset1['nama']; ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>

<tr style="font-family:Arial, Helvetica, sans-serif">


<td><strong>No. Telefon :</strong></td>
<td><?php echo $row_Recordset1['telefon']; ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Email Pemohon :</strong></td>
<td><?php echo $row_Recordset1['email']; ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Jabatan :</strong></td>
<td><?php echo $row_Recordset1['jabatan']; ?></td>

</tr>

58
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Tarikh Penggunaan :</strong></td>
<td><?php echo $row_Recordset1['tarikh_guna']; ?></td>
<td><strong>Masa :</strong></td>
<td><?php echo $row_Recordset1['masa_guna']; ?></td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Tarikh Pemulangan :</strong></td>
<td><?php echo $row_Recordset1['tarikh_pulang']; ?></td>
<td><strong>Masa :</strong></td>
<td><?php echo $row_Recordset1['masa_pulang']; ?></td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Nama Program:</strong></td>
<td colspan="3"><?php echo $row_Recordset1['nprogram']; ?></td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Lokasi :</strong></td>
<td colspan="3"><?php echo $row_Recordset1['tujuan2']; ?></td>
</tr>
<tr >
<td colspan="4"><?php require 'paparan_peralatan.php'; ?></td>
</tr>
<tr >
<td><strong>Peralatan Lain :</strong></td>
<td><?php echo $row_Recordset2['lain_lain']; ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr >
<td><strong>Kelulusan Pegawai UPIM:</strong></td>
<td><?php echo $row_Recordset1['status_mohon']; ?> / <?php echo
$row_Recordset1['pelulus']; ?></td>
<td><strong>Tarikh Mohon:</strong></td>
<td><?php echo $row_Recordset1['tarikh_mohon']; ?></td>
</tr>
<tr >
<td><strong>Kelulusan Ketua Jabatan:</strong></td>
<td><?php echo $row_Recordset1['status_mohon1']; ?> / <?php echo
$row_Recordset1['pelulus1']; ?></td>
</tr>
</table>
</body>
</html>
<?php
mysql_free_result($Recordset1);
mysql_free_result($Recordset2);
?>

59
BORANG_PERMOHONAN_LANJUT.PHP

<?php

if(isset($_GET['tarikh']))
{
$tarikh="Pada ".$_GET['tarikh'];

}
else
{
$tarikh="";
}
?>

<?php require_once('Connections/eperalatan.php'); ?>


<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":

60
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_Recordset1 = 5;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

$colname_Recordset1 = "-1";
if (isset($_GET['tarikh'])) {
$colname_Recordset1 = $_GET['tarikh'];
}
mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = sprintf("SELECT nama,DATE(tarikh_mohon) AS
tarikh_mohon,jabatan,nprogram,status_mohon,status_mohon1,tarikh_guna,no_rujukan FROM
permohonan_peralatan,kakitangan WHERE
permohonan_peralatan.id_pemohon=kakitangan.id_kakitangan AND tarikh_guna =%s",
GetSQLValueString($colname_Recordset1, "text"));
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1,
$maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}

61
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1,
$queryString_Recordset1);
?>
<?php
include 'dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("d"); }


if(empty($month)){ $month = date("m"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{

$tDayName = date("l");
$todaysDate = date("d/m/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

62
}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>

<!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="">

<title>SMART UPIM SYSTEM | SEMAKAN</title>

<!-- Bootstrap core CSS -->


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

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


<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

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


<link href="css/modern-business.css" rel="stylesheet">
<script type="text/javascript" src="js/bootstrap.js"></script>
<script type="text/javascript" src="js/validation.js"></script>

<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<!-- Temporary navbar container fix -->


<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}

63
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;

64
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>

<link href="js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/jcalendar-source.js"></script>

<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="lib/jquery.js" type="text/javascript"></script>


<script src="src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage :'src/closelabel.png',

})
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){

65
--year;
month = 13;
}
document.location.href = '?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = '?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>
</head>

<body>

<?php include('includes/header.php');?>

66
<!-- Page Content -->

<div class="container">

<h1 class="mt-4 mb-3">SEMAKAN</h1>

<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">SEMAKAN</li>
</ol>

<br>

<legend>Senarai Borang Permohonan UPIM <?php echo $tarikh ?></legend>


<?php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?>
<form class="form-horizontal" method="post" name="" id="" action="" >
<table width="600" border="1" >
<tr class="accordion-heading bre" align="center" style=" font-weight:bold;background-
color:#1993E9">
<td width="29%">Pemohon</td>
<td width="10%">Jabatan</td>
<td width="24%">Program</td>
<td width="10%">Status UPIM</td>
<td width="10%">Status KJ</td>
</tr>
<?php do { ?>
<tr align="center">
<td><a rel="facebox" href="borang_perinci.php?no_rujukan=<?php echo
$row_Recordset1['no_rujukan']; ?>"><?php echo $row_Recordset1['nama']; ?></a></td>
<td><?php echo $row_Recordset1['jabatan']; ?></td>
<td><?php echo $row_Recordset1['nprogram']; ?></td>
<td><?php echo $row_Recordset1['status_mohon']; ?></td>
<td><?php echo $row_Recordset1['status_mohon1'];
?></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>

</form>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>
<form id="form1" method="post" action="">
<div class="alert alert-error">Tiada maklumat permohonan</div>

67
</form>
<?php } // Show if recordset empty ?>
<br><br><br>

</div>
<!-- /.container -->

<!-- Footer -->


<?php include('includes/footer.php');?>

<!-- Bootstrap core JavaScript -->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

68
DAFTAR.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(isset($_POST['send']))
{

$id_kakitangan=$_POST['id_kakitangan'];
$nama=$_POST['nama'];
$no_ic=$_POST['no_ic'];
$jabatan=$_POST['jabatan'];
$telefon=$_POST['telefon'];
$email=$_POST['email'];

$sql="INSERT INTO kakitangan(id_kakitangan,no_ic,nama,jabatan,telefon,email,status,level)


VALUES(:id_kakitangan,:no_ic,:nama,:jabatan,:telefon,:email,'Tidak Aktif','kakitangan')";
$query = $dbh->prepare($sql);

$query->bindParam(':id_kakitangan',$id_kakitangan,PDO::PARAM_STR);
$query->bindParam(':nama',$nama,PDO::PARAM_STR);
$query->bindParam(':no_ic',$no_ic,PDO::PARAM_STR);
$query->bindParam(':jabatan',$jabatan,PDO::PARAM_STR);
$query->bindParam(':telefon',$telefon,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);

$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Borang telah dihantar!! ";
}
else
{
$error="Ada masalah! Sila cuba lagi!!";
}

}
?>
<?php
include 'dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

69
$day = (isset($_GET["day"])) ? $_GET['day'] : "";
$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>
<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">

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

<title>SMART UPIM SYSTEM | PEMBATALAN</title>


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

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


<link href="css/modern-business.css" rel="stylesheet">

<!-- Temporary navbar container fix -->


<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}
</style>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{

71
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{

72
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>

</head>

<body>

<?php include('includes/header.php');?>

<!-- Page Content -->


<div class="container">

<!-- Page Heading/Breadcrumbs -->


<h1 class="mt-4 mb-3">PENDAFTARAN</h1>

<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">Pendaftaran</li>
</ol>

<!-- Content Row -->


<div class="row">
<!-- Map Column -->
<div class="col-lg-8 mb-4">
<h3>BORANG PENDAFTARAN</h3>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>
<form name="sentMessage" method="post">

<div class="control-group form-group">


<div class="controls">
<label>NO KAKITANGAN :</label>
<input type="text" class="form-control" id="id_kakitangan" name="id_kakitangan" required data-
validation-required-message="No. Rujukan">
</div>

73
</div>

<div class="control-group form-group">


<div class="controls">
<label>NO KAD PENGENALAN :</label>
<input type="text" class="form-control" id="no_ic" name="no_ic" required >
</div>
</div>

<div class="control-group form-group">


<div class="controls">
<label>NAMA :</label>
<input type="text" class="form-control" id="nama" name="nama" required >
</div>
</div>

<div class="control-group form-group">


<div class="controls">
<label>JABATAN :</label>

<select class="form-control" id="jabatan" name="jabatan" required>


<option value="JTMK">JABATAN TEKNOLOGI MAKLUMAT DAN KOMUNIKASI</option>
<option value="JKM">JABATAN KEJURUTERAAN MEKANIKAL</option>
<option value="JKA">JABATAN KEJURUTERAAN AWAM</option>
<option value="JKE">JABATAN KEJURUTERAAN ELEKTRIK</option>
<option value="JMSK">JABATAN MATEMATIK, SAINS DAN KOMPUTER</option>
<option value="JPA">JABATAN PENGAJIAN AM</option>
<option value="JHEP">JABATAN HAL EHWAL DAN PEMBANGUNAN PELAJAR</option>
<option value="JSKK">JABATAN SUKAN, KOKURIKULUM DAN KEBUDAYAAN</option>
</select>

</div>
</div>

<div class="control-group form-group">


<div class="controls">
<label>NO TELEFON :</label>
<input type="text" class="form-control" id="telefon" name="telefon" required >
</div>
</div>

<div class="control-group form-group">


<div class="controls">
<label>EMAIL :</label>
<input type="email" class="form-control" id="email" name="email" required >
</div>
</div>

74
<div id="success"></div>
<!-- For success/fail messages -->
<button type="submit" name="send" class="btn btn-primary">Hantar</button>
</form>
</div>

<!-- Contact Details Column -->

</div>
<!-- /.row -->

</div>
<!-- /.container -->
<?php include('includes/footer.php');?>

<!-- Bootstrap core JavaScript -->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

<!-- Contact form JavaScript -->


<!-- Do not edit these files! In order to set the email address and subject line for the contact form go
to the bin/contact_me.php file. -->
<script src="js/jqBootstrapValidation.js"></script>
<script src="js/contact_me.js"></script>

</body>

</html>

75
PAGE.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
?>

<!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="">

<title>SMART UPIM SYSTEM</title>

<!-- Bootstrap core CSS -->


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

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


<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

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


<link href="css/modern-business.css" rel="stylesheet">

<!-- Temporary navbar container fix -->


<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}
</style>

</head>

<body>

76
<?php include('includes/header.php');?>
<!-- Page Content -->
<div class="container">
<?php
$pagetype=$_GET['type'];
$sql = "SELECT type,detail,PageName from tblpages where type=:pagetype";
$query = $dbh -> prepare($sql);
$query->bindParam(':pagetype',$pagetype,PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<h1 class="mt-4 mb-3"><?php echo htmlentities($result->PageName); ?> </h1>

<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active"><?php echo htmlentities($result->PageName); ?></li>
</ol>

<p><?php echo $result->detail; ?> </p>

</div>
<!-- /.container -->
<?php } } ?>

<!-- Footer -->


<?php include('includes/footer.php');?>

<!-- Bootstrap core JavaScript -->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

</body>

</html>

77
HUBUNGI.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(isset($_POST['send']))
{

$id_kakitangan=$_POST['id_kakitangan'];
$message=$_POST['message'];
$sql="INSERT INTO tblcontactusquery(id_kakitangan,Message) VALUES(:id_kakitangan,:message)";
$query = $dbh->prepare($sql);

$query->bindParam(':id_kakitangan',$id_kakitangan,PDO::PARAM_STR);

$query->bindParam(':message',$message,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Maklum Balas Anda Telah dihantar.";
}
else
{
$error="Ada masalah. Sila cuba lagi.";
}

}
?>

<!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="">

<title>SMART UPIM SYSTEM | HUBUNGI</title>


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

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

78
<link href="css/modern-business.css" rel="stylesheet">

<!-- Temporary navbar container fix -->


<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}
</style>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
</style>

</head>

<body>

<?php include('includes/header.php');?>

<!-- Page Content -->


<div class="container">

<!-- Page Heading/Breadcrumbs -->


<h1 class="mt-4 mb-3">HUBUNGI</h1>

<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>

79
</li>
<li class="breadcrumb-item active">Hubungi</li>
</ol>

<!-- Content Row -->


<div class="row">
<!-- Map Column -->
<div class="col-lg-8 mb-4">
<h3>Isi maklum balas anda disini.</h3>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>
<form name="sentMessage" method="post">
<div class="control-group form-group">
<div class="controls">
<label>ID KAKITANGAN :</label>
<input type="text" class="form-control" id="id_kakitangan" name="id_kakitangan" required data-
validation-required-message="Please enter your name.">
<p class="help-block"></p>
</div>
</div>

<div class="control-group form-group">


<div class="controls">
<label>MESEJ :</label>
<textarea rows="10" cols="100" class="form-control" id="message" name="message" required data-
validation-required-message="Please enter your message" maxlength="999"
style="resize:none"></textarea>
</div>
</div>
<div id="success"></div>
<!-- For success/fail messages -->
<button type="submit" name="send" class="btn btn-primary">Send Message</button>
</form>
</div>

<!-- Contact Details Column -->

<div class="col-lg-4 mb-4">


<h3>Maklumat Hubungi</h3>
<br>
<p><b>ALAMAT</b><br>
Politeknik Sultan Mizan Zainal Abidin<br>
KM08, Jalan Paka <br>
Dungun 23000,<br>
Terengganu.
<br>

80
</p>
<p>
<b>NO TELEFON</b><br>
09-8400800
</p>
<p>
<b>WAKTU BUKA</b><br>
ISNIN 09:00 - 17:00<br>
SELASA 09:00 - 17:00<br>
RABU 09:00 - 17:00<br>
KHAMIS 09:00 - 17:00<br>
AHAD 08:00 - 17:00
</p>

</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
<?php include('includes/footer.php');?>

<!-- Bootstrap core JavaScript -->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

<!-- Contact form JavaScript -->


<!-- Do not edit these files! In order to set the email address and subject line for the contact form go
to the bin/contact_me.php file. -->
<script src="js/jqBootstrapValidation.js"></script>
<script src="js/contact_me.js"></script>
</body>

</html>

81
PEMBATALAN.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(isset($_POST['send']))
{

$no_rujukan=$_POST['no_rujukan'];
$message=$_POST['message'];
$sql="INSERT INTO pembatalan(no_rujukan,Message) VALUES(:no_rujukan,:message)";
$query = $dbh->prepare($sql);

$query->bindParam(':no_rujukan',$no_rujukan,PDO::PARAM_STR);
$query->bindParam(':message',$message,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Borang Pembatalan Telah Dihantar!";
}
else
{
$error="Ada masalah! Sila cuba lagi!!";
}

}
?>
<?php
include 'dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);

82
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>
<!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="">

<title>SMART UPIM SYSTEM | PEMBATALAN</title>


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

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


<link href="css/modern-business.css" rel="stylesheet">

83
<!-- Temporary navbar container fix -->
<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}
</style>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{

84
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>

85
</head>

<body>

<?php include('includes/header.php');?>

<!-- Page Content -->


<div class="container">

<!-- Page Heading/Breadcrumbs -->


<h1 class="mt-4 mb-3">PEMBATALAN PERMOHONAN</h1>

<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">PEMBATALAN</li>
</ol>

<!-- Content Row -->


<div class="row">
<!-- Map Column -->
<div class="col-lg-8 mb-4">
<h3>BORANG PEMBATALAN</h3>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>
<form name="sentMessage" method="post">

<div class="control-group form-group">


<div class="controls">
<label>NO RUJUKAN :</label>
<input type="text" class="form-control" id="no_rujukan" name="no_rujukan" required data-
validation-required-message="No. Rujukan">
</div>
</div>
<div class="control-group form-group">
<div class="controls">
<label>SEBAB :</label>
<textarea rows="10" cols="100" class="form-control" id="message" name="message" required data-
validation-required-message="Sebab Pembatalan" maxlength="999"
style="resize:none"></textarea>
</div>
</div>
<div id="success"></div>
<!-- For success/fail messages -->

86
<button type="submit" name="send" class="btn btn-primary">Hantar</button>
</form>
</div>

<!-- Contact Details Column -->

</div>
<!-- /.row -->
</div>
<!-- /.container -->
<?php include('includes/footer.php');?>

<!-- Bootstrap core JavaScript -->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

<!-- Contact form JavaScript -->


<!-- Do not edit these files! In order to set the email address and subject line for the contact form go
to the bin/contact_me.php file. -->
<script src="js/jqBootstrapValidation.js"></script>
<script src="js/contact_me.js"></script>
</body>
</html>

87
SEMAKAN.PHP

<?php require_once('Connections/eperalatan.php'); ?>


<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$colname_Recordset1 = "-1";
if (isset($_GET['cari'])) {
$colname_Recordset1 = $_GET['cari'];
}
mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = sprintf("SELECT no_rujukan,nama,DATE(tarikh_mohon) AS
tarikh_mohon,status_mohon,status_mohon1,nprogram FROM permohonan_peralatan,kakitangan
WHERE no_rujukan = %s AND kakitangan.id_kakitangan=permohonan_peralatan.id_pemohon",
GetSQLValueString($colname_Recordset1, "text"));

88
$Recordset1 = mysql_query($query_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<?php
include 'dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("d"); }


if(empty($month)){ $month = date("m"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{

$tDayName = date("l");
$todaysDate = date("d/m/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}

89
}
}
return $aClass;
}

?>

<!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="">

<title>SMART UPIM SYSTEM | SEMAKAN</title>

<!-- Bootstrap core CSS -->


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

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


<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

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


<link href="css/modern-business.css" rel="stylesheet">

<!-- Temporary navbar container fix -->


<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}

table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;

90
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>

</head>

<body>

<?php include('includes/header.php');?>
<!-- Page Content -->

<div class="container">

<h1 class="mt-4 mb-3">SEMAKAN STATUS PERMOHONAN</h1>

<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">Semakan</li>
</ol>

<br>

<form class="form-horizontal" autocomplete="off" method="get" name="" id="" action="" >

91
<p style="color:red;">Sila Masukkan No Rujukan Anda Disini.</p>
<div class="input-append">
<input class="input-middle" id="cari" name="cari" type="text"/> <input name="carian" class="btn"
type="submit" value="Semak" />

</div>

</form>
<br>
<?php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?>
<form class="form-horizontal" method="post" name="" id="" action="" >

<table width="600" border="1" class="accordion-group table-bordered ">


<tr class="accordion-heading bre" align="center" style=" font-weight:bold;background-
color:#1993E9">
<td width="21%">No.Rujukan</td>
<td width="33%">Nama Pemohon</td>
<td width="23%">Tarikh Mohon</td>
<td width="23%">Program</td>
<td width="23%">Status UPIM</td>
<td width="23%">Status KJ</td>

</tr>
<tr align="center">
<td><?php echo $row_Recordset1['no_rujukan']; ?></td>
<td><?php echo $row_Recordset1['nama']; ?></td>
<td><?php echo $row_Recordset1['tarikh_mohon']; ?></td>
<td><?php echo $row_Recordset1['nprogram']; ?></td>
<td><?php echo $row_Recordset1['status_mohon']; ?></td>
<td><?php echo $row_Recordset1['status_mohon1']; ?></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
</form>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>
<form id="form1" method="post" action="">
<div class="alert alert-error">Tiada maklumat dijumpai</div>
</form>
<?php } // Show if recordset empty ?>

<br><br><br><br><br>
</div>
<!-- /.container -->

<!-- Footer -->

92
<?php include('includes/footer.php');?>

<!-- Bootstrap core JavaScript -->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

ADMIN
PENTADBIR

93
SECURE/INDEX.PHP

<?php require_once('Connections/eperalatan.php'); ?>


<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$colname_Recordset1 = "-1";
if (isset($_GET['cari'])) {
$colname_Recordset1 = $_GET['cari'];
}
mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = sprintf("SELECT no_rujukan,nama,DATE(tarikh_mohon) AS
tarikh_mohon,status_mohon,status_mohon1,nprogram FROM permohonan_peralatan,kakitangan
WHERE no_rujukan = %s AND kakitangan.id_kakitangan=permohonan_peralatan.id_pemohon",
GetSQLValueString($colname_Recordset1, "text"));

94
$Recordset1 = mysql_query($query_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?>
<?php
include 'dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("d"); }


if(empty($month)){ $month = date("m"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{

$tDayName = date("l");
$todaysDate = date("d/m/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}

95
}
}
return $aClass;
}

?>

<!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="">

<title>SMART UPIM SYSTEM | SEMAKAN</title>

<!-- Bootstrap core CSS -->


<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

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


<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

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


<link href="css/modern-business.css" rel="stylesheet">

<!-- Temporary navbar container fix -->


<style>
.navbar-toggler {
z-index: 1;
}

@media (max-width: 576px) {


nav > .container {
width: 100%;
}
}

table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;

96
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/facebox.js" type="text/javascript"></script>

</head>

<body>

<?php include('includes/header.php');?>
<!-- Page Content -->

<div class="container">

<h1 class="mt-4 mb-3">SEMAKAN STATUS PERMOHONAN</h1>

<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">Semakan</li>
</ol>

<br>

<form class="form-horizontal" autocomplete="off" method="get" name="" id="" action="" >

97
<p style="color:red;">Sila Masukkan No Rujukan Anda Disini.</p>
<div class="input-append">
<input class="input-middle" id="cari" name="cari" type="text"/> <input name="carian" class="btn"
type="submit" value="Semak" />

</div>

</form>
<br>
<?php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?>
<form class="form-horizontal" method="post" name="" id="" action="" >

<table width="600" border="1" class="accordion-group table-bordered ">


<tr class="accordion-heading bre" align="center" style=" font-weight:bold;background-
color:#1993E9">
<td width="21%">No.Rujukan</td>
<td width="33%">Nama Pemohon</td>
<td width="23%">Tarikh Mohon</td>
<td width="23%">Program</td>
<td width="23%">Status UPIM</td>
<td width="23%">Status KJ</td>

</tr>
<tr align="center">
<td><?php echo $row_Recordset1['no_rujukan']; ?></td>
<td><?php echo $row_Recordset1['nama']; ?></td>
<td><?php echo $row_Recordset1['tarikh_mohon']; ?></td>
<td><?php echo $row_Recordset1['nprogram']; ?></td>
<td><?php echo $row_Recordset1['status_mohon']; ?></td>
<td><?php echo $row_Recordset1['status_mohon1']; ?></td>
</tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
</form>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>
<form id="form1" method="post" action="">
<div class="alert alert-error">Tiada maklumat dijumpai</div>
</form>
<?php } // Show if recordset empty ?>

<br><br><br><br><br>
</div>
<!-- /.container -->

<!-- Footer -->

98
<?php include('includes/footer.php');?>

<!-- Bootstrap core JavaScript -->


<script src="vendor/jquery/jquery.min.js"></script>
<script src="vendor/tether/tether.min.js"></script>
<script src="vendor/bootstrap/js/bootstrap.min.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

99
DASHBOARD.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(empty($_SESSION['no_staf']))
{

header('location:~/../../index.php');

?>

<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{

100
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | DASHBOARD</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

101
<style>
.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;

102
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>
<link href="../js/jcalendar.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>
</head>

<body>
<?php include('includes/header.php');?>

<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">

103
<div class="col-md-12">

<h2 class="page-title">DASHBOARD</h2>

<div class="row">
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-primary text-light">
<div class="stat-panel text-center">
<?php
$sql ="SELECT id from kakitangan WHERE level='Kakitangan'";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$bg=$query->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo htmlentities($bg);?></div>
<div class="stat-panel-title text-uppercase">Jumlah Kakitangan</div>
</div>
</div>
<a href="senarai_kakitangan.php" class="block-anchor panel-footer">Full Detail <i class="fa fa-
arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-success text-light">
<div class="stat-panel text-center">
<?php
$sql1 ="SELECT id_mohon from permohonan_peralatan ";
$query1 = $dbh -> prepare($sql1);;
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);
$regbd=$query1->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo htmlentities($regbd);?></div>
<div class="stat-panel-title text-uppercase">Jumlah Permohonan</div>
</div>
</div>
<a href="senarai_permohonan.php" class="block-anchor panel-footer text-center">Full Detail
&nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-info text-light">

104
<div class="stat-panel text-center">
<?php
$sql6 ="SELECT * FROM permohonan_peralatan WHERE status_mohon='Pending'";
$query6 = $dbh -> prepare($sql6);;
$query6->execute();
$results6=$query6->fetchAll(PDO::FETCH_OBJ);
$query=$query6->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo htmlentities($query);?></div>
<div class="stat-panel-title text-uppercase">Jumlah Belum Disahkan</div>
</div>
</div>
<a href="senarai_permohonan.php" class="block-anchor panel-footer text-center">Full Detail
&nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-primary text-light">
<div class="stat-panel text-center">
<?php
$sql3 ="SELECT * FROM permohonan_peralatan WHERE status_mohon='Lulus'";
$query3 = $dbh -> prepare($sql3);;
$query3->execute();
$results3=$query3->fetchAll(PDO::FETCH_OBJ);
$query=$query3->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo htmlentities($query);?></div>
<div class="stat-panel-title text-uppercase">Jumlah Diluluskan</div>
</div>
</div>
<a href="laporan.php?capai=capai1" class="block-anchor panel-footer text-center">Full Detail
&nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>

</div>
</div>
</div>
</div>
</div>

105
</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

<script>

window.onload = function(){

// Line chart from swirlData for dashReport


var ctx = document.getElementById("dashReport").getContext("2d");
window.myLine = new Chart(ctx).Line(swirlData, {
responsive: true,
scaleShowVerticalLines: false,
scaleBeginAtZero : true,
multiTooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
});

// Pie Chart from doughutData


var doctx = document.getElementById("chart-area3").getContext("2d");
window.myDoughnut = new Chart(doctx).Pie(doughnutData, {responsive : true});

// Dougnut Chart from doughnutData


var doctx = document.getElementById("chart-area4").getContext("2d");
window.myDoughnut = new Chart(doctx).Doughnut(doughnutData, {responsive : true});

}
</script>
</body>
</html>
<?php ?>

106
SENARAI_PERMOHONAN.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['no_staf'])==0)
{
header('location:~/../../index.php');
}
else{
if(isset($_REQUEST['eid']))
{
$eid=intval($_GET['eid']);
$status=1;
$sql = "UPDATE tblcontactusquery SET status=:status WHERE id=:eid";
$query = $dbh->prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query-> bindParam(':eid',$eid, PDO::PARAM_STR);
$query -> execute();

$msg="Testimonial Successfully Inacrive";


}

?>
<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

107
function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | PERMOHONAN </title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->

108
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<link href="../js/jcalendar.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;

109
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;

110
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass ,textarea{
font-size:100%;
}
</style>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'senarai_permohonan.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = 'senarai_permohonan.php?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

111
if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>
<script type="text/javascript" src="nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
</head>

<body>
<?php include('includes/header.php');?>

<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">SENARAI PERMOHONAN</h2>

<!-- Zero Configuration Table -->


<div class="panel panel-default">
<div class="panel-heading">User queries</div>
<div class="panel-body">
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>
<table id="zctb" class="display table table-striped table-bordered table-hover" cellspacing="0"
width="100%">
<thead>
<tr>

<th style="color:black">NAMA</th>

112
<th style="color:black">JABATAN</th>
<th style="color:black">TARIKH MOHON</th>
<th style="color:black">TARIKH GUNA</th>

</tr>
</thead>
<tfoot>
<tr>

<th style="color:black">NAMA</th>
<th style="color:black">JABATAN</th>
<th style="color:black">TARIKH MOHON</th>
<th style="color:black">TARIKH GUNA</th>

</tr>
</tr>
</tfoot>
<tbody>

<?php $sql = "SELECT nama,DATE(tarikh_mohon) AS


tarikh_mohon,jabatan,nprogram,status_mohon,tarikh_guna,no_rujukan FROM
permohonan_peralatan,kakitangan WHERE
permohonan_peralatan.id_pemohon=kakitangan.id_kakitangan AND status_mohon='Pending'
ORDER BY tarikh_mohon asc";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<tr>

<td><?php echo htmlentities($result->nama);?></td>


<td><?php echo htmlentities($result->jabatan);?></td>
<td><?php echo htmlentities($result->tarikh_mohon);?></td>

<?php if($result->status==1)
{
?><td>Read</td>
<?php } else {?>

<td><a href="borang_permohonan_lanjut.php?tarikh=<?php echo htmlentities($result-


>tarikh_guna);?>" class="btn btn-danger"><?php echo htmlentities($result-
>tarikh_guna);?></a></td>

113
<?php } ?>
</tr>
<?php $cnt=$cnt+1; }} ?>

</tbody>
</table>

</div>
</div>

</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

114
BORANG_PERINCI.PHP

<?php session_start();

if(empty($_SESSION['no_staf']))
{

header('location:~/../../index.php');

}
?>
<?php
include '../dbconnect.php';
?>

<?php
if(isset($_POST['lulus']))
{

$no_rujukan=trim($_POST['no_rujukan']);
print ("<SCRIPT LANGUAGE='JavaScript'>
var answer=window.confirm('Anda pasti mahu luluskan permohonan ini?')
if (answer){
window.location='luluskan_permohonan.php?no_rujukan=$no_rujukan';
}
else
{
window.location = 'senarai_permohonan.php';
}
</SCRIPT>");
}

?>

<?php
if(isset($_POST['tidak']))
{

$no_rujukan=trim($_POST['no_rujukan']);
print ("<SCRIPT LANGUAGE='JavaScript'>
var answer=window.confirm('Anda pasti mahu menolak permohonan ini?')
if (answer){
window.location='batal_permohonan.php?no_rujukan=$no_rujukan';

115
}
else
{
window.location = 'senarai_permohonan.php';
}
</SCRIPT>");
}

?>

<?php
if(isset($_POST['batal']))
{

$no_rujukan=trim($_POST['no_rujukan']);
print ("<SCRIPT LANGUAGE='JavaScript'>
var answer=window.confirm('Anda pasti mahu membatalkan permohonan ini?')
if (answer){
window.location='batal_permohonan1.php?no_rujukan=$no_rujukan';
}
else
{
window.location = 'senarai_permohonan.php';
}
</SCRIPT>");
}

?>

<?php require_once('../Connections/eperalatan.php'); ?>


<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";

116
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$colname_Recordset1 = "-1";
if (isset($_GET['no_rujukan'])) {
$colname_Recordset1 = $_GET['no_rujukan'];
}
mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = sprintf("SELECT * FROM permohonan_peralatan,kakitangan WHERE
permohonan_peralatan.id_pemohon=kakitangan.id_kakitangan AND no_rujukan = %s",
GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

$status=$row_Recordset1['status_mohon'];

if ($status<>"Tidak Lulus" && $status<>"Lulus" )


{
$type='type = "submit"';
}
else
{
$type='type = "hidden"';
}

$colname_Recordset2 = "-1";
if (isset($_GET['no_rujukan'])) {
$colname_Recordset2 = $_GET['no_rujukan'];
}
mysql_select_db($database_eperalatan, $eperalatan);

117
$query_Recordset2 = sprintf("SELECT lain_lain FROM maklumat_pinjaman WHERE no_rujukan = %s",
GetSQLValueString($colname_Recordset2, "text"));
$Recordset2 = mysql_query($query_Recordset2, $eperalatan) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);

?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

118
}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | BORANG TERPERINCI</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<script src="../jquery1.7/development-bundle/jquery-1.7.1.js" type="text/javascript"></script>


<script src="../jquery1.7/development-bundle/ui/jquery.ui.datepicker.js"
type="text/javascript"></script>
<script src="../jquery1.7/development-bundle/ui/jquery.effects.core.js"
type="text/javascript"></script>

119
<script src="../jquery1.7/development-bundle/ui/jquery.ui.core.js" type="text/javascript"></script>
<script src="../jquery1.7/development-bundle/ui/jquery.ui.widget.js"
type="text/javascript"></script>
<script src="../jquery1.7/development-bundle/ui/jquery.effects.drop.js"
type="text/javascript"></script>
<link href="../jquery1.7/development-bundle/themes/base/jquery.ui.all.css" rel="stylesheet"
type="text/css" />
<link href="../jquery1.7/development-bundle/themes/base/jquery.ui.datepicker.css"
rel="stylesheet" type="text/css" />

<link href="../js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : '../src/loading.gif',

})
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'index.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = 'index.php?month='+(month+1)+'&year='+year;
}

120
function remChars(txtControl, txtCount, intMaxLength)
{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>
<script type="text/javascript" src="nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

121
.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;

122
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:auto;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}

</style>
<script>
function printf() {
window.print();
}
</script>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">

<div class="container-fluid">

<div class="row">
<div class="col-md-12">
<form id="form1" method="post" action="">
<div class="accordion-group breadcrumb" style="border:solid; border-color:#ccc">
<legend>Kelulusan Permohonan UPIM <button class="fa fa-print" onclick="printf()">
CETAK</button></legend>
<table class="content1 breadcrumb" width="650" border="0">
<tr bgcolor="#ddd" style="font-family:Arial, Helvetica, sans-serif">
<td><strong>No. Rujukan :</strong></td>
<td style="color:blue"><strong><?php echo $row_Recordset1['no_rujukan']; ?>
<input name="no_rujukan" type="hidden" id="no_rujukan" value="<?php echo
$row_Recordset1['no_rujukan']; ?>" />
</strong></td>

123
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Nama Pemohon :</strong></td>
<td><?php echo $row_Recordset1['nama']; ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>No. Kad Pengenalan :</strong></td>
<td><?php echo $row_Recordset1['no_ic']; ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>No. Telefon :</strong></td>
<td><?php echo $row_Recordset1['telefon']; ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Email Pemohon :</strong></td>
<td><?php echo $row_Recordset1['email']; ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Jabatan :</strong></td>
<td><?php echo $row_Recordset1['jabatan']; ?></td>

</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Tarikh Penggunaan :</strong></td>
<td><?php echo $row_Recordset1['tarikh_guna']; ?></td>
<td><strong>Masa :</strong></td>
<td><?php echo $row_Recordset1['masa_guna']; ?></td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Tarikh Pemulangan :</strong></td>
<td><?php echo $row_Recordset1['tarikh_pulang']; ?></td>
<td><strong>Masa :</strong></td>
<td><?php echo $row_Recordset1['masa_pulang']; ?></td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Nama Program:</strong></td>
<td colspan="3"><?php echo $row_Recordset1['nprogram']; ?></td>
</tr>

124
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Lokasi :</strong></td>
<td colspan="3"><?php echo $row_Recordset1['tujuan2']; ?></td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td colspan="4"><?php require 'paparan_peralatan.php'; ?></td>
</tr>

<tr style="font-family:Arial, Helvetica, sans-serif">


<td><strong>Peralatan Lain :</strong></td>
<td><?php echo $row_Recordset2['lain_lain']; ?></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Kelulusan Pegawai UPIM:</strong></td>
<td><?php echo $row_Recordset1['status_mohon']; ?> / <?php echo $row_Recordset1['pelulus'];
?></td>
<td><strong>Tarikh Permohonan:</strong></td>
<td><?php echo $row_Recordset1['tarikh_mohon']; ?></td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Kelulusan Ketua Jabatan:</strong></td>
<td><?php echo $row_Recordset1['status_mohon1']; ?> / <?php echo $row_Recordset1['pelulus1'];
?></td>

</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td>&nbsp;</td>
<td><input name="lulus" <?php echo $type ?> class="btn btn-primary" id="lulus" value="Lulus" />
<input name="tidak" <?php echo $type ?> class="btn btn-danger" id="tidak" value="Tidak Lulus" />
<input name="batal" <?php echo $type ?> class="btn btn-info" id="batal" value="Batal" /></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
</div>

</div></div>
</div>
</div></div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>

125
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);

mysql_free_result($Recordset2);
?>

126
BORANG_PERMOHONAN_LANJUT.PHP

<?php session_start();

if(empty($_SESSION['no_staf']))
{

header('location:~/../../index.php');

}
?>

<?php

if(isset($_GET['tarikh']))
{
$tarikh="Pada ".$_GET['tarikh'];

}
else
{
$tarikh="";
}
?>

<?php require_once('../Connections/eperalatan.php'); ?>


<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";

127
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_Recordset1 = 5;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

$colname_Recordset1 = "-1";
if (isset($_GET['tarikh'])) {
$colname_Recordset1 = $_GET['tarikh'];
}
mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = sprintf("SELECT nama,DATE(tarikh_mohon) AS
tarikh_mohon,jabatan,nprogram,status_mohon,status_mohon1,tarikh_guna,no_rujukan FROM
permohonan_peralatan,kakitangan WHERE
permohonan_peralatan.id_pemohon=kakitangan.id_kakitangan AND tarikh_guna =%s ORDER BY
tarikh_mohon asc", GetSQLValueString($colname_Recordset1, "text"));
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1,
$maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);

128
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1,
$queryString_Recordset1);
?>
<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';

129
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | SEMAKAN TARIKH</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->

130
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<link href="../js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : '../src/loading.gif',

})
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = '?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = '?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)

131
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>
<script type="text/javascript" src="nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;

132
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{

133
text-align:auto;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}

</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">

<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<div class="accordion-group breadcrumb" style="border:solid; border-color:#ccc">


<legend>Senarai Permohonan Peralatan UPIM <?php echo $tarikh ?></legend>
<?php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?>
<form class="form-horizontal" method="post" name="" id="" action="" >
<table width="600" border="1" class="accordion-group table-bordered ">
<tr class="accordion-heading bre" align="center" style=" font-weight:bold;background-
color:#bdbdbd">
<td width="20%">Pemohon</td>
<td width="10%">Jabatan</td>

<td width="15%">Tarikh Mohon</td>


<td width="15%" >Status UPIM</td>
<td width="15%">Status KJ</td>

<td width="20%">KLIK TULISAN</td>


</tr>
<?php do { ?>
<tr align="center">

134
<td ><?php echo $row_Recordset1['nama']; ?></td>
<td><?php echo $row_Recordset1['jabatan']; ?></td>

<td ><?php echo $row_Recordset1['tarikh_mohon']; ?></td>


<td style="color:blue" bgcolor="#FFFACD"><b><?php echo $row_Recordset1['status_mohon'];
?></b></td>
<td style="color:blue"><b><?php echo $row_Recordset1['status_mohon1']; ?></b></td>

<td><a class="btn btn-info" style="color:#ffffff;" href="./borang_perinci.php?no_rujukan=<?php


echo $row_Recordset1['no_rujukan']; ?>">Perinci</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>

<div class="pagination-center">
<ul class="pager">
<li class="previous">
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0,
$pageNum_Recordset1 - 1), $queryString_Recordset1); ?>">&larr; Lama</a>
</li>
<li class="next">
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage,
min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>">Baru
&rarr;</a>
</li>
</ul>
</div>

</form>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>
<form id="form1" method="post" action="">
<div class="alert alert-error">Tiada maklumat permohonan</div>
</form>
<?php } // Show if recordset empty ?>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br />
</p>
</div>

135
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

136
B_USER.PHP

<?php session_start();

if(empty($_SESSION['no_staf']))
{

header('location:~/../../index.php');

require_once('../Connections/eperalatan.php');
include '../dbconnect.php'; ?>

<?php

if(isset($_POST['submit']))
{

$id_kakitangan=$_POST['id_kakitangan'];
$komen=$_POST['komen'];
$status='Tidak Aktif';

$sql_update = "UPDATE kakitangan SET status='$status', komen='$komen' WHERE id_kakitangan


='$id_kakitangan'";
mysql_query($sql_update) or die('Query failed. ' . mysql_error());
echo("<SCRIPT language='javascript'>window.location='b_user.php'; </SCRIPT>");
}

?>

<?php

if(isset($_POST['submit2']))
{
$id_kakitangan=$_POST['id_kakitangan2'];
$komen="";
$status='Aktif';

$sql_update = "UPDATE kakitangan SET status='$status',komen='$komen' WHERE


id_kakitangan='$id_kakitangan'";
mysql_query($sql_update) or die('Query failed. ' . mysql_error());
echo("<SCRIPT language='javascript'>window.location='b_user.php'; </SCRIPT>");

137
?>

<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = "SELECT * FROM kakitangan WHERE level = 'Kakitangan' AND status='Aktif'";
$Recordset1 = mysql_query($query_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset2 = "SELECT * FROM kakitangan WHERE level='Kakitangan' AND status='Tidak
Aktif'";
$Recordset2 = mysql_query($query_Recordset2, $eperalatan) or die(mysql_error());

138
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);

?>
<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}

139
}
return $aClass;
}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | PENGURUSAN PENGGUNA</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<link href="../js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {

140
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'b_user.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = 'b_user.php?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {

141
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>

<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{

142
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:auto;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}

</style>

143
</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">

<div class="container-fluid">

<div class="row">
<div class="col-md-12">
<!--MULAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-->
<div class="accordion-group breadcrumb" style="border:solid; border-color:#ccc">
<legend>Pengurusan Pengguna</legend>
<form class="form-horizontal" method="post" name="" id="form" action="" >
<h4 align="left">Blacklist Pengguna</h4>
<table width="600" border="0" class="accordion-group table">
<tr>
<td width="26%" align="right">Kakitangan :</td>
<td width="74%"><select class="form-control" name="id_kakitangan" id="id_kakitangan">
<option value="">Pilih Kakitangan</option>
<?php
do {
?>
<option value="<?php echo $row_Recordset1['id_kakitangan']?>"><?php echo
$row_Recordset1['nama']?>-<?php echo $row_Recordset1['id_kakitangan']?></option>
<?php
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1));
$rows = mysql_num_rows($Recordset1);
if($rows > 0) {
mysql_data_seek($Recordset1, 0);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
}
?>
</select></td>
</tr>
<tr>
<td align="right">Keterangan/Komen :</td>
<td><textarea name="komen" id="komen" class="form-control" cols="45"
rows="3"></textarea></td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td><input type="submit" class="btn btn-primary" name="submit" id="submit" value="Blacklist
Pengguna" />
<input type="reset" class="btn btn-danger" name="Reset" id="button" value="Semula" /></td>
</tr>

144
</table>
</form>
<form id="form1" method="post" action="">
<h4 align="left">Aktifkan Pengguna</h4>
<table width="600" border="0" class="accordion-group table">
<tr>
<td width="26%" align="right">Kakitangan :</td>
<td width="74%"><select class="form-control" name="id_kakitangan2" id="id_kakitangan2">
<option value="">Pilih Kakitangan</option>
<?php
do {
?>
<option value="<?php echo $row_Recordset2['id_kakitangan']?>"><?php echo
$row_Recordset2['nama']?>-<?php echo $row_Recordset2['id_kakitangan']?></option>
<?php
} while ($row_Recordset2 = mysql_fetch_assoc($Recordset2));
$rows = mysql_num_rows($Recordset2);
if($rows > 0) {
mysql_data_seek($Recordset2, 0);
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
}
?>
</select></td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td><input type="submit" class="btn btn-primary" name="submit2" id="submit2" value="Aktifkan
Pengguna" />
<input type="reset" class="btn btn-danger" name="button" id="button2" value="Semula" /></td>
</tr>
</table>
</form>
<h4 align="left">&nbsp;</h4>
</div>
<!--TAMAT-->
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>

145
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

146
MANAGE-CONTACTQUERY.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['no_staf'])==0)
{
header('location:index.php');
}
else{
if(isset($_REQUEST['eid']))
{
$eid=intval($_GET['eid']);
$status=1;
$sql = "UPDATE tblcontactusquery SET status=:status WHERE id=:eid";
$query = $dbh->prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query-> bindParam(':eid',$eid, PDO::PARAM_STR);
$query -> execute();

$msg="Testimonial Successfully Inacrive";


}

?>

<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);

147
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | MAKLUM BALAS </title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">

148
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}

149
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}

150
</style>
<link href="../js/jcalendar.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>
</head>

<body>
<?php include('includes/header.php');?>

<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">MAKLUM BALAS</h2>

<!-- Zero Configuration Table -->


<div class="panel panel-default">
<div class="panel-heading">User queries</div>
<div class="panel-body">
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>
<table id="zctb" class="display table table-striped table-bordered table-hover" cellspacing="0"
width="100%">
<thead>
<tr>
<th>#</th>
<th>ID Kakitangan</th>

<th>Mesej</th>
<th>Tarikh dipos</th>
<th>Action</th>
</tr>
</thead>
<tfoot>
<tr>
<th>#</th>
<th>ID Kakitangan</th>

151
<th>Mesej</th>
<th>Tarikh dipos</th>
<th>Action</th>
</tr>
</tr>
</tfoot>
<tbody>

<?php $sql = "SELECT * from tblcontactusquery ";


$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<tr>
<td><?php echo htmlentities($cnt);?></td>
<td><?php echo htmlentities($result->id_kakitangan);?></td>
<td><?php echo htmlentities($result->Message);?></td>
<td><?php echo htmlentities($result->PostingDate);?></td>
<?php if($result->status==1)
{
?><td>Read</td>
<?php } else {?>

<td><a href="manage-conactusquery.php?eid=<?php echo htmlentities($result->id);?>"


onclick="return confirm('Do you really want to read')" >Pending</a>
</td>
<?php } ?>
</tr>
<?php $cnt=$cnt+1; }} ?>

</tbody>
</table>

</div>
</div>

</div>
</div>

</div>

152
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

153
MANAGE_PAGE.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(empty($_SESSION['no_staf']))
{
header('location:~/../../index.php');
}
else{
if($_POST['submit']=="Update")
{
$pagetype=$_GET['type'];
$pagedetails=$_POST['pgedetails'];
$sql = "UPDATE tblpages SET detail=:pagedetails WHERE type=:pagetype";
$query = $dbh->prepare($sql);
$query -> bindParam(':pagetype',$pagetype, PDO::PARAM_STR);
$query-> bindParam(':pagedetails',$pagedetails, PDO::PARAM_STR);
$query -> execute();
$msg="Page data updated successfully";

?>

<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);

154
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | URUS HALAMAN</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">

155
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<script type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0


var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and
'+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
} if (errors) alert('The following error(s) occurred:\n'+errors);
document.MM_returnValue = (errors == '');
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0


eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</script>
<script type="text/javascript" src="nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });

156
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;

157
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>

<link href="../js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">

158
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>
</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">URUS HALAMAN </h2>

<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Form fields</div>
<div class="panel-body">
<form method="post" name="chngpwd" class="form-horizontal" onSubmit="return valid();">

<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo


htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>
<div class="form-group">
<label class="col-sm-4 control-label">Pilih Halaman</label>
<div class="col-sm-8">
<select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
<option value="" selected="selected" class="form-control">***Pilih***</option>

<option value="manage-pages.php?type=syarat">Syarat</option>

</select>
</div>
</div>
<div class="hr-dashed"></div>

<div class="form-group">
<label class="col-sm-4 control-label">selected Page</label>

159
<div class="col-sm-8">
<?php

switch($_GET['type'])
{
case "terms" :
echo "Terms and Conditions";
break;

case "privacy" :
echo "Privacy And Policy";
break;

case "syarat" :
echo "Syarat";
break;

case "faqs" :
echo "FAQs";
break;

default :
echo "";
break;

?>
</div>
</div>

<div class="form-group">
<label class="col-sm-4 control-label">Maklumat Halaman </label>
<div class="col-sm-8">
<textarea class="form-control" rows="5" cols="50" name="pgedetails" id="pgedetails"
placeholder="Package Details" required>
<?php
$pagetype=$_GET['type'];
$sql = "SELECT detail from tblpages where type=:pagetype";
$query = $dbh -> prepare($sql);
$query->bindParam(':pagetype',$pagetype,PDO::PARAM_STR);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{

160
echo htmlentities($result->detail);
}}
?>

</textarea>
</div>
</div>

<div class="form-group">
<div class="col-sm-8 col-sm-offset-4">

<button type="submit" name="submit" value="Update" id="submit" class="btn-primary


btn">Update</button>
</div>
</div>

</form>

</div>
</div>
</div>

</div>

</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>

161
<?php } ?>

162
ADD_PENGGUNA.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['no_staf'])==0)
{
header('location:~/../../index.php');
}
else{

if(isset($_POST['submit']))
{
$id_kakitangan=$_POST['id_kakitangan'];
$no_ic=$_POST['no_ic'];
$nama=$_POST['nama'];
$jabatan=$_POST['jabatan'];

$telefon=$_POST['telefon'];
$email=$_POST['email'];
$katalaluan=$_POST['katalaluan'];
$level=$_POST['level'];

$sql="INSERT INTO
kakitangan(id_kakitangan,no_ic,nama,jabatan,telefon,email,status,katalaluan,level)
VALUES(:id_kakitangan,:no_ic,:nama,:jabatan,:telefon,:email,'Aktif',:katalaluan,:level)";
$query = $dbh->prepare($sql);
$query->bindParam(':id_kakitangan',$id_kakitangan,PDO::PARAM_STR);
$query->bindParam(':no_ic',$no_ic,PDO::PARAM_STR);
$query->bindParam(':nama',$nama,PDO::PARAM_STR);
$query->bindParam(':jabatan',$jabatan,PDO::PARAM_STR);
$query->bindParam(':telefon',$telefon,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':katalaluan',$katalaluan,PDO::PARAM_STR);
$query->bindParam(':level',$level,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Pendaftaran Berjaya";
}
else
{
$error="Ada masalah. Sila cuba lagi.";
}

163
}

?>

<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';

164
}
}
}
return $aClass;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | TAMBAH KAKITANGAN</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;

165
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;

166
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}

</style>
<link href="../js/jcalendar.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>
</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>

167
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Daftar Pengguna</h2>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">Basic Info</div>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>

<div class="panel-body">
<form method="post" class="form-horizontal" name="form3" id="form3" enctype="multipart/form-
data">
<div class="form-group">
<label class="col-sm-2 control-label">Id kakitangan<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="id_kakitangan" class="form-control" required>
</div>
<label class="col-sm-2 control-label">Nama<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="nama" class="form-control" required>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">No Kad Pengenalan<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="no_ic" class="form-control" required>
</div>
<label class="col-sm-2 control-label">Jabatan<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="jabatan" class="form-control" required>
</div>
</div>

<div class="form-group">

<label class="col-sm-2 control-label">Telefon<span style="color:red">*</span></label>


<div class="col-sm-4">

168
<input type="text" name="telefon" class="form-control" required>

</div>
</div>

<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-2 control-label">Email<span style="color:red">*</span></label>
<div class="col-sm-10">
<input type="email" name="email" class="form-control" required>
</div>
</div>

<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-2 control-label">Level<span style="color:red">*</span></label>
<div class="col-sm-4">

<select id="level" name="level" class="form-control" required>


<option value="Kakitangan">Kakitangan</option>
<option value="Pentadbir">Pentadbir</option>
<option value="KetuaJabatan">Ketua Jabatan</option>
<option value="urusDewan">Urus Dewan</option>

</select>

</div>
<label class="col-sm-2 control-label">Katalaluan</label>
<div class="col-sm-4">

<input id="katalaluan" name="katalaluan" type="text" class="form-control">


</div>
</div>

<div class="form-group">
<div class="col-sm-8 col-sm-offset-2">
<button class="btn btn-default" type="reset">Cancel</button>
<button class="btn btn-primary" name="submit" type="submit">Save changes</button>
</div>
</div>

169
</form>
</div>
</div>
</div>
</div>

</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

170
ADD_PERALATAN.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(empty($_SESSION['no_staf']))
{
header('location:~/../../index.php');
}
else{
// Code for change password
if(isset($_POST['submit']))
{
$peralatan=$_POST['peralatan'];
$jenama=$_POST['jenama'];

$sql="INSERT INTO peralatan(nama_peralatan,jenama) VALUES(:peralatan,:jenama)";


$query = $dbh->prepare($sql);
$query->bindParam(':peralatan',$peralatan,PDO::PARAM_STR);
$query->bindParam(':jenama',$jenama,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Tambah Peralatan Berjaya!!";
}
else
{
$error="Tidak berjaya! Sila cuba lagi";
}

}
?>

<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";

171
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">

172
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | TAMBAH ALATAN</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;

173
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;

174
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>

</head>
<link href="../js/jcalendar.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>
<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">Tambah Peralatan</h2>

<div class="row">
<div class="col-md-10">
<div class="panel panel-default">
<div class="panel-heading">Form fields</div>
<div class="panel-body">
<form method="post" name="chngpwd" class="form-horizontal" onSubmit="return valid();">

175
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>
<div class="form-group">
<label class="col-sm-4 control-label">Tambah Peralatan</label>
<div class="col-sm-8">
<input type="text" class="form-control" name="peralatan" id="peralatan" required>

</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">Jenama</label>
<div class="col-sm-8">

<input type="text" class="form-control" name="jenama" id="jenama" >

</div>
</div>

<div class="hr-dashed"></div>

<div class="form-group">
<div class="col-sm-8 col-sm-offset-4">

<button class="btn btn-primary" name="submit" type="submit">Submit</button>


</div>
</div>

</form>

</div>
</div>
</div>

</div>

</div>
</div>

</div>

176
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php } ?>

177
LAPORAN.PHP

<?php session_start();

if(empty($_SESSION['no_staf']))
{

header('location:~/../../index.php');

}
?>

<?php require_once('../Connections/eperalatan.php'); ?>


<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}

178
}

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_Recordset1 = 8;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = "SELECT nama,DATE(tarikh_mohon) AS
tarikh_mohon,jabatan,nprogram,status_mohon,tarikh_guna,no_rujukan FROM
permohonan_peralatan,kakitangan WHERE
permohonan_peralatan.id_pemohon=kakitangan.id_kakitangan AND status_mohon='Pending'
ORDER BY tarikh_mohon asc";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1,
$maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1,
$queryString_Recordset1);

?>

179
<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>

180
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | LAPORAN</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<link href="../js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})

181
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'laporan.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = 'laporan.php?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

182
</script>

<script type="text/javascript" src="nicEdit.js"></script>


<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}

183
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:auto;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}

</style>

</head>

<body><div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>

184
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">

<div class="container-fluid">

<div class="row">
<div class="col-md-12">
<!--MULAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-->
<div class="accordion-group breadcrumb" style="border:solid; border-color:#ccc">
<legend>Laporan Pinjaman UPIM </legend>

<?php
if(trim($_GET['capai'])=='capai1')
{
require 'capai.php';

}
else if(trim($_GET['kategori'])=='Nama')
{
require 'capai_lnama.php';

}
else if(trim($_GET['kategori'])=='Peralatan')
{
require 'capai_lperalatan.php';

?>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br />
</p>
</div>

185
<!--TAMAT-->
</div>
</div>
</div>
</div>
</div></div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

186
SENARAI_KAKITANGAN.PHP

<?php session_start();

if(empty($_SESSION['no_staf']))
{

header('location:~/../../index.php');

}
?>

<?php
include '../dbconnect.php';
?>

<?php
$staff_id = $_SESSION['no_staf'];
$sql_m = "SELECT * FROM kakitangan WHERE id_kakitangan <> '$staff_id'";
$result_m= mysql_query($sql_m) or die('Query failed. ' . mysql_error());

?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){

187
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | SENARAI KAKITANGAN</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->

188
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<link href="../js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = '?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = '?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)

189
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>

</script>
<script type="text/javascript" src="nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{

190
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;

191
}
td{
text-align:auto;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}

</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">

<div class="container-fluid">

<div class="row">
<div class="col-md-12">
<!--MULAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-->
<div class="accordion-group breadcrumb" style="border:solid; border-color:#ccc">
<legend>Senarai Pengguna </legend>

<form class="form-horizontal" method="post" name="" id="form" action="" >


<table width="600" border="1" id="approve" class="accordion-group table-bordered ">
<tr class="accordion-heading bre" align="center" style=" font-weight:bold;background-
color:#1993E9">
<td nowrap="nowrap" width="25">Bil</td>
<td >Nama</td>
<td width="100">Jabatan</td>
<td width="55">Jabatan</td>
<td width="55">Tindakan</td>
</tr>

<?php
$tmpCount = 1;

192
while($row_m = mysql_fetch_assoc($result_m)) {?>
<tr>
<td ><a rel="facebox" style="color:white;" class="btn btn-info" href="perinci_user.php?id=<?php
echo $row_m['id']; ?>" ><?php echo $tmpCount?></a></td>
<td><?php echo $row_m['nama']; ?></td>
<td><?php echo $row_m['level']; ?></td>
<td><?php echo $row_m['jabatan']; ?></td>

<td><a style="color:white;" class="btn btn-danger" href="hapus_user.php?id=<?php echo


$row_m['id']; ?>">Hapus</a></td>
</tr>
<?php $tmpCount ++; }?>

</table>

</form>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><br />
</p>
</div>

<!--TAMAT-->
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

193
</html>

194
SENARAI_PERMOHONAN.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['no_staf'])==0)
{
header('location:~/../../index.php');
}
else{
if(isset($_REQUEST['eid']))
{
$eid=intval($_GET['eid']);
$status=1;
$sql = "UPDATE tblcontactusquery SET status=:status WHERE id=:eid";
$query = $dbh->prepare($sql);
$query -> bindParam(':status',$status, PDO::PARAM_STR);
$query-> bindParam(':eid',$eid, PDO::PARAM_STR);
$query -> execute();

$msg="Testimonial Successfully Inacrive";


}

?>
<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

195
function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | PERMOHONAN </title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->

196
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<link href="../js/jcalendar.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;

197
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;

198
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass ,textarea{
font-size:100%;
}
</style>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'senarai_permohonan.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = 'senarai_permohonan.php?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

199
if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>
<script type="text/javascript" src="nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
</head>

<body>
<?php include('includes/header.php');?>

<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">SENARAI PERMOHONAN</h2>

<!-- Zero Configuration Table -->


<div class="panel panel-default">
<div class="panel-heading">User queries</div>
<div class="panel-body">
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>
<table id="zctb" class="display table table-striped table-bordered table-hover" cellspacing="0"
width="100%">
<thead>
<tr>

<th style="color:black">NAMA</th>

200
<th style="color:black">JABATAN</th>
<th style="color:black">TARIKH MOHON</th>
<th style="color:black">TARIKH GUNA</th>

</tr>
</thead>
<tfoot>
<tr>

<th style="color:black">NAMA</th>
<th style="color:black">JABATAN</th>
<th style="color:black">TARIKH MOHON</th>
<th style="color:black">TARIKH GUNA</th>

</tr>
</tr>
</tfoot>
<tbody>

<?php $sql = "SELECT nama,DATE(tarikh_mohon) AS


tarikh_mohon,jabatan,nprogram,status_mohon,tarikh_guna,no_rujukan FROM
permohonan_peralatan,kakitangan WHERE
permohonan_peralatan.id_pemohon=kakitangan.id_kakitangan AND status_mohon='Pending'
ORDER BY tarikh_mohon asc";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<tr>

<td><?php echo htmlentities($result->nama);?></td>


<td><?php echo htmlentities($result->jabatan);?></td>
<td><?php echo htmlentities($result->tarikh_mohon);?></td>

<?php if($result->status==1)
{
?><td>Read</td>
<?php } else {?>

<td><a href="borang_permohonan_lanjut.php?tarikh=<?php echo htmlentities($result-


>tarikh_guna);?>" class="btn btn-danger"><?php echo htmlentities($result-
>tarikh_guna);?></a></td>

201
<?php } ?>
</tr>
<?php $cnt=$cnt+1; }} ?>

</tbody>
</table>

</div>
</div>

</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

202
MANAGE_PERALATAN.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(empty($_SESSION['no_staf']))
{
header('location:~/../../index.php');
}
else{
if(isset($_GET['del']))
{
$id_peralatan=$_GET['del'];
$sql = "delete from peralatan WHERE id_peralatan=:id_peralatan";
$query = $dbh->prepare($sql);
$query -> bindParam(':id_peralatan',$id_peralatan, PDO::PARAM_STR);
$query -> execute();
$msg="Data Deleted successfully";

?>

<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

203
function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | SENARAI PEMBATALAN </title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->

204
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;

205
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

206
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>
<link href="../js/jcalendar.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>

<script>

207
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = '?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = '?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>
</head>

<body>

208
<?php include('includes/header.php');?>

<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">SENARAI PERALATAN</h2>

<!-- Zero Configuration Table -->


<div class="panel panel-default">
<div class="panel-heading">SENARAI PERALATAN</div>
<div class="panel-body">
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>
<table id_peralatan="zctb" class="display table table-striped table-bordered table-hover"
cellspacing="0" width="100%">
<thead>
<tr>
<th>#</th>
<th>Peralatan</th>
<th>Action</th>

</tr>
</thead>

<tbody>

<?php $sql = "SELECT * from peralatan ";


$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<tr>
<td><?php echo htmlentities($cnt);?></td>
<td><?php echo htmlentities($result->nama_peralatan);?></td>

209
<td>
<a href="manage-peralatan.php?del=<?php echo $result->id_peralatan;?>" onclick="return
confirm('Do you want to delete');"><i class="fa fa-close"></i></a></td>
</tr>
<?php $cnt=$cnt+1; }} ?>

</tbody>
</table>

</div>
</div>

</div>
</div>

</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

210
ADMIN
KETUA
JABATAN

211
INDEX.PHP

<!doctype html>
<html lang="en" class="no-js">

<head>
<title>SMART UPIM SYSTEM | LOGIN</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<link rel="stylesheet" href="css/font-awesome.min.css">


<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="css/bootstrap-social.css">
<link rel="stylesheet" href="css/bootstrap-select.css">
<link rel="stylesheet" href="css/fileinput.min.css">
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" href="css/style.css">
</head>

<body>

<div class="login-page bk-img" style="background-image: url(img/background.jpg);">


<div class="form-content">
<div class="container">
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h1 class="text-center text-bold text-light mt-4x">KETUA JABATAN</h1>
<div class="well row pt-2x pb-3x bk-light">
<div class="col-md-8 col-md-offset-2">
<form method="post" name="login" id="login" action="login-exec.php">

<label for="" class="text-uppercase text-sm">No. Kakitangan </label>


<input type="text" placeholder="No.Kakitangan" id="id_kakitangan" name="id_kakitangan"
class="form-control mb">

<label for="" class="text-uppercase text-sm">Password</label>


<input type="password" name="katalaluan" placeholder="Kata Laluan" id="katalaluan" class="form-
control mb">

212
<div class="col-md-14 ">
<input type="submit" class="btn btn-primary btn-block" name="submit" id="submit"
value="MASUK" />
</div>
<br>
<p>Jika Terlupa katalaluan Sila Hubungi Pentadbir.</p>

</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>

213
DASHBOARD.PHP
<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(empty($_SESSION['no_staf12']))
{

header('location:~/../../index.php');

?>

<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

214
$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | DASHBOARD</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<style>
.today{

215
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;

216
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:50px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}
</style>
<link href="../js/jcalendar.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>
<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'senarai_permohonan.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){

217
++year;
month = 0;
}
document.location.href = 'senarai_permohonan.php?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>
</head>

<body>
<?php include('includes/header.php');?>

<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<h2 class="page-title">DASHBOARD</h2>

<div class="row">

218
<div class="col-md-12">
<div class="row">
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-primary text-light">
<div class="stat-panel text-center">
<?php
$sql ="SELECT id from kakitangan WHERE level='Kakitangan'";
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$bg=$query->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo htmlentities($bg);?></div>
<div class="stat-panel-title text-uppercase">Jumlah Kakitangan</div>
</div>
</div>
<a href="senarai_kakitangan.php" class="block-anchor panel-footer">Full Detail <i class="fa fa-
arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-success text-light">
<div class="stat-panel text-center">
<?php
$sql1 ="SELECT id_mohon from permohonan_peralatan ";
$query1 = $dbh -> prepare($sql1);;
$query1->execute();
$results1=$query1->fetchAll(PDO::FETCH_OBJ);
$regbd=$query1->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo htmlentities($regbd);?></div>
<div class="stat-panel-title text-uppercase">Jumlah Permohonan</div>
</div>
</div>
<a href="senarai_permohonan.php" class="block-anchor panel-footer text-center">Full Detail
&nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-info text-light">
<div class="stat-panel text-center">
<?php
$sql6 ="SELECT * FROM permohonan_peralatan WHERE status_mohon1='Pending'";
$query6 = $dbh -> prepare($sql6);;
$query6->execute();

219
$results6=$query6->fetchAll(PDO::FETCH_OBJ);
$query=$query6->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo htmlentities($query);?></div>
<div class="stat-panel-title text-uppercase">Jumlah Belum Disahkan</div>
</div>
</div>
<a href="laporan.php?capai=capai1" class="block-anchor panel-footer text-center">Full Detail
&nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>
<div class="col-md-3">
<div class="panel panel-default">
<div class="panel-body bk-primary text-light">
<div class="stat-panel text-center">
<?php
$sql3 ="SELECT * FROM permohonan_peralatan WHERE status_mohon1='Lulus'";
$query3 = $dbh -> prepare($sql3);;
$query3->execute();
$results3=$query3->fetchAll(PDO::FETCH_OBJ);
$query=$query3->rowCount();
?>
<div class="stat-panel-number h1 "><?php echo htmlentities($query);?></div>
<div class="stat-panel-title text-uppercase">Jumlah Diluluskan</div>
</div>
</div>
<a href="laporan.php?capai=capai1" class="block-anchor panel-footer text-center">Full Detail
&nbsp; <i class="fa fa-arrow-right"></i></a>
</div>
</div>

</div>
</div>
</div>
</div>
</div>

220
</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

<script>

window.onload = function(){

// Line chart from swirlData for dashReport


var ctx = document.getElementById("dashReport").getContext("2d");
window.myLine = new Chart(ctx).Line(swirlData, {
responsive: true,
scaleShowVerticalLines: false,
scaleBeginAtZero : true,
multiTooltipTemplate: "<%if (label){%><%=label%>: <%}%><%= value %>",
});

// Pie Chart from doughutData


var doctx = document.getElementById("chart-area3").getContext("2d");
window.myDoughnut = new Chart(doctx).Pie(doughnutData, {responsive : true});

// Dougnut Chart from doughnutData


var doctx = document.getElementById("chart-area4").getContext("2d");
window.myDoughnut = new Chart(doctx).Doughnut(doughnutData, {responsive : true});

}
</script>
</body>
</html>
<?php ?>

221
BORANG_PERMOHONAN_LANJUT.PHP

<?php session_start();

if(empty($_SESSION['no_staf12']))
{

header('location:~/../../index.php');

}
?>

<?php

if(isset($_GET['tarikh']))
{
$tarikh="Pada ".$_GET['tarikh'];

}
else
{
$tarikh="";
}
?>

<?php require_once('../Connections/eperalatan.php'); ?>


<?php
$n_staf=$_SESSION['no_staf12'];
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":

222
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_Recordset1 = 5;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

$colname_Recordset1 = "-1";
if (isset($_GET['tarikh'])) {
$colname_Recordset1 = $_GET['tarikh'];
}
mysql_select_db($database_eperalatan, $eperalatan);
$sql12 = "SELECT jabatan FROM kakitangan WHERE id_kakitangan ='$n_staf'";
$result1 = mysql_query($sql12) or die('Query failed. ' . mysql_error());
$row = mysql_fetch_array($result1, MYSQL_ASSOC);

$jabatan1=$row['jabatan'];
$query_Recordset1 = sprintf("SELECT nama,DATE(tarikh_mohon) AS
tarikh_mohon,jabatan,nprogram,status_mohon,status_mohon1,tarikh_guna,no_rujukan FROM
permohonan_peralatan,kakitangan WHERE
permohonan_peralatan.id_pemohon=kakitangan.id_kakitangan AND jabatan='$jabatan1' AND
tarikh_guna =%s ORDER BY tarikh_mohon asc", GetSQLValueString($colname_Recordset1, "text"));
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1,
$maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

223
if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1,
$queryString_Recordset1);
?>
<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{

224
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | BORANG PERMOHONAN TARIKH</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->

225
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<link href="../js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : '../src/loading.gif',

})
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'borang_permohonan_lanjut.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}

226
document.location.href = 'borang_permohonan_lanjut.php?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>
<script type="text/javascript" src="nicEdit.js"></script>
<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);

227
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;

228
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:auto;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}

</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">

<div class="container-fluid">

<div class="row">
<div class="col-md-12">

<div class="accordion-group breadcrumb" style="border:solid; border-color:#ccc">


<legend>Senarai Permohonan Peralatan UPIM <?php echo $tarikh ?></legend>
<?php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty ?>
<form class="form-horizontal" method="post" name="" id="" action="" >
<table width="600" border="1" class="accordion-group table-bordered ">
<tr class="accordion-heading bre" align="center" style=" font-weight:bold;background-
color:#bdbdbd">
<td width="29%">Pemohon</td>
<td width="10%">Jabatan</td>

<td width="15%">Tarikh Mohon</td>


<td width="15%">Status UPIM</td>

229
<td width="15%">Status KJ</td>
<td width="23%">KLIK TULISAN</td>
</tr>
<?php do { ?>
<tr align="center">
<td ><?php echo $row_Recordset1['nama']; ?></td>
<td><?php echo $row_Recordset1['jabatan']; ?></td>

<td style="color:blue;"><?php echo $row_Recordset1['tarikh_mohon']; ?></td>


<td style="color:blue" ><b><?php echo $row_Recordset1['status_mohon']; ?></b></td>
<td style="color:blue" bgcolor="#FFFACD"><b><?php echo $row_Recordset1['status_mohon1'];
?></b></td>
<td><a class="btn btn-info" style="color:#ffffff;" href="./borang_perinci.php?no_rujukan=<?php
echo $row_Recordset1['no_rujukan']; ?>">Perinci</a></td>
</tr>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>

<div class="pagination-center">
<ul class="pager">
<li class="previous">
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0,
$pageNum_Recordset1 - 1), $queryString_Recordset1); ?>">&larr; Lama</a>
</li>
<li class="next">
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage,
min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>">Baru
&rarr;</a>
</li>
</ul>
</div>

</form>
<?php } // Show if recordset not empty ?>
<?php if ($totalRows_Recordset1 == 0) { // Show if recordset empty ?>
<form id="form1" method="post" action="">
<div class="alert alert-error">Tiada maklumat permohonan</div>
</form>
<?php } // Show if recordset empty ?>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

230
<p><br />
</p>
</div>

</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

231
LAPORAN.PHP

<?php session_start();

if(empty($_SESSION['no_staf12']))
{

header('location:~/../../index.php');

}
?>

<?php require_once('../Connections/eperalatan.php'); ?>


<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;

232
}
}

$currentPage = $_SERVER["PHP_SELF"];

$maxRows_Recordset1 = 8;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) {
$pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;

mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset1 = "SELECT nama,DATE(tarikh_mohon) AS
tarikh_mohon,jabatan,nprogram,status_mohon,tarikh_guna,no_rujukan FROM
permohonan_peralatan,kakitangan WHERE
permohonan_peralatan.id_pemohon=kakitangan.id_kakitangan AND status_mohon='Pending'
ORDER BY tarikh_mohon asc";
$query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1,
$maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $eperalatan) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);

if (isset($_GET['totalRows_Recordset1'])) {
$totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false &&
stristr($param, "totalRows_Recordset1") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_Recordset1 = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1,
$queryString_Recordset1);

233
?>
<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}

234
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | LAPORAN</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<link href="../js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

235
})
})
</script>

<script type="text/javascript" src="nicEdit.js"></script>


<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}

236
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:auto;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}

</style>

237
</head>

<body><div id="tipDiv" style="position:absolute; visibility:hidden; z-index:100"></div>


<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">

<div class="container-fluid">

<div class="row">
<div class="col-md-12">
<!--MULAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-->
<div class="accordion-group breadcrumb" style="border:solid; border-color:#ccc">
<legend>Laporan Pinjaman UPIM </legend>

<?php
if(trim($_GET['capai'])=='capai1')
{
require 'capai.php';

}
else if(trim($_GET['kategori'])=='Nama')
{
require 'capai_lnama.php';

}
else if(trim($_GET['kategori'])=='Peralatan')
{
require 'capai_lperalatan.php';

?>

<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

238
<p><br />
</p>
</div>

<!--TAMAT-->
</div>
</div>
</div>
</div>
</div></div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

239
B_USER.PHP

<?php session_start();

if(empty($_SESSION['no_staf12']))
{

header('location:~/../../index.php');

require_once('../Connections/eperalatan.php');
include '../dbconnect.php'; ?>

<?php

if(isset($_POST['submit']))
{

$id_kakitangan=$_POST['id_kakitangan'];
$komen=$_POST['komen'];
$status='Tidak Aktif';

$sql_update = "UPDATE kakitangan SET status='$status', komen='$komen' WHERE id_kakitangan


='$id_kakitangan'";
mysql_query($sql_update) or die('Query failed. ' . mysql_error());
echo("<SCRIPT language='javascript'>window.location='b_user.php'; </SCRIPT>");
}

?>

<?php

if(isset($_POST['submit2']))
{
$id_kakitangan=$_POST['id_kakitangan2'];
$komen="";
$status='Aktif';

$sql_update = "UPDATE kakitangan SET status='$status',komen='$komen' WHERE


id_kakitangan='$id_kakitangan'";
mysql_query($sql_update) or die('Query failed. ' . mysql_error());
echo("<SCRIPT language='javascript'>window.location='b_user.php'; </SCRIPT>");

240
?>

<?php
$n_staf=$_SESSION['no_staf12'];
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) :


mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

mysql_select_db($database_eperalatan, $eperalatan);
$sql12 = "SELECT jabatan FROM kakitangan WHERE id_kakitangan ='$n_staf'";
$result1 = mysql_query($sql12) or die('Query failed. ' . mysql_error());
$row = mysql_fetch_array($result1, MYSQL_ASSOC);

$jabatan1=$row['jabatan'];
$query_Recordset1 = "SELECT * FROM kakitangan WHERE level = 'Kakitangan' AND status='Aktif'
AND jabatan='$jabatan1'";
$Recordset1 = mysql_query($query_Recordset1, $eperalatan) or die(mysql_error());

241
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);

mysql_select_db($database_eperalatan, $eperalatan);
$query_Recordset2 = "SELECT * FROM kakitangan WHERE level='Kakitangan' AND status='Tidak
Aktif' AND jabatan='$jabatan1'";
$Recordset2 = mysql_query($query_Recordset2, $eperalatan) or die(mysql_error());
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 = mysql_num_rows($Recordset2);

?>
<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{

242
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | PENGURUSAN PENGGUNA</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<link href="../js/jcalendar.css" rel="stylesheet">


<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>

243
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'b_user.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = 'b_user.php?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0
var x = document.form1.calName.value;

244
if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>

<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}

245
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:auto;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;

246
font-size:100%;
border:1px solid #ddd;
}

</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">

<div class="container-fluid">

<div class="row">
<div class="col-md-12">
<!--MULAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-->
<div class="accordion-group breadcrumb" style="border:solid; border-color:#ccc">
<legend>Pengurusan Pengguna</legend>

<form id="form1" method="post" action="">


<h4 align="left">Aktifkan Pengguna</h4>
<table width="600" border="0" class="accordion-group table">
<tr>
<td width="26%" align="right">Kakitangan :</td>
<td width="74%"><select class="form-control" name="id_kakitangan2" id="id_kakitangan2">
<option value="">Pilih Kakitangan</option>
<?php
do {
?>
<option value="<?php echo $row_Recordset2['id_kakitangan']?>"><?php echo
$row_Recordset2['nama']?>-<?php echo $row_Recordset2['jabatan']?></option>
<?php
} while ($row_Recordset2 = mysql_fetch_assoc($Recordset2));
$rows = mysql_num_rows($Recordset2);
if($rows > 0) {
mysql_data_seek($Recordset2, 0);
$row_Recordset2 = mysql_fetch_assoc($Recordset2);
}
?>
</select></td>
</tr>
<tr>
<td align="right">&nbsp;</td>

247
<td><input type="submit" class="btn btn-primary" name="submit2" id="submit2" value="Aktifkan
Pengguna" />
<input type="reset" class="btn btn-danger" name="button" id="button2" value="Semula" /></td>
</tr>
</table>
</form>
<h4 align="left">&nbsp;</h4>
</div>
<!--TAMAT-->
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>
<?php
mysql_free_result($Recordset1);
?>

248
ADD_PENGGUNA.PHP

<?php
session_start();
error_reporting(0);
include('includes/config.php');
if(strlen($_SESSION['no_staf12'])==0)
{
header('location:~/../../index.php');
}
else{

if(isset($_POST['submit']))
{
$id_kakitangan=$_POST['id_kakitangan'];
$no_ic=$_POST['no_ic'];
$nama=$_POST['nama'];
$jabatan=$_POST['jabatan'];

$telefon=$_POST['telefon'];
$email=$_POST['email'];
$level=$_POST['level'];

$sql="INSERT INTO kakitangan(id_kakitangan,no_ic,nama,jabatan,telefon,email,status,level)


VALUES(:id_kakitangan,:no_ic,:nama,:jabatan,:telefon,:email,'Aktif',:level)";
$query = $dbh->prepare($sql);
$query->bindParam(':id_kakitangan',$id_kakitangan,PDO::PARAM_STR);
$query->bindParam(':no_ic',$no_ic,PDO::PARAM_STR);
$query->bindParam(':nama',$nama,PDO::PARAM_STR);
$query->bindParam(':jabatan',$jabatan,PDO::PARAM_STR);

$query->bindParam(':telefon',$telefon,PDO::PARAM_STR);
$query->bindParam(':email',$email,PDO::PARAM_STR);
$query->bindParam(':level',$level,PDO::PARAM_STR);
$query->execute();
$lastInsertId = $dbh->lastInsertId();
if($lastInsertId)
{
$msg="Your info submitted successfully";
}
else
{
$error="Something went wrong. Please try again";
}

249
?>

<?php
include '../dbconnect.php';
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}

250
}
return $aClass;
}
?>
<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS| TAMBAH PENGGUNA</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;

251
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{

252
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:center;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}
table.tableClass input,textarea{
font-size:100%;
}

</style>
<link href="../js/jcalendar.css" rel="stylesheet">
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>
</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">
<div class="container-fluid">

253
<div class="row">
<div class="col-md-12">

<h2 class="page-title">Daftar Pengguna</h2>

<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">Basic Info</div>
<?php if($error){?><div class="errorWrap"><strong>ERROR</strong>:<?php echo
htmlentities($error); ?> </div><?php }
else if($msg){?><div class="succWrap"><strong>SUCCESS</strong>:<?php echo htmlentities($msg);
?> </div><?php }?>

<div class="panel-body">
<form method="post" class="form-horizontal" name="form3" id="form3" enctype="multipart/form-
data">
<div class="form-group">
<label class="col-sm-2 control-label">Id kakitangan<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="id_kakitangan" class="form-control" required>
</div>
<label class="col-sm-2 control-label">Nama<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="nama" class="form-control" required>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">No Kad Pengenalan</label>
<div class="col-sm-4">
<input type="text" name="no_ic" class="form-control">
</div>
<label class="col-sm-2 control-label">Jabatan<span style="color:red">*</span></label>
<div class="col-sm-4">
<input type="text" name="jabatan" class="form-control" required>
</div>
</div>

<div class="form-group">

<label class="col-sm-2 control-label">Telefon<span style="color:red">*</span></label>


<div class="col-sm-4">

<input type="text" name="telefon" class="form-control" required>

254
</div>
</div>

<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-2 control-label">Email</label>
<div class="col-sm-10">
<input type="email" name="email" class="form-control" required>
</div>
</div>

<div class="hr-dashed"></div>
<div class="form-group">
<label class="col-sm-2 control-label">Level<span style="color:red">*</span></label>
<div class="col-sm-5">

<select id="level" name="level" class="form-control" required>


<option value="Kakitangan">Kakitangan</option>

</select>
</div>
</div>

<div class="form-group">
<div class="col-sm-8 col-sm-offset-2">
<button class="btn btn-default" type="reset">Cancel</button>
<button class="btn btn-primary" name="submit" type="submit">Save changes</button>
</div>
</div>

</form>
</div>
</div>
</div>
</div>

</div>
</div>

255
</div>
</div>
</div>

<!-- Loading Scripts -->


<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>
</body>
</html>
<?php } ?>

256
TUKAR_PASSWORD.PHP

<?php session_start();

if(empty($_SESSION['no_staf12']))
{

header('location:~/../../index.php');

}
?>

<?php
include '../dbconnect.php';
?>

<?php
if (isset($_POST['Submit']))
{
$oldpass = $_POST["oldPass"];
$newpass = $_POST["newPass"];
$confirmpass = $_POST["newPass2"];
$user_id = $_SESSION['no_staf12'];

include '../dbconnect.php';
$sql2 = "SELECT katalaluan FROM kakitangan
WHERE id_kakitangan = '$user_id'";

$result = mysql_query($sql2) or die('Query failed. ' . mysql_error());


$row = mysql_fetch_array($result, MYSQL_ASSOC);
$password = $row['katalaluan'];

if ($oldpass == "" && $newpass == "" && $confirmpass == "")


{
$msj="<font size='1' color='red'>Sila isi ruangan diatas!</font>";
}
elseif ($oldpass != $password)
{
$msj="<font color='red' size='1'>Katalaluan asal tidak tepat!</font>";
}
elseif ($newpass != $confirmpass)
{
$msj="<font color='red' size='1'>Katalaluan baru tidak sama dengan pengesahan
katalaluan!</font>";
}

257
else
{
$sql = "UPDATE kakitangan SET katalaluan= '$newpass' WHERE id_kakitangan = '$user_id'";
mysql_query($sql) or die(mysql_error());

$msj="<font color='blue' size='1'>Katalaluan berjaya dikemaskini</font>";


}
}
else
{
$msj="";
}
?>

<?php
$todaysDate = date("n/j/Y");

$day = (isset($_GET["day"])) ? $_GET['day'] : "";


$month = (isset($_GET["month"])) ? $_GET['month'] : "";
$year = (isset($_GET["year"])) ? $_GET['year'] : "";

if(empty($day)){ $day = date("j"); }


if(empty($month)){ $month = date("n"); }
if(empty($year)){ $year = date("Y"); }

$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;

function hiLightEvt($eMonth,$eDay,$eYear)
{
$tDayName = date("l");
$todaysDate = date("n/j/Y");
$dateToCompare = $eDay . '/' . $eMonth . '/' . $eYear;
if($todaysDate == $dateToCompare){
$aClass = '<span>' . $tDayName . '</span>';
$aClass='class="today"';
}else
{
$sql="select count(tarikh_guna) as eCount from permohonan_peralatan where tarikh_guna = '" .
$eDay . '/' . $eMonth . '/' . $eYear . "'";

$result = mysql_query($sql);
while($row= mysql_fetch_array($result)){

258
if($row['eCount'] >=1)
{
$aClass = 'class="event"';

}elseif($row['eCount'] ==0)
{
$aClass ='class="normal"';
}
}
}
return $aClass;
}
?>

<!doctype html>
<html lang="en" class="no-js">

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1,
maximum-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<meta name="theme-color" content="#3e454c">

<title>SUS | TUKAR KATALALUAN</title>

<!-- Font awesome -->


<link rel="stylesheet" href="css/font-awesome.min.css">
<!-- Sandstone Bootstrap CSS -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Bootstrap Datatables -->
<link rel="stylesheet" href="css/dataTables.bootstrap.min.css">
<!-- Bootstrap social button library -->
<link rel="stylesheet" href="css/bootstrap-social.css">
<!-- Bootstrap select -->
<link rel="stylesheet" href="css/bootstrap-select.css">
<!-- Bootstrap file input -->
<link rel="stylesheet" href="css/fileinput.min.css">
<!-- Awesome Bootstrap checkbox -->
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">

<link href="../js/jcalendar.css" rel="stylesheet">

259
<script type="text/javascript" src="../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../js/jcalendar-source.js"></script>
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />

<script src="../lib/jquery.js" type="text/javascript"></script>


<script src="../src/facebox.js" type="text/javascript"></script>

<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',

})
})
</script>

<script>
function goLastMonth(month, year){

if(month == 1){
--year;
month = 13;
}
document.location.href = 'b_user.php?month='+(month-1)+'&year='+year;
}

function goNextMonth(month, year){

if(month == 12){
++year;
month = 0;
}
document.location.href = 'b_user.php?month='+(month+1)+'&year='+year;
}

function remChars(txtControl, txtCount, intMaxLength)


{
if(txtControl.value.length > intMaxLength)
txtControl.value = txtControl.value.substring(0, (intMaxLength-1));
else
txtCount.value = intMaxLength - txtControl.value.length;
}

function checkFilled() {
var filled = 0

260
var x = document.form1.calName.value;

if (x.length > 0) {filled ++}

var y = document.form1.calDesc.value;

if (y.length > 0) {filled ++}

if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}

</script>

<script type="text/javascript" src="nicEdit.js"></script>


<script type="text/javascript">
bkLib.onDomLoaded(function() { nicEditors.allTextAreas() });
</script>
<style>
.errorWrap {
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #dd3d36;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}
.succWrap{
padding: 10px;
margin: 0 0 20px 0;
background: #fff;
border-left: 4px solid #5cb85c;
-webkit-box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
box-shadow: 0 1px 1px 0 rgba(0,0,0,.1);
}

.today{
background-color:#ddd;
font-weight:bold;
background-repeat:no-repeat;
background-position:center;
position:relative;
}
.today span{
position:absolute;

261
left:0;
top:0;
}
.title{
text-align:center;
font-size:10px;
font-weight:bold;
color:#333333;
}
.today a{
color:#000000;
padding-top:2px;
}
.selected {
color: #FFFFFF;
background-color: #C00000;
}
.event {
text-decoration:blink;
border:1px solid #CCC;
color:red;
font-weight:bold;
font-size:14px;
background-color:#999999;

}
.normal {

}
table{
border:1px none #000;
padding:0px;
width:100%;
}
th{
width:35px;
background-color:#ccc;
text-align:center;
color:#fff;
border-left:1px solid #ffffff;
}
td{
text-align:auto;
padding:10px;
margin:0;
}
table.tableClass{
border:1px solid #000;

262
width:150px;
border:solid;
border-collapse: collapse;
font-size:100%;
border:1px solid #ddd;
}

</style>

</head>

<body>
<?php include('includes/header.php');?>
<div class="ts-main-content">
<?php include('includes/leftbar.php');?>
<div class="content-wrapper">

<div class="container-fluid">
<h2 class="page-title">Tukar Katalaluan </h2>

<div class="row">
<div class="col-md-12">

<!--MULAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-->

<div class="accordion-group breadcrumb" style="border:solid; border-color:#ccc">

<form class="form-horizontal" method="post" name="form3" id="form3" action=""


autocomplete="off" >
<table width="600" border="0" class="accordion-group table table-bordered">
<tr>
<td width="112" align="right" nowrap="nowrap"><label class="control-label" >Katalaluan Asal
:</label></td>
<td width="478"><input class="form-control" type="text" name="oldPass" id="oldPass" /></td>
</tr>
<tr>
<td align="right" nowrap="nowrap"><label class="control-label" >Katalaluan Baru :</label></td>
<td><input class="form-control" type="password" name="newPass" id="newPass" /></td>
</tr>
<tr>
<td align="right" nowrap="nowrap"><label class="control-label" >Pengesahan Katalaluan Baru
:</label></td>
<td><input class="form-control" type="password" name="newPass2" id="newPass2" /></td>
</tr>
<tr >
<td align="right" nowrap="nowrap">&nbsp;</td>
<td><?php echo $msj; ?></td>

263
</tr>
<tr>
<td align="right">&nbsp;</td>
<td>
<input type="submit" class="btn btn-primary" name="Submit" id="submit" value="Tukar" />
<input type="reset" class="btn btn-danger" name="Reset" id="button" value="Semula" /></td>
</tr>
</table>

</form>

<h4 align="left">&nbsp;</h4>
</div>

<!--TAMAT-->
</div>
</div>
</div>
</div>
</div>
<!-- Loading Scripts -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap-select.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.dataTables.min.js"></script>
<script src="js/dataTables.bootstrap.min.js"></script>
<script src="js/Chart.min.js"></script>
<script src="js/fileinput.js"></script>
<script src="js/chartData.js"></script>
<script src="js/main.js"></script>

</body>

</html>

264
3.2.4 Integration and Testing Phase

During this stage, QA, beta testers, and all other testers systematically
discover and report issues within the application that need to be resolved. It
is not uncommon for this phase to cause a “necessary repeat” of the
previous coding phase, in order for revealed bugs to be properly squashed.

We make a website/apps for UPIM, testing if all component is function


or not. If the stake holder is not satisfied with our work, we will improve
our system before the actual implementation system will be established
there

Figure 39: Homepage

265
Figure 40: Admin HomePage

Figure 41: KJ HomePage

266
Figure 42: Explained about project Figure 43: Explained about project flow
ojective to Supervisor to Supervisor

Figure 44: Testing & demo to Figure 45: Testing & demo to
Stakeholder Stakeholder

267
3.2.5 Deployment of System

Once the functional and non-functional testing is done, the product is deployed in the
customer environment or released into the market.

3.2.6 Maintenance

There are some issues which come up in the client environment. To fix those issues,
patches are released. Also, to enhance the product some better versions are released.
Maintenance is done to deliver these changes in the customer environment.

3.9 Conclusion

All these phases are cascaded to each other in which progress is seen as flowing
steadily downwards (like a waterfall) through the phases. The next phase is started only after
the defined set of goals are achieved for previous phase and it is signed off, so the name
"Waterfall Model". In this model, phases do not overlap.

268
CHAPTER 4

FINAL DESIGN

4.1 INTRODUCTION
The Final Design has every detail – from the type and measurement of construction
materials to the species of every plant and tree. It has a precise and final proposal. All
it takes is your signature on a Final Design for us to literally hand it to our construction
crews and get to work.

4.2 LOGICAL DESIGN


4.2.1 FLOW CHART

Figure 46: Flow Chart For User

269
Figure 47: Flow Chart For All

270
4.2 MANUAL USER

4.3.1 USER

271
Fill out the equipment application form.

Figure 48: Filling the application form for the equipment and event

272
Reviewing the application through the calendar

Figure 49: Reviewing the application using the calender

273
4.3.2 KETUA
JABATAN

274
Head of department's confirmation.
1. Click the date on the applicant.

* display of application on 8/4/2020


by displaying the name of the
application

Figure 50: Click the date on the application

2. Click on the details button to confirm the applicant

* Shows all applications by date


tersebut

* Go to the more detailed page of


the application information

Figure 51: Click on the the details button to confirm the applicant

275
3. Verify the user by clicking the Approve, do not pass or cancel button.

* You can print

* The department head may


approve, disapprove, and
cancel.

Figure 52: Verify the user by clicking the Approve, do not pass or cancel button

276
4.3.3
PENTADBIR

277
Administrator Confirmation
1. Click the date on the applicant.

* display the application on


4/4/2020 by displaying the name
of the application

Figure 53: Click the date on the applicant

2. Click on the details button to confirm the applicant

* Shows all applications by that


date

* Go to more detailed page of


application information

* Administrators can also view the


status of Head of Department
whether passed, not passed or
canceled

Figure 54: Click on the details button to confirm the applicant

278
3. Verify the user by clicking the Approve, do not pass or cancel button.

*You can print

*Pentadbir boleh meluluskan,


tidak lulus dan batal.

Figure 55: Verify the user by clicking the approve, do not pass or cancel button

279
4. Review by reference number

Figure 56: Review by reference number

reie

280
CHAPTER 5
TEST DESCRIPTION AND RESULTS

5.1 UNIT TESTING PLAN


UNIT TESTING is a level of software testing where individual units/ components of a software are tested. The purpose is to validate that
each unit of the software performs as designed. A unit is the smallest testable part of any software. It usually has one or a few inputs and
usually a single output.
UNIT TESTING PLAN (UTP)
NO. TEST CASE NAME TEST PROCEDURE PRECONDIT EXPECTED RESULT TESTER RESULT(PASS
ION /FAILURE)
1. Opening the website Open the web using Type the The website will open the front Aiderin Pass
front page the URL URL page(Homepage)
2. Application Form Click ‘BORANG User need +Case prompt notification successful Aiderin Pass
(Borang Permohonan) PERMOHONAN’ in the to fill the and the form data will be forward to
front page or Home form. admin, user will get a unique number
and user need to fill the for the form.
form to make an
application for the item
3. Review (Semakan) Click ‘SEMAKAN’ in the User need + A data with user name and date will Azhar Failure
front page or Home to fill the appear and the status also will appear
and user need to fill the text fill
text fill with the unique with
number that is given unique
after filling the form number
4. Cancellation Form Click ‘PEMBATALAN’ in User need + Case prompt notification successful Aiderin Failure
(Borang Pembatalan the front page or Home to fill the for cancellation
‘Pembatalan’) and user need to fill the form.

281
form to cancel their
application
5. Log In (Admin) Admin is required to fill none + Case prompt notification successful Azhar Pass
in username and login.
password field before
access the
administration system
6. List Of UPIM Equipment Click ‘SENARAI none Admin will directly go to List of Aiderin Pass
Application (Senarai PERMOHONAN’ in the equipment application (Senarai
Permohonan Peralatan Admin Homepage. permohonan)
UPIM)
7. List Of UPIM Equipment Click ‘CALENDER’ in the none Admin will directly go to List of Aiderin Pass
Application by date Admin Homepage. equipment application by date
(Senarai Permohonan (Senarai permohonan)
Peralatan UPIM
mengikut tarikh)
8. UPIM Application Click ‘PERINCI’ in the User need + a pop-up will come out and stated if Azhar Failure
Approval (Kelulusan Senarai permohonan to to apply to you really want to approve or
Permohonan UPIM) approve the application be approve disapprove it.
by admin
9. User Management Click ‘PENGURUSAN none + a pop-pup will come out and stated Aiderin Failure
Admin (Pengurusan PENGGUNA’ at the top if your really want to blacklist or
Pengguna) right of the page activate other admin
10. Admin User Registration Click ‘DAFTAR User need None Azhar Pass
(Daftar Pengguna) PENGGUNA’ at the top to fill the
right of the page form.
11. Staff List (Senarai Click ‘SENARAI Admin + Case prompt notification successful Azhar Pass
Kakitangan KAKITANGAN’ at the need to for Deletion if the admin wanted to
top right of the page register remove one of the staff
the staff if

282
they need
to be in
the list
12. Change Password Click ‘TUKAR none + Case prompt notification successful Azhar Pass
(Tukar Katalaluan) KATALALUAN’ at the for changing password
top right of the page
13. Cancellation Click ‘PEMBATALAN’ at If the + Case prompt notification successful Aiderin Pass
(Pembatalan) the left of the page admin for cancellation or deletion of the
want to application.
disapprove
one of the
application
, admin
can cancel
the
application
through
here.

283
5.2 INTEGRATION TESTING PLAN
Integration Testing is a level of software testing where individual units are combined and tested as a group. The purpose of this level of
testing is to expose faults in the interaction between integrated units. Test drivers and test stubs are used to assist in Integration Testing.
INTEGRATION TESTING PLAN (ITP)
No. Test Case Test Procedure Pre-condition Expected Result Tester Result
Name (Supervisor) (Pass/Failure)
1 Internet User need to active the Smart UPIM + Database is ready to Mrs. Ramlah Pass
board with using an internet System required accept a new data from
connection weather using an internet user
(WIFI, hotspot, etc.) connection - Database not working Mrs. Ramlah Failure
and magnet not function
2 Mobile User can open the web by None + Server and client Mrs. Ramlah Pass
Application using application (Smart connected to the
UPIM System) application

- Server and client don’t Mrs. Ramlah Failure


received data from user
- phone is not
connected to internet
connection
3 Login User is required to fill the None + User will directly go to Mrs. Ramlah Pass
Page username and password main menu in mobile
field before access the application
application - User field username or Mrs. Ramlah Failure
password wrong from
their register

284
4 Click User need to click the button None + application form can Mrs. Ramlah Pass
Button be sent

- application forms is Mrs. Ramlah Failure


not send
- Board is not connected
to internet connection

285
5.3 USER ACCEPTANCE TEST

User Acceptance Testing (UAT) is a type of testing performed by the end user or the client to verify/accept the software system before
moving the software application to the production environment. UAT is done in the final phase of testing after functional, integration and
system testing are done.
USER ACCEPTANCE TESTING (UAT)
No. Test Case Acceptance Requirement Test Result Tester Comment
Name (Stakeholder)
Pass Failure


1 Internet User need to active the Mr. Hasni None
board with using an internet
connection weather using
(WIFI, hotspot, etc.)


2 Domain Domain address can be used Mr. Hasni None



3 Hosting The website is accessible via Mr. Sufian None
the World Wide Web


4 Forms Forms can be filled Mr. Hasni None


5 Mobile User can open the web by Mr. Sufian None
Application using application (Smart
Door Access)

286

6 Login User is required to fill the Mr. Hasni None
Page username and password field
before access the application


7 Click User need to click the button Mr. Hasni None
Button

287
CHAPTER 6

DISCUSSIONS

6.1 ADVANTAGE OF THE PROJECT


The main purpose of this project is to improve the current existing borrowing system
that in use by UPIM (Unit Pembangunan Instrusional Dan Multimedia) by developing
Smart Upim system. Below are the advantages of the project: -
i. Reduce the usage of paper
ii. Low cost
iii. Quick access of borrowing equipment
iv. The data stored into database
v. Has a security to keep this system safe
vi. Admin/KJ can view the record using mobile application
vii. Admin//KJ approve or disapprove using mobile application
viii. No more traditional forms

6.2 LIMITATION OF THE PROJECT


The disadvantages of this system have been identified. Below are the disadvantages of
this project: -
i. Would be troublesome if blackout or phones battery die happens
ii. Every time user send the form, user need to wait for admin/kj to approve it
iii. User need to call admin if they need to borrow equipment faster and not using
the system

288
CHAPTER 7
CONCLUSIONS AND RECOMMENDATION

7.1 RECOMMENDATIONS
The continuity of recommendation is importance in order to overcome the
disadvantages or weakness of Smart UPIM System.
i. Hopefully, the application can make a backup forms for the user that filling
the form when blackout or battery died happen
ii. Hopefully, can make admin/kj focus more on the application
iii. Hopefully, user can be make the borrowing application more faster than the
actual date.

7.2 CONCLUSIONS
This system is will facilitate UPIM (Unit Pembangunan Instrusional Dan Multimedia)

to make their borrowing system more digitalize and easy to use. When the system has

been fully developed it may be used as a stepping stone to other Polytechnic to

digitalize their own units.

Objective is really important in achieve the project goal. We also know the

problem statement for our project and from the problem statement we can observe the

solution to solve the problem. This system is developed for this Units to solve the

problem when they use manually system and user friendly.

The system will be going to be develop by using the methodology that suitable

for this system and also based on the literature review that we study. We had gone

through many of the existing system as the examples that we can use to be

implementing on our project.

Advantages of the system to be built will be described in more detail. The

creation of this system will require a lot of research to ensure that all features of the

system can be built to meet the needs of users.

289
Objective is really important in achieve the project goal. We also know the.

Problem statement for our project and from the problem statement we can observe the

solution to solve the problem. This system is developed for Bauk Inn Resort as a

stakeholder.

290
CHAPTER 8

REFERENCES

References

INTERVIEW

Mr.Sufian Bin Salim@anam (2019, December 16th). Personal Interview

Mr Hasni Bin Mahmood (2020, January 14th). Personal Interview

WEB

Open library (2020, January 24th) for the use of picture and information of the system.
Retrieve from https://openlibrary.org/

Borrow-Itapp (2020, January 24th) for the use of picture and information of the system.
Retrieve from http://www.borrow-itapp.com/index.php

Borroclub (2020, February 1st) for the use of picture and information of the system. Retrieve
from https://www.borroclub.co.uk/

UPIM PSMZA Facebook page (2019, December 20th) for the use of picture and information of
the system. Retrieve from https://www.facebook.com/pg/upimpsmza/about/?ref=page_internal

https://spt.ppj.gov.my/virtual/info/13/1/24-12-2019/24-12-2019

https://app.perpaduan.gov.my/e-pinjam/pemohon.php

291
CHAPTER 9

APPENDIX

9.1 GANTT CHART


WEEK 8/12/19 26/12/19 29/12/19 06/1/20 19/1/20 28/1/20 16/2/20 24/2/20 09/3/20 18/3/20 25/3/20
– - – – – – – – – – –
WORK 25/12/19 26/12/19 06/1/20 17/1/20 27/1/20 11/2/20 23/2/20 09/3/20 17/3/20 24/3/20 31/3/20
PLANNING PHASE
1.Develop Project Title
2.Present Project Title
3.Find Stake Holder
4.Write Proposal
5.Correction Proposal
6.Confirm Proposal
PRESENT
PRESENTATION
ANALYSIS PHASE
1.Literature Review
2.Compare Pricing
3.Interview Stake
Holder
4.Searching Item
Product
DESIGN /
DEVELOPMENT
PHASE
1.Create Interface
Mobile 2. Application
3.Confirm Interface
DEMO 1

292
DESIGN /
DEVELOPMENT
PHASE CONST.
1.Connecting the Admin
to the main website
2.Insert Coding into
notepad++
3.Testing Coding
DEMO 2
IMPLEMENTATION
PHASE
1.Implement into
protype
2.Implement at UPIM
TESTING
1.Do Test all
Component
2.Confirm with Stake
Holder
MAINTENANCE
PHASE
1.Re-Write Coding if
Component Failure
Write Report
Final Presentation

293
9.2 Cost Planning

Bil. Types Costs

1. Domain .com (1 year) RM55

2. Hosting (1 year) RM100

294

You might also like