Şuanki Dizin: /home/wwwdreamtechnolo/www/b2bflight.com/B2BFlight/project/dashboard/ |
Şuanki Dosya : /home/wwwdreamtechnolo/www/b2bflight.com/B2BFlight/project/dashboard/add-expenses.php |
<?php require_once('lib/functions.php'); $db = new class_functions(); $flag = 0; if(isset($_GET['delete_id'])) { $delete_id = $_GET['delete_id']; if($db->delete_expenses($delete_id)) { $flag = 3; } } if(isset($_POST['expenses_category'])) { $expenses_category = $_POST['expenses_category']; $titel = $_POST['titel']; $expenses_date = $_POST['expenses_date']; $expenses_amount = $_POST['expenses_amount']; $description = $_POST['description']; $isexist = $db->get_add_expenses_exist_id($expenses_category,$titel,$expenses_date,$expenses_amount,$description); if($isexist=="") { if($db->new_expenses_type_name($expenses_category,$titel,$expenses_date,$expenses_amount,$description)) { $flag = 1; } } else { $flag = 2; } } ?> <!doctype html> <html lang="en" dir="ltr"> <head> <?php require_once('header-common.php'); ?> </head> <body class=" "> <!-- loader Start --> <div id="loading"> <div class="loader simple-loader"> <div class="loader-body"></div> </div> </div> <!-- loader END --> <aside class="sidebar sidebar-default sidebar-white sidebar-base navs-rounded-all "> <div class="sidebar-header d-flex align-items-center justify-content-start"> <a href="index.php" class="navbar-brand"> <img src="images/<?php echo $logo; ?>" class="software_logo" style="height:90px; width:220px;" /> </a> <div class="sidebar-toggle" data-toggle="sidebar" data-active="true"> <i class="icon"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M4.25 12.2744L19.25 12.2744" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M10.2998 18.2988L4.2498 12.2748L10.2998 6.24976" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> </svg> </i> </div> </div> <?php require_once('left-side.php'); ?> <div class="sidebar-footer"></div> </aside> <main class="main-content"> <?php require_once('navbar.php'); ?> <div class="conatiner-fluid content-inner mt-n5 py-0"> <div class="row"> <div class="col-sm-12"> <div class="card"> <?php if($flag ==1) { ?> <div class="mb-3 alert alert-left alert-success alert-dismissible fade show" role="alert" style="width:80%; margin:auto; margin-top:25px;"> <span>Expenses Saved Successfully</span> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="Close"></button> </div> <?php } else if($flag==2) { ?> <div class="alert alert-warning d-flex align-items-center" role="alert" style="width:80%; margin:auto; margin-top:25px;"> <svg class="flex-shrink-0 bi me-2 icon-24" width="24" height="24"> <use xlink:href="#exclamation-triangle-fill" /> </svg> <div> Expenses Already Exist </div> </div> <?php } else if($flag ==3) { ?> <div class="mb-3 alert alert-left alert-success alert-dismissible fade show" role="alert" style="width:80%; margin:auto; margin-top:25px;"> <span>Expenses Deleted Successfully</span> <button type="button" class="btn-close btn-close-white" data-bs-dismiss="alert" aria-label="Close"></button> </div> <?php } ?> <div class="card-header d-flex justify-content-between flex-wrap"> <div class="header-title"> <h4 class="card-title mb-0">Expenses</h4> </div> <div class=""> <!--<a href="#" class=" text-center btn btn-primary btn-icon mt-lg-0 mt-md-0 mt-3" data-bs-toggle="modal" data-bs-target="#staticBackdrop"> <i class="btn-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" /> </svg> </i> <span>New Permission</span> </a> <div class="modal fade" id="staticBackdrop" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel">Add new permission</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="form-group"> <label for="email" class="form-label">permission title</label> <input type="email" class="form-control" id="email" aria-describedby="email" placeholder="Permission Title"> </div> <div class="text-start"> <button type="button" class="btn btn-primary" data-bs-dismiss="modal">Save</button> <button type="button" class="btn btn-danger">Cancel</button> </div> </div> </div> </div> </div>--> <a href="#" class=" text-center btn btn-primary btn-icon mt-lg-0 mt-md-0 mt-3" data-bs-toggle="modal" data-bs-target="#staticBackdrop-1"> <i class="btn-inner"> <svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6" /> </svg> </i> <span>Add New Expenses</span> </a> <div class="modal fade" id="staticBackdrop-1" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true"> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="staticBackdropLabel"> New Expenses</h5> <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button> </div> <div class="modal-body"> <div class="form-group"> <label for="email" class="form-label">Expenses Category</label> <select class="form-control" name="expenses_category"> <?php $groups_data = array(); $groups_data = $db->get_all_expenses_names(); if(!empty($groups_data)) { foreach($groups_data as $record) { $res_id = $record[0]; $res_expenses_name = $record[1]; $res_date = $record[2]; $res_time = $record[3]; ?> <option value="<?php echo $res_id; ?>"><?php echo $res_expenses_name; ?></option> <?php } } ?> </select> </div> <div class="form-group"> <label for="email" class="form-label">titel</label> <input type="text" class="form-control" name="titel" id="email" aria-describedby="email" placeholder="Expenses Title" required /> </div> <div class="form-group"> <label for="email" class="form-label">Expenses Date</label> <input type="date" class="form-control" name="expenses_date" id="email" aria-describedby="email" placeholder="Expenses Date" required /> </div> <div class="form-group"> <label for="email" class="form-label">Expenses Amount</label> <input type="text" class="form-control" name="expenses_amount" id="email" aria-describedby="email" placeholder="Expenses Amount" required /> </div> <div class="form-group"> <label for="email" class="form-label">Description</label> <input type="text" class="form-control" name="description" id="email" aria-describedby="email" placeholder="Description" required /> </div> <!--<div> <span>status</span> <div class="form-check"> <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios2" value="option2"> <label class="form-check-label" for="exampleRadios2"> yes </label> </div> <div class="form-check"> <input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios2" value="option2"> <label class="form-check-label" for="exampleRadios2"> no </label> </div> </div>--> <div class="text-start mt-2"> <button type="submit" class="btn btn-primary" data-bs-dismiss="modal">Save</button> </div> </div> </div> </div> </form> </div> </div> </div> <div class="card-body"> <div class="table-responsive"> <table class="table table-bordered"> <thead> <tr> <th>Sr No</th> <th>Expenses Category</th> <th>Expenses Title</th> <th>Expenses Date</th> <th>Expenses Amount</th> <th>Description</th> <th class="text-center">Edit </th> <th class="text-center">Delete </th> </tr> </thead> <tbody> <?php $groups_data = array(); $groups_data = $db->get_all_expenses_group_names(); if(!empty($groups_data)) { foreach($groups_data as $record) { $id = $record[0]; $expenses_category = $record[1]; $titel = $record[2]; $expenses_date = $record[3]; $expenses_amount = $record[4]; $description = $record[5]; $date = $record[6]; $time = $record[7]; $group_name_title = $db->get_title_name_from_id($expenses_category); ?> <td class=""><?php echo $id; ?> </td> <td class=""><?php echo $expenses_category; ?> </td> <td class=""><?php echo $titel; ?> </td> <td class=""><?php echo $expenses_date; ?> </td> <td class=""><?php echo $expenses_amount; ?> </td> <td class=""><?php echo $description; ?> </td> <td class="text-center"> <a class="btn btn-sm btn-icon text-primary flex-end" data-bs-toggle="tooltip" title="Edit" href="expenses-edit?edit_id=<?php echo $id; ?>"> <span class="btn-inner"> <svg class="icon-20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" > <path d="M11.4925 2.78906H7.75349C4.67849 2.78906 2.75049 4.96606 2.75049 8.04806V16.3621C2.75049 19.4441 4.66949 21.6211 7.75349 21.6211H16.5775C19.6625 21.6211 21.5815 19.4441 21.5815 16.3621V12.3341" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M8.82812 10.921L16.3011 3.44799C17.2321 2.51799 18.7411 2.51799 19.6721 3.44799L20.8891 4.66499C21.8201 5.59599 21.8201 7.10599 20.8891 8.03599L13.3801 15.545C12.9731 15.952 12.4211 16.181 11.8451 16.181H8.09912L8.19312 12.401C8.20712 11.845 8.43412 11.315 8.82812 10.921Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M15.1655 4.60254L19.7315 9.16854" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> </svg> </span> </a> </td> <td class="text-center"> <a class="btn btn-sm btn-icon text-danger " data-bs-toggle="tooltip" title="Delete" onclick="return confirm('Are You Sure To Delete?');" href="<?php echo $_SERVER['PHP_SELF']."?delete_id=".$id; ?>"> <span class="btn-inner"> <svg class="icon-20" width="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"> <path d="M19.3248 9.46826C19.3248 9.46826 18.7818 16.2033 18.4668 19.0403C18.3168 20.3953 17.4798 21.1893 16.1088 21.2143C13.4998 21.2613 10.8878 21.2643 8.27979 21.2093C6.96079 21.1823 6.13779 20.3783 5.99079 19.0473C5.67379 16.1853 5.13379 9.46826 5.13379 9.46826" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M20.708 6.23975H3.75" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> <path d="M17.4406 6.23973C16.6556 6.23973 15.9796 5.68473 15.8256 4.91573L15.5826 3.69973C15.4326 3.13873 14.9246 2.75073 14.3456 2.75073H10.1126C9.53358 2.75073 9.02558 3.13873 8.87558 3.69973L8.63258 4.91573C8.47858 5.68473 7.80258 6.23973 7.01758 6.23973" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path> </svg> </span> </a> </td> </tr> <?php } } else{ } ?> </tbody> </table> </div> </div> </div> </div> </div> </div> <!-- Library Bundle Script --> <script src="../assets/js/core/libs.min.js"></script> <!-- External Library Bundle Script --> <script src="../assets/js/core/external.min.js"></script> <!-- Widgetchart Script --> <script src="../assets/js/charts/widgetcharts.js"></script> <!-- mapchart Script --> <script src="../assets/js/charts/vectore-chart.js"></script> <script src="../assets/js/charts/dashboard.js" ></script> <!-- fslightbox Script --> <script src="../assets/js/plugins/fslightbox.js"></script> <!-- Settings Script --> <script src="../assets/js/plugins/setting.js"></script> <!-- Slider-tab Script --> <script src="../assets/js/plugins/slider-tabs.js"></script> <!-- Form Wizard Script --> <script src="../assets/js/plugins/form-wizard.js"></script> <!-- AOS Animation Plugin--> <script src="../assets/vendor/aos/dist/aos.js"></script> <!-- App Script --> <script src="../assets/js/hope-ui.js" defer></script> <style> .sidebar.sidebar-default .nav-link:not(.static-item).active , .sidebar.sidebar-default .nav-link:not(.static-item).active, .sidebar.sidebar-default .nav-link:not(.static-item)[aria-expanded=true] { background-color:#FE6600 !important; } </style> </body> </html>
Linux 65-254-81-4.cprapid.com 5.14.0-284.11.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 9 05:49:00 EDT 2023 x86_64
Apache
65.254.81.4