HTML beginner |
|
Omdat mijn database het niet toestaat op de een of andere manier om door een install pagina de sql erin te zetten. Zou ik graag de losse sql willen van mijn cms... Maar aangezien ik er niks van snap vroeg ik me af of jullie wat met de code konden:
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<p>Thank you for downloading EliteSquadrons.</p>
<p>EliteSquadrons is based off the Promisance™ Enhanced Engine. This install
script and system is provided "as-is" without warrenty and by clicking
"INSTALL" you agree to release Kirk Fickert (aka Unimatrix) Fickert
Online Media, LLC and all others involved from liablity from damages</p>
<hr>
<p>Okay with that out of the way lets get EliteSquadrons installed. Are you ready
for this? Let's go through a simple checklist and find out!</p>
<p>1. Did you read and understand the BSD licences?<br />
2. Do you know that all graphics are copyright © by its designer and may
<strong>ONLY</strong> be used by PERMISSION of Lorian. <br />
3. Do you have at least PHP 4.2.x installed? <br />
4. Do you have MySQL installed and ready?<br />
5. Did you edit const.php to match your server?<br />
6. Did you take a shower this morning?<br />
7. Did you remember to grab a cup of espresso before installing?<br />
8. Do you think this is getting sarcastic and out of hand?<br />
9. Do you have 5 hours a day to spend being an admin?<br />
10. Do you have your own Code Monkey named Albert to chase down bugs?</p>
<p>If you answered "no" to one or more of the above, think twice before
installing!</p>
<form name="form1" id="form1" method="post" action="">
<p align="center">
<label>Install Password
<input type="password" name="textfield" />
</label>
</p>
<p align="center">
<label>
<input name="submit" type="submit" id=" submit" value="install" />
</label>
</p>
</form>
<p> </p>
</body>
</html>
<?php
include('const.php') or die('damn const.php file is missing, kicking you out of the install process;');
$link = @mysql_connect($dbhost, $dbuser, $dbpass) or die('cannot find the database, captain');
mysql_select_db($dbname) or die('cannot select the database');
//check the password
if ($installpwd == $textfield);
{
//table structure for clanforum
mysql_query("CREATE TABLE '.$clanForumdb.' (
num int(11) NOT NULL default '0',
name text NOT NULL,
PRIMARY KEY (num)
)") or die('can forum db error, install aborted');
//Clan threads table structure
mysql_query('CREATE TABLE beta_clanthread (
forum int(11) NOT NULL default '0',
parent_id int(11) NOT NULL default '0',
thread_id int(11) NOT NULL auto_increment,
modified datetime NOT NULL default '0000-00-00 00:00:00',
author text NOT NULL,
title text NOT NULL,
content text NOT NULL,
added datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (thread_id)
) TYPE=MyISAM');
//fourm datastucture
mysql_query('CREATE TABLE beta_forum (
forum_id tinyint(4) NOT NULL auto_increment,
forum_name varchar(40) NOT NULL default '',
notes tinytext NOT NULL,
mod tinyint(4) NOT NULL default '0',
PRIMARY KEY (forum_id)
) TYPE=MyISAM');
//
$query = 'INSERT INTO '.$forumdb.' (forum_id, forum_name, notes, mod) VALUES (6, 'General', 'Talk about anything under the sky.', 0)';
mysql_query($query);
$query2 = 'INSERT INTO '.$forumdb.' (forum_id, forum_name, notes, mod) VALUES (7, 'Alliance Talk', 'Diplomacy of Alliances.', 0)';
mysql_query($query2);
$query3 = 'INSERT INTO '.$forumdb.' (forum_id, forum_name, notes, mod) VALUES (9, 'Bugs and Suggestions', 'Have an idea about the game that you would like to be heard?', 0)';
mysql_query($query3);
//forum titles stricture
mysql_query('CREATE TABLE '.$titlesdb.' (
`id` int(11) NOT NULL default '0',
`title` text NOT NULL,
PRIMARY KEY (`id`)
) TYPE=MyISAM COMMENT="table for titles"');
mysql_query('INSERT INTO '.$titlesdb.' (`id`, `title`) VALUES (0, 'Normal User'),
(1, 'Special User'),
(2, 'Banned From Forum'),
(3, 'Banned From Game'),
(4, 'Forum Moderator'),
(5, 'Forum Admin'),
(6, 'Game Admin'),
(7, 'Owner')');
//clan db structure
mysql_query('CREATE TABLE '.$clandb.' (
num smallint(5) unsigned NOT NULL auto_increment,
founder mediumint(8) unsigned NOT NULL default '0',
asst mediumint(8) unsigned NOT NULL default '0',
fa1 mediumint(8) unsigned NOT NULL default '0',
fa2 mediumint(8) unsigned NOT NULL default '0',
ally1 smallint(5) unsigned NOT NULL default '0',
ally2 smallint(5) unsigned NOT NULL default '0',
ally3 smallint(5) unsigned NOT NULL default '0',
war1 smallint(5) unsigned NOT NULL default '0',
war2 smallint(5) unsigned NOT NULL default '0',
war3 smallint(5) unsigned NOT NULL default '0',
pic tinytext NOT NULL,
url tinytext NOT NULL,
motd text NOT NULL,
members smallint(6) NOT NULL default '1',
name tinytext NOT NULL,
tag tinytext NOT NULL,
password tinytext NOT NULL,
PRIMARY KEY (num)
) TYPE=MyISAM');
//forum config
mysql_query('CREATE TABLE '.$forumconfig.' (
forum_id int(11) default '0',
all_html varchar(4) default 'NO',
pre varchar(4) default 'NO',
links varchar(4) default 'NO',
images varchar(4) default 'NO',
show_ip varchar(4) default 'YES',
show_info varchar(4) default 'YES',
block_hosts varchar(4) default 'NO'
) TYPE=MyISAM');
else
echo "Nice try, but the passwords do not match! Install Aborted!";
}
?>
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <p>Thank you for downloading EliteSquadrons.</p> <p>EliteSquadrons is based off the Promisance™ Enhanced Engine. This install script and system is provided "as-is" without warrenty and by clicking "INSTALL" you agree to release Kirk Fickert (aka Unimatrix) Fickert Online Media, LLC and all others involved from liablity from damages</p> <hr> <p>Okay with that out of the way lets get EliteSquadrons installed. Are you ready for this? Let's go through a simple checklist and find out!</p> <p>1. Did you read and understand the BSD licences?<br /> 2. Do you know that all graphics are copyright © by its designer and may <strong>ONLY</strong> be used by PERMISSION of Lorian. <br /> 3. Do you have at least PHP 4.2.x installed? <br /> 4. Do you have MySQL installed and ready?<br /> 5. Did you edit const.php to match your server?<br /> 6. Did you take a shower this morning?<br /> 7. Did you remember to grab a cup of espresso before installing?<br /> 8. Do you think this is getting sarcastic and out of hand?<br /> 9. Do you have 5 hours a day to spend being an admin?<br /> 10. Do you have your own Code Monkey named Albert to chase down bugs?</p> <p>If you answered "no" to one or more of the above, think twice before installing!</p> <form name="form1" id="form1" method="post" action=""> <p align="center"> <label>Install Password <input type="password" name="textfield" /> </label> </p> <p align="center"> <label> <input name="submit" type="submit" id=" submit" value="install" /> </label> </p> </form> <p> </p> </body> </html> <?php include('const.php') or die('damn const.php file is missing, kicking you out of the install process;'); $link = @mysql_connect($dbhost, $dbuser, $dbpass) or die('cannot find the database, captain'); //check the password if ($installpwd == $textfield); { //table structure for clanforum num int(11) NOT NULL default '0', name text NOT NULL, PRIMARY KEY (num) )") or die('can forum db error, install aborted'); //Clan threads table structure forum int(11) NOT NULL default '0', parent_id int(11) NOT NULL default '0', thread_id int(11) NOT NULL auto_increment, modified datetime NOT NULL default '0000-00-00 00:00:00', author text NOT NULL, title text NOT NULL, content text NOT NULL, added datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (thread_id) ) TYPE=MyISAM'); //fourm datastucture forum_id tinyint(4) NOT NULL auto_increment, forum_name varchar(40) NOT NULL default '', notes tinytext NOT NULL, mod tinyint(4) NOT NULL default '0', PRIMARY KEY (forum_id) ) TYPE=MyISAM'); // $query = 'INSERT INTO '.$forumdb.' (forum_id, forum_name, notes, mod) VALUES (6, 'General', 'Talk about anything under the sky.', 0)'; $query2 = 'INSERT INTO '.$forumdb.' (forum_id, forum_name, notes, mod) VALUES (7, 'Alliance Talk', 'Diplomacy of Alliances.', 0)'; $query3 = 'INSERT INTO '.$forumdb.' (forum_id, forum_name, notes, mod) VALUES (9, 'Bugs and Suggestions', 'Have an idea about the game that you would like to be heard?', 0)'; //forum titles stricture `id` int(11) NOT NULL default '0', `title` text NOT NULL, PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT="table for titles"'); mysql_query('INSERT INTO '.$titlesdb.' (`id`, `title`) VALUES (0, 'Normal User '), (1, 'Special User'), (2, 'Banned From Forum'), (3, 'Banned From Game'), (4, 'Forum Moderator'), (5, 'Forum Admin'), (6, 'Game Admin'), (7, 'Owner')'); //clan db structure num smallint(5) unsigned NOT NULL auto_increment, founder mediumint(8) unsigned NOT NULL default '0', asst mediumint(8) unsigned NOT NULL default '0', fa1 mediumint(8) unsigned NOT NULL default '0', fa2 mediumint(8) unsigned NOT NULL default '0', ally1 smallint(5) unsigned NOT NULL default '0', ally2 smallint(5) unsigned NOT NULL default '0', ally3 smallint(5) unsigned NOT NULL default '0', war1 smallint(5) unsigned NOT NULL default '0', war2 smallint(5) unsigned NOT NULL default '0', war3 smallint(5) unsigned NOT NULL default '0', pic tinytext NOT NULL, url tinytext NOT NULL, motd text NOT NULL, members smallint(6) NOT NULL default '1', name tinytext NOT NULL, tag tinytext NOT NULL, password tinytext NOT NULL, PRIMARY KEY (num) ) TYPE=MyISAM'); //forum config forum_id int(11) default '0', all_html varchar(4) default 'NO', pre varchar(4) default 'NO', links varchar(4) default 'NO', images varchar(4) default 'NO', show_ip varchar(4) default 'YES', show_info varchar(4) default 'YES', block_hosts varchar(4) default 'NO' ) TYPE=MyISAM'); else echo "Nice try, but the passwords do not match! Install Aborted!"; } ?>
Als iemand dit snapt zou diegene dan de losse sql ofzow eruit kunnen halen?
|