<?
$queries = array();

#
# Table structure for table dm_activity_logs
#
$queries[] = "DROP TABLE IF EXISTS `dm_activity_logs`";
$queries[] = "CREATE TABLE `dm_activity_logs` (
  `uid` mediumint(9) NOT NULL default '0',
  `code` char(1) NOT NULL default '',
  `date` varchar(255) NOT NULL default '',
  `action` varchar(255) NOT NULL default '',
  `details` varchar(255) NOT NULL default ''
) ENGINE=MyISAM";

#
# Table structure for table dm_auth
#
$queries[] = "DROP TABLE IF EXISTS `dm_auth`";
$queries[] = "CREATE TABLE `dm_auth` (
  `username` varchar(255) NOT NULL default '',
  `password` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`username`)
) ENGINE=MyISAM";




$queries[] = "INSERT INTO `dm_auth` (`username`,`password`) VALUES ('admin','admin')";

#
# Table structure for table dm_filetypes
#

$queries[] = "DROP TABLE IF EXISTS `dm_filetypes`;";
$queries[] = "CREATE TABLE `dm_filetypes` (
  `id` mediumint(9) NOT NULL auto_increment,
  `extension` varchar(30) NOT NULL default '',
  `type` varchar(255) NOT NULL default '',
  `icon` varchar(255) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_filetypes
#

$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (2,'','','generic.gif','Unknown File Type')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (3,'ace','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (4,'zip','arch','zip.gif','Zip Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (5,'rar','','archive.gif','Rar Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (6,'gz','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (7,'tar','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (8,'arj','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (9,'cab','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (10,'bz','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (11,'bz2','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (12,'jar','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (13,'taz','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (14,'tbz','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (15,'tbz2','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (16,'tgz','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (17,'uu','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (18,'uue','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (19,'war','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (20,'wsz','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (21,'xxe','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (22,'z00','','archive.gif','Archive')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (23,'jpg','img','jpg.gif','Jpeg Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (24,'jpeg','img','jpg.gif','Jpeg Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (25,'gif','img','gif.gif','GIF Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (26,'png','img','png.gif','PNG Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (27,'tga','','generic.gif','Targe Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (28,'tif','','generic.gif','Tag Image File Format')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (29,'bmp','','bmp.gif','Windows Bitmap Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (30,'jpe','img','jpg.gif','Jpeg Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (31,'jif','','generic.gif','Jpeg Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (32,'pcd','','generic.gif','Kodak PhotoCD')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (33,'pcx','','generic.gif','PCX Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (34,'pic','','generic.gif','PIC Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (35,'pix','','generic.gif','PIX Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (36,'psd','','psd.gif','Adobe Photoshop Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (37,'tiff','','jpg.gif','Tag Image File Format')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (38,'cdr','','cdr.gif','Corel Draw Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (39,'xar','','xar.gif',' Xara Image')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (40,'mpg','','video.gif','Mpeg Video')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (41,'mpe','','video.gif','Mpeg Video')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (42,'mpeg','','video.gif','Mpeg Video')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (43,'avi','','video.gif','Avi Video')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (44,'mov','','video.gif','Video File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (45,'asf','','video.gif','Video File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (46,'wmv','','video.gif','Video File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (47,'mp3','','audio.gif','Mp3 Audio File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (48,'mid','','audio.gif','Midi Audio File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (49,'wav','','wav.gif','Wave Audio File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (50,'txt','txt','txt.gif','Text document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (51,'htaccess','','txt.gif','Apache script file')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (52,'url','txt','html.gif','Web Shortcut')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (53,'htm','txt','html.gif','HTML Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (54,'html','txt','html.gif','HTML Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (55,'wml','txt','html.gif','Web Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (56,'htt','txt','html.gif','HTML Template')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (57,'inc','txt','txt.gif','Include File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (58,'vbs','txt','txt.gif','Visual Basic Script')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (59,'js','txt','js.gif','JavaScript Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (60,'jsp','txt','txt.gif','JSP Script')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (61,'asp','txt','asp.gif','Visual Basic Script')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (62,'pl','txt','txt.gif','Perl Script')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (63,'cgi','txt','txt.gif','Web Script')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (64,'php','txt','php.gif','PHP Script')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (65,'php3','txt','php.gif','PHP Script')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (66,'pxp','txt','php.gif','')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (67,'xml','txt','xml.gif','XML Web Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (68,'xhtml','txt','html.gif','XHTML Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (69,'css','txt','css.gif','Cascading Style Sheet')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (70,'swf','','swf.gif','Flash File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (71,'fla','','fla.gif','Flash Source File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (72,'tpl','txt','txt.gif','Template File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (73,'sql','txt','txt.gif','SQL Database dump')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (75,'myd','','txt.gif','MySQL Database File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (76,'myi','','txt.gif','MySQL Database File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (77,'csv','txt','txt.gif','CSV Text Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (78,'sub','txt','txt.gif','Movie Subtitle')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (79,'srt','txt','txt.gif','Movie Subtitle')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (80,'doc','','doc.gif','Word Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (81,'rtf','','doc.gif','Word Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (82,'wri','','doc.gif','Word Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (83,'xls','','xls.gif','Excel Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (84,'pps','','ppt.gif','Power Point Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (85,'ppt','','ppt.gif','Power Point Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (86,'qxd','','qxd.gif','Quark Express Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (87,'pdf','','pdf.gif','Acrobat Reader Document')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (88,'bak','','generic.gif','Backup File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (89,'$$$','','generic.gif','Temporary File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (90,'tmp','','generic.gif','Temporary File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (91,'temp','','generic.gif','Temporary File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (92,'log','txt','txt.gif','Log file')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (93,'ini','txt','txt.gif','Configuration File')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (94,'ttf','','generic.gif','True Type Font')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (95,'exe','bin','exe.gif','Windows Application')";
$queries[] = "INSERT INTO `dm_filetypes` (`id`,`extension`,`type`,`icon`,`description`) VALUES (96,'hlp','bin','generic.gif','Window Help File')";

#
# Table structure for table dm_flags
#

$queries[] = "DROP TABLE IF EXISTS `dm_flags`";
$queries[] = "CREATE TABLE `dm_flags` (
  `uid` mediumint(9) NOT NULL default '0',
  `id` mediumint(9) NOT NULL auto_increment,
  `path` varchar(255) NOT NULL default '',
  `shared` tinyint(1) NOT NULL default '0',
  `public` tinyint(1) NOT NULL default '0',
  `discussion` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_flags
#




#
# Table structure for table dm_groups
#

$queries[] = "DROP TABLE IF EXISTS `dm_groups`";
$queries[] = "CREATE TABLE `dm_groups` (
  `id` mediumint(9) NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `suspended` char(1) NOT NULL default '',
  `path` varchar(255) NOT NULL default '',
  `readonly` char(1) NOT NULL default '',
  `upload` char(1) NOT NULL default '',
  `download` char(1) NOT NULL default '',
  `sendbyemail` char(1) NOT NULL default '',
  `uploadnotice` char(1) NOT NULL default '',
  `downloadnotice` char(1) NOT NULL default '',
  `sharing` char(1) NOT NULL default '',
  `spacequota` varchar(255) NOT NULL default '',
  `trafficquota` varchar(255) NOT NULL default '',
  `shareaccess` char(1) NOT NULL default '',
  `view_others` varchar(255) NOT NULL default '',
  `ui_type` varchar(255) NOT NULL default '',
  `ui_has_tree` char(1) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_groups
#

$queries[] = "INSERT INTO `dm_groups` (`id`,`name`,`suspended`,`path`,`readonly`,`upload`,`download`,`sendbyemail`,`uploadnotice`,`downloadnotice`,`sharing`,`spacequota`,`trafficquota`,`shareaccess`,`view_others`,`ui_type`,`ui_has_tree`) VALUES (1,'Default Group','0','/home/users/','0','1','1','1','0','0','1','','','1','+','AFIAN_STANDARD','1')";

#
# Table structure for table dm_history
#

$queries[] = "DROP TABLE IF EXISTS `dm_history`";
$queries[] = "CREATE TABLE `dm_history` (
  `uid` mediumint(9) NOT NULL default '0',
  `usernames` text NOT NULL
) ENGINE=MyISAM";

#
# Dumping data for table dm_history
#
$queries[] = "INSERT INTO `dm_history` (`uid`,`usernames`) VALUES (1,'')";

#
# Table structure for table dm_interauth
#

$queries[] = "DROP TABLE IF EXISTS `dm_interauth`";
$queries[] = "CREATE TABLE `dm_interauth` (
  `username` varchar(255) NOT NULL default '',
  `id` mediumint(9) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `username` (`username`,`id`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_interauth
#

$queries[] = "INSERT INTO `dm_interauth` (`username`,`id`) VALUES ('admin',1)";

#
# Table structure for table dm_last_uploads
#

$queries[] = "DROP TABLE IF EXISTS `dm_last_uploads`";
$queries[] = "CREATE TABLE `dm_last_uploads` (
  `uid` mediumint(9) NOT NULL default '0',
  `id` mediumint(9) NOT NULL auto_increment,
  `path` varchar(255) NOT NULL default '',
  `date` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_last_uploads
#


#
# Table structure for table dm_optional_user_info
#

$queries[] = "DROP TABLE IF EXISTS `dm_optional_user_info`";
$queries[] = "CREATE TABLE `dm_optional_user_info` (
  `uid` mediumint(9) NOT NULL auto_increment,
  `firstname` varchar(255) NOT NULL default '',
  `lastname` varchar(255) NOT NULL default '',
  `email` varchar(255) NOT NULL default '',
  `company` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`uid`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_optional_user_info
#

$queries[] = "INSERT INTO `dm_optional_user_info` (`uid`,`firstname`,`lastname`,`email`,`company`) VALUES (1,'','','','')";

#
# Table structure for table dm_permvars
#

$queries[] = "DROP TABLE IF EXISTS `dm_permvars`";
$queries[] = "CREATE TABLE `dm_permvars` (
  `var` varchar(255) NOT NULL default '',
  `val` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`var`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_permvars
#

$queries[] = "INSERT INTO `dm_permvars` (`var`,`val`) VALUES ('flagsMonthlyCleanUpDate','0')";


#
# Table structure for table dm_settings
#

$queries[] = "DROP TABLE IF EXISTS `dm_settings`";
$queries[] = "CREATE TABLE `dm_settings` (
  `var` varchar(255) NOT NULL default '',
  `val` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`var`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_settings
#

$queries[] = "INSERT INTO `dm_settings` (`var`,`val`) VALUES ('lastuploads','15')";
$queries[] = "INSERT INTO `dm_settings` (`var`,`val`) VALUES ('logsaction','zip')";
$queries[] = "INSERT INTO `dm_settings` (`var`,`val`) VALUES ('logsactionlastdate','0')";
$queries[] = "INSERT INTO `dm_settings` (`var`,`val`) VALUES ('suspend','')";

#
# Table structure for table dm_share_info
#

$queries[] = "DROP TABLE IF EXISTS `dm_share_info`";
$queries[] = "CREATE TABLE `dm_share_info` (
  `fid` mediumint(9) NOT NULL default '0',
  `to_uid` mediumint(9) NOT NULL default '0',
  `as` varchar(255) NOT NULL default '',
  `write` tinyint(1) NOT NULL default '0',
  `date` varchar(255) NOT NULL default ''
) ENGINE=MyISAM";

#
# Dumping data for table dm_share_info
#


#
# Table structure for table dm_trash
#

$queries[] = "DROP TABLE IF EXISTS `dm_trash`";
$queries[] = "CREATE TABLE `dm_trash` (
  `uid` mediumint(9) NOT NULL default '0',
  `id` mediumint(9) NOT NULL auto_increment,
  `path` varchar(255) NOT NULL default '',
  `date` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_trash
#


#
# Table structure for table dm_users
#

$queries[] = "DROP TABLE IF EXISTS `dm_users`";
$queries[] = "CREATE TABLE `dm_users` (
  `id` mediumint(9) NOT NULL auto_increment,
  `gid` mediumint(9) NOT NULL default '0',
  `suspended` char(1) NOT NULL default '',
  `lastlogin` varchar(255) NOT NULL default '',
  `previouslogin` varchar(255) NOT NULL default '',
  `path` varchar(255) NOT NULL default '',
  `readonly` char(1) NOT NULL default '',
  `upload` char(1) NOT NULL default '',
  `sendbyemail` char(1) NOT NULL default '',
  `uploadnotice` char(1) NOT NULL default '',
  `downloadnotice` char(1) NOT NULL default '',
  `sharing` char(1) NOT NULL default '',
  `spacequota` varchar(255) NOT NULL default '',
  `trafficquota` varchar(255) NOT NULL default '',
  `traffic` varchar(255) NOT NULL default '',
  `trafficdate` varchar(255) NOT NULL default '',
  `shareaccess` char(1) NOT NULL default '',
  `view_others` varchar(255) NOT NULL default '',
  `ui_type` varchar(255) NOT NULL default '',
  `ui_has_tree` char(1) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM";

#
# Dumping data for table dm_users
#

$queries[] = "INSERT INTO `dm_users` (`id`,`gid`,`suspended`,`lastlogin`,`previouslogin`,`path`,`readonly`,`upload`,`sendbyemail`,`uploadnotice`,`downloadnotice`,`sharing`,`spacequota`,`trafficquota`,`traffic`,`trafficdate`,`shareaccess`,`view_others`, `ui_type`, `ui_has_tree`) VALUES (1,1,'','0','0','','','','','','','','','','0','0','','','','')";

#
# Table structure for table dm_notifications
#

$queries[] = "DROP TABLE IF EXISTS `dm_notifications`";
$queries[] = "CREATE TABLE `dm_notifications` (
  `id` mediumint(9) NOT NULL auto_increment,
  `object_type` varchar(50) NOT NULL default '',
  `object_id` mediumint(9) NOT NULL default '0',
  `action` varchar(255) NOT NULL default '',
  `email_address` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM";

foreach ($queries as $query) {
	$rs = mysql_query($query);
	if (!$rs) {
		$msg .= 'MySQL error: ' . mysql_error()."<br><br>";
	}
}
//die();
?>