X7ROOT File Manager
Current Path:
/home/remnbtxp/public_html/members/includes
home
/
remnbtxp
/
public_html
/
members
/
includes
/
📁
..
📄
2_content.php
(7.8 KB)
📄
2_sidebar.php
(2.05 KB)
📄
3_content.php
(5.26 KB)
📄
3_sidebar.php
(1.71 KB)
📄
4_content.php
(6.65 KB)
📄
4_sidebar.php
(1.88 KB)
📄
5_content.php
(6.12 KB)
📄
5_sidebar.php
(2.01 KB)
📄
6_content.php
(5.54 KB)
📄
6_sidebar.php
(1.99 KB)
📄
7_content.php
(5.79 KB)
📄
7_sidebar.php
(1.65 KB)
📄
manage_donations_content.php
(10.09 KB)
📄
manage_expenses_content.php
(9.4 KB)
📄
manage_invoices_content.php
(9.48 KB)
📄
manage_member_content.php
(32.32 KB)
📄
manage_notes_content.php
(9.51 KB)
📄
manage_partnerships_content.php
(9.5 KB)
📄
manage_task_content.php
(10.01 KB)
📄
robots.txt
(26 B)
Editing: manage_notes_content.php
<!-- Content Header (Page header) --> <div class="content-header"> <div class="container-fluid"> <div class="row mb-2"> <div class="col-sm-6"> <h1 class="m-0">Manage Notes</h1> </div> <!-- /.col --> </div> <!-- /.row --> </div> <!-- /.container-fluid --> </div> <!-- /.content-header --> <!-- Main content --> <section class="content"> <div class="container-fluid"> <!-- Info Boxes --> <div class="row mb-2"> <!-- Add Notes --> <div class="col-md-4 mb-2"> <button type="button" class="btn btn-primary btn-block" data-toggle="modal" data-target="#addNotesModal"> Add Notes </button> </div> <!-- Edit Notes --> <div class="col-md-4 mb-2"> <button type="button" class="btn btn-success btn-block" data-toggle="modal" data-target="#editNotesModal"> Edit Notes </button> </div> <!-- Delete Notes --> <div class="col-md-4 mb-2"> <button type="button" class="btn btn-danger btn-block" data-toggle="modal" data-target="#deleteNoteModal"> Delete Notes </button> </div> </div> <!-- /.row --> <!-- Notes Table --> <div class="card"> <div class="card-header"> <h3 class="card-title">Notes Table</h3> </div> <!-- /.card-header --> <div class="card-body"> <div class="table-responsive" style="overflow-x: auto;"> <table id="expensesTable" class="table table-bordered table-hover"> <thead> <tr> <th>Note ID</th> <th>Member ID</th> <th>Note Title</th> <th>Note Content</th> <th>Date Created</th> <th>Actions</th> </tr> </thead> <tbody> <?php echo getNoteTable(); ?> </tbody> </table> </div> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.container-fluid --> </section> <!-- /.content --> <!-- Add Notes Modal --> <div class="modal fade" id="addNotesModal" tabindex="-1" role="dialog" aria-labelledby="addNotesModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="addNotesModalLabel">Add Notes</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <!-- Add Notes Form --> <form action="ajax/add_notes.php" method="POST"> <div class="form-group"> <label for="memberSelect">Select Member</label> <select class="form-control" id="memberSelect" name="member_id" required> <!-- Options will be populated by PHP --> <?php echo getmemberOptions(); ?> </select> </div> <div class="form-group"> <label for="noteTitle">Note Title</label> <input type="text" class="form-control" id="noteTitle" name="note_title" required> </div> <div class="form-group"> <label for="noteText">Note</label> <textarea class="form-control" id="noteText" name="note" rows="4" required></textarea> </div> <button type="submit" class="btn btn-primary">Add Note</button> </form> </div> </div> </div> </div> <!-- Edit Notes Modal --> <div class="modal fade" id="editNotesModal" tabindex="-1" role="dialog" aria-labelledby="editNotesModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="editNotesModalLabel">Edit Notes</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <!-- Edit Notes Form --> <form action="ajax/edit_notes.php" method="POST"> <div class="form-group"> <label for="NotesSelect">Select Notes</label> <select class="form-control" id="NotesSelect" name="editNotes_id" required> <!-- Options will be populated by PHP --> <?php echo getNoteOptions(); ?> </select> </div> <div class="form-group"> <label for="EditNoteTitle">Note Title</label> <input type="text" class="form-control" id="EditNoteTitle" name="EditNote_title" required> </div> <div class="form-group"> <label for="editNoteText">Note</label> <textarea class="form-control" id="editNoteText" name="editNote" rows="4" required></textarea> </div> <button type="submit" class="btn btn-primary">Save Changes</button> </form> </div> </div> </div> </div> <!-- Delete Note Modal --> <div class="modal fade" id="deleteNoteModal" tabindex="-1" role="dialog" aria-labelledby="deleteNoteModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="deleteNoteModalLabel">Delete Note</h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">×</span> </button> </div> <div class="modal-body"> <!-- Delete Notes Form --> <form action="ajax/delete_note.php" method="POST"> <div class="form-group"> <label for="deleteNoteSelect">Select Note to Delete</label> <select class="form-control" id="deleteNoteSelect" name="deleteNoteSelect"> <!-- Options will be populated by PHP --> <?php echo getNoteOptions(); ?> </select> </div> <p class="text-danger">Are you sure you want to delete this note? This action cannot be undone.</p> <button type="submit" class="btn btn-danger">Delete Note</button> </form> </div> </div> </div> </div> <!-- jQuery --> <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <!-- Bootstrap 4 --> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script> <?php // Function to fetch notes table data function getNoteTable() { global $conn; $query = "SELECT * FROM member_notes"; $result = $conn->query($query); $tableData = ''; if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $tableData .= "<tr> <td>{$row['id']}</td> <td>{$row['member_id']}</td> <td>{$row['note_title']}</td> <td>{$row['note']}</td> <td>{$row['created_at']}</td> </tr>"; } } else { $tableData = "<tr><td colspan='5'>No Notes found</td></tr>"; } return $tableData; } // Function to fetch note options for the dropdown function getNoteOptions() { global $conn; $query = "SELECT id, note FROM member_notes"; $result = $conn->query($query); $options = ''; if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $options .= "<option value='{$row['id']}'>{$row['note']}</option>"; } } else { $options = "<option value=''>No Note found</option>"; } return $options; } // Function to fetch member options for the dropdown function getmemberOptions() { global $conn; $query = "SELECT id, memberName FROM members"; $result = $conn->query($query); $memberOptions = ''; if ($result && $result->num_rows > 0) { while ($row = $result->fetch_assoc()) { $memberOptions .= "<option value='{$row['id']}'>{$row['memberName']}</option>"; } } else { $memberOptions = "<option value=''>No members found</option>"; } return $memberOptions; } ?>
Upload File
Create Folder