-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 04, 2026 at 01:52 PM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.1.2

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `academics`
--

-- --------------------------------------------------------

--
-- Table structure for table `admintbl`
--

CREATE TABLE `admintbl` (
  `id` int(100) NOT NULL,
  `userid` varchar(255) NOT NULL,
  `subid` int(100) NOT NULL,
  `regionid` int(100) NOT NULL,
  `name` varchar(255) NOT NULL,
  `surname` varchar(255) NOT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `email` varchar(100) NOT NULL,
  `whatsappno` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `postaladdres` longtext DEFAULT NULL,
  `town` varchar(255) DEFAULT NULL,
  `lecturer_photo` varchar(255) DEFAULT NULL,
  `emailverification` varchar(100) DEFAULT NULL,
  `emverify` int(1) NOT NULL,
  `status` int(255) NOT NULL,
  `registration_date` datetime NOT NULL DEFAULT current_timestamp(),
  `yearregistered` varchar(4) NOT NULL,
  `accesslevel` varchar(255) DEFAULT NULL,
  `isapproved` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `admintbl`
--

INSERT INTO `admintbl` (`id`, `userid`, `subid`, `regionid`, `name`, `surname`, `gender`, `email`, `whatsappno`, `password`, `postaladdres`, `town`, `lecturer_photo`, `emailverification`, `emverify`, `status`, `registration_date`, `yearregistered`, `accesslevel`, `isapproved`) VALUES
(1, '113090237', 1, 1, 'Melusi Muhle', 'Dlamini', 'Male', 'info@slimcate.com', '79315233', '25f9e794323b453885f5181f1b624d0b', 'PO BOX 55', 'Mbabane', '942671_contract_meeting.jpeg', '2i6mbLpytwzf', 1, 1, '2025-03-22 09:04:11', '2025', 'superadmin', 1),
(4, '210345457', 1, 1, 'Lelo', 'Ncongwane', 'Female', 'lelo@gmail.com', '26878132961', 'e10adc3949ba59abbe56e057f20f883e', 'Manzana Baleni', 'Mbabane', '271690_melu.jpeg', '35w4WE7BPXia', 1, 1, '2026-05-03 14:08:39', '2026', 'inspector', 0);

-- --------------------------------------------------------

--
-- Table structure for table `myclasses`
--

CREATE TABLE `myclasses` (
  `classid` int(100) NOT NULL,
  `classname` varchar(255) NOT NULL,
  `status` int(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `myclasses`
--

INSERT INTO `myclasses` (`classid`, `classname`, `status`) VALUES
(1, 'Grade 7A', 1),
(2, 'Grade 7B', 1),
(4, 'Grade 6', 1);

-- --------------------------------------------------------

--
-- Table structure for table `phoneverification`
--

CREATE TABLE `phoneverification` (
  `id` int(11) NOT NULL,
  `cell` int(8) NOT NULL,
  `stoken` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `regions`
--

CREATE TABLE `regions` (
  `regionid` int(100) NOT NULL,
  `regionname` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `regions`
--

INSERT INTO `regions` (`regionid`, `regionname`) VALUES
(1, 'Hhohho'),
(2, 'Manzini'),
(3, 'Lubombo'),
(4, 'Shiselweni');

-- --------------------------------------------------------

--
-- Table structure for table `sitesetting`
--

CREATE TABLE `sitesetting` (
  `site_id` int(255) NOT NULL,
  `site_name` varchar(255) NOT NULL,
  `site_logo` varchar(255) NOT NULL,
  `site_tnc` text NOT NULL,
  `site_privancy` text NOT NULL,
  `site_copyrights` varchar(255) NOT NULL,
  `disciples` longtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `sitesetting`
--

INSERT INTO `sitesetting` (`site_id`, `site_name`, `site_logo`, `site_tnc`, `site_privancy`, `site_copyrights`, `disciples`) VALUES
(1, 'Academic App', '78811_logslitle.jpg', 'user manual', 'Teeet gh fjgj gjgj fhsdgh akaf akjf', 'Dlamini Melusi Mcolisi', '<p>Welcome to the Little School Academic App</p>');

-- --------------------------------------------------------

--
-- Table structure for table `subjects`
--

CREATE TABLE `subjects` (
  `subid` int(100) NOT NULL,
  `subname` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `subjects`
--

INSERT INTO `subjects` (`subid`, `subname`) VALUES
(1, 'English Language'),
(2, 'Siswati'),
(3, 'Maths'),
(4, 'Science'),
(5, 'ICT');

-- --------------------------------------------------------

--
-- Table structure for table `teacherpreps`
--

CREATE TABLE `teacherpreps` (
  `prepid` int(11) NOT NULL,
  `teacherid` int(11) NOT NULL,
  `classid` int(11) NOT NULL,
  `datesubmitted` timestamp NOT NULL DEFAULT current_timestamp(),
  `title` varchar(255) NOT NULL,
  `description` longblob NOT NULL,
  `teachercomments` longblob DEFAULT NULL,
  `principalcomments` longblob DEFAULT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'Pending',
  `evaluationcomments` longtext DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `teacherpreps`
--

INSERT INTO `teacherpreps` (`prepid`, `teacherid`, `classid`, `datesubmitted`, `title`, `description`, `teachercomments`, `principalcomments`, `status`, `evaluationcomments`) VALUES
(2, 210345457, 1, '2026-05-04 06:35:04', 'Week 1 Prep', 0x3c703e476f6f64204461793c2f703e3c703e506c65617365206b696e646c792072656365697665207765656b203120707265703c2f703e3c703e3c6120687265663d22687474703a2f2f3132372e302e302e312f61636164656d69632f707265702f313737373832393730335f46696e616c5f39305f41737369676e6d656e742e646f637822207461726765743d225f626c616e6b223e687474703a2f2f3132372e302e302e312f61636164656d69632f707265702f313737373832393730335f46696e616c5f39305f41737369676e6d656e742e646f63783c2f613e3c2f703e3c703e3c7370616e207374796c653d22666f6e742d73697a653a203172656d3b223e5468616e6b20796f753c2f7370616e3e3c2f703e3c703e3c62723e3c2f703e, 0x3c703e3c62723e3c2f703e3c7461626c6520636c6173733d227461626c65207461626c652d626f726465726564223e3c74626f64793e3c74723e3c74643e233c2f74643e3c74643e53747564656e743c2f74643e3c74643e436f6d6d656e74733c2f74643e3c74643e5265636f6d6d656e646174696f6e3c2f74643e3c2f74723e3c74723e3c74643e313c2f74643e3c74643e4d656c75736920446c616d696e693c2f74643e3c74643e53747275676c696e672077697468206772616d6d61723c2f74643e3c74643e4d6f7265206772616d6d617220507261637469636520617420686f6d6520616e64206c6f6f6b20617420766572627320616e642070726f6e6f756e733c2f74643e3c2f74723e3c74723e3c74643e323c2f74643e3c74643e5369686c65204d616d62613c2f74643e3c74643e477265617420756e6465727374616e64696e67206f662076657262733c2f74643e3c74643e4865206e6565647320746f206b65657020646f696e6720746865207269676874207468696e67733c2f74643e3c2f74723e3c2f74626f64793e3c2f7461626c653e3c703e3c62723e3c2f703e, 0x3c703e476f6f6420446179204c656c6f3c2f703e3c703e5468616e6b20796f75204c656c6f2c20707265702069732066696e65206e6f773c2f703e3c703e5468616e6b20796f753c2f703e, 'Approved', '<p>Great&nbsp;</p><p>Im glad learners enjoyed the lessons</p>'),
(3, 210345457, 1, '2026-05-04 08:47:26', 'Lesson prep', 0x3c703e476f6f64206461793c2f703e3c703e54686973207765656c206c6561726e6572732077696c6c207761746368207468697320766964656f3a3c2f703e3c703e3c766964656f20636f6e74726f6c733d2222207372633d22687474703a2f2f3132372e302e302e312f61636164656d69632f707265702f313737373832393835315f766964656f706c61796261636b5f5f315f2e6d7034222077696474683d2236343022206865696768743d223336302220636c6173733d226e6f74652d766964656f2d636c6970223e3c2f766964656f3e3c62723e3c2f703e3c703e3c62723e3c2f703e3c703e5468616e6b20796f753c2f703e3c703e4d656c7573693c2f703e, 0x3c703e4e6f206c6573736f6e732074616b656e20706c6163652064756520746f20686f6c696461797320616e642073706f7274733c2f703e, 0x3c703e476f6f64206c6573736f6e3c2f703e3c703e5468616e6b20796f753c2f703e, 'Approved', '<p>Noted</p><p>Thank you</p>');

-- --------------------------------------------------------

--
-- Table structure for table `upload_files`
--

CREATE TABLE `upload_files` (
  `id` int(30) NOT NULL,
  `filename` text NOT NULL,
  `file_path` text NOT NULL,
  `class_id` int(30) NOT NULL,
  `teacher_id` int(30) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  `file_ext` varchar(10) DEFAULT NULL,
  `file_size` int(11) DEFAULT NULL,
  `file_type` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `upload_files`
--

INSERT INTO `upload_files` (`id`, `filename`, `file_path`, `class_id`, `teacher_id`, `date_created`, `file_ext`, `file_size`, `file_type`) VALUES
(1, 'Academic App.pdf', '1777825960_Academic App.pdf', 1, 210345457, '2026-05-03 18:32:40', NULL, NULL, NULL),
(2, 'Final_90_Assignment.docx', '1777829703_Final_90_Assignment.docx', 1, 210345457, '2026-05-03 19:35:03', 'docx', NULL, NULL),
(3, 'videoplayback (1).mp4', '1777829851_videoplayback__1_.mp4', 1, 210345457, '2026-05-03 19:37:31', 'mp4', NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admintbl`
--
ALTER TABLE `admintbl`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `myclasses`
--
ALTER TABLE `myclasses`
  ADD PRIMARY KEY (`classid`);

--
-- Indexes for table `phoneverification`
--
ALTER TABLE `phoneverification`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `regions`
--
ALTER TABLE `regions`
  ADD PRIMARY KEY (`regionid`);

--
-- Indexes for table `sitesetting`
--
ALTER TABLE `sitesetting`
  ADD PRIMARY KEY (`site_id`);

--
-- Indexes for table `subjects`
--
ALTER TABLE `subjects`
  ADD PRIMARY KEY (`subid`);

--
-- Indexes for table `teacherpreps`
--
ALTER TABLE `teacherpreps`
  ADD PRIMARY KEY (`prepid`);

--
-- Indexes for table `upload_files`
--
ALTER TABLE `upload_files`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admintbl`
--
ALTER TABLE `admintbl`
  MODIFY `id` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `myclasses`
--
ALTER TABLE `myclasses`
  MODIFY `classid` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `phoneverification`
--
ALTER TABLE `phoneverification`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `regions`
--
ALTER TABLE `regions`
  MODIFY `regionid` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `sitesetting`
--
ALTER TABLE `sitesetting`
  MODIFY `site_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `subjects`
--
ALTER TABLE `subjects`
  MODIFY `subid` int(100) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `teacherpreps`
--
ALTER TABLE `teacherpreps`
  MODIFY `prepid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `upload_files`
--
ALTER TABLE `upload_files`
  MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
