Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $sgpMsgs1 = array();
- $errStyle = "<div class=\"error\">";
- $okStyle = "<div class=\"success\">";
- mysql_select_db("sgs_sgpaste", $connect);
- $features_table = "CREATE TABLE `sgs_sgpaste`.`features`(`id` INT(12) AUTO_INCREMENT NOT NULL, `plan` VARCHAR(24) NOT NULL, `name` VARCHAR(62) NOT NULL, `paste` BLOB NOT NULL, `paste_limit` VARCHAR(9) NOT NULL, `syntax` VARCHAR NOT NULL, `upload` BLOB NOT NULL, `delete` BLOB NOT NULL, `edit` BLOB NOT NULL, `mlimit` VARCHAR(9) NOT NULL, `badge` BLOB NOT NULL, `acfees` INT(1) NOT NULL, `mfees` INT(2) NOT NULL, `yfees` INT(3) NOT NULL, `uprice` INT(2) NOT NULL, `signup` BLOB NOT NULL, `signup_time` VARCHAR(8) NOT NULL, `signup_date` VARCHAR(10) NOT NULL, PRIMARY_KEY(id))
- ENGINE=MyISAM, CHARACTER_SET=utf8";
- $features_entry = "INSERT INTO `features`(`id`, `plan`) VALUES(1, 'free'), (2, 'premium'), (3, 'super')";
- $q1 = mysql_query($features_table);
- $q2 = mysql_query($features_entry);
- if (!$q1) {
- $sgpMsgs1[] = $errStyle."Unable to create 'sgp_features' table: [Error #". mysql_errno($connect)."]". mysql_error($connect)."</div>";
- } else {
- $sgpMsgs1[] = $okStyle."Table 'sgp_features' table was created successfully</div>";
- }
- if (!$q2) {
- $sgpMsgs1[] = $errStyle."Unable to create SGPaste Plans: [Error #".mysql_errno($connect)."]". mysql_error($connect)."</div>";
- } else {
- $sgpMsgs1[] = $okStyle."SGPaste Plans was created successfully.</div>";
- }
- if (!empty($sgpMsgs1)) {
- foreach ($sgpMsgs1 as $sgpMsg1) {
- echo "<li>".$sgpMsg1."</li>";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement