Re-added navigation app installer

This commit is contained in:
kolaente 2017-09-27 21:58:12 +02:00
parent 8bbf7acb31
commit 4f99762684
1 changed files with 26 additions and 0 deletions

26
apps/Navigation/install.php Executable file
View File

@ -0,0 +1,26 @@
<?php
if(isset($_POST['submit']))
{
if($db->query('CREATE TABLE `' . $_POST['db_prefix'] . 'nav_nav` (
`id` int(11) NOT NULL,
`title` text CHARACTER SET latin1 NOT NULL,
`page` int(11) NOT NULL,
`parent` int(11) NOT NULL,
`nav_order` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav`
ADD PRIMARY KEY (`id`);
ALTER TABLE `' . $_POST['db_prefix'] . 'nav_nav`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
'))
{
echo msg('success', 'Navigation was installed successfully.');
}
else
{
echo msg('fail', 'An error occured while installing Navigation.');
exit;
}
}