A dodałes tabele do bazy danych???
# phpMyAdmin MySQL-Dump
# version 2.2.1
# http://phpwizard.net/phpMyAdmin/
# http://phpmyadmin.sourceforge.net/ (download page)
#
# Host: localhost
# Generation Time: Dec 11, 2001 at 11:25 AM
# Server version: 3.22.32
# PHP Version: 3.0.15
# Database : newman2
# --------------------------------------------------------
#
# Table structure for table admin
#
CREATE TABLE admin (
id int(11) DEFAULT '0' NOT NULL auto_increment,
uname varchar(30),
passwd varchar(30),
name varchar(120),
email varchar(80),
priv int(11),
info tinytext NOT NULL,
PRIMARY KEY (id)
);
#
# Dumping data for table admin
#
INSERT INTO admin VALUES (1, 'demo', 'demo', 'Demo', 'demo@xdemo.com', 1, '');
INSERT INTO admin VALUES (3, 'admin', 'demo', 'demo', 'admin@skinbase.org', 1, '');
# --------------------------------------------------------
#
# Table structure for table groups
#
CREATE TABLE groups (
id int(11) DEFAULT '0' NOT NULL auto_increment,
name tinytext NOT NULL,
description text NOT NULL,
news_add tinyint(4) DEFAULT '0' NOT NULL,
news_edit tinyint(4) DEFAULT '0' NOT NULL,
news_del tinyint(4) DEFAULT '0' NOT NULL,
admin_add tinyint(4) DEFAULT '0' NOT NULL,
admin_edit tinyint(4) DEFAULT '0' NOT NULL,
admin_del tinyint(4) DEFAULT '0' NOT NULL,
pnews_add tinyint(4) DEFAULT '0' NOT NULL,
pnews_edit tinyint(4) DEFAULT '0' NOT NULL,
pnews_del tinyint(4) DEFAULT '0' NOT NULL,
pnews_submit tinyint(4) DEFAULT '0' NOT NULL,
cat_add tinyint(4) DEFAULT '0' NOT NULL,
cat_edit tinyint(4) DEFAULT '0' NOT NULL,
cat_del tinyint(4) DEFAULT '0' NOT NULL,
users_add tinyint(4) DEFAULT '0' NOT NULL,
users_edit tinyint(4) DEFAULT '0' NOT NULL,
users_del tinyint(4) DEFAULT '0' NOT NULL,
partner_add tinyint(4) DEFAULT '0' NOT NULL,
partner_edit tinyint(4) DEFAULT '0' NOT NULL,
partner_del tinyint(4) DEFAULT '0' NOT NULL,
partner_ul tinyint(4) DEFAULT '0' NOT NULL,
wp_add tinyint(4) DEFAULT '0' NOT NULL,
wp_edit tinyint(4) DEFAULT '0' NOT NULL,
wp_del tinyint(4) DEFAULT '0' NOT NULL,
group_add tinyint(4) DEFAULT '0' NOT NULL,
group_edit tinyint(4) DEFAULT '0' NOT NULL,
group_del tinyint(4) DEFAULT '0' NOT NULL,
PRIMARY KEY (id)
);
#
# Dumping data for table groups
#
INSERT INTO groups VALUES (1, 'Full Admin', 'All function can be accessed', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1', '1');
# --------------------------------------------------------
#
# Table structure for table news
#
CREATE TABLE news (
id int(11) DEFAULT '0' NOT NULL auto_increment,
headline varchar(80),
author varchar(80),
category varchar(80),
picture varchar(120),
datum timestamp(14),
preview text,
tekst text,
lang varchar(10),
views int(11),
PRIMARY KEY (id)
);
#
# Table structure for table news_comment
#
CREATE TABLE news_comment (
id int(11) DEFAULT '0' NOT NULL auto_increment,
nid int(11) DEFAULT '0' NOT NULL,
author varchar(30) NOT NULL,
datum timestamp(14),
tekst text NOT NULL,
UNIQUE id (id)
);
#
# Table structure for table news_logged
#
CREATE TABLE news_logged (
id int(11) DEFAULT '0' NOT NULL auto_increment,
nid int(11) DEFAULT '0' NOT NULL,
ip varchar(250) NOT NULL,
PRIMARY KEY (id)
);
#
# Table structure for table partners
#
CREATE TABLE partners (
id int(11) DEFAULT '0' NOT NULL auto_increment,
name tinytext,
link tinytext,
picture tinytext,
description text,
clicks int(11),
out int(11),
main int(1),
gfx int(1),
PRIMARY KEY (id)
);
#
# Table structure for table pnews
#
CREATE TABLE pnews (
id int(11) DEFAULT '0' NOT NULL auto_increment,
headline varchar(80),
author varchar(80),
category varchar(80),
picture varchar(120),
datum timestamp(14),
preview text,
tekst text,
lang varchar(10),
PRIMARY KEY (id)
);
#
# Table structure for table smiles
#
CREATE TABLE smiles (
id int(11) DEFAULT '0' NOT NULL auto_increment,
code varchar(50),
smile varchar(100),
emotion varchar(75),
PRIMARY KEY (id)
);
#
# Dumping data for table smiles
#
INSERT INTO smiles VALUES (37, ':x', 's026.gif', 'Sick');
INSERT INTO smiles VALUES (36, ':sb', 's025.gif', 'Scarebear');
INSERT INTO smiles VALUES (35, ':(', 's024.gif', 'Sad');
INSERT INTO smiles VALUES (34, ':-(', 's024.gif', 'Sad');
INSERT INTO smiles VALUES (29, '(o)', 's020.gif', 'Moon');
INSERT INTO smiles VALUES (30, '}:|', 's021.gif', 'Ninja');
INSERT INTO smiles VALUES (33, ':sad:', 's024.gif', 'Sad');
INSERT INTO smiles VALUES (32, ':brb', 's023.gif', 'Running');
INSERT INTO smiles VALUES (31, ':,', 's022.gif', 'OhWell');
INSERT INTO smiles VALUES (27, 'LOL', 's019.gif', 'LOL');
INSERT INTO smiles VALUES (26, 'lol', 's019.gif', 'LOL');
INSERT INTO smiles VALUES (28, ':moon', 's020.gif', 'Moon');
INSERT INTO smiles VALUES (25, ':jafo', 's018.gif', 'Jafo');
INSERT INTO smiles VALUES (24, ':|', 's017.gif', 'Impartial');
INSERT INTO smiles VALUES (23, ':-)', 's016.gif', 'Happy');
INSERT INTO smiles VALUES (22, ':smile:', 's016.gif', 'Happy');
INSERT INTO smiles VALUES (20, ':grin:', 's015.gif', 'Grin');
INSERT INTO smiles VALUES (21, ':)', 's016.gif', 'Happy');
INSERT INTO smiles VALUES (19, ':-D', 's015.gif', 'Grin');
INSERT INTO smiles VALUES (18, ':D', 's015.gif', 'Grin');
INSERT INTO smiles VALUES (17, ':gkmug', 's014.gif', 'gRAVEmug');
INSERT INTO smiles VALUES (15, '8|p', 's012.gif', 'Frogboy');
INSERT INTO smiles VALUES (14, '{:p', 's011.gif', 'Fool');
INSERT INTO smiles VALUES (13, ':evil', 's010.gif', 'Evil');
INSERT INTO smiles VALUES (16, ':grave', 's013.gif', 'gRAVE');
INSERT INTO smiles VALUES (12, '}:D', 's010.gif', 'Evil');
INSERT INTO smiles VALUES (11, ':O', 's009.gif', 'Embarassed');
INSERT INTO smiles VALUES (10, ':doreen', 's008.gif', 'Doreen');
INSERT INTO smiles VALUES (9, ':devil', 's007.gif', 'Devil');
INSERT INTO smiles VALUES (8, ':cry', 's006.gif', 'Cry');
INSERT INTO smiles VALUES (7, 'B)', 's005.gif', 'Cool');
INSERT INTO smiles VALUES (6, '8)', 's005.gif', 'Cool');
INSERT INTO smiles VALUES (5, ':china', 's004.gif', 'China');
INSERT INTO smiles VALUES (4, ':9', 's003.gif', 'Cheesy');
INSERT INTO smiles VALUES (3, '}:(', 's002.gif', 'Angry');
INSERT INTO smiles VALUES (2, ':o', 's001.gif', 'Amazed');
INSERT INTO smiles VALUES (1, '8O', 's001.gif', 'Amazed');
INSERT INTO smiles VALUES (38, ':zzz', 's027.gif', 'Sleepy');
INSERT INTO smiles VALUES (39, '==~', 's028.gif', 'Smoker');
INSERT INTO smiles VALUES (40, ':smoke', 's028.gif', 'Smoker');
INSERT INTO smiles VALUES (41, ':p', 's029.gif', 'Tongue');
INSERT INTO smiles VALUES (42, ':P', 's029.gif', 'Tongue');
INSERT INTO smiles VALUES (43, ';)', 's030.gif', 'Wink');
INSERT INTO smiles VALUES (44, '}:?', 's031.gif', 'What');
INSERT INTO smiles VALUES (45, ':snow', 's032.gif', 'Snow');
# --------------------------------------------------------
#
# Table structure for table topic
#
CREATE TABLE topic (
id int(11) DEFAULT '0' NOT NULL auto_increment,
topicimage varchar(80),
topictext varchar(255),
counter int(11),
PRIMARY KEY (id)
);
#
# Dumping data for table topic
#
INSERT INTO topic VALUES (1, 'linux.gif', 'Linux', 0);
INSERT INTO topic VALUES (2, 'amd.gif', 'AMD', 0);
INSERT INTO topic VALUES (3, 'aol.jpg', 'America Online', 0);
INSERT INTO topic VALUES (4, 'caldera.gif', 'Caldera Systems', 0);
INSERT INTO topic VALUES (5, 'mac.gif', 'Apple / Mac', 0);
INSERT INTO topic VALUES (6, 'beos.gif', 'BeOS', 0);
INSERT INTO topic VALUES (7, 'compaq.gif', 'Compaq', 0);
INSERT INTO topic VALUES (8, 'corel.gif', 'Corel', 0);
INSERT INTO topic VALUES (9, 'debian.gif', 'Debian', 0);
INSERT INTO topic VALUES (10, 'skinbase.jpg', 'Skinbase', 0);
INSERT INTO topic VALUES (11, 'freebsd.gif', 'FreeBSD', 0);
INSERT INTO topic VALUES (12, 'gimp.gif', 'GIMP', 0);
INSERT INTO topic VALUES (13, 'gnome.gif', 'GNOME', 0);
INSERT INTO topic VALUES (14, 'gnu.jpg', 'GNU / GPL', 0);
INSERT INTO topic VALUES (15, 'hp.gif', 'Hewlett Packard', 0);
INSERT INTO topic VALUES (16, 'ibm.gif', 'IBM', 0);
INSERT INTO topic VALUES (17, 'intel.gif', 'Intel', 0);
INSERT INTO topic VALUES (18, 'java.gif', 'Java', 0);
INSERT INTO topic VALUES (19, 'kde.gif', 'KDE', 0);
INSERT INTO topic VALUES (20, 'mandrake.gif', 'Mandrake', 0);
INSERT INTO topic VALUES (21, 'microsoft.gif', 'Microsoft', 0);
INSERT INTO topic VALUES (22, 'mozilla.gif', 'Mozilla', 0);
INSERT INTO topic VALUES (23, 'netscape.gif', 'Netscape', 0);
INSERT INTO topic VALUES (24, 'perl.gif', 'Perl', 0);
INSERT INTO topic VALUES (25, 'redhat.gif', 'Red Hat', 0);
INSERT INTO topic VALUES (26, 'sgi.gif', 'Silicon Graphics', 0);
INSERT INTO topic VALUES (27, 'sun.gif', 'Sun Microsystems', 0);
INSERT INTO topic VALUES (28, 'suse.gif', 'SuSE', 0);
INSERT INTO topic VALUES (29, 'x.jpg', 'X Window', 0);
INSERT INTO topic VALUES (30, 'windows.jpg', 'Windows 95/98/NT', 0);
INSERT INTO topic VALUES (31, 'amiga.gif', 'Amiga', 0);
INSERT INTO topic VALUES (32, 'other.jpg', 'Other', 0);
INSERT INTO topic VALUES (33, 'mp3.gif', 'MP3', 0);
INSERT INTO topic VALUES (34, 'winme.gif', 'Windows ME', 0);
INSERT INTO topic VALUES (35, 'cellphone.gif', 'Telecomunications', 0);
INSERT INTO topic VALUES (36, 'nvidialogo.gif', 'nVIDIA', 0);
# --------------------------------------------------------
#
# Table structure for table users
#
CREATE TABLE users (
id int(11) DEFAULT '0' NOT NULL auto_increment,
uname varchar(30),
passwd varchar(30),
email varchar(80),
info tinytext,
name tinytext,
PRIMARY KEY (id)
);
#
# Table structure for table weekA
#
CREATE TABLE weekA (
id int(11) DEFAULT '0' NOT NULL auto_increment,
wid int(11),
answer int(11),
PRIMARY KEY (id)
);
#
# Table structure for table weekQ
#
CREATE TABLE weekQ (
id int(11) DEFAULT '0' NOT NULL auto_increment,
question text,
answers varchar(255),
author varchar(120),
PRIMARY KEY (id)
);
Co do drugiego problemu wyswietlania newsów to kod bedzie taki:
<?
include "NAZWAFOLDERU/WebPage/index.php3";
?>
Lub poprostu.
http://DOMENA/NAZWAFOLDERU/WebPage/
NAZWAFOLDERU= Folder do którego wgrales pliki.