'; if (!isset($_REQUEST['sa'])) { echo'
SMF DB Editor - SMF-Shoutbox MOD - SQL INSTALL
Click here to start shoutbox installation
'; } else { echo ''; if ((isset($_REQUEST['man'])) || (!isset($db_name))) { include_once ("Settings.php"); $dbcon = mysql_connect($db_server, $db_user, $db_passwd); mysql_select_db($db_name); } $error=0; $shoutChunkSize = 350; $timeLimitThreshold = 10; $self = &$_SERVER['PHP_SELF']; $start_time = time(); // Now time to make the new table $result = mysql_query(" CREATE TABLE {$db_prefix}sbox_content (id int(11) NOT NULL auto_increment, time varchar(25) NOT NULL default '', name varchar(80) NOT NULL default '', content text NOT NULL, PRIMARY KEY (id)) TYPE=MyISAM;"); if (!$result) { echo "Error creating shoutbox table. SQL Error: ".mysql_error()."
"; $error++; } else echo "Shoutbox table created!
"; $toSet = array(); $toSet['sbox_Visible'] = '1'; $toSet['sbox_GuestAllowed'] = '0'; $toSet['sbox_MaxLines'] = '30'; $toSet['sbox_Height'] = '180'; $toSet['sbox_SmiliesVisible'] = '1'; $toSet['sbox_TextSize1'] = 'x-small'; $toSet['sbox_TextColor1'] = '#123456'; $toSet['sbox_TextSize2'] = 'x-small'; $toSet['sbox_TextColor2'] = '#000000'; $toSet['sbox_RefreshTime'] = '20'; $toSet['sbox_BackgroundColor'] = '#E5E5E8'; $toSet['sbox_FontFamily1'] = 'Verdana, sans-serif'; $toSet['sbox_FontFamily2'] = 'Verdana, sans-serif'; // Insert settings foreach ($toSet as $key => $value) { $result = mysql_query("INSERT INTO {$db_prefix}settings (`variable`, `value`) VALUES ('$key', '$value');"); if(!$result) { echo "Table: ".mysql_error()." Already exists, skipping.
"; $error++; } else echo "Data inserted correctly!
"; } $done = 1; // Result if (isset($done)) { echo ""; if($error==0) echo "

Upgrade of SQL was successfull."; elseif ($error==1) echo "

There was one error when upgrading your SQL."; elseif ($error>1) echo "

There were $error errors when upgrading your SQL."; } } echo ''; ?>