-- http://www.phpmyadmin.net
--
-- 主機: localhost:3306
-- 建立日期: 2015 年 12 月 28 日 16:15
-- 伺服器版本: 5.6.27
-- PHP 版本: 5.4.31
-- 若有需要請使用使用 root 還原(vrw密碼)




--
-- 資料庫: `netjiesh_newsletter`
--

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_blacklist`
--

CREATE TABLE IF NOT EXISTS `lethe_blacklist` (
  `ID` bigint(15) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `email` varchar(255) NOT NULL,
  `ipAddr` varchar(255) NOT NULL,
  `reasons` int(11) NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_campaigns`
--

CREATE TABLE IF NOT EXISTS `lethe_campaigns` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `UID` int(11) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `details` text NOT NULL,
  `alt_details` text,
  `launch_date` datetime NOT NULL,
  `attach` varchar(255) DEFAULT NULL,
  `webOpt` tinyint(2) NOT NULL DEFAULT '0',
  `campaign_key` varchar(50) DEFAULT NULL,
  `campaign_type` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0=Newsletter 1=Autoresponder',
  `campaign_pos` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0=Pending, 1=Sending, 2=Stopped, 3=Completed',
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `campaign_sender_title` varchar(255) NOT NULL,
  `campaign_reply_mail` varchar(255) NOT NULL,
  `campaign_sender_account` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- 資料表的匯出資料 `lethe_campaigns`
--

INSERT INTO `lethe_campaigns` (`ID`, `OID`, `UID`, `subject`, `details`, `alt_details`, `launch_date`, `attach`, `webOpt`, `campaign_key`, `campaign_type`, `campaign_pos`, `add_date`, `campaign_sender_title`, `campaign_reply_mail`, `campaign_sender_account`) VALUES
(1, 1, 2, 'demo mail', '<!DOCTYPE html>\r\n<html>\r\n<head>\r\n</head>\r\n<body>\r\n<p>Dear</p>\r\n<p> </p>\r\n<p>test </p>\r\n</body>\r\n</html>', 'test', '2015-12-24 15:00:00', NULL, 1, 'bb3f67d71d204aa0e78f71895bf10f1f', 0, 0, '2015-12-24 08:39:22', 'tk02771', 'wlong128@gmail.com', 1);

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_campaign_ar`
--

CREATE TABLE IF NOT EXISTS `lethe_campaign_ar` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `CID` int(11) NOT NULL,
  `ar_type` tinyint(2) NOT NULL COMMENT '0-After Subscription, 1-After Unsubscription, 2-Specific Date, 3-Special Date',
  `ar_time` smallint(5) NOT NULL DEFAULT '1' COMMENT 'Number as 1 minute, 1hour',
  `ar_time_type` varchar(30) NOT NULL COMMENT 'MINUTE, HOUR, DAY, MONTH, YEAR',
  `ar_end_date` datetime NOT NULL,
  `ar_week_0` tinyint(2) NOT NULL DEFAULT '0' COMMENT 'Sunday',
  `ar_week_1` tinyint(2) NOT NULL DEFAULT '0' COMMENT 'Monday',
  `ar_week_2` tinyint(2) NOT NULL DEFAULT '0' COMMENT 'Tuesday',
  `ar_week_3` tinyint(2) NOT NULL DEFAULT '0' COMMENT 'Wednesday',
  `ar_week_4` tinyint(2) NOT NULL DEFAULT '0' COMMENT 'Thursday',
  `ar_week_5` tinyint(2) NOT NULL DEFAULT '0' COMMENT 'Friday',
  `ar_week_6` tinyint(2) NOT NULL DEFAULT '0' COMMENT 'Saturday',
  `ar_end` tinyint(2) NOT NULL DEFAULT '0' COMMENT 'On/Off',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_campaign_groups`
--

CREATE TABLE IF NOT EXISTS `lethe_campaign_groups` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL DEFAULT '0',
  `CID` int(11) NOT NULL DEFAULT '0',
  `GID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;

--
-- 資料表的匯出資料 `lethe_campaign_groups`
--

INSERT INTO `lethe_campaign_groups` (`ID`, `OID`, `CID`, `GID`) VALUES
(1, 1, 1, 2);

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_chronos`
--

CREATE TABLE IF NOT EXISTS `lethe_chronos` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `CID` int(11) NOT NULL,
  `pos` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0-In Process, 1-Flag for Remove',
  `cron_command` tinytext NOT NULL,
  `launch_date` datetime NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `SAID` int(11) NOT NULL DEFAULT '0' COMMENT 'Submission Account',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;

--
-- 資料表的匯出資料 `lethe_chronos`
--

INSERT INTO `lethe_chronos` (`ID`, `OID`, `CID`, `pos`, `cron_command`, `launch_date`, `add_date`, `SAID`) VALUES
(1, 1, 0, 0, '*/5 * * * * curl -s ''http://newsletter.jiesheng.net.tw/chronos/lethe.bounce.php?ID=1'' > /dev/null 2>&1', '2015-12-10 13:41:21', '2015-12-10 05:41:21', 1),
(2, 1, 1, 1, '* * * * * curl -s ''http://newsletter.jiesheng.net.tw/chronos/lethe.tasks.php?ID=1'' > /dev/null 2>&1', '2015-12-24 16:40:00', '2015-12-24 08:39:22', 0),
(3, 1, 1, 1, '* * * * * curl -s ''http://newsletter.jiesheng.net.tw/chronos/lethe.tasks.php?ID=1'' > /dev/null 2>&1', '2015-12-24 16:43:00', '2015-12-24 08:42:43', 0),
(4, 1, 1, 1, '* * * * * curl -s ''http://newsletter.jiesheng.net.tw/chronos/lethe.tasks.php?ID=1'' > /dev/null 2>&1', '2015-12-24 16:45:00', '2015-12-24 08:44:10', 0),
(5, 1, 1, 1, '* * * * * curl -s ''http://newsletter.jiesheng.net.tw/chronos/lethe.tasks.php?ID=1'' > /dev/null 2>&1', '2015-12-24 16:47:00', '2015-12-24 08:46:54', 0),
(6, 1, 1, 1, '* * * * * curl -s ''http://newsletter.jiesheng.net.tw/chronos/lethe.tasks.php?ID=1'' > /dev/null 2>&1', '2015-12-24 16:50:00', '2015-12-24 08:47:57', 0),
(7, 1, 1, 0, '* * * * * curl -s ''http://newsletter.jiesheng.net.tw/chronos/lethe.tasks.php?ID=1'' > /dev/null 2>&1', '2015-12-24 15:00:00', '2015-12-24 08:49:28', 0);

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_organizations`
--

CREATE TABLE IF NOT EXISTS `lethe_organizations` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `orgTag` varchar(30) NOT NULL,
  `orgName` varchar(255) NOT NULL,
  `addDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `billingDate` date NOT NULL,
  `isActive` tinyint(2) NOT NULL DEFAULT '0',
  `public_key` varchar(50) NOT NULL,
  `private_key` varchar(50) NOT NULL,
  `isPrimary` tinyint(2) NOT NULL DEFAULT '0',
  `ip_addr` varchar(50) NOT NULL,
  `api_key` varchar(50) NOT NULL,
  `daily_sent` int(11) NOT NULL DEFAULT '0',
  `daily_reset` datetime NOT NULL,
  `rss_url` varchar(255) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=2 ;

--
-- 資料表的匯出資料 `lethe_organizations`
--

INSERT INTO `lethe_organizations` (`ID`, `orgTag`, `orgName`, `addDate`, `billingDate`, `isActive`, `public_key`, `private_key`, `isPrimary`, `ip_addr`, `api_key`, `daily_sent`, `daily_reset`, `rss_url`) VALUES
(1, 'jiesheng-427dc1e74eef', 'jieshengXXXX', '2015-12-10 05:42:31', '0000-00-00', 1, 'f5e04c4404257fcb31d9389b90f323da', '9b13b7c7ab9546ac79c3492d16fca97f', 1, '43.254.16.135', 'YTE4YTg5MzhjZjEzOTc3NWQ5YzA0YjNi', 6, '0000-00-00 00:00:00', 'http://newsletter.jiesheng.net.tw/lethe.newsletter.php?pos=rss&oid=f5e04c4404257fcb31d9389b90f323da');

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_organization_settings`
--

CREATE TABLE IF NOT EXISTS `lethe_organization_settings` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL DEFAULT '0',
  `set_key` varchar(255) NOT NULL,
  `set_val` text NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=22 ;

--
-- 資料表的匯出資料 `lethe_organization_settings`
--

INSERT INTO `lethe_organization_settings` (`ID`, `OID`, `set_key`, `set_val`) VALUES
(1, 1, 'org_max_user', '0'),
(2, 1, 'org_max_newsletter', '0'),
(3, 1, 'org_max_autoresponder', '0'),
(4, 1, 'org_max_subscriber', '0'),
(5, 1, 'org_max_subscriber_group', '0'),
(6, 1, 'org_max_subscribe_form', '0'),
(7, 1, 'org_max_blacklist', '0'),
(8, 1, 'org_max_template', '0'),
(9, 1, 'org_max_daily_limit', '0'),
(10, 1, 'org_standby_organization', '0'),
(11, 1, 'org_submission_account', '1'),
(12, 1, 'org_sender_title', 'jiesheng'),
(13, 1, 'org_reply_mail', 'service@jiesheng.com.tw'),
(14, 1, 'org_test_mail', 'vincen@jiesheng.com.tw'),
(15, 1, 'org_timezone', 'Asia/Taipei'),
(16, 1, 'org_after_unsubscribe', '2'),
(17, 1, 'org_verification', '0'),
(18, 1, 'org_random_load', '1'),
(19, 1, 'org_load_type', '0'),
(20, 1, 'org_max_shortcode', '0'),
(21, 1, 'org_max_disk_quota', '0');

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_reports`
--

CREATE TABLE IF NOT EXISTS `lethe_reports` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `CID` int(11) NOT NULL,
  `pos` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0=Click, 1=Open, 2=Bounce',
  `ipAddr` varchar(30) NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `email` varchar(100) NOT NULL,
  `hit_cnt` int(11) NOT NULL DEFAULT '0',
  `bounceType` varchar(50) NOT NULL DEFAULT 'unknown',
  `extra_info` text NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_short_codes`
--

CREATE TABLE IF NOT EXISTS `lethe_short_codes` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL DEFAULT '0',
  `code_key` varchar(255) NOT NULL,
  `code_val` varchar(255) NOT NULL,
  `isSystem` tinyint(2) NOT NULL DEFAULT '0',
  `UID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_submission_accounts`
--

CREATE TABLE IF NOT EXISTS `lethe_submission_accounts` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `acc_title` varchar(255) NOT NULL,
  `daily_limit` int(11) NOT NULL,
  `daily_sent` int(11) NOT NULL,
  `daily_reset` datetime NOT NULL,
  `limit_range` int(11) NOT NULL DEFAULT '1440' COMMENT 'Limit range saved as minute',
  `send_per_conn` int(11) NOT NULL,
  `standby_time` int(11) NOT NULL,
  `systemAcc` tinyint(2) NOT NULL,
  `isDebug` tinyint(2) NOT NULL,
  `isActive` tinyint(2) NOT NULL,
  `from_title` varchar(255) NOT NULL,
  `from_mail` varchar(100) NOT NULL,
  `reply_mail` varchar(100) NOT NULL,
  `test_mail` varchar(100) NOT NULL,
  `mail_type` tinyint(2) NOT NULL,
  `send_method` tinyint(2) NOT NULL,
  `mail_engine` varchar(30) NOT NULL,
  `smtp_host` varchar(100) NOT NULL,
  `smtp_port` int(5) NOT NULL,
  `smtp_user` varchar(100) NOT NULL,
  `smtp_pass` varchar(100) NOT NULL,
  `smtp_secure` tinyint(2) NOT NULL DEFAULT '0',
  `pop3_host` varchar(100) NOT NULL,
  `pop3_port` int(5) NOT NULL,
  `pop3_user` varchar(100) NOT NULL,
  `pop3_pass` varchar(100) NOT NULL,
  `pop3_secure` tinyint(2) NOT NULL DEFAULT '0',
  `imap_host` varchar(100) NOT NULL,
  `imap_port` int(5) NOT NULL,
  `imap_user` varchar(100) NOT NULL,
  `imap_pass` varchar(100) NOT NULL,
  `imap_secure` tinyint(2) NOT NULL DEFAULT '0',
  `smtp_auth` tinyint(2) NOT NULL,
  `bounce_acc` tinyint(2) NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `aws_access_key` varchar(100) DEFAULT NULL,
  `aws_secret_key` varchar(100) DEFAULT NULL,
  `account_id` varchar(50) NOT NULL,
  `dkim_active` tinyint(2) NOT NULL DEFAULT '0',
  `dkim_domain` varchar(255) DEFAULT NULL,
  `dkim_private` text,
  `dkim_selector` varchar(255) DEFAULT NULL,
  `dkim_passphrase` varchar(255) DEFAULT NULL,
  `bounce_actions` text NOT NULL,
  `mandrill_user` varchar(255) DEFAULT NULL,
  `mandrill_key` varchar(255) DEFAULT NULL,
  `sendgrid_user` varchar(100) DEFAULT NULL,
  `sendgrid_pass` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=2 ;

--
-- 資料表的匯出資料 `lethe_submission_accounts`
--

INSERT INTO `lethe_submission_accounts` (`ID`, `acc_title`, `daily_limit`, `daily_sent`, `daily_reset`, `limit_range`, `send_per_conn`, `standby_time`, `systemAcc`, `isDebug`, `isActive`, `from_title`, `from_mail`, `reply_mail`, `test_mail`, `mail_type`, `send_method`, `mail_engine`, `smtp_host`, `smtp_port`, `smtp_user`, `smtp_pass`, `smtp_secure`, `pop3_host`, `pop3_port`, `pop3_user`, `pop3_pass`, `pop3_secure`, `imap_host`, `imap_port`, `imap_user`, `imap_pass`, `imap_secure`, `smtp_auth`, `bounce_acc`, `add_date`, `aws_access_key`, `aws_secret_key`, `account_id`, `dkim_active`, `dkim_domain`, `dkim_private`, `dkim_selector`, `dkim_passphrase`, `bounce_actions`, `mandrill_user`, `mandrill_key`, `sendgrid_user`, `sendgrid_pass`) VALUES
(1, '# Server 1', 500, 6, '2015-12-11 13:41:21', 1440, 50, 1, 1, 0, 1, 'Test Sender', 'sender@example.com', 'reply@example.com', 'test@example.com', 0, 0, 'phpmailer', 'ssl://smtp.gmail.com', 465, 'wlong1281@gmail.com', '730800730800', 1, 'smtp.gmail.com', 110, 'info@jiesheng.net.tw', '730800730800', 0, 'mail.example.com', 143, 'sender@example.com', '730800730800', 0, 1, 0, '2015-12-10 05:41:21', '', '', 'bb7284e293cd67f83cc59f3a053d3fa5', 0, '', '', '', '', '{"antispam":"1","autoreply":"1","concurrent":"1","content_reject":"1","command_reject":"1","internal_error":"1","defer":"1","delayed":"1","dns_loop":"1","dns_unknown":"1","full":"1","inactive":"1","latin_only":"1","other":"1","oversize":"1","outofoffice":"1","unknown":"1","unrecognized":"1","user_reject":"1","warning":"1"}', '', '', '', '');

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_subscribers`
--

CREATE TABLE IF NOT EXISTS `lethe_subscribers` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) DEFAULT NULL,
  `GID` int(11) DEFAULT NULL,
  `subscriber_name` varchar(255) DEFAULT NULL,
  `subscriber_mail` varchar(50) DEFAULT NULL,
  `subscriber_web` varchar(255) DEFAULT NULL,
  `subscriber_date` datetime DEFAULT NULL,
  `subscriber_phone` varchar(50) DEFAULT NULL,
  `subscriber_company` varchar(255) DEFAULT NULL,
  `subscriber_full_data` text,
  `subscriber_active` tinyint(2) DEFAULT NULL,
  `subscriber_verify` tinyint(2) DEFAULT NULL,
  `subscriber_key` varchar(50) DEFAULT NULL,
  `add_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `ip_addr` varchar(20) DEFAULT NULL,
  `subscriber_verify_key` varchar(50) NOT NULL,
  `subscriber_verify_sent_interval` datetime NOT NULL,
  `local_country` varchar(30) NOT NULL DEFAULT 'N/A',
  `local_country_code` varchar(5) NOT NULL DEFAULT 'N/A',
  `local_city` varchar(30) NOT NULL DEFAULT 'N/A',
  `local_region` varchar(30) NOT NULL DEFAULT 'N/A',
  `local_region_code` varchar(5) NOT NULL DEFAULT 'N/A',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=4 ;

--
-- 資料表的匯出資料 `lethe_subscribers`
--

INSERT INTO `lethe_subscribers` (`ID`, `OID`, `GID`, `subscriber_name`, `subscriber_mail`, `subscriber_web`, `subscriber_date`, `subscriber_phone`, `subscriber_company`, `subscriber_full_data`, `subscriber_active`, `subscriber_verify`, `subscriber_key`, `add_date`, `ip_addr`, `subscriber_verify_key`, `subscriber_verify_sent_interval`, `local_country`, `local_country_code`, `local_city`, `local_region`, `local_region_code`) VALUES
(1, 1, 2, 'Dragon Wu', 'tk02771@360d.com.tw', NULL, NULL, NULL, NULL, '[]', 1, 2, 'd9ccc200dd2f67dde3237e013ceb8deb', '2015-12-24 08:24:51', '220.132.2.151', '1bce02378b5c8c08c266daaadf64cac8', '0000-00-00 00:00:00', 'Taiwan', 'TW', 'Taipei', 'T&#039;ai-pei', '03'),
(2, 1, 2, 'Sophie Weng', 'sophiew@360d.com.tw', NULL, NULL, NULL, NULL, '[]', 1, 2, '39d6a34128ad6bea22a32fa98087624f', '2015-12-24 08:29:53', '220.132.2.151', '4841b09ebbce0145471ae96004388d0d', '0000-00-00 00:00:00', 'Taiwan', 'TW', 'Taipei', 'T&#039;ai-pei', '03'),
(3, 1, 2, 'abcdefg', 'abcdefg@360d.com.tw', NULL, NULL, NULL, NULL, '[]', 1, 2, 'f18d0d6a0695ac12d94be0ea68c5cb0a', '2015-12-24 08:35:24', '220.132.2.151', '849d75cd50dfa8598a1174390de812d9', '0000-00-00 00:00:00', 'Taiwan', 'TW', 'Taipei', 'T&#039;ai-pei', '03');

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_subscriber_groups`
--

CREATE TABLE IF NOT EXISTS `lethe_subscriber_groups` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `UID` int(11) NOT NULL,
  `group_name` varchar(255) NOT NULL,
  `isUnsubscribe` tinyint(2) NOT NULL DEFAULT '0',
  `isUngroup` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=3 ;

--
-- 資料表的匯出資料 `lethe_subscriber_groups`
--

INSERT INTO `lethe_subscriber_groups` (`ID`, `OID`, `UID`, `group_name`, `isUnsubscribe`, `isUngroup`) VALUES
(1, 1, 0, 'Unsubscribes', 1, 0),
(2, 1, 0, '360d', 0, 1);

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_subscribe_forms`
--

CREATE TABLE IF NOT EXISTS `lethe_subscribe_forms` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `form_name` varchar(255) NOT NULL,
  `form_id` varchar(50) NOT NULL,
  `form_type` tinyint(2) NOT NULL,
  `form_success_url` varchar(255) DEFAULT NULL,
  `form_success_url_text` varchar(255) DEFAULT NULL,
  `form_success_text` varchar(255) DEFAULT NULL,
  `form_success_redir` int(11) NOT NULL DEFAULT '0',
  `form_remove` tinyint(2) NOT NULL DEFAULT '0',
  `add_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `isSystem` tinyint(2) NOT NULL DEFAULT '0',
  `form_view` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0=Vertical, 1=Horizontal, 2=Table',
  `isDraft` tinyint(2) NOT NULL DEFAULT '1',
  `include_jquery` tinyint(2) NOT NULL DEFAULT '1',
  `include_jqueryui` tinyint(2) NOT NULL DEFAULT '1',
  `form_group` int(11) NOT NULL DEFAULT '0',
  `form_errors` tinytext NOT NULL,
  `subscription_stop` tinyint(2) NOT NULL DEFAULT '0',
  `UID` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=2 ;

--
-- 資料表的匯出資料 `lethe_subscribe_forms`
--

INSERT INTO `lethe_subscribe_forms` (`ID`, `OID`, `form_name`, `form_id`, `form_type`, `form_success_url`, `form_success_url_text`, `form_success_text`, `form_success_redir`, `form_remove`, `add_date`, `isSystem`, `form_view`, `isDraft`, `include_jquery`, `include_jqueryui`, `form_group`, `form_errors`, `subscription_stop`, `UID`) VALUES
(1, 1, 'System Form', 'LetheForm_3b509ee', 0, NULL, NULL, 'Your mail recorded successfully!', 0, 0, '2015-12-10 05:42:31', 1, 0, 0, 1, 1, 2, 'Incorrect Subscription Form[@]Your Mail Already Exists[@]You cannot add your mail, youâ€™ve been banned.[@]Subscription is stopped![@]Your E-Mail Successfully Removed!', 0, 0);

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_subscribe_form_fields`
--

CREATE TABLE IF NOT EXISTS `lethe_subscribe_form_fields` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `FID` int(11) NOT NULL,
  `field_label` varchar(255) NOT NULL,
  `field_name` varchar(30) NOT NULL,
  `field_type` varchar(30) NOT NULL,
  `field_required` tinyint(2) NOT NULL,
  `field_pattern` varchar(255) DEFAULT NULL,
  `field_placeholder` varchar(255) DEFAULT NULL,
  `sorting` int(11) NOT NULL DEFAULT '0',
  `field_data` varchar(255) DEFAULT NULL,
  `field_static` tinyint(2) NOT NULL DEFAULT '0',
  `field_save` varchar(20) NOT NULL,
  `field_error` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=3 ;

--
-- 資料表的匯出資料 `lethe_subscribe_form_fields`
--

INSERT INTO `lethe_subscribe_form_fields` (`ID`, `OID`, `FID`, `field_label`, `field_name`, `field_type`, `field_required`, `field_pattern`, `field_placeholder`, `sorting`, `field_data`, `field_static`, `field_save`, `field_error`) VALUES
(1, 1, 1, 'E-Mail', 'LetheForm_Mail', 'email', 1, NULL, 'E-Mail', 1, NULL, 1, 'subscriber_mail', 'Invalid E-Mail Address'),
(2, 1, 1, 'Save', 'LetheForm_Save', 'submit', 0, NULL, NULL, 2, NULL, 1, '', NULL);

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_tasks`
--

CREATE TABLE IF NOT EXISTS `lethe_tasks` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `CID` int(11) NOT NULL,
  `subscriber_mail` varchar(100) NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_templates`
--

CREATE TABLE IF NOT EXISTS `lethe_templates` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `UID` int(11) NOT NULL,
  `temp_name` varchar(255) NOT NULL,
  `temp_contents` longtext NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `temp_prev` varchar(255) DEFAULT '',
  `temp_type` varchar(20) NOT NULL DEFAULT 'normal',
  `isSystem` tinyint(2) NOT NULL DEFAULT '0',
  `temp_id` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=7 ;

--
-- 資料表的匯出資料 `lethe_templates`
--

INSERT INTO `lethe_templates` (`ID`, `OID`, `UID`, `temp_name`, `temp_contents`, `add_date`, `temp_prev`, `temp_type`, `isSystem`, `temp_id`) VALUES
(1, 1, 0, 'Verification Mail Template', '<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Lethe Newsletter Verification</title> </head> <body style="margin:0; padding:0; background-color:#EAEEEF; font-family:Tahoma; font-size:12px; color:#000;"> <p>&nbsp;</p> <!-- page content --> <div id="main_lay" style="width: 500px; margin: 50px auto; margin-bottom: 0; padding: 15px; background-color: #fff; -webkit-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); -moz-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); box-shadow: 2px 2px 5px 0px rgba(148,148,148,1);"> <h3>{ORGANIZATION_NAME}<br /><small style="color: #999;">E-Mail Verification</small></h3> <hr style="border: 1px solid #ededed; height: 1px;" /> <p>Hello {SUBSCRIBER_NAME},</p> <p>Welcome to {ORGANIZATION_NAME}! Please take a second to confirm <span style="color: #ec5500;">{SUBSCRIBER_MAIL}</span> as your email address by clicking this link:</p> <p><strong style="color: #0489b1;">{VERIFY_LINK[Click Here!]}</strong></p> <p>Once you do, you will be able to opt-in to notifications of activity and access other features that require a valid email address.</p> <p>Thank You!</p> <hr style="border: 1px solid #ededed; height: 1px;" /> <div style="background-color: #f2f2f2; padding: 7px;"><small> {company_name}<br /> {company_phone_1} - {company_phone_2} </small></div> </div> <div id="ext_lay" style="width: 500px; margin: 2px auto; padding: 15px;"><small>{LETHE_SAVE_TREE}</small></div> <!-- page content --> <p>&nbsp;</p> </body> </html>', '2015-12-10 05:42:31', 'http://newsletter.jiesheng.net.tw/admin/images/temp/verification_temp.png', 'verification', 1, NULL),
(2, 1, 0, 'Unsubscribe Page Template', '<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Lethe Newsletter Unsubscribe</title> </head> <body style="margin:0; padding:0; background-color:#EAEEEF; font-family:Tahoma; font-size:12px; color:#000;"> <p>&nbsp;</p> <!-- page content --> <div id="main_lay" style="width: 500px; margin: 50px auto; margin-bottom: 0; padding: 15px; background-color: #fff; -webkit-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); -moz-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); box-shadow: 2px 2px 5px 0px rgba(148,148,148,1);"> <h3>{ORGANIZATION_NAME}<br /><small style="color: #999;">Unsubscription</small></h3> <hr style="border: 1px solid #ededed; height: 1px;" /> <p>Hello {SUBSCRIBER_NAME},</p> <p>We are sorry to see you go :-(</p> <p>You have been successfully removed from this subscriber list. <br />You will no longer hear from us.</p> <p>{UNSUBSCRIBE_SURVEY}</p> <p>Thank You!</p> <hr style="border: 1px solid #ededed; height: 1px;" /> <div style="background-color: #f2f2f2; padding: 7px;"><small> {company_name}<br /> {company_phone_1} - {company_phone_2} </small></div> </div> <!-- page content --> <p>&nbsp;</p> </body> </html>', '2015-12-10 05:42:31', 'http://newsletter.jiesheng.net.tw/admin/images/temp/unsubscribe_temp.png', 'unsubscribe', 1, NULL),
(3, 1, 0, 'Subscription Thank Template', ' <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Lethe Newsletter Subscription</title> </head> <body style="margin:0; padding:0; background-color:#EAEEEF; font-family:Tahoma; font-size:12px; color:#000;"> <p>&nbsp;</p> <!-- page content --> <div id="main_lay" style="width: 500px; margin: 50px auto; margin-bottom: 0; padding: 15px; background-color: #fff; -webkit-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); -moz-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); box-shadow: 2px 2px 5px 0px rgba(148,148,148,1);"> <h3>{ORGANIZATION_NAME}<br /><small style="color: #999;">Subscription</small></h3> <hr style="border: 1px solid #ededed; height: 1px;" /> <h1>Thank You!</h1> <p>Hello {SUBSCRIBER_NAME},</p> <p>Thank you for subscribing to our newsletter.</p> <p>Your subscription is now complete!</p> <hr style="border: 1px solid #ededed; height: 1px;" /> <div style="background-color: #f2f2f2; padding: 7px;"><small> {company_name}<br /> {company_phone_1} - {company_phone_2} </small></div> </div> <!-- page content --> <p>&nbsp;</p> </body> </html>', '2015-12-10 05:42:31', 'http://newsletter.jiesheng.net.tw/admin/images/temp/thank_temp.png', 'thank', 1, NULL),
(4, 1, 0, 'No Record Found Template', '<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>No Record Found</title> </head> <body style="margin:0; padding:0; background-color:#EAEEEF; font-family:Tahoma; font-size:12px; color:#000;"> <p> </p> <!-- page content --> <div id="main_lay" style="width: 500px; margin: 50px auto; margin-bottom: 0; padding: 15px; background-color: #fff; -webkit-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); -moz-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); box-shadow: 2px 2px 5px 0px rgba(148,148,148,1);"> <h3>{ORGANIZATION_NAME}<br /><small style="color: #999;">Error Occurred<br /></small></h3> <hr style="border: 1px solid #ededed; height: 1px;" /> <h1><span style="color: #ff0000;">There No Record Found!</span></h1> Please try again or contact with web administration.<br /><br />Thank you!<br /><br /><hr style="border: 1px solid #ededed; height: 1px;" /> <div style="background-color: #f2f2f2; padding: 7px;"><small> {ORGANIZATION_NAME}<br /></small></div> </div> <!-- page content --> <p> </p> </body> </html>', '2015-12-10 05:42:31', 'http://newsletter.jiesheng.net.tw/admin/images/temp/norecord_temp.png', 'norecord', 1, NULL),
(5, 1, 0, 'Error Occurred Template', '<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error Occurred</title> </head> <body style="margin:0; padding:0; background-color:#EAEEEF; font-family:Tahoma; font-size:12px; color:#000;"> <p> </p> <!-- page content --> <div id="main_lay" style="width: 500px; margin: 50px auto; margin-bottom: 0; padding: 15px; background-color: #fff; -webkit-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); -moz-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); box-shadow: 2px 2px 5px 0px rgba(148,148,148,1);"> <h3>{ORGANIZATION_NAME}<br /><small style="color: #999;">Error Occurred<br /></small></h3> <hr style="border: 1px solid #ededed; height: 1px;" /> <h1><span style="color: #ff0000;">Error Occurred!</span></h1> There is error occurred while request this page!<br /><br />Please try again or contact with web administration.<br /><br />Thank you!<br /><br /><hr style="border: 1px solid #ededed; height: 1px;" /> <div style="background-color: #f2f2f2; padding: 7px;"><small> {ORGANIZATION_NAME}<br /></small></div> </div> <!-- page content --> <p> </p> </body> </html>', '2015-12-10 05:42:31', 'http://newsletter.jiesheng.net.tw/admin/images/temp/erroroccurred_temp.png', 'erroroccurred', 1, NULL),
(6, 1, 0, 'Already Verified Template', '<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Already Verified</title> </head> <body style="margin:0; padding:0; background-color:#EAEEEF; font-family:Tahoma; font-size:12px; color:#000;"> <p> </p> <!-- page content --> <div id="main_lay" style="width: 500px; margin: 50px auto; margin-bottom: 0; padding: 15px; background-color: #fff; -webkit-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); -moz-box-shadow: 2px 2px 5px 0px rgba(148,148,148,1); box-shadow: 2px 2px 5px 0px rgba(148,148,148,1);"> <h3>{ORGANIZATION_NAME}<br /><small style="color: #999;">Subscription</small></h3> <hr style="border: 1px solid #ededed; height: 1px;" /> <h1>You have already verified!</h1> <p>Hello {SUBSCRIBER_NAME},</p> You have already been verified your account. Please remove this mail from your mailbox.<br /><br />Thank you!<br /><hr style="border: 1px solid #ededed; height: 1px;" /> <div style="background-color: #f2f2f2; padding: 7px;"><small> {ORGANIZATION_NAME}<br /></small></div> </div> <!-- page content --> <p> </p> </body> </html>', '2015-12-10 05:42:31', 'http://newsletter.jiesheng.net.tw/admin/images/temp/already_verified_temp.png', 'alreadyverified', 1, NULL);

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_unsubscribes`
--

CREATE TABLE IF NOT EXISTS `lethe_unsubscribes` (
  `ID` bigint(20) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `CID` int(11) NOT NULL DEFAULT '0',
  `subscriber_mail` varchar(100) NOT NULL,
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_users`
--

CREATE TABLE IF NOT EXISTS `lethe_users` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL DEFAULT '0',
  `real_name` varchar(100) NOT NULL,
  `mail` varchar(100) NOT NULL,
  `pass` varchar(50) NOT NULL,
  `auth_mode` tinyint(2) NOT NULL DEFAULT '0' COMMENT '0=User, 1=Admin, 2=Super Admin',
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `last_login` datetime NOT NULL,
  `isActive` tinyint(2) NOT NULL DEFAULT '0',
  `isPrimary` tinyint(2) NOT NULL DEFAULT '0',
  `session_token` varchar(50) NOT NULL,
  `session_time` datetime NOT NULL,
  `private_key` varchar(50) NOT NULL,
  `public_key` varchar(50) NOT NULL,
  `user_spec_view` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=4 ;

--
-- 資料表的匯出資料 `lethe_users`
--

INSERT INTO `lethe_users` (`ID`, `OID`, `real_name`, `mail`, `pass`, `auth_mode`, `add_date`, `last_login`, `isActive`, `isPrimary`, `session_token`, `session_time`, `private_key`, `public_key`, `user_spec_view`) VALUES
(1, 1, 'jiesheng', 'service@jiesheng.com.tw', '45f98282cebe9a5cbbd3f9aa0fa3d74b', 2, '2015-12-10 05:42:31', '2015-12-24 16:58:14', 1, 1, 'd915960a62a4216809ee1f5fcbb670a6', '2015-12-24 20:14:54', 'feeb28edd3729652eee6cfac76e30e2b', '737f33fd38e0dbde272709f26994d15a', 0),
(2, 1, 'Dragon', 'wlong128@hotmail.com', 'f3fd7a0f69e4fed93c523ece7991eb7a', 0, '2015-12-14 05:26:27', '2015-12-24 16:23:17', 1, 0, 'e0aa46a884bb2b756622047a41c48eff', '2015-12-24 19:39:57', '701c9b704b46b5ea0571c686d48080ba', 'd6fa44bded4666be9309b20a777b25b5', 0),
(3, 0, 'Dragon', 'tk02771@360d.com.tw', 'f3fd7a0f69e4fed93c523ece7991eb7a', 2, '2015-12-21 09:21:40', '0000-00-00 00:00:00', 1, 0, '', '0000-00-00 00:00:00', 'c548d1d1ad545ffd4d9a4051013cfd65', '8ce12923ae842ab5581d70050e3db2e3', 0);

-- --------------------------------------------------------

--
-- 資料表結構 `lethe_user_permissions`
--

CREATE TABLE IF NOT EXISTS `lethe_user_permissions` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `OID` int(11) NOT NULL,
  `UID` int(11) NOT NULL,
  `perm` varchar(255) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=32 ;

--
-- 資料表的匯出資料 `lethe_user_permissions`
--

INSERT INTO `lethe_user_permissions` (`ID`, `OID`, `UID`, `perm`) VALUES
(1, 1, 2, 'autoresponder'),
(2, 1, 2, 'autoresponder/add'),
(3, 1, 2, 'autoresponder/edit'),
(4, 1, 2, 'autoresponder/tasks'),
(5, 1, 2, 'newsletter'),
(6, 1, 2, 'newsletter/add'),
(7, 1, 2, 'newsletter/campaigns'),
(8, 1, 2, 'newsletter/edit'),
(9, 1, 2, 'newsletter/reports'),
(10, 1, 2, 'organizations'),
(11, 1, 2, 'organizations/organization'),
(12, 1, 2, 'organizations/organization/edit'),
(13, 1, 2, 'organizations/shortcodes'),
(14, 1, 2, 'organizations/users'),
(15, 1, 2, 'organizations/users/add'),
(16, 1, 2, 'organizations/users/edit'),
(17, 1, 2, 'subscribers'),
(18, 1, 2, 'subscribers/blacklist'),
(19, 1, 2, 'subscribers/exp-imp'),
(20, 1, 2, 'subscribers/forms/add'),
(21, 1, 2, 'subscribers/forms/edit'),
(22, 1, 2, 'subscribers/forms/list'),
(23, 1, 2, 'subscribers/groups'),
(24, 1, 2, 'subscribers/subscriber/add'),
(25, 1, 2, 'subscribers/subscriber/edit'),
(26, 1, 2, 'subscribers/subscriber/list'),
(27, 1, 2, 'templates'),
(28, 1, 2, 'templates/add'),
(29, 1, 2, 'templates/edit'),
(30, 1, 2, 'templates/list'),
(31, 1, 2, 'templates/loader');

