<?php



include ("db.inc.php");


$error = "</style><strong><FONT face=Verdana font-size=2px color=red>Installation Failure:</FONT></strong>";


$sql = "CREATE TABLE alerts (
  id bigint(20) NOT NULL AUTO_INCREMENT,
  number text COLLATE utf8_turkish_ci NOT NULL,
  date datetime NOT NULL,
  subject text COLLATE utf8_turkish_ci NOT NULL,
  message longtext COLLATE utf8_turkish_ci NOT NULL,
  status int(2) NOT NULL,
  PRIMARY KEY (id)
);";

$result = mysqli_query($connectionString ,$sql) or die("$error <FONT face=arial font-size=2px>alerts</FONT><br><br><input name=Submit type=submit value=Back onclick=javascript:history.back();>");


$sql = "INSERT INTO alerts VALUES (1, '17554531', '2014-03-07 12:25:35', 'Blocked Account', 'Your account have been temporarily Bloked:\r\nPlease contact call centre for Help! ', 1);";

$result = mysqli_query($connectionString ,$sql);


$sql = "INSERT INTO alerts VALUES (2, '17554531', '2014-03-07 12:29:13', 'Blocked Account', 'Your Account Has been Blocked', 1);";

$result = mysqli_query($connectionString ,$sql);




$sql = "CREATE TABLE history (
  id int(20) NOT NULL AUTO_INCREMENT,
  tid text COLLATE utf8_turkish_ci NOT NULL,
  number text COLLATE utf8_turkish_ci NOT NULL,
  date datetime NOT NULL,
  bname text COLLATE utf8_turkish_ci NOT NULL,
  bcountry text COLLATE utf8_turkish_ci NOT NULL,
  accnum text COLLATE utf8_turkish_ci NOT NULL,
  accname text COLLATE utf8_turkish_ci NOT NULL,
  ownadd text COLLATE utf8_turkish_ci NOT NULL,
  routnum text COLLATE utf8_turkish_ci NOT NULL,
  sort text COLLATE utf8_turkish_ci NOT NULL,
  amount text COLLATE utf8_turkish_ci NOT NULL,
  cot text COLLATE utf8_turkish_ci NOT NULL,
  type text COLLATE utf8_turkish_ci NOT NULL,
  details text COLLATE utf8_turkish_ci NOT NULL,
  status text COLLATE utf8_turkish_ci NOT NULL,
  stat text COLLATE utf8_turkish_ci NOT NULL,
  PRIMARY KEY (id)
);";

$result = mysqli_query($connectionString ,$sql) or die("$error <FONT face=arial font-size=2px>history</FONT><br><br><input name=Submit type=submit value=Back onclick=javascript:history.back();>");


$sql = "INSERT INTO history VALUES (1, '569916', '17554531', '0000-00-00 00:00:00', '', '', '', '', '1000000', '', 'Account Credit', 'Funds Transfer', 'Completed', '');";

$result = mysqli_query($connectionString ,$sql);


$sql = "INSERT INTO history VALUES (2, '550338', '38884239', '0000-00-00 00:00:00', '', '', '', '', '5600000', '', 'Account Credit', 'Credit ', 'Completed', '');";

$result = mysqli_query($connectionString ,$sql);


$sql = "INSERT INTO history VALUES (3, '703418', '38884239', '2014-03-09 13:42:59', 'BOA', 'USA', '100011111', '110000', '10000', '', 'Fund Transfer', 'Wire Transfer to BOA, USA(account number 100011111)', 'Interrupted for FSA Clearance', 'FSA_Page');";

$result = mysqli_query($connectionString ,$sql);




$sql = "CREATE TABLE messages (
  id int(11) NOT NULL AUTO_INCREMENT,
  number text COLLATE utf8_turkish_ci NOT NULL,
  date datetime NOT NULL,
  subject text COLLATE utf8_turkish_ci NOT NULL,
  message text COLLATE utf8_turkish_ci NOT NULL,
  status int(2) NOT NULL,
  PRIMARY KEY (id)
);";

$result = mysqli_query($connectionString ,$sql) or die("$error <FONT face=arial font-size=2px>history</FONT><br><br><input name=Submit type=submit value=Back onclick=javascript:history.back();>");

$sql = "INSERT INTO messages VALUES (1, '7493001920', '2015-11-26 05:56:33', 'TEST MESSAGE', 'You need to know that this is a test message. So it is not valid one bit. lolz.\r\nYou need to know that this is a test message. So it is not valid one bit. lolz.\r\nYou need to know that this is a test message. So it is not valid one bit. lolz.\r\nYou need to know that this is a test message. So it is not valid one bit. lolz.', 1);";

$result = mysqli_query($connectionString ,$sql);

$result = mysqli_query($connectionString ,$sql);
$sql = "INSERT INTO messages VALUES (2, '7493001920', '2015-11-27 05:23:21', 'TEST MESSAGE', ' You need to know that this is a test message. So it is not valid one bit. lolz.', 1);";

$result = mysqli_query($connectionString ,$sql);



$sql = "CREATE TABLE users (
  id int(20) NOT NULL AUTO_INCREMENT,
  accid text COLLATE utf8_turkish_ci NOT NULL,
  number text COLLATE utf8_turkish_ci NOT NULL,
  password text COLLATE utf8_turkish_ci NOT NULL,
  pin text COLLATE utf8_turkish_ci NOT NULL,
  firstname text COLLATE utf8_turkish_ci NOT NULL,
  lastname text COLLATE utf8_turkish_ci NOT NULL,
  dob date NOT NULL,
  gender text COLLATE utf8_turkish_ci NOT NULL,
  address text COLLATE utf8_turkish_ci NOT NULL,
  city text COLLATE utf8_turkish_ci NOT NULL,
  state text COLLATE utf8_turkish_ci NOT NULL,
  zip text COLLATE utf8_turkish_ci NOT NULL,
  country text COLLATE utf8_turkish_ci NOT NULL,
  phone text COLLATE utf8_turkish_ci NOT NULL,
  email text COLLATE utf8_turkish_ci NOT NULL,
  occupation text COLLATE utf8_turkish_ci NOT NULL,
  income text COLLATE utf8_turkish_ci NOT NULL,
  type text COLLATE utf8_turkish_ci NOT NULL,
  currency text COLLATE utf8_turkish_ci NOT NULL,
  lastlogin datetime NOT NULL,
  status text COLLATE utf8_turkish_ci NOT NULL,
  balance text COLLATE utf8_turkish_ci NOT NULL,
  balance2 text COLLATE utf8_turkish_ci NOT NULL,
  picture longblob NOT NULL,
  tax_status int(2) NOT NULL,
  PRIMARY KEY (id)
);";

$result = mysqli_query($connectionString ,$sql) or die("$error <FONT face=arial font-size=2px>history</FONT><br><br><input name=Submit type=submit value=Back onclick=javascript:history.back();>");


$sql = "INSERT INTO users VALUES (23, '', '7493001920', 'WEXSN0JK0H', '03367', 'Jason', 'Ciuit', '0000-00-00', 'Male', 'Old redmond', 'New york', 'New york', '10001', 'United States', '+1234567890', 'jason@test.com', 'Business man', '', 'eBusiness', '','0000-00-00 00:00:00', 'Dormant', '1434', '34', '', 0);";

$result = mysqli_query($connectionString ,$sql);


$sql = "INSERT INTO users VALUES (24, '', '7495012948', 'GQL41LR0MX', '73958', 'Peter', 'Backer', '0000-00-00', 'Male', 'Street 55', 'Liverpool', 'Liverpool', 'LV 47HN', 'Espana', '+44123456789', 'polo@test.com', 'Self Employed', '', 'eBusiness', '','0000-00-00 00:00:00', 'Inactive', '7', '0', '', 0);";

$result = mysqli_query($connectionString ,$sql);


echo "Database Installation Complete!";

	exit;


?>
