diff --git a/changepost.php b/changepost.php new file mode 100644 index 0000000..91afcf8 --- /dev/null +++ b/changepost.php @@ -0,0 +1,37 @@ + \ No newline at end of file diff --git a/db-connector.php b/db-connector.php new file mode 100644 index 0000000..93eec7c --- /dev/null +++ b/db-connector.php @@ -0,0 +1,9 @@ + diff --git a/delete.php b/delete.php new file mode 100644 index 0000000..1b763cc --- /dev/null +++ b/delete.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/editpost.php b/editpost.php new file mode 100644 index 0000000..ff15308 --- /dev/null +++ b/editpost.php @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog | Ubah Post + + + + + +
+ + + +
+ + +

-

+ +
+
+

Tambah Post

+'; + echo '
'; + echo ''; + echo ''; + + echo ''; + echo ''; + + echo '
'; + echo ''; + + echo ''; + echo '
'; + echo '
'; +?> +
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/getAllPost.php b/getAllPost.php new file mode 100644 index 0000000..f4b0e86 --- /dev/null +++ b/getAllPost.php @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..b547397 --- /dev/null +++ b/index.php @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog + + + + + + +
+ + + +
+
+ '; + echo '
    '; + echo '
  • '; + echo '
    '; + echo '

    '; + echo $row['title']; + echo '

    '; + echo '
    '; + echo $row['date']; + echo '
    '; + echo '
    Featured
    '; + echo '
    '; + echo '

    '; + $cont = $row['content']; + if( strlen($cont)< 250){ + echo substr($cont, 0, 250); + } else { + echo substr($cont, 0, 250) . '...'; + + } + echo '

    '; + echo '

    '; + echo 'Edit | Hapus'; + echo '

    '; + echo '
  • '; + echo '
'; + echo ''; + } + ?> +
+
+ + + +
+ + + + + + + + + + + + \ No newline at end of file diff --git a/new_post.html b/new_post.html index fc4e18e..60531ba 100644 --- a/new_post.html +++ b/new_post.html @@ -1,3 +1,4 @@ + @@ -38,7 +39,7 @@
@@ -93,6 +94,7 @@

Tambah Post

+ @@ -107,5 +109,34 @@

Tambah Post

ga('create',ga_ua);ga('send','pageview'); + + \ No newline at end of file diff --git a/post.php b/post.php new file mode 100644 index 0000000..9f2c19c --- /dev/null +++ b/post.php @@ -0,0 +1,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Simple Blog | Apa itu Simple Blog? + + + + + +
+ + + +
+'; + echo '
'; + echo ''; + echo '

'; + $query_getPost = "SELECT * FROM post_content WHERE id=$iPost"; + $hasil_getPost = mysql_query($query_getPost, $db) or die(mysql_error()); + while ($data = mysql_fetch_assoc($hasil_getPost)){ + echo $data['title']; + } + echo '

'; + echo '

'; + echo '
'; + echo ''; + + echo '
'; + echo '
'; + echo '
'; + echo '

'; + $query_getPost = "SELECT * FROM post_content WHERE id=$iPost"; + $hasil_getPost = mysql_query($query_getPost, $db) or die(mysql_error()); + while ($data = mysql_fetch_assoc($hasil_getPost)){ + echo $data['content']; + } + echo '

'; + echo '
'; + + echo '

Komentar

'; + + echo '
'; + echo '
'; + echo ''; + echo ''; + + echo ''; + echo ''; + + echo '
'; + echo ''; + + echo ''; + echo '
'; + echo '
'; + + $query_getAll = "select * from post_comment WHERE post_id = $iPost ORDER BY comment_id DESC"; + $hasil_getAll = mysql_query($query_getAll,$db) or die(mysql_error()); + echo '
'; + while($row = mysql_fetch_array($hasil_getAll)) + { + echo ''; + } + echo '
'; + echo '
'; + echo '
'; +?> +
+ + + +
+ + + + + + + + + + + \ No newline at end of file diff --git a/savecomment.php b/savecomment.php new file mode 100644 index 0000000..17baa15 --- /dev/null +++ b/savecomment.php @@ -0,0 +1,45 @@ +'; + echo '
  • '; + echo '
    '; + echo '

    '; + // nama yang komen + echo $row['nama']; + echo '

    '; + echo '
    '; + // waktu komen + echo $row['tanggal']; + echo '
    '; + echo '
    '; + // isi komen + echo $row['komen']; + echo '
  • '; + echo ''; + } + +?> \ No newline at end of file diff --git a/update.php b/update.php new file mode 100644 index 0000000..6212cee --- /dev/null +++ b/update.php @@ -0,0 +1,21 @@ + \ No newline at end of file