-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Machine: localhost
-- Genereertijd: 24 Jun 2011 om 19:41
-- Serverversie: 5.5.8
-- PHP-Versie: 5.3.5

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!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 */;

--
-- Database: `remotecp-panel_2.x`
--

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

--
-- Tabelstructuur voor tabel `api_keys`
--

CREATE TABLE IF NOT EXISTS `api_keys` (
  `key` varchar(32) NOT NULL,
  `ip` int(10) NOT NULL,
  `user` char(36) NOT NULL,
  PRIMARY KEY (`key`),
  UNIQUE KEY `r` (`ip`,`user`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Gegevens worden uitgevoerd voor tabel `api_keys`
--


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

--
-- Tabelstructuur voor tabel `messages_main`
--

CREATE TABLE IF NOT EXISTS `messages_main` (
  `mid` int(12) unsigned NOT NULL AUTO_INCREMENT,
  `sender` char(36) NOT NULL,
  `subject` text NOT NULL,
  `content` blob NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`mid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Gegevens worden uitgevoerd voor tabel `messages_main`
--


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

--
-- Tabelstructuur voor tabel `messages_receivers`
--

CREATE TABLE IF NOT EXISTS `messages_receivers` (
  `mid` int(10) unsigned NOT NULL,
  `receiver` char(36) NOT NULL,
  `read` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `del` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `pdel` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`mid`,`receiver`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Gegevens worden uitgevoerd voor tabel `messages_receivers`
--


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

--
-- Tabelstructuur voor tabel `remote_databases`
--

CREATE TABLE IF NOT EXISTS `remote_databases` (
  `key` varchar(32) NOT NULL,
  `host` varchar(30) NOT NULL,
  `accesstype` int(1) NOT NULL DEFAULT '0' COMMENT '0=default MySQL; 1=HTTPMySQL',
  `database` varchar(62) NOT NULL,
  `user` varchar(62) NOT NULL,
  `password` varchar(62) NOT NULL,
  `title` varchar(60) NOT NULL DEFAULT '',
  `api_link` varchar(36) NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Gegevens worden uitgevoerd voor tabel `remote_databases`
--


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

--
-- Tabelstructuur voor tabel `remote_databases_assignments`
--

CREATE TABLE IF NOT EXISTS `remote_databases_assignments` (
  `key` char(32) NOT NULL,
  `user` char(36) NOT NULL,
  `level` int(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`key`,`user`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Gegevens worden uitgevoerd voor tabel `remote_databases_assignments`
--


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

--
-- Tabelstructuur voor tabel `serv_log`
--

CREATE TABLE IF NOT EXISTS `serv_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` int(3) NOT NULL,
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `user` char(36) COLLATE latin1_general_ci NOT NULL,
  `ip` varchar(15) COLLATE latin1_general_ci NOT NULL,
  `url` text COLLATE latin1_general_ci NOT NULL,
  `message` text COLLATE latin1_general_ci NOT NULL,
  `flag` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='Primary server log' AUTO_INCREMENT=1 ;

--
-- Gegevens worden uitgevoerd voor tabel `serv_log`
--


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

--
-- Tabelstructuur voor tabel `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `GUID` char(36) COLLATE latin1_general_ci NOT NULL,
  `username` varchar(30) COLLATE latin1_general_ci NOT NULL,
  `password` varchar(32) COLLATE latin1_general_ci DEFAULT NULL,
  `userid` varchar(32) COLLATE latin1_general_ci DEFAULT NULL,
  `userlevel` tinyint(1) unsigned NOT NULL,
  `email` varchar(50) COLLATE latin1_general_ci DEFAULT NULL,
  `timestamp` int(11) unsigned NOT NULL,
  `banned` int(1) NOT NULL DEFAULT '0',
  `lang` text CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  PRIMARY KEY (`GUID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;

--
-- Gegevens worden uitgevoerd voor tabel `users`
--

INSERT INTO `users` (`GUID`, `username`, `password`, `userid`, `userlevel`, `email`, `timestamp`, `banned`, `lang`) VALUES
(UUID(), 'admin', '21232f297a57a5a743894a0e4a801fc3', '4fd0e27aa97e02b962dca3df674a5c17', 9, NULL, 1308759532, 0, 0x613a313a7b693a303b733a323a22656e223b7d);

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

--
-- Tabelstructuur voor tabel `_system_`
--

CREATE TABLE IF NOT EXISTS `_system_` (
  `name` varchar(30) NOT NULL,
  `value` varchar(100) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
  PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Gegevens worden uitgevoerd voor tabel `_system_`
--

INSERT INTO `_system_` (`name`, `value`) VALUES
('db_version', '2');
