update count down

This commit is contained in:
Amal Udjir 2025-05-09 16:52:35 +07:00
parent 4ab002eb27
commit 288d1f39b7
6 changed files with 223 additions and 119 deletions

View File

@ -30,9 +30,11 @@ public function index(){
}
function php_material_detail(){
$mulai = Session::put('mulai', $_GET['mulai']);
$phpid = isset($_GET['phpid']) ? $_GET['phpid'] : '';
$start = isset($_GET['start']) ? $_GET['start'] : '';
$type = isset($_GET['type']) ? $_GET['type'] : '';
$materi = isset($_GET['materi']) ? $_GET['materi'] : '';
$results = DB::select("select * from php_topics_detail where id_topics = $phpid and id ='$start' ");
@ -62,6 +64,7 @@ function php_material_detail(){
'row' => $detail,
'topics' => $topics,
'phpid' => $phpid,
'materi' => $materi,
'html_start' => $html_start,
'pdf_reader' => $pdf_reader ,
'topicsCount' => $topicsCount ,
@ -98,6 +101,7 @@ function send_task(){
$phpid = isset($_GET['phpid']) ? $_GET['phpid'] : '';
$task = isset($_GET['task']) ? $_GET['task'] : '';
$type = isset($_GET['type']) ? $_GET['type'] : '';
$materi = isset($_GET['materi']) ? $_GET['materi'] : '';
$task_db = DB::table('php_task')
->where('id_topics', $phpid)
@ -125,6 +129,7 @@ function send_task(){
'row' => $detail,
'topics' => $topics,
'phpid' => $phpid,
'materi' => $materi,
'html_start' => $html_start,
'pdf_reader' => $pdf_reader ,
'detailCount' => $persen,
@ -145,6 +150,10 @@ function task_submission(Request $request){
$phpid = $_POST['phpid'];
$type = $_POST['type'];
$task_id = $_POST['testing_number_one'];
$materi = $_POST['materi'];
$time_left = $_POST['time_left'];
$file = $request->file('file');
//$file_name = Auth::user()->name.'_'.$file->getClientOriginalName();
@ -179,12 +188,36 @@ function task_submission(Request $request){
DB::insert("insert into php_user_submits(userid) values ('$val')");
$fileContent = file_get_contents($path);
$email = Auth::user()->email;
$date = date('Y-m-d');
$fileContent = str_replace("'", '"', $fileContent);
if($_POST['testing_number_one'] == 1){
$testing_number_one = "testing_number_one";
$time_start = "10:00:00";
$start = new \DateTime($time_start);
$end = new \DateTime($time_left);
$diff = $start->diff($end);
$minutes = $diff->i;
$seconds = $diff->s;
$interval = new \DateInterval("PT{$minutes}M{$seconds}S");
$start->add($interval);
$end_time = $start->format('H:i:s');
}elseif($_POST['testing_number_one'] == 2){
$check_sq = DB::select("SELECT * FROM php_submits_submission where email = '$email' and testing_type = 'testing_number_one' and id_materi = '$materi' order by id desc limit 1");
if(count($check_sq) > 0){
$time_start = $check_sq[0]->time_end;
$start = new \DateTime($time_start);
$end = new \DateTime($time_left);
$diff = $start->diff($end);
$minutes = $diff->i;
$seconds = $diff->s;
$interval = new \DateInterval("PT{$minutes}M{$seconds}S");
$start->add($interval);
$end_time = $start->format('H:i:s');
}
$testing_number_one = "testing_number_two";
}elseif($_POST['testing_number_one'] == 3){
$testing_number_one = "testing_number_three";
@ -196,9 +229,10 @@ function task_submission(Request $request){
$testing_number_one = "testing_number_six";
}
$fileContent = str_replace("'", '"', $fileContent);
DB::select("insert into php_submits_submission(task_id,task_topics,task_no,testing_type,username,userfile,ket) values ('$task_id','$phpid','$type','$testing_number_one','$val','$file_name','$fileContent')");
return redirect("/php/send-task?phpid=$phpid&task=$task_id&type=$type")->with('status', 'File Successfully Uploaded!');
DB::select("insert into php_submits_submission(id_materi,task_id,task_topics,task_no,testing_type,username,userfile,ket,email,time_start,created_at,time_end)values
('$materi','$task_id','$phpid','$type','$testing_number_one','$val','$file_name','$fileContent','$email','$time_start','$date','$end_time')");
return redirect("/php/send-task?phpid=$phpid&task=$task_id&type=$type&materi=$materi")->with('status', 'File Successfully Uploaded!');
}
function task_submission_(Request $request){

102
iclop.sql
View File

@ -1,17 +1,17 @@
/*
Navicat Premium Data Transfer
Navicat Premium Dump SQL
Source Server : baru
Source Server : LocalHost
Source Server Type : MySQL
Source Server Version : 100425 (10.4.25-MariaDB)
Source Server Version : 100432 (10.4.32-MariaDB)
Source Host : localhost:3306
Source Schema : iclop
Target Server Type : MySQL
Target Server Version : 100425 (10.4.25-MariaDB)
Target Server Version : 100432 (10.4.32-MariaDB)
File Encoding : 65001
Date: 09/05/2025 05:12:22
Date: 09/05/2025 16:51:28
*/
SET NAMES utf8mb4;
@ -52020,7 +52020,7 @@ CREATE TABLE `exercise_student_submits_view` (
`singletestcode` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
`checkstat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`report` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP,
`exerciseid` int NULL DEFAULT NULL,
`validation_time` int NULL DEFAULT NULL,
`projectfile` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
@ -52419,7 +52419,7 @@ CREATE TABLE `failed_jobs` (
`queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp,
`failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;
@ -86856,7 +86856,7 @@ CREATE TABLE `iaeng` (
`checkstat` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`checkresult` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL,
`validation_time` int NULL DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP
`created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
@ -86894,7 +86894,7 @@ CREATE TABLE `jplas_results` (
`filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`filepath` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`comment` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 324 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;
@ -87231,7 +87231,7 @@ CREATE TABLE `jplas_topics` (
`name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`packfile` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`docfile` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;
@ -87580,7 +87580,7 @@ CREATE TABLE `php_submits_submission` (
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
`testing_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`tipe` enum('github','zip','file') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`tipe` enum('github','zip','file') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'file',
`userfile` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`ket` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
`status_testing` int NULL DEFAULT NULL,
@ -87591,7 +87591,7 @@ CREATE TABLE `php_submits_submission` (
PRIMARY KEY (`id`) USING BTREE,
INDEX `user_id`(`task_id` ASC) USING BTREE,
INDEX `android_topic_id`(`testing_type` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 311 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;
) ENGINE = InnoDB AUTO_INCREMENT = 337 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of php_submits_submission
@ -87836,60 +87836,8 @@ INSERT INTO `php_submits_submission` VALUES (252, 10, 6, 12, 1, NULL, 'leonardo.
INSERT INTO `php_submits_submission` VALUES (253, 10, 6, 12, 1, NULL, 'jimmyjonshon@gmail.com', 'testing_number_six', 'file', 'GuideA6.php', NULL, 1, '11:02:30', '11:26:30', '2024-05-31', NULL);
INSERT INTO `php_submits_submission` VALUES (254, 10, 6, 12, 1, NULL, 'richardsoegiarto@gmail.com', 'testing_number_six', 'file', 'GuideA6.php', NULL, 1, '10:57:07', '11:11:55', '2024-05-31', NULL);
INSERT INTO `php_submits_submission` VALUES (255, 10, 6, 12, 1, NULL, 'amaludjir@gmail.com', 'testing_number_six', 'file', 'GuideA6.php', NULL, 1, '10:57:34', '11:09:48', '2024-05-31', NULL);
INSERT INTO `php_submits_submission` VALUES (257, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (258, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<h1>Heading ke-1</h1>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (259, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (260, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<h1>Heading ke-1</h1>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (261, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (262, NULL, 1, 13, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'form_insert.php', '<!DOCTYPE html>\r\n<html lang=\"id\">\r\n<head>\r\n <meta charset=\"UTF-8\">\r\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n <title>Formulir Pendaftaran</title>\r\n</head>\r\n<body>\r\n <h2>Formulir Pendaftaran Mahasiswa</h2>\r\n <form action=\"save_insert.php\" method=\"POST\">\r\n <label for=\"nama\">Nama:</label>\r\n <input type=\"text\" id=\"nama\" name=\"nama\" required><br><br>\r\n\r\n <label for=\"email\">Email:</label>\r\n <input type=\"email\" id=\"email\" name=\"email\" required><br><br>\r\n\r\n <label for=\"prodi\">Program Studi:</label>\r\n <select id=\"prodi\" name=\"prodi\" required>\r\n <option value=\"Informatika\">Informatika</option>\r\n <option value=\"Sistem Informasi\">Sistem Informasi</option>\r\n <option value=\"Teknik Elektro\">Teknik Elektro</option>\r\n </select><br><br>\r\n\r\n <button type=\"submit\">Daftar</button>\r\n </form>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (263, NULL, 1, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'koneksi.php', '<?php\r\n$localhost = \"localhost\";\r\n$username = \"root\";\r\n$password = \"\";\r\n$db = \"test_db\";\r\n\r\n$conn = new mysqli($localhost, $username, $password, $db);\r\n\r\nif ($conn->connect_error) {\r\n die(\"Koneksi gagal: \" . $conn->connect_error);\r\n}\r\n\r\n?>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (264, NULL, 3, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'insert.php', '<?php\r\ninclude \"koneksi.php\";\r\n\r\nif ($conn->connect_error) {\r\ndie(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n\r\n$name = $_POST[\"nama\"];\r\n$email = $_POST[\"email\"];\r\n$prodi = $_POST[\"prodi\"];\r\n\r\n\r\n$sql = \"INSERT INTO users (name, email, prodi) VALUES ( \"$name\", \"$email\", \"$prodi\")\";\r\n\r\nif ($conn->query($sql) === TRUE) {\r\necho \"New record created successfully\";\r\n} else {\r\necho \"Error: \" . $sql . \"<br>\" . $conn->error;\r\n}\r\n\r\n$conn->close();\r\n?>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (265, NULL, 4, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_four', 'github', 'update.php', '<?php\r\ninclude \"koneksi.php\";\r\n\r\nif ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n\r\n\r\n// Mengambil data berdasarkan ID\r\nif (isset($_GET[\"id\"])) {\r\n $id = $_GET[\"id\"];\r\n $query = \"SELECT * FROM users WHERE id = \"$id\"\";\r\n $result = $conn->query($query);\r\n \r\n if ($row = $result->fetch_assoc()) {\r\n $name = $row[\"name\"];\r\n $email = $row[\"email\"];\r\n $prodi = $row[\"prodi\"];\r\n }\r\n}\r\n\r\n// Proses update data\r\nif (isset($_POST[\"update\"])) {\r\n $id = $_POST[\"id\"];\r\n $name = $_POST[\"nama\"];\r\n $email = $_POST[\"email\"];\r\n $prodi = $_POST[\"prodi\"];\r\n\r\n $sql = \"UPDATE users SET name = \"$name\", email = \"$email\", prodi = \"$prodi\" WHERE id = \"$id\"\";\r\n\r\n if ($conn->query($sql) === TRUE) {\r\n echo \"Data berhasil diperbarui! <a href=\"index.php\">Kembali ke daftar mahasiswa</a>\";\r\n } else {\r\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\r\n }\r\n}\r\n?>\r\n\r\n<!DOCTYPE html>\r\n<html lang=\"id\">\r\n<head>\r\n <meta charset=\"UTF-8\">\r\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n <title>Formulir Update Mahasiswa</title>\r\n</head>\r\n<body>\r\n <h2>Formulir Update Mahasiswa</h2>\r\n <form action=\"\" method=\"POST\">\r\n <input type=\"hidden\" name=\"id\" value=\"<?php echo $id; ?>\">\r\n\r\n <label for=\"nama\">Nama:</label>\r\n <input type=\"text\" id=\"nama\" name=\"nama\" value=\"<?php echo $name; ?>\" required><br><br>\r\n\r\n <label for=\"email\">Email:</label>\r\n <input type=\"email\" id=\"email\" name=\"email\" value=\"<?php echo $email; ?>\" required><br><br>\r\n\r\n <label for=\"prodi\">Program Studi:</label>\r\n <select id=\"prodi\" name=\"prodi\" required>\r\n <option value=\"Informatika\" <?php echo ($prodi == \"Informatika\") ? \"selected\" : \"\"; ?>>Informatika</option>\r\n <option value=\"Sistem Informasi\" <?php echo ($prodi == \"Sistem Informasi\") ? \"selected\" : \"\"; ?>>Sistem Informasi</option>\r\n <option value=\"Teknik Elektro\" <?php echo ($prodi == \"Teknik Elektro\") ? \"selected\" : \"\"; ?>>Teknik Elektro</option>\r\n </select><br><br>\r\n\r\n <button type=\"submit\" name=\"update\">Update</button>\r\n </form>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (266, NULL, 2, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'index.php', '<?php\r\nsession_start();\r\ninclude \"koneksi.php\";\r\n\r\nif ($conn->connect_error) {\r\n die(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n\r\n$sql = \"SELECT * FROM users\";\r\n$result = $conn->query($sql);\r\n\r\nif ($result->num_rows > 0) {\r\n echo \"<a href=\"form_insert.php\">Insert Data</a> <br />\";\r\n echo \"<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\";\r\n echo \"<tr>\r\n <th>Name</th>\r\n <th>Email</th>\r\n <th>study program</th>\r\n <th>By</th>\r\n <th>Action</th>\r\n </tr>\";\r\n\r\n while ($row = $result->fetch_assoc()) {\r\n echo \"<tr>\";\r\n echo \"<td>\" . $row[\"name\"] . \"</td>\";\r\n echo \"<td>\" . $row[\"email\"] . \"</td>\";\r\n echo \"<td>\" . $row[\"prodi\"] . \"</td>\";\r\n echo \"<td>\" . $row[\"username\"] . \"</td>\";\r\n echo \"<td><a href=\"edit.php?id=\" . $row[\"id\"] . \"\">Edit</a> | <a href=\"delete.php?id=\" . $row[\"id\"] . \"\">Delete</a></td>\";\r\n echo \"</tr>\";\r\n }\r\n\r\n echo \"</table>\";\r\n} else {\r\n echo \"<a href=\"form_insert.php\">Insert Data</a> <br />\";\r\n echo \"0 results\";\r\n}\r\n\r\n?>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (267, NULL, 5, 14, 2, 'Amal Dermawan Udjir', NULL, 'testing_number_five', 'github', 'delete.php', '<?php\r\ninclude \"koneksi.php\";\r\n\r\nif ($conn->connect_error) {\r\ndie(\"Connection failed: \" . $conn->connect_error);\r\n}\r\n\r\n$id = $_GET[\"id\"];\r\n$sql = \"DELETE FROM users WHERE id = $id\";\r\n\r\n\r\nif ($conn->query($sql) === TRUE) {\r\necho \"Record deleted successfully\";\r\n} else {\r\necho \"Error: \" . $sql . \"<br>\" . $conn->error;\r\n}\r\n\r\n$conn->close();\r\n?>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (268, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (269, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $at = 3; \r\n $bs = 3; \r\n echo $results = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (270, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $at = 3; \r\n $bs = 3; \r\n echo $results = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (271, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (272, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $as = 3; \r\n $bs = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (273, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $as = 3; \r\n $bs = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (274, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (275, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (276, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (277, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $as = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (278, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (279, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 3; \r\n echo $result = $a * $bs;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (280, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (281, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 3; \r\n echo $result = $a * $bs;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (282, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 3; \r\n echo $result = $a * $bss;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (283, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 3; \r\n echo $result = $a * 2;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (284, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 3; \r\n echo $result = $a * $c;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (285, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 4; \r\n echo $result = $a * $bs;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (286, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 4; \r\n echo $result = $a * $bs;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (287, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 4; \r\n echo $result = $a * $bs;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (288, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 3; \r\n echo $result = $a * $bs;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (289, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $bs = 3; \r\n echo $result = $a * $c;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (290, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (291, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<h1>Heading ke-1</h1>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (292, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<h1>Heading ke-2</h1>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (293, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<?php \r\n$h1 = \"<h1>Heading ke-1</h1>\";\r\necho $h1;\r\n?>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (294, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (295, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<?php \r\n$h1 = \"<h1>Heading ke-1</h1>\";\r\necho $h1;\r\n?>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (296, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<?php \r\n$h1 = \"<h1>Heading ke-1</h1>\";\r\necho $h1;\r\n?>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (297, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<?php \r\n$h1 = \"<h1>Heading ke-1</h1>\";\r\necho $h1;\r\n?>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (298, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<?php \r\n$h1 = \"<h1>Heading ke-1</h1>\";\r\necho $h1;\r\n?>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (299, NULL, 2, 8, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_two', 'github', 'GuideA2.php', '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (300, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<?php \r\n$h1 = \"<h1>Heading ke-1</h1>\";\r\necho $h1;\r\n?>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (301, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<?php \r\n$h1 = \"<h1>Heading ke-1</h1>\";\r\necho $h1;\r\n?>\r\n<h2>Heading \r\n ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (302, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '<?php\r\n\r\n$nama = \"Ali Akbar\";\r\n$umur = 20;\r\n$tinggi = 172.5;\r\n$aktif = true;\r\n\r\n$gaji_pokok = 1000000; \r\n$gaji_bulanan = 0;\r\n$gaji_per_tahun = 0;\r\n$ppn = 0;\r\n$gaji_setelah_ppn = 0;\r\n\r\n$gaji_bulanan = $gaji_pokok * 0.5;\r\n\r\n$gaji_per_tahun = $gaji_bulanan * 12;\r\n\r\n$ppn = $gaji_per_tahun * 0.10;\r\n\r\n$gaji_setelah_ppn = $gaji_per_tahun - $ppn;\r\n\r\necho \"Nama : $nama <br>\";\r\necho \"Umur : $umur <br>\";\r\necho \"Tinggi : $tinggi <br>\";\r\necho \"Aktif : $aktif <br>\";\r\necho \"Gaji Pokok : $gaji_pokok <br>\";\r\necho \"Gaji Bulanan : $gaji_bulanan <br>\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun <br>\";\r\necho \"PPN : $ppn <br>\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn <br>\";', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (303, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '<?php\r\n\r\n$nama = \"Ali Akbar\";\r\n$umur = 20;\r\n$tinggi = 172.5;\r\n$aktif = true;\r\n\r\n$gaji_pokok = 1000000; \r\n$gaji_bulanan = 0;\r\n$gaji_per_tahun = 0;\r\n$ppn = 0;\r\n$gaji_setelah_ppn = 0;\r\n\r\n$gaji_bulanan = $gaji_pokok * 0.5;\r\n\r\n$gaji_per_tahun = $gaji_bulanan * 12;\r\n\r\n$ppn = $gaji_per_tahun * 0.10;\r\n\r\n$gaji_setelah_ppn = $gaji_per_tahun - $ppn;\r\n\r\necho \"Nama : $nama <br>\";\r\necho \"Umur : $umur <br>\";\r\necho \"Tinggi : $tinggi <br>\";\r\necho \"Aktif : $aktif <br>\";\r\necho \"Gaji Pokok : $gaji_pokok <br>\";\r\necho \"Gaji Bulanan : $gaji_bulanan <br>\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun <br>\";\r\necho \"PPN : $ppn <br>\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn <br>\";\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (304, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '<?php\r\n\r\n$nama = \"Ali Akbar\";\r\n$umur = 20;\r\n$tinggi = 172.5;\r\n$aktif = true;\r\n\r\n$gaji_pokok = 1000000; \r\n$gaji_bulanan = 0;\r\n$gaji_per_tahun = 0;\r\n$ppn = 0;\r\n$gaji_setelah_ppn = 0;\r\n\r\n$gaji_bulanan = $gaji_pokok * 0.5;\r\n\r\n$gaji_per_tahun = $gaji_bulanan * 12;\r\n\r\n$ppn = $gaji_per_tahun * 0.10;\r\n\r\n$gaji_setelah_ppn = $gaji_per_tahun - $ppn;\r\n\r\necho \"Nama : $nama <br>\";\r\necho \"Umur : $umur <br>\";\r\necho \"Tinggi : $tinggi <br>\";\r\necho \"Aktif : $aktif <br>\";\r\necho \"Gaji Pokok : \r\n$gaji_pokok <br>\";\r\necho \"Gaji Bulanan : $gaji_bulanan <br>\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun <br>\";\r\necho \"PPN : $ppn <br>\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn <br>\";\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (305, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '<?php\r\n\r\n$nama = \"Ali Akbar\";\r\n$umur = 20;\r\n$tinggi = 172.5;\r\n$aktif = true;\r\n\r\n$gaji_pokok = 1000000; \r\n$gaji_bulanan = 0;\r\n$gaji_per_tahun = 0;\r\n$ppn = 0;\r\n$gaji_setelah_ppn = 0;\r\n\r\n$gaji_bulanan = $gaji_pokok * 0.5;\r\n\r\n$gaji_per_tahun = $gaji_bulanan * 12;\r\n\r\n$ppn = $gaji_per_tahun * 0.10;\r\n\r\n$gaji_setelah_ppn = $gaji_per_tahun - $ppn;\r\n\r\necho \"Nama : $nama <br>\";\r\necho \"Umur : $umur <br>\";\r\necho \"Tinggi : $tinggi <br>\";\r\necho \"Aktif : $aktif <br>\";\r\necho \"Gaji Pokok : $gaji_pokok <br>\";\r\necho \"Gaji Bulanan : $gaji_bulanan <br>\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun <br>\";\r\necho \"PPN : $ppn <br>\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn <br>\";\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (306, NULL, 3, 9, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_three', 'github', 'GuideA3.php', '<?php\r\n\r\n$nama = \"Ali Akbar\";\r\n$umur = 20;\r\n$tinggi = 172.5;\r\n$aktif = true;\r\n\r\n$gaji_pokok = 1000000; \r\n$gaji_bulanan = 0;\r\n$gaji_per_tahun = 0;\r\n$ppn = 0;\r\n$gaji_setelah_ppn = 0;\r\n\r\n$gaji_bulanan = $gaji_pokok * 0.5;\r\n\r\n$gaji_per_tahun = $gaji_bulanan * 12;\r\n\r\n$ppn = $gaji_per_tahun * 0.10;\r\n\r\n$gaji_setelah_ppn = $gaji_per_tahun - $ppn;\r\n\r\necho \"Nama : $nama <br>\";\r\necho \"Umur : $umur <br>\";\r\necho \"Tinggi : $tinggi <br>\";\r\necho \"Aktif : $aktif <br>\";\r\necho \"Gaji Pokok : $gaji_pokok <br>\";\r\necho \"Gaji Bulanan : $gaji_bulanan <br>\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun <br>\";\r\necho \"PPN : $ppn <br>\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn <br>\";\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (307, NULL, 4, 10, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_four', 'github', 'GuideA4.php', '<?php\r\n\r\n$nilai = 75;\r\n\r\nif ($nilai >= 70) {\r\n echo \"Nilai Anda: \" . $nilai . \"<br>\";\r\n echo \"Anda lulus!\";\r\n}\r\n\r\necho \"<br><br>\";\r\n$nilai = 55;\r\nif ($nilai >= 70) {\r\n echo \"Nilai Anda: \" . $nilai . \"<br>\";\r\n echo \"Anda lulus!\";\r\n} else {\r\n echo \"Nilai Anda:\".$nilai.\"<br>\";\r\n echo \"Anda tidak lulus.\";\r\n}\r\n\r\necho \"<br><br>\";\r\n$nilai = \"B\";\r\nswitch ($nilai){\r\n case \"A\":\r\n echo \"Nilai Anda: \" . $nilai . \"<br>\";\r\n echo \"Pertahankan prestasi!\";\r\n break;\r\n case \"B\":\r\n echo \"Nilai Anda: \" . $nilai . \"<br>\";\r\n echo \"Cukup baik, terus tingkatkan!\";\r\n break;\r\n case \"C\":\r\n echo \"Nilai Anda: \" . $nilai . \"<br>\";\r\n echo \"Perlu lebih banyak belajar.\";\r\n break;\r\n default:\r\n echo \"Nilai Anda: \" . $nilai . \"<br>\";\r\n echo \"Maaf, tidak ada keterangan.\";\r\n}\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (308, NULL, 5, 11, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_five', 'github', 'GuideA5.php', '<?php\r\n$angka = 1;\r\necho \"Perulangan while:<br>\";\r\nwhile ($angka <= 5) {\r\n echo \"Angka: $angka <br>\";\r\n $angka++;\r\n}\r\necho \"<br>\";\r\n\r\necho \"Perulangan for:<br>\";\r\nfor ($i = 1; $i <= 5; $i++) {\r\n echo \"Angka: $i <br>\";\r\n}\r\necho \"<br>\";\r\n\r\n$angka = 1;\r\necho \"Perulangan do-while:<br>\";\r\ndo {\r\n echo \"Angka: $angka <br>\";\r\n $angka++;\r\n} while ($angka <= 5);\r\n\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (309, NULL, 6, 12, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_six', 'github', 'GuideA6.php', '<?php \r\n$bilangan = array(1, 2, 3, 4, 5);\r\n$nama = array(\"John\", \"Doe\", \"Jane\");\r\n$status = array(true, false, true);\r\n\r\necho \"Nama pertama: \" . $nama[0] . \"<br>\";\r\necho \"Status kedua: \" . ($status[1] ? \"Aktif\" : \"Tidak Aktif\") . \"<br>\";\r\n\r\n$bilangan[] = 6;\r\nunset($nama[0]);\r\n\r\n$posisi = array_search(\"Doe\", $nama);\r\necho \"Posisi Nama Doe Terletak Pada Array Ke : \". $posisi . \"<br>\";;\r\n\r\n$jumlah_nama = count($nama);\r\necho \"Jumlah Nama Pada Array Adalah : \". $jumlah_nama . \"<br>\";\r\n\r\narray_push($nama, \"Smith\");\r\n$elemen_terakhir = array_pop($nama);\r\necho \"Elemen baru ditambahkan ke Array adalah : \". $elemen_terakhir . \"<br>\";\r\n?>', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (310, NULL, 1, 7, 1, 'Amal Dermawan Udjir', NULL, 'testing_number_one', 'github', 'GuideA1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<?php \r\n$h1 = \"<h1>Heading ke-1</h1>\";\r\necho $h1;\r\n?>\r\n<h2>Heading \r\n ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>\r\n', NULL, NULL, NULL, NULL, NULL);
INSERT INTO `php_submits_submission` VALUES (335, 10, 1, 7, 1, 'Amal Dermawan Udjir', 'amaludjir@gmail.com', 'testing_number_one', 'file', 'Test1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<h1>Heading ke-1</h1>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>', 0, '10:00:00', '10:35:39', '2025-05-09', NULL);
INSERT INTO `php_submits_submission` VALUES (336, 10, 1, 7, 1, 'Amal Dermawan Udjir', 'amaludjir@gmail.com', 'testing_number_one', 'file', 'Test1.php', '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<h1>Heading ke-1</h1>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>', NULL, '10:00:00', '10:42:54', '2025-05-09', NULL);
-- ----------------------------
-- Table structure for php_task
@ -87944,7 +87892,7 @@ CREATE TABLE `php_testing_rule` (
-- ----------------------------
-- Records of php_testing_rule
-- ----------------------------
INSERT INTO `php_testing_rule` VALUES (1, '<!doctype html> <html lang=\"en\"> <head> <title>Belajar Membuat Heading dan Paragraph</title> </head> <body> <?php $h1 = \"<h1>Heading ke-1</h1>\"; echo $h1; ?> <h2>Heading ke-2</h2> <h3>Heading ke-3</h3> <h4>Heading ke-4</h4> <h5>Heading ke-5</h5> <h6>Heading ke-6</h6> <p> <strong>ini contoh paragraph</strong></p> </body> </html>', '1', 'testing_number_one');
INSERT INTO `php_testing_rule` VALUES (1, '<!doctype html>\r\n<html lang=\"en\">\r\n<head>\r\n<title>Belajar Membuat Heading dan Paragraph</title>\r\n</head>\r\n<body>\r\n<h1>Heading ke-1</h1>\r\n<h2>Heading ke-2</h2>\r\n<h3>Heading ke-3</h3>\r\n<h4>Heading ke-4</h4>\r\n<h5>Heading ke-5</h5>\r\n<h6>Heading ke-6</h6>\r\n<p> <strong>ini contoh paragraph</strong></p>\r\n</body>\r\n</html>', '1', 'testing_number_one');
INSERT INTO `php_testing_rule` VALUES (2, '<?php\r\n $a = 3; \r\n $b = 3; \r\n echo $result = $a * $b;\r\n?>', '9', 'testing_number_two');
INSERT INTO `php_testing_rule` VALUES (3, '<?php\r\n\r\n$nama = \"Ali Akbar\";\r\n$umur = 20;\r\n$tinggi = 172.5;\r\n$aktif = true;\r\n\r\n$gaji_pokok = 1000000; \r\n$gaji_bulanan = 0;\r\n$gaji_per_tahun = 0;\r\n$ppn = 0;\r\n$gaji_setelah_ppn = 0;\r\n\r\n$gaji_bulanan = $gaji_pokok * 0.5;\r\n\r\n$gaji_per_tahun = $gaji_bulanan * 12;\r\n\r\n$ppn = $gaji_per_tahun * 0.10;\r\n\r\n$gaji_setelah_ppn = $gaji_per_tahun - $ppn;\r\n\r\necho \"Nama : $nama <br>\";\r\necho \"Umur : $umur <br>\";\r\necho \"Tinggi : $tinggi <br>\";\r\necho \"Aktif : $aktif <br>\";\r\necho \"Gaji Pokok : $gaji_pokok <br>\";\r\necho \"Gaji Bulanan : $gaji_bulanan <br>\";\r\necho \"Gaji Per Tahun : $gaji_per_tahun <br>\";\r\necho \"PPN : $ppn <br>\";\r\necho \"Gaji Setelah PPN : $gaji_setelah_ppn <br>\";\r\n\r\n?>', 'Nama : Ali Akbar\r\nUmur : 20\r\nTinggi : 172.5\r\nAktif : 1\r\nGaji Pokok : 1000000\r\nGaji Bulanan : 500000\r\nGaji Per Tahun : 6000000\r\nPPN : 600000\r\nGaji Setelah PPN : 5400000', 'testing_number_three');
INSERT INTO `php_testing_rule` VALUES (4, 'php_testing_rule', NULL, 'testMethodPOST');
@ -88117,8 +88065,8 @@ CREATE TABLE `python_feedback` (
`id_topik` int NOT NULL,
`id_percobaan` int NOT NULL,
`comment` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id_feedback`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 653 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;
@ -88783,8 +88731,8 @@ CREATE TABLE `python_percobaan` (
`filetest` varchar(200) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`deskripsi` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`texteditor` longtext CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL,
`created_at` timestamp NULL DEFAULT current_timestamp,
`updated_at` timestamp NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id_percobaan`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;
@ -88819,8 +88767,8 @@ CREATE TABLE `python_students_submit` (
`userid` int NOT NULL,
`checkstat` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`checkresult` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT current_timestamp,
`updated_at` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id_submit`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 901 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;
@ -89669,8 +89617,8 @@ CREATE TABLE `python_students_validation` (
`time` int NULL DEFAULT NULL,
`report` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`file_submitted` varchar(70) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`create_at` timestamp NOT NULL DEFAULT current_timestamp,
`update_at` timestamp NOT NULL DEFAULT current_timestamp,
`create_at` timestamp NOT NULL DEFAULT current_timestamp(),
`update_at` timestamp NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id_validation`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 688 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;
@ -90328,8 +90276,8 @@ CREATE TABLE `python_topics` (
`nama` varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`deskripsi` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`status` tinyint NOT NULL DEFAULT 1,
`created_at` timestamp NULL DEFAULT current_timestamp,
`updated_at` timestamp NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NULL DEFAULT current_timestamp(),
`updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id_topik`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = DYNAMIC;

View File

@ -557,6 +557,8 @@
<input type="hidden" id="title" />
<input type="hidden" id="controller" />
<input type="hidden" id="type" />
<input type="hidden" id="materi" value="<?php echo $_GET['materi']; ?>" />
<input type="hidden" id="mulai" value="1" />
<span class="text-sm">Memiliki {{ $topicsCount }} materi yang akan dibahas secara detail</span>
</div>
@ -622,26 +624,16 @@ function materialDetailPage() {
let title = $("#title").val();
let controller = $("#controller").val();
let type = $("#type").val();
window.location.href = "{{ route('php_material_detail') }}?phpid="+id+"&start="+controller+"&type="+type;
let materi = $("#materi").val();
let mulai = $("#mulai").val();
/*$.ajax({
type: "POST",
data: {
id: id,
title: title,
_token: csrfToken // Menambahkan token CSRF ke dalam data permintaan
},
dataType: 'html',
url: "{{ route('php_material_detail') }}",
success: function(res) {
window.location.href = "{{ route('php_material_detail') }}?phpid="+id+"&start="+controller+"&type="+type+"&materi="+materi+"&mulai="+mulai;
},
error: function(xhr, status, error) {
console.error("Error:", error);
}
});*/
function resetCountdown() {
localStorage.removeItem('timeEnd');
location.reload();
}
// Fungsi untuk mengubah warna ikon, teks, dan link menjadi biru
function changeColor(id) {
var icon = document.getElementById(id + 'Icon');

View File

@ -176,10 +176,21 @@
<body>
<!-- Navbar -->
<nav class="navbar navbar-light bg-light" style="padding: 15px 20px; border-bottom: 1px solid #E4E4E7; font-family: 'Poppins', sans-serif;">
<a class="navbar-brand" href="{{ route('welcome') }}">
<a class="navbar-brand" href="{{ route('welcome') }}?materi=<?php echo $_GET['materi']; ?>">
<img src="{{ asset('images/left-arrow.png') }}" style="height: 24px; margin-right: 10px;">
{{ $row->title; }}
<div>
<?php if(Session::get('mulai') == '1'): ?>
<h3>Waktu Tersisa:</h3>
<div id="countdown" style="font-size: 32px; color: red;"></div>
<?php else: ?>
<h3>Waktu Tersisa:</h3>
<div id="countdown" style="font-size: 32px; color: red;"></div>
<?php endif; ?>
</div>
</a>
</nav>
<!-- Sidebar -->
@ -251,7 +262,7 @@
</label>
</div>
<div class="col" style="padding-bottom: 1rem;">
<a class="text" style="{{ $active }};" href="{{ route('php_material_detail') }}?phpid={{$topic->id}}&start={{$r->id}}&type={{$r->type}}" id="requirement" onclick="updateProgress(@php echo $count_ @endphp)">{{ $r->title }} </a>
<a class="text" style="{{ $active }};" href="{{ route('php_material_detail') }}?phpid={{$topic->id}}&start={{$r->id}}&type={{$r->type}}&materi={{$_GET['materi']}}&mulai={{session()->get('mulai')}}" id="requirement" onclick="updateProgress(@php echo $count_ @endphp)">{{ $r->title }} </a>
</div>
</div>
@endforeach
@ -292,7 +303,7 @@
</label>
</div>
<div class="col" style="padding-bottom: 1rem;">
<a class="text" onclick="updateProgress(@php echo $count_ @endphp)" style="{{ $active_task }}" href="{{ route('send_task') }}?phpid={{$topic->id}}&task={{$u->task_no}}&type={{$type}}" id="requirement" >{{ $u->task_name }} </a>
<a class="text" onclick="updateProgress(@php echo $count_ @endphp)" style="{{ $active_task }}" href="{{ route('send_task') }}?phpid={{$topic->id}}&task={{$u->task_no}}&type={{$type}}&materi={{$_GET['materi']}}&mulai={{session()->get('mulai')}}" id="requirement" >{{ $u->task_name }} </a>
</div>
</div>
@php
@ -304,12 +315,13 @@
</div>
@endforeach
<?php if($_GET['type'] == '1'): ?>
<?php else: ?>
<li class="list-item" onclick="toggleItem(this)">
<span class="list-item-title" ><a style='color: #000;cursor: pointer; text-decoration: none;' href="{{ route('work_results') }}">Work Results</a>
</span>
</li>
<?php endif; ?>
</ul>
</div>
@ -417,11 +429,84 @@ function updateProgress(params) {
}
});
}
$('#progress').text("@php
$width = session('params');
echo $width."%";
@endphp");
</script>
<script>
$(document).ready(function(){
$(".loader").hide();
});
$("#verifikasi").click(function(){
var csrfToken = "{{ csrf_token() }}"; // Fetch CSRF token
let kode = $("#task").val();
$.ajax({
type: "POST",
data: { kode: kode },
dataType:'html',
url: "{{ Route("unittesting") }}",
headers: {
'X-CSRF-TOKEN': csrfToken // Include CSRF token in headers
},
beforeSend: function() {
// Code to execute before sending the request
// For example, you might want to show a loading spinner
$(".loader").show();
$("#result_verifikasi").hide();
},
success: function(res){
$("#result_verifikasi").show();
$("#result_verifikasi").html(res);
$(".loader").hide();
}
});
});
</script>
<script>
let timeEnd;
// Cek apakah waktu akhir sudah tersimpan
if (localStorage.getItem('timeEnd')) {
timeEnd = new Date(localStorage.getItem('timeEnd'));
} else {
// Kalau belum ada, set mulai dari sekarang + 2 jam
const now = new Date();
timeEnd = new Date(now.getTime() + 2 * 60 * 60 * 1000); // 2 jam dari sekarang
localStorage.setItem('timeEnd', timeEnd.toISOString());
}
function updateCountdown() {
const redirectUrl = "{{ route('welcome') }}?materi=<?php echo $_GET['materi']; ?>";
const now = new Date();
const distance = timeEnd - now;
if (distance <= 0) {
document.getElementById("countdown").innerHTML = "Waktu Habis!";
clearInterval(timer);
window.location.href = redirectUrl;
} else {
const hours = Math.floor((distance / (1000 * 60 * 60)) % 24);
const minutes = Math.floor((distance / (1000 * 60)) % 60);
const seconds = Math.floor((distance / 1000) % 60);
const formatted = `${hours.toString().padStart(2, '0')}:` +
`${minutes.toString().padStart(2, '0')}:` +
`${seconds.toString().padStart(2, '0')}`;
document.getElementById("countdown").innerHTML = formatted;
document.getElementById("time_left").value = formatted;
}
}
const timer = setInterval(updateCountdown, 1000);
updateCountdown();
function resetCountdown() {
localStorage.removeItem('timeEnd');
location.reload();
}
</script>
</body>
</html>

View File

@ -59,6 +59,8 @@
<input type="hidden" value="<?php echo $_GET['task'] ?>" name="testing_number_one" >
<input type="hidden" value="<?php echo $_GET['phpid'] ?>" name="phpid" >
<input type="hidden" value="<?php echo $_GET['type'] ?>" name="type" >
<input type="hidden" value="<?php echo $_GET['materi'] ?>" name="materi" >
<input type="hidden" name="time_left" id="time_left" />
</div>
<br />
<div class="form-group">
@ -72,7 +74,7 @@
<div id="result_verifikasi" style="padding:10px 0;">
</div>
<button type="button" onclick="resetCountdown()" class="btn btn-warning">Reset Countdown</button>
</div>
</div>
<span class="loader"></span>
@ -106,3 +108,45 @@
});
</script>
<script>
let timeEnd;
// Cek apakah waktu akhir sudah tersimpan
if (localStorage.getItem('timeEnd')) {
timeEnd = new Date(localStorage.getItem('timeEnd'));
} else {
// Kalau belum ada, set mulai dari sekarang + 2 jam
const now = new Date();
timeEnd = new Date(now.getTime() + 2 * 60 * 60 * 1000); // 2 jam dari sekarang
localStorage.setItem('timeEnd', timeEnd.toISOString());
}
function updateCountdown() {
const now = new Date();
const distance = timeEnd - now;
if (distance <= 0) {
document.getElementById("countdown").innerHTML = "Waktu Habis!";
clearInterval(timer);
} else {
const hours = Math.floor((distance / (1000 * 60 * 60)) % 24);
const minutes = Math.floor((distance / (1000 * 60)) % 60);
const seconds = Math.floor((distance / 1000) % 60);
const formatted = `${hours.toString().padStart(2, '0')}:` +
`${minutes.toString().padStart(2, '0')}:` +
`${seconds.toString().padStart(2, '0')}`;
document.getElementById("countdown").innerHTML = formatted;
document.getElementById("time_left").value = formatted; // <--- ini yang penting
}
}
const timer = setInterval(updateCountdown, 1000);
updateCountdown(); // panggil pertama kali
function resetCountdown() {
localStorage.removeItem('timeEnd');
location.reload(); // reload halaman agar timer di-set ulang
}
</script>

View File

@ -36,6 +36,7 @@
Route::any('edit.php', [PHPController::class, 'edit_student'])->name('edit_student');
Route::any('index.php', [PHPController::class, 'index_student'])->name('index_student');
Route::any('delete.php', [PHPController::class, 'delete_student'])->name('delete_student');
Route::any('/clearsession', [PHPController::class, 'clearSession'])->name('clearSession');
});
Route::prefix('codeception')->group(function () {