Index: /branches/version-2_5-dev/html/install/index.php
===================================================================
--- /branches/version-2_5-dev/html/install/index.php	(revision 19938)
+++ /branches/version-2_5-dev/html/install/index.php	(revision 19958)
@@ -1033,5 +1033,6 @@
                  array("dtb_site_control", "control_id"),
                  array("dtb_table_comment", "id"),
-                 array("dtb_trackback", "trackback_id"));
+                 array("dtb_trackback", "trackback_id"),
+                 array("dtb_mailmaga_template", "template_id"));
 }
 
Index: /branches/version-2_5-dev/html/install/sql/drop_table.sql
===================================================================
--- /branches/version-2_5-dev/html/install/sql/drop_table.sql	(revision 19860)
+++ /branches/version-2_5-dev/html/install/sql/drop_table.sql	(revision 19958)
@@ -103,2 +103,3 @@
 DROP TABLE dtb_index_list;
 DROP TABLE dtb_payment_options;
+DROP TABLE dtb_mailmaga_template;
Index: /branches/version-2_5-dev/html/install/sql/create_table_mysql.sql
===================================================================
--- /branches/version-2_5-dev/html/install/sql/create_table_mysql.sql	(revision 19928)
+++ /branches/version-2_5-dev/html/install/sql/create_table_mysql.sql	(revision 19958)
@@ -235,4 +235,35 @@
 ) ENGINE=InnoDB;
 
+CREATE TABLE dtb_mailmaga_template (
+    template_id int NOT NULL,
+    subject text,
+    charge_image text,
+    mail_method int,
+    header text,
+    body text,
+    main_title text,
+    main_comment text,
+    main_product_id int,
+    sub_title text,
+    sub_comment text,
+    sub_product_id01 int,
+    sub_product_id02 int,
+    sub_product_id03 int,
+    sub_product_id04 int,
+    sub_product_id05 int,
+    sub_product_id06 int,
+    sub_product_id07 int,
+    sub_product_id08 int,
+    sub_product_id09 int,
+    sub_product_id10 int,
+    sub_product_id11 int,
+    sub_product_id12 int,
+    del_flg smallint NOT NULL DEFAULT 0,
+    creator_id int NOT NULL,
+    create_date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+    update_date timestamp NOT NULL,
+    PRIMARY KEY (template_id)
+) ENGINE=InnoDB;
+
 CREATE TABLE dtb_send_history (
     send_id int  NOT NULL,
Index: /branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql
===================================================================
--- /branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql	(revision 19928)
+++ /branches/version-2_5-dev/html/install/sql/create_table_pgsql.sql	(revision 19958)
@@ -235,4 +235,35 @@
 );
 
+CREATE TABLE dtb_mailmaga_template (
+    template_id int NOT NULL,
+    subject text,
+    charge_image text,
+    mail_method int,
+    header text,
+    body text,
+    main_title text,
+    main_comment text,
+    main_product_id int,
+    sub_title text,
+    sub_comment text,
+    sub_product_id01 int,
+    sub_product_id02 int,
+    sub_product_id03 int,
+    sub_product_id04 int,
+    sub_product_id05 int,
+    sub_product_id06 int,
+    sub_product_id07 int,
+    sub_product_id08 int,
+    sub_product_id09 int,
+    sub_product_id10 int,
+    sub_product_id11 int,
+    sub_product_id12 int,
+    del_flg smallint NOT NULL DEFAULT 0,
+    creator_id int NOT NULL,
+    create_date timestamp NOT NULL DEFAULT now(),
+    update_date timestamp NOT NULL,
+    PRIMARY KEY (template_id)
+);
+
 CREATE TABLE dtb_send_history (
     send_id int NOT NULL,
Index: /branches/version-2_5-dev/data/Smarty/templates/admin/mail/template_input.tpl
===================================================================
--- /branches/version-2_5-dev/data/Smarty/templates/admin/mail/template_input.tpl	(revision 19954)
+++ /branches/version-2_5-dev/data/Smarty/templates/admin/mail/template_input.tpl	(revision 19958)
@@ -89,3 +89,3 @@
   </div>
 </table>
-
+</div>
Index: /branches/version-2_5-dev/data/Smarty/templates/admin/mail/history.tpl
===================================================================
--- /branches/version-2_5-dev/data/Smarty/templates/admin/mail/history.tpl	(revision 19954)
+++ /branches/version-2_5-dev/data/Smarty/templates/admin/mail/history.tpl	(revision 19958)
@@ -25,5 +25,6 @@
 <input type="hidden" name="search_pageno" value="" />
 <input type="hidden" name="mode" value="" />
-<div id="mail" class="contents-main">
+  <!--{if count($arrDataList) > 0}-->
+  <div id="mail" class="contents-main">
     <table class="list center">
         <tr>
@@ -46,5 +47,5 @@
             <td class="left"><!--{$arrDataList[cnt].subject|h}--></td>
             <td><a href="javascript:;" onclick="win03('./preview.php?send_id=<!--{$arrDataList[cnt].send_id|h}-->', 'confirm', '720', '600'); return false;">確認</a></td>
-            <td><a href="#" onclick="win03('./<!--{$smarty.const.DIR_INDEX_URL}-->?mode=query&amp;send_id=<!--{$arrDataList[cnt].send_id|h}-->','query','720','420'); return false;">確認</a></td>
+            <td><a href="javascript:;" onclick="win03('./<!--{$smarty.const.DIR_INDEX_URL}-->?mode=query&amp;send_id=<!--{$arrDataList[cnt].send_id|h}-->','query','615','800'); return false;">確認</a></td>
             <td><!--{$arrDataList[cnt].count_all|h}--></td>
             <td><!--{$arrDataList[cnt].count_sent|h}--></td>
@@ -63,5 +64,22 @@
         </tr>
         <!--{/section}-->
-    </table>
-</div>
+      </table>
+    </div>
+    <!--{else}-->
+	  <div id="complete">
+		  <div class="complete-top"></div>
+		  <div class="contents">
+			  <div class="message">
+          配信履歴はありません
+			  </div>
+		  </div>
+		  <div class="btn-area-top"></div>
+		  <div class="btn-area">
+			  <ul>
+				  <li><a class="btn-action" href="./<!--{$smarty.const.DIR_INDEX_URL}-->"><span class="btn-prev">配信内容設定へ戻る</span></a></li>
+			  </ul>
+		  </div>
+		  <div class="btn-area-bottom"></div>
+	  </div>
+    <!--{/if}-->
 </form>
Index: /branches/version-2_5-dev/data/Smarty/templates/admin/mail/template_complete.tpl
===================================================================
--- /branches/version-2_5-dev/data/Smarty/templates/admin/mail/template_complete.tpl	(revision 18873)
+++ /branches/version-2_5-dev/data/Smarty/templates/admin/mail/template_complete.tpl	(revision 19958)
@@ -25,9 +25,19 @@
 <input type="hidden" name="mode" value="" />
 <input type="hidden" name="product_id" value="" />
-<div id="mail" class="contents-main">
-  <div class="message">
-    テンプレートの登録・編集が完了しました<br />
-    <a href="./template.php">テンプレート一覧に戻る</a>
-  </div>
+	<div id="complete">
+		<div class="complete-top"></div>
+		<div class="contents">
+			<div class="message">
+				登録が完了致しました。
+			</div>
+		</div>
+		<div class="btn-area-top"></div>
+		<div class="btn-area">
+			<ul>
+				<li><a class="btn-action" href="./template.php"><span class="btn-prev">テンプレート一覧に戻る</span></a></li>
+			</ul>
+		</div>
+		<div class="btn-area-bottom"></div>
+	</div>
 </div>
 </form>
Index: /branches/version-2_5-dev/data/Smarty/templates/admin/mail/query.tpl
===================================================================
--- /branches/version-2_5-dev/data/Smarty/templates/admin/mail/query.tpl	(revision 19954)
+++ /branches/version-2_5-dev/data/Smarty/templates/admin/mail/query.tpl	(revision 19958)
@@ -134,6 +134,8 @@
   </table>
 
-  <div class="btn">
-    <a class="btn-normal" href="javascript:;" onclick="window.close(); return false;"><span>ウインドウを閉じる</span></a>
+  <div class="btn-area">
+    <ul>
+      <li><a class="btn-action" href="javascript:;" onclick="window.close(); return false;"><span class="btn-next">ウインドウを閉じる</span></a></li>
+    </ul>
   </div>
 </div>
Index: /branches/version-2_5-dev/data/class/pages/admin/mail/LC_Page_Admin_Mail.php
===================================================================
--- /branches/version-2_5-dev/data/class/pages/admin/mail/LC_Page_Admin_Mail.php	(revision 19943)
+++ /branches/version-2_5-dev/data/class/pages/admin/mail/LC_Page_Admin_Mail.php	(revision 19958)
@@ -210,4 +210,5 @@
 
             $this->list_data = $list_data;
+            $this->setTemplate('mail/query.tpl');
             return;
         }
Index: /branches/version-2_5-dev/data/class/pages/admin/mail/LC_Page_Admin_Mail_TemplateInput.php
===================================================================
--- /branches/version-2_5-dev/data/class/pages/admin/mail/LC_Page_Admin_Mail_TemplateInput.php	(revision 19805)
+++ /branches/version-2_5-dev/data/class/pages/admin/mail/LC_Page_Admin_Mail_TemplateInput.php	(revision 19958)
@@ -142,4 +142,5 @@
         } else {
             $sqlval['create_date'] = "now()";
+            $sqlval['template_id'] = $objQuery->nextVal('dtb_mailmaga_template_template_id');
             $objQuery->insert("dtb_mailmaga_template", $sqlval);
         }
