Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("inc/header.php");
- $result = mysql_query("CREATE TABLE IF NOT EXISTS `news` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `title` varchar(100) NOT NULL,
- `postedon` datetime NOT NULL,
- `content` text NOT NULL,
- PRIMARY KEY (`id`)
- ) ENGINE = MYISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;");
- if($result) {
- echo "News table successfully created. <br />";
- $result = mysql_query("INSERT INTO `news` (`id`, `title`, `postedon`, `content`) VALUES
- (NULL, 'Welcome to StarDanks CMS!', NOW(), '<p>Thanks for installing StarDanks CMS, to modify the news, please login to the admin center.</p><p>You have successfully installed StarDanks CMS v0.1, bugs are to be expected. Please report them to the respective forum thread so they can be fixed!</p><p>Sincere Regards,</p><p>-Danks</p>');");
- if($result) {
- echo "Sample data inserted. Done!<br />";
- echo "Click <a href=\"index.php\">here</a> to go to the home page.<br />";
- echo unlink('update.php') ? "This file was deleted." : "No permisisons to delete the file. Please remove it manually!";
- } else {
- echo "Something went wrong...";
- }
- } else {
- echo "Something went wrong :(";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement