diff -urN soojung-0.4.7/admin.php soojung/admin.php
--- soojung-0.4.7/admin.php	2005-03-11 22:03:46.000000000 +0900
+++ soojung/admin.php	2005-04-27 23:05:26.000000000 +0900
@@ -4,6 +4,15 @@
 include("config.php");
 include_once("settings.php");
 
+function category_in_array($categoryName, $categories) {
+  foreach ($categories as $c) {
+    if ($c->name == $categoryName) {
+      return true;
+    }
+  }
+  return false;
+}
+
 function config_update_mode() {
   if (empty($_POST["blogname"]) || empty($_POST["desc"]) ||
       empty($_POST["url"]) || empty($_POST["adminname"]) ||
@@ -76,7 +85,12 @@
   @unlink("contents/.referer");
 }
 
-if ($_POST["mode"] == "login") {
+function logout_mode() {
+  unset($_SESSION['auth']);
+  header("Location: admin.php");
+}
+
+if (array_key_exists("mode", $_POST) and $_POST["mode"] == "login") {
   if (md5($_POST["password"]) == $admin_password) {
     $_SESSION['auth'] = TRUE;
     header("Location: admin.php");
@@ -102,6 +116,8 @@
   clear_cache_mode();
 } else if ($_GET["mode"] == "clear_referer") {
   clear_referer_mode();
+} else if ($_GET["mode"] == "logout") {
+  logout_mode();
 }
 
 if ($_GET["mode"] == "config") {
@@ -125,13 +141,46 @@
   } else {
     $page = 1;
   }
+
+  $count = 0;
+  $categories = Category::getCategoryList();
+
+  if ($_GET["flag"] == "static") {
+    $count = Entry::getStaticEntryCount();
+  } else if (category_in_array($_GET["flag"], $categories)) {
+    $cate = new Category($_GET["flag"]);
+    $count = $cate->getEntryCount();
+  } else {
+    $count = Entry::getEntryCount(false);
+  }
+
   if ($page > 1) {
-    $template->assign('prev_page_link', "admin.php?mode=list&page=" . ($page - 1));
+    $prev_link = "admin.php?mode=list&page=" . ($page - 1);
+    if (isset($_GET["flag"])) {
+      $prev_link .= "&flag=" . $_GET["flag"];
+    }
+    $template->assign('prev_page_link', $prev_link);
   }
-  if (Entry::getEntryCount(false) > $page * 10) {
-    $template->assign('next_page_link', "admin.php?mode=list&page=" . ($page + 1));
+  if ($count > $page * 10) {
+    $next_link = "admin.php?mode=list&page=" . ($page + 1);
+    if (isset($_GET["flag"])) {
+      $next_link .= "&flag=" . $_GET["flag"];
+    }
+    $template->assign('next_page_link', $next_link);
   }
-  $template->assign('entries', Entry::getEntries(10, $page, false));
+
+
+  if ($_GET["flag"] == "static") {
+    $template->assign('entries', Entry::getStaticEntries(10, $page));
+  } else if (category_in_array($_GET["flag"], $categories)) {
+    $cate = new Category($_GET["flag"]);
+    $template->assign('entries', $cate->getEntries(10, $page));
+  } else {
+    $template->assign('entries', Entry::getEntries(10, $page, false));
+  }
+
+  $template->assign("categories", $categories);
+  $template->assign("flag", $_GET["flag"]);
   $template->display('list.tpl');
 } else {
   $template->assign('recent_entries', Entry::getRecentEntries(5, false));
diff -urN soojung-0.4.7/classes/Bookmark.class.php soojung/classes/Bookmark.class.php
--- soojung-0.4.7/classes/Bookmark.class.php	2005-03-01 02:01:20.000000000 +0900
+++ soojung/classes/Bookmark.class.php	2005-04-08 23:32:48.000000000 +0900
@@ -125,8 +125,8 @@
    * read $bookmarks from file
    */
   function getBookmarkList() {
+    $bookmarks = array();
     if (is_file("contents/.bookmark")) {
-      $bookmarks = array();
       if (!file_exists("contents/.bookmark")) {
 	return $bookmarks;
       }
diff -urN soojung-0.4.7/classes/Category.class.php soojung/classes/Category.class.php
--- soojung-0.4.7/classes/Category.class.php	2005-02-12 22:53:01.000000000 +0900
+++ soojung/classes/Category.class.php	2005-04-27 23:05:28.000000000 +0900
@@ -27,13 +27,21 @@
     return $blog_baseurl . "/rss2.php?category=" . $this->name;
   }
 
-  function getEntries() {
+  function getEntries($count = -1, $page = 1) {
     $entries = array();
     $query = "^[0-9].+_" . str_replace("+", "\\+", $this->getHashID()) . "_.+[.]entry$";
     $filenames = Soojung::queryFilenameMatch($query);
     usort($filenames, "cmp_base_filename");
-    foreach($filenames as $filename) {
-      $entries[] = new Entry($filename);
+
+    if ($count == -1) { //all
+      foreach($filenames as $filename) {
+	$entries[] = new Entry($filename);
+      }
+    } else {
+      $index = ($page - 1) * $count;
+      for ($i = $index; $i < count($filenames) && $i < ($index + $count); $i++) {
+	$entries[] = new Entry($filenames[$i]);
+      }
     }
     return $entries;
   }
diff -urN soojung-0.4.7/classes/Entry.class.php soojung/classes/Entry.class.php
--- soojung-0.4.7/classes/Entry.class.php	2005-03-21 01:46:13.000000000 +0900
+++ soojung/classes/Entry.class.php	2005-04-27 23:05:28.000000000 +0900
@@ -232,17 +232,30 @@
   /**
    * static method
    */
-  function getStaticEntries() {
+  function getStaticEntries($count = -1, $page = 1) {
     $entries = array();
     $query = "^[0-9].+S_.+[.]entry$";
     $filenames = Soojung::queryFilenameMatch($query);
     usort($filenames, "cmp_base_filename");
-    foreach($filenames as $filename) {
-      $entries[] = new Entry($filename);
+
+    if ($count == -1) { //all
+      foreach($filenames as $filename) {
+	$entries[] = new Entry($filename);
+      }
+    } else {
+      $index = ($page - 1) * $count;
+      for ($i = $index; $i < count($filenames) && $i < ($index + $count); $i++) {
+	$entries[] = new Entry($filenames[$i]);
+      }
     }
+
     return $entries;
   }
 
+  function getStaticEntryCount() {
+    return Soojung::queryNumFilenameMatch("^[0-9].+S_.+[.]entry$");
+  }
+
   /**
    * static method
    */
diff -urN soojung-0.4.7/post.php soojung/post.php
--- soojung-0.4.7/post.php	2005-03-11 23:19:19.000000000 +0900
+++ soojung/post.php	2005-04-19 22:20:58.000000000 +0900
@@ -101,8 +101,8 @@
   $title = $_POST["title"];
   $format = $_POST["format"];
   $formatter = Soojung::getFormatter($format);
+  $preview_body = $formatter->toHtml($_POST["body"]);
   $body = $formatter->onPost($_POST["body"]);
-  $body = nl2br($body);
   $date = strtotime($_POST["date"]);
   if (empty($_POST["category_input"]) == false) {
     $category = trim($_POST["category_input"]);
@@ -132,6 +132,9 @@
 $template = new AdminTemplate;
 
 $template->assign("title", $title);
+if (isset($preview_body)) {
+$template->assign("preview", $preview_body);
+}
 $template->assign("body", $body);
 $template->assign("date", date('Y-m-d H:i:s', isset($date) ? $date : time()+10));
 $template->assign("category", $category);
diff -urN soojung-0.4.7/settings.php soojung/settings.php
--- soojung-0.4.7/settings.php	2005-03-31 20:39:16.000000000 +0900
+++ soojung/settings.php	2005-04-27 21:50:50.000000000 +0900
@@ -1,6 +1,6 @@
 <?php
 
-$soojung_version = '0.4.7';
+$soojung_version = '0.4.8';
 setlocale(LC_TIME, "C");
 
 header("Content-type: text/html; charset=utf-8");
diff -urN soojung-0.4.7/templates/admin/data.tpl soojung/templates/admin/data.tpl
--- soojung-0.4.7/templates/admin/data.tpl	2005-02-19 10:12:31.000000000 +0900
+++ soojung/templates/admin/data.tpl	2005-04-19 21:46:19.000000000 +0900
@@ -30,6 +30,7 @@
 <option value="import_tt">Tattertools</option>
 <option value="import_b2">B2</option>
 <option value="import_zb">Zeroboard (or ZOG)</option>
+<option value="import_moniwiki">Moniwiki</option>
 </select>
 </p>
 
@@ -83,4 +84,13 @@
 </form>
 
 </div>
-{include file="footer.tpl"}
+
+<form action="{$baseurl}/admin.php" method="post" id="import_moniwiki" class="hide">
+<h4>Moniwiki</h4>
+Moniwiki Path: <input type="text" name="wiki_path" /><br />
+Encoding: <input type="text" name="encoding" /><br />
+<input type="hidden" name="mode" value="import_moniwiki" />
+<input type="submit" value="import!" />
+</form>
+
+{include file="footer.tpl"}
\ No newline at end of file
diff -urN soojung-0.4.7/templates/admin/javascript.js soojung/templates/admin/javascript.js
--- soojung-0.4.7/templates/admin/javascript.js	2005-02-19 10:12:31.000000000 +0900
+++ soojung/templates/admin/javascript.js	2005-04-27 23:05:30.000000000 +0900
@@ -26,3 +26,6 @@
 	return false;
 }
 
+function changeCategory($category) {
+	location.href = "admin.php?mode=list&flag=" + $category.value;
+}
\ No newline at end of file
diff -urN soojung-0.4.7/templates/admin/list.tpl soojung/templates/admin/list.tpl
--- soojung-0.4.7/templates/admin/list.tpl	2005-03-28 10:45:58.000000000 +0900
+++ soojung/templates/admin/list.tpl	2005-04-27 23:05:30.000000000 +0900
@@ -3,6 +3,18 @@
 
 <div id="list">
 
+<div class="submenu">
+<a href="{$baseurl}/admin.php?mode=list">show all</a> -
+<a href="{$baseurl}/admin.php?mode=list&flag=static">show only static</a> -
+show only 
+<select name="category" onchange="return changeCategory(this)">
+{foreach name=categories from=$categories item=cate}
+	<option value="{$cate->name}" {if $flag == $cate->name}selected{/if}>{$cate->name}
+{/foreach}
+</select>
+category
+</div>
+
 <p class="navbar">
 {if $prev_page_link != ""}
 	<a href="{$prev_page_link|escape}">&laquo; prev</a>
diff -urN soojung-0.4.7/templates/admin/menu.tpl soojung/templates/admin/menu.tpl
--- soojung-0.4.7/templates/admin/menu.tpl	2005-01-25 22:14:36.000000000 +0900
+++ soojung/templates/admin/menu.tpl	2005-04-27 21:50:50.000000000 +0900
@@ -32,4 +32,7 @@
 <a href="{$baseurl}/uninstall.php" onClick="return confirm('Are you sure want to uninstall soojung?')">UnInstall</a>
 </div>
 
-</div>
\ No newline at end of file
+<div class="menu_item">
+<a href="{$baseurl}/admin.php?mode=logout">Logout</a>
+</div>
+</div>
diff -urN soojung-0.4.7/templates/admin/post.tpl soojung/templates/admin/post.tpl
--- soojung-0.4.7/templates/admin/post.tpl	2005-03-23 09:23:46.000000000 +0900
+++ soojung/templates/admin/post.tpl	2005-04-19 22:20:58.000000000 +0900
@@ -1,16 +1,17 @@
 {include file="header.tpl"}
 {include file="menu.tpl"}
 
+<div id="post">
+
 {if $mode == "preview"}
 <h1>preview</h1>
 <h2>{$title}</h2>
-{$body}
+{$preview}
 <br />
 {$category}, {$date}
 <hr />
 {/if}
 
-<div id="post">
 <form action="{$baseurl}/post.php" method="post" name="postForm">
 <div class="row">
 <span class="label">Title:</span>
diff -urN soojung-0.4.7/templates/admin/styles.css soojung/templates/admin/styles.css
--- soojung-0.4.7/templates/admin/styles.css	2005-03-28 10:45:58.000000000 +0900
+++ soojung/templates/admin/styles.css	2005-04-27 22:33:43.000000000 +0900
@@ -106,6 +106,11 @@
   text-align: center;
 }
 
+#list .submenu
+{ 
+  text-align: right;
+}
+
 .entries
 {
   margin-left: 10px;
diff -urN soojung-0.4.7/templates/box/skin.css soojung/templates/box/skin.css
--- soojung-0.4.7/templates/box/skin.css	2005-03-11 23:16:42.000000000 +0900
+++ soojung/templates/box/skin.css	2005-04-19 21:55:21.000000000 +0900
@@ -42,6 +42,8 @@
 	margin-bottom: 10px;	
 }
 .entrybody{
+        font-weight: normal;
+        font-size: 9pt;
 }
 
 .entrydate {
diff -urN soojung-0.4.7/templates/seaside/header.tpl soojung/templates/seaside/header.tpl
--- soojung-0.4.7/templates/seaside/header.tpl	2005-02-24 23:16:00.000000000 +0900
+++ soojung/templates/seaside/header.tpl	2005-04-01 07:31:27.000000000 +0900
@@ -10,4 +10,5 @@
 <body onload="return correct_bbcode_image();">
 	<div id="header">
 		<h1>{$title}</h1>
+		<p id="desc">{$description}</p>
 	</div>
diff -urN soojung-0.4.7/templates/seaside/styles.css soojung/templates/seaside/styles.css
--- soojung-0.4.7/templates/seaside/styles.css	2005-02-19 08:18:45.000000000 +0900
+++ soojung/templates/seaside/styles.css	2005-04-01 07:31:27.000000000 +0900
@@ -13,14 +13,20 @@
 }
 #header {
 	background-color: #48f;
-	height: 50px;
+	height: 70px;
+}
+#desc {
+	color: #fff;
+	font-size: 0.8em;
+	margin: 0;
+	padding: 0em 1em 1em 1em;
 }
 h1 {
 	margin: 0;
 	color: #fff;
 	font-size: 1.5em;
 	font-weight: normal;
-	padding: 0.5em;
+	padding: 0.5em 0.5em 0em 0.5em;
 }
 h1.legend {
 	font-size: 1.4em;
@@ -35,7 +41,7 @@
 	border-left: 1px solid #ccc;
 	width: 180px;
 	position: absolute;
-	top: 50px;
+	top: 70px;
 	right: 0;
 	padding: 0.5em 1em;
 }
@@ -126,10 +132,6 @@
 	font-size: 0.8em;
 	text-align: center;
 }
-img {
-	border: 2px solid #4d4d4d;
-	margin: 1em 0;
-}
 #calendar table {
 	margin: auto;
-}
\ No newline at end of file
+}
diff -urN soojung-0.4.7/templates/simple/footer.tpl soojung/templates/simple/footer.tpl
--- soojung-0.4.7/templates/simple/footer.tpl	2005-03-01 02:01:21.000000000 +0900
+++ soojung/templates/simple/footer.tpl	2005-04-19 21:55:22.000000000 +0900
@@ -11,9 +11,9 @@
 </ul>
 
 <h3><a href="#none" onclick="return fold_sidebar('div_calendar');">Calendar</a></h3>
-<div id="div_calendar">
+<ul id="div_calendar">
 	<li>{$calendar->getCalendar()}</li>
-</div>
+</ul>
 
 <h3><a href="#none" onclick="return fold_sidebar('div_category');">Categories</a></h3>
 <ul id="div_category">
diff -urN soojung-0.4.7/templates/simple/header.tpl soojung/templates/simple/header.tpl
--- soojung-0.4.7/templates/simple/header.tpl	2005-02-24 23:16:00.000000000 +0900
+++ soojung/templates/simple/header.tpl	2005-04-19 21:55:22.000000000 +0900
@@ -6,6 +6,8 @@
 <link rel="stylesheet" type="text/css" href="{$baseurl}/templates/{$skin}/styles.css" />
 <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{$baseurl}/rss2.php" />
 <script type="text/javascript" src="{$baseurl}/libs/common.js"></script>
+</head>
+
 <body onload="return correct_bbcode_image();">
 <div id="header"><a href="{$baseurl}" title="{$description}">{$title}</a></div>
 <div id="content">
