Просмотр файла resources/wps.sql

Размер файла: 11.18Kb
# --------------------------------------------------------
#
# Table structure for table 'wps_about'
#

DROP TABLE IF EXISTS wps_about;
CREATE TABLE wps_about (
   id int(11) NOT NULL auto_increment,
   name text NOT NULL,
   version text NOT NULL,
   author text NOT NULL,
   email text NOT NULL,
   homepage text NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_about'
#

INSERT INTO wps_about VALUES ( 1, 'Wap Portal Server', 'v1.2.1', 'Emir Sakic', '', 'http://' );


# --------------------------------------------------------
#
# Table structure for table 'wps_components'
#

DROP TABLE IF EXISTS wps_components;
CREATE TABLE wps_components (
   id int(11) NOT NULL auto_increment,
   name varchar(25) NOT NULL,
   published tinyint(1) DEFAULT 0 NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_components'
#

INSERT INTO wps_components VALUES ( 1, 'links', 1 );
INSERT INTO wps_components VALUES ( 2, 'poll', 1 );
INSERT INTO wps_components VALUES ( 3, 'guestbook', 1 );
INSERT INTO wps_components VALUES ( 4, 'contact', 1 );


# --------------------------------------------------------
#
# Table structure for table 'wps_contact'
#

DROP TABLE IF EXISTS wps_contact;
CREATE TABLE wps_contact (
   id int(11) NOT NULL auto_increment,
   contactinfo text NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_contact'
#

INSERT INTO wps_contact VALUES ( 1, '<b>YourSite.Com</b><br />[email protected]<br />http://www.yoursite.com' );
INSERT INTO wps_contact VALUES ( 2, 'Yes' );


# --------------------------------------------------------
#
# Table structure for table 'wps_dateformat'
#

DROP TABLE IF EXISTS wps_dateformat;
CREATE TABLE wps_dateformat (
   id int(11) NOT NULL auto_increment,
   dateformatlong varchar(50) NOT NULL,
   dateformatmiddle varchar(50) NOT NULL,
   dateformatshort varchar(50) NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_dateformat'
#

INSERT INTO wps_dateformat VALUES ( 1, '%B %e, %Y', '%m/%d/%y', '%m/%d' );


# --------------------------------------------------------
#
# Table structure for table 'wps_emulator'
#

DROP TABLE IF EXISTS wps_emulator;
CREATE TABLE wps_emulator (
   id int(11) NOT NULL auto_increment,
   javascript text NOT NULL,
   link text NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_emulator'
#

INSERT INTO wps_emulator VALUES ( 1, '<script language="JavaScript">
function gowap (a){
	var xURL;
	var wurl;
	var str2;
	var datum = new Date();

	var w = 200;
	var h = 373;

	if (a==null || a==\'\'){
		xURL= document.WAPbrowser.fURL.value;
	}else{
		xURL=a;
	}

	wurl=escape(xURL);

	str2="http://tagtag.com/cgi/wapemulator.cgi?O__SKIN=S1&O__OPTURL=http://tagtag.com/wapemulator/templates/opt1.wml&wurl=" + wurl + \'&dummy=\'+datum.getTime();
	v = window.open(str2,\'TagTag\',\'width=\'+ w +\',height=\'+ h);
}
</script>', '<a href=javascript:gowap(\'$url\')>$name</a>' );


# --------------------------------------------------------
#
# Table structure for table 'wps_guestbook'
#

DROP TABLE IF EXISTS wps_guestbook;
CREATE TABLE wps_guestbook (
   id int(11) NOT NULL auto_increment,
   name text NOT NULL,
   email text NOT NULL,
   date datetime default '0000-00-00 00:00:00' NOT NULL,
   comment text NOT NULL,
   ip varchar(20) NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_guestbook'
#

INSERT INTO wps_guestbook VALUES ( 1, 'John Smith', '[email protected]', '2002-02-01 00:00:00', 'This WAP site is great!', '123.123.123.123' );


# --------------------------------------------------------
#
# Table structure for table 'wps_items'
#

DROP TABLE IF EXISTS wps_items;
CREATE TABLE wps_items (
   id int(11) NOT NULL auto_increment,
   sectionid int(11) NOT NULL,
   title text NOT NULL,
   content text NOT NULL,
   date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
   ordering int(11) NOT NULL,
   published tinyint(1) DEFAULT 0 NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_items'
#

INSERT INTO wps_items VALUES ( 1, 1, 'WPS v1.2 is out', 'Wap Portal Server v1.2 has been released.\nThis is the latest news.', '2002-02-01 00:00:00', 1, 1 );
INSERT INTO wps_items VALUES ( 2, 1, 'Unpublished News', 'This news item is unpublished.\nIt will not show on WAP page but it will remain in database waiting for publishing.', '2002-01-31 00:00:00', 2, 0 );
INSERT INTO wps_items VALUES ( 3, 1, 'My Old News', 'This is the old news.\nThe news are sorted after the writing date.', '2002-01-30 00:00:00', 3, 1 );
INSERT INTO wps_items VALUES ( 4, 2, 'About WPS', 'This WAP site has been created with Wap Portal Server v1.1.\nIt allows you to easily create and maintain your WAP portal trough Web interface.', '2002-02-01 00:00:00', 1, 1 );
INSERT INTO wps_items VALUES ( 5, 3, 'What is WPS?', 'WPS (Wap Portal Server) is a database driven portal for making dynamic WAP pages.\nIt provides easy managing of your WAP portal through web user interface.', '2002-02-01 00:00:00', 1, 1 );
INSERT INTO wps_items VALUES ( 6, 3, 'What do I need?', 'To run WPS you need a Web Server with PHP.\nYou don\'t need to know WML or have any other technical knowledge about WAP.', '2002-02-01 00:00:00', 2, 1 );
INSERT INTO wps_items VALUES ( 7, 0, 'Custom page', 'This is a custom content.\nYou can create as many custom pages as you want.', '2002-02-01 00:00:00', 1, 1 );


# --------------------------------------------------------
#
# Table structure for table 'wps_links'
#

DROP TABLE IF EXISTS wps_links;
CREATE TABLE wps_links (
   id int(11) NOT NULL auto_increment,
   ordering int(11) NOT NULL,
   linktext text NOT NULL,
   link text NOT NULL,
   published tinyint(1) DEFAULT 0 NOT NULL,
   PRIMARY KEY (id)
);


#
# Dumping data for table 'wps_links'
#

INSERT INTO wps_links VALUES ( 1, 1, 'Yahoo!', 'wap.yahoo.com', 1 );
INSERT INTO wps_links VALUES ( 2, 2, 'Google', 'www.google.com/wml/', 1 );


# --------------------------------------------------------
#
# Table structure for table 'wps_menu'
#

DROP TABLE IF EXISTS wps_menu;
CREATE TABLE wps_menu (
   id int(11) NOT NULL auto_increment,
   title text NOT NULL,
   ordering int(11) NOT NULL,
   type varchar(25) NOT NULL,
   itemid int(11) DEFAULT 0 NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_menu'
#

INSERT INTO wps_menu VALUES ( 1, 'News', 1, "section", 1 );
INSERT INTO wps_menu VALUES ( 2, 'Articles', 2, "section", 2 );
INSERT INTO wps_menu VALUES ( 3, 'Links', 3, "component", 1 );
INSERT INTO wps_menu VALUES ( 4, 'FAQs', 4, "section", 3 );
INSERT INTO wps_menu VALUES ( 5, 'Guestbook', 5, "component", 3 );
INSERT INTO wps_menu VALUES ( 6, 'Contact', 6, "component", 4 );
INSERT INTO wps_menu VALUES ( 7, 'Poll', 7, "component", 2 );
INSERT INTO wps_menu VALUES ( 8, 'Custom', 8, "item", 7 );


# --------------------------------------------------------
#
# Table structure for table 'wps_poll'
#

DROP TABLE IF EXISTS wps_poll;
CREATE TABLE wps_poll (
   id int(11) NOT NULL auto_increment,
   question text NOT NULL,
   date date DEFAULT '0000-00-00' NOT NULL,
   published tinyint(1) DEFAULT 0 NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_poll'
#

INSERT INTO wps_poll VALUES ( 1, 'Wap Portal Server is:', '2003-04-15', 1 );


# --------------------------------------------------------
#
# Table structure for table 'wps_poll_data'
#

DROP TABLE IF EXISTS wps_poll_data;
CREATE TABLE wps_poll_data (
   id int(11) NOT NULL auto_increment,
   alternative text NOT NULL,
   pollid int(11) NOT NULL,
   count int(11) NOT NULL default '0',
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_poll_data'
#

INSERT INTO wps_poll_data VALUES ( 1, 'Great script', 1, 1 );
INSERT INTO wps_poll_data VALUES ( 2, 'Good script', 1, 0 );
INSERT INTO wps_poll_data VALUES ( 3, 'Bad script', 1, 0 );


# --------------------------------------------------------
#
# Table structure for table 'wps_referers'
#

DROP TABLE IF EXISTS wps_referers;
CREATE TABLE wps_referers (
   id int(11) NOT NULL auto_increment,
   referer text NOT NULL,
   date datetime default '0000-00-00 00:00:00' NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_referers'
#

INSERT INTO wps_referers VALUES ( 1, 'http://wap.yahoo.com', '2004-01-01 23:59:59' );


# --------------------------------------------------------
#
# Table structure for table 'wps_sections'
#

DROP TABLE IF EXISTS wps_sections;
CREATE TABLE wps_sections (
   id int(11) NOT NULL auto_increment,
   title text NOT NULL,
   intro text NOT NULL,
   published tinyint(1) DEFAULT 0 NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_sections'
#

INSERT INTO wps_sections VALUES ( 1, 'News', 'News on our wap portal', 1 );
INSERT INTO wps_sections VALUES ( 2, 'Articles', 'Articles on our wap portal', 1 );
INSERT INTO wps_sections VALUES ( 3, 'FAQ', 'Frequently asked questions', 1 );


# --------------------------------------------------------
#
# Table structure for table 'wps_site'
#

DROP TABLE IF EXISTS wps_site;
CREATE TABLE wps_site (
   id int(11) NOT NULL auto_increment,
   name text NOT NULL,
   url text NOT NULL,
   email text NOT NULL,
   imgalt text NOT NULL,
   counter tinyint(1) DEFAULT 0 NOT NULL,
   referers int(11) NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_site'
#

INSERT INTO wps_site VALUES ( 1, 'Your Wap Site', 'http://', '[email protected]', 'YourSite', 1, 10 );


# --------------------------------------------------------
#
# Table structure for table 'wps_statistics'
#

DROP TABLE IF EXISTS wps_statistics;
CREATE TABLE wps_statistics (
   id int(11) NOT NULL auto_increment,
   nokia int(11) DEFAULT 0 NOT NULL,
   sonyericsson int(11) DEFAULT 0 NOT NULL,
   motorola int(11) DEFAULT 0 NOT NULL,
   siemens int(11) DEFAULT 0 NOT NULL,
   samsung int(11) DEFAULT 0 NOT NULL,
   lg int(11) DEFAULT 0 NOT NULL,
   panasonic int(11) DEFAULT 0 NOT NULL,
   alcatel int(11) DEFAULT 0 NOT NULL,
   philips int(11) DEFAULT 0 NOT NULL,
   nec int(11) DEFAULT 0 NOT NULL,
   unknown int(11) DEFAULT 0 NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_statistics'
#

INSERT INTO wps_statistics VALUES ( 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 );


# --------------------------------------------------------
#
# Table structure for table 'wps_timediff'
#

DROP TABLE IF EXISTS wps_timediff;
CREATE TABLE wps_timediff (
   id int(11) NOT NULL auto_increment,
   timediff int(11) DEFAULT 0 NOT NULL,
   PRIMARY KEY (id)
);

#
# Dumping data for table 'wps_timediff'
#

INSERT INTO wps_timediff VALUES ( 1, 0 );


# --------------------------------------------------------
#
# Table structure for table 'wps_users'
#

DROP TABLE IF EXISTS wps_users;
CREATE TABLE wps_users (
   id int(11) NOT NULL auto_increment,
   user VARCHAR(50) NOT NULL,
   password VARCHAR(30) NOT NULL,
   userlevel TINYINT(3),
   PRIMARY KEY (id),
   KEY (user)
);

#
# Dumping data for table 'wps_users'
#

INSERT INTO wps_users VALUES ( 1, 'admin', 'admin', 2 );
INSERT INTO wps_users VALUES ( 2, 'demo', 'demo', 1 );