Skip to content

Commit 3a3eebe

Browse files
committed
message
0 parents  commit 3a3eebe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+12062
-0
lines changed

.gitignore

Whitespace-only changes.

README.md

Whitespace-only changes.

assets/custom.css

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
body{
2+
background-color: #fff;
3+
}
4+
.left-menu li{
5+
float: left;
6+
display: inline-block;
7+
background-color:green;
8+
padding: 5px 7px;
9+
}
10+
11+
.left-menu li a{
12+
padding: 5px 7px;
13+
text-decoration: none;
14+
color:#fff;
15+
}
16+
17+
18+
.left-menu a:hover{
19+
color:#ccc;
20+
background-color:green;
21+
}
22+
23+
.left-menu a:active{
24+
color:#ccc;
25+
background-color:green;
26+
}
27+
28+
29+
30+
.right-menu li{
31+
float: right;
32+
33+
display: inline-block;
34+
background-color:green;
35+
padding: 5px 7px;
36+
}
37+
38+
.right-menu li a{
39+
padding: 5px 7px;
40+
text-decoration: none;
41+
color:#fff;
42+
}
43+
44+
.right-menu a:hover{
45+
color:#ccc;
46+
background-color:green;
47+
}
48+
49+
50+
.divider{
51+
width: 100%;
52+
height: 4px;
53+
background-color: #666;
54+
clear:both;
55+
}
56+
57+
.active{
58+
color: gold !important;
59+
}

database/hris.sql

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
-- phpMyAdmin SQL Dump
2+
-- version 4.6.5.2
3+
-- https://www.phpmyadmin.net/
4+
--
5+
-- Host: 127.0.0.1
6+
-- Generation Time: Jul 11, 2017 at 10:49 AM
7+
-- Server version: 10.1.21-MariaDB
8+
-- PHP Version: 5.6.30
9+
10+
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
11+
SET time_zone = "+00:00";
12+
13+
14+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
15+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
16+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
17+
/*!40101 SET NAMES utf8mb4 */;
18+
19+
--
20+
-- Database: `hris`
21+
--
22+
23+
-- --------------------------------------------------------
24+
25+
--
26+
-- Table structure for table `tbl_users`
27+
--
28+
29+
CREATE TABLE `tbl_users` (
30+
`user_id` int(11) NOT NULL,
31+
`emp_id` varchar(20) NOT NULL,
32+
`userFullname` varchar(50) NOT NULL,
33+
`userName` varchar(50) NOT NULL,
34+
`userPass` varchar(100) NOT NULL,
35+
`userEadd` varchar(100) NOT NULL,
36+
`userType` enum('SYSADMIN','SUPERUSER','HR','USER') NOT NULL,
37+
`userStatus` enum('1','0') NOT NULL COMMENT '1 - is ACTIVE, 0 - INACTIVE',
38+
`userMod` varchar(50) NOT NULL,
39+
`userCreated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
40+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
41+
42+
--
43+
-- Dumping data for table `tbl_users`
44+
--
45+
46+
INSERT INTO `tbl_users` (`user_id`, `emp_id`, `userFullname`, `userName`, `userPass`, `userEadd`, `userType`, `userStatus`, `userMod`, `userCreated`) VALUES
47+
(16, '', 'jayavee', 'jay101', '123', '', 'SUPERUSER', '1', '', '2017-03-29 03:20:40'),
48+
(17, '121212', 'randy', 'randy', '123', 'randy_inso', 'USER', '1', '', '2017-04-16 15:44:14');
49+
50+
--
51+
-- Indexes for dumped tables
52+
--
53+
54+
--
55+
-- Indexes for table `tbl_users`
56+
--
57+
ALTER TABLE `tbl_users`
58+
ADD PRIMARY KEY (`user_id`);
59+
60+
--
61+
-- AUTO_INCREMENT for dumped tables
62+
--
63+
64+
--
65+
-- AUTO_INCREMENT for table `tbl_users`
66+
--
67+
ALTER TABLE `tbl_users`
68+
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;
69+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
70+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
71+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

git

Whitespace-only changes.

includes/menu-for-hr.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<li><a href="?pg=user" class="<?php echo (isset($active) && $active == 'dashboard' ? 'active' : ''); ?>">Dashboard</a></li>
2+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Master List</a></li>
3+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Contribution</a></li>
4+
</li><li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Deduction</a></li>
5+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Attendance</a></li>
6+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Payroll</a></li>
7+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Employee Leave</a>
8+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Employee Performance </a>

includes/menu-for-superuser.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
3+
<li><a href="?pg=user" class="<?php echo (isset($active) && $active == 'dashboard' ? 'active' : ''); ?>">Dashboard</a></li>
4+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">System User</a></li>
5+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Design Center</a></li>
6+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">CRUD/Validation</a></li>
7+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Add Module</a></li>
8+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Database Management</a></li>

includes/menu-for-sysadmin.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<li><a href="?pg=dashboard" class="<?php echo (isset($active) && $active == 'dashboard' ? 'active' : ''); ?>">Dashboard</a></li>
2+
<li><a href="?pg=dashboard" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Add User</a></li>
3+
<li><a href="?pg=dashboard" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">User List</a></li>
4+
<li><a href="?pg=dashboard" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">User log</a></li>

includes/menu-for-user.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<li><a href="?pg=user" class="<?php echo (isset($active) && $active == 'dashboard' ? 'active' : ''); ?>">Dashboard</a></li>
2+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Apply Leave</a></li>
3+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Schedule</a></li>
4+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Pay Slip</a></li>
5+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Profile</a></li>
6+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">Allowance</a></li>
7+
<li><a href="#" class="<?php echo (isset($active) && $active == 'your module' ? 'active' : ''); ?>">My Task</a></li>

index.php

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?php require'library/db.php' ?>
2+
<?php
3+
if (!isset($_SESSION['user']['IsLoggeD']) && $_SESSION['user']['IsLoggeD'] != true) {header("Location:login");}
4+
$pg = (isset($_GET['pg']) && !empty($_GET['pg']) ? $_GET['pg']:'');
5+
$userLevel = $_SESSION['user']['userLevel'];
6+
if($userLevel == 'SUPERUSER'){
7+
switch ($pg) {
8+
case 'dashboard':
9+
$title = 'dashboard';
10+
$content = 'views/superuser/index.php';
11+
$active = 'dashboard';
12+
$css = array(""); // you can include here your css style in your per module but depends on you
13+
$js = array(""); // your action.js every module
14+
$flag = 1; // if 1 has include files else no include files
15+
break;
16+
17+
18+
default:
19+
$title = 'dashboard';
20+
$content = 'views/superuser/index.php';
21+
$active = 'dashboard';
22+
$css = array(""); // you can include here your css style in your per module but depends on you
23+
$js = array(""); // your action.js every module
24+
$flag = 1; // if 1 has include files else no include files
25+
break;
26+
}
27+
}elseif ($userLevel == 'SYSADMIN') {
28+
switch ($pg) {
29+
case 'dashboard':
30+
$title = 'dashboard';
31+
$content = 'views/sysadmin/index.php';
32+
$active = 'dashboard';
33+
$css = array(""); // you can include here your css style in your per module but depends on you
34+
$js = array(""); // your action.js every module
35+
$flag = 1; // if 1 has include files else no include files
36+
break;
37+
38+
default:
39+
$title = 'dashboard';
40+
$content = 'views/sysadmin/index.php';
41+
$active = 'dashboard';
42+
$css = array(""); // you can include here your css style in your per module but depends on you
43+
$js = array(""); // your action.js every module
44+
$flag = 1; // if 1 has include files else no include files
45+
break;
46+
}
47+
}elseif ($userLevel == 'HR') {
48+
switch ($pg) {
49+
case 'dashboard':
50+
$title = 'dashboard';
51+
$content = 'views/hr/index.php';
52+
$active = 'dashboard';
53+
$css = array(""); // you can include here your css style in your per module but depends on you
54+
$js = array(""); // your action.js every module
55+
$flag = 1; // if 1 has include files else no include files
56+
break;
57+
58+
default:
59+
$title = 'dashboard';
60+
$content = 'views/hr/index.php';
61+
$active = 'dashboard';
62+
$css = array(""); // you can include here your css style in your per module but depends on you
63+
$js = array(""); // your action.js every module
64+
$flag = 1; // if 1 has include files else no include files
65+
break;
66+
}
67+
}elseif ($userLevel == 'USER') {
68+
switch ($pg) {
69+
case 'dashboarduser':
70+
$title = 'dashboard';
71+
$content = 'views/user/index.php';
72+
$active = 'dashboard';
73+
$css = array(""); // you can include here your css style in your per module but depends on you
74+
$js = array(""); // your action.js every module
75+
$flag = 1; // if 1 has include files else no include files
76+
break;
77+
78+
default:
79+
$title = 'dashboard';
80+
$content = 'views/user/index.php';
81+
$active = 'dashboard';
82+
$css = array(""); // you can include here your css style in your per module but depends on you
83+
$js = array(""); // your action.js every module
84+
$flag = 1; // if 1 has include files else no include files
85+
break;
86+
}
87+
88+
}
89+
90+
?>
91+
92+
<?php include'template/content.php' ?>

library/db.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php session_start() ?>
2+
<?php
3+
4+
$ServerName = "localhost";
5+
$Username = "root";
6+
$Password = "";
7+
$DbName = "hris";
8+
$db = null;
9+
10+
try {
11+
$db = new PDO("mysql:host=$ServerName;dbname=$DbName",$Username,$Password);
12+
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
13+
14+
} catch (PDOException $e) {
15+
echo "Connection Failed:" . $e->getMessage();
16+
die();
17+
}
18+
19+
?>
20+
<?php require 'functions.php' ?>

library/functions.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
Class Jayvee {
4+
5+
function __construct($Conn = null){
6+
7+
$this->Newconn = $Conn;
8+
}
9+
10+
}
11+
12+
$New = new Jayvee($db);
13+
?>

login/ajax-loader.gif

3.62 KB
Loading

login/akomismo.jpg

173 KB
Loading

login/akomismo2.jpg

9.82 KB
Loading

0 commit comments

Comments
 (0)