changeset 48:ca00c4a85b98

small changes.
author pyon@macmini
date Wed, 22 Apr 2020 19:00:50 +0900
parents 169936fed61b
children 8384ca56f1b4
files src/kaigo/horori/horori.fbp src/kaigo/horori/mover/src/mover.cpp src/kaigo/horori/searcher/include/searcher.h src/kaigo/horori/searcher/server/searcher.go src/kaigo/horori/searcher/src/searcher.cpp src/kaigo/horori/searcher/src/utils.cpp
diffstat 6 files changed, 452 insertions(+), 132 deletions(-) [+]
line wrap: on
line diff
--- a/src/kaigo/horori/horori.fbp	Tue Apr 21 22:43:55 2020 +0900
+++ b/src/kaigo/horori/horori.fbp	Wed Apr 22 19:00:50 2020 +0900
@@ -3103,7 +3103,7 @@
                 </object>
             </object>
         </object>
-        <object class="Frame" expanded="0">
+        <object class="Frame" expanded="1">
             <property name="aui_managed">0</property>
             <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
             <property name="bg">217,217,217</property>
@@ -3131,7 +3131,7 @@
             <property name="window_style">wxTAB_TRAVERSAL</property>
             <property name="xrc_skip_sizer">1</property>
             <event name="OnClose">OnClose</event>
-            <object class="wxGridBagSizer" expanded="0">
+            <object class="wxGridBagSizer" expanded="1">
                 <property name="empty_cell_size"></property>
                 <property name="flexible_direction">wxBOTH</property>
                 <property name="growablecols"></property>
@@ -3142,14 +3142,14 @@
                 <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
                 <property name="permission">none</property>
                 <property name="vgap">0</property>
-                <object class="gbsizeritem" expanded="0">
+                <object class="gbsizeritem" expanded="1">
                     <property name="border">5</property>
                     <property name="colspan">1</property>
                     <property name="column">0</property>
                     <property name="flag">wxEXPAND | wxALL</property>
                     <property name="row">0</property>
                     <property name="rowspan">11</property>
-                    <object class="wxNotebook" expanded="0">
+                    <object class="wxNotebook" expanded="1">
                         <property name="BottomDockable">1</property>
                         <property name="LeftDockable">1</property>
                         <property name="RightDockable">1</property>
@@ -3501,7 +3501,7 @@
                         <object class="notebookpage" expanded="0">
                             <property name="bitmap"></property>
                             <property name="label">バッチ印刷</property>
-                            <property name="select">1</property>
+                            <property name="select">0</property>
                             <object class="wxPanel" expanded="0">
                                 <property name="BottomDockable">1</property>
                                 <property name="LeftDockable">1</property>
@@ -3821,11 +3821,11 @@
                                 </object>
                             </object>
                         </object>
-                        <object class="notebookpage" expanded="0">
+                        <object class="notebookpage" expanded="1">
                             <property name="bitmap"></property>
                             <property name="label">メンテナンス</property>
-                            <property name="select">0</property>
-                            <object class="wxPanel" expanded="0">
+                            <property name="select">1</property>
+                            <object class="wxPanel" expanded="1">
                                 <property name="BottomDockable">1</property>
                                 <property name="LeftDockable">1</property>
                                 <property name="RightDockable">1</property>
@@ -3876,7 +3876,7 @@
                                 <property name="window_extra_style"></property>
                                 <property name="window_name"></property>
                                 <property name="window_style">wxTAB_TRAVERSAL</property>
-                                <object class="wxBoxSizer" expanded="0">
+                                <object class="wxBoxSizer" expanded="1">
                                     <property name="minimum_size"></property>
                                     <property name="name">bSizerMainte</property>
                                     <property name="orient">wxVERTICAL</property>
@@ -3942,11 +3942,11 @@
                                             <property name="wrap">-1</property>
                                         </object>
                                     </object>
-                                    <object class="sizeritem" expanded="0">
+                                    <object class="sizeritem" expanded="1">
                                         <property name="border">15</property>
                                         <property name="flag">wxEXPAND|wxLEFT</property>
                                         <property name="proportion">0</property>
-                                        <object class="wxFlexGridSizer" expanded="0">
+                                        <object class="wxFlexGridSizer" expanded="1">
                                             <property name="cols">5</property>
                                             <property name="flexible_direction">wxBOTH</property>
                                             <property name="growablecols"></property>
@@ -4525,6 +4525,7 @@
                                                     <property name="window_extra_style"></property>
                                                     <property name="window_name"></property>
                                                     <property name="window_style"></property>
+                                                    <event name="OnDataViewListCtrlItemActivated">OnIdxDClick</event>
                                                     <object class="dataViewListColumn" expanded="0">
                                                         <property name="align">wxALIGN_RIGHT</property>
                                                         <property name="ellipsize"></property>
@@ -5457,6 +5458,73 @@
                                                     <event name="OnButtonClick">OnUploadImage</event>
                                                 </object>
                                             </object>
+                                            <object class="gbsizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="colspan">1</property>
+                                                <property name="column">3</property>
+                                                <property name="flag">wxALL</property>
+                                                <property name="row">1</property>
+                                                <property name="rowspan">1</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg">wxSYS_COLOUR_MENU</property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_textCtrlLastIndex</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass">; ; forward_declare</property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                </object>
+                                            </object>
                                         </object>
                                     </object>
                                 </object>
@@ -5830,70 +5898,17 @@
                         </object>
                     </object>
                 </object>
-                <object class="gbsizeritem" expanded="0">
+                <object class="gbsizeritem" expanded="1">
                     <property name="border">5</property>
-                    <property name="colspan">2</property>
+                    <property name="colspan">1</property>
                     <property name="column">1</property>
-                    <property name="flag">wxALL</property>
-                    <property name="row">6</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="row">4</property>
                     <property name="rowspan">1</property>
-                    <object class="wxListBox" expanded="0">
-                        <property name="BottomDockable">1</property>
-                        <property name="LeftDockable">1</property>
-                        <property name="RightDockable">1</property>
-                        <property name="TopDockable">1</property>
-                        <property name="aui_layer"></property>
-                        <property name="aui_name"></property>
-                        <property name="aui_position"></property>
-                        <property name="aui_row"></property>
-                        <property name="best_size"></property>
-                        <property name="bg"></property>
-                        <property name="caption"></property>
-                        <property name="caption_visible">1</property>
-                        <property name="center_pane">0</property>
-                        <property name="choices"></property>
-                        <property name="close_button">1</property>
-                        <property name="context_help"></property>
-                        <property name="context_menu">1</property>
-                        <property name="default_pane">0</property>
-                        <property name="dock">Dock</property>
-                        <property name="dock_fixed">0</property>
-                        <property name="docking">Left</property>
-                        <property name="enabled">1</property>
-                        <property name="fg"></property>
-                        <property name="floatable">1</property>
-                        <property name="font"></property>
-                        <property name="gripper">0</property>
-                        <property name="hidden">0</property>
-                        <property name="id">wxID_ANY</property>
-                        <property name="max_size"></property>
-                        <property name="maximize_button">0</property>
-                        <property name="maximum_size"></property>
-                        <property name="min_size"></property>
-                        <property name="minimize_button">0</property>
-                        <property name="minimum_size"></property>
-                        <property name="moveable">1</property>
-                        <property name="name">m_listBox2</property>
-                        <property name="pane_border">1</property>
-                        <property name="pane_position"></property>
-                        <property name="pane_size"></property>
+                    <object class="spacer" expanded="1">
+                        <property name="height">220</property>
                         <property name="permission">protected</property>
-                        <property name="pin_button">1</property>
-                        <property name="pos"></property>
-                        <property name="resize">Resizable</property>
-                        <property name="show">1</property>
-                        <property name="size">-1,100</property>
-                        <property name="style">wxLB_MULTIPLE</property>
-                        <property name="subclass">; ; forward_declare</property>
-                        <property name="toolbar_pane">0</property>
-                        <property name="tooltip"></property>
-                        <property name="validator_data_type"></property>
-                        <property name="validator_style">wxFILTER_NONE</property>
-                        <property name="validator_type">wxDefaultValidator</property>
-                        <property name="validator_variable"></property>
-                        <property name="window_extra_style"></property>
-                        <property name="window_name"></property>
-                        <property name="window_style"></property>
+                        <property name="width">0</property>
                     </object>
                 </object>
                 <object class="gbsizeritem" expanded="0">
@@ -5901,7 +5916,7 @@
                     <property name="colspan">1</property>
                     <property name="column">1</property>
                     <property name="flag">wxALL</property>
-                    <property name="row">7</property>
+                    <property name="row">5</property>
                     <property name="rowspan">1</property>
                     <object class="wxCheckBox" expanded="0">
                         <property name="BottomDockable">1</property>
@@ -5966,9 +5981,76 @@
                 <object class="gbsizeritem" expanded="0">
                     <property name="border">5</property>
                     <property name="colspan">1</property>
+                    <property name="column">2</property>
+                    <property name="flag">wxALL</property>
+                    <property name="row">5</property>
+                    <property name="rowspan">1</property>
+                    <object class="wxCheckBox" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="checked">1</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">両面処理</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_checkBoxBoth</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass">; ; forward_declare</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                    </object>
+                </object>
+                <object class="gbsizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="colspan">1</property>
                     <property name="column">1</property>
                     <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
-                    <property name="row">8</property>
+                    <property name="row">6</property>
                     <property name="rowspan">1</property>
                     <object class="wxButton" expanded="0">
                         <property name="BottomDockable">1</property>
@@ -6044,7 +6126,7 @@
                     <property name="colspan">1</property>
                     <property name="column">2</property>
                     <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
-                    <property name="row">8</property>
+                    <property name="row">6</property>
                     <property name="rowspan">1</property>
                     <object class="wxSpinCtrl" expanded="0">
                         <property name="BottomDockable">1</property>
@@ -6108,8 +6190,75 @@
                     <property name="border">5</property>
                     <property name="colspan">2</property>
                     <property name="column">1</property>
+                    <property name="flag">wxALL</property>
+                    <property name="row">7</property>
+                    <property name="rowspan">1</property>
+                    <object class="wxGauge" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_gauge</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="range">100</property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style">wxGA_HORIZONTAL</property>
+                        <property name="subclass">; ; forward_declare</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="value">0</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                    </object>
+                </object>
+                <object class="gbsizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="colspan">2</property>
+                    <property name="column">1</property>
                     <property name="flag">wxALL|wxALIGN_BOTTOM</property>
-                    <property name="row">10</property>
+                    <property name="row">8</property>
                     <property name="rowspan">1</property>
                     <object class="wxTextCtrl" expanded="0">
                         <property name="BottomDockable">1</property>
--- a/src/kaigo/horori/mover/src/mover.cpp	Tue Apr 21 22:43:55 2020 +0900
+++ b/src/kaigo/horori/mover/src/mover.cpp	Wed Apr 22 19:00:50 2020 +0900
@@ -1,5 +1,5 @@
 // Filename   : mover.cpp
-// Last Change: 2020-04-21 火 17:03:11.
+// Last Change: 2020-04-22 水 08:39:38.
 //
 #include <wx/dir.h>
 #include <wx/textfile.h>
@@ -152,6 +152,11 @@
 
 	m_dirPicker->SetPath(work);
 
+	wxDateTime today = wxDateTime::Today();
+	wxDateTime sun = today.SetToNextWeekDay(wxDateTime::WeekDay::Sun);
+	wxDateTime thu = sun.SetToNextWeekDay(wxDateTime::WeekDay::Thu);
+	m_datePicker->SetValue(thu);
+
 	LoadDefaultImages();
 }
 
--- a/src/kaigo/horori/searcher/include/searcher.h	Tue Apr 21 22:43:55 2020 +0900
+++ b/src/kaigo/horori/searcher/include/searcher.h	Wed Apr 22 19:00:50 2020 +0900
@@ -1,5 +1,5 @@
 // Filename   : searcher.h
-// Last Change: 2020-04-21 火 09:23:17.
+// Last Change: 2020-04-22 水 16:26:06.
 //
 #pragma once
 
@@ -31,6 +31,7 @@
 #include <wx/choice.h>
 #include <wx/listbox.h>
 #include <wx/checkbox.h>
+#include <wx/gauge.h>
 #include <wx/scrolwin.h>
 #include <wx/gbsizer.h>
 
@@ -150,6 +151,7 @@
 		wxStaticText*     m_staticTextRegImg;
 		wxDatePickerCtrl* m_datePicker;
 		wxButton*         m_buttonRegImg;
+		wxTextCtrl*       m_textCtrlLastIndex;
 
 		// Right-Pane
 		wxSearchCtrl*       m_searchCtrl;
@@ -162,10 +164,11 @@
 		wxDataViewColumn*   m_dataViewListColumnAny2;	// -,   name, name
 		wxDataViewColumn*   m_dataViewListColumnAny3;	// -,   -,    addr
 		wxDataViewColumn*   m_dataViewListColumnAny4;	// -,   -,    hno
-		wxListBox*          m_listBox2;
 		wxCheckBox*         m_checkBoxMask;
+		wxCheckBox*         m_checkBoxBoth;
 		wxButton*           m_buttonPrint;
 		wxSpinCtrl*         m_spinCtrl;
+		wxGauge*            m_gauge;
 		wxTextCtrl*         m_textCtrlPasswd;
 
 		// Virtual event handlers, overide them in your derived class
@@ -175,11 +178,12 @@
 		virtual void OnRead(wxCommandEvent& event);
 		virtual void OnHist(wxCommandEvent& event);
 		virtual void OnSelectBatchListCtrlA(wxKeyEvent& event);
-		virtual void OnSelectBatchDClick(wxDataViewEvent& event);
+		virtual void OnSelectBatchDClicked(wxDataViewEvent& event);
 		virtual void OnSelectListAnyItem(wxDataViewEvent& event);
 		virtual void OnPrint(wxCommandEvent& event);
 		virtual void OnIdxYearChoice(wxCommandEvent& event);
 		virtual void OnIdxDateSelected(wxDataViewEvent& event);
+		virtual void OnIdxDClicked(wxDataViewEvent& event);
 		virtual void OnDrvYearChoice(wxCommandEvent& event);
 		virtual void OnDrvDateSelected(wxDataViewEvent& event);
 		virtual void OnDrvDateDClicked(wxDataViewEvent& event);
--- a/src/kaigo/horori/searcher/server/searcher.go	Tue Apr 21 22:43:55 2020 +0900
+++ b/src/kaigo/horori/searcher/server/searcher.go	Wed Apr 22 19:00:50 2020 +0900
@@ -1,10 +1,11 @@
  /*
-  Last Change: 2020-04-21 火 13:59:52.
+  Last Change: 2020-04-22 水 17:23:42.
  */
 
 package main
 
 import (
+	"bufio"
     "bytes"
     "compress/gzip"
 	"encoding/csv"
@@ -16,6 +17,7 @@
 	"net/http"
 	"os"
 	"path/filepath"
+	"sort"
 	"strconv"
 	"strings"
 )
@@ -48,7 +50,8 @@
 	server string
 	port string
 	hhsdb string
-	img_root string
+	indexdb string
+	server_root string
     hhash map[string]hhs
 	iymdhash map[string]string
 	iyhash map[string]string
@@ -57,13 +60,13 @@
 func init() {
 	port = ":3910"
 	hhsdb = "hhsdb.csv"
-	img_root = "./images"
-	hhash = make(map[string]hhs)
-	iymdhash = make(map[string]string)
-	iyhash = make(map[string]string)
+	indexdb = "index.csv"
 }
 
 func main() {
+	server_root = filepath.Dir(os.Args[0])
+	hhsdb = filepath.Join(server_root, hhsdb)
+	indexdb = filepath.Join(server_root, indexdb)
 
 	// setting IP-Address & Port
 	addrs, err := net.InterfaceAddrs()
@@ -86,20 +89,28 @@
 	}
 
 	// Http-Handler
-	http.HandleFunc("/h/",  hhs_handler)      // Get /h/0800012345 -> name:addr:20200101#20210701#...
-	http.HandleFunc("/hn/", hhsnm_handler)    // Get /h/0800012345:0800098765:... -> name1:name2:...
-	http.HandleFunc("/ht/", hhstm_handler)   // Get /ht/ -> 2020-03-14 12:34
-	http.HandleFunc("/ha/", hhsdb_handler)    // Get /ha/ -> hhsdb.csv for Mover
-	http.HandleFunc("/i/",  image_handler)    // Get /i/20200110/0800012345.tgz
-	http.HandleFunc("/r/",  recent_handler)   // Get /r/0800012345:0800067890:0800099999:... -> 0800012345,name1,20200101:0800067890,name2,20210405:...
-	http.HandleFunc("/d/",  index_handler)    // Get /d/20xx -> 20xx0401:2020xx0408:... , /d/20xx0401 -> 0800012345:0800098765:...
-	http.HandleFunc("/u/",  uphhsdb_handler)  // POST /u/
-	http.HandleFunc("/ui/", upimage_handler)  // POST /ui/20200401/0800012345.tgz
+	http.HandleFunc("/h/",  hhs_handler)     // Get /h/0800012345 -> name:addr:20200101#20210701#...
+	http.HandleFunc("/hn/", hhsnm_handler)   // Get /h/0800012345:0800098765:... -> name1:name2:...
+	http.HandleFunc("/ht/", hhstm_handler)   // Get /ht/ -> 2020-03-14 12:34 (2020-04-02)
+	http.HandleFunc("/ha/", hhsdb_handler)   // Get /ha/ -> hhsdb.csv for Mover
+	http.HandleFunc("/i/",  image_handler)   // Get /i/20200110/0800012345.tgz
+	http.HandleFunc("/r/",  recent_handler)  // Get /r/0800012345:0800067890:0800099999:... -> 0800012345,name1,20200101:0800067890,name2,20210405:...
+	http.HandleFunc("/d/",  index_handler)   // Get /d/20xx -> 20xx0401:20xx0408:... , /d/20xx0401 -> 0800012345:0800098765:...
+	http.HandleFunc("/dt/", indextm_handler) // Get /dt/ -> 2020-03-14 12:34 (2020-04-02)
+	http.HandleFunc("/ud/", upidx_handler)   // Get /ud/20200402
+	http.HandleFunc("/u/",  uphhsdb_handler) // POST /u/
+	http.HandleFunc("/ui/", upimage_handler) // POST /ui/20200401/0800012345.tgz
+	http.HandleFunc("/ci/", climage_handler) // Get /ci/20200402
 
 	log.Fatal(http.ListenAndServe(server, nil))
 }
 
+/** FUNCTIONS **/
 func loadDB() error {
+	hhash = make(map[string]hhs)
+	iymdhash = make(map[string]string)
+	iyhash = make(map[string]string)
+
 	b, err := ioutil.ReadFile(hhsdb)
 	if err != nil {
 		return err
@@ -114,17 +125,14 @@
 			return err
 		}
 		h := hhs{
-			No: record[0],
-			//Birth: record[1],
-			Name: record[2],
-			//Kana: record[3],
-			Addr: record[4],
-			//Sex: record[5],
+			No:   record[0], //Birth: record[1],
+			Name: record[2], //Kana: record[3],
+			Addr: record[4], //Sex: record[5],
 		}
 		hhash[record[0]] = h
 	}
 
-	b, err = ioutil.ReadFile("index.csv")
+	b, err = ioutil.ReadFile(indexdb)
 	if err != nil {
 		return err
 	}
@@ -157,6 +165,7 @@
 	return nil
 }
 
+/** HTTP HANDLERS **/
 /* Get /h/0800012345 -> name:addr:20200101#20210701#... */
 func hhs_handler(w http.ResponseWriter, r *http.Request) {
 	hno := r.URL.Path[len("/h/"):]
@@ -181,12 +190,25 @@
 	w.Write([]byte(strings.Join(buf, ":")))
 }
 
-/* Get /ht/ -> 2020-03-14 12:34 */
+/* Get /ht/ -> 2020-03-14 12:34 (2020-04-02) */
 func hhstm_handler(w http.ResponseWriter, r *http.Request) {
 	date := ""
 	if fi, err := os.Stat(hhsdb); err == nil {
 		t := fi.ModTime()
-		date = t.Format("2006-01-02 15:04")
+		latest := "0000000001"
+
+		f, _ := os.Open(hhsdb)
+		defer f.Close()
+		input := bufio.NewScanner(f)
+		for input.Scan() {
+			s := strings.Split(input.Text(), ",")
+			if (strings.Compare(s[0], latest) > 0) {
+				latest = s[0]
+			}
+		}
+
+		latest = "(" + latest + ")"
+		date = t.Format("2006-01-02 15:04 ") + latest
 	}
 	w.Write([]byte(date))
 }
@@ -200,7 +222,7 @@
 /* Get /i/20200110/0800012345.tgz */
 func image_handler(w http.ResponseWriter, r *http.Request) {
 	file := r.URL.Path[len("/i/"):]
-	file = filepath.Join(img_root, filepath.FromSlash(file))
+	file = filepath.Join(server_root, "images", filepath.FromSlash(file))
 
 	f, err := os.Open(file)
 	if err != nil {
@@ -233,7 +255,7 @@
 	w.Write([]byte(strings.Join(buf, ":")))
 }
 
-/* Get /d/20xx -> 20xx0401:2020xx0408:... , /d/20xx0401 -> 0800012345:0800098765:... */
+/* Get /d/20xx -> 20xx0401:20xx0408:... , /d/20xx0401 -> 0800012345:0800098765:... */
 func index_handler(w http.ResponseWriter, r *http.Request) {
 	var buf string
 	ymd := r.URL.Path[len("/d/"):]
@@ -253,7 +275,6 @@
 		return
 	}
 
-	server_root := filepath.Dir(os.Args[0])
 	file := filepath.Join(server_root, hhsdb)
 	f, err := os.Create(file)
 	if err != nil {
@@ -298,7 +319,6 @@
 	ymd := uri[0:8]
 	tgz := uri[9:]
 
-	server_root := filepath.Dir(os.Args[0])
 	dir := filepath.Join(server_root, "images", ymd)
 
 	if _, err := os.Stat(dir); os.IsNotExist(err) {
@@ -321,3 +341,64 @@
 	w.Write([]byte(fmt.Sprintf("%d bytes are recieved.\n", n)))
 }
 
+/* Get /dt/ -> 2020-03-14 12:34 (2020-04-02) */
+func indextm_handler(w http.ResponseWriter, r *http.Request) {
+	date := ""
+	if fi, err := os.Stat(indexdb); err == nil {
+		t := fi.ModTime()
+		latest := "20200101"
+
+		f, _ := os.Open(indexdb)
+		defer f.Close()
+		input := bufio.NewScanner(f)
+		for input.Scan() {
+			s := strings.Split(input.Text(), ",")
+			if (strings.Compare(s[1], latest) > 0) {
+				latest = s[1]
+			}
+		}
+
+		latest = "(" + latest[0:4] + "-" + latest[4:6] + "-" + latest[6:] + ")"
+		date = t.Format("2006-01-02 15:04 ") + latest
+	}
+	w.Write([]byte(date))
+}
+
+/* Get /ud/20200402  */
+func upidx_handler(w http.ResponseWriter, r *http.Request) {
+	date := r.URL.Path[len("/ud/"):]
+	var buf []string
+
+	f, _ := os.Open(indexdb)
+	input := bufio.NewScanner(f)
+	for input.Scan() {
+		if !strings.HasSuffix(input.Text(), date) {
+			buf = append(buf, input.Text())
+		}
+	}
+	f.Close()
+
+	imgdir := filepath.Join(server_root, "images", date)
+	files, _ := ioutil.ReadDir(imgdir)
+	for _, file := range files {
+		i := file.Name()[0:10] + "," + date
+		buf = append(buf, i)
+	}
+	sort.Sort(sort.Reverse(sort.StringSlice(buf)))
+
+	os.Remove(indexdb)
+
+	s := strings.Join(buf, "\n")
+	ioutil.WriteFile(indexdb, []byte(s), 0644)
+
+	loadDB();
+	w.Write([]byte("update index done."))
+}
+
+/* Get /ci/20200402 */
+func climage_handler(w http.ResponseWriter, r *http.Request) {
+	date := r.URL.Path[len("/ci/"):]
+	dir := filepath.Join(server_root, "images", date)
+	os.RemoveAll(dir)
+}
+
--- a/src/kaigo/horori/searcher/src/searcher.cpp	Tue Apr 21 22:43:55 2020 +0900
+++ b/src/kaigo/horori/searcher/src/searcher.cpp	Wed Apr 22 19:00:50 2020 +0900
@@ -1,5 +1,5 @@
 // Filename   : searcher.cpp
-// Last Change: 2020-04-21 火 17:00:42.
+// Last Change: 2020-04-22 水 17:51:53.
 //
 #include <wx/msgdlg.h>
 #include <wx/dir.h>
@@ -163,7 +163,7 @@
 	m_filePicker->Connect(wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler(SearchFrame::OnFile), NULL, this);
 	m_buttonRead->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SearchFrame::OnRead), NULL, this);
 	m_dataViewListCtrlBatch->Connect(wxEVT_CHAR, wxKeyEventHandler(SearchFrame::OnSelectBatchListCtrlA), NULL, this);
-	m_dataViewListCtrlBatch->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SearchFrame::OnSelectBatchDClick), NULL, this);
+	m_dataViewListCtrlBatch->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SearchFrame::OnSelectBatchDClicked), NULL, this);
 
 	m_buttonHist->Connect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SearchFrame::OnHist), NULL, this);
 	m_dataViewListCtrlAny->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(SearchFrame::OnSelectListAnyItem), NULL, this);
@@ -171,6 +171,7 @@
 
 	m_choiceIdxYear->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SearchFrame::OnIdxYearChoice), NULL, this);
 	m_dataViewListCtrlIdxDate->Connect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(SearchFrame::OnIdxDateSelected), NULL, this);
+	m_dataViewListCtrlIdx->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SearchFrame::OnIdxDClicked), NULL, this);
 
 	m_choiceDrvYear->Connect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SearchFrame::OnDrvYearChoice), NULL, this);
 	m_dataViewListCtrlDrvDate->Connect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SearchFrame::OnDrvDateDClicked), NULL, this);
@@ -197,12 +198,13 @@
 	m_buttonHist->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SearchFrame::OnHist), NULL, this);
 
 	m_dataViewListCtrlBatch->Disconnect(wxEVT_CHAR, wxKeyEventHandler(SearchFrame::OnSelectBatchListCtrlA), NULL, this);
-	m_dataViewListCtrlBatch->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SearchFrame::OnSelectBatchDClick), NULL, this);
+	m_dataViewListCtrlBatch->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SearchFrame::OnSelectBatchDClicked), NULL, this);
 	m_dataViewListCtrlAny->Disconnect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(SearchFrame::OnSelectListAnyItem), NULL, this);
 	m_buttonPrint->Disconnect(wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SearchFrame::OnPrint), NULL, this);
 
 	m_choiceIdxYear->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SearchFrame::OnIdxYearChoice), NULL, this);
 	m_dataViewListCtrlIdxDate->Disconnect(wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(SearchFrame::OnIdxDateSelected), NULL, this);
+	m_dataViewListCtrlIdx->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SearchFrame::OnIdxDClicked), NULL, this);
 
 	m_choiceDrvYear->Disconnect(wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler(SearchFrame::OnDrvYearChoice), NULL, this);
 	m_dataViewListCtrlDrvDate->Disconnect(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(SearchFrame::OnDrvDateDClicked), NULL, this);
@@ -291,11 +293,14 @@
 {
 	m_dataViewListCtrlIdxDate->DeleteAllItems();
 	m_dataViewListCtrlIdx->DeleteAllItems();
+	m_dataViewListCtrlIdxDate->Scroll(0, 0);
+	m_dataViewListCtrlIdx->Scroll(0, 0);
 
 	int n = m_choiceIdxYear->GetSelection();
 	wxString url = wxT("/d/") + m_choiceIdxYear->GetString(n);
 	wxString buf = HttpGetText(m_addr, m_port, url);
 	wxArrayString ymd = wxSplit(buf, ':', '\\');
+	ymd.Sort(false);
 
 	wxVector<wxVariant> data;
 	for (int i = 0; i < ymd.GetCount(); i++) {
@@ -310,6 +315,7 @@
 void SearchFrame::OnIdxDateSelected(wxDataViewEvent& WXUNUSED(evnet))
 {
 	m_dataViewListCtrlIdx->DeleteAllItems();
+	m_dataViewListCtrlIdx->Scroll(0, 0);
 
 	int r = m_dataViewListCtrlIdxDate->GetSelectedRow();
 	wxString date = m_dataViewListCtrlIdxDate->GetTextValue(r, 1);
@@ -318,8 +324,9 @@
 	wxString url = wxT("/d/") + date;
 	wxString buf = HttpGetText(m_addr, m_port, url);
 	wxArrayString hhs = wxSplit(buf, ':', '\\');
+	hhs.Sort(false);
 
-	url = wxT("/hn/") + buf;
+	url = wxT("/hn/") + wxJoin(hhs, ':', '\\');
 	buf = HttpGetText(m_addr, m_port, url);
 	wxArrayString name = wxSplit(buf, ':', '\\');
 
@@ -333,11 +340,31 @@
 	}
 }
 
+void SearchFrame::OnIdxDClicked(wxDataViewEvent& WXUNUSED(event))
+{
+	int r = m_dataViewListCtrlIdx->GetSelectedRow();
+	wxString hno = m_dataViewListCtrlIdx->GetTextValue(r, 1);
+	m_searchCtrl->SetValue(hno);
+
+	wxString url = wxT("/h/") + hno;
+	wxString h = HttpGetText(m_addr, m_port, url); // Get /h/0800012345 -> name:addr:ymd1#ymd2#...
+
+	SetHhsInfo(h);
+	SetImages();
+
+	m_searchmode = 0;
+	SetListAny(h);
+	m_notebook->SetSelection(0);
+}
+
 void SearchFrame::OnDrvYearChoice(wxCommandEvent& WXUNUSED(evnet))
 {
 	m_dataViewListCtrlDrvDate->DeleteAllItems();
 	m_dataViewListCtrlDrvCcn->DeleteAllItems();
 	m_dataViewListCtrlDrv->DeleteAllItems();
+	m_dataViewListCtrlDrvDate->Scroll(0, 0);
+	m_dataViewListCtrlDrvCcn->Scroll(0, 0);
+	m_dataViewListCtrlDrv->Scroll(0, 0);
 
 	int n = m_choiceDrvYear->GetSelection();
 	if (n == 0) return;
@@ -366,6 +393,8 @@
 {
 	m_dataViewListCtrlDrvCcn->DeleteAllItems();
 	m_dataViewListCtrlDrv->DeleteAllItems();
+	m_dataViewListCtrlDrvCcn->Scroll(0, 0);
+	m_dataViewListCtrlDrv->Scroll(0, 0);
 
 	int n = m_choiceDrvYear->GetSelection();
 	int r = m_dataViewListCtrlDrvDate->GetSelectedRow();
@@ -400,6 +429,7 @@
 void SearchFrame::OnDrvCcnSelected(wxDataViewEvent& event)
 {
 	m_dataViewListCtrlDrv->DeleteAllItems();
+	m_dataViewListCtrlDrv->Scroll(0, 0);
 
 	int n = m_choiceDrvYear->GetSelection();
 	int r1 = m_dataViewListCtrlDrvDate->GetSelectedRow();
@@ -520,27 +550,53 @@
 
 	wxString ymddir = wxFILE_SEP_PATH + year + wxFILE_SEP_PATH + ymd;
 	if (!wxDirExists(ymddir)) {
-		wxMessageBox(wxT("bad date"));
+		wxMessageBox(wxT("bad date."));
 		return;
 	}
 
 	wxDir ymd_dir(ymddir);
 	if (!ymd_dir.IsOpened()) return;
 
+	m_gauge->SetRange(200);
+	m_gauge->SetValue(0);
+
+	wxString url = wxT("/ci/") + ymd;
+	HttpGetText(m_addr, m_port, url);
+
 	wxString ccn;
-	bool cont = dir.GetFirst(&ccndir, wxEmptyString, wxDIR_DIRS);
-	while (cont) {
+	bool cont = ymd_dir.GetFirst(&ccn, wxEmptyString, wxDIR_DIRS);
+	for (int i = 0; cont; i++) {
 		wxDir ccn_dir(ymddir + wxFILE_SEP_PATH + ccn);
 		wxString hno;
-		bool cont2 = ccndir.GetFirst(&hno, wxEmptyString, wxDIR_DIRS);
+		bool cont2 = ccn_dir.GetFirst(&hno, wxEmptyString, wxDIR_DIRS);
 		while (cont2) {
-			wxString d = ymddir + wxFILE_SEP_PATH + ccn + wxFILE_SEP_PATH + hno;
-			wxString tar = m_workdir + wxFILE_SEP_PATH + hno + wxT(".tar");
-			TarDir(d, tar);
+			if (!hno.StartsWith(wxT("0000"))) {
+				wxString d = ymddir + wxFILE_SEP_PATH + ccn + wxFILE_SEP_PATH + hno;
+				wxString tar = m_workdir + wxFILE_SEP_PATH + hno + wxT(".tar");
+				TarDir(d, tar);
+				wxString gz = m_workdir + wxFILE_SEP_PATH + hno + wxT(".tgz");
+				Gzip(tar, gz);
+				wxString url = wxT("/ui/") + ymd + wxT("/") + hno + wxT(".tgz");
+				if (HttpPostFile(m_addr, m_port, url, gz)) {
+					wxRemoveFile(tar);
+					wxRemoveFile(gz);
+				}
+			}
 			cont2 = ccn_dir.GetNext(&hno);
+			m_gauge->SetValue(i);
+			i++;
 		}
-		cont = ymd_dir.GetNext(&dirname);
+		cont = ymd_dir.GetNext(&ccn);
 	}
+	m_gauge->SetValue(0);
+
+	url = wxT("/ud/") + ymd;
+	HttpGetText(m_addr, m_port, url);
+
+	url = wxT("/dt/");
+	wxString latest = HttpGetText(m_addr, m_port, url);
+	m_textCtrlLastIndex->SetValue(latest);
+	wxMessageBox(wxT("upload done."));
 }
 
 void SearchFrame::OnRead(wxCommandEvent& WXUNUSED(event))
@@ -571,7 +627,7 @@
 	event.Skip();
 }
 
-void SearchFrame::OnSelectBatchDClick(wxDataViewEvent& WXUNUSED(event))
+void SearchFrame::OnSelectBatchDClicked(wxDataViewEvent& WXUNUSED(event))
 {
 	int r = m_dataViewListCtrlBatch->GetSelectedRow();
 	wxString hno = m_dataViewListCtrlBatch->GetTextValue(r, 1);
@@ -616,6 +672,8 @@
 			if (p.PrintDialog(NULL) == NULL) return;
 
 			m_checkBoxMask->SetValue(true);
+			m_gauge->SetRange(m_dataViewListCtrlBatch->GetSelectedItemsCount());
+			m_gauge->SetValue(0);
 			for (int r = 0; r < m_dataViewListCtrlBatch->GetItemCount(); r++) {
 				if (!m_dataViewListCtrlBatch->IsRowSelected(r))
 					continue;
@@ -637,6 +695,9 @@
 					if (m_dataViewListCtrlBatch->GetToggleValue(r, 4) && i < 3) continue;
 					html += wxT("<img src=\"") + wxString::Format(wxT("%s/%d"), m_workdir, i + 1) + wxT("\" width=\"750\" height=\"1060\"/>");
 					html += wxT("<div align=right><font size=-2><u>") + hno + wxT("</u></font></div>");
+					if (i == 2 && m_checkBoxBoth->IsChecked()) {
+						html += wxT("<img src=\"./image/space.tif \" width=\"750\" height=\"1060\"/>");
+					}
 				}
 				html += wxT("</body></html>\n");
 
@@ -646,8 +707,10 @@
 				hpout.SetHtmlText(html, wxEmptyString, false);
 
 				p.Print(NULL, &hpout, false);
+				m_gauge->SetValue(r);
 				RemoveTemp();
 			}
+			m_gauge->SetValue(0);
 			break;
 		}
 
@@ -669,6 +732,9 @@
 				for (int i = 0; i < 5; i++) {
 					html += wxT("<img src=\"") + wxString::Format(wxT("%s/%d"), m_workdir, i + 1) + wxT("\" width=\"750\" height=\"1060\"/>");
 					html += wxT("<div align=right><font size=-2><u>") + m_searchCtrl->GetValue() + wxT("</u></font></div>");
+					if (i == 2 && m_checkBoxBoth->IsChecked()) {
+						html += wxT("<img src=\"./image/space.tif \" width=\"750\" height=\"1060\"/>");
+					}
 				}
 			}
 			else {
@@ -710,7 +776,7 @@
 	gbSizer->SetFlexibleDirection(wxBOTH);
 	gbSizer->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED);
 
-	m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(900, 800), wxNB_FIXEDWIDTH|wxNB_TOP);
+	m_notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxSize(900, 940), wxNB_FIXEDWIDTH|wxNB_TOP);
 
 	m_scrolledWindow1 = new wxScrolledWindow(m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL);
 	m_scrolledWindow1->SetScrollRate(5, 5);
@@ -865,7 +931,7 @@
 	m_buttonRegHhs = new wxButton(m_panelMainte, wxID_ANY, wxT("アップロード"), wxDefaultPosition, wxDefaultSize, 0);
 	gbSizerDB->Add(m_buttonRegHhs, wxGBPosition(0, 2), wxGBSpan(1, 1), wxALL, 5);
 
-	m_textCtrlLastHhsDB = new wxTextCtrl(m_panelMainte, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0);
+	m_textCtrlLastHhsDB = new wxTextCtrl(m_panelMainte, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(180, -1), 0);
 	m_textCtrlLastHhsDB->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENU));
 	gbSizerDB->Add(m_textCtrlLastHhsDB, wxGBPosition(0, 3), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
 
@@ -878,6 +944,10 @@
 	m_buttonRegImg = new wxButton(m_panelMainte, wxID_ANY, wxT("アップロード"), wxDefaultPosition, wxDefaultSize, 0);
 	gbSizerDB->Add(m_buttonRegImg, wxGBPosition(1, 2), wxGBSpan(1, 1), wxALL, 5);
 
+	m_textCtrlLastIndex = new wxTextCtrl(m_panelMainte, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(180, -1), 0);
+	m_textCtrlLastIndex->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENU));
+	gbSizerDB->Add(m_textCtrlLastIndex, wxGBPosition(1, 3), wxGBSpan(1, 1), wxALL, 5);
+
 	bSizerMainte->Add(gbSizerDB, 0, wxLEFT, 30);
 
 	m_panelMainte->SetSizer(bSizerMainte);
@@ -885,7 +955,7 @@
 	bSizerMainte->Fit(m_panelMainte);
 	m_notebook->AddPage(m_panelMainte, wxT("メンテナンス"), false);
 
-	gbSizer->Add(m_notebook, wxGBPosition(0, 0), wxGBSpan(11, 1), wxEXPAND | wxALL, 5);
+	gbSizer->Add(m_notebook, wxGBPosition(0, 0), wxGBSpan(9, 1), wxEXPAND|wxALL, 5);
 	m_notebook->SetSelection(0);
 
 	m_searchCtrl = new wxSearchCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
@@ -912,21 +982,28 @@
 	m_dataViewListCtrlAny->SetAlternateRowColour(wxColour(230, 230, 255)) ;
 	gbSizer->Add(m_dataViewListCtrlAny, wxGBPosition(3, 1), wxGBSpan(1, 3), wxALL|wxEXPAND, 5);
 
-	//m_listBox2 = new wxListBox(this, wxID_ANY, wxDefaultPosition, wxSize(-1, 100), 0, NULL, wxLB_MULTIPLE);
-	//gbSizer->Add(m_listBox2, wxGBPosition(6, 1), wxGBSpan(1, 2), wxALL, 5);
+	gbSizer->Add(0, 220, wxGBPosition(4, 1), wxGBSpan(1, 1), wxEXPAND, 5);
 
 	m_checkBoxMask = new wxCheckBox(this, wxID_ANY, wxT("マスク処理"), wxDefaultPosition, wxDefaultSize, 0);
-	gbSizer->Add(m_checkBoxMask, wxGBPosition(7, 1), wxGBSpan(1, 1), wxALL, 5);
+	gbSizer->Add(m_checkBoxMask, wxGBPosition(5, 1), wxGBSpan(1, 1), wxALL, 5);
+
+	m_checkBoxBoth = new wxCheckBox(this, wxID_ANY, wxT("両面処理"), wxDefaultPosition, wxDefaultSize, 0);
+	m_checkBoxBoth->SetValue(true);
+	gbSizer->Add(m_checkBoxBoth, wxGBPosition(5, 2), wxGBSpan(1, 1), wxALL, 5);
 
 	m_buttonPrint = new wxButton(this, wxID_ANY, wxT("印刷"), wxDefaultPosition, wxDefaultSize, 0);
-	gbSizer->Add(m_buttonPrint, wxGBPosition(8, 1), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
+	gbSizer->Add(m_buttonPrint, wxGBPosition(6, 1), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
 
 	m_spinCtrl = new wxSpinCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(50, -1), wxSP_ARROW_KEYS, 80, 120, 100);
-	gbSizer->Add(m_spinCtrl, wxGBPosition(8, 2), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
+	gbSizer->Add(m_spinCtrl, wxGBPosition(6, 2), wxGBSpan(1, 1), wxALL|wxALIGN_CENTER_VERTICAL, 5);
+
+	m_gauge = new wxGauge(this, wxID_ANY, 100, wxDefaultPosition, wxSize(200, -1), wxGA_HORIZONTAL);
+	m_gauge->SetValue(0);
+	gbSizer->Add(m_gauge, wxGBPosition(7, 1), wxGBSpan(1, 2), wxALL, 5);
 
 	m_textCtrlPasswd = new wxTextCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD|wxTE_PROCESS_ENTER);
 	m_textCtrlPasswd->SetMaxLength(4);
-	gbSizer->Add(m_textCtrlPasswd, wxGBPosition(10, 1), wxGBSpan(1, 2), wxALL|wxALIGN_BOTTOM, 5);
+	gbSizer->Add(m_textCtrlPasswd, wxGBPosition(8, 1), wxGBSpan(1, 2), wxALL|wxALIGN_BOTTOM, 5);
 
 	this->SetSizer(gbSizer);
 	this->Layout();
@@ -980,10 +1057,15 @@
 	m_staticBitmap5->SetParentWidows(this, m_notebook);
 
 	m_filePickerHhsDB->SetPath(m_hhscsv);
+
 	wxString url = wxT("/ht/");
 	wxString date = HttpGetText(m_addr, m_port, url);
 	m_textCtrlLastHhsDB->SetValue(date);
 
+	url = wxT("/dt/");
+	wxString latest = HttpGetText(m_addr, m_port, url);
+	m_textCtrlLastIndex->SetValue(latest);
+
 	m_searchmode = 0;
 
 	m_buttonHist->Enable(false);
--- a/src/kaigo/horori/searcher/src/utils.cpp	Tue Apr 21 22:43:55 2020 +0900
+++ b/src/kaigo/horori/searcher/src/utils.cpp	Wed Apr 22 19:00:50 2020 +0900
@@ -1,5 +1,5 @@
 // Filename   : utils.cpp
-// Last Change: 2020-04-21  16:50:37.
+// Last Change: 2020-04-22  09:21:01.
 //
 #include <wx/wx.h>
 #include <wx/dir.h>
@@ -46,9 +46,8 @@
 	wxString filename;
 	bool cont = d.GetFirst(&filename, wxEmptyString, wxDIR_FILES);
 	while (cont) {
-		wxTarEntry entry(filename);
-		tar.PutNextEntry(&entry);
 		wxFFileInputStream in(dir + wxFILE_SEP_PATH + filename);
+		tar.PutNextEntry(filename);
 		tar.Write(in);
 		cont = d.GetNext(&filename);
 	}