-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Abbas
committed
Jun 21, 2019
1 parent
0016d2a
commit 2d6f7b7
Showing
55 changed files
with
2,797 additions
and
606 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 */; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
?> |
Oops, something went wrong.