body { font-family: 'Arial', 'Khmer OS', sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; padding: 20px; }
.container { max-width: 1400px; margin: 0 auto; background: white; border-radius: 10px; padding: 30px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2); }
h1 { color: #333; text-align: center; margin-bottom: 10px; }
h2 { color: #666; text-align: center; margin-bottom: 30px; font-size: 18px; }
h3 { color: #333; margin-top: 20px; margin-bottom: 15px; }
.controls { display: flex; gap: 5px; margin-bottom: 10px; flex-wrap: nowrap; justify-content: center; }
.btn { padding: 5px 10px; border: none; border-radius: 5px; cursor: pointer; font-size: 8px; font-weight: bold; transition: all 0.3s ease; text-decoration: none; }
.btn-primary { background-color: #3498db; color: white; }
.btn-primary:hover { background-color: #2980b9; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4); }
.btn-success { background-color: #2ecc71; color: white; }
.btn-success:hover { background-color: #27ae60; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4); }
.btn-info { background-color: #1abc9c; color: white; }
.btn-info:hover { background-color: #16a085; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(26, 188, 156, 0.4); }
.btn-warning { background-color: #f39c12; color: white; }
.btn-warning:hover { background-color: #d68910; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4); }
.btn-danger { background-color: #e74c3c; color: white; }
.btn-danger:hover { background-color: #c0392b; }
#tableContainer { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; text-wrap: nowrap; text-content: left;
}
table, th, td { border: 1px solid #ddd; }
th { background-color: #34495e; color: white; padding: 12px 8px; text-align: center; font-weight: bold; }
td { padding: 10px 8px; text-align: left; }
tr:nth-child(even) { background-color: #f9f9f9; }
tr:hover { background-color: #f0f0f0; }
.edit-btn { background-color: #e74c3c; color: white; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; font-size: 8px; }
.edit-btn:hover { background-color: #c0392b; }
.delete-btn { background-color: #e74c3c; color: white; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; font-size: 8px; }
.delete-btn:hover { background-color: #c0392b; }
/* Modal Styles */ .modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); overflow-y: auto; }
.modal-content { background-color: white; margin: 5% auto; padding: 30px; border-radius: 10px; width: 90%; max-width: 1200px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); max-height: 90vh; overflow-y: auto; }
.close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.close:hover, .close:focus { color: #000; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; margin: 20px 0; }
.report-card { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 8px; padding: 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); }
.report-card h3 { margin-top: 0; color: #333; border-bottom: 2px solid #3498db; padding-bottom: 10px; }
.report-card canvas { max-height: 300px; }
#statistics { padding: 15px; background: white; border-radius: 5px; line-height: 2; }
.stat-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #eee; }
.stat-label { font-weight: bold; color: #333; }
.stat-value { color: #3498db; font-weight: bold; }
#printReportBtn { margin-top: 20px; }
@media print { body { background: white; }
.controls, .close {
display: none;
}
.report-grid {
grid-template-columns: repeat(2, 1fr);
}
}
@media (max-width: 768px) { .container { padding: 15px; }
.controls {
flex-direction: column;
}
.btn {
width: 100%;
}
table {
font-size: 11px;
}
.report-grid {
grid-template-columns: 1fr;
}
} </style>
<div class="controls">
<button id="importBtn" class="btn btn-primary">📥 Import XLSX</button>
<button id="exportJsonBtn" class="btn btn-success">📤 Export JSON</button>
<button id="exportExcelBtn" class="btn btn-info">📊 Export Excel</button>
<button id="reportBtn" class="btn btn-warning">📈 View Report</button>
<input type="file" id="fileInput" accept=".xlsx,.xls" style="display:none;">
</div>
<div id="tableContainer">
<h3>Student List</h3>
<table id="studentTable">
<thead>
<tr>
<th>##</th>
<th>Student ID</th>
<th>Last Name</th>
<th>First Name</th>
<th>DOB</th>
<th>Age</th>
<th>Sex</th>
<th>Grade</th>
<th>Phone</th>
<th>Address</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="studentTableBody">
</tbody>
</table>
</div>
</div>
<!-- Report Modal -->
<div id="reportModal" class="modal">
<div class="modal-content">
<span class="close">×</span>
<h2>Student Report</h2>
<div class="report-grid">
<div class="report-card">
<h3>Gender Distribution</h3>
<canvas id="genderChart"></canvas>
</div>
<div class="report-card">
<h3>Students by Grade</h3>
<canvas id="gradeChart"></canvas>
</div>
<div class="report-card">
<h3>Students by Age</h3>
<canvas id="ageChart"></canvas>
</div>
<div class="report-card">
<h3>Male/Female by Grade</h3>
<canvas id="genderGradeChart"></canvas>
</div>
<div class="report-card">
<h3>Male/Female by Age</h3>
<canvas id="genderAgeChart"></canvas>
</div>
<div class="report-card">
<h3>Statistics</h3>
<div id="statistics"></div>
</div>
</div>
<button id="printReportBtn" class="btn btn-primary">🖨️ Print Report</button>
</div>
</div>
<script src="app.js"></script>
|
បានឃើញ និងឯកភាព ថ្ងៃព្រហស្បតិ៍ ១១កើត ខែមាឃ ឆ្នាំម្សាញ់ សប្តស័ក ព.ស ២៥៦៩ រោគ ថ្ងៃទី២៩ ខែមករា ឆ្នាំ២០២៦ នាយិកា |
ថ្ងៃព្រហស្បតិ៍ ១១កើត ខែមាឃ ឆ្នាំម្សាញ់ សប្តស័ក ព.ស ២៥៦៩ រោគ ថ្ងៃទី២៩ ខែមករា ឆ្នាំ២០២៦ អ្នកធ្វើតារាង
អ៊ុន ប៊ុនទុង |
||||||||||||||||||||
| ## | Student ID | Last Name | First Name | DOB | Age | Sex | Grade | Phone | Address | Status | Extra | Action |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1860987 | ក្តាម | កន | 17/09/2013 | 12 | ប្រុស | 6A | 097... | ភ្នំពេញ | Active | ក្រ១ | Edit Delete |