From e28f53ed30f8878b1a48a52498c5152601e5b580 Mon Sep 17 00:00:00 2001 From: erwin9 Date: Wed, 15 Oct 2014 02:27:37 +0700 Subject: [PATCH 1/6] List Post, Add Post, Edit Post --- index.html | 114 ------------------------- index.php | 155 ++++++++++++++++++++++++++++++++++ new_post.html => new_post.php | 19 ++++- post.html => post.php | 0 test.txt | 14 +++ 5 files changed, 184 insertions(+), 118 deletions(-) delete mode 100644 index.html create mode 100644 index.php rename new_post.html => new_post.php (85%) rename post.html => post.php (100%) create mode 100644 test.txt diff --git a/index.html b/index.html deleted file mode 100644 index 07cff0b..0000000 --- a/index.html +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Simple Blog - - - - - -
- - - -
-
- -
-
- - - -
- - - - - - - - \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..0db6828 --- /dev/null +++ b/index.php @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog + + + + + +
+ + + +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/new_post.html b/new_post.php similarity index 85% rename from new_post.html rename to new_post.php index fc4e18e..8f6bf79 100644 --- a/new_post.html +++ b/new_post.php @@ -54,15 +54,26 @@

-

Tambah Post

-
+ - + + - + + +
- + + +
diff --git a/post.html b/post.php similarity index 100% rename from post.html rename to post.php diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..3cb7ac9 --- /dev/null +++ b/test.txt @@ -0,0 +1,14 @@ +Judul1 +Tanggal1 +Konten1 +KomentarNama1 +KomentarEmail1 +KomentarTanggal1 +KomentarIsi1 +Judul2 +Tanggal2 +Konten2 +KomentarNama2 +KomentarEmai2 +KomentarTanggal2 +KomentarIsi2 \ No newline at end of file From 49b7f032561121f27bee4b50c1e30b4324bfa1dc Mon Sep 17 00:00:00 2001 From: erwin9 Date: Wed, 15 Oct 2014 06:07:03 +0700 Subject: [PATCH 2/6] Edit Post Delete Post --- edit_post.php | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++ index.php | 91 +++++++++++++++++++++++++----------- new_post.php | 2 +- newfile.txt | 21 +++++++++ 4 files changed, 211 insertions(+), 28 deletions(-) create mode 100644 edit_post.php create mode 100644 newfile.txt diff --git a/edit_post.php b/edit_post.php new file mode 100644 index 0000000..d169fef --- /dev/null +++ b/edit_post.php @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog | Tambah Post + + + + + +
+ + + +
+ + +

-

+ +
+
+

Tambah Post

+ +
+
+ + + "> + + + + + "> + + + +
+ + "> + + + + +
+
+
+
+ +
+ + + +
+ + + + + + + + \ No newline at end of file diff --git a/index.php b/index.php index 0db6828..c2bee21 100644 --- a/index.php +++ b/index.php @@ -58,21 +58,40 @@ - + + - + + +

-

- - - - | Hapus + + + + + +
+ +
+ +

@@ -134,8 +161,18 @@ function getKomentarIsi(a){

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

- Edit | Hapus -

+
+ + + + +
+ +
+ + +
+

diff --git a/new_post.php b/new_post.php index 8f6bf79..4ac20f5 100644 --- a/new_post.php +++ b/new_post.php @@ -72,7 +72,7 @@ - + diff --git a/newfile.txt b/newfile.txt new file mode 100644 index 0000000..47bdd48 --- /dev/null +++ b/newfile.txt @@ -0,0 +1,21 @@ +Judul1 +Tanggal1 +Konten1 +KomentarNama1 +KomentarEmail1 +KomentarTanggal1 +KomentarIsi1 +Judul3 +Tanggal3 +Konten3 +KomentarNama3 +KomentarEmail13 +KomentarTanggal3 +KomentarIsi3 +Judul4 +Tanggal4 +Konten4 +KomentarNama4 +KomentarEmail14 +KomentarTanggal4 +KomentarIsi4 \ No newline at end of file From 4df247146738b716fe0c7d32d9dc4400bcf1cbeb Mon Sep 17 00:00:00 2001 From: erwin9 Date: Wed, 15 Oct 2014 06:08:06 +0700 Subject: [PATCH 3/6] remove test --- test.txt | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index 3cb7ac9..0000000 --- a/test.txt +++ /dev/null @@ -1,14 +0,0 @@ -Judul1 -Tanggal1 -Konten1 -KomentarNama1 -KomentarEmail1 -KomentarTanggal1 -KomentarIsi1 -Judul2 -Tanggal2 -Konten2 -KomentarNama2 -KomentarEmai2 -KomentarTanggal2 -KomentarIsi2 \ No newline at end of file From 8dfd0a0330c7dab4bf3f7c6e296d26a8e4489121 Mon Sep 17 00:00:00 2001 From: erwin9 Date: Wed, 15 Oct 2014 06:37:01 +0700 Subject: [PATCH 4/6] komentar --- index.php | 23 +++++++++++++-- post.php => komentar.php | 64 +++++++++++++--------------------------- newfile.txt | 7 +++++ 3 files changed, 48 insertions(+), 46 deletions(-) rename post.php => komentar.php (51%) diff --git a/index.php b/index.php index c2bee21..86cbb1f 100644 --- a/index.php +++ b/index.php @@ -88,6 +88,13 @@ array_splice($lines,$idxchange,7); } + if(isset($_POST["komentarK"])){ + $idxchange = $_POST["idxK"]; + $lines[$idxchange] = $_POST["namaK"]; + $lines[$idxchange+1] = $_POST["emailK"]; + $lines[$idxchange+3] = $_POST["komentarK"]; + } + $js_array = json_encode($lines); echo "var array_data = ". $js_array . ";\n"; ?> @@ -149,7 +156,13 @@ function returnArray(a){
- + +
+ + +
+ +

@@ -170,8 +183,14 @@ function returnArray(a){
- + +
+ +
+ +
+

diff --git a/post.php b/komentar.php similarity index 51% rename from post.php rename to komentar.php index c0b6f9e..14269b9 100644 --- a/post.php +++ b/komentar.php @@ -29,7 +29,7 @@ -Simple Blog | Apa itu Simple Blog? +Simple Blog | Tambah Post @@ -46,56 +46,32 @@
-
-
- -

Apa itu Simple Blog?

-

-
-
+ +

-

-
-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Blanditiis aliquam minus consequuntur amet nulla eius, neque beatae, nostrum possimus, officiis eaque consectetur. Sequi sunt maiores dolore, illum quidem eos explicabo! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Magnam consequuntur consequatur molestiae saepe sed, incidunt sunt inventore minima voluptatum adipisci hic, est ipsa iste. Nobis, aperiam provident quae. Reprehenderit, iste.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Asperiores animi tenetur nam delectus eveniet iste non culpa laborum provident minima numquam excepturi rem commodi, officia accusamus eos voluptates obcaecati. Possimus?

- -
- -

Komentar

+

Tambah Komentar

-
- - - - - - -
- - - + + + + + + + + + + + + + +
- -
    -
  • -
    -

    Jems

    -
    2 menit lalu
    -
    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

    -
  • - -
  • -
    -

    Kave

    -
    1 jam lalu
    -
    -

    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Perferendis repudiandae quae natus quos alias eos repellendus a obcaecati cupiditate similique quibusdam, atque omnis illum, minus ex dolorem facilis tempora deserunt! …

    -
  • -
diff --git a/newfile.txt b/newfile.txt index 47bdd48..6aa6aed 100644 --- a/newfile.txt +++ b/newfile.txt @@ -5,6 +5,13 @@ KomentarNama1 KomentarEmail1 KomentarTanggal1 KomentarIsi1 +Judul2 +Tanggal2 +Konten2 +KomentarNama2 +KomentarEmail12 +KomentarTanggal2 +KomentarIsi2 Judul3 Tanggal3 Konten3 From 2f5d6725160ecfb7ab7eb94f33c7e2dd5093db67 Mon Sep 17 00:00:00 2001 From: erwin9 Date: Wed, 15 Oct 2014 06:45:29 +0700 Subject: [PATCH 5/6] validasi email --- komentar.php | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/komentar.php b/komentar.php index 14269b9..7c56178 100644 --- a/komentar.php +++ b/komentar.php @@ -54,11 +54,11 @@

Tambah Komentar

-
+ - + @@ -112,5 +112,16 @@ function(){(g[s].q=g[s].q||[]).push(arguments)});g[s].s=+new Date; ga('create',ga_ua);ga('send','pageview'); + \ No newline at end of file From bfce525be2a5ac6038e181d5ae2faff0245f46c2 Mon Sep 17 00:00:00 2001 From: erwin9 Date: Wed, 15 Oct 2014 06:55:34 +0700 Subject: [PATCH 6/6] view --- index.php | 13 ++++++ view.php | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 view.php diff --git a/index.php b/index.php index 86cbb1f..1a074ba 100644 --- a/index.php +++ b/index.php @@ -164,6 +164,13 @@ function returnArray(a){ + +
+ + + + +

@@ -190,6 +197,12 @@ function returnArray(a){ +
+ + + + +

diff --git a/view.php b/view.php new file mode 100644 index 0000000..356df57 --- /dev/null +++ b/view.php @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog | Tambah Post + + + + + +
+ + + +
+ + +

-

+ +
+
+

View Post

+ +
+
+ + + "> + + + + + "> + + + +
+ + "> + + + + +
+
+
+
+ +
+ + + +
+ + + + + + + + \ No newline at end of file