{"id":851,"date":"2023-02-01T00:01:03","date_gmt":"2023-01-31T17:01:03","guid":{"rendered":"https:\/\/idc.utc.ac.th\/?p=851"},"modified":"2023-02-01T06:38:35","modified_gmt":"2023-01-31T23:38:35","slug":"851","status":"publish","type":"post","link":"http:\/\/idc.utc.ac.th\/?p=851","title":{"rendered":"."},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code>CREATE TABLE books (\n    tbl_books_id INT(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,\n    tbl_books_name VARCHAR(255) NOT NULL,\n    tbl_books_namewrite VARCHAR(255) NOT NULL,\n    tbl_books_publisher VARCHAR(255) NOT NULL,\n    tbl_books_totol VARCHAR(10) NOT NULL\n)ENGINE=InnoDB DEFAULT CHARSET=\"utf8\";<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n    $server = \"127.0.0.1\";\n    $username = \"root\";\n    $password = \"\";\n    $dbname = \"ebooks\";\n    $condb = mysqli_connect(\"$server\", \"$username\", \"$password\", \"$dbname\");\n\n    if(isset($_POST&#91;'btn_addbook'])){\n        $sql_insert_books = \"INSERT INTO `books` (`tbl_books_id`, `tbl_books_name`, `tbl_books_namewrite`, `tbl_books_publisher`, `tbl_books_totol`) VALUES ('\".$_POST&#91;'tbl_books_id'].\"', '\".$_POST&#91;'tbl_books_name'].\"', '\".$_POST&#91;'tbl_books_namewrite'].\"', '\".$_POST&#91;'tbl_books_publisher'].\"', '\".$_POST&#91;'tbl_books_totol'].\"');\";\n        mysqli_query($condb, $sql_insert_books);\n    }\n\n    if(isset($_POST&#91;'btn_delete'])){\n        $id = $_POST&#91;'tbl_books_id_delete'];\n        $sql_delete_books = \" DELETE FROM books WHERE `books`.`tbl_books_id` = $id\";\n        mysqli_query($condb, $sql_delete_books);\n    }\n\n    if(isset($_POST&#91;'btn_edit_save'])){\n        $id_edit_save = $_POST&#91;'id_edit'];\n        $sql_btn_edit_save = \" UPDATE `books` SET `tbl_books_id` = '\".$_POST&#91;'tbl_books_id'].\"', `tbl_books_name` = '\".$_POST&#91;'tbl_books_name'].\"', `tbl_books_namewrite` = '\".$_POST&#91;'tbl_books_namewrite'].\"', `tbl_books_publisher` = '\".$_POST&#91;'tbl_books_publisher'].\"', `tbl_books_totol` = '\".$_POST&#91;'tbl_books_totol'].\"' WHERE `books`.`tbl_books_id` = $id_edit_save; \";\n        mysqli_query($condb, $sql_btn_edit_save);\n    }\n?&gt;\n&lt;!DOCTYPE html&gt;\n&lt;html lang=\"en\"&gt;\n&lt;head&gt;\n    &lt;meta charset=\"UTF-8\"&gt;\n    &lt;meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"&gt;\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"&gt;\n    &lt;title&gt;E-Book&lt;\/title&gt;\n    &lt;!-- Bootstrap CSS --&gt;\n    &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0-alpha1\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3\/Jr59b6EGGoI1aFkw7cmDA6j6gD\" crossorigin=\"anonymous\"&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    \n\n\n\n&lt;div class=\"container\"&gt;\n    &lt;img src=\"logo.png\" width=\"250px\"&gt;\n    &lt;h2&gt;ECS ***********&lt;\/h2&gt;\n    &lt;hr&gt;\n&lt;?php\n    if(isset($_POST&#91;'btn_edit'])){\n        $id2 = $_POST&#91;'tbl_books_id_edit'];\n        $sql_select_books_edit = \" SELECT * FROM books WHERE tbl_books_id = $id2\";\n        $result_sql_select_books_edit = mysqli_query($condb, $sql_select_books_edit);\n        foreach($result_sql_select_books_edit as $row2){\n?&gt;\n&lt;div class=\"modal fade\" id=\"onload\" tabindex=\"-1\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\"&gt;\n&lt;div class=\"modal-dialog\"&gt;\n    &lt;div class=\"modal-content\"&gt;\n      &lt;div class=\"modal-header\"&gt;\n        &lt;h5 class=\"modal-title\" id=\"exampleModalLabel\"&gt;\u0e41\u0e01\u0e49\u0e44\u0e02\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/h5&gt;\n        &lt;button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"&gt;&lt;\/button&gt;\n      &lt;\/div&gt;\n      &lt;div class=\"modal-body\"&gt;\n        &lt;!-- form --&gt;\n        &lt;form action=\"\" method=\"post\"&gt;\n            &lt;input type=\"hidden\" value=\"&lt;?php echo $id2; ?&gt;\" name=\"id_edit\"&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e23\u0e2b\u0e31\u0e2a\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/label&gt;\n                &lt;input type=\"number\" class=\"form-control\" name=\"tbl_books_id\" value=\"&lt;?php echo $row2&#91;\"tbl_books_id\"]; ?&gt;\"&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/label&gt;\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_name\" value=\"&lt;?php echo $row2&#91;\"tbl_books_name\"]; ?&gt;\"&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19&lt;\/label&gt;\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_namewrite\" value=\"&lt;?php echo $row2&#91;\"tbl_books_namewrite\"]; ?&gt;\"&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e33\u0e19\u0e31\u0e01\u0e1e\u0e34\u0e21\u0e1e\u0e4c&lt;\/label&gt;\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_publisher\" value=\"&lt;?php echo $row2&#91;\"tbl_books_publisher\"]; ?&gt;\"&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e08\u0e33\u0e19\u0e27\u0e19\u0e40\u0e25\u0e48\u0e21&lt;\/label&gt;\n                &lt;input type=\"number\" class=\"form-control\" name=\"tbl_books_totol\" value=\"&lt;?php echo $row2&#91;\"tbl_books_totol\"]; ?&gt;\"&gt;\n            &lt;\/div&gt;\n        \n      &lt;\/div&gt;\n      &lt;div class=\"modal-footer\"&gt;\n        &lt;button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\"&gt;\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01&lt;\/button&gt;\n        &lt;input type=\"submit\" class=\"btn btn-success\" value=\"\u0e41\u0e01\u0e49\u0e44\u0e02\" name=\"btn_edit_save\"&gt;\n        &lt;!-- form --&gt;\n        &lt;\/form&gt;\n        &lt;!-- form --&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;\n&lt;?php\n    }}\n?&gt;\n    &lt;!-- Button trigger modal --&gt;\n    &lt;button type=\"button\" class=\"btn btn-success\" data-bs-toggle=\"modal\" data-bs-target=\"#exampleModal\"&gt;\n    + \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\n    &lt;\/button&gt;\n\n    &lt;table class=\"table mt-3\"&gt;\n        &lt;thead&gt;\n            &lt;tr class=\"text-center\"&gt;\n                &lt;th scope=\"col\"&gt;\u0e23\u0e2b\u0e31\u0e2a\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/th&gt;\n                &lt;th scope=\"col\"&gt;\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/th&gt;\n                &lt;th scope=\"col\"&gt;\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19&lt;\/th&gt;\n                &lt;th scope=\"col\"&gt;\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e33\u0e19\u0e31\u0e01\u0e1e\u0e34\u0e21\u0e1e\u0e4c&lt;\/th&gt;\n                &lt;th scope=\"col\"&gt;\u0e08\u0e33\u0e19\u0e27\u0e19\u0e40\u0e25\u0e48\u0e21&lt;\/th&gt;\n                &lt;th scope=\"col\"&gt;\u0e41\u0e01\u0e49\u0e44\u0e02&lt;\/th&gt;\n                &lt;th scope=\"col\"&gt;\u0e25\u0e1a&lt;\/th&gt;\n            &lt;\/tr&gt;\n        &lt;\/thead&gt;\n        &lt;tbody&gt;\n&lt;?php\n    $sql_select_books = \"SELECT * FROM books\";\n    $result_sql_select_books = mysqli_query($condb, $sql_select_books);\n    foreach($result_sql_select_books as $rows){\n?&gt;\n            &lt;tr class=\"text-center\"&gt;\n                &lt;td&gt;&lt;?php echo $rows&#91;\"tbl_books_id\"];?&gt;&lt;\/td&gt;\n                &lt;td&gt;&lt;?php echo $rows&#91;\"tbl_books_name\"];?&gt;&lt;\/td&gt;\n                &lt;td&gt;&lt;?php echo $rows&#91;\"tbl_books_namewrite\"];?&gt;&lt;\/td&gt;\n                &lt;td&gt;&lt;?php echo $rows&#91;\"tbl_books_publisher\"];?&gt;&lt;\/td&gt;\n                &lt;td&gt;&lt;?php echo $rows&#91;\"tbl_books_totol\"];?&gt;&lt;\/td&gt;\n                &lt;td&gt;\n                    &lt;form action=\"\" method=\"post\"&gt;\n                        &lt;input type=\"hidden\" value=\"&lt;?php echo $rows&#91;'tbl_books_id']; ?&gt;\" name=\"tbl_books_id_edit\"&gt;\n                        &lt;input type=\"submit\" class=\"btn btn-warning\" value=\"\u0e41\u0e01\u0e49\u0e44\u0e02\" name=\"btn_edit\"&gt;\n                    &lt;\/form&gt;\n                &lt;\/td&gt;\n                &lt;td&gt;\n                    &lt;form action=\"\" method=\"post\"&gt;\n                        &lt;input type=\"hidden\" value=\"&lt;?php echo $rows&#91;'tbl_books_id']; ?&gt;\" name=\"tbl_books_id_delete\"&gt;\n                        &lt;input type=\"submit\" class=\"btn btn-danger\" value=\"\u0e25\u0e1a\" name=\"btn_delete\" onclick=\"return confirm('\u0e22\u0e37\u0e19\u0e22\u0e31\u0e19\u0e01\u0e32\u0e23\u0e25\u0e1a');\"&gt;\n                    &lt;\/form&gt;\n                &lt;\/td&gt;\n            &lt;\/tr&gt;\n&lt;?php } ?&gt;\n        &lt;\/tbody&gt;\n    &lt;\/table&gt;\n    \n    \n\n&lt;\/div&gt;\n\n\n\n\n\n&lt;!-- Modal --&gt;\n&lt;div class=\"modal fade\" id=\"exampleModal\" tabindex=\"-1\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\"&gt;\n  &lt;div class=\"modal-dialog\"&gt;\n    &lt;div class=\"modal-content\"&gt;\n      &lt;div class=\"modal-header\"&gt;\n        &lt;h5 class=\"modal-title\" id=\"exampleModalLabel\"&gt;\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/h5&gt;\n        &lt;button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"&gt;&lt;\/button&gt;\n      &lt;\/div&gt;\n      &lt;div class=\"modal-body\"&gt;\n        &lt;!-- form --&gt;\n        &lt;form action=\"\" method=\"post\"&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e23\u0e2b\u0e31\u0e2a\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/label&gt;\n                &lt;input type=\"number\" class=\"form-control\" name=\"tbl_books_id\" required&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/label&gt;\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_name\" required&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19&lt;\/label&gt;\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_namewrite\" required&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e33\u0e19\u0e31\u0e01\u0e1e\u0e34\u0e21\u0e1e\u0e4c&lt;\/label&gt;\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_publisher\" required&gt;\n            &lt;\/div&gt;\n            &lt;div class=\"mb-3\"&gt;\n                &lt;label class=\"form-label\"&gt;\u0e08\u0e33\u0e19\u0e27\u0e19\u0e40\u0e25\u0e48\u0e21&lt;\/label&gt;\n                &lt;input type=\"number\" class=\"form-control\" name=\"tbl_books_totol\" required&gt;\n            &lt;\/div&gt;\n        \n      &lt;\/div&gt;\n      &lt;div class=\"modal-footer\"&gt;\n        &lt;button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\"&gt;\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01&lt;\/button&gt;\n        &lt;input type=\"submit\" class=\"btn btn-success\" value=\"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\" name=\"btn_addbook\"&gt;\n        &lt;!-- form --&gt;\n        &lt;\/form&gt;\n        &lt;!-- form --&gt;\n      &lt;\/div&gt;\n    &lt;\/div&gt;\n  &lt;\/div&gt;\n&lt;\/div&gt;\n\n\n&lt;!-- Bootstrap JS --&gt;\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/js\/bootstrap.bundle.min.js\" integrity=\"sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn\/tWtIaxVXM\" crossorigin=\"anonymous\"&gt;&lt;\/script&gt;\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/@popperjs\/core@2.9.2\/dist\/umd\/popper.min.js\" integrity=\"sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p\" crossorigin=\"anonymous\"&gt;&lt;\/script&gt;\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/js\/bootstrap.min.js\" integrity=\"sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz\/bgldoEyl4H0zUF0QKbrJ0EcQF\" crossorigin=\"anonymous\"&gt;&lt;\/script&gt;\n\n&lt;script type=\"text\/javascript\"&gt;\n    window.onload = () =&gt; {\n      const myModal = new bootstrap.Modal('#onload');\n      myModal.show();\n    }\n&lt;\/script&gt;\n&lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"512\" height=\"256\" src=\"http:\/\/idc.utc.ac.th\/wp-content\/uploads\/2023\/01\/logo.png\" alt=\"\" class=\"wp-image-852\" srcset=\"http:\/\/idc.utc.ac.th\/wp-content\/uploads\/2023\/01\/logo.png 512w, http:\/\/idc.utc.ac.th\/wp-content\/uploads\/2023\/01\/logo-300x150.png 300w\" sizes=\"auto, (max-width: 512px) 100vw, 512px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update -y\nsudo apt install apt-transport-https ca-certificates curl software-properties-common\ncurl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -\nsudo add-apt-repository \"deb &#91;arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu focal stable\"\nsudo apt install docker-ce\napt-get update\nsudo apt-get install ca-certificates curl gnupg lsb-release\nsudo mkdir -p \/etc\/apt\/keyrings\ncurl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/etc\/apt\/keyrings\/docker.gpg\n\necho \\\n  \"deb &#91;arch=$(dpkg --print-architecture) signed-by=\/etc\/apt\/keyrings\/docker.gpg] https:\/\/download.docker.com\/linux\/ubuntu \\\n  $(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null\n\nsudo apt-get update\n\n\n**********\nsudo vi \/etc\/apt\/sources.list\n**********\n# deb cdrom:&#91;Kubuntu 20.04 LTS _Focal Fossa_ - Release amd64 (20200423)]\/ focal main multiverse restricted universe\n\n# See http:\/\/help.ubuntu.com\/community\/UpgradeNotes for how to upgrade to\n# newer versions of the distribution.\ndeb http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal main restricted\n# deb-src http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal main restricted\n\n## Major bug fix updates produced after the final release of the\n## distribution.\ndeb http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal-updates main restricted\n# deb-src http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal-updates main restricted\n\n## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu\n## team. Also, please note that software in universe WILL NOT receive any\n## review or updates from the Ubuntu security team.\ndeb http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal universe\n# deb-src http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal universe\ndeb http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal-updates universe\n# deb-src http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal-updates universe\n\n## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu \n## team, and may not be under a free licence. Please satisfy yourself as to \n## your rights to use the software. Also, please note that software in \n## multiverse WILL NOT receive any review or updates from the Ubuntu\n## security team.\ndeb http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal multiverse\n# deb-src http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal multiverse\ndeb http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal-updates multiverse\n# deb-src http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal-updates multiverse\n\n## N.B. software from this repository may not have been tested as\n## extensively as that contained in the main release, although it includes\n## newer versions of some applications which may provide useful features.\n## Also, please note that software in backports WILL NOT receive any review\n## or updates from the Ubuntu security team.\ndeb http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal-backports main restricted universe multiverse\n# deb-src http:\/\/us.archive.ubuntu.com\/ubuntu\/ focal-backports main restricted universe multiverse\n\n## Uncomment the following two lines to add software from Canonical's\n## 'partner' repository.\n## This software is not part of Ubuntu, but is offered by Canonical and the\n## respective vendors as a service to Ubuntu users.\n# deb http:\/\/archive.canonical.com\/ubuntu focal partner\n# deb-src http:\/\/archive.canonical.com\/ubuntu focal partner\n\ndeb http:\/\/security.ubuntu.com\/ubuntu focal-security main restricted\n# deb-src http:\/\/security.ubuntu.com\/ubuntu focal-security main restricted\ndeb http:\/\/security.ubuntu.com\/ubuntu focal-security universe\n# deb-src http:\/\/security.ubuntu.com\/ubuntu focal-security universe\ndeb http:\/\/security.ubuntu.com\/ubuntu focal-security multiverse\n# deb-src http:\/\/security.ubuntu.com\/ubuntu focal-security multiverse\n\n# This system was installed using small removable media\n# (e.g. netinst, live or single CD). The matching \"deb cdrom\"\n# entries were disabled at the end of the installation process.\n# For information about how to configure apt package sources,\n# see the sources.list(5) manual.\n# deb http:\/\/repo.kfocus.org\/ubuntu focal main\n# deb-src http:\/\/repo.kfocus.org\/ubuntu focal main\n\n***************\n\n\nsudo apt-get update\nsudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin\nsudo systemctl status docker\n\nmkdir vec-utc\ncd vec-utc\n\n\n\n\nvi index.html\n****************\n&lt;html&gt;\n&lt;head&gt;\n&lt;title&gt;UTC&lt;\/title&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n&lt;p&gt;Hello world! I'am &lt;a href=\"about.php\"&gt;UTC&lt;\/a&gt;&lt;\/p&gt;\n&lt;\/body&gt;\n&lt;\/html&gt; \n****************\n\n\n\n\n\n\nvi Dockerfile\n******************\nFrom httpd\nCOPY .\/ \/usr\/local\/apache2\/htdocs\/\n*****************\n\n\n## \u0e2a\u0e23\u0e49\u0e32\u0e07 Database (RDS)\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e2d\u0e32\u0e42\u0e04\u0e49\u0e14\u0e21\u0e32\u0e25\u0e07 \u0e43\u0e0a\u0e49 FTP \u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e42\u0e1f\u0e25 \/root\/vec-utc\nvi about.php\n\nsudo docker build -t vec-utc .\ndocker images\n\n\n## \u0e17\u0e33\u0e2b\u0e25\u0e31\u0e07\u0e2a\u0e23\u0e49\u0e32\u0e07 SWR\ndocker tag vec-utc:latest swr.ap-southeast-2.myhuaweicloud.com\/vec-utc1\/vec-utc1:v1\ndocker push swr.ap-southeast-2.myhuaweicloud.com\/vec-utc1\/vec-utc1:v1\n\n\n\n\n\n\nsudo apt install ca-certificates apt-transport-https software-properties-common\nsudo add-apt-repository ppa:ondrej\/php\nsudo apt update\nsudo apt install php8.1 -y\nsudo systemctl restart apache2\nsudo systemctl status apache2\n\n\n\u0e2a\u0e23\u0e49\u0e32\u0e07 VPC Peering \u0e02\u0e2d\u0e07 Docker \u0e01\u0e31\u0e1a Database<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\u0e42\u0e04\u0e49\u0e14\u0e40\u0e1b\u0e25\u0e48\u0e32 \u0e44\u0e21\u0e48\u0e40\u0e0a\u0e37\u0e48\u0e2d\u0e21\u0e10\u0e32\u0e19\u0e02\u0e49\u0e2d\u0e21\u0e39\u0e25\n&lt;!DOCTYPE html>\r\n&lt;html lang=\"en\">\r\n&lt;head>\r\n    &lt;meta charset=\"UTF-8\">\r\n    &lt;meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\r\n    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n    &lt;title>E-Book&lt;\/title>\r\n    &lt;!-- Bootstrap CSS -->\r\n    &lt;link href=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.3.0-alpha1\/dist\/css\/bootstrap.min.css\" rel=\"stylesheet\" integrity=\"sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3\/Jr59b6EGGoI1aFkw7cmDA6j6gD\" crossorigin=\"anonymous\">\r\n&lt;\/head>\r\n&lt;body>\r\n    \r\n\r\n\r\n\r\n&lt;div class=\"container\">\r\n    &lt;img src=\"logo.png\" width=\"250px\">\r\n    &lt;h2>ECS Docker&lt;\/h2>\r\n    &lt;hr>\r\n&lt;div class=\"modal fade\" id=\"onload\" tabindex=\"-1\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">\r\n&lt;div class=\"modal-dialog\">\r\n    &lt;div class=\"modal-content\">\r\n      &lt;div class=\"modal-header\">\r\n        &lt;h5 class=\"modal-title\" id=\"exampleModalLabel\">\u0e41\u0e01\u0e49\u0e44\u0e02\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/h5>\r\n        &lt;button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\">&lt;\/button>\r\n      &lt;\/div>\r\n      &lt;div class=\"modal-body\">\r\n        &lt;!-- form -->\r\n        &lt;form action=\"\" method=\"post\">\r\n            &lt;input type=\"hidden\" value=\"&lt;?php echo $id2; ?>\" name=\"id_edit\">\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e23\u0e2b\u0e31\u0e2a\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/label>\r\n                &lt;input type=\"number\" class=\"form-control\" name=\"tbl_books_id\" value=\"&lt;?php echo $row2&#91;\"tbl_books_id\"]; ?>\">\r\n            &lt;\/div>\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/label>\r\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_name\" value=\"&lt;?php echo $row2&#91;\"tbl_books_name\"]; ?>\">\r\n            &lt;\/div>\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19&lt;\/label>\r\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_namewrite\" value=\"&lt;?php echo $row2&#91;\"tbl_books_namewrite\"]; ?>\">\r\n            &lt;\/div>\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e33\u0e19\u0e31\u0e01\u0e1e\u0e34\u0e21\u0e1e\u0e4c&lt;\/label>\r\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_publisher\" value=\"&lt;?php echo $row2&#91;\"tbl_books_publisher\"]; ?>\">\r\n            &lt;\/div>\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e08\u0e33\u0e19\u0e27\u0e19\u0e40\u0e25\u0e48\u0e21&lt;\/label>\r\n                &lt;input type=\"number\" class=\"form-control\" name=\"tbl_books_totol\" value=\"&lt;?php echo $row2&#91;\"tbl_books_totol\"]; ?>\">\r\n            &lt;\/div>\r\n        \r\n      &lt;\/div>\r\n      &lt;div class=\"modal-footer\">\r\n        &lt;button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01&lt;\/button>\r\n        &lt;input type=\"submit\" class=\"btn btn-success\" value=\"\u0e41\u0e01\u0e49\u0e44\u0e02\" name=\"btn_edit_save\">\r\n        &lt;!-- form -->\r\n        &lt;\/form>\r\n        &lt;!-- form -->\r\n      &lt;\/div>\r\n    &lt;\/div>\r\n  &lt;\/div>\r\n&lt;\/div>\r\n    &lt;!-- Button trigger modal -->\r\n    &lt;button type=\"button\" class=\"btn btn-success\" data-bs-toggle=\"modal\" data-bs-target=\"#exampleModal\">\r\n    + \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\r\n    &lt;\/button>\r\n\r\n    &lt;table class=\"table mt-3\">\r\n        &lt;thead>\r\n            &lt;tr class=\"text-center\">\r\n                &lt;th scope=\"col\">\u0e23\u0e2b\u0e31\u0e2a\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/th>\r\n                &lt;th scope=\"col\">\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/th>\r\n                &lt;th scope=\"col\">\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19&lt;\/th>\r\n                &lt;th scope=\"col\">\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e33\u0e19\u0e31\u0e01\u0e1e\u0e34\u0e21\u0e1e\u0e4c&lt;\/th>\r\n                &lt;th scope=\"col\">\u0e08\u0e33\u0e19\u0e27\u0e19\u0e40\u0e25\u0e48\u0e21&lt;\/th>\r\n                &lt;th scope=\"col\">\u0e41\u0e01\u0e49\u0e44\u0e02&lt;\/th>\r\n                &lt;th scope=\"col\">\u0e25\u0e1a&lt;\/th>\r\n            &lt;\/tr>\r\n        &lt;\/thead>\r\n        &lt;tbody>\r\n            &lt;tr class=\"text-center\">\r\n                &lt;td>tbl_books_id&lt;\/td>\r\n                &lt;td>tbl_books_name&lt;\/td>\r\n                &lt;td>tbl_books_namewrite&lt;\/td>\r\n                &lt;td>tbl_books_publisher&lt;\/td>\r\n                &lt;td>tbl_books_totol&lt;\/td>\r\n                &lt;td>\r\n                    &lt;form action=\"\" method=\"post\">\r\n                        &lt;input type=\"hidden\" value=\"\" name=\"tbl_books_id_edit\">\r\n                        &lt;input type=\"submit\" class=\"btn btn-warning\" value=\"\u0e41\u0e01\u0e49\u0e44\u0e02\" name=\"btn_edit\">\r\n                    &lt;\/form>\r\n                &lt;\/td>\r\n                &lt;td>\r\n                    &lt;form action=\"\" method=\"post\">\r\n                        &lt;input type=\"hidden\" value=\"\" name=\"tbl_books_id_delete\">\r\n                        &lt;input type=\"submit\" class=\"btn btn-danger\" value=\"\u0e25\u0e1a\" name=\"btn_delete\" onclick=\"return confirm('\u0e22\u0e37\u0e19\u0e22\u0e31\u0e19\u0e01\u0e32\u0e23\u0e25\u0e1a');\">\r\n                    &lt;\/form>\r\n                &lt;\/td>\r\n            &lt;\/tr>\r\n        &lt;\/tbody>\r\n    &lt;\/table>\r\n    \r\n    \r\n\r\n&lt;\/div>\r\n\r\n\r\n\r\n\r\n\r\n&lt;!-- Modal -->\r\n&lt;div class=\"modal fade\" id=\"exampleModal\" tabindex=\"-1\" aria-labelledby=\"exampleModalLabel\" aria-hidden=\"true\">\r\n  &lt;div class=\"modal-dialog\">\r\n    &lt;div class=\"modal-content\">\r\n      &lt;div class=\"modal-header\">\r\n        &lt;h5 class=\"modal-title\" id=\"exampleModalLabel\">\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/h5>\r\n        &lt;button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\">&lt;\/button>\r\n      &lt;\/div>\r\n      &lt;div class=\"modal-body\">\r\n        &lt;!-- form -->\r\n        &lt;form action=\"\" method=\"post\">\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e23\u0e2b\u0e31\u0e2a\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/label>\r\n                &lt;input type=\"number\" class=\"form-control\" name=\"tbl_books_id\" required>\r\n            &lt;\/div>\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e0a\u0e37\u0e48\u0e2d\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d&lt;\/label>\r\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_name\" required>\r\n            &lt;\/div>\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e0a\u0e37\u0e48\u0e2d\u0e1c\u0e39\u0e49\u0e40\u0e02\u0e35\u0e22\u0e19&lt;\/label>\r\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_namewrite\" required>\r\n            &lt;\/div>\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e0a\u0e37\u0e48\u0e2d\u0e2a\u0e33\u0e19\u0e31\u0e01\u0e1e\u0e34\u0e21\u0e1e\u0e4c&lt;\/label>\r\n                &lt;input type=\"text\" class=\"form-control\" name=\"tbl_books_publisher\" required>\r\n            &lt;\/div>\r\n            &lt;div class=\"mb-3\">\r\n                &lt;label class=\"form-label\">\u0e08\u0e33\u0e19\u0e27\u0e19\u0e40\u0e25\u0e48\u0e21&lt;\/label>\r\n                &lt;input type=\"number\" class=\"form-control\" name=\"tbl_books_totol\" required>\r\n            &lt;\/div>\r\n        \r\n      &lt;\/div>\r\n      &lt;div class=\"modal-footer\">\r\n        &lt;button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">\u0e22\u0e01\u0e40\u0e25\u0e34\u0e01&lt;\/button>\r\n        &lt;input type=\"submit\" class=\"btn btn-success\" value=\"\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2b\u0e19\u0e31\u0e07\u0e2a\u0e37\u0e2d\" name=\"btn_addbook\">\r\n        &lt;!-- form -->\r\n        &lt;\/form>\r\n        &lt;!-- form -->\r\n      &lt;\/div>\r\n    &lt;\/div>\r\n  &lt;\/div>\r\n&lt;\/div>\r\n\r\n\r\n&lt;!-- Bootstrap JS -->\r\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/js\/bootstrap.bundle.min.js\" integrity=\"sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn\/tWtIaxVXM\" crossorigin=\"anonymous\">&lt;\/script>\r\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/@popperjs\/core@2.9.2\/dist\/umd\/popper.min.js\" integrity=\"sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p\" crossorigin=\"anonymous\">&lt;\/script>\r\n&lt;script src=\"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap@5.0.2\/dist\/js\/bootstrap.min.js\" integrity=\"sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz\/bgldoEyl4H0zUF0QKbrJ0EcQF\" crossorigin=\"anonymous\">&lt;\/script>\r\n\r\n&lt;\/body>\r\n&lt;\/html><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-851","post","type-post","status-publish","format-standard","hentry","category-document"],"_links":{"self":[{"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=\/wp\/v2\/posts\/851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=851"}],"version-history":[{"count":4,"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=\/wp\/v2\/posts\/851\/revisions"}],"predecessor-version":[{"id":856,"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=\/wp\/v2\/posts\/851\/revisions\/856"}],"wp:attachment":[{"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=851"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/idc.utc.ac.th\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}