<?php /** * This is a Branax pagecontroller. * */ // Include the essential config-file which also creates the $branax variable with its defaults. include __DIR__ . '/config.php'; $content = new CUser($branax['database']); // Do it and store it all in variables in the Anax container. $branax['title'] = "Ny Användare"; $branax['main'] = <<<EOD <h1>{$branax['title']}</h1> {$content->register()} EOD; // Finally, leave it all to the rendering phase of Anax. include BRANAX_THEME_PATH;
//$queries .= file_get_contents ('kernel/sql/helpcontent.sql'); $queriesarray = explode(';', $queries); // FIXME; stupid hack // unset the last arrayvlue --> it is empty unset($queriesarray[count($queriesarray) + 1]); foreach ($queriesarray as $query) { // if there are too many ';' // do not execute them $query = trim($query); if (!empty($query)) { echo $query . '<br />'; $d->query($query); } } include_once 'kernel/users.class.php'; $user = new CUser($d, false, $languages); $user->register($_POST['rootuser'], $_POST['rootpassword'], $_POST['rootpassword2'], $_POST['rootemail'], false, $_POST['rootemail']); $d->close(); } catch (exceptionlist $e) { echo $e->getMessage(); echo $e->debuginfo; } echo '<b>delete install.php now</b>'; } else { if ($_POST['submit'] == 'testdbconn') { echo 'test de connectie'; } else { die('error in POST'); } } }