├── .gitattributes ├── .gitignore ├── LICENSE.md ├── README.md ├── allocate.php ├── backup.php ├── batches.php ├── connect_db.php ├── courses.php ├── create_tables.sql ├── css ├── chosen.css ├── dashboard.css ├── styles.css └── table.css ├── dean.php ├── depts.php ├── download.php ├── faculty.php ├── fonts ├── candara-webfont.eot ├── candara-webfont.svg ├── candara-webfont.ttf ├── candara-webfont.woff └── candaraz-webfont.eot ├── functions.php ├── images ├── accbg.png ├── add.png ├── avatar.png ├── base.png ├── bg.jpg ├── box_bottom.png ├── box_center.png ├── box_top.png ├── checkbox.png ├── chosen-sprite.png ├── chosen-sprite@2x.png ├── currentM.png ├── db.png ├── details_icon.png ├── details_icon2.png ├── favicon.png ├── foot.png ├── information.png ├── key.png ├── loader_green.gif ├── logout.png ├── menu_bg.jpg ├── pick_bg.jpg ├── pswd_icon.png ├── pwd_icon.png ├── radio.png ├── remove.png ├── screenshot_allocation.png ├── screenshot_slots.png ├── screenshot_users.png ├── seletedown.png ├── seleteup.png ├── shape.png ├── timetable.png ├── top_bgrepeat.jpg ├── uInfo_icon.png └── usr_icon.png ├── index.php ├── js ├── capture.js ├── chosen.js ├── form.js ├── grid.js ├── jquery.min.js ├── ui-touch-punch.min.js └── ui.min.js ├── login.php ├── logout.php ├── manage.php ├── phantomjs ├── phantomjs └── phantomjs.exe ├── register.php ├── rooms.php └── setup.php /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | QuickSlots: A web-based timetable management system 2 | ---------- 3 | 4 | 5 | -------------------------------------------------------------------------------- 6 | Features 7 | -------------------------------------------------------------------------------- 8 | 9 | * Light-Weight: The whole application, including all images,scripts and 10 | stylesheets, is only 1.35 MB uncompressed and just 714KB when compressed. 11 | 12 | * Fully automated installer: QuickSlots comes with a fully automated installer, 13 | meaning that the administrator just has to run the installer and does not 14 | have to look into ANY PART OF THE SOURCE CODE AT ALL. 15 | 16 | * One-click total system backup and restore: Backup and restore settings and 17 | databases, even across different servers, just with a single click. 18 | 19 | * Generate ready-to-print timetable image snapshots. 20 | 21 | * Support for LDAP authentication. 22 | 23 | -------------------------------------------------------------------------------- 24 | Screenshots 25 | -------------------------------------------------------------------------------- 26 | User management: 27 | 28 | ![Alt text](images/screenshot_users.png "User management") 29 | 30 | Slots Configuration: 31 | 32 | ![Alt text](images/screenshot_slots.png "Slots Configuration") 33 | 34 | Timetable Allocation: 35 | 36 | ![Alt text](images/screenshot_allocation.png "Timetable Allocation") 37 | 38 | -------------------------------------------------------------------------------- 39 | Files and Descriptions 40 | -------------------------------------------------------------------------------- 41 | 42 | * .\setup.php 43 | -- Initial system setup. 44 | * .\index.php 45 | -- Displays the timetable applying the provided filters, if any. 46 | * .\login.php 47 | -- Provides interface and back end routines that handle user logins. 48 | * .\logout.php 49 | -- Logs out the user when visited 50 | * .\allocate.php 51 | -- Provides interface and back end routines for allocation of courses to 52 | time slots 53 | * .\dean.php 54 | -- Homepage of dean level users, it provides interface and back end 55 | routines to edit and save global settings. Access is restricted to dean 56 | level users. 57 | * .\manage.php 58 | -- Provides interface and back end routines to manage departments, faculty, 59 | batches and rooms. Access is restricted to dean level users. 60 | * .\faculty.php 61 | -- Homepage of HOD and faculty level users, provides interfaces to 62 | add/delete courses. Access requires at least faculty level account. 63 | * .\register.php 64 | -- Contains back end routines for user management. It is invoked by 65 | manage.php and setup.php 66 | * .\connect_db.php 67 | -- Initiates database connections. Required by all files that needs to 68 | perform database operations 69 | * .\functions.php 70 | -- Contains various common helper routines used across most files 71 | * .\courses.php 72 | -- Contains back end routines to add/delete courses. It is invoked by 73 | faculty.php 74 | * .\batches.php 75 | -- Contains back end routines to add/delete batches. It is invoked by 76 | manage.php 77 | * .\depts.php 78 | -- Contains back end routines to add/delete batches. It is invoked by 79 | manage.php 80 | * .\rooms.php 81 | -- Contains back end routines to add/delete batches. It is invoked by 82 | dean.php 83 | * .\backup.php 84 | -- Contains back end routines to generate/restore backups, invoked by 85 | dean.php 86 | * .\download.php 87 | -- Back end routines that call PhantomJS to generate printable timetable 88 | snapshot images. 89 | * .\js\grid.js 90 | -- Client side script to render timetable grids 91 | * .\js\form.js 92 | -- Handles all form submissions and validation that needs to be done via 93 | AJAX 94 | * .\js\capture.js 95 | -- Contains PhantomJS routines for printable table snapshot generation 96 | * .\css\styles.css 97 | -- Defines generic styles shared by the whole QuickSlots UI 98 | * .\css\table.css 99 | -- Defines generic styles for QuickSlots table grids 100 | * .\css\dashboard.css 101 | -- Defines the stylings for various elements of the dashboard 102 | 103 | -------------------------------------------------------------------------------- 104 | External Libraries and Programs Used 105 | -------------------------------------------------------------------------------- 106 | 107 | * PhantomJS: PhantomJS web stack (for generating screenshots) 108 | (https://phantomjs.org/) 109 | 110 | * jQuery Core: The jQuery Core javascript library (https://jquery.com/) 111 | 112 | * jQuery UI: The jQuery UI library (https://jqueryui.com/) 113 | 114 | * jQuery UI Touch Punch: Touch Event Support for jQuery UI 115 | (http://touchpunch.furf.com/) 116 | 117 | * Chosen.js: Select Box Enhancer for jQuery (http://harvesthq.github.io/chosen/) 118 | 119 | -------------------------------------------------------------------------------- 120 | System Requirements 121 | -------------------------------------------------------------------------------- 122 | 123 | * Apache Web Server: Version 2.4 or higher recommended 124 | 125 | * MYSQL Database Engine: Version 5.5 or higher recommended 126 | 127 | * PHP Hypertext Preprocessor: Version 5.5 or higher recommended 128 | 129 | -------------------------------------------------------------------------------- 130 | Installation Instructions 131 | -------------------------------------------------------------------------------- 132 | 133 | * Make sure that the apache user has read/write permissions on the file 134 | "config.php", and the directory "tmp", used respectively for configuration and 135 | backup & screen-shot generation. 136 | 137 | * Visit setup.php through a web browser and provide the required database and 138 | LDAP configurations. Thereafter, set up the first dean/admin account 139 | to complete the setup. 140 | 141 | -------------------------------------------------------------------------------- 142 | Usage Instructions 143 | -------------------------------------------------------------------------------- 144 | 145 | * Login using the "dean"(admin) account. You will be redirected to the 146 | "Manage Timetables" page. 147 | 148 | * Create a timetable by clicking on the drop-down on top, beside "Configure 149 | Timetable:" 150 | 151 | * Add departments, faculty, courses and rooms. 152 | 153 | * HOD of every department can create courses and allocate timetables for all 154 | faculty of his/her department. 155 | 156 | * Faculty is the account with the least set of privileges: creating courses and 157 | managing, the timetable for his courses. These privileges are shared by the 158 | HOD and dean as well. 159 | 160 | -------------------------------------------------------------------------------- 161 | Viewing the timetable 162 | -------------------------------------------------------------------------------- 163 | 164 | The timetable can be viewed by two groups of users: 165 | 166 | * Public/guest users (like students): 167 | - Without needing any login, guest users can either visit the application 168 | web-root to view the timetable by applying filters on their own, or by 169 | visiting the links generated by faculty. 170 | - When they visit the web-root, only the current active timetable is displayed 171 | by default. As before, users can further apply the various filters such to 172 | find what they need. 173 | - The system also displays a link based on these filters which can be 174 | saved/bookmarked by them for direct display of the filtered timetable. 175 | 176 | * Authorized users (Faculty/HOD/Dean): 177 | - Once authenticated faculty can view, generate links and download snapshots 178 | for all instances of the timetable, with any set of filters applied. 179 | 180 | -------------------------------------------------------------------------------- 181 | Manage Timetable Instructions 182 | -------------------------------------------------------------------------------- 183 | 184 | * Multiple instances of timetable can be created. While creating a new 185 | timetable, number of slots, working days and starting time can be configured. 186 | 187 | * In a authenticated users can easily manage timetable with the help of the 188 | intuitive GUI and instructions that accompany. 189 | 190 | * Timetables can be frozen by a dean at any time when a finalized timetable is 191 | needed. It can be used if you want to avoid any accidental changes on the 192 | timetable once finalized. A frozen timetable cannot be edited unless a dean 193 | choses to de-freeze it. 194 | 195 | -------------------------------------------------------------------------------- 196 | Backup/Restore 197 | -------------------------------------------------------------------------------- 198 | 199 | * The system allows the dean to download a whole backup of the database. 200 | 201 | * System can be restored to the previous state by uploading the backup file 202 | back. -------------------------------------------------------------------------------- /allocate.php: -------------------------------------------------------------------------------- 1 | prepare('SELECT uName FROM faculty where uName = ? AND dept_code=?'); 22 | $query->execute([$_GET['faculty'],$_SESSION['dept']]); 23 | $fac = $query->fetch(); 24 | if(!empty($fac['uName'])) 25 | $_SESSION['faculty'] = $_GET['faculty']; 26 | } 27 | } 28 | $query = $db->prepare('SELECT * FROM courses where fac_id = ?'); 29 | $query->execute([$_SESSION['faculty']]); 30 | $courses = $query->fetchall(); 31 | foreach ($courses as $course) { 32 | if($course['allow_conflict'] && $current['allowConflicts']) 33 | continue; 34 | $blocked[$course['course_id']] = []; 35 | $filter = !$current['allowConflicts']?"OR allow_conflict=1":""; 36 | $query = $db->prepare("SELECT course_id,count(*) as batches FROM 37 | (SELECT * FROM allowed where course_id NOT IN 38 | (SELECT course_id FROM courses where fac_id = ? $filter)) other NATURAL JOIN 39 | (SELECT batch_name,batch_dept FROM allowed where course_id=?) batches 40 | group by course_id"); 41 | 42 | $query->execute([$_SESSION['faculty'],$course['course_id']]); 43 | 44 | $conflicts = $query->fetchall(); 45 | 46 | foreach ($conflicts as $conflict) 47 | { 48 | $query = $db->prepare('SELECT day,slot_num FROM slot_allocs where table_name=? AND course_id=?'); 49 | $query->execute([$current['table_name'],$conflict['course_id']]); 50 | $conf_slots=$query->fetchall(); 51 | foreach ($conf_slots as $conf_slot) 52 | { 53 | $slotStr = $conf_slot['day']. "_" .$conf_slot['slot_num']; 54 | if(isset($blocked[$course['course_id']][$slotStr])) 55 | $blocked[$course['course_id']][$slotStr] += $conflict['batches']; 56 | else 57 | $blocked[$course['course_id']][$slotStr] = $conflict['batches']; 58 | } 59 | } 60 | } 61 | 62 | if(valueCheck('action','saveSlots')) 63 | { 64 | if($current['frozen']) 65 | postResponse("error","This timetable has been frozen"); 66 | foreach ($_POST as $slotStr => $course_room) 67 | { 68 | $course=explode(':', $course_room)[0]; 69 | if(!empty($blocked[$course][$slotStr])) 70 | postResponse("redirect","allocate.php?error=conflict"); 71 | } 72 | $query = $db->prepare('DELETE FROM slot_allocs where table_name=? AND course_id IN (SELECT course_id FROM courses where fac_id=?)'); 73 | $query->execute([$current['table_name'],$_SESSION['faculty']]); 74 | $query = $db->prepare('INSERT INTO slot_allocs values(?,?,?,?,?)'); 75 | try 76 | { 77 | foreach ($_POST as $slotStr => $course_room) 78 | { 79 | $course_room = explode(':', $course_room); 80 | $course = $course_room[0]; 81 | $room = $course_room[1]; 82 | $slot = explode('_', $slotStr); 83 | $query->execute([$current['table_name'],$slot[0],$slot[1],$room,$course]); 84 | } 85 | } 86 | catch(PDOException $e) 87 | { 88 | if($e->errorInfo[0]==23000) 89 | postResponse("error","The selected room has been booked already, rooms list has been refreshed"); 90 | else 91 | postResponse("error",$e->errorInfo[2]); 92 | } 93 | postResponse("info","Slots Saved"); 94 | die(); 95 | } 96 | if(valueCheck('action','queryRooms')) 97 | { 98 | $slot = explode('_', $_POST["slot"]); 99 | $query = $db->prepare('SELECT min(size) FROM allowed NATURAL JOIN batches where course_id=?'); 100 | $query->execute([$_POST['course']]); 101 | $minCap = $query->fetch()[0]; 102 | $query = $db->prepare('SELECT room_name,capacity FROM rooms 103 | where capacity>=? AND room_name NOT IN 104 | (SELECT room FROM slot_allocs where table_name=? AND day=? AND slot_num=? 105 | AND course_id NOT IN (SELECT course_id FROM courses where fac_id=?) 106 | ) ORDER BY capacity'); 107 | $query->execute([$minCap,$current['table_name'],$slot[0],$slot[1],$_SESSION['faculty']]); 108 | $rooms = $query->fetchall(PDO::FETCH_NUM); 109 | die(json_encode($rooms)); 110 | } 111 | if(valueCheck('action','queryConflict')) 112 | { 113 | $slot = explode('_', $_POST["slot"]); 114 | $query = $db->prepare('SELECT course_id,course_name,fac_id,fac_name,GROUP_CONCAT(CONCAT(batch_name,\' : \',batch_dept) ORDER BY batch_name SEPARATOR \', \') as batches from allowed NATURAL JOIN courses NATURAL JOIN (SELECT fac_name,uName as fac_id from faculty) faculty where course_id IN (SELECT course_id from slot_allocs where table_name=? AND day=? AND slot_num=?) AND (batch_name,batch_dept) IN (SELECT batch_name,batch_dept FROM allowed where course_id=?) GROUP BY course_id'); 115 | $query->execute([$current['table_name'],$slot[0],$slot[1],$_POST['course']]); 116 | $conflicts = $query->fetchall(); 117 | $inf_html = ""; 118 | foreach ($conflicts as $conflict) { 119 | $fac_info = $conflict['fac_name']; 120 | if(!sessionCheck('level','faculty')) 121 | $fac_info = "{$conflict['fac_name']}"; 122 | $inf_html .= << 124 | {$conflict['course_name']} 125 | $fac_info 126 | {$conflict['batches']} 127 | 128 | HTML; 129 | } 130 | die($inf_html); 131 | } 132 | 133 | ?> 134 | 135 | 136 | 137 | QuickSlots 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 335 | 336 | 337 | 338 |
Allocate Timetable
339 | 346 | 361 |
362 |
363 |
364 | Timetable: 365 | 374 |
375 |
376 |
377 | prepare('SELECT * FROM slot_allocs where table_name=? AND course_id IN (SELECT course_id FROM courses where fac_id=?)'); 379 | $query->execute([$current['table_name'],$_SESSION['faculty']]); 380 | while($slot = $query->fetch()) 381 | echo ''; 382 | ?> 383 | 384 |
385 |   Another faculty has just allocated one of the slots. Please try again 386 |
387 | 388 |
389 |
390 | 391 |
392 | 393 |
394 |
395 |
396 |
Legend:
397 |
398 |
Free
399 |
400 |
Disabled
401 |
402 | 403 | ● Drag and Drop a course from the right panel to the required slot
404 | ● Double-click on a slot to clear it
405 | ● Conflicting Slots are indicated in red and would contain the number of batches affected
406 | ● A '~' before a course indicates that its conflicts are not considered 407 |
408 |
409 |
410 | prepare("SELECT * FROM slots WHERE table_name=? AND state='disabled'"); 412 | $query->execute([$current['table_name']]); 413 | $disabled = $query->fetchall(); 414 | foreach ($disabled as $slot) 415 | echo ''; 416 | ?> 417 |
418 |
419 | "; 425 | foreach ($blocked[$course['course_id']] as $slot => $batches) 426 | echo ""; 427 | echo "
"; 428 | } 429 | ?> 430 |
431 | 432 |
433 |
434 | 435 |
Faculty
436 | 444 | 445 |
Courses
446 |
447 | {$course['course_name']} ({$course['course_id']})
"; 452 | } 453 | if(!$courses) 454 | echo 'You have not started offering any courses.
Visit the Manage Courses section to add courses' 455 | ?> 456 |
457 |
Assign Room
458 | Click on a slot to assign room 459 |
Conflict Details
460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 |
CourseFacultyBatches
● Drop a course into a conflicting slot to show conflict details
470 | 471 | 472 | 473 | 474 | -------------------------------------------------------------------------------- /backup.php: -------------------------------------------------------------------------------- 1 | exec(file_get_contents($snapshot)); 24 | unlink($snapshot); 25 | header("Location: dean.php?status=restoreComplete"); 26 | } 27 | catch(PDOException $e) 28 | { 29 | postResponse("error",$e->errorInfo[2]); 30 | } 31 | } 32 | ?> 33 | -------------------------------------------------------------------------------- /batches.php: -------------------------------------------------------------------------------- 1 | prepare('INSERT INTO batches(batch_name,batch_dept,size) values (?,?,?)'); 20 | $query->execute([$_POST['batch_name'],$_POST['dept'],$_POST['size']]); 21 | postResponse("addOpt","Batch Added",[$_POST['batch_name'].' : '.$_POST['dept'],$_POST['size']]); 22 | } 23 | catch(PDOException $e) 24 | { 25 | if($e->errorInfo[0]==23000) 26 | postResponse("error","Batch already exists"); 27 | else 28 | postResponse("error",$e->errorInfo[2]); 29 | } 30 | 31 | } 32 | elseif(valueCheck('action','delete')) 33 | { 34 | $query = $db->prepare('DELETE FROM batches where batch_name = ? AND batch_dept=?'); 35 | $batch = explode(" : ",$_POST['batch']); 36 | $query->execute([$batch[0],$batch[1]]); 37 | postResponse("removeOpt","Batch deleted"); 38 | } 39 | 40 | ?> -------------------------------------------------------------------------------- /connect_db.php: -------------------------------------------------------------------------------- 1 | PDO::ERRMODE_EXCEPTION, 20 | PDO::MYSQL_ATTR_FOUND_ROWS => true 21 | ]); 22 | if(!empty($_GET['table'])) 23 | { 24 | if(sessionCheck('level','dean')) 25 | { 26 | $active = 1 - $db->query("SELECT count(*) from timetables where active=1")->fetchColumn(); 27 | $query = $db->prepare("INSERT IGNORE into timetables(table_name, active) VALUES(?, $active)"); 28 | $query->execute([$_GET['table']]); 29 | } 30 | $query = $db->prepare("SELECT * FROM timetables where table_name=?"); 31 | $query->execute([$_GET['table']]); 32 | $current = $query->fetch(PDO::FETCH_ASSOC); 33 | $_SESSION['timetable'] = $current; 34 | } 35 | else if(empty($_SESSION['timetable']) || empty($_SESSION['timetable']['table_name'])) 36 | { 37 | $current = $db->query("SELECT * FROM timetables where table_name=(SELECT table_name from timetables where active=1)")->fetch(PDO::FETCH_ASSOC); 38 | if(!$current) 39 | { 40 | $current['start_hr'] = '08'; 41 | $current['slots'] = 0; 42 | $current['duration'] = 90; 43 | $current['days'] = 0; 44 | $current['start_mer'] = 'AM'; 45 | $current['start_min'] ='30'; 46 | $current['allowConflicts'] = 0; 47 | $current['frozen'] = 0; 48 | $current['table_name'] = ''; 49 | $current['active'] = 0; 50 | } 51 | $_SESSION['timetable'] = $current; 52 | } 53 | else 54 | { 55 | $query = $db->prepare("SELECT * FROM timetables where table_name=?"); 56 | $query->execute([$_SESSION['timetable']['table_name']]); 57 | $current = $query->fetch(PDO::FETCH_ASSOC); 58 | $_SESSION['timetable'] = $current; 59 | } 60 | } 61 | catch(PDOException $e){ 62 | die($e->getMessage()."\n"); 63 | } 64 | } 65 | else 66 | { 67 | header("Location: ./setup.php"); 68 | die(); 69 | } 70 | 71 | ?> -------------------------------------------------------------------------------- /courses.php: -------------------------------------------------------------------------------- 1 | prepare('INSERT INTO courses(course_Id,course_name,fac_id,allow_conflict) values (?,?,?,?)'); 28 | $query->execute([$cId,$_POST['cName'],$_SESSION['faculty'],$_POST["allowConflict"]]); 29 | $query = $db->prepare('INSERT INTO allowed(course_Id,batch_name,batch_dept) values (?,?,?)'); 30 | foreach ($_POST['batch'] as $batch) 31 | { 32 | $batch = explode(" : ",$batch); 33 | $query->execute([$cId,$batch[0],$batch[1]]); 34 | } 35 | postResponse("addOpt","Course Added",[$_POST['cName'],$cId]); 36 | } 37 | catch(PDOException $e) 38 | { 39 | if($e->errorInfo[0]==23000) 40 | postResponse("error","Course ID already exists"); 41 | else 42 | postResponse("error",$e->errorInfo[2]); 43 | } 44 | } 45 | elseif(valueCheck('action','delete')) 46 | { 47 | $query = $db->prepare('DELETE FROM courses where course_id =? and fac_id =?'); 48 | $query->execute([$_POST['cId'],$_SESSION['faculty']]); 49 | postResponse("removeOpt","Course deleted"); 50 | } 51 | 52 | ?> 53 | -------------------------------------------------------------------------------- /create_tables.sql: -------------------------------------------------------------------------------- 1 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 2 | SET time_zone = "+00:00"; 3 | 4 | -- -------------------------------------------------------- 5 | 6 | -- 7 | -- Table structure for table `allowed` 8 | -- 9 | 10 | DROP TABLE IF EXISTS `allowed`; 11 | CREATE TABLE IF NOT EXISTS `allowed` ( 12 | `course_id` char(10) NOT NULL, 13 | `batch_name` varchar(30) NOT NULL, 14 | `batch_dept` char(5) NOT NULL 15 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 16 | 17 | -- -------------------------------------------------------- 18 | 19 | -- 20 | -- Table structure for table `batches` 21 | -- 22 | 23 | DROP TABLE IF EXISTS `batches`; 24 | CREATE TABLE IF NOT EXISTS `batches` ( 25 | `batch_name` varchar(30) NOT NULL, 26 | `batch_dept` char(5) NOT NULL, 27 | `size` int(11) NOT NULL 28 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 29 | 30 | -- -------------------------------------------------------- 31 | 32 | -- 33 | -- Table structure for table `config` 34 | -- 35 | 36 | DROP TABLE IF EXISTS `config`; 37 | CREATE TABLE IF NOT EXISTS `config` ( 38 | `Name` varchar(30) NOT NULL, 39 | `value` varchar(30) NOT NULL 40 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 41 | 42 | -- -------------------------------------------------------- 43 | 44 | -- 45 | -- Table structure for table `courses` 46 | -- 47 | 48 | DROP TABLE IF EXISTS `courses`; 49 | CREATE TABLE IF NOT EXISTS `courses` ( 50 | `course_id` char(10) NOT NULL, 51 | `course_name` varchar(100) NOT NULL, 52 | `fac_id` char(25) NOT NULL, 53 | `allow_conflict` tinyint(1) NOT NULL DEFAULT '0' 54 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 55 | 56 | -- -------------------------------------------------------- 57 | 58 | -- 59 | -- Table structure for table `depts` 60 | -- 61 | 62 | DROP TABLE IF EXISTS `depts`; 63 | CREATE TABLE IF NOT EXISTS `depts` ( 64 | `dept_code` char(5) NOT NULL, 65 | `dept_name` varchar(50) NOT NULL 66 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 67 | 68 | -- -------------------------------------------------------- 69 | 70 | -- 71 | -- Table structure for table `faculty` 72 | -- 73 | 74 | DROP TABLE IF EXISTS `faculty`; 75 | CREATE TABLE IF NOT EXISTS `faculty` ( 76 | `uName` char(25) NOT NULL, 77 | `fac_name` varchar(50) NOT NULL, 78 | `pswd` char(64) NOT NULL, 79 | `level` enum('dean','hod','faculty','') NOT NULL DEFAULT 'faculty', 80 | `dept_code` char(5) NOT NULL, 81 | `dateRegd` char(25) NOT NULL 82 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 83 | 84 | -- -------------------------------------------------------- 85 | 86 | -- 87 | -- Table structure for table `rooms` 88 | -- 89 | 90 | DROP TABLE IF EXISTS `rooms`; 91 | CREATE TABLE IF NOT EXISTS `rooms` ( 92 | `room_name` varchar(25) NOT NULL, 93 | `capacity` int(11) NOT NULL 94 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 95 | 96 | -- -------------------------------------------------------- 97 | 98 | -- 99 | -- Table structure for table `slots` 100 | -- 101 | 102 | DROP TABLE IF EXISTS `slots`; 103 | CREATE TABLE IF NOT EXISTS `slots` ( 104 | `table_name` varchar(30) NOT NULL, 105 | `day` int(1) unsigned NOT NULL, 106 | `slot_num` int(2) unsigned NOT NULL, 107 | `state` enum('active','disabled') NOT NULL 108 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 109 | 110 | -- -------------------------------------------------------- 111 | 112 | -- 113 | -- Table structure for table `slot_allocs` 114 | -- 115 | 116 | DROP TABLE IF EXISTS `slot_allocs`; 117 | CREATE TABLE IF NOT EXISTS `slot_allocs` ( 118 | `table_name` varchar(30) NOT NULL, 119 | `day` int(1) unsigned NOT NULL, 120 | `slot_num` int(2) unsigned NOT NULL, 121 | `room` varchar(25) NOT NULL, 122 | `course_id` char(10) NOT NULL 123 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 124 | 125 | -- -------------------------------------------------------- 126 | 127 | -- 128 | -- Table structure for table `timetables` 129 | -- 130 | 131 | DROP TABLE IF EXISTS `timetables`; 132 | CREATE TABLE IF NOT EXISTS `timetables` ( 133 | `table_name` varchar(30) NOT NULL, 134 | `days` int(11) NOT NULL DEFAULT '5', 135 | `slots` int(11) NOT NULL DEFAULT '0', 136 | `duration` int(11) NOT NULL DEFAULT '90', 137 | `start_hr` char(2) NOT NULL DEFAULT '08', 138 | `start_min` char(2) NOT NULL DEFAULT '30', 139 | `start_mer` enum('AM','PM') NOT NULL DEFAULT 'AM', 140 | `allowConflicts` tinyint(1) NOT NULL DEFAULT '0', 141 | `frozen` tinyint(1) NOT NULL DEFAULT '0', 142 | `active` tinyint(1) NOT NULL DEFAULT '0' 143 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 144 | 145 | -- 146 | -- Indexes for dumped tables 147 | -- 148 | 149 | -- 150 | -- Indexes for table `allowed` 151 | -- 152 | ALTER TABLE `allowed` 153 | ADD PRIMARY KEY (`course_id`,`batch_name`,`batch_dept`), 154 | ADD KEY `course_id` (`course_id`), 155 | ADD KEY `batch_name` (`batch_name`,`batch_dept`); 156 | 157 | -- 158 | -- Indexes for table `batches` 159 | -- 160 | ALTER TABLE `batches` 161 | ADD PRIMARY KEY (`batch_name`,`batch_dept`), 162 | ADD KEY `batches_department` (`batch_dept`); 163 | 164 | -- 165 | -- Indexes for table `config` 166 | -- 167 | ALTER TABLE `config` 168 | ADD PRIMARY KEY (`Name`); 169 | 170 | -- 171 | -- Indexes for table `courses` 172 | -- 173 | ALTER TABLE `courses` 174 | ADD PRIMARY KEY (`course_id`), 175 | ADD KEY `fac_id` (`fac_id`); 176 | 177 | -- 178 | -- Indexes for table `depts` 179 | -- 180 | ALTER TABLE `depts` 181 | ADD PRIMARY KEY (`dept_code`); 182 | 183 | -- 184 | -- Indexes for table `faculty` 185 | -- 186 | ALTER TABLE `faculty` 187 | ADD PRIMARY KEY (`uName`), 188 | ADD KEY `dept_code` (`dept_code`); 189 | 190 | -- 191 | -- Indexes for table `rooms` 192 | -- 193 | ALTER TABLE `rooms` 194 | ADD PRIMARY KEY (`room_name`); 195 | 196 | -- 197 | -- Indexes for table `slots` 198 | -- 199 | ALTER TABLE `slots` 200 | ADD PRIMARY KEY (`table_name`,`day`,`slot_num`); 201 | 202 | -- 203 | -- Indexes for table `slot_allocs` 204 | -- 205 | ALTER TABLE `slot_allocs` 206 | ADD PRIMARY KEY (`table_name`,`day`,`slot_num`,`room`), 207 | ADD KEY `fk_course_id` (`course_id`), 208 | ADD KEY `fk_room` (`room`), 209 | ADD KEY `fk_slot` (`day`,`slot_num`); 210 | 211 | -- 212 | -- Indexes for table `timetables` 213 | -- 214 | ALTER TABLE `timetables` 215 | ADD PRIMARY KEY (`table_name`); 216 | 217 | -- 218 | -- Constraints for dumped tables 219 | -- 220 | 221 | -- 222 | -- Constraints for table `allowed` 223 | -- 224 | ALTER TABLE `allowed` 225 | ADD CONSTRAINT `batch` FOREIGN KEY (`batch_name`, `batch_dept`) REFERENCES `batches` (`batch_name`, `batch_dept`) ON DELETE CASCADE ON UPDATE CASCADE, 226 | ADD CONSTRAINT `course` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE ON UPDATE CASCADE; 227 | 228 | -- 229 | -- Constraints for table `batches` 230 | -- 231 | ALTER TABLE `batches` 232 | ADD CONSTRAINT `batches_department` FOREIGN KEY (`batch_dept`) REFERENCES `depts` (`dept_code`) ON DELETE CASCADE ON UPDATE CASCADE; 233 | 234 | -- 235 | -- Constraints for table `courses` 236 | -- 237 | ALTER TABLE `courses` 238 | ADD CONSTRAINT `courses_ibfk_1` FOREIGN KEY (`fac_id`) REFERENCES `faculty` (`uName`) ON DELETE CASCADE ON UPDATE CASCADE; 239 | 240 | -- 241 | -- Constraints for table `faculty` 242 | -- 243 | ALTER TABLE `faculty` 244 | ADD CONSTRAINT `faculty_ibfk_1` FOREIGN KEY (`dept_code`) REFERENCES `depts` (`dept_code`) ON DELETE CASCADE ON UPDATE CASCADE; 245 | 246 | -- 247 | -- Constraints for table `slots` 248 | -- 249 | ALTER TABLE `slots` 250 | ADD CONSTRAINT `fk_timetable` FOREIGN KEY (`table_name`) REFERENCES `timetables` (`table_name`) ON DELETE CASCADE ON UPDATE CASCADE; 251 | 252 | -- 253 | -- Constraints for table `slot_allocs` 254 | -- 255 | ALTER TABLE `slot_allocs` 256 | ADD CONSTRAINT `fk_course` FOREIGN KEY (`course_id`) REFERENCES `courses` (`course_id`) ON DELETE CASCADE ON UPDATE CASCADE, 257 | ADD CONSTRAINT `fk_room` FOREIGN KEY (`room`) REFERENCES `rooms` (`room_name`) ON DELETE CASCADE ON UPDATE CASCADE, 258 | ADD CONSTRAINT `fk_slot` FOREIGN KEY (`table_name`, `day`, `slot_num`) REFERENCES `slots` (`table_name`, `day`, `slot_num`) ON DELETE CASCADE ON UPDATE CASCADE; -------------------------------------------------------------------------------- /css/chosen.css: -------------------------------------------------------------------------------- 1 | /*! 2 | Chosen, a Select Box Enhancer for jQuery and Prototype 3 | by Patrick Filler for Harvest, http://getharvest.com 4 | 5 | Version 1.2.0 6 | Full source at https://github.com/harvesthq/chosen 7 | Copyright (c) 2011-2014 Harvest http://getharvest.com 8 | 9 | MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md 10 | This file is generated by `grunt build`, do not edit it by hand. 11 | */ 12 | 13 | /* @group Base */ 14 | .chosen-container 15 | { 16 | position: relative; 17 | display: inline-block; 18 | vertical-align: middle; 19 | font-size: 13px; 20 | zoom: 1; 21 | *display: inline; 22 | -webkit-user-select: none; 23 | -moz-user-select: none; 24 | user-select: none; 25 | margin: 10px 0 2px 0; 26 | } 27 | .chosen-container * 28 | { 29 | -webkit-box-sizing: border-box; 30 | -moz-box-sizing: border-box; 31 | box-sizing: border-box; 32 | } 33 | .chosen-container .chosen-drop 34 | { 35 | position: absolute; 36 | top: 100%; 37 | left: -9999px; 38 | z-index: 1010; 39 | width: 100%; 40 | border: 1px solid #aaa; 41 | border-top: 0; 42 | background: #fff; 43 | box-shadow: 0 4px 5px rgba(0, 0, 0, 0.15); 44 | } 45 | .chosen-container.chosen-with-drop .chosen-drop 46 | { 47 | left: 0; 48 | } 49 | .chosen-container a 50 | { 51 | cursor: pointer; 52 | } 53 | 54 | /* @end */ 55 | /* @group Single Chosen */ 56 | .chosen-container-single .chosen-single 57 | { 58 | font-family: "Helvetica Neue",sans-serif; 59 | text-align: center; 60 | position: relative; 61 | display: block; 62 | overflow: hidden; 63 | padding: 0 0 0 5px; 64 | height: 28px; 65 | border: 1px solid #aaa; 66 | border-radius: 4px; 67 | background-color: #fff; 68 | background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #ffffff), color-stop(50%, #f6f6f6), color-stop(52%, #eeeeee), color-stop(100%, #f4f4f4)); 69 | background: -webkit-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); 70 | background: -moz-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); 71 | background: -o-linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); 72 | background: linear-gradient(top, #ffffff 20%, #f6f6f6 50%, #eeeeee 52%, #f4f4f4 100%); 73 | background-clip: padding-box; 74 | box-shadow: 0 0 3px white inset, 0 1px 1px rgba(0, 0, 0, 0.1); 75 | text-decoration: none; 76 | white-space: nowrap; 77 | line-height: 25px; 78 | } 79 | .chosen-container-single .chosen-default,.chosen-single 80 | { 81 | color: #7d7d7d; 82 | font-weight: bold; 83 | } 84 | .chosen-container-single .chosen-single span 85 | { 86 | display: block; 87 | overflow: hidden; 88 | margin-right: 19px; 89 | text-overflow: ellipsis; 90 | white-space: nowrap; 91 | } 92 | .chosen-container-single .chosen-single-with-deselect span 93 | { 94 | margin-right: 38px; 95 | } 96 | .chosen-container-single .chosen-single abbr 97 | { 98 | position: absolute; 99 | top: 8px; 100 | right: 26px; 101 | display: block; 102 | width: 12px; 103 | height: 12px; 104 | background: url('../images/chosen-sprite.png') -42px 1px no-repeat; 105 | font-size: 1px; 106 | } 107 | .chosen-container-single .chosen-single abbr:hover 108 | { 109 | background-position: -42px -10px; 110 | } 111 | .chosen-container-single.chosen-disabled .chosen-single abbr:hover 112 | { 113 | background-position: -42px -10px; 114 | } 115 | .chosen-container-single .chosen-single div 116 | { 117 | position: absolute; 118 | top: 0; 119 | right: 0; 120 | display: block; 121 | width: 18px; 122 | height: 100%; 123 | } 124 | .chosen-container-single .chosen-single div b 125 | { 126 | display: block; 127 | width: 100%; 128 | height: 100%; 129 | background: url('../images/chosen-sprite.png') no-repeat 0px 2px; 130 | } 131 | .chosen-container-single .chosen-search 132 | { 133 | position: relative; 134 | z-index: 1010; 135 | margin: 0; 136 | padding: 3px 4px; 137 | white-space: nowrap; 138 | } 139 | .chosen-container-single .chosen-search input[type="text"] 140 | { 141 | margin: 1px 0; 142 | padding: 4px 20px 4px 5px; 143 | width: 100%; 144 | height: auto; 145 | outline: 0; 146 | border: 1px solid #aaa; 147 | background: white url('../images/chosen-sprite.png') no-repeat 100% -20px; 148 | background: url('../images/chosen-sprite.png') no-repeat 100% -20px; 149 | font-size: 1em; 150 | font-family: sans-serif; 151 | line-height: normal; 152 | border-radius: 0; 153 | } 154 | .chosen-container-single .chosen-drop 155 | { 156 | margin-top: -1px; 157 | border-radius: 0 0 4px 4px; 158 | background-clip: padding-box; 159 | } 160 | .chosen-container-single.chosen-container-single-nosearch .chosen-search 161 | { 162 | position: absolute; 163 | left: -9999px; 164 | } 165 | 166 | /* @end */ 167 | /* @group Results */ 168 | .chosen-container .chosen-results 169 | { 170 | color: #444; 171 | position: relative; 172 | overflow-x: hidden; 173 | overflow-y: auto; 174 | margin: 0 4px 4px 0; 175 | padding: 0 0 0 4px; 176 | max-height: 240px; 177 | -webkit-overflow-scrolling: touch; 178 | } 179 | .chosen-container .chosen-results li 180 | { 181 | display: none; 182 | margin: 0; 183 | padding: 5px 6px; 184 | list-style: none; 185 | line-height: 15px; 186 | word-wrap: break-word; 187 | -webkit-touch-callout: none; 188 | } 189 | .chosen-container .chosen-results li.active-result 190 | { 191 | display: list-item; 192 | cursor: pointer; 193 | } 194 | .chosen-container .chosen-results li.disabled-result 195 | { 196 | display: list-item; 197 | color: #ccc; 198 | cursor: default; 199 | } 200 | .chosen-container .chosen-results li.highlighted 201 | { 202 | background-color: #3875d7; 203 | background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #3875d7), color-stop(90%, #2a62bc)); 204 | background-image: -webkit-linear-gradient(#3875d7 20%, #2a62bc 90%); 205 | background-image: -moz-linear-gradient(#3875d7 20%, #2a62bc 90%); 206 | background-image: -o-linear-gradient(#3875d7 20%, #2a62bc 90%); 207 | background-image: linear-gradient(#3875d7 20%, #2a62bc 90%); 208 | color: #fff; 209 | } 210 | .chosen-container .chosen-results li.no-results 211 | { 212 | color: #777; 213 | display: list-item; 214 | background: #f4f4f4; 215 | text-align: center; 216 | } 217 | .chosen-container .chosen-results li.group-result 218 | { 219 | display: list-item; 220 | font-weight: bold; 221 | cursor: default; 222 | } 223 | .chosen-container .chosen-results li.group-option 224 | { 225 | padding-left: 15px; 226 | } 227 | .chosen-container .chosen-results li em 228 | { 229 | font-style: normal; 230 | text-decoration: underline; 231 | } 232 | 233 | /* @end */ 234 | /* @group Multi Chosen */ 235 | .chosen-container-multi .chosen-choices 236 | { 237 | position: relative; 238 | overflow: hidden; 239 | margin: 0; 240 | padding: 1px 5px; 241 | width: 100%; 242 | height: auto !important; 243 | min-height: 28px; 244 | cursor: text; 245 | } 246 | .chosen-container-multi .chosen-choices li 247 | { 248 | list-style: none; 249 | } 250 | .chosen-container-multi .chosen-choices li.search-field 251 | { 252 | margin: 0; 253 | padding: 0; 254 | white-space: nowrap; 255 | } 256 | .chosen-container-multi .chosen-choices li.search-field input[type="text"] 257 | { 258 | margin: 1px 0; 259 | padding: 0; 260 | height: 24px; 261 | outline: 0; 262 | border: 0 !important; 263 | background: transparent !important; 264 | box-shadow: none; 265 | color: #999; 266 | font-size: 100%; 267 | font-weight: normal; 268 | font-family: sans-serif; 269 | line-height: normal; 270 | border-radius: 0; 271 | } 272 | .chosen-container-multi .chosen-choices li.search-choice 273 | { 274 | position: relative; 275 | margin: 3px 1px 3px 0; 276 | padding: 3px 20px 3px 5px; 277 | border: 1px solid #aaa; 278 | max-width: 100%; 279 | border-radius: 3px; 280 | background-color: #eeeeee; 281 | background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); 282 | background-image: -webkit-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); 283 | background-image: -moz-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); 284 | background-image: -o-linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); 285 | background-image: linear-gradient(#f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); 286 | background-size: 100% 19px; 287 | background-repeat: repeat-x; 288 | background-clip: padding-box; 289 | box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05); 290 | color: #333; 291 | line-height: 13px; 292 | cursor: default; 293 | } 294 | .chosen-container-multi .chosen-choices li.search-choice span 295 | { 296 | word-wrap: break-word; 297 | font-weight: bold; 298 | color: #666; 299 | } 300 | .chosen-container-multi .chosen-choices li.search-choice .search-choice-close 301 | { 302 | position: absolute; 303 | top: 4px; 304 | right: 3px; 305 | display: block; 306 | width: 12px; 307 | height: 12px; 308 | background: url('../images/chosen-sprite.png') -42px 1px no-repeat; 309 | font-size: 1px; 310 | } 311 | .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover 312 | { 313 | background-position: -42px -10px; 314 | } 315 | .chosen-container-multi .chosen-choices li.search-choice-disabled 316 | { 317 | padding-right: 5px; 318 | border: 1px solid #ccc; 319 | background-color: #e4e4e4; 320 | background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee)); 321 | background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); 322 | background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); 323 | background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); 324 | background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%); 325 | color: #666; 326 | } 327 | .chosen-container-multi .chosen-choices li.search-choice-focus 328 | { 329 | background: #d4d4d4; 330 | } 331 | .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close 332 | { 333 | background-position: -42px -10px; 334 | } 335 | .chosen-container-multi .chosen-results 336 | { 337 | margin: 0; 338 | padding: 0; 339 | } 340 | .chosen-container-multi .chosen-drop .result-selected 341 | { 342 | display: list-item; 343 | color: #ccc; 344 | cursor: default; 345 | } 346 | 347 | /* @end */ 348 | /* @group Active */ 349 | .chosen-container-active .chosen-single 350 | { 351 | border: 1px solid #93c273; 352 | box-shadow: 0 0 4px rgba(147,194,115, 0.5); 353 | } 354 | 355 | .chosen-container-active.chosen-with-drop .chosen-single 356 | { 357 | border: 1px solid #aaa; 358 | -moz-border-radius-bottomright: 0; 359 | border-bottom-right-radius: 0; 360 | -moz-border-radius-bottomleft: 0; 361 | border-bottom-left-radius: 0; 362 | background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(20%, #eeeeee), color-stop(80%, #ffffff)); 363 | background-image: -webkit-linear-gradient(#eeeeee 20%, #ffffff 80%); 364 | background-image: -moz-linear-gradient(#eeeeee 20%, #ffffff 80%); 365 | background-image: -o-linear-gradient(#eeeeee 20%, #ffffff 80%); 366 | background-image: linear-gradient(#eeeeee 20%, #ffffff 80%); 367 | box-shadow: 0 1px 0 #fff inset; 368 | } 369 | .chosen-container-active.chosen-with-drop .chosen-single div 370 | { 371 | border-left: none; 372 | background: transparent; 373 | } 374 | .chosen-container-active.chosen-with-drop .chosen-single div b 375 | { 376 | background-position: -18px 2px; 377 | } 378 | 379 | .chosen-container-active .chosen-choices li.search-field input[type="text"] 380 | { 381 | color: #222 !important; 382 | } 383 | 384 | /* @end */ 385 | /* @group Disabled Support */ 386 | .chosen-disabled 387 | { 388 | opacity: 0.5 !important; 389 | cursor: default; 390 | } 391 | .chosen-disabled .chosen-single 392 | { 393 | cursor: default; 394 | } 395 | .chosen-disabled .chosen-choices .search-choice .search-choice-close 396 | { 397 | cursor: default; 398 | } 399 | 400 | /* @end */ 401 | /* @group Right to Left */ 402 | .chosen-rtl 403 | { 404 | text-align: right; 405 | } 406 | .chosen-rtl .chosen-single 407 | { 408 | overflow: visible; 409 | padding: 0 8px 0 0; 410 | } 411 | .chosen-rtl .chosen-single span 412 | { 413 | margin-right: 0; 414 | margin-left: 26px; 415 | direction: rtl; 416 | } 417 | .chosen-rtl .chosen-single-with-deselect span 418 | { 419 | margin-left: 38px; 420 | } 421 | .chosen-rtl .chosen-single div 422 | { 423 | right: auto; 424 | left: 3px; 425 | } 426 | .chosen-rtl .chosen-single abbr 427 | { 428 | right: auto; 429 | left: 26px; 430 | } 431 | .chosen-rtl .chosen-choices li 432 | { 433 | float: right; 434 | } 435 | .chosen-rtl .chosen-choices li.search-field input[type="text"] 436 | { 437 | direction: rtl; 438 | } 439 | .chosen-rtl .chosen-choices li.search-choice 440 | { 441 | margin: 3px 5px 3px 0; 442 | padding: 3px 5px 3px 19px; 443 | } 444 | .chosen-rtl .chosen-choices li.search-choice .search-choice-close 445 | { 446 | right: auto; 447 | left: 4px; 448 | } 449 | .chosen-rtl.chosen-container-single-nosearch .chosen-search, 450 | .chosen-rtl .chosen-drop 451 | { 452 | left: 9999px; 453 | } 454 | .chosen-rtl.chosen-container-single .chosen-results 455 | { 456 | margin: 0 0 4px 4px; 457 | padding: 0 4px 0 0; 458 | } 459 | .chosen-rtl .chosen-results li.group-option 460 | { 461 | padding-right: 15px; 462 | padding-left: 0; 463 | } 464 | .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div 465 | { 466 | border-right: none; 467 | } 468 | .chosen-rtl .chosen-search input[type="text"] 469 | { 470 | padding: 4px 5px 4px 20px; 471 | background: white url('../images/chosen-sprite.png') no-repeat -30px -20px; 472 | background: url('../images/chosen-sprite.png') no-repeat -30px -20px; 473 | direction: rtl; 474 | } 475 | .chosen-rtl.chosen-container-single .chosen-single div b 476 | { 477 | background-position: 6px 2px; 478 | } 479 | .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b 480 | { 481 | background-position: -12px 2px; 482 | } 483 | 484 | /* @end */ 485 | /* @group Retina compatibility */ 486 | @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-resolution: 144dppx) 487 | { 488 | .chosen-rtl .chosen-search input[type="text"], 489 | .chosen-container-single .chosen-single abbr, 490 | .chosen-container-single .chosen-single div b, 491 | .chosen-container-single .chosen-search input[type="text"], 492 | .chosen-container-multi .chosen-choices .search-choice .search-choice-close, 493 | .chosen-container .chosen-results-scroll-down span, 494 | .chosen-container .chosen-results-scroll-up span 495 | { 496 | background-image: url('../images/chosen-sprite@2x.png') !important; 497 | background-size: 52px 37px !important; 498 | background-repeat: no-repeat !important; 499 | } 500 | } 501 | /* @end */ 502 | -------------------------------------------------------------------------------- /css/dashboard.css: -------------------------------------------------------------------------------- 1 | /* Stylings for various elements of the dashboard */ 2 | 3 | body 4 | { 5 | margin: 0; 6 | float: left; 7 | position: relative; 8 | min-width: 100%; 9 | height: auto; 10 | background: url("../images/menu_bg.jpg") repeat-y #fff !important; 11 | color: #7D7D7D; 12 | } 13 | a 14 | { 15 | color: #666; 16 | } 17 | #header,#nav_bar,.cell 18 | { 19 | -webkit-touch-callout: none; 20 | -webkit-user-select: none; 21 | -khtml-user-select: none; 22 | -moz-user-select: none; 23 | -ms-user-select: none; 24 | user-select: none; 25 | } 26 | /* 27 | *::-moz-selection 28 | { 29 | color: #408c0b; 30 | background: none; 31 | } 32 | *::selection 33 | { 34 | color: #408c0b; 35 | background: none; 36 | } 37 | *::-moz-selection:inactive 38 | { 39 | color: #408c0b; 40 | background: none; 41 | } 42 | */ 43 | .main_menu 44 | { 45 | display: block; 46 | margin: 0; 47 | padding: 0; 48 | width: 100%; 49 | } 50 | .main_menu li.current 51 | { 52 | background-image: url("../images/currentM.png") !important; 53 | background-repeat: no-repeat; 54 | border-bottom: 1px solid #111111; 55 | border-top: 1px solid #000000; 56 | } 57 | .main_menu li:hover 58 | { 59 | background-image: url("../images/foot.png"); 60 | color: #fff; 61 | text-shadow: 0 2px 0 #000000; 62 | } 63 | .main_menu li:hover 64 | { 65 | border-top: 1px solid #000000; 66 | } 67 | .main_menu li 68 | { 69 | border-bottom: 1px solid #212123; 70 | border-top: 1px solid #3f3f42; 71 | display: block; 72 | text-transform: capitalize; 73 | width: 100%; 74 | } 75 | .main_menu li a 76 | { 77 | color: #fff; 78 | display: block; 79 | font-weight: bold; 80 | padding: 17px 20px 17px 30px; 81 | text-shadow: 0 2px 0 #000000; 82 | transition: background-color 0.2s ease-out 0s; 83 | text-decoration: none; 84 | } 85 | #nav_bar 86 | { 87 | background: url("../images/menu_bg.jpg"); 88 | position: absolute; 89 | top: 45px; 90 | width: 200px; 91 | z-index: 48; 92 | } 93 | #header 94 | { 95 | background: url("../images/top_bgrepeat.jpg") repeat-x scroll 0 0 #000000; 96 | box-shadow: 0 2px 15px #333333; 97 | color: #fff; 98 | height: 45px; 99 | min-width: 768px; 100 | width: 100%; 101 | z-index: 47; 102 | font-weight: bold; 103 | font-size: 22px; 104 | text-align: center; 105 | line-height: 45px; 106 | } 107 | #header_text 108 | { 109 | overflow: auto; 110 | padding-left: 0; 111 | color: #2398CD; 112 | } 113 | #account_info 114 | { 115 | padding-right: 5px; 116 | vertical-align: top; 117 | float: right; 118 | font-size: 0; 119 | } 120 | .infoTab 121 | { 122 | font-size: 13px; 123 | background: url("../images/accbg.png") no-repeat; 124 | border-left: 1px solid #333333; 125 | height: 45px; 126 | padding: 0 15px; 127 | cursor: default; 128 | display: inline-block; 129 | text-transform: capitalize; 130 | } 131 | .infoTab div 132 | { 133 | display: inline-block; 134 | vertical-align: middle; 135 | } 136 | .infoTab a 137 | { 138 | color: #999; 139 | } 140 | .fixer 141 | { 142 | height: 45px; 143 | } 144 | #logout 145 | { 146 | color: #d93e38; 147 | } 148 | #shadowhead 149 | { 150 | background-image: url("../images/pick_bg.jpg"); 151 | background-repeat: repeat-x; 152 | height: 58px; 153 | position: absolute; 154 | top: 45px; 155 | left: 200px; 156 | right: 0; 157 | text-align: center; 158 | color:#444; 159 | font-weight: bold; 160 | font-size: 26px; 161 | line-height: 58px; 162 | z-index: -5; 163 | } 164 | .dashIcon 165 | { 166 | height: 32px; 167 | width: 32px; 168 | margin-right: 5px; 169 | } 170 | .dashIcon.usr 171 | { 172 | background: url(../images/avatar.png); 173 | background-size: contain; 174 | } 175 | .dashIcon.logout 176 | { 177 | background: url(../images/logout.png) no-repeat center; 178 | } 179 | #content 180 | { 181 | position: relative; 182 | display: inline-block; 183 | padding: 15px 5px 15px 15px; 184 | white-space: nowrap; 185 | margin-left: 200px; 186 | margin-top: 60px; 187 | position: relative; 188 | height: 50%; 189 | } 190 | * 191 | { 192 | white-space: normal; 193 | } -------------------------------------------------------------------------------- /css/styles.css: -------------------------------------------------------------------------------- 1 | /* Generic styles shared by the whole QuickSlots UI */ 2 | 3 | @font-face 4 | { 5 | font-family: 'CandaraRegular'; 6 | src: url('../fonts/candara-webfont.eot'); 7 | src: url('../fonts/candara-webfont.eot?#iefix') format('embedded-opentype'), 8 | url('../fonts/candara-webfont.woff') format('woff'), 9 | url('../fonts/candara-webfont.ttf') format('truetype'), 10 | url('../fonts/candara-webfont.svg#CandaraRegular') format('svg'); 11 | font-weight: normal; 12 | font-style: normal; 13 | } 14 | html 15 | { 16 | height: 100%; 17 | } 18 | body 19 | { 20 | min-height: 100%; 21 | height: 100%; 22 | background: url("../images/bg.jpg") repeat scroll 0 0 #4d4d4d; 23 | font: 10pt Arial,Helvetica,sans-serif; 24 | color: #151515; 25 | margin: 0; 26 | } 27 | .center 28 | { 29 | width: 100%; 30 | padding-left:0; 31 | padding-right: 0; 32 | text-align: center; 33 | } 34 | .middle 35 | { 36 | vertical-align: middle !important; 37 | } 38 | .stretch 39 | { 40 | width: 100%; 41 | } 42 | .inline 43 | { 44 | display: inline-block; 45 | margin-left: 3px; 46 | margin-right: 3px; 47 | } 48 | .left 49 | { 50 | text-align: left !important; 51 | } 52 | .title 53 | { 54 | text-align: center; 55 | font-weight: bold; 56 | font-size: 12pt; 57 | padding: 5px 0; 58 | color: #555; 59 | font-family: Arial,Helvetica,sans-serif; 60 | } 61 | .vspacer 62 | { 63 | height:100%; 64 | display:inline-block; 65 | margin-right: -4px; 66 | vertical-align: middle 67 | } 68 | .box 69 | { 70 | background: url(../images/box_top.png) no-repeat center top, url(../images/box_bottom.png) no-repeat center bottom; 71 | padding-bottom: 5px; 72 | width: 360px; 73 | position: relative; 74 | display: inline-block; 75 | vertical-align: top; 76 | color: #999; 77 | } 78 | .boxbg 79 | { 80 | width: 100%; 81 | z-index: -1; 82 | position: absolute; 83 | top: 9px; 84 | bottom: 16px; 85 | background: url(../images/box_center.png) repeat-y center; 86 | } 87 | .elements 88 | { 89 | position: relative; 90 | width: 236px; 91 | text-align: center; 92 | margin: 0 auto; 93 | padding-bottom: 10px; 94 | } 95 | .db, .avatar,.information,.timetable 96 | { 97 | background: url(../images/db.png) no-repeat center top; 98 | min-height: 65px; 99 | margin-top: 15px; 100 | text-align: center; 101 | } 102 | .avatar 103 | { 104 | background-image: url(../images/avatar.png) 105 | } 106 | .timetable 107 | { 108 | background-image: url(../images/timetable.png) 109 | } 110 | .information 111 | { 112 | background-image: url(../images/information.png); 113 | } 114 | .icon 115 | { 116 | display: inline-block; 117 | position: relative; 118 | margin-bottom: -5px; 119 | } 120 | .icon.add 121 | { 122 | background: url(../images/add.png) no-repeat bottom right; 123 | height: 68px; 124 | width: 80px; 125 | } 126 | .icon.remove 127 | { 128 | background: url(../images/remove.png) no-repeat bottom right; 129 | height: 68px; 130 | width: 80px; 131 | } 132 | .icon.key 133 | { 134 | background: url(../images/key.png) no-repeat bottom right; 135 | height: 62px; 136 | width: 75px; 137 | } 138 | a 139 | { 140 | font-weight: bold; 141 | text-decoration: none; 142 | outline: none; 143 | color: #101010; 144 | } 145 | a:hover 146 | { 147 | text-decoration: underline; 148 | } 149 | input 150 | { 151 | text-align: center; 152 | color: #666565; 153 | margin-bottom: 2px; 154 | margin-top: 10px; 155 | outline: 0; 156 | font-weight: bold; 157 | vertical-align: middle; 158 | } 159 | select 160 | { 161 | width: 200px; 162 | } 163 | input-placeholder 164 | { 165 | color: #717171; 166 | } 167 | ::-webkit-input-placeholder 168 | { 169 | /* WebKit browsers */ 170 | color: #AAA; 171 | } 172 | :-moz-placeholder 173 | { 174 | /* Mozilla Firefox 4 to 18 */ 175 | color: #717171; 176 | } 177 | ::-moz-placeholder 178 | { 179 | /* Mozilla Firefox 19+ */ 180 | color: #717171; 181 | } 182 | :-ms-input-placeholder 183 | { 184 | /* Internet Explorer 10+ */ 185 | color: #717171; 186 | } 187 | input[type=text],input[type=password],ul.chosen-choices 188 | { 189 | background: linear-gradient(to bottom, #f7f7f8 0%, #ffffff 100%); 190 | border-radius: 3px; 191 | border: none; 192 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) inset, 0 -1px 0 rgba(0, 0, 0, 0.05) inset; 193 | transition: all 0.2s linear; 194 | font-size: 13px; 195 | position: relative; 196 | height: 28px; 197 | width: 175px; 198 | padding-left: 40px; 199 | padding-right: 20px; 200 | } 201 | input.short 202 | { 203 | width: 30px; 204 | padding: 1px; 205 | } 206 | label 207 | { 208 | display: inline-block; 209 | padding:8px 5px 0 0; 210 | vertical-align: middle; 211 | font-weight: bold; 212 | } 213 | .username 214 | { 215 | background: url(../images/usr_icon.png) 1px 1px no-repeat; 216 | background: url(../images/usr_icon.png) 1px 1px no-repeat, linear-gradient(#f7f7f8,#ffffff) !important; 217 | } 218 | .uInfo 219 | { 220 | background: url(../images/uInfo_icon.png) 1px 1px no-repeat; 221 | background: url(../images/uInfo_icon.png) 1px 1px no-repeat, linear-gradient(#f7f7f8,#ffffff) !important; 222 | } 223 | .details 224 | { 225 | background: url(../images/details_icon.png) 1px 1px no-repeat; 226 | background: url(../images/details_icon.png) 1px 1px no-repeat, linear-gradient(#f7f7f8,#ffffff) !important; 227 | } 228 | .pswd 229 | { 230 | background: url(../images/pswd_icon.png) 1px 1px no-repeat; 231 | background: url(../images/pswd_icon.png) 1px 1px no-repeat, linear-gradient(#f7f7f8,#ffffff) !important; 232 | } 233 | input.styled:focus 234 | { 235 | background-position: 1px -27px,0 0 !important; 236 | } 237 | input[type=text]:focus,input[type=password]:focus,.chosen-container-active .chosen-choices 238 | { 239 | box-shadow: 0 1px 0 #93c273 inset, 0 -1px 0 #93c273 inset, 1px 0 0 #93c273 inset, -1px 0 0 #93c273 inset, 0 0 4px rgba(147, 194, 115, 0.5); 240 | color: #2b2b2b; 241 | } 242 | input[type=checkbox] + label 243 | { 244 | background: url(../images/checkbox.png) 2px -1px no-repeat; 245 | } 246 | input[type=radio] + label 247 | { 248 | background: url(../images/radio.png) 2px -1px no-repeat; 249 | } 250 | input[type=checkbox], input[type=radio] 251 | { 252 | visibility: hidden; 253 | } 254 | input[type=checkbox] + label, input[type=radio] + label 255 | { 256 | margin-left: -25px; 257 | padding: 3px 0 3px 25px; 258 | } 259 | input[type=checkbox] + label:active, input[type=radio] + label:active 260 | { 261 | background-position: 2px -25px; 262 | } 263 | input[type=checkbox]:checked + label, input[type=radio]:checked + label 264 | { 265 | background-position: 2px -51px; 266 | } 267 | input[type=checkbox]:checked + label:active, input[type=radio]:checked + label:active 268 | { 269 | background-position: 2px -75px; 270 | } 271 | button::-moz-focus-inner 272 | { 273 | border: 0; 274 | } 275 | button, input[type=file] 276 | { 277 | position: relative; 278 | z-index: 999; 279 | height: 30px; 280 | border-radius: 0.5em; 281 | box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); 282 | cursor: pointer; 283 | display: inline-block; 284 | font: 10pt Arial,Helvetica,sans-serif; 285 | padding: 6px 20px; 286 | margin-bottom: 10px; 287 | text-align: center; 288 | text-shadow: -1px 1px 1px rgba(67, 123, 125, 0.5); 289 | font-weight: bold; 290 | vertical-align: middle; 291 | color: #508e90; 292 | border: solid 1px #90c6c8; 293 | background: #78dde0; 294 | background: linear-gradient(#b3ecee, #75dce0); 295 | } 296 | button:hover 297 | { 298 | background: linear-gradient(#c9f5f7,#7ce7ea); 299 | } 300 | button:active 301 | { 302 | position: relative; 303 | top: 1px; 304 | background: linear-gradient(#75dce0,#b3ecee); 305 | } 306 | .button 307 | { 308 | height: 30px; 309 | background: url(../images/loader_green.gif) no-repeat center center; 310 | vertical-align: middle; 311 | margin: 5px 0 5px 0; 312 | } 313 | .info,.green 314 | { 315 | color: #469A14; 316 | } 317 | .error 318 | { 319 | color: #d93e38; 320 | } 321 | .blocktext 322 | { 323 | padding: 6px 0 0 0; 324 | font-size: 11pt; 325 | font-family: 'CandaraRegular'; 326 | font-weight: normal; 327 | } 328 | .loader 329 | { 330 | background: url(../images/loader_green.gif); 331 | width: 16px; 332 | height: 11px; 333 | opacity: 0; 334 | position: absolute; 335 | display: inline-block; 336 | } 337 | 338 | #footer 339 | { 340 | margin-top: 10px; 341 | margin-left: 235px; 342 | font-size: 12px; 343 | text-align: center; 344 | position: absolute; 345 | left:0; 346 | right: 0; 347 | bottom: 0; 348 | height: 20px; 349 | } 350 | -------------------------------------------------------------------------------- /css/table.css: -------------------------------------------------------------------------------- 1 | /* Generic styles for QuickSlots table grids */ 2 | 3 | .tableContainer 4 | { 5 | display:inline-block; 6 | vertical-align: top; 7 | box-sizing: border-box; 8 | padding-right: 255px; 9 | margin-right: -255px; 10 | width: 100%; 11 | height: 100%; 12 | } 13 | div,span 14 | { 15 | -webkit-touch-callout: none; 16 | -webkit-user-select: none; 17 | -khtml-user-select: none; 18 | -moz-user-select: none; 19 | -ms-user-select: none; 20 | user-select: none; 21 | } 22 | .table 23 | { 24 | display: table; 25 | table-layout: fixed; 26 | height: 100%; 27 | width: 100%; 28 | margin-bottom: 5px; 29 | border-collapse: collapse; 30 | } 31 | .row 32 | { 33 | display: table-row; 34 | } 35 | .cell 36 | { 37 | display: table-cell; 38 | position: relative; 39 | height: 50px ; 40 | width: 120px; 41 | color: #787878; 42 | background: #fafafa padding-box; 43 | border: 1px solid #A7A7A7 !important; 44 | box-shadow: 0 0 25px #CDCDCD inset; 45 | vertical-align: middle; 46 | text-align: center; 47 | font-weight: bold; 48 | cursor: pointer; 49 | } 50 | .cell.disabled,.cell.blank 51 | { 52 | background: #EAEAEA padding-box !important; 53 | box-shadow: 0 0 20px #939393 inset !important; 54 | color: #888888; 55 | } 56 | .cell.time 57 | { 58 | font-size: 12px; 59 | line-height: 13px; 60 | } 61 | .cell.day 62 | { 63 | background: rgba(235,249,163,0.9) padding-box !important; 64 | box-shadow: 0 0 25px rgba(207,229,84,0.9) inset !important; 65 | border: 1px solid rgba(169,201,0,0.9) !important; 66 | color: #567D41; 67 | width: 100px; 68 | } 69 | .cell.blue 70 | { 71 | background: rgba(181,229,245,0.9) padding-box !important; 72 | border: 1px solid rgba(64,173,210,0.9) !important; 73 | box-shadow: 0 0 25px rgba(113,201,217,0.9) inset !important; 74 | color: #2B7E99; 75 | } 76 | .course 77 | { 78 | background: #ccc; 79 | line-height: 45px; 80 | margin: 0 auto 5px auto; 81 | color: #4E4E4E; 82 | font-weight: bold; 83 | cursor: pointer; 84 | } 85 | .course > span 86 | { 87 | vertical-align: middle; 88 | display: inline-block; 89 | line-height: normal; 90 | } 91 | .course_holder 92 | { 93 | opacity: 1; 94 | width: 100%; 95 | color: #4E4E4E; 96 | } 97 | .course_container 98 | { 99 | position:absolute; 100 | bottom:0; 101 | top:-1px; 102 | left:-1px; 103 | right:0 104 | } 105 | .selected span,td.selected 106 | { 107 | text-decoration: underline; 108 | } 109 | span.conflict:before 110 | { 111 | content: "~"; 112 | padding:0 3px; 113 | display: inline-block; 114 | } 115 | .conflicting 116 | { 117 | background-color: rgba(234, 26, 26, 0.23) !important; 118 | box-shadow: 0 0 25px rgba(239, 9, 9, 0.57) inset !important; 119 | } 120 | #legend 121 | { 122 | display: inline-block; 123 | margin: 5px 0 0 15px; 124 | font-weight: bold; 125 | text-align: center; 126 | } 127 | #legend .title 128 | { 129 | height: 41px; 130 | padding: 10px 0 0 0; 131 | } 132 | #rightpane 133 | { 134 | display: inline-block; 135 | position: relative; 136 | width: 250px; 137 | padding: 0; 138 | text-align: center; 139 | } 140 | #courseScroll 141 | { 142 | width: 220px; 143 | display: inline-block; 144 | z-index: 99999; 145 | max-height: 270px; 146 | overflow-y: auto; 147 | } 148 | #conflict_info div,#conflict_info span 149 | { 150 | display: inline-block; 151 | text-align: left; 152 | width: 60px; 153 | } 154 | #conflict_info 155 | { 156 | font-weight: bold; 157 | width: 100%; 158 | } 159 | #conflict_info span 160 | { 161 | font-weight: normal; 162 | vertical-align: top; 163 | display: inline-block; 164 | width:200px; 165 | } 166 | #course_info 167 | { 168 | font-weight: bold; 169 | } 170 | #course_info th 171 | { 172 | width: 70px; 173 | } 174 | table 175 | { 176 | width: 100%; 177 | } 178 | table, th, td 179 | { 180 | border: 1px solid #AAA; 181 | padding: 0; 182 | word-wrap: break-word; 183 | border-collapse: collapse; 184 | } 185 | th 186 | { 187 | font-size: 14px; 188 | height: 20px; 189 | color: #666; 190 | } 191 | td.course_name 192 | { 193 | max-width: 79px; 194 | color: #d93e38; 195 | } 196 | td.faculty 197 | { 198 | max-width: 79px; 199 | color: #469A14; 200 | } 201 | td.batch 202 | { 203 | max-width: 99px; 204 | color: #4F4EAD; 205 | } 206 | .course_name td 207 | { 208 | color: #d93e38; 209 | } 210 | .fac_name td 211 | { 212 | color: #469A14; 213 | } 214 | .room td 215 | { 216 | color: #4F4EAD; 217 | } 218 | .batches td 219 | { 220 | color: #888; 221 | } 222 | .faculty a,.faculty a:visited 223 | { 224 | color:inherit; 225 | } 226 | .table.consolidated table 227 | { 228 | padding: 0; 229 | width: 100%; 230 | height: 100%; 231 | border: none; 232 | } 233 | table.course_holder tr:first-child td 234 | { 235 | border-top: 0; 236 | } 237 | table.course_holder tr:last-child td 238 | { 239 | border-bottom: 0; 240 | } 241 | table.course_holder td:first-child 242 | { 243 | border-left: 0; 244 | } 245 | table.course_holder td:last-child 246 | { 247 | border-right: 0; 248 | } 249 | table.course_holder td:last-child:nth-child(odd) 250 | { 251 | border-right: 1px solid #aaa; 252 | } 253 | table.course_holder td:last-child:first-child 254 | { 255 | border-right: none; 256 | } -------------------------------------------------------------------------------- /dean.php: -------------------------------------------------------------------------------- 1 | 7) 28 | postResponse("error", "Number of days cannot be more than 7"); 29 | if(!$current['table_name']) 30 | postResponse("error", "Please select a timetable"); 31 | $query = $db->prepare('UPDATE timetables SET 32 | days=?, 33 | slots=?, 34 | duration=?, 35 | start_hr=?, 36 | start_min=?, 37 | start_mer=?, 38 | allowConflicts=?, 39 | frozen = ? 40 | WHERE table_name=?'); 41 | try { 42 | $query->execute([ 43 | $_POST['days'], 44 | $_POST['slots'], 45 | $_POST['duration'], 46 | $_POST['start_hr'], 47 | $_POST['start_min'], 48 | $_POST['start_mer'], 49 | $_POST['allowConflicts'], 50 | $_POST['frozen'], 51 | $current['table_name'] 52 | ]); 53 | } 54 | catch(PDOException $e) 55 | { 56 | postResponse("error", json_encode($e->errorInfo)); 57 | } 58 | if($_POST['active']) 59 | { 60 | $query = $db->query('UPDATE timetables SET active=0 where active=1'); 61 | $query = $db->prepare('UPDATE timetables SET active=1 where table_name=?'); 62 | $query->execute([$current['table_name']]); 63 | } 64 | if($current["days"]<$_POST["days"]) 65 | { 66 | $query = $db->prepare('INSERT INTO slots VALUES (?,?,?,?)'); 67 | for($d=$current["days"]+1;$d<=$_POST["days"];$d++) 68 | for($s=1;$s<=$current["slots"];$s++) 69 | $query->execute([$current['table_name'],$d,$s,'active']); 70 | } 71 | else 72 | { 73 | $query = $db->prepare('DELETE FROM slots WHERE day > ? AND table_name = ?'); 74 | $query->execute([$_POST["days"],$current['table_name']]); 75 | } 76 | if($current["slots"]<=$_POST["slots"]) 77 | { 78 | $query = $db->prepare('INSERT INTO slots VALUES (?,?,?,?)'); 79 | for($d=1;$d<=$_POST["days"];$d++) 80 | for($s=$current["slots"]+1;$s<=$_POST["slots"];$s++) 81 | $query->execute([$current['table_name'],$d,$s,'active']); 82 | } 83 | else 84 | { 85 | $query = $db->prepare('DELETE FROM slots WHERE slot_num > ? AND table_name = ?'); 86 | $query->execute([$_POST["slots"],$current['table_name']]); 87 | } 88 | postResponse("updateGrid",'Timetable saved'); 89 | die(); 90 | } 91 | if(valueCheck('action','updateSlots')) 92 | { 93 | $query = $db->prepare('UPDATE slots SET state= ? WHERE day = ? AND slot_num = ? AND table_name = ?'); 94 | $deleteAllocs = $db->prepare('DELETE FROM slot_allocs WHERE day = ? AND slot_num = ? AND table_name = ?'); 95 | foreach ($_POST as $slotStr => $state) 96 | { 97 | $slot = explode('_', $slotStr); 98 | $query->execute([$state,$slot[0],$slot[1],$current['table_name']]); 99 | if($state=='disabled') 100 | $deleteAllocs->execute([$slot[0],$slot[1],$current['table_name']]); 101 | } 102 | postResponse("info",'Slots updated'); 103 | die(); 104 | } 105 | if(valueCheck('action','deleteTimetable')) 106 | { 107 | 108 | $query = $db->prepare('DELETE from timetables where table_name=? AND active=0'); 109 | $query->execute([$_POST['table_name']]); 110 | if($query->rowCount()) 111 | { 112 | postResponse("removeOpt",'Timetable deleted'); 113 | die(); 114 | } 115 | else 116 | postResponse("error",'Slot is the current active slot, choose another slot as active before deleting'); 117 | } 118 | } 119 | ?> 120 | 121 | 122 | 123 | QuickSlots 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 205 | 206 | 207 | 208 | 215 |
Manage Timetables
216 | 228 |
229 |
230 |
231 | Configure timetable: 232 | 241 |
242 |
243 |
244 |
245 | 246 | 260 | 266 | 270 |
271 |
272 | " title="Number" /> 273 |
274 |
275 | " title="Number: 0-7" /> 276 |
277 |
278 | " title="Number >= 10"/> 279 | 280 |
281 |
282 |
283 | > 284 | 285 |
286 |
287 | > 288 | 289 |
290 |
291 | > 292 | 293 |
294 |
295 |
296 |
297 |
298 |
299 |
300 |
301 |
302 | prepare("SELECT * FROM slots WHERE state='disabled' AND table_name = ?"); 304 | $query->execute([$current['table_name']]); 305 | $disabled = $query->fetchall(); 306 | foreach ($disabled as $slot) 307 | echo ''; 308 | ?> 309 |
310 |
311 |
312 |
313 | Backup and restore: 314 |
315 |
316 | 317 | Backup: download a snapshot of the QuickSlots database that can be restored later :  318 |
319 | 320 |
321 |
322 | 323 | 324 |
325 | 326 |
327 |
328 |
329 | 330 | 331 |
332 |
333 | 334 |
335 |
336 |
337 |
338 |
339 |
Delete Timetable
340 |
341 |
342 | 349 | 350 |
351 |
352 | 353 |
354 |
355 |
356 |
357 |
358 |
359 |
Legend
360 |
361 |
362 |
Active
363 |
364 |
365 |
366 |
Disabled
367 |
368 |
369 |
370 | Click on a slot to disable or enable it 371 |
372 |
373 |
374 | 375 | 376 | -------------------------------------------------------------------------------- /depts.php: -------------------------------------------------------------------------------- 1 | prepare('INSERT INTO depts(dept_code,dept_name) values (?,?)'); 19 | $query->execute([$dept_code,$_POST['dName']]); 20 | postResponse("addOpt","Deparment Added",[$_POST['dName'],$dept_code]); 21 | } 22 | catch(PDOException $e) 23 | { 24 | if($e->errorInfo[0]==23000) 25 | postResponse("error","Deparment already exists"); 26 | else 27 | postResponse("error",$e->errorInfo[2]); 28 | } 29 | 30 | } 31 | elseif(valueCheck('action','delete')) 32 | { 33 | $query = $db->prepare('DELETE FROM depts where dept_code =?'); 34 | $query->execute([$dept_code]); 35 | postResponse("removeOpt","Deparment deleted"); 36 | } 37 | ?> -------------------------------------------------------------------------------- /download.php: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /faculty.php: -------------------------------------------------------------------------------- 1 | prepare('SELECT uName FROM faculty where uName = ? AND dept_code=?'); 22 | $query->execute([$_GET['faculty'],$_SESSION['dept']]); 23 | $fac = $query->fetch(); 24 | if(!empty($fac['uName'])) 25 | $_SESSION['faculty'] = $_GET['faculty']; 26 | } 27 | } 28 | 29 | ?> 30 | 31 | 32 | 33 | QuickSlots 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 60 | 61 | 62 | 69 |
Manage Courses
70 | 85 |
86 |
87 | 88 |
89 | Faculty: 90 | 98 |
99 | 100 |
101 |
102 |
103 |
Add Course
104 |
105 |
106 | 107 | 108 | 114 |
115 | 116 | 117 |
118 |
119 |
120 | 121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
Delete Course
129 |
130 |
131 | 140 | 141 |
142 |
143 | 144 |
145 |
146 |
147 |
148 |
149 |
150 | 151 | 152 | 153 | -------------------------------------------------------------------------------- /fonts/candara-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/fonts/candara-webfont.eot -------------------------------------------------------------------------------- /fonts/candara-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/fonts/candara-webfont.ttf -------------------------------------------------------------------------------- /fonts/candara-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/fonts/candara-webfont.woff -------------------------------------------------------------------------------- /fonts/candaraz-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/fonts/candaraz-webfont.eot -------------------------------------------------------------------------------- /functions.php: -------------------------------------------------------------------------------- 1 | $max) 73 | postResponse("error", $postvar . ' must not be longer than ' . $max . ' characters'); 74 | } 75 | else 76 | postResponse("error", 'Please enter ' . $postvar); 77 | } 78 | } 79 | /** 80 | * pwdHash() 81 | * 82 | * function that returns a custom hash of $pwd using $salt 83 | * as a seed for salting 84 | */ 85 | function pwdHash($salt, $pwd) 86 | { 87 | $off = ord($salt) % 17; 88 | $salt = md5($salt); 89 | $crypt = substr($salt, 0, $off); 90 | $i = -1; 91 | while(isset($pwd[++$i])) 92 | { 93 | $crypt .= $pwd[$i]; 94 | $crypt .= $salt[$i + $off]; 95 | } 96 | $crypt = $crypt . substr($salt, $i + $off); 97 | return $crypt; 98 | hash('sha256', $crypt); 99 | } 100 | ?> -------------------------------------------------------------------------------- /images/accbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/accbg.png -------------------------------------------------------------------------------- /images/add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/add.png -------------------------------------------------------------------------------- /images/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/avatar.png -------------------------------------------------------------------------------- /images/base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/base.png -------------------------------------------------------------------------------- /images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/bg.jpg -------------------------------------------------------------------------------- /images/box_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/box_bottom.png -------------------------------------------------------------------------------- /images/box_center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/box_center.png -------------------------------------------------------------------------------- /images/box_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/box_top.png -------------------------------------------------------------------------------- /images/checkbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/checkbox.png -------------------------------------------------------------------------------- /images/chosen-sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/chosen-sprite.png -------------------------------------------------------------------------------- /images/chosen-sprite@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/chosen-sprite@2x.png -------------------------------------------------------------------------------- /images/currentM.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/currentM.png -------------------------------------------------------------------------------- /images/db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/db.png -------------------------------------------------------------------------------- /images/details_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/details_icon.png -------------------------------------------------------------------------------- /images/details_icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/details_icon2.png -------------------------------------------------------------------------------- /images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/favicon.png -------------------------------------------------------------------------------- /images/foot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/foot.png -------------------------------------------------------------------------------- /images/information.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/information.png -------------------------------------------------------------------------------- /images/key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/key.png -------------------------------------------------------------------------------- /images/loader_green.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/loader_green.gif -------------------------------------------------------------------------------- /images/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/logout.png -------------------------------------------------------------------------------- /images/menu_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/menu_bg.jpg -------------------------------------------------------------------------------- /images/pick_bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/pick_bg.jpg -------------------------------------------------------------------------------- /images/pswd_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/pswd_icon.png -------------------------------------------------------------------------------- /images/pwd_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/pwd_icon.png -------------------------------------------------------------------------------- /images/radio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/radio.png -------------------------------------------------------------------------------- /images/remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/remove.png -------------------------------------------------------------------------------- /images/screenshot_allocation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/screenshot_allocation.png -------------------------------------------------------------------------------- /images/screenshot_slots.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/screenshot_slots.png -------------------------------------------------------------------------------- /images/screenshot_users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/screenshot_users.png -------------------------------------------------------------------------------- /images/seletedown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/seletedown.png -------------------------------------------------------------------------------- /images/seleteup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/seleteup.png -------------------------------------------------------------------------------- /images/shape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/shape.png -------------------------------------------------------------------------------- /images/timetable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/timetable.png -------------------------------------------------------------------------------- /images/top_bgrepeat.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/top_bgrepeat.jpg -------------------------------------------------------------------------------- /images/uInfo_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/uInfo_icon.png -------------------------------------------------------------------------------- /images/usr_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Avinm/QuickSlots/5f77d9e6d84878c08ec4bf0069fbee558928fbe7/images/usr_icon.png -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | 23 | QuickSlots 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 137 | 138 | 149 | 150 | 160 | 161 | 162 | 186 | 187 | 188 | 189 | 190 | 201 |
View Timetable
202 | 203 | 218 | 219 |
220 |
221 |
222 |
223 | 224 |
225 | Timetable: 226 | 235 |
236 | 237 | 238 | Department: 239 | 246 | 247 | 248 | Faculty: 249 | 260 | 261 | 262 | Batch: 263 | 270 | 271 |
272 |
273 |
274 |
275 |
276 |
277 |
Legend:
278 |
279 |
Free
280 |
281 |
Disabled
282 |
283 | 284 | ● Select at least one filter to view the timetable 285 | 286 |
287 |
288 |
Share: 289 | 290 |
291 | 292 |
293 | 294 | 295 | 296 |
297 | 298 |
299 | 300 |
301 |
302 |
Course Details
303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 |
Course● Click on a course to show details
Faculty
Room
Batches
317 |
318 |
319 | prepare("SELECT * FROM slots WHERE table_name = ? AND state='disabled'"); 321 | $query->execute([$current['table_name']]); 322 | $disabled = $query->fetchall(); 323 | foreach ($disabled as $slot) 324 | echo ''; 325 | ?> 326 |
327 |
328 | 329 | -------------------------------------------------------------------------------- /js/capture.js: -------------------------------------------------------------------------------- 1 | /** 2 | * PhantomJS routines for printable table snapshot generation 3 | */ 4 | var page = require('webpage').create(), 5 | system = require('system'); 6 | page.open(system.args[1], function (status) { 7 | page.viewportSize = { width:1700, height:900 }; 8 | var clipRect = page.evaluate(function () { return document.querySelector(".table").getBoundingClientRect(); }); 9 | page.clipRect ={ 10 | width: parseInt(clipRect.width)+30, 11 | height: parseInt(clipRect.height)+180, 12 | top:clipRect.top-50, 13 | left:0 14 | }; 15 | page.render(system.args[2]) 16 | phantom.exit(); 17 | }); -------------------------------------------------------------------------------- /js/form.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handles all form submissions and validation that needs to be done via AJAX 3 | */ 4 | $(function(){ 5 | $("form").not(".submit").submit(function(e){ 6 | changes = false; 7 | if($(this).hasClass('confirm')) 8 | { 9 | r = confirm($("#confirm_msg").val()) 10 | if(!r) 11 | return false; 12 | } 13 | form = $(this); 14 | var button=$("button",this); 15 | var message=$(".info",this); 16 | pwd_fields = $("input[type=password]",this); 17 | if(pwd_fields.length>1) 18 | if(pwd_fields[0].value!=pwd_fields[1].value) 19 | { 20 | message.hide(); 21 | message.addClass('error'); 22 | message.html(" Passwords do not match."); 23 | message.show(400); 24 | return false; 25 | } 26 | button.fadeOut('fast'); 27 | $.post( 28 | form.attr('action'), 29 | form.serialize(), 30 | function(reply){ 31 | button.fadeIn('fast'); 32 | reply=JSON.parse(reply); 33 | if(reply[0]=="redirect") 34 | { 35 | window.location=reply[1]; 36 | } 37 | else if(reply[0]=="error") 38 | { 39 | message.hide(); 40 | message.addClass('error'); 41 | message.html(" " + reply[1]); 42 | message.show(400); 43 | } 44 | else 45 | { 46 | if(reply[0]=="addOpt") 47 | { 48 | var opt = JSON.parse(reply[2]); 49 | var val =opt[1]; 50 | if(reply[1]=="Room Added" || reply[1]=="Batch Added") 51 | val=opt[0]; 52 | $(".updateSelect").append($('