<?php
include('db.php');

$mysqli->query("alter table admin convert to character set utf8 collate utf8_general_ci");

$mysqli->query("alter table ads convert to character set utf8 collate utf8_general_ci");

$mysqli->query("alter table pages convert to character set utf8 collate utf8_general_ci");

$mysqli->query("alter table settings convert to character set utf8 collate utf8_general_ci");

$mysqli->query("alter table search convert to character set utf8 collate utf8_general_ci");

$mysqli->query("ALTER TABLE `ads` ADD PRIMARY KEY(id)");

$mysqli->query("ALTER TABLE `ads` ADD `ad3` VARCHAR(999) AFTER `ad2`");

$mysqli->query("ALTER TABLE `ads` ADD `ad4` VARCHAR(999) AFTER `ad3`");

$mysqli->query("ALTER TABLE `settings` ADD `siteurl` VARCHAR(500) AFTER `name`");

$mysqli->query("ALTER TABLE `search` ADD `datetime` VARCHAR(255) AFTER `term`");

echo "<center>Your website has beeing updated. Please delete this file (update.php)</center>";

?>