List of tickets by all customers
170 | 171 |-
173 |
183 |
'.$row['subject'].'
186 |├── output images ├── readme.txt ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png └── 8.png ├── images ├── avatar.jpg ├── user-bg.jpg ├── materialize-logo.png ├── user-profile-bg.jpg └── favicon │ ├── favicon-32x32.png │ ├── mstile-144x144.png │ └── apple-touch-icon-152x152.png ├── font ├── roboto │ ├── Roboto-Bold.ttf │ ├── Roboto-Bold.woff │ ├── Roboto-Light.ttf │ ├── Roboto-Thin.ttf │ ├── Roboto-Thin.woff │ ├── Roboto-Bold.woff2 │ ├── Roboto-Light.woff │ ├── Roboto-Light.woff2 │ ├── Roboto-Medium.ttf │ ├── Roboto-Medium.woff │ ├── Roboto-Regular.ttf │ ├── Roboto-Thin.woff2 │ ├── Roboto-Medium.woff2 │ ├── Roboto-Regular.woff │ └── Roboto-Regular.woff2 └── material-design-icons │ ├── Material-Design-Icons.ttf │ ├── Material-Design-Icons.woff │ ├── Material-Design-Icons.woff2 │ └── Material-Design-Iconsd41d.eot ├── routers ├── logout.php ├── add-item.php ├── edit-orders.php ├── ticket-status.php ├── cancel-order.php ├── add-ticket.php ├── details-router.php ├── ticket-message.php ├── menu-router.php ├── register-router.php ├── user-router.php ├── add-users.php ├── order-router.php └── router.php ├── js ├── plugins │ ├── data-tables │ │ ├── images │ │ │ ├── sort_asc.png │ │ │ ├── sort_both.png │ │ │ ├── sort_desc.png │ │ │ ├── sort_asc_disabled.png │ │ │ └── sort_desc_disabled.png │ │ ├── data-tables-script.js │ │ └── css │ │ │ └── jquery.dataTables.min.css │ ├── perfect-scrollbar │ │ ├── perfect-scrollbar.css │ │ └── perfect-scrollbar.min.js │ ├── formatter │ │ └── jquery.formatter.min.js │ └── jquery-validation │ │ └── additional-methods.min.js ├── custom-script.js └── plugins.min.js ├── css └── layouts │ └── page-center.css ├── includes ├── connect.php └── wallet.php ├── LICENSE ├── README.md ├── login.php ├── register.php ├── all-tickets.php ├── sql └── food.sql ├── orders.php ├── confirm-order.php ├── all-orders.php ├── index.php ├── view-ticket-admin.php ├── view-ticket.php └── admin-page.php /output images/readme.txt: -------------------------------------------------------------------------------- 1 | # output images 2 | -------------------------------------------------------------------------------- /images/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/images/avatar.jpg -------------------------------------------------------------------------------- /images/user-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/images/user-bg.jpg -------------------------------------------------------------------------------- /output images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/output images/1.png -------------------------------------------------------------------------------- /output images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/output images/2.png -------------------------------------------------------------------------------- /output images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/output images/3.png -------------------------------------------------------------------------------- /output images/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/output images/4.png -------------------------------------------------------------------------------- /output images/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/output images/5.png -------------------------------------------------------------------------------- /output images/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/output images/6.png -------------------------------------------------------------------------------- /output images/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/output images/7.png -------------------------------------------------------------------------------- /output images/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/output images/8.png -------------------------------------------------------------------------------- /font/roboto/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Bold.ttf -------------------------------------------------------------------------------- /font/roboto/Roboto-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Bold.woff -------------------------------------------------------------------------------- /font/roboto/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Light.ttf -------------------------------------------------------------------------------- /font/roboto/Roboto-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Thin.ttf -------------------------------------------------------------------------------- /font/roboto/Roboto-Thin.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Thin.woff -------------------------------------------------------------------------------- /images/materialize-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/images/materialize-logo.png -------------------------------------------------------------------------------- /images/user-profile-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/images/user-profile-bg.jpg -------------------------------------------------------------------------------- /font/roboto/Roboto-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Bold.woff2 -------------------------------------------------------------------------------- /font/roboto/Roboto-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Light.woff -------------------------------------------------------------------------------- /font/roboto/Roboto-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Light.woff2 -------------------------------------------------------------------------------- /font/roboto/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Medium.ttf -------------------------------------------------------------------------------- /font/roboto/Roboto-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Medium.woff -------------------------------------------------------------------------------- /font/roboto/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Regular.ttf -------------------------------------------------------------------------------- /font/roboto/Roboto-Thin.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Thin.woff2 -------------------------------------------------------------------------------- /font/roboto/Roboto-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Medium.woff2 -------------------------------------------------------------------------------- /font/roboto/Roboto-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Regular.woff -------------------------------------------------------------------------------- /font/roboto/Roboto-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/roboto/Roboto-Regular.woff2 -------------------------------------------------------------------------------- /images/favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/images/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /images/favicon/mstile-144x144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/images/favicon/mstile-144x144.png -------------------------------------------------------------------------------- /routers/logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /images/favicon/apple-touch-icon-152x152.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/images/favicon/apple-touch-icon-152x152.png -------------------------------------------------------------------------------- /js/plugins/data-tables/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/js/plugins/data-tables/images/sort_asc.png -------------------------------------------------------------------------------- /js/plugins/data-tables/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/js/plugins/data-tables/images/sort_both.png -------------------------------------------------------------------------------- /js/plugins/data-tables/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/js/plugins/data-tables/images/sort_desc.png -------------------------------------------------------------------------------- /font/material-design-icons/Material-Design-Icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/material-design-icons/Material-Design-Icons.ttf -------------------------------------------------------------------------------- /font/material-design-icons/Material-Design-Icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/material-design-icons/Material-Design-Icons.woff -------------------------------------------------------------------------------- /js/plugins/data-tables/images/sort_asc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/js/plugins/data-tables/images/sort_asc_disabled.png -------------------------------------------------------------------------------- /js/plugins/data-tables/images/sort_desc_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/js/plugins/data-tables/images/sort_desc_disabled.png -------------------------------------------------------------------------------- /font/material-design-icons/Material-Design-Icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/material-design-icons/Material-Design-Icons.woff2 -------------------------------------------------------------------------------- /font/material-design-icons/Material-Design-Iconsd41d.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rutujar/OFD/HEAD/font/material-design-icons/Material-Design-Iconsd41d.eot -------------------------------------------------------------------------------- /css/layouts/page-center.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | height: 100%; 4 | } 5 | html { 6 | display: table; 7 | margin: auto; 8 | } 9 | body { 10 | display: table-cell; 11 | vertical-align: middle; 12 | } -------------------------------------------------------------------------------- /routers/add-item.php: -------------------------------------------------------------------------------- 1 | query($sql); 8 | header("location: ../admin-page.php"); 9 | ?> -------------------------------------------------------------------------------- /routers/edit-orders.php: -------------------------------------------------------------------------------- 1 | query($sql); 8 | 9 | header("location: ../all-orders.php"); 10 | ?> -------------------------------------------------------------------------------- /includes/connect.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /js/custom-script.js: -------------------------------------------------------------------------------- 1 | /*================================================================================ 2 | Item Name: Somaiya Vidyavihar - Captive Portal 3 | Version: 3.1 4 | Author: Arctech Ventures 5 | Author URL: http://www.arctechventures.com 6 | ================================================================================ */ 7 | -------------------------------------------------------------------------------- /routers/ticket-status.php: -------------------------------------------------------------------------------- 1 | query($sql); 8 | header("location: ../view-ticket.php?id=".$ticket_id); 9 | ?> -------------------------------------------------------------------------------- /includes/wallet.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /routers/cancel-order.php: -------------------------------------------------------------------------------- 1 | query($sql); 8 | $sql = mysqli_query($con, "SELECT * FROM orders where id=$id"); 9 | while($row1 = mysqli_fetch_array($sql)){ 10 | $total = $row1['total']; 11 | } 12 | if($_POST['payment_type'] == 'Wallet'){ 13 | $balance = $balance+$total; 14 | $sql = "UPDATE wallet_details SET balance = $balance WHERE wallet_id = $wallet_id;"; 15 | $con->query($sql); 16 | } 17 | header("location: ../orders.php"); 18 | ?> -------------------------------------------------------------------------------- /routers/add-ticket.php: -------------------------------------------------------------------------------- 1 | query($sql) === TRUE){ 10 | $ticket_id = $con->insert_id; 11 | $sql = "INSERT INTO ticket_details (ticket_id, user_id, description) VALUES ($ticket_id, $user_id, '$description')"; 12 | $con->query($sql); 13 | } 14 | } 15 | header("location: ../tickets.php"); 16 | ?> -------------------------------------------------------------------------------- /routers/details-router.php: -------------------------------------------------------------------------------- 1 | query($sql)==true){ 14 | $_SESSION['name'] = $name; 15 | } 16 | header("location: ../details.php"); 17 | ?> -------------------------------------------------------------------------------- /routers/ticket-message.php: -------------------------------------------------------------------------------- 1 | query($sql); 10 | } 11 | else{ 12 | $sql = "UPDATE tickets SET status = 'Open' WHERE id=$ticket_id;"; 13 | $con->query($sql); 14 | } 15 | if($message != ''){ 16 | $sql = "INSERT INTO ticket_details (ticket_id, user_id, description) VALUES ($ticket_id, $user_id, '$message')"; 17 | $con->query($sql); 18 | } 19 | header("location: ../view-ticket.php?id=".$ticket_id); 20 | ?> -------------------------------------------------------------------------------- /routers/menu-router.php: -------------------------------------------------------------------------------- 1 | $value) 4 | { 5 | if(preg_match("/[0-9]+_name/",$key)){ 6 | if($value != ''){ 7 | $key = strtok($key, '_'); 8 | $value = htmlspecialchars($value); 9 | $sql = "UPDATE items SET name = '$value' WHERE id = $key;"; 10 | $con->query($sql); 11 | } 12 | } 13 | if(preg_match("/[0-9]+_price/",$key)){ 14 | $key = strtok($key, '_'); 15 | $sql = "UPDATE items SET price = $value WHERE id = $key;"; 16 | $con->query($sql); 17 | } 18 | if(preg_match("/[0-9]+_hide/",$key)){ 19 | if($_POST[$key] == 1){ 20 | $key = strtok($key, '_'); 21 | $sql = "UPDATE items SET deleted = 0 WHERE id = $key;"; 22 | $con->query($sql); 23 | } else{ 24 | $key = strtok($key, '_'); 25 | $sql = "UPDATE items SET deleted = 1 WHERE id = $key;"; 26 | $con->query($sql); 27 | } 28 | } 29 | } 30 | header("location: ../admin-page.php"); 31 | ?> -------------------------------------------------------------------------------- /routers/register-router.php: -------------------------------------------------------------------------------- 1 | query($sql)==true){ 20 | $user_id = $con->insert_id; 21 | $sql = "INSERT INTO wallet(customer_id) VALUES ($user_id)"; 22 | if($con->query($sql)==true){ 23 | $wallet_id = $con->insert_id; 24 | $cc_number = number(16); 25 | $cvv_number = number(3); 26 | $sql = "INSERT INTO wallet_details(wallet_id, number, cvv) VALUES ($wallet_id, $cc_number, $cvv_number)"; 27 | $con->query($sql); 28 | } 29 | } 30 | header("location: ../login.php"); 31 | ?> -------------------------------------------------------------------------------- /routers/user-router.php: -------------------------------------------------------------------------------- 1 | $value) 4 | { 5 | if(preg_match("/[0-9]+_role/",$key)){ 6 | $key = strtok($key, '_'); 7 | $sql = "UPDATE users SET role = '$value' WHERE id = $key;"; 8 | $con->query($sql); 9 | } 10 | if(preg_match("/[0-9]+_verified/",$key)){ 11 | $key = strtok($key, '_'); 12 | $sql = "UPDATE users SET verified = '$value' WHERE id = $key;"; 13 | $con->query($sql); 14 | } 15 | if(preg_match("/[0-9]+_deleted/",$key)){ 16 | $key = strtok($key, '_'); 17 | $sql = "UPDATE users SET deleted = '$value' WHERE id = $key;"; 18 | $con->query($sql); 19 | } 20 | if(preg_match("/[0-9]+_balance/",$key)){ 21 | $key = strtok($key, '_'); 22 | $result = mysqli_query($con,"SELECT * from wallet WHERE customer_id = $key;"); 23 | if($row = mysqli_fetch_array($result)){ 24 | $wallet_id = $row['id']; 25 | $sql = "UPDATE wallet_details SET balance = '$value' WHERE wallet_id = $wallet_id;"; 26 | $con->query($sql); 27 | } 28 | } 29 | } 30 | header("location: ../users.php"); 31 | ?> -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Rutuja Rajesh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /routers/add-users.php: -------------------------------------------------------------------------------- 1 | query($sql)==true){ 25 | $user_id = $con->insert_id; 26 | $sql = "INSERT INTO wallet(customer_id) VALUES ($user_id)"; 27 | if($con->query($sql)==true){ 28 | $wallet_id = $con->insert_id; 29 | $cc_number = number(16); 30 | $cvv_number = number(3); 31 | $sql = "INSERT INTO wallet_details(wallet_id, number, cvv) VALUES ($wallet_id, $cc_number, $cvv_number)"; 32 | $con->query($sql); 33 | } 34 | } 35 | header("location: ../users.php"); 36 | ?> -------------------------------------------------------------------------------- /routers/order-router.php: -------------------------------------------------------------------------------- 1 | query($sql) === TRUE){ 11 | $order_id = $con->insert_id; 12 | foreach ($_POST as $key => $value) 13 | { 14 | if(is_numeric($key)){ 15 | $result = mysqli_query($con, "SELECT * FROM items WHERE id = $key"); 16 | while($row = mysqli_fetch_array($result)) 17 | { 18 | $price = $row['price']; 19 | } 20 | $price = $value*$price; 21 | $sql = "INSERT INTO order_details (order_id, item_id, quantity, price) VALUES ($order_id, $key, $value, $price)"; 22 | $con->query($sql) === TRUE; 23 | } 24 | } 25 | if($_POST['payment_type'] == 'Wallet'){ 26 | $balance = $balance - $total; 27 | $sql = "UPDATE wallet_details SET balance = $balance WHERE wallet_id = $wallet_id;"; 28 | $con->query($sql) === TRUE; 29 | } 30 | header("location: ../orders.php"); 31 | } 32 | 33 | ?> -------------------------------------------------------------------------------- /routers/router.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /js/plugins/data-tables/data-tables-script.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | $('#data-table-customer').DataTable({ 3 | searching: false, 4 | paging: false 5 | }); 6 | $('#data-table-admin').DataTable({ 7 | searching: false, 8 | paging: false, 9 | ordering: false, 10 | }); 11 | var table = $('#data-table-row-grouping').DataTable({ 12 | "columnDefs": [ 13 | { "visible": false, "targets": 2 } 14 | ], 15 | "order": [[ 2, 'asc' ]], 16 | "displayLength": 25, 17 | "drawCallback": function ( settings ) { 18 | var api = this.api(); 19 | var rows = api.rows( {page:'current'} ).nodes(); 20 | var last=null; 21 | 22 | api.column(2, {page:'current'} ).data().each( function ( group, i ) { 23 | if ( last !== group ) { 24 | $(rows).eq( i ).before( 25 | '
Add, Edit or Remove Menu Items.
204 | 205 | 254 | 286 | 287 | 288 |