<?php
$date = date('o-m-d');

$sql = ("CREATE TABLE IF NOT EXISTS `".$prefix."admin` (
  `id` int(4) NOT NULL auto_increment,
  `username` varchar(65) NOT NULL default '',
  `password` varchar(65) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 AUTO_INCREMENT=2");
mysql_query($sql);

$sql = ("INSERT INTO `".$prefix."admin` VALUES (1, 'admin', 'password')");
mysql_query($sql);


$sql = ("CREATE TABLE `".$prefix."settings` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `installed` int(1) NOT NULL DEFAULT '1',
  `pagename` varchar(255) NOT NULL DEFAULT '',
  `slogan` varchar(255) NOT NULL DEFAULT '',
  `email` varchar(255) NOT NULL DEFAULT '',
  `link_request` int(3) NOT NULL DEFAULT '1',
  `clicks` int(1) NOT NULL DEFAULT '1',
  `template` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 AUTO_INCREMENT=2");
mysql_query($sql);

$sql = ("INSERT INTO `".$prefix."settings` (`id`, `installed`, `pagename`, `slogan`, `email`, `link_request`, `clicks`, `template`) VALUES
(1, 1, 'Hot Links', 'We show your links for free', 'your@email.com', 1, 1, 'basic.css')");
mysql_query($sql);


$sql = ("CREATE TABLE IF NOT EXISTS `".$prefix."websites` (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `website_name` varchar(30) NOT NULL,
  `website_url` varchar(255) NOT NULL,
  `website_description` text NOT NULL,
  `website_banner` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `date` date NOT NULL,
  `hits_out_total` int(10) NOT NULL DEFAULT '0',
  `hits_in_total` int(10) NOT NULL DEFAULT '0',
  `hits_out` int(10) NOT NULL DEFAULT '0',
  `hits_in` int(10) NOT NULL DEFAULT '0',
  `active` int(1) NOT NULL DEFAULT '0',
  `website_domain` varchar(30) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1");
mysql_query($sql);

$sql = ("INSERT INTO `".$prefix."websites` (`id`, `website_name`, `website_url`, `website_description`, `website_banner`, `email`, `date`, `hits_out_total`, `hits_in_total`, `hits_out`, `hits_in`, `active`, `website_domain`) VALUES
(1, 'Friends in War Software', 'http://software.friendsinwar.com', 'Different kind of free software for your site or pc.', 'http://software.friendsinwar.com/images/header.png', 'tunedcars2003@hotmail.com', '".$date."', 0, 0, 0, 0, 1, 'software.friendsinwar.com')");
mysql_query($sql);
?>
