Professional Documents
Culture Documents
A project report submitted in partial fulfillment of the requirements for the award of
Diploma in Information Technology
(programming)
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
CHAPTER 9 : APPENDIX
1.1 INTRODUCTION
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
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.
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. Admin
Admin is the one who control whole Smart UPIM system, its staff, and
every other person or thing that is associated with Polytechnic.
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.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.
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
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.
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.
6
2.3 Case Study 1( OPEN LIBRARY)
Figure 1 shows the OpenLibrary.org website. This is the homepage for this website.
7
2.4 Case Study 2 (Borrow-It)
Figure 2 show Borrow-itapp.com website. This is the homepage for this website.
8
2.5 Case Study 3(Borroclub)
Figure 3 show Borroclub.com website. This is the homepage for this website.
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:
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
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
3.2 INTRODUCTION
FIGURE 7: Waterfall
15
The Waterfall Model was the first Process Model to be introduced. It is also referred
waterfall model, each phase must be completed before the next phase can begin and there is
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.
17
Figure 9: MODERN UPIM FORM
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.
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
20
5. This is the Hubungi page (Contact Form)
Figure 14:
Hubungi
Figure 15:
Admin
Homepage
e
21
8. This is the Laporan Page
22
11. This is the Mohon Batal Page
23
14. This is the Pengurus Pengguna Page
25
20. This is the KJ Laporan Page
26
23. This is the KJ Tukar Password Page
PHPmyadmin
DATABASE
KAKITANGAN: TABLE
PEMBATALAN: TABLE
PERALATAN: TABLE
28
PERMOHONAN_PERALATAN
TBLCONTACTQUERY
TBLPAGE
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");
$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="">
<style>
.navbar-toggler {
z-index: 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;
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>
<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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = 'index.php?month='+(month+1)+'&year='+year;
34
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
var y = document.form1.calDesc.value;
if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}
</script>
</head>
<body>
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">
</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
36
$dateToCompare = $month . '/' . $i . '/' . $year;
$timeStamp = strtotime("$year-$month-$i");
if($i == 1){
<hr>
</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>
</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 -->
</body>
</html>
38
BORANG_PERMOHONAN.PHP
<?php
include 'dbconnect.php';
?>
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");
$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="">
<!--tTESTTTT-->
<!--TEASDAS-->
<style>
.navbar-toggler {
z-index: 1;
}
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>
<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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = 'borang_permohonan.php?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
var y = document.form1.calDesc.value;
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');?>
<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>
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>
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="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>
<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">
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>
<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">
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>
<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>
<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>
<div class="jcalendar">
54
<p style="color:red; text-align:center;">Semak permohonan disini!</p><br />
</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
if($i == 1){
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
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>
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> </td>
<td> </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="";
}
?>
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");
$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="">
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>
<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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = '?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
var y = document.form1.calDesc.value;
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">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">SEMAKAN</li>
</ol>
<br>
</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 -->
</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'];
$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'] : "";
$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="">
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');?>
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">Pendaftaran</li>
</ol>
73
</div>
</div>
</div>
74
<div id="success"></div>
<!-- For success/fail messages -->
<button type="submit" name="send" class="btn btn-primary">Hantar</button>
</form>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
<?php include('includes/footer.php');?>
</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="">
</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>
</div>
<!-- /.container -->
<?php } } ?>
</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="">
78
<link href="css/modern-business.css" rel="stylesheet">
</head>
<body>
<?php include('includes/header.php');?>
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
79
</li>
<li class="breadcrumb-item active">Hubungi</li>
</ol>
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');?>
</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");
$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="">
83
<!-- Temporary navbar container fix -->
<style>
.navbar-toggler {
z-index: 1;
}
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');?>
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">PEMBATALAN</li>
</ol>
86
<button type="submit" name="send" class="btn btn-primary">Hantar</button>
</form>
</div>
</div>
<!-- /.row -->
</div>
<!-- /.container -->
<?php include('includes/footer.php');?>
87
SEMAKAN.PHP
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");
$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="">
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">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">Semakan</li>
</ol>
<br>
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="" >
</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> </p>
<p> </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 -->
92
<?php include('includes/footer.php');?>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>
ADMIN
PENTADBIR
93
SECURE/INDEX.PHP
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");
$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="">
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">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="index.php">Home</a>
</li>
<li class="breadcrumb-item active">Semakan</li>
</ol>
<br>
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="" >
</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> </p>
<p> </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 -->
98
<?php include('includes/footer.php');?>
</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");
$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>
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 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
<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
<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
<i class="fa fa-arrow-right"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
105
</div>
</div>
</div>
<script>
window.onload = function(){
}
</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();
?>
<?php
include '../dbconnect.php';
?>
<?php
$todaysDate = date("n/j/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">
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 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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = 'senarai_permohonan.php?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
111
if (x.length > 0) {filled ++}
var y = document.form1.calDesc.value;
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">
<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 if($result->status==1)
{
?><td>Read</td>
<?php } else {?>
113
<?php } ?>
</tr>
<?php $cnt=$cnt+1; }} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
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>");
}
?>
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'];
$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");
$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">
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" />
<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;
}
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;
var y = document.form1.calDesc.value;
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> </td>
<td> </td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Nama Pemohon :</strong></td>
<td><?php echo $row_Recordset1['nama']; ?></td>
<td> </td>
<td> </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> </td>
<td> </td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>No. Telefon :</strong></td>
<td><?php echo $row_Recordset1['telefon']; ?></td>
<td> </td>
<td> </td>
</tr>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td><strong>Email Pemohon :</strong></td>
<td><?php echo $row_Recordset1['email']; ?></td>
<td> </td>
<td> </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>
<tr style="font-family:Arial, Helvetica, sans-serif">
<td> </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> </td>
<td> </td>
</tr>
</table>
</div>
</div></div>
</div>
</div></div>
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="";
}
?>
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");
$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">
130
<link rel="stylesheet" href="css/awesome-bootstrap-checkbox.css">
<!-- Admin Stye -->
<link rel="stylesheet" href="css/style.css">
<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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = '?month='+(month+1)+'&year='+year;
}
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;
var y = document.form1.calDesc.value;
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">
134
<td ><?php echo $row_Recordset1['nama']; ?></td>
<td><?php echo $row_Recordset1['jabatan']; ?></td>
<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); ?>">← 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
→</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> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </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';
?>
<?php
if(isset($_POST['submit2']))
{
$id_kakitangan=$_POST['id_kakitangan2'];
$komen="";
$status='Aktif';
137
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue =
"")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $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");
$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">
<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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = 'b_user.php?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
var y = document.form1.calDesc.value;
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"> </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"> </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"> </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();
?>
<?php
include '../dbconnect.php';
?>
<?php
$todaysDate = date("n/j/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">
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" />
<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">
<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>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
152
</div>
</div>
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");
$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">
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;
}
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>
<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">
<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();">
<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">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</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");
$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">
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 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">
<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">
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>
</div>
<label class="col-sm-2 control-label">Katalaluan</label>
<div class="col-sm-4">
<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>
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'];
}
?>
<?php
include '../dbconnect.php';
?>
<?php
$todaysDate = date("n/j/Y");
171
$year = (isset($_GET["year"])) ? $_GET['year'] : "";
$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">
.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 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">
<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">
</div>
</div>
<div class="hr-dashed"></div>
<div class="form-group">
<div class="col-sm-8 col-sm-offset-4">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
176
</div>
</div>
</body>
</html>
<?php } ?>
177
LAPORAN.PHP
<?php session_start();
if(empty($_SESSION['no_staf']))
{
header('location:~/../../index.php');
}
?>
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");
$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>
<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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = 'laporan.php?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
var y = document.form1.calDesc.value;
if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}
182
</script>
.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>
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> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </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");
$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">
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">
<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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = '?month='+(month+1)+'&year='+year;
}
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;
var y = document.form1.calDesc.value;
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>
<?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>
</table>
</form>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </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();
?>
<?php
include '../dbconnect.php';
?>
<?php
$todaysDate = date("n/j/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">
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 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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = 'senarai_permohonan.php?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
199
if (x.length > 0) {filled ++}
var y = document.form1.calDesc.value;
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">
<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 if($result->status==1)
{
?><td>Read</td>
<?php } else {?>
201
<?php } ?>
</tr>
<?php $cnt=$cnt+1; }} ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
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");
$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">
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 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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = '?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
var y = document.form1.calDesc.value;
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">
</tr>
</thead>
<tbody>
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>
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="">
<body>
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>
</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");
$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>
<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 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;
}
if(month == 12){
217
++year;
month = 0;
}
document.location.href = 'senarai_permohonan.php?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
var y = document.form1.calDesc.value;
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
<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
<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
<i class="fa fa-arrow-right"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
220
</div>
</div>
</div>
<script>
window.onload = function(){
}
</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="";
}
?>
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");
$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">
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">
<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;
}
if(month == 12){
++year;
month = 0;
}
226
document.location.href = 'borang_permohonan_lanjut.php?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
var y = document.form1.calDesc.value;
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">
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>
<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); ?>">← 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
→</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> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </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');
}
?>
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");
$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>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
235
})
})
</script>
.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>
<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> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </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';
?>
<?php
if(isset($_POST['submit2']))
{
$id_kakitangan=$_POST['id_kakitangan2'];
$komen="";
$status='Aktif';
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;
}
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");
$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">
243
<link href="../src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = 'b_user.php?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
var x = document.form1.calName.value;
244
if (x.length > 0) {filled ++}
var y = document.form1.calDesc.value;
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>
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"> </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'];
$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");
$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">
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 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">
<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">
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>
</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>
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'";
257
else
{
$sql = "UPDATE kakitangan SET katalaluan= '$newpass' WHERE id_kakitangan = '$user_id'";
mysql_query($sql) or die(mysql_error());
<?php
$todaysDate = date("n/j/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">
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 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;
}
if(month == 12){
++year;
month = 0;
}
document.location.href = 'b_user.php?month='+(month+1)+'&year='+year;
}
function checkFilled() {
var filled = 0
260
var x = document.form1.calName.value;
var y = document.form1.calDesc.value;
if (filled == 2) {
document.getElementById("Submit").disabled = false;
}
else {document.getElementById("Submit").disabled = true}
</script>
.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-->
263
</tr>
<tr>
<td align="right"> </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"> </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.
265
Figure 40: Admin 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.
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
273
4.3.2 KETUA
JABATAN
274
Head of department's confirmation.
1. Click the date on the applicant.
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.
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.
278
3. Verify the user by clicking the Approve, do not pass or cancel button.
Figure 55: Verify the user by clicking the approve, do not pass or cancel button
279
4. Review by reference number
reie
280
CHAPTER 5
TEST DESCRIPTION AND RESULTS
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
284
4 Click User need to click the button None + application form can Mrs. Ramlah Pass
Button be sent
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
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
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
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
creation of this system will require a lot of research to ensure that all features of the
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
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
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
294