
function makesetup(hash,user)
{
var output = '<?php \n @ $name = $HTTP_POST_VARS[\'name\']\;\n@ $pass = $HTTP_POST_VARS[\'pass\']\;\n  if(empty($name)||empty($pass))\n\n{\n\n?>\n\n <h1>Please log in</h1> \n To proceed with setting up Rilke CMS, you must login \n <form method=\"post\" action=\"<?php echo $_SERVER[\'PHP_SELF\'] ;?>\"> \n\n<table border=\"1\"><tr> <th> Username </th>\n\n<td> <input type=\"text\" name=\"name\" value=\"\"> </td></tr> \n\n<tr><th> Password </th>\n<td> <input type=\"password\" name=\"pass\"> </td></tr>\n <tr>\n\n<td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Log In\"></td> </tr>\n</table>\n</form>\n\n<?php \n\n } \n\nelse if($name==\"' + user + '\" && md5($pass) == \"' + hash + '\")\n{ define(\"MAKETABLES\", true); \n include \"set.php\";  \n}\n\n else \n\n {define(\"MAKETABLES\", false); \n include \"denied.php\"; } \n\n?> ' ;
	
return (output);
}

function savepass(passwd, user)

{
	//snippet based on code from JavaScript, the Definitive Guide
var w = window.open("", "newwin", "resizable,status,width=500,height=400");  
// Get the Document object of the new window
var d = w.document;

var msg = "<p><h3>Please save this file for your reference (Ctrl + S)!</h3><br><br><strong>Username:</strong>" + user + "<br><br> <strong>Password: </strong>" + passwd + "</p>";
// Output an HTML document, including a form, into the new window
d.write(msg);	
}
