
# --------------------------------------------------------
#
# Table structure for table 'authors'
#

DROP TABLE IF EXISTS authors;
CREATE TABLE authors (
   aid char(30) NOT NULL,
   name char(50),
   url char(50),
   email char(50),
   quote char(50),
   copy char(255),
   pwd char(8),
   seclev int(11),
   PRIMARY KEY (aid)
);

#
# Dumping data for table 'authors'
#

INSERT INTO authors VALUES( 'ray', 'Ray', 'http://www.psn.net/~rbrown', 'rbrown@psn.net', '', '', 'secret', '1000000');

# --------------------------------------------------------
#
# Table structure for table 'comments'
#

DROP TABLE IF EXISTS comments;
CREATE TABLE comments (
   sid varchar(20) NOT NULL,
   cid int(15) DEFAULT '0' NOT NULL,
   pid int(15) DEFAULT '0' NOT NULL,
   date datetime,
   name varchar(50) NOT NULL,
   email varchar(50),
   host_name varchar(50),
   url varchar(50),
   rank int(1),
   subject varchar(50) NOT NULL,
   comment text NOT NULL,
   pending int(1) DEFAULT '0',
   PRIMARY KEY (sid, cid)
);

#
# Dumping data for table 'comments'
#

INSERT INTO comments VALUES( '19980910/171221', '22', '0', '1998-09-09 16:24:33', 'Ray', 'rbrown@psn.net', '', '', '0', 'this
is lame', 'this is a lame test...', '0');
INSERT INTO comments VALUES( '19980910/171221', '41', '22', '1998-09-09 21:55:18', 'Anonymous Coward', '', '', '', '0', 'Re:
this is lame', 'reply to this is lame', '0');

# --------------------------------------------------------
#
# Table structure for table 'pollanswers'
#

DROP TABLE IF EXISTS pollanswers;
CREATE TABLE pollanswers (
   qid char(15) NOT NULL,
   aid int(11) DEFAULT '0' NOT NULL,
   answer char(255),
   votes int(11),
   PRIMARY KEY (qid, aid)
);

#
# Dumping data for table 'pollanswers'
#

INSERT INTO pollanswers VALUES( 'example', '1', 'Yes', '2');
INSERT INTO pollanswers VALUES( 'example', '2', 'No', '0');
INSERT INTO pollanswers VALUES( 'example', '3', 'Maybe', '0');

# --------------------------------------------------------
#
# Table structure for table 'pollquestions'
#

DROP TABLE IF EXISTS pollquestions;
CREATE TABLE pollquestions (
   qid char(15) NOT NULL,
   question char(255) NOT NULL,
   voters int(11),
   date datetime,
   PRIMARY KEY (qid)
);

#
# Dumping data for table 'pollquestions'
#

INSERT INTO pollquestions VALUES( 'example', 'Do you like DOINS?', '2', '1998-09-09 13:04:18');

# --------------------------------------------------------
#
# Table structure for table 'pollvoters'
#

DROP TABLE IF EXISTS pollvoters;
CREATE TABLE pollvoters (
   qid char(15) NOT NULL,
   id char(30),
   time datetime
);

#
# Dumping data for table 'pollvoters'
#

INSERT INTO pollvoters VALUES( 'example', '172.16.10.242', '1998-09-09 15:31:13');
INSERT INTO pollvoters VALUES( 'example', '199.234.161.136', '1998-09-10 19:17:13');

# --------------------------------------------------------
#
# Table structure for table 'sectionblocks'
#

DROP TABLE IF EXISTS sectionblocks;
CREATE TABLE sectionblocks (
   bid varchar(15) NOT NULL,
   section varchar(30) NOT NULL,
   title varchar(64),
   PRIMARY KEY (bid)
);

#
# Dumping data for table 'sectionblocks'
#

INSERT INTO sectionblocks VALUES( '1', 'articles', 'Articles');
INSERT INTO sectionblocks VALUES( '2', 'features', 'Features');
INSERT INTO sectionblocks VALUES( '3', 'quicklinks', 'Quick Links');

# --------------------------------------------------------
#
# Table structure for table 'sections'
#

DROP TABLE IF EXISTS sections;
CREATE TABLE sections (
   section char(30) NOT NULL,
   artcount int(11),
   PRIMARY KEY (section)
);

#
# Dumping data for table 'sections'
#

INSERT INTO sections VALUES( 'articles', '10');
INSERT INTO sections VALUES( 'features', '10');

# --------------------------------------------------------
#
# Table structure for table 'sessions'
#

DROP TABLE IF EXISTS sessions;
CREATE TABLE sessions (
   session char(20) NOT NULL,
   aid char(30),
   logintime datetime,
   lasttime datetime,
   PRIMARY KEY (session)
);

#
# Dumping data for table 'sessions'
#


# --------------------------------------------------------
#
# Table structure for table 'stories'
#

DROP TABLE IF EXISTS stories;
CREATE TABLE stories (
   sid varchar(20) NOT NULL,
   tid varchar(20) NOT NULL,
   aid varchar(30) NOT NULL,
   commentcount int(11),
   title varchar(80),
   dept varchar(80),
   time datetime,
   introtext text,
   bodytext text,
   writestatus int(11),
   hits int(11),
   section varchar(15),
   PRIMARY KEY (sid)
);

#
# Dumping data for table 'stories'
#

INSERT INTO stories VALUES( '19980910/171221', 'news', 'ray', '2', 'This just in', 'is this cool news?', '1998-09-10 17:02:27', 'Here is the intro copy', 'here is the extended copy', '1', '0', 'articles');
INSERT INTO stories VALUES( '20000121/101010', 'news', 'ray', '0', 'Some links for you to visit', 'quicklinks', '2000-01-21 10:10:10', '<B>Related Sites:</B><BR><LI>How about visiting <A href=http://slashdot.org>Slashdot</A> when you\'re done here? Maybe not?<BR>', '<B>Related Sites:</B><BR><LI>How about visiting <A href=http://slashdot.org>Slashdot</A> when you\'re done here? Maybe not?<BR>', '1', '0', 'quicklinks');
INSERT INTO stories VALUES( '20000121/101020', 'news', 'ray', '0', 'This is a feature', 'sample features', '2000-01-21 10:10:20', 'This is a feature.', 'This is the rest of the feature.', '1', '0', 'features');

# --------------------------------------------------------
#
# Table structure for table 'submissions'
#

DROP TABLE IF EXISTS submissions;
CREATE TABLE submissions (
   subid varchar(15) NOT NULL,
   email varchar(50),
   name varchar(50),
   time datetime,
   subj varchar(50),
   story text,
   tid varchar(20),
   note varchar(30),
   PRIMARY KEY (subid)
);

#
# Dumping data for table 'submissions'
#


# --------------------------------------------------------
#
# Table structure for table 'topics'
#

DROP TABLE IF EXISTS topics;
CREATE TABLE topics (
   tid char(20) NOT NULL,
   image char(30),
   alttext char(40),
   width int(11),
   height int(11),
   PRIMARY KEY (tid)
);

#
# Dumping data for table 'topics'
#

INSERT INTO topics VALUES( 'doins', 'doins.jpg', 'doins.sourceforge.net', '100', '34');
INSERT INTO topics VALUES( 'news', 'topicnews.gif', 'All the news', '10', '10');

# --------------------------------------------------------
#
# Table structure for table 'vars'
#

DROP TABLE IF EXISTS vars;
CREATE TABLE vars (
   name char(32) NOT NULL,
   value char(127),
   description char(127),
   PRIMARY KEY (name)
);

#
# Dumping data for table 'vars'
#

INSERT INTO vars VALUES( 'writestatus', '0', 'Simple Boolean to determine if homepage needs rewriting');
INSERT INTO vars VALUES( 'currentqid', 'example', 'The Current Question on the homepage pollbooth');
INSERT INTO vars VALUES( 'totalhits', '0', 'Total number of hits the site has had thus far');
INSERT INTO vars VALUES( 'webmaster_email', 'rbrown@psn.net', 'The email address of the webmaster');
INSERT INTO vars VALUES( 'head_bg', '006666', 'The background colour of headlines.');
INSERT INTO vars VALUES( 'head_fg', 'ffffff', 'The foreground (text) colour of headlines.');
INSERT INTO vars VALUES( 'block_bg', 'cccccc', 'The background colour of blocks.');
INSERT INTO vars VALUES( 'block_fg', '000000', 'The foreground (text) colour of blocks.');
INSERT INTO vars VALUES( 'border_bg', '000000', 'The colour of the page border.');
INSERT INTO vars VALUES( 'text_bg', 'ffffff', 'The background colour of the page text.');
INSERT INTO vars VALUES( 'text_fg', '000000', 'The colour of the page text.');
INSERT INTO vars VALUES( 'site_name', 'DOINS', 'The name of this site.');
INSERT INTO vars VALUES( 'site_slogan', 'DOINS is not Slashdot', 'The slogan for this site.');
INSERT INTO vars VALUES( 'site_image', 'doins.jpg', 'The banner image for this site.');
