-- --------------------------------------------------------------------------------------------------
-- 標準テーブルデータ登録スクリプト
-- システムの標準構成で必要な初期データの登録を行う
-- --------------------------------------------------------------------------------------------------

-- 国マスター
INSERT INTO country (ct_id, ct_language_id, ct_name, ct_name_short, ct_iso_code_2, ct_index) VALUES ('JPN', 'ja', '日本',           '日本',     'JP', 0);
INSERT INTO country (ct_id, ct_language_id, ct_name, ct_name_short, ct_iso_code_2, ct_index) VALUES ('USA', 'ja', 'アメリカ合衆国', 'アメリカ', 'US', 1);
INSERT INTO country (ct_id, ct_language_id, ct_name, ct_name_short, ct_iso_code_2, ct_index) VALUES ('GBR', 'ja', 'イギリス',       'イギリス', 'GB', 2);
INSERT INTO country (ct_id, ct_language_id, ct_name, ct_name_short, ct_iso_code_2, ct_index) VALUES ('DEU', 'ja', 'ドイツ',         'ドイツ',   'DE', 3);
INSERT INTO country (ct_id, ct_language_id, ct_name, ct_name_short, ct_iso_code_2, ct_index) VALUES ('FRA', 'ja', 'フランス',       'フランス', 'FR', 4);
INSERT INTO country (ct_id, ct_language_id, ct_name, ct_name_short, ct_iso_code_2, ct_index) VALUES ('CHN', 'ja', '中華人民共和国', '中国',     'CN', 5);
INSERT INTO country (ct_id, ct_language_id, ct_name, ct_name_short, ct_iso_code_2, ct_index) VALUES ('KOR', 'ja', '大韓民国',       '韓国',     'KR', 6);

-- 通貨マスター
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('JPY', 'ja', '円',         '日本円',               '￥', '円',         0, 1);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('USD', 'ja', 'ドル',       'アメリカドル',         '$',  '',           2, 2);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('EUR', 'ja', 'ユーロ',     '欧州ユーロ',           '',   '',           2, 3);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('GBP', 'ja', 'ポンド',     'イギリスポンド',       '￡', '',           2, 4);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('CNY', 'ja', '元',         '中国人民元',           '',   '元',         0, 5);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('KRW', 'ja', 'ウォン',     '韓国ウォン',           '',   'ウォン',     0, 6);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('TWD', 'ja', 'ドル',       '台湾ドル',             '',   'ドル',       2, 7);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('THB', 'ja', 'バーツ',     'タイバーツ',           '',   'バーツ',     0, 8);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('CAD', 'ja', 'ドル',       'カナダドル',           '',   'ドル',       2, 9);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('SGD', 'ja', 'ドル',       'シンガポールドル',     '',   'ドル',       2, 10);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('MYR', 'ja', 'リンギット', 'マレーシアリンギット', '',   'リンギット', 0, 11);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('CHF', 'ja', 'フラン',     'スイスフラン',         '',   'フラン',     0, 12);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('IDR', 'ja', 'ルピア',     'インドネシアルピア',   '',   'ルピア',     0, 13);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('INR', 'ja', 'ルピー',     'インドルピー',         '',   'ルピー',     0, 14);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('PHP', 'ja', 'ペソ',       'フィリピンペソ',       '',   'ペソ',       0, 15);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('NZD', 'ja', 'ドル',       'ニュージーランドドル', '',   'ドル',       2, 16);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('HKD', 'ja', 'ドル',       '香港ドル',             '',   'ドル',       2, 17);
INSERT INTO currency (cu_id, cu_language_id, cu_name, cu_description, cu_symbol, cu_post_symbol, cu_decimal_place, cu_index) VALUES ('TRL', 'ja', 'リラ',       'トルコリラ',           '',   'リラ',       0, 18);

-- Wiki設定マスター
INSERT INTO wiki_config (wg_id,        wg_value,     wg_name,                 wg_index)
VALUES                  ('password',   md5('admin'), '共通パスワード',        1);

-- ブログ設定マスター
INSERT INTO blog_config (bg_id,              bg_value,    bg_name,                     bg_index)
VALUES                 ('receive_comment',   '0',         'コメントの受け付け',        1);
INSERT INTO blog_config (bg_id,              bg_value,    bg_name,                     bg_index)
VALUES                 ('receive_trackback', '0',         'トラックバックの受け付け',  2);
INSERT INTO blog_config (bg_id,              bg_value,    bg_name,                     bg_index)
VALUES                 ('entry_view_count',  '10',        '記事表示数',                3);
INSERT INTO blog_config (bg_id,              bg_value,    bg_name,                     bg_index)
VALUES                 ('entry_view_order',  '1',        '記事表示順',                 4);

-- BBS設定マスター
INSERT INTO bbs_config (sf_id,                     sf_value,    sf_name,                        sf_index)
VALUES                 ('use_email',               '1',         'Eメール送信機能',              1);
INSERT INTO bbs_config (sf_id,                     sf_value,    sf_name,                        sf_index)
VALUES                 ('send_password_on_regist', '0',         '会員登録時のEメール自動送信',  2);
INSERT INTO bbs_config (sf_id,                     sf_value,    sf_name,                        sf_index)
VALUES                 ('can_edit_thread',         '0',         '投稿記事編集許可',             3);
INSERT INTO bbs_config (sf_id,                     sf_value,    sf_name,                        sf_index)
VALUES                 ('admin_name',              'BBS管理者', '管理者名',                     4);
INSERT INTO bbs_config (sf_id,                     sf_value,    sf_name,                        sf_index)
VALUES                 ('auto_email_sender',       '',          '自動送信メール送信元アドレス', 5);

-- BBSグループマスター
INSERT INTO `bbs_group` (`sg_id`, `sg_language_id`, `sg_name`, `sg_sort_order`, `sg_editable`, `sg_create_dt`) VALUES
(1,    'ja',           'ゲスト',        1,   false,   now());

-- 予約リソースマスター
INSERT INTO reserve_resource (rr_id, rr_type, rr_config_id, rr_name, rr_sort_order)
VALUES                       (1,     0,       0,            'デフォルト', 1);

-- 予約設定マスター
INSERT INTO reserve_config (rc_id,   rc_key,                  rc_value, rc_name,        rc_index)
VALUES                     (0, 'unit_interval_minute', '15',     '単位時間(分)', 0);
INSERT INTO reserve_config (rc_id,   rc_key,                  rc_value, rc_name,                 rc_index)
VALUES                     (0, 'max_count_per_unit',      '3',      '1単位あたりの最大登録数', 1);
INSERT INTO reserve_config (rc_id,   rc_key,                  rc_value, rc_name,                 rc_index)
VALUES                     (0, 'view_day_start',      '0',      '先頭に表示する日付', 2);
INSERT INTO reserve_config (rc_id,   rc_key,                  rc_value, rc_name,                 rc_index)
VALUES                     (0, 'view_day_range',      '10',      '一覧表示日数', 3);
INSERT INTO reserve_config (rc_id,   rc_key,                  rc_value, rc_name,                 rc_index)
VALUES                     (0, 'max_user_reserve_count',      '1',      'ユーザの最大予約可能数', 4);
INSERT INTO reserve_config (rc_id,   rc_key,                  rc_value, rc_name,                 rc_index)
VALUES                     (0, 'default_resource_id',      '1',      'デフォルトのリソースID', 5);
INSERT INTO reserve_config (rc_id,   rc_key,                  rc_value, rc_name,                 rc_index)
VALUES                     (0, 'cancel_available_day',      '1',    '予約キャンセル可能な日数', 6);
INSERT INTO reserve_config (rc_id,   rc_key,                  rc_value, rc_name,                 rc_index)
VALUES                     (0, 'show_new_reserve_field',      '1',    '新規予約フィールドを表示', 7);

-- 予約カレンダーマスター
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               2,                900,           1200,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               2,                1300,          1730,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               3,                900,           1200,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               3,                1300,          1730,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               4,                900,           1200,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               4,                1300,          1730,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               5,                900,           1200,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               5,                1300,          1730,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               6,                900,           1200,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               6,                1300,          1730,        true);
INSERT INTO reserve_calendar (ra_config_id, ra_usual, ra_specify_type, ra_day_attribute, ra_start_time, ra_end_time, ra_available)
VALUES                       (0,            true,     1,               7,                900,           1200,        true);

-- テーブルのバージョン
DELETE FROM _version WHERE vs_id = 'standard_table';
INSERT INTO _version (vs_id,                         vs_value, vs_name)
VALUES               ('standard_table',     '2008032401',     '標準テーブルのバージョン');

-- メール内容
DELETE FROM _mail_form WHERE mf_id = 'regist_member';
INSERT INTO _mail_form (mf_id,           mf_language_id, mf_subject,         mf_content,                                                                 mf_create_dt) 
VALUES                 ('regist_member', 'ja',           '会員登録',         'ご登録ありがとうございました。\nパスワードを送信します。\nこのパスワードでログインし、パスワードを再設定してください。\n\n[#URL#]\n\nパスワード　[#PASSWORD#]', now());
DELETE FROM _mail_form WHERE mf_id = 'send_password';
INSERT INTO _mail_form (mf_id,           mf_language_id, mf_subject,         mf_content,                                                                 mf_create_dt) 
VALUES                 ('send_password', 'ja',           'パスワード再送信', 'パスワードを再送信します。\nこのパスワードでログインし、パスワードを再設定してください。\n\n[#URL#]\n\nパスワード　[#PASSWORD#]',                               now());
DELETE FROM _mail_form WHERE mf_id = 'send_password_simple';
INSERT INTO _mail_form (mf_id,           mf_language_id, mf_subject,         mf_content,                                                                 mf_create_dt) 
VALUES                 ('send_password_simple', 'ja',    'パスワード再送信', 'パスワードを再送信します。\nこのパスワードでログインし、パスワードを再設定してください。\n\nパスワード　[#PASSWORD#]',                               now());
DELETE FROM _mail_form WHERE mf_id = 'contact_us';
INSERT INTO _mail_form (mf_id,           mf_language_id, mf_subject,         mf_content,                                                                 mf_create_dt) 
VALUES                 ('contact_us', 'ja',              'お問い合わせ',     '以下のお問い合わせがありました。\n\n[#BODY#]',                             now());

-- 管理画面メニューデータ
DELETE FROM _nav_item WHERE ni_id >= 500 AND ni_id < 1000;
INSERT INTO _nav_item
(ni_id, ni_parent_id, ni_index, ni_nav_id,    ni_task_id,                     ni_group_id, ni_view_control, ni_param, ni_name,    ni_help_title, ni_help_body, ni_visible) VALUES
(500,   0,            4,        'admin_menu', '_widget',                      '',          0,               '',       'ウィジェット設定', 'ウィジェット設定', '個別のウィジェットの設定を行います。', true),
(501,   500,          0,        'admin_menu', 'configwidget_default_mainmenu','',          0,               '',          'メインメニュー', 'メインメニュー', 'Webサイトで常時表示するメニューを作成します。', true),
(502,   500,          1,        'admin_menu', 'configwidget_default_content', '',          0,               '',       'コンテンツビュー', 'デフォルトコンテンツビュー', 'Webサイトのコンテンツを管理する設定画面です。', true),
(503,   500,          2,        'admin_menu', 'configwidget_ec_main',         '',          0,               '',       'Eコマースメイン', 'Eコマースメイン', 'Eコマース機能のメインとなる設定画面です。', true),
(504,   500,          3,        'admin_menu', 'configwidget_blog_main',       '',          0,               '',       'ブログメイン', 'ブログメイン', 'ブログ機能のメインとなる設定画面です。', true),
(505,   500,          4,        'admin_menu', 'configwidget_bbs_main',        '',          0,               '',       '掲示板メイン', '掲示板メイン', '掲示板機能のメインとなる設定画面です。', true),
(506,   500,          5,        'admin_menu', 'configwidget_reserve_main',    '',          0,               '',   '予約メイン', '予約メイン', '汎用予約機能のメインとなる設定画面です。', true);

-- ウィジェット情報
DELETE FROM _widgets WHERE wd_id = 'default_mainmenu';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('default_mainmenu',   'デフォルトメインメニュー',   'DMEN', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, '常に表示し共通で使用するメインメニュー。',         false,           false,       true,         true,        true,         false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'nav_menu';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('nav_menu',   'ナビゲーションメニュー',   'NAVM', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ページのヘッダ下や、フッタ部に表示するメニュー。',           false,           false,       true,         true,        true,         false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'default_footer';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('default_footer',     'デフォルトフッタ',           'DFOT', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'フッタ部分に表示し、著作権の表示を行う。',          false,           false,       true,         true,        false,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'custom_header';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('custom_header',     'カスタムヘッダ',           'DFHT', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ヘッダ部分で画像やサイトのタイトル文字列をカスタマイズ。',          false,           false,       true,         true,        true,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'ec_login_box';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ec_login_box',       'Eコマース - ログイン',       'ELOG', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Eコマースの会員ログイン用ボックス。', 'md5',         false,           false,       true,         true,        false,        false,               false,true,           100, now(), now());
DELETE FROM _widgets WHERE wd_id = 'custom_footer';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('custom_footer',     'カスタムフッタ',           'CSFT', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'フッタ部に表示し、著作権等の表示を行う。',          false,           false,       true,         true,        true,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'separator';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('separator',          'セパレータ',                 'SEPT', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ウィジェット間の区切り線。',          false,           false,       true,         true,        false,         false,               false,true,          0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'templateChanger';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('templateChanger',    'テンプレートチェンジャー',   'TCHA', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'エンドユーザからテンプレートの変更を可能にする。',          false,           false,       true,         true,        false,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'date';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('date',               '現在日時',                   'DTST', '1.0.0',  '',  'Naoki Hirata', 'Magic3.org', 'GPL', 10, '現在の日付時刻を表示。',      false,           false,       true,         true,        false,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'ajax_sample1';
INSERT INTO _widgets 
(wd_id,          wd_name,                  wd_type, wd_version, wd_params, wd_author,      wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_use_ajax, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ajax_sample1', 'Ajaxサンプルプログラム', 'AJSP',  '1.0.0',    '',        'Naoki Hirata', 'Magic3.org', 'GPL',      10, 'Ajaxサンプルプログラム。サーバと通信し、サーバの時刻を取得。',                true,            true,        true,        true,         true,               false,        true,                false,               true,              0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'access_count';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('access_count',       'アクセスカウンター',         'ACCT', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'サイトのアクセス数を表示。',          false,           false,       true,         true,        false,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'clock';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('clock',              '時計',                       'CLCK', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'アナログ時計。',          true,            false,       true,         true,        false,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'dg_clock';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('dg_clock',           'デジタル時計',               'DGCK', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'デジタル時計。',          false,           false,       true,         true,        false,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'default_content';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('default_content',    'デフォルトコンテンツビュー', 'content', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, '画像やテキストからできた様々なコンテンツを表示。表示コンテンツはURLパラメータで指定。コンテンツ(content)ページ専用。',          false,           false,       true,         true,        true,         false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'static_content';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('static_content',    '固定コンテンツビュー', '', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, '固定でコンテンツを表示。コンテンツはデフォルトコンテンツビューと共有。',          false,           false,       true,         true,        true,         false,               true,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'news';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('news',    'お知らせ', 'NEWS', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'お知らせを表示。',          false,           false,       true,         true,        true,         false,               true,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'blogparts_box';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('blogparts_box',    'ブログパーツ', 'BPAR', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ブログパーツを表示',          false,           false,       true,         true,        true,         false,               true,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'banner';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('banner',             'バナー表示',                 'BANR', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'バナー画像を表示。',          false,           false,       true,         true,        true,         true,               true,true,            0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'ec_main';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ec_main',            'Eコマース - メイン',         'ECOM', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Eコマースのメインプログラム。商品の説明や一覧を表示したり、会員登録処理や商品購入処理などを行う。',          false,           false,       true,         true,        true,         true,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'ec_menu';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ec_menu',   'Eコマース - 商品メニュー',   'ECMN', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Eコマースの商品メニュー。カテゴリで取得した商品一覧をEコマースメインウィジェットに表示させる。',          false,           false,       true,         true,        true,         false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'ec_category_menu';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ec_category_menu',   'Eコマース - カテゴリーメニュー', 'ECCM', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Eコマースカテゴリメニュー',          false,           false,       true,         true,        true,         false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'ec_cart_box';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ec_cart_box',        'Eコマース - カート',     'ECCT', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Eコマースでカート内の商品を表示するボックス。',         false,           false,       true,         true,        false,         false,               false,true,           100, now(),      now());
DELETE FROM _widgets WHERE wd_id = 'ec_product_header';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ec_product_header',               'Eコマース - 商品ヘッダ',                   'ECHD', '1.0.0',  '',  'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Eコマース商品メニューで商品一覧表示させるときに同時に商品のヘッダ画像を表示する',     false,           false,       true,         true,        false,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'ec_product_display';
INSERT INTO _widgets
(wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ec_product_display',            'Eコマース - 新着おすすめ',         'ECPD', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, '商品のおすすめや新着などの一覧を表示する。',          false,           false,       true,         true,        true,         false,               true,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'ec_search_box';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ec_search_box',   'Eコマース - 検索',            'ECSR', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Eコマース商品検索ボックス。',         false,           false,       true,         true,        false,         false,               false,true,               0, now(),    now());
DELETE FROM _widgets WHERE wd_id = 'yahoo_weather';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('yahoo_weather',      'Yahooお天気',                'YWEA', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Yahooのサイトからお天気情報を取得表示する。',         false,           false,       true,         true,        false,        false,               false,true,               0, now(),   now());
DELETE FROM _widgets WHERE wd_id = 'othello';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('othello',            'オセロ',                     'OTHE', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'オセロプログラム。',         false,           false,       true,         true,        false,        false,               false,true,               0, now(),   now());
DELETE FROM _widgets WHERE wd_id = 'blog_main';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib_a, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('blog_main',          'ブログ - メイン',            'BGMA', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ブログの記事の内容を表示する。', 'entry_detail=jquery-ui-plus',          false,           false,       true,         true,        true,        false,               false,true,               0, now(),    now());
DELETE FROM _widgets WHERE wd_id = 'blog_search_box';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('blog_search_box',   'ブログ - 検索',            'BGSR', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ブログ記事を検索するためのボックス。',        false,           false,       true,         true,        false,         false,               false,true,               0, now(),    now());
DELETE FROM _widgets WHERE wd_id = 'blog_new_box';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('blog_new_box',   'ブログ - 新規',            'BGNW', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ブログの新規一覧を表示。',         false,           false,       true,         true,        false,         false,               false,true,               0, now(),    now());
DELETE FROM _widgets WHERE wd_id = 'blog_calendar_box';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('blog_calendar_box',   'ブログ - カレンダー',            'BGCL', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'カレンダーからブログ記事にアクセスするためのボックス。',        false,           false,       true,         true,        false,         false,               false,true,               0, now(),    now());
DELETE FROM _widgets WHERE wd_id = 'bbs_main';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('bbs_main',          '掲示板 - メイン',            'BBMA', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, '掲示板の投稿記事を表示。',         false,           false,       true,         true,        true,        false,               false,true,               0, now(),    now());
DELETE FROM _widgets WHERE wd_id = 'bbs_login_box';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('bbs_login_box',         '掲示板 - ログイン',            'BBML', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, '掲示板の会員ログイン用ボックス。', 'md5',        false,           false,       true,         true,        false,        false,               false,true,               100, now(),    now());
DELETE FROM _widgets WHERE wd_id = 'contactus';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('contactus',          'お問い合わせメール送信',            'CONU', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'お問い合わせの入力データをメールで送る。',          false,           false,       true,         true,        true,        false,               false,true,               0, now(),    now());
DELETE FROM _widgets WHERE wd_id = 'joomla_clock';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('joomla_clock',           'Joomla時計',               'JMCK', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Joomlaロゴの時計。',          false,           false,       true,         true,        false,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'qrcode';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('qrcode',           'QRコード',               'QRVW', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'QRコードを作成表示。',         false,           false,       true,         true,        true,        true,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'youtube';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('youtube',     'YouTube',           'YOUT', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'YouTubeの投稿動画を表示。',         false,           false,       true,         true,        true,        false,               true,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'flash';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('flash',     'Flash',           '', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Flashファイルを表示。',         false,           false,       true,         true,        true,        false,               true,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'image';
INSERT INTO _widgets
(wd_id,   wd_name, wd_type, wd_version, wd_params, wd_author,      wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('image', '画像',  'IMAG',  '1.0.0',    '',        'Naoki Hirata', 'Magic3.org', 'GPL',      10, '様々な画像を表示。',               false,           false,       true,         true,        true,         false,                                true,                true,              0,               now(),         now());
DELETE FROM _widgets WHERE wd_id = 'release_info';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('release_info',               'Magic3リリース情報',                   'RINF', '1.0.0',  '',  'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Magic3の最新リリース情報を表示。',      false,           false,       true,         true,        false,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'reserve_main';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('reserve_main',            '予約 - メイン',         'RESM', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, '予約管理のメインプログラム。',          false,           false,       true,         true,        true,         true,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'ec_product_random_box';
INSERT INTO _widgets
(wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('ec_product_random_box',               'Eコマース - 商品ランダム表示',                   'ECPR', '1.0.0',  '',  'Naoki Hirata', 'Magic3.org', 'GPL', 10, '商品をランダムに表示する。', 'jquery.easing,jquery.jcarousel',    false,           true,       true,         true,        true,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'blog_category_menu';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('blog_category_menu',   'ブログ - カテゴリーメニュー', 'BGCM', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ブログカテゴリメニュー',          false,           false,       true,         true,        false,         false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'blog_archive_menu';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('blog_archive_menu',   'ブログ - アーカイブメニュー', 'BGAM', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'ブログアーカイブメニュー',          false,           false,       true,         true,        false,         false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'test_fckeditor';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('test_fckeditor',     'FCKEditorテスト用',           'TSFC', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'FCKEditorテスト用のプログラム',          false,           false,       true,         true,        true,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'photoslide';
INSERT INTO _widgets
(wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib, wd_add_script_lib_a, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('photoslide',               '画像スライドショー',                   '', '1.0.0',  '',  'Naoki Hirata', 'Magic3.org', 'GPL', 10, '画像をスライドショー表示する。', 'jquery.cycle', 'jquery.cycle',   false,           false,       true,         true,        true,        false,               true,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'phpcode';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib_a, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('phpcode',     'PHPコード実行',           '', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'PHPのプログラムコードを実行。', 'jquery.codepress',        false,           false,       true,         true,        true,        false,               true,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'g_analytics';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('g_analytics',     'Google Analytics',           '', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Google Analytics トラッキングコードを出力する。',          false,           false,       true,         true,        true,        false,               false,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'g_qrcode';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('g_qrcode',     'Google QRコード',           '', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Google APIを使ったQRコード表示。',         false,           false,       true,         true,        true,        false,               true,true,           0, now(), now());
DELETE FROM _widgets WHERE wd_id = 'wiki_main';
INSERT INTO _widgets (wd_id, wd_name, wd_type, wd_version, wd_params, wd_author, wd_copyright, wd_license, wd_official_level, wd_description, wd_add_script_lib, wd_add_script_lib_a, wd_read_scripts, wd_read_css, wd_available, wd_editable, wd_has_admin, wd_enable_operation, wd_use_instance_def, wd_is_initialized, wd_launch_index, wd_install_dt, wd_create_dt) VALUES
('wiki_main',          'Wiki - メイン',            '', '1.0.0',  '',        'Naoki Hirata', 'Magic3.org', 'GPL', 10, 'Wikiを表示する。(実装中)', 'md5', 'md5',         false,           true,       true,         true,        true,        false,               false,true,               0, now(),    now());

-- ウィジェット情報(携帯用)
DELETE FROM _widgets WHERE wd_id = 'm/sample';
INSERT INTO _widgets
(wd_id,      wd_name,          wd_type, wd_version, wd_params, wd_author,      wd_copyright, wd_license, wd_official_level, wd_description, wd_mobile, wd_has_admin, wd_is_initialized, wd_install_dt, wd_create_dt) VALUES
('m/sample', '携帯用サンプル', 'MSAM',  '1.0.0',    '',        'Naoki Hirata', 'Magic3.org', 'GPL',      10, '携帯用表示サンプルプログラム。日付を表示。',               true,      false,         true,              now(),         now());
DELETE FROM _widgets WHERE wd_id = 'm/sample_input';
INSERT INTO _widgets
(wd_id,      wd_name,          wd_type, wd_version, wd_params, wd_author,      wd_copyright, wd_license, wd_official_level, wd_description, wd_mobile, wd_has_admin, wd_is_initialized, wd_install_dt, wd_create_dt) VALUES
('m/sample_input', '携帯用サンプル入力', 'MSAI',  '1.0.0',    '',        'Naoki Hirata', 'Magic3.org', 'GPL',      10, '携帯用入力サンプルプログラム',               true,      false,         true,              now(),         now());
DELETE FROM _widgets WHERE wd_id = 'm/contactus';
INSERT INTO _widgets
(wd_id,      wd_name,          wd_type, wd_version, wd_params, wd_author,      wd_copyright, wd_license, wd_official_level, wd_description, wd_mobile, wd_has_admin, wd_is_initialized, wd_install_dt, wd_create_dt) VALUES
('m/contactus', 'お問い合わせメール送信', 'MCON',  '1.0.0',    '',        'Naoki Hirata', 'Magic3.org', 'GPL',      10, 'お問い合わせの入力データをメールで送る。',               true,      true,         true,              now(),         now());
DELETE FROM _widgets WHERE wd_id = 'm/custom_footer';
INSERT INTO _widgets
(wd_id,      wd_name,          wd_type, wd_version, wd_params, wd_author,      wd_copyright, wd_license, wd_official_level, wd_description, wd_mobile, wd_has_admin, wd_is_initialized, wd_install_dt, wd_create_dt) VALUES
('m/custom_footer', 'カスタムフッタ', 'MCSF',  '1.0.0',    '',        'Naoki Hirata', 'Magic3.org', 'GPL',      10, 'フッタ部に表示し、著作権等の表示を行う。',               true,      true,         true,              now(),         now());
DELETE FROM _widgets WHERE wd_id = 'm/mainmenu';
INSERT INTO _widgets
(wd_id,      wd_name,          wd_type, wd_version, wd_params, wd_author,      wd_copyright, wd_license, wd_official_level, wd_description, wd_mobile, wd_has_admin, wd_is_initialized, wd_install_dt, wd_create_dt) VALUES
('m/mainmenu', 'メインメニュー', 'MMEN',  '1.0.0',    '',        'Naoki Hirata', 'Magic3.org', 'GPL',      10, '常に表示するメインメニュー。',               true,      true,         true,              now(),         now());
DELETE FROM _widgets WHERE wd_id = 'm/content';
INSERT INTO _widgets
(wd_id,      wd_name,          wd_type, wd_version, wd_params, wd_author,      wd_copyright, wd_license, wd_official_level, wd_description, wd_mobile, wd_has_admin, wd_is_initialized, wd_install_dt, wd_create_dt) VALUES
('m/content', 'コンテンツ', 'content',  '1.0.0',    '',        'Naoki Hirata', 'Magic3.org', 'GPL',      10, 'コンテンツ表示。',               true,      true,         true,              now(),         now());
DELETE FROM _widgets WHERE wd_id = 'm/pc_content';
INSERT INTO _widgets
(wd_id,      wd_name,          wd_type, wd_version, wd_params, wd_author,      wd_copyright, wd_license, wd_official_level, wd_description, wd_mobile, wd_has_admin, wd_is_initialized, wd_install_dt, wd_create_dt) VALUES
('m/pc_content', 'PC共通コンテンツ', 'content',  '1.0.0',    '',        'Naoki Hirata', 'Magic3.org', 'GPL',      10, 'PC共通コンテンツ表示。',               true,      true,         true,              now(),         now());

-- テンプレート情報
TRUNCATE TABLE _templates;
INSERT INTO _templates (tm_id,         tm_name,      tm_description, tm_default, tm_create_dt) 
VALUES                 ('a6greyflash', 'a6greyflash','',             true,      now());
INSERT INTO _templates (tm_id,         tm_name,      tm_description, tm_default, tm_create_dt) 
VALUES                 ('baki',        'baki',       '',             false,     now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('jt_millennium_expresso', 'jt_millennium_expresso', '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('jt_simplicity_red',      'jt_simplicity_red',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('baladibol',              'baladibol',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('eastertime-1.0',         'eastertime-1.0',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('ellipse',                'ellipse',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('freshgreen',             'freshgreen',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('psychic',                'psychic',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('rd_music',               'rd_music',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('siteground44',           'siteground44',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('browns',                 'browns',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('red_rose_beauty',        'red_rose_beauty',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('ec_simple_n2',           'ec_simple_n2',           '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('ec_simple_n2_pink',      'ec_simple_n2_pink',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('ec_simple_n3',           'ec_simple_n3',           '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('ec_simple_n3_aqua',      'ec_simple_n3_aqua',      '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('ec_simple_w2',           'ec_simple_w2',           '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_create_dt) 
VALUES                 ('ec_simple_w3',           'ec_simple_w3',           '',             false,      now());
INSERT INTO _templates (tm_id,                    tm_name,                  tm_description, tm_default, tm_mobile, tm_create_dt) 
VALUES                 ('m/default',             'm/default',             '',             true,       true,      now());

-- 基本テーブルの不要なデータを削除
-- 画面定義
DELETE FROM _page_def WHERE pd_id = 'index';

-- 画面定義(携帯用)
DELETE FROM _page_def WHERE pd_id = 'm_index';
INSERT INTO _page_def
(pd_id,         pd_sub_id, pd_position_id, pd_index, pd_widget_id, pd_config_id, pd_visible, pd_editable, pd_update_dt)
VALUES
('m_index',     'content', 'main',         1,        'm/sample',  0,            true,       true,        now());
INSERT INTO _page_def
(pd_id,         pd_sub_id, pd_position_id, pd_index, pd_widget_id, pd_config_id, pd_visible, pd_editable, pd_update_dt)
VALUES
('m_index',     'content', 'main',         3,        'm/sample_input',  0,            true,       true,        now());
