Location: PHPKode > projects > MyPHPBib > login_startup.php
<?php

/* Crude file, run this once when installing so that a user with admin priviledges
 is created. */

session_start();
require_once ('login/user.inc.php');
$user = new User();

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Startup</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php


	// User has submitted validated details
	$result = $user->Startup ();
	switch ($result)
	{
		case 0:
			// Success, notify user and administrator			
			echo "<h2>Startup OK!</h2>";
			break;
		
		case 1:
		case 2:
			// A user with this name already exists
			$html = "<script language=\"JavaScript\">";
			$html .= "alert(\"Failed.\");";
			$html .= "</script>";
			echo $html;
			break;
	}	

?>

</body>
</html>



Return current item: MyPHPBib