
--
-- Table structure for table `student_check_permission`
--

CREATE TABLE `student_check_permission` (
  `class_now` tinyint(4) NOT NULL,
  `room_now` tinyint(4) NOT NULL,
  `person_id` varchar(13) NOT NULL,
  `student_check_year` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_check_permission`
--

INSERT INTO `student_check_permission` VALUES (2,0,'3341501306946',2566),(3,0,'3341501306946',2566),(4,0,'3341501306946',2566),(5,0,'3341501306946',2566),(6,0,'3341501306946',2566),(7,0,'3341501306946',2566),(8,0,'3341501306946',2566),(9,0,'3341501306946',2566),(3,0,'3341501306946',2567),(4,0,'3341501306946',2567),(5,0,'3341501306946',2567),(6,0,'3341501306946',2567),(7,0,'3341501306946',2567),(8,0,'3341501306946',2567),(9,0,'3341501306946',2567),(3,1,'3341501306946',2568),(3,1,'3341501306946',2567),(4,1,'3341501306946',2567),(5,1,'3341501306946',2567),(6,1,'3341501306946',2567),(7,1,'3341501306946',2567),(8,1,'3341501306946',2567),(9,1,'3341501306946',2567),(2,1,'3341501306946',2568),(4,1,'3341501306946',2568),(5,1,'3341501306946',2568),(6,1,'3341501306946',2568),(7,1,'3341501306946',2568),(8,1,'3341501306946',2568),(9,0,'3341501306946',2568),(9,1,'3341501306946',2568),(2,0,'3341501306946',2568);

--
-- Table structure for table `student_check_year`
--

CREATE TABLE `student_check_year` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_check_year` int(11) NOT NULL,
  `year_active` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `student_check_year` (`student_check_year`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_check_year`
--

INSERT INTO `student_check_year` VALUES (1,2566,0),(2,2567,0),(3,2568,1);

--
-- Table structure for table `student_inclass_main`
--

CREATE TABLE `student_inclass_main` (
  `check_date` date NOT NULL COMMENT 'วันที่บันทึก',
  `student_id` int(11) NOT NULL COMMENT 'รหัสนักเรียน',
  `class_now` tinyint(4) NOT NULL COMMENT 'ชั้นเรียนปัจจุบันที่บันทึก',
  `room_now` tinyint(4) NOT NULL COMMENT 'ห้องเรียนปัจจุบันที่บันทึก',
  `student_check_year` int(11) NOT NULL COMMENT 'ปีการศึกษาที่บันทึก',
  `check_val` varchar(50) NOT NULL COMMENT 'ค่าการเช็ค',
  `check_person_id` varchar(13) NOT NULL COMMENT 'ผู้ทำรายการ',
  `save_date` datetime NOT NULL COMMENT 'วันที่ทำรายการบันทึก'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_inclass_main`
--


--
-- Table structure for table `student_inclass_part`
--

CREATE TABLE `student_inclass_part` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ed_year` int(11) NOT NULL,
  `part` tinyint(4) NOT NULL,
  `start_date` date NOT NULL,
  `stop_date` date NOT NULL,
  `rec_date` date NOT NULL,
  `officer` varchar(13) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_inclass_part`
--


--
-- Table structure for table `student_inclass_permission`
--

CREATE TABLE `student_inclass_permission` (
  `class_now` tinyint(4) NOT NULL,
  `room_now` tinyint(4) NOT NULL,
  `person_id` varchar(13) NOT NULL,
  `student_check_year` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_inclass_permission`
--


--
-- Table structure for table `student_inclass_ref`
--

CREATE TABLE `student_inclass_ref` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ref_id` varchar(50) NOT NULL,
  `ed_day` varchar(10) NOT NULL,
  `period` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_inclass_ref`
--


--
-- Table structure for table `student_inclass_subject`
--

CREATE TABLE `student_inclass_subject` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ed_year` int(11) NOT NULL,
  `part` tinyint(4) NOT NULL,
  `subject` varchar(100) NOT NULL,
  `std_class` tinyint(4) NOT NULL,
  `room` tinyint(4) NOT NULL,
  `ref_id` varchar(50) NOT NULL,
  `officer` varchar(13) NOT NULL,
  `rec_date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_inclass_subject`
--


--
-- Table structure for table `student_inclass_year`
--

CREATE TABLE `student_inclass_year` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_check_year` int(11) NOT NULL,
  `num_period` int(2) NOT NULL,
  `lunch_period` int(2) NOT NULL,
  `year_active` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_inclass_year`
--


--
-- Table structure for table `student_main`
--

CREATE TABLE `student_main` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` varchar(7) NOT NULL,
  `student_number` int(11) DEFAULT NULL,
  `prename` varchar(20) NOT NULL,
  `name` varchar(50) NOT NULL,
  `surname` varchar(50) NOT NULL,
  `person_id` varchar(20) DEFAULT NULL,
  `sex` tinyint(4) NOT NULL DEFAULT 0,
  `pic` varchar(150) DEFAULT NULL,
  `class_now` tinyint(4) DEFAULT NULL,
  `room` tinyint(4) NOT NULL DEFAULT 0,
  `status` tinyint(4) NOT NULL DEFAULT 0,
  `out_edyear` int(11) DEFAULT NULL,
  `officer` varchar(13) NOT NULL,
  `rec_date` date NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `student_number` (`student_id`),
  KEY `class_now` (`class_now`),
  KEY `room` (`room`)
) ENGINE=MyISAM AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_main`
--

INSERT INTO `student_main` VALUES (1,'2996',1,'เด็กชาย','อัครพล','อำพันธ์','1349700561297',1,'modules/student_main/picture/pic_2996.jpg',4,1,0,NULL,'3341501306946','2024-02-20'),(2,'2997',2,'เด็กชาย','อัครวินทร์','แก่นจันทร์','1849300282027',1,'modules/student_main/picture/pic_2997.jpg',4,1,2,2568,'3341501306946','2024-02-20'),(3,'2998',2,'เด็กหญิง','เกวลี','ไสยวาฬ','1341501629111',2,'modules/student_main/picture/pic_2998.jpg',4,1,0,NULL,'3341501306946','2024-02-20'),(4,'3010',4,'เด็กหญิง','ธัญทิพย์','สมไว','1347300032546',2,'modules/student_main/picture/pic_3010.jpg',4,1,2,2568,'3341501306946','2024-02-20'),(5,'2983',1,'เด็กชาย','ธรรมเชษฐ์','อินทมาตร','1341501612722',1,'modules/student_main/picture/pic_2983.jpg',5,1,0,NULL,'3341501306946','2024-02-20'),(6,'2985',2,'เด็กชาย','อติเทพ','ต้นกันยา','1349902196492',1,'modules/student_main/picture/pic_2985.jpg',5,1,0,NULL,'3341501306946','2024-02-20'),(7,'2986',3,'เด็กหญิง','กมณฑวรรณ','พุ่มจันทร์','1341501621985',2,'modules/student_main/picture/pic_2986.jpg',5,1,0,NULL,'3341501306946','2024-02-20'),(8,'2987',4,'เด็กหญิง','นราวดี','ประจันตะเสน','1347600132520',2,'modules/student_main/picture/pic_2987.jpg',5,1,0,NULL,'3341501306946','2024-02-20'),(9,'2989',5,'เด็กหญิง','อริสรา','คำบ่อ','1349700551909',2,'modules/student_main/picture/pic_2989.jpg',5,1,0,NULL,'3341501306946','2024-02-20'),(10,'2990',6,'เด็กชาย','ปัณณวิช','สิงหาภู','1347600128204',1,'modules/student_main/picture/pic_2990.jpg',5,1,0,NULL,'3341501306946','2024-02-20'),(11,'2946',1,'เด็กหญิง','ปลื้มจิตร์','แก้วคำหงษ์','1341501595798',2,'modules/student_main/picture/pic_2946.jpg',6,1,0,NULL,'3341501306946','2024-02-20'),(12,'2957',2,'เด็กชาย','ภานุพงศ์','อนุเคน','1341501600431',1,'modules/student_main/picture/pic_2957.jpg',6,1,0,NULL,'3341501306946','2024-02-20'),(13,'2959',3,'เด็กหญิง','กัญญาภัค','โนริรัตน์','1349700521406',2,'modules/student_main/picture/pic_2959.jpg',6,1,0,NULL,'3341501306946','2024-02-20'),(14,'2993',4,'เด็กหญิง','สุพัตรา','ชำนาญเวช','1340300201538',2,'modules/student_main/picture/pic_2993.jpg',6,1,0,NULL,'3341501306946','2024-02-20'),(15,'2938',1,'เด็กชาย','กวินนาถ','แจ่มศรี','1349700510871',1,'modules/student_main/picture/pic_2938.jpg',7,1,0,NULL,'3341501306946','2024-02-20'),(16,'2939',2,'เด็กชาย','ธนกฤติ','วงษาพรม','1341501591920',1,'modules/student_main/picture/pic_2939.jpg',7,1,0,NULL,'3341501306946','2024-02-20'),(17,'2994',0,'เด็กหญิง','พิมญดา','วงศ์สุนา','1349700513195',2,NULL,5,0,2,2566,'3341501306946','2024-02-20'),(18,'3004',3,'เด็กหญิง','กัญญาณัฐ','โคตรพงษ์','1349700513578',2,'modules/student_main/picture/pic_3004.jpg',7,1,0,NULL,'3341501306946','2024-02-20'),(19,'2908',1,'เด็กหญิง','มุทิตา','วงษาเสน','1347600107665',2,'modules/student_main/picture/pic_2908.jpg',8,1,0,NULL,'3341501306946','2024-02-20'),(20,'2873',1,'เด็กชาย','พีระพล','นารีรัตน์','1349700472596',1,'modules/student_main/picture/pic_2873.jpg',9,1,2,2568,'3341501306946','2024-02-20'),(21,'2874',2,'เด็กหญิง','ชนากานต์','วัชรีวงศ์ ณ อยุธยา','1100704462076',2,'modules/student_main/picture/pic_2874.jpg',9,1,0,NULL,'3341501306946','2024-02-20'),(22,'2962',3,'เด็กหญิง','นพมาศ','เรืองอร่าม','1169400044574',2,'modules/student_main/picture/pic_2962.jpg',9,1,0,NULL,'3341501306946','2024-02-20'),(23,'2829',0,'เด็กชาย','ธีรภัทร','จันทอน','1349700468831',1,'modules/student_main/picture/pic_2829.jpg',9,0,1,2567,'3341501306946','2024-02-20'),(24,'2830',1,'เด็กชาย','นันทภพ','บุญพา','1341501545618',1,'modules/student_main/picture/pic_2830.jpg',9,1,1,2567,'3341501306946','2024-02-20'),(25,'2834',2,'เด็กหญิง','ทิพานัน','โล่ทอง','1341501546321',2,'modules/student_main/picture/pic_2834.jpg',9,1,1,2567,'3341501306946','2024-02-20'),(26,'2835',3,'เด็กหญิง','ภนิดา','แก้วคำหงษ์','1849902389661',2,'modules/student_main/picture/pic_2835.jpg',9,1,1,2567,'3341501306946','2024-02-20'),(27,'2836',4,'เด็กหญิง','สิริกันยา','สมัยเสนีย์','1103101208456',2,'modules/student_main/picture/pic_2836.jpg',9,1,1,2567,'3341501306946','2024-02-20'),(28,'2837',5,'เด็กหญิง','ศุภาวรรณ','หวังเจริญ','1349901878794',2,'modules/student_main/picture/pic_2837.jpg',9,1,1,2567,'3341501306946','2024-02-20'),(29,'2947',6,'เด็กชาย','วัชรพงศ์','ไสยวาฬ','1469500061567',1,'modules/student_main/picture/pic_2947.jpg',9,1,1,2567,'3341501306946','2024-02-20'),(30,'2782',0,'เด็กชาย','ณรงค์ศักดิ์','แก้วคำหงษ์','1260401246074',1,'modules/student_main/picture/pic_2782.jpg',9,0,1,2566,'3341501306946','2024-02-20'),(31,'2783',0,'เด็กชาย','ธนโชติ','ชอบสอาด','1349700444797',1,'modules/student_main/picture/pic_2783.jpg',9,0,1,2566,'3341501306946','2024-02-20'),(32,'2787',0,'เด็กชาย','อติรุจ','เพ็ญพิมพ์','1349700440597',1,'modules/student_main/picture/pic_2787.jpg',9,0,1,2566,'3341501306946','2024-02-20'),(33,'3011',3,'เด็กชาย','รวิพล','ยลสุข','1341501638951',1,'modules/student_main/picture/pic_3011.jpg',4,1,0,NULL,'3341501306946','2024-02-20'),(34,'3021',1,'เด็กชาย','นนทกร','ชาติชาตรี','1349902326094',1,NULL,3,1,0,NULL,'3341501306946','2024-06-21'),(35,'3022',2,'เด็กชาย','ปิยะ','วงษาเสน','1349902306069',1,NULL,3,1,0,NULL,'3341501306946','2024-06-21'),(36,'3023',3,'เด็กชาย','ณภัทร','ทรัพย์พงษ์','1749901714950',1,NULL,3,1,0,NULL,'3341501306946','2024-06-21'),(37,'3026',4,'เด็กหญิง','ณิรัญญา','ทับทิม','1341501649367',2,NULL,3,1,0,NULL,'3341501306946','2024-06-21'),(38,'3027',5,'เด็กหญิง','นรินทร์ภัค','ทอนไสระ','1119903090363',2,NULL,3,1,0,NULL,'3341501306946','2024-06-21'),(39,'3025',6,'เด็กหญิง','ชนันนัทธ์','ธรรมสูตร','1129902664528',2,NULL,3,1,0,NULL,'3341501306946','2024-06-21'),(40,'3028',7,'เด็กหญิง','นัทธ์ชนัน','ธรรมสูตร','1129902644501',2,NULL,3,1,0,NULL,'3341501306946','2024-06-21'),(41,'3024',8,'เด็กหญิง','กัญญาวี','ภูประกอบ','1341501646040',2,NULL,3,1,0,NULL,'3341501306946','2024-06-21'),(42,'2958',5,'เด็กชาย','สงกรานต์','โรจใน','1349902166381',1,'modules/student_main/picture/pic_2958.jpg',6,1,2,2568,'3341501306946','2024-06-21'),(43,'3029',4,'เด็กหญิง','สิริญาดา','แก้วคำหงษ์','1869900960352',2,'modules/student_main/picture/pic_3029.jpg',7,1,0,NULL,'3341501306946','2024-06-21'),(44,'3031',6,'เด็กชาย','ธีรภัทร','สุขนาแซง','1104700355368',1,'',6,1,0,NULL,'3341501306946','2024-09-19'),(45,'3053',5,'เด็กหญิง','ปิยะพร','ทอนไสระ','13497000604034',2,'',2,0,0,NULL,'3341501306946','2025-07-09'),(46,'3052',4,'เด็กหญิง','เนตรนพิศ','บุญสมยา','1346400013461',2,'',2,0,0,NULL,'3341501306946','2025-07-09'),(47,'3049',1,'เด็กชาย','กลวัชร','โนริรัตน์','1349700601234',1,'',2,0,0,NULL,'3341501306946','2025-07-09'),(48,'3051',3,'เด็กชาย','วรชิต','ชาบัวคำ','1480501437139',1,'',2,0,0,NULL,'3341501306946','2025-07-09'),(49,'3050',2,'เด็กหญิง','พิชามญชุ์','นาคนวล','1118700373572',2,'',2,0,0,NULL,'3341501306946','2025-07-09'),(50,'3033',7,'เด็กชาย','ณัฐพล','บุญเฉลียว','134760012820',1,'',5,0,0,NULL,'3341501306946','2025-07-09'),(51,'3054',6,'เด็กชาย','รชานนท์','แท่งหิน','1346400009138',1,'',2,0,0,NULL,'3341501306946','2025-07-09');

--
-- Table structure for table `student_main_class`
--

CREATE TABLE `student_main_class` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `class_code` tinyint(4) NOT NULL,
  `class_name` varchar(150) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `class_code` (`class_code`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_main_class`
--

INSERT INTO `student_main_class` VALUES (16,2,'อนุบาล2'),(3,3,'อนุุบาล3'),(4,4,'ประถมศึกษาปีที่1'),(5,5,'ประถมศึกษาปีที่2'),(6,6,'ประถมศึกษาปีที่3'),(7,7,'ประถมศึกษาปีที่4'),(17,8,'ชั้นประถมศึกษาปีที่ 5'),(18,9,'ชั้นประถมศึกษาปีที่ 6');

--
-- Table structure for table `student_main_classlog`
--

CREATE TABLE `student_main_classlog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ed_year` int(11) NOT NULL,
  `student_id` varchar(7) NOT NULL,
  `student_number` int(11) DEFAULT NULL,
  `class_code` tinyint(4) NOT NULL,
  `room` tinyint(4) DEFAULT 0,
  `officer` varchar(13) NOT NULL,
  `rec_date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=89 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_main_classlog`
--

INSERT INTO `student_main_classlog` VALUES (1,2566,'2996',0,2,0,'3341501306946','2024-02-20'),(2,2566,'2994',0,5,0,'3341501306946','2024-02-20'),(3,2566,'3011',5,2,0,'3341501306946','2024-02-20'),(4,2566,'2946',0,4,0,'3341501306946','2024-02-20'),(5,2566,'2957',0,4,0,'3341501306946','2024-02-20'),(6,2566,'2959',0,4,0,'3341501306946','2024-02-20'),(7,2566,'2993',0,4,0,'3341501306946','2024-02-20'),(8,2566,'2938',0,5,0,'3341501306946','2024-02-20'),(9,2566,'2939',0,5,0,'3341501306946','2024-02-20'),(10,2566,'3004',0,5,0,'3341501306946','2024-02-20'),(11,2566,'2908',0,6,0,'3341501306946','2024-02-20'),(12,2566,'2873',0,7,0,'3341501306946','2024-02-20'),(13,2566,'2874',0,7,0,'3341501306946','2024-02-20'),(14,2566,'2962',0,7,0,'3341501306946','2024-02-20'),(15,2566,'2829',0,8,0,'3341501306946','2024-02-20'),(16,2566,'2830',0,8,0,'3341501306946','2024-02-20'),(17,2566,'2834',0,8,0,'3341501306946','2024-02-20'),(18,2566,'2835',0,8,0,'3341501306946','2024-02-20'),(19,2566,'2836',0,8,0,'3341501306946','2024-02-20'),(20,2566,'2837',0,8,0,'3341501306946','2024-02-20'),(21,2566,'2947',0,8,0,'3341501306946','2024-02-20'),(22,2566,'2782',0,9,0,'3341501306946','2024-02-20'),(23,2566,'2783',0,9,0,'3341501306946','2024-02-20'),(24,2566,'2787',0,9,0,'3341501306946','2024-02-20'),(25,2566,'2997',0,2,0,'3341501306946','2024-06-07'),(26,2566,'2998',0,2,0,'3341501306946','2024-06-07'),(27,2566,'3010',0,2,0,'3341501306946','2024-06-07'),(28,2566,'2983',0,3,0,'3341501306946','2024-06-07'),(29,2566,'2985',0,3,0,'3341501306946','2024-06-07'),(30,2566,'2986',0,3,0,'3341501306946','2024-06-07'),(31,2566,'2987',0,3,0,'3341501306946','2024-06-07'),(32,2566,'2989',0,3,0,'3341501306946','2024-06-07'),(33,2566,'2990',0,3,0,'3341501306946','2024-06-07'),(34,2567,'2996',1,3,1,'3341501306946','2024-09-19'),(35,2567,'2997',2,3,1,'3341501306946','2024-09-19'),(36,2567,'2998',3,3,1,'3341501306946','2024-09-19'),(37,2567,'3010',4,3,1,'3341501306946','2024-09-19'),(38,2567,'2983',1,4,1,'3341501306946','2024-09-19'),(39,2567,'2829',0,9,0,'3341501306946','2024-09-19'),(40,2567,'3011',5,3,1,'3341501306946','2024-09-19'),(41,2567,'2985',2,4,1,'3341501306946','2024-09-19'),(42,2567,'2986',3,4,1,'3341501306946','2024-09-19'),(43,2567,'2987',4,4,1,'3341501306946','2024-09-19'),(44,2567,'2989',5,4,1,'3341501306946','2024-09-19'),(45,2567,'2990',6,4,1,'3341501306946','2024-09-19'),(46,2567,'2946',1,5,1,'3341501306946','2024-09-19'),(47,2567,'2957',2,5,1,'3341501306946','2024-09-19'),(48,2567,'2959',3,5,1,'3341501306946','2024-09-19'),(49,2567,'2993',4,5,1,'3341501306946','2024-09-19'),(50,2567,'2958',5,5,1,'3341501306946','2024-09-19'),(51,2567,'2938',1,6,1,'3341501306946','2024-09-19'),(52,2567,'2939',2,6,1,'3341501306946','2024-09-19'),(53,2567,'3029',4,6,1,'3341501306946','2024-09-19'),(54,2567,'3004',3,6,1,'3341501306946','2024-09-19'),(55,2567,'2908',1,7,1,'3341501306946','2024-09-19'),(56,2567,'2873',1,8,1,'3341501306946','2024-09-19'),(57,2567,'2874',2,8,1,'3341501306946','2024-09-19'),(58,2567,'2962',3,8,1,'3341501306946','2024-09-19'),(59,2567,'2830',1,9,1,'3341501306946','2024-09-19'),(60,2567,'2834',2,9,1,'3341501306946','2024-09-19'),(61,2567,'2835',3,9,1,'3341501306946','2024-09-19'),(62,2567,'2836',4,9,1,'3341501306946','2024-09-19'),(63,2567,'2837',5,9,1,'3341501306946','2024-09-19'),(64,2567,'2947',6,9,1,'3341501306946','2024-09-19'),(67,2567,'3021',1,2,1,'3341501306946','2024-09-19'),(66,2567,'3031',6,5,1,'3341501306946','2024-09-19'),(68,2567,'3022',2,2,1,'3341501306946','2024-09-19'),(69,2567,'3023',3,2,1,'3341501306946','2024-09-19'),(70,2567,'3026',4,2,1,'3341501306946','2024-09-19'),(71,2567,'3027',5,2,1,'3341501306946','2024-09-19'),(72,2567,'3025',6,2,1,'3341501306946','2024-09-19'),(73,2567,'3028',7,2,1,'3341501306946','2024-09-19'),(74,2567,'3024',8,2,1,'3341501306946','2024-09-19'),(75,2568,'2997',2,4,1,'3341501306946','2025-07-09'),(76,2568,'3010',4,4,1,'3341501306946','2025-07-09'),(77,2568,'2958',5,6,1,'3341501306946','2025-07-09'),(78,2568,'2873',1,9,1,'3341501306946','2025-07-09'),(79,2568,'3053',5,2,0,'3341501306946','2025-07-09'),(80,2568,'3052',4,2,0,'3341501306946','2025-07-09'),(81,2568,'3049',1,2,0,'3341501306946','2025-07-09'),(82,2568,'3051',3,2,0,'3341501306946','2025-07-09'),(83,2568,'3050',2,2,0,'3341501306946','2025-07-09'),(84,2568,'3033',7,5,0,'3341501306946','2025-07-09'),(85,2568,'2998',2,4,1,'3341501306946','2025-07-09'),(86,2568,'3011',3,4,1,'3341501306946','2025-07-09'),(87,2568,'3031',6,6,1,'3341501306946','2025-07-09'),(88,2568,'3054',6,2,0,'3341501306946','2025-07-09');

--
-- Table structure for table `student_main_edyear`
--

CREATE TABLE `student_main_edyear` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ed_year` int(11) NOT NULL,
  `year_active` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ed_year` (`ed_year`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_main_edyear`
--

INSERT INTO `student_main_edyear` VALUES (1,2566,0),(2,2567,0),(3,2568,1);

--
-- Table structure for table `student_main_expand1`
--

CREATE TABLE `student_main_expand1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `person_id` varchar(13) NOT NULL,
  `e_name` varchar(50) NOT NULL,
  `e_surname` varchar(50) NOT NULL,
  `birthday` date NOT NULL,
  `blood` varchar(2) NOT NULL,
  `race` varchar(30) NOT NULL,
  `nationlity` varchar(30) NOT NULL,
  `religion` varchar(30) NOT NULL,
  `rec_date` date NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `person_id` (`person_id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_main_expand1`
--

INSERT INTO `student_main_expand1` VALUES (1,'1341501591920','TANAGRIT','WONGSAPROM','2016-02-28','','','','','2024-09-19'),(2,'1349700510871','KAWINNART','JAMSEE','2015-10-05','','','','','2024-09-19'),(3,'1347600107665','MUTITA','WONGSASEN','2015-04-25','OR','','','','2024-09-19'),(4,'1349700472596','PEERAPOL','NAREERAT','2013-07-19','O','','','','2024-09-19'),(5,'1100704462076','CHANAKARN','WACHAREEWONG NA AYUTAYA','2013-11-15','OR','','','','2024-09-19'),(6,'1349700468831','TEERAPAT','JUNTORN','2013-05-01','O','','','','2024-09-19'),(7,'1341501545618','NUNTAPOP','BOONPA','2012-06-26','O','','','','2024-09-19'),(8,'1849902389661','PANIDA','KEAWKUMHONG','2012-08-21','O','','','','2024-09-19'),(9,'1103101208456','Siriganya','Samaisaynee','2012-05-25','','','','','2024-09-19'),(10,'1341501546321','TIPANUN','LOTONG','2012-07-22','O','','','','2024-09-19'),(11,'1349901878794','SUPAWAN','WANGCHARERN','2012-11-15','O','','','','2024-09-19');

--
-- Table structure for table `student_main_permission`
--

CREATE TABLE `student_main_permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `person_id` varchar(13) NOT NULL,
  `p1` tinyint(4) NOT NULL,
  `officer` varchar(13) NOT NULL,
  `rec_date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `student_main_permission`
--

INSERT INTO `student_main_permission` VALUES (1,'3341501306946',1,'3341501306946','2024-02-20'),(2,'1341700062234',1,'3341501306946','2024-02-20');

--
-- Table structure for table `system_ed_year`
--

CREATE TABLE `system_ed_year` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ed_year` int(11) NOT NULL,
  `active_ed_year` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ed_year` (`ed_year`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_ed_year`
--


--
-- Table structure for table `system_export_list`
--

CREATE TABLE `system_export_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_name` varchar(50) NOT NULL,
  `thai_dataname` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `data_name` (`data_name`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_export_list`
--

INSERT INTO `system_export_list` VALUES (1,'person','ข้อมูลครูและบุคลากร'),(2,'student','ข้อมูลพื้นฐานนักเรียน'),(3,'onet','ผลสอบ O-NET'),(4,'plan','แผนปฏิบัติการประจำปี'),(5,'student_check','การมาเรียน'),(6,'health','สุขภาพผู้เรียน');

--
-- Table structure for table `system_export_log`
--

CREATE TABLE `system_export_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `computer_ip` varchar(25) NOT NULL,
  `requester` varchar(50) NOT NULL,
  `login_time` datetime NOT NULL,
  `data` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=35 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_export_log`
--

INSERT INTO `system_export_log` VALUES (1,'10.255.199.107','amssplus','2024-06-14 10:43:29','student'),(2,'10.255.199.107','amssplus','2024-06-14 10:46:06','student'),(3,'10.255.199.107','amssplus','2024-06-14 10:52:07','student'),(4,'10.255.199.107','amssplus','2024-06-17 04:37:32','person'),(5,'10.255.199.107','amssplus','2024-06-17 04:39:47','person'),(6,'10.255.199.107','amssplus','2024-06-20 04:51:35','student_check'),(7,'10.255.199.107','amssplus','2024-09-19 04:12:24','student'),(8,'10.255.199.107','amssplus','2024-09-19 04:12:48','student'),(9,'10.255.199.107','amssplus','2024-09-25 07:28:22','student'),(10,'10.255.199.107','amssplus','2024-11-25 05:11:21','student_check'),(11,'10.255.199.107','amssplus','2024-11-25 05:11:21','student_check'),(12,'10.255.199.107','amssplus','2024-11-25 05:11:21','student_check'),(13,'10.255.199.107','amssplus','2025-01-16 09:07:17','student_check'),(14,'10.255.199.107','amssplus','2025-01-16 09:07:17','student_check'),(15,'10.255.199.107','amssplus','2025-01-16 09:07:17','student_check'),(16,'10.255.199.107','amssplus','2025-03-11 07:57:43','student_check'),(17,'10.255.199.107','amssplus','2025-03-11 07:58:04','student_check'),(18,'10.255.199.107','amssplus','2025-03-28 01:48:39','student_check'),(19,'10.255.199.107','amssplus','2025-05-29 08:10:00','person'),(20,'10.255.199.107','amssplus','2025-05-29 08:12:47','person'),(21,'10.255.199.107','amssplus','2025-05-31 16:12:45','person'),(22,'10.255.199.107','amssplus','2025-05-31 16:13:17','person'),(23,'10.255.199.107','amssplus','2025-06-08 04:32:48','student'),(24,'10.255.199.107','amssplus','2025-07-30 08:33:28','student_check'),(25,'10.255.199.107','amssplus','2025-08-01 22:22:46','student_check'),(26,'10.255.199.107','amssplus','2025-08-01 22:22:50','student_check'),(27,'10.255.199.107','amssplus','2025-08-14 04:10:03','person'),(28,'10.255.199.107','amssplus','2025-08-18 02:44:21','student'),(29,'10.255.199.107','amssplus','2025-08-18 07:16:49','student'),(30,'10.255.199.107','amssplus','2025-08-18 07:17:42','student'),(31,'10.255.199.107','amssplus','2025-08-29 02:40:17','student_check'),(32,'10.255.199.107','amssplus','2025-09-13 05:43:36','student_check'),(33,'10.255.199.107','amssplus','2025-09-13 05:54:44','student_check'),(34,'10.255.199.107','amssplus','2025-10-01 08:42:02','student');

--
-- Table structure for table `system_export_permission`
--

CREATE TABLE `system_export_permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `requester` varchar(50) NOT NULL,
  `data_name` varchar(50) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_export_permission`
--

INSERT INTO `system_export_permission` VALUES (1,'amssplus','plan',1),(2,'amssplus','onet',1),(3,'amssplus','student',1),(4,'amssplus','person',1),(5,'amssplus','student_check',1),(6,'amssplus','health',1);

--
-- Table structure for table `system_module`
--

CREATE TABLE `system_module` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(50) NOT NULL,
  `module_desc` varchar(100) NOT NULL,
  `workgroup` tinyint(4) DEFAULT NULL,
  `module_active` tinyint(4) DEFAULT NULL,
  `module_order` int(11) NOT NULL,
  `web_link` tinyint(4) DEFAULT NULL,
  `url` varchar(150) DEFAULT NULL,
  `where_work` tinyint(4) NOT NULL DEFAULT 0,
  `menu_pic` varchar(25) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=125 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_module`
--

INSERT INTO `system_module` VALUES (1,'budget','การเงินและบัญชี',2,1,25,NULL,NULL,0,'fab fa-btc'),(32,'person','ข้อมูลพื้นฐานครูและบุคลากร',3,1,29,0,'',0,'fa fa-user-circle'),(112,'amss_mail','﻿ไปรษณีย์_สพท.',4,1,49,0,'',0,'fa fa-envelope'),(49,'health','ตรวจสุขภาพนักเรียน',1,1,9,NULL,NULL,1,''),(50,'student_check','การมาเรียน',1,1,3,0,'',1,'fa fa-child'),(70,'work','﻿การปฏิบัติราชการ',4,1,41,0,'',0,''),(48,'savings','ออมทรัพย์นักเรียน',1,1,7,NULL,NULL,1,'fab fa-btc'),(45,'student_main','ข้อมูลพื้นฐานนักเรียน',1,1,2,NULL,NULL,0,'fa fa-child'),(47,'plan','การวางแผน',2,1,23,NULL,NULL,0,''),(73,'la','﻿การลา',3,1,35,0,'',0,''),(80,'mail','ไปรษณีย์_โรงเรียน',4,1,47,0,'',0,'fa fa-envelope'),(75,'meeting','﻿จองห้องประชุม',4,1,51,NULL,NULL,0,''),(76,'permission','﻿ขออนุญาตไปราชการ',3,1,37,0,'',0,''),(81,'achievement','﻿ผลสัมฤทธิ์ทางการเรียน',1,1,13,NULL,NULL,0,'fa fa-graduation-cap'),(83,'cabinet','﻿ตู้เอกสาร',4,1,53,NULL,NULL,0,''),(99,'bookregister','﻿ทะเบียนหนังสือราชการ',4,1,43,0,'',0,'fa fa-book'),(104,'bets','ทดสอบการศึกษา_โรงเรียน',1,1,15,0,'',1,'fa fa-graduation-cap'),(115,'amss_bets','﻿ทดสอบการศึกษา_สพท.',1,1,17,0,'',1,'fa fa-graduation-cap'),(105,'delegate','รักษาการในตำแหน่ง',3,1,33,0,'',0,''),(108,'affair','﻿ภารกิจผู้อำนวยการ',3,1,31,0,'',0,''),(114,'book','﻿รับส่งหนังสือราชการ',4,1,45,0,'',0,'fa fa-book'),(116,'amss_supervision','﻿นิเทศ ติดตาม ประเมินผล',1,1,19,0,'',0,'fa fa-graduation-cap'),(117,'amss_budget','﻿การบริหารงบประมาณ_สพท.',2,1,27,0,'',0,'fab fa-btc'),(118,'amss_opportunity','﻿สิทธิและโอกาสทางการศึกษา',1,1,21,0,'',0,'fa fa-child'),(119,'amss_spacial_student','﻿นักเรียนพิเศษ',1,1,11,0,'',0,'fa fa-child'),(122,'warroom','﻿วิเคราะห์สภาพการณ์',1,1,1,0,'',0,'fa fa-filter'),(123,'idplan','﻿ข้อมูลครูและบุคลากร(ส่วนเพิ่ม)',3,1,39,0,'',0,''),(124,'amss_safety','สถานศึกษาปลอดภัย',1,1,0,0,'',0,'');

--
-- Table structure for table `system_module_admin`
--

CREATE TABLE `system_module_admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `person_id` varchar(13) NOT NULL,
  `module` varchar(30) NOT NULL,
  `officer` varchar(13) NOT NULL,
  `rec_date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_module_admin`
--

INSERT INTO `system_module_admin` VALUES (1,'3341501306946','bookregister','7777','2024-02-20'),(2,'3341501306946','book','7777','2024-02-20'),(3,'3341501306946','budget','7777','2024-02-20'),(4,'3341501306946','health','7777','2024-02-20'),(5,'3341501306946','person','7777','2024-02-20'),(6,'3341501306946','student_check','7777','2024-02-20'),(7,'3341501306946','savings','7777','2024-02-20'),(8,'3341501306946','student_main','7777','2024-02-20'),(9,'3341501306946','permission','7777','2024-02-20');

--
-- Table structure for table `system_school_name`
--

CREATE TABLE `system_school_name` (
  `id` tinyint(4) NOT NULL,
  `school_name` varchar(200) NOT NULL,
  `school_type` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_school_name`
--

INSERT INTO `system_school_name` VALUES (1,'โรงเรียนบ้านสำโรงคุรุราษฎร์วิทยา(สาขาบ้านหนองแวง)',0);

--
-- Table structure for table `system_sync_code`
--

CREATE TABLE `system_sync_code` (
  `id` tinyint(4) NOT NULL AUTO_INCREMENT,
  `office_code` varchar(10) NOT NULL,
  `system_name` varchar(50) NOT NULL,
  `sync_code` varchar(50) NOT NULL,
  `amssplus_url` varchar(100) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `system_name` (`system_name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_sync_code`
--

INSERT INTO `system_sync_code` VALUES (1,'34040147','amssplus','34040147','http://10.255.199.107/amssplus');

--
-- Table structure for table `system_version`
--

CREATE TABLE `system_version` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `smss_version` varchar(100) NOT NULL,
  `status1` int(11) DEFAULT NULL,
  `status2` int(11) DEFAULT NULL,
  `status3` int(11) DEFAULT NULL,
  `status4` int(11) DEFAULT NULL,
  `status5` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_version`
--

INSERT INTO `system_version` VALUES (1,'6.4',1,0,0,0,0);

--
-- Table structure for table `system_workgroup`
--

CREATE TABLE `system_workgroup` (
  `id` tinyint(4) NOT NULL AUTO_INCREMENT,
  `workgroup` tinyint(4) NOT NULL,
  `workgroup_desc` varchar(50) NOT NULL,
  `workgroup_order` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `workgroup` (`workgroup`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `system_workgroup`
--

INSERT INTO `system_workgroup` VALUES (1,1,'บริหารวิชาการ',4),(2,2,'บริหารงบประมาณ',6),(3,3,'บริหารงานบุคคล',8),(4,4,'บริหารทั่วไป',10);

--
-- Table structure for table `work_main`
--

CREATE TABLE `work_main` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `work_date` date NOT NULL,
  `person_id` varchar(13) NOT NULL,
  `work` tinyint(4) NOT NULL DEFAULT 0,
  `comment` varchar(150) DEFAULT NULL,
  `rec_date` datetime NOT NULL,
  `officer` varchar(13) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `work_date` (`work_date`),
  KEY `person_id` (`person_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `work_main`
--


--
-- Table structure for table `work_permission`
--

CREATE TABLE `work_permission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `person_id` varchar(13) NOT NULL,
  `p1` tinyint(4) NOT NULL,
  `officer` varchar(13) NOT NULL,
  `rec_date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

--
-- Dumping data for table `work_permission`
--



