CREATE TABLE tdp_banfilters (
  id tinyint(1) NOT NULL auto_increment,
  ipaddress mediumtext NOT NULL,
  emails mediumtext NOT NULL,
  words mediumtext NOT NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table 'tdp_banfilters'
--

INSERT INTO tdp_banfilters (id, ipaddress, emails, words) VALUES(1, '', '', 'viagra,medical,pills,watches');

--
-- Table structure for table 'tdp_departments'
--

CREATE TABLE tdp_departments (
  id int(8) NOT NULL auto_increment,
  `name` varchar(100) NOT NULL default '',
  PRIMARY KEY  (id),
  UNIQUE KEY `name` (`name`)
) TYPE=MyISAM;

--
-- Table structure for table 'tdp_kbase'
--

CREATE TABLE tdp_kbase (
  id int(8) NOT NULL auto_increment,
  question mediumtext NOT NULL,
  answer mediumtext NOT NULL,
  department int(3) NOT NULL default '0',
  adddate timestamp NOT NULL default CURRENT_TIMESTAMP,
  filterdate date default NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Table structure for table 'tdp_responses'
--

CREATE TABLE tdp_responses (
  id int(8) NOT NULL auto_increment,
  question mediumtext NOT NULL,
  answer mediumtext NOT NULL,
  adddate timestamp NOT NULL default CURRENT_TIMESTAMP,
  filterdate date default NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Table structure for table 'tdp_replies'
--

CREATE TABLE tdp_replies (
  id int(8) NOT NULL auto_increment,
  ticketid char(6) NOT NULL default '',
  `name` varchar(150) NOT NULL default '',
  comments mediumtext NOT NULL,
  posttime datetime default NULL,
  postdate varchar(30) NOT NULL default '',
  responsetime varchar(75) NOT NULL default '',
  adminreply enum('0','1') NOT NULL default '0',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Table structure for table 'tdp_settings'
--

CREATE TABLE tdp_settings (
  id tinyint(1) NOT NULL auto_increment,
  website varchar(150) NOT NULL default '',
  email varchar(250) NOT NULL default '',
  script_path varchar(250) NOT NULL default '',
  `language` varchar(25) NOT NULL default 'english.php',
  dateformat varchar(20) NOT NULL default 'D j M Y, G:ia',
  exampledate timestamp NOT NULL default CURRENT_TIMESTAMP,
  kbase enum('0','1') NOT NULL default '0',
  attachment enum('0','1') NOT NULL default '0',
  auto_zip enum('0','1') NOT NULL default '0',
  filetypes text NOT NULL,
  maxsize int(10) NOT NULL default '200',
  enablelive enum('0','1') NOT NULL default '0',
  liverefresh tinyint(2) NOT NULL default '2',
  timeout tinyint(2) NOT NULL default '2',
  enCaptcha enum('0','1') NOT NULL default '1',
  enLiveCaptcha enum('0','1') NOT NULL default '1',
  timeOffset varchar(3) NOT NULL default '0',
  autoClose int(5) NOT NULL default '0',
  banFilters enum('0','1') NOT NULL default '0',
  smtp enum('0','1') NOT NULL default '0',
  smtp_host varchar(100) NOT NULL default 'localhost',
  smtp_user varchar(100) NOT NULL default '',
  smtp_pass varchar(100) NOT NULL default '',
  smtp_port varchar(100) NOT NULL default '25',
  affiliateURL text NOT NULL default '',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table 'tdp_settings'
--

INSERT INTO tdp_settings (id, website, email, script_path, language, dateformat, exampledate, kbase, attachment, auto_zip, filetypes, maxsize, enablelive, liverefresh, timeout, enCaptcha, enLiveCaptcha, timeOffset, autoClose, banFilters, smtp, smtp_host, smtp_user, smtp_pass, smtp_port, affiliateURL) VALUES(1, 'Your Website', 'reply@yoursite.com', 'http://www.yoursite.com/helpdesk', 'english.php', 'D j M Y, G:ia', '', '1', '0', '0', '.jpg|.gif|.doc', 200, '0', 2, 6, '1', '0', '0', 0, '0', '0', 'localhost', '', '', '25','');

--
-- Table structure for table 'tdp_tickets'
--

CREATE TABLE tdp_tickets (
  id int(8) NOT NULL auto_increment,
  ticketid char(6) NOT NULL default '',
  department varchar(100) NOT NULL default '',
  deptid int(3) NOT NULL default '0',
  `name` varchar(150) NOT NULL default '',
  email varchar(250) NOT NULL default '',
  `subject` varchar(200) NOT NULL default '',
  comments mediumtext NOT NULL,
  priority enum('1','2','3') NOT NULL default '1',
  attachstatus enum('0','1') NOT NULL default '0',
  attachfile varchar(200) NOT NULL default '',
  ticketdate datetime default NULL,
  postdate varchar(30) NOT NULL default '',
  responder enum('0','1') NOT NULL default '0',
  filterdate date default NULL,
  `status` enum('0','1') NOT NULL default '0',
  permaClose enum('0','1') NOT NULL default '0',
  created enum('0','1') NOT NULL default '0',
  ip varchar(20) NOT NULL default '',
  livesupport enum('0','1') NOT NULL default '0',
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Table structure for table 'tdp_users'
--

CREATE TABLE tdp_users (
  id int(7) NOT NULL auto_increment,
  `name` varchar(100) NOT NULL default '',
  email varchar(250) NOT NULL default '',
  accpass varchar(32) NOT NULL default '',
  department int(5) NOT NULL default '0',
  admintype char(5) NOT NULL default '',
  livesupport enum('0','1') NOT NULL default '0',
  signature text NOT NULL,
  notify enum('0','1') NOT NULL default '0',
  `date` date default NULL,
  PRIMARY KEY  (id)
) TYPE=MyISAM;

--
-- Dumping data for table 'tdp_users'
--

INSERT INTO tdp_users (id, name, email, accpass, department, admintype, livesupport, signature, notify, date) VALUES(1, 'Your Name', 'you@yoursite.com', '21232f297a57a5a743894a0e4a801fc3', 0, 'admin', '0', '', '1', now());

--
-- Table structure for table 'tdp_dept_assign'
--

CREATE TABLE tdp_dept_assign (
  id int(7) NOT NULL auto_increment,
  userID INT(7) not null default '0',
  deptID INT(7) not null default '0',
  PRIMARY KEY  (id)
) TYPE=MyISAM;
