Skip to content

Commit

Permalink
Major Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Abbas committed Jun 21, 2019
1 parent 0016d2a commit 2d6f7b7
Show file tree
Hide file tree
Showing 55 changed files with 2,797 additions and 606 deletions.
156 changes: 156 additions & 0 deletions SQL/comp_sys.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 21, 2019 at 09:29 AM
-- Server version: 10.1.36-MariaDB
-- PHP Version: 7.2.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `comp_sys`
--

-- --------------------------------------------------------

--
-- Table structure for table `comments`
--

CREATE TABLE `comments` (
`id` int(11) NOT NULL,
`comp_id` int(11) NOT NULL,
`by_id` int(11) NOT NULL,
`comment` text NOT NULL,
`time` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `complaints`
--

CREATE TABLE `complaints` (
`id` int(11) NOT NULL,
`comp_by` int(11) NOT NULL,
`priority` int(11) NOT NULL DEFAULT '0',
`date` int(11) NOT NULL,
`complaint` text NOT NULL,
`dept` varchar(255) NOT NULL,
`completed` enum('0','1') NOT NULL DEFAULT '0',
`completed_date` int(11) NOT NULL,
`accepted` enum('0','1') NOT NULL DEFAULT '0',
`accepted_date` int(11) NOT NULL,
`assigned` enum('0','1') NOT NULL DEFAULT '0',
`assigned_date` int(11) NOT NULL,
`asgn_to` int(11) NOT NULL DEFAULT '0',
`decline` enum('0','1') NOT NULL,
`deleted` enum('0','1') NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `news_feed`
--

CREATE TABLE `news_feed` (
`id` int(11) NOT NULL,
`title` mediumtext NOT NULL,
`feed` text NOT NULL,
`time` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
`id` int(11) NOT NULL,
`roll` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`deg` varchar(255) NOT NULL,
`crs` varchar(255) NOT NULL,
`room` int(11) NOT NULL,
`tower` int(11) NOT NULL,
`faculty` enum('0','1') NOT NULL,
`admin` enum('0','1') NOT NULL,
`man_pow` enum('0','1') NOT NULL DEFAULT '0',
`fcm-token` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `complaints`
--
ALTER TABLE `complaints`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `news_feed`
--
ALTER TABLE `news_feed`
ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `complaints`
--
ALTER TABLE `complaints`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `news_feed`
--
ALTER TABLE `news_feed`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
79 changes: 72 additions & 7 deletions dist/css/custom-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,79 @@
margin: 0px;
}

.pending {
background: #ffd0d0;
.chart-bar {
display: table;
table-layout: fixed;
width: 100%;
max-width: 700px;
height: 200px;
font-size: 12px;
margin: 0 auto;
background-image: linear-gradient(to top, rgba(0, 0, 0, 0.1) 2%, rgba(0, 0, 0, 0) 2%);
background-size: 100% 50px;
background-position: left top;
}
.chart-bar li {
position: relative;
display: table-cell;
vertical-align: bottom;
height: 200px;
color: #fff;
}
.chart-bar span {
margin: 0 1em;
display: block;
text-align: center;
min-height: 20px;
/* background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent)!important;
*/
animation: draw 1s ease-in-out;
}
.chart-bar span:before {
position: absolute;
left: 0;
right: 0;
top: 100%;
padding: 5px 1em 0;
display: block;
text-align: center;
color: #000;
content: attr(title);
word-wrap: break-word;
}

.assigned {
background: #adffad;
@keyframes draw {
0% {
height: 0;
}
}

.completed {
background: #fff;
}
@media screen and (max-width: 600px) {
.chart-bar {
font-size: 7px;
font-weight: 700;
}
}


.modal {
background: #00000080;
}

[type="date"] {
background:#fff url(https://cdn1.iconfinder.com/data/icons/cc_mono_icon_set/blacks/16x16/calendar_2.png) 97% 50% no-repeat ;
border: 1px solid #c4c4c4;
border-radius: 5px;
background-color: #fff;
padding: 3px 5px;
box-shadow: inset 0 3px 6px rgba(0,0,0,0.1);
width: 190px;
}
[type="date"]::-webkit-inner-spin-button {
display: none;
}
[type="date"]::-webkit-calendar-picker-indicator {
opacity: 0;
}


19 changes: 19 additions & 0 deletions dist/js/profanity.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
var profane_words=new Array("dog","badword-2","badword-3");
function profanity(txt)
{
var alert_arr=new Array;
var alert_count=0;
var compare_text=txt;
var total = profane_words.length;
var matches = 0;

for( var i = 0; i < total; i++ )
{
if(compare_text.indexOf(profane_words[i]) > -1)
{
var message=1;
return message;
break;
}
}
}
42 changes: 42 additions & 0 deletions html/ltr/accept.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

require_once 'inc.php';
require_once 'config.php';
require_once 'fcm.php';

if(!isWork($_SESSION['id'], $con)) {
redirect('dashboard.php');
die();
}

if(isset($_GET['url'])) {
$url = $_GET['url'];
} else {
$url = "dashboard.php";
}
if(!isset($_SESSION['name'])) {
header("Location: login.php");
die();
}


if(isset($_GET['cid'])) {
$id = $_SESSION['id'];
$cid = $_GET['cid'];

$sql_query = "SELECT * FROM `complaints` WHERE `id` = '{$cid}' LIMIT 1 ";
$result = mysqli_query($con, $sql_query);


if(mysqli_num_rows($result) < 1) {
redirect($url);
exit(0);
}

$time = time();
$row = mysqli_fetch_assoc($result);
$query = "UPDATE `complaints` SET `accepted` = '1', `accepted_date` ='{$time}' WHERE `id` = '{$cid}' LIMIT 1";
$exec = mysqli_query($con, $query);
redirect($url);
}
?>
Loading

0 comments on commit 2d6f7b7

Please sign in to comment.