Location: PHPKode > projects > MyPHPBib > login_startup.php

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

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">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


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



Return current item: MyPHPBib