-- MySQL dump 10.11
--
-- Host: localhost    Database: _db_account
-- ------------------------------------------------------
-- Server version	5.0.51a

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `m_account`
--

DROP TABLE IF EXISTS `m_account`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `m_account` (
  `id_account` int(11) NOT NULL auto_increment,
  `c_account` varchar(50) NOT NULL default '',
  `c_handle` varchar(100) NOT NULL default '',
  `c_fullname` varchar(100) NOT NULL default '',
  `c_email` varchar(255) NOT NULL default '',
  `c_password` varchar(100) NOT NULL default '',
  `c_registtime` timestamp NOT NULL default '0000-00-00 00:00:00',
  `c_updatetime` timestamp NOT NULL default '0000-00-00 00:00:00',
  `c_delete` int(10) unsigned NOT NULL,
  `c_admin` varchar(10) NOT NULL default '',
  `c_msg` varchar(300) NOT NULL default '',
  `c_id_mgr_pass` varchar(100) NOT NULL,
  `c_album_folder` varchar(255) NOT NULL,
  `c_body_background_color` varchar(10) NOT NULL,
  `c_home_address` varchar(200) NOT NULL,
  `c_cal_sbj_use` varchar(10) NOT NULL,
  `c_email_calendar` varchar(255) NOT NULL,
  `c_home_address2` varchar(200) NOT NULL,
  `c_zip1` varchar(10) NOT NULL,
  `c_zip2` varchar(10) NOT NULL,
  `c_page_navi_link_color` varchar(20) NOT NULL,
  `c_page_navi_link_bg` varchar(20) NOT NULL,
  `c_page_navi_current_color` varchar(20) NOT NULL,
  `c_page_navi_current_bg` varchar(20) NOT NULL,
  `c_page_navi_hover_color` varchar(20) NOT NULL,
  `c_page_navi_hover_bg` varchar(20) NOT NULL,
  `c_page_navi_active_color` varchar(20) NOT NULL,
  `c_page_navi_active_bg` varchar(20) NOT NULL,
  `c_home_station` varchar(50) NOT NULL,
  `c_profile_image` varchar(50) NOT NULL,
  PRIMARY KEY  (`id_account`),
  UNIQUE KEY `c_account` (`c_account`)
) ENGINE=MyISAM AUTO_INCREMENT=10013 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `m_account`
--

LOCK TABLES `m_account` WRITE;
/*!40000 ALTER TABLE `m_account` DISABLE KEYS */;
INSERT INTO `m_account` VALUES (10001,'tarou','太郎','山田太郎','','demo','2008-09-14 15:00:00','2011-03-04 22:25:59',0,'admin','','demo','DOCUMENT_ROOT/_myhome/z_photo_sample','#f4ffff','東京都中央区銀座１－２－４','','','銀座マンション ２０１','104','0061','','','','','','','','','銀座','p-10001-wasao.jpg'),(10002,'kazoku','共通','','','demo','2008-09-14 15:00:00','2011-03-04 09:59:22',0,'','','demo','','#f4ffe8','東京都新宿区西新宿2-8-1','','','','','','','','','','','','','','西新宿','p-10002-cat.png'),(10003,'hanako','花子','山田花子','','demo','2008-09-14 15:00:00','2011-03-04 10:00:19',0,'','','demo','DOCUMENT_ROOT/_myhome/z_photo_sample','#fff8f0','','','','','','','','','','','','','','','','p-10003-flower.png');
/*!40000 ALTER TABLE `m_account` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `m_friends`
--

DROP TABLE IF EXISTS `m_friends`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `m_friends` (
  `id_friends` int(10) unsigned NOT NULL auto_increment,
  `id_account` int(10) unsigned NOT NULL,
  `id_member_id` int(10) unsigned NOT NULL,
  `c_delete` int(10) unsigned NOT NULL default '0',
  `c_registtime` datetime NOT NULL,
  `c_updatetime` datetime NOT NULL,
  `c_displayOrder` int(10) unsigned NOT NULL,
  PRIMARY KEY  USING BTREE (`id_friends`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `m_friends`
--

LOCK TABLES `m_friends` WRITE;
/*!40000 ALTER TABLE `m_friends` DISABLE KEYS */;
INSERT INTO `m_friends` VALUES (11,10001,10003,0,'2008-09-15 00:00:00','2008-09-15 00:00:00',2),(9,10003,10001,0,'2008-09-15 00:00:00','2008-09-15 00:00:00',2),(8,10003,10002,0,'2008-09-15 00:00:00','2008-09-15 00:00:00',1),(12,10001,10002,0,'2008-09-15 00:00:00','2008-09-15 00:00:00',1);
/*!40000 ALTER TABLE `m_friends` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `m_public`
--

DROP TABLE IF EXISTS `m_public`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `m_public` (
  `id_public` int(10) unsigned NOT NULL auto_increment,
  `id_account` int(10) unsigned NOT NULL,
  `id_permit_id` int(10) unsigned NOT NULL,
  `c_delete` int(10) unsigned NOT NULL default '0',
  `c_registtime` datetime NOT NULL,
  `c_updatetime` datetime NOT NULL,
  `id_permit_type` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`id_public`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `m_public`
--

LOCK TABLES `m_public` WRITE;
/*!40000 ALTER TABLE `m_public` DISABLE KEYS */;
INSERT INTO `m_public` VALUES (7,10002,10001,0,'2008-08-05 14:27:14','2008-08-05 14:38:43',60),(6,10002,10003,0,'2008-08-05 14:27:14','2008-08-05 14:38:43',60),(5,10001,10003,0,'2008-08-05 14:25:21','2008-08-05 14:39:24',30),(8,10003,10001,0,'2008-08-05 14:27:51','2008-08-05 14:37:33',30);
/*!40000 ALTER TABLE `m_public` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `r_permit_type`
--

DROP TABLE IF EXISTS `r_permit_type`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `r_permit_type` (
  `id_permit_type` int(10) unsigned NOT NULL default '0',
  `c_permit_type` varchar(45) NOT NULL,
  `c_delete` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  USING BTREE (`id_permit_type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `r_permit_type`
--

LOCK TABLES `r_permit_type` WRITE;
/*!40000 ALTER TABLE `r_permit_type` DISABLE KEYS */;
INSERT INTO `r_permit_type` VALUES (30,'参照許可',0),(60,'書込許可',0);
/*!40000 ALTER TABLE `r_permit_type` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Temporary table structure for view `v_account`
--

DROP TABLE IF EXISTS `v_account`;
/*!50001 DROP VIEW IF EXISTS `v_account`*/;
/*!50001 CREATE TABLE `v_account` (
  `id_account` int(11),
  `c_account` varchar(50),
  `c_handle` varchar(100),
  `c_fullname` varchar(100),
  `c_email` varchar(255),
  `c_password` varchar(100),
  `c_registtime` timestamp,
  `c_updatetime` timestamp,
  `c_delete` int(10) unsigned,
  `c_admin` varchar(10),
  `c_msg` varchar(300),
  `c_id_mgr_pass` varchar(100),
  `c_album_folder` varchar(255),
  `c_body_background_color` varchar(10),
  `c_home_address` varchar(200),
  `c_cal_sbj_use` varchar(10),
  `c_email_calendar` varchar(255),
  `c_home_address2` varchar(200),
  `c_zip1` varchar(10),
  `c_zip2` varchar(10),
  `c_page_navi_link_color` varchar(20),
  `c_page_navi_link_bg` varchar(20),
  `c_page_navi_current_color` varchar(20),
  `c_page_navi_current_bg` varchar(20),
  `c_page_navi_hover_color` varchar(20),
  `c_page_navi_hover_bg` varchar(20),
  `c_page_navi_active_color` varchar(20),
  `c_page_navi_active_bg` varchar(20),
  `c_home_station` varchar(50),
  `c_profile_image` varchar(50),
  `id_member_id` int(10) unsigned,
  `id_permit_id` int(10) unsigned
) */;

--
-- Temporary table structure for view `v_friends`
--

DROP TABLE IF EXISTS `v_friends`;
/*!50001 DROP VIEW IF EXISTS `v_friends`*/;
/*!50001 CREATE TABLE `v_friends` (
  `id_friends` int(10) unsigned,
  `id_account` int(10) unsigned,
  `id_member_id` int(10) unsigned,
  `c_delete` int(10) unsigned,
  `c_registtime` datetime,
  `c_updatetime` datetime,
  `c_displayOrder` int(10) unsigned,
  `c_account` varchar(50),
  `c_handle` varchar(100),
  `id_permit_type` int(10) unsigned,
  `c_permit_type` varchar(45)
) */;

--
-- Temporary table structure for view `v_public`
--

DROP TABLE IF EXISTS `v_public`;
/*!50001 DROP VIEW IF EXISTS `v_public`*/;
/*!50001 CREATE TABLE `v_public` (
  `id_public` int(10) unsigned,
  `id_account` int(10) unsigned,
  `id_permit_id` int(10) unsigned,
  `c_delete` int(10) unsigned,
  `c_registtime` datetime,
  `c_updatetime` datetime,
  `id_permit_type` int(10) unsigned,
  `c_handle` varchar(100),
  `c_permit_type` varchar(45)
) */;

--
-- Table structure for table `z_loginlog`
--

DROP TABLE IF EXISTS `z_loginlog`;
SET @saved_cs_client     = @@character_set_client;
SET character_set_client = utf8;
CREATE TABLE `z_loginlog` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `id_account` int(10) unsigned NOT NULL,
  `c_account` varchar(50) NOT NULL,
  `c_password` varchar(100) NOT NULL,
  `c_logintime` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  `c_status` varchar(45) NOT NULL,
  `c_change_id` int(10) unsigned NOT NULL default '0',
  `c_id_mgr_pass` varchar(100) NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
SET character_set_client = @saved_cs_client;

--
-- Dumping data for table `z_loginlog`
--

LOCK TABLES `z_loginlog` WRITE;
/*!40000 ALTER TABLE `z_loginlog` DISABLE KEYS */;
/*!40000 ALTER TABLE `z_loginlog` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Final view structure for view `v_account`
--

/*!50001 DROP TABLE `v_account`*/;
/*!50001 DROP VIEW IF EXISTS `v_account`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_account` AS select `m_account`.`id_account` AS `id_account`,`m_account`.`c_account` AS `c_account`,`m_account`.`c_handle` AS `c_handle`,`m_account`.`c_fullname` AS `c_fullname`,`m_account`.`c_email` AS `c_email`,`m_account`.`c_password` AS `c_password`,`m_account`.`c_registtime` AS `c_registtime`,`m_account`.`c_updatetime` AS `c_updatetime`,`m_account`.`c_delete` AS `c_delete`,`m_account`.`c_admin` AS `c_admin`,`m_account`.`c_msg` AS `c_msg`,`m_account`.`c_id_mgr_pass` AS `c_id_mgr_pass`,`m_account`.`c_album_folder` AS `c_album_folder`,`m_account`.`c_body_background_color` AS `c_body_background_color`,`m_account`.`c_home_address` AS `c_home_address`,`m_account`.`c_cal_sbj_use` AS `c_cal_sbj_use`,`m_account`.`c_email_calendar` AS `c_email_calendar`,`m_account`.`c_home_address2` AS `c_home_address2`,`m_account`.`c_zip1` AS `c_zip1`,`m_account`.`c_zip2` AS `c_zip2`,`m_account`.`c_page_navi_link_color` AS `c_page_navi_link_color`,`m_account`.`c_page_navi_link_bg` AS `c_page_navi_link_bg`,`m_account`.`c_page_navi_current_color` AS `c_page_navi_current_color`,`m_account`.`c_page_navi_current_bg` AS `c_page_navi_current_bg`,`m_account`.`c_page_navi_hover_color` AS `c_page_navi_hover_color`,`m_account`.`c_page_navi_hover_bg` AS `c_page_navi_hover_bg`,`m_account`.`c_page_navi_active_color` AS `c_page_navi_active_color`,`m_account`.`c_page_navi_active_bg` AS `c_page_navi_active_bg`,`m_account`.`c_home_station` AS `c_home_station`,`m_account`.`c_profile_image` AS `c_profile_image`,`m_friends`.`id_member_id` AS `id_member_id`,`m_public`.`id_permit_id` AS `id_permit_id` from ((`m_account` left join `m_friends` on((`m_account`.`id_account` = `m_friends`.`id_account`))) left join `m_public` on((`m_account`.`id_account` = `m_public`.`id_account`))) where ((`m_account`.`c_delete` = 0) and (`m_friends`.`c_delete` = 0) and (`m_public`.`c_delete` = 0)) */;

--
-- Final view structure for view `v_friends`
--

/*!50001 DROP TABLE `v_friends`*/;
/*!50001 DROP VIEW IF EXISTS `v_friends`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_friends` AS select `m_friends`.`id_friends` AS `id_friends`,`m_friends`.`id_account` AS `id_account`,`m_friends`.`id_member_id` AS `id_member_id`,`m_friends`.`c_delete` AS `c_delete`,`m_friends`.`c_registtime` AS `c_registtime`,`m_friends`.`c_updatetime` AS `c_updatetime`,`m_friends`.`c_displayOrder` AS `c_displayOrder`,`m_account`.`c_account` AS `c_account`,`m_account`.`c_handle` AS `c_handle`,`m_public`.`id_permit_type` AS `id_permit_type`,`r_permit_type`.`c_permit_type` AS `c_permit_type` from (`m_friends` left join ((`m_account` join `m_public` on((`m_account`.`id_account` = `m_public`.`id_account`))) join `r_permit_type` on((`m_public`.`id_permit_type` = `r_permit_type`.`id_permit_type`))) on(((`m_public`.`id_permit_id` = `m_friends`.`id_account`) and (`m_account`.`id_account` = `m_friends`.`id_member_id`)))) */;

--
-- Final view structure for view `v_public`
--

/*!50001 DROP TABLE `v_public`*/;
/*!50001 DROP VIEW IF EXISTS `v_public`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `v_public` AS select `m_public`.`id_public` AS `id_public`,`m_public`.`id_account` AS `id_account`,`m_public`.`id_permit_id` AS `id_permit_id`,`m_public`.`c_delete` AS `c_delete`,`m_public`.`c_registtime` AS `c_registtime`,`m_public`.`c_updatetime` AS `c_updatetime`,`m_public`.`id_permit_type` AS `id_permit_type`,`m_account`.`c_handle` AS `c_handle`,`r_permit_type`.`c_permit_type` AS `c_permit_type` from ((`m_public` left join `m_account` on((`m_public`.`id_permit_id` = `m_account`.`id_account`))) left join `r_permit_type` on((`m_public`.`id_permit_type` = `r_permit_type`.`id_permit_type`))) where (`m_public`.`c_delete` = 0) */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2011-03-04 22:28:42
