?? index.php
字號:
<?
/**
* Musicbox Database Installer Created by Abbas
* TeaM SCRiPTMAFiA 2005
*/
include("show_header.php");
?>
<?
/**
* Please Edit Mysql Information here
*/
$host = 'localhost';
$user = 'insert your database details here';
$pass = 'insert your database details here';
$db = 'insert your database details here';
$conn = mysql_connect($host,$user,$pass) or die("Unable to connect to MySQL server");
mysql_select_db($db,$conn) or die("Unable to select to MySQL database");
$query = "CREATE TABLE `users` (`username` varchar(30) primary key, `password` varchar(32), `userid` varchar(32), `userlevel` tinyint(1) unsigned NOT NULL, `email` varchar(50), `timestamp` int(11) unsigned not null, `avatar` text NOT NULL, `sex` varchar(6) NOT NULL default '', `country` char(2) NOT NULL default '', `newsletter` int(1) NOT NULL default '0' );";
mysql_query($query) or print("<p>Warning unable to create table 'users'</p>");
$query = "CREATE TABLE `active_users` (`username` varchar(30) primary key, `timestamp` int(11) unsigned not null);";
mysql_query($query) or print("<p>Warning unable to create table 'active_users'</p>");
$query = "CREATE TABLE `active_guests` (`ip` varchar(15) primary key, `timestamp` int(11) unsigned not null );";
mysql_query($query) or print("<p>Warning unable to create table 'active_guest'</p>");
$query = "CREATE TABLE `banned_users` (`username` varchar(30) primary key, `timestamp` int(11) unsigned not null );";
mysql_query($query) or print("<p>Warning unable to create table 'banned_users'</p>");
$query = "CREATE TABLE `album` (`id` int(10) unsigned NOT NULL auto_increment, `album_name` varchar(255) NOT NULL default '', `artist_id` int(10) unsigned NOT NULL default '0', `genre_id` int(10) unsigned NOT NULL default '0', `album_release` date NOT NULL default '0000-00-00', `album_photo` varchar(255) NOT NULL default '', `album_info` text NOT NULL, `post_date` date NOT NULL default '0000-00-00', PRIMARY KEY (`id`), FULLTEXT KEY `album_info` (`album_info`)) TYPE=MyISAM;";
mysql_query($query) or print("<p>Warning unable to create table 'album'</p>");
$query = "CREATE TABLE `artist` (`id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', `url` varchar(255) NOT NULL default '', `artist_photo` varchar(255) NOT NULL default '', `artist_info` text NOT NULL, PRIMARY KEY (`id`), FULLTEXT KEY `artist_info` (`artist_info`)) TYPE=MyISAM;";
mysql_query($query) or print("<p>Warning unable to create table 'artist'</p>");
$query = "CREATE TABLE `format` (`id` int(10) unsigned NOT NULL auto_increment, `format` varchar(255) NOT NULL default '', `extension` varchar(255) NOT NULL default '', `format_url` varchar(255) NOT NULL default '', PRIMARY KEY (`id`)) TYPE=MyISAM;";
mysql_query($query) or print("<p>Warning unable to create table 'format'</p>");
$query = "CREATE TABLE `genre` (`id` int(10) unsigned NOT NULL auto_increment, `genre` varchar(255) NOT NULL default '', PRIMARY KEY (`id`)) TYPE=MyISAM;";
mysql_query($query) or print("<p>Warning unable to create table 'genre'</p>");
$query = "CREATE TABLE `lyric` (`id` int(10) unsigned NOT NULL auto_increment, `lyrics` text NOT NULL, PRIMARY KEY (`id`), FULLTEXT KEY `lyrics` (`lyrics`)) TYPE=MyISAM;";
mysql_query($query) or print("<p>Warning unable to create table 'lyric'</p>");
$query = "CREATE TABLE mailfriend (id int(10) unsigned NOT NULL auto_increment, user_id int(11) NOT NULL default '0', username varchar(100) NOT NULL default '', sent_to varchar(255) NOT NULL default '', subject varchar(255) NOT NULL default '', song_id int(11) NOT NULL default '0', album_id int(11) NOT NULL default '0', artist_id int(11) NOT NULL default '0', genre_id int(11) NOT NULL default '0', message text NOT NULL, PRIMARY KEY (id), FULLTEXT KEY messasge (message)) TYPE=MyISAM;";
mysql_query($query) or print("<p>Warning unable to create table 'mailfriend'</p>");
$query = "CREATE TABLE `playlist` (`id` int(10) unsigned NOT NULL auto_increment, `user_id` int(11) NOT NULL default '0', `username` varchar(100) NOT NULL default'', `playlist_name` varchar(255) NOT NULL default '', PRIMARY KEY (`id`)) TYPE=MyISAM AUTO_INCREMENT=6;";
mysql_query($query) or print("<p>Warning unable to create table 'playlist'</p>");
$query = "CREATE TABLE `playlistsong` (`id` int(10) unsigned NOT NULL auto_increment, `song_id` int(10) unsigned NOT NULL default '0', `playlist_id` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`)) TYPE=MyISAM;";
mysql_query($query) or print("<p>Warning unable to create table 'playlistsong'</p>");
$query = "CREATE TABLE `song` (`id` int(10) unsigned NOT NULL auto_increment, `song_name` varchar(255) NOT NULL default '', `artist_id` int(10) unsigned NOT NULL default '0', `album_id` int(10) unsigned NOT NULL default '0', `length` int(11) NOT NULL default '0', `format_id` int(10) unsigned NOT NULL default '0', `rating` int(10) unsigned NOT NULL default '0', `num_rating` int(10) unsigned NOT NULL default '0', `song_path` varchar(255) NOT NULL default '', `plays` int(10) unsigned NOT NULL default '0', `lyric_id` int(10) unsigned NOT NULL default '0', `lyrics_approved` tinyint(4) NOT NULL default '0', PRIMARY KEY (`id`)) TYPE=MyISAM;";
mysql_query($query) or print("<p>Warning unable to create table 'song'</p>");
$query = "CREATE TABLE `searches` (`id` int(11) NOT NULL auto_increment, `term` text NOT NULL, `in` varchar(8) NOT NULL default '', `username` varchar(40) NOT NULL default '', PRIMARY KEY (`id`)) TYPE=MyISAM AUTO_INCREMENT=36;";
mysql_query($query) or print("<p>Warning unable to create table 'Searches'</p>");
print("<table width='100%' align=center><tr><td><p><strong>You Have Successfully Installed Musicbox Database</strong></p></td></tr></table>");
print("<p><a href='nextstep.php'><b>Please Complete the Next step Click here >> </b></a></p>");
?>
<?
include("show_footer.php"); ?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -