Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <? include("include/session.php"); ?>
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="style-comunity.css">
- </head>
- <title></title>
- <body>
- <table width="100%" cellpadding="0" cellspacing="0">
- <tr>
- <td colspan="6" width="100%" bgcolor="#000000" ><img src="top.jpg" width="1000" height="154"></td>
- </tr>
- <tr align="right" bgcolor="#000000">
- </tr>
- <tr>
- <td width="120"></td>
- <td width="600" valign="top" height="300">
- <?
- /**
- * The user is already logged in, not allowed to register.
- */
- if($session->logged_in){
- echo "<h1>Allerede registreret</h1>";
- echo "<p>Beklager<b>$session->username</b>, men du er allerede registreret. "
- ."<a href=\"index.php\">Main</a>.</p>";
- }
- /**
- * The user has submitted the registration form and the
- * results have been processed.
- */
- else if(isset($_SESSION['regsuccess'])){
- /* Registration was successful */
- if($_SESSION['regsuccess']){
- echo "<h1>Registeret!</h1>";
- echo "<p>Tak <b>".$_SESSION['reguname']."</b>, dine informationer er tilføjet databasen, "
- ."du kan nu <a href=\"index.php\">logge ind</a>.</p>";
- }
- /* Registration failed */
- else{
- echo "<h1>Registreringen lykkedes ikke</h1>";
- echo "<p>Beklager, men der er sket en fejl i din registrering af brugernavnet <b>".$_SESSION['reguname']."</b>, "
- ."<br> Venligst prøv igen på et senere tidspunkt!.</p>";
- }
- unset($_SESSION['regsuccess']);
- unset($_SESSION['reguname']);
- }
- /**
- * The user has not filled out the registration form yet.
- * Below is the page with the sign-up form, the names
- * of the input fields are important and should not
- * be changed.
- */
- else{
- ?>
- <br><br>
- <table><tr><td class="greentext">Opret bruger</td></tr></table>
- <form action="process.php" method="POST">
- <table align="left" border="0" cellspacing="0" cellpadding="0">
- <tr><td>Brugernavn:</td><td><input class="input" type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><? echo $form->error("user"); ?></tr>
- <tr><td>Kodeord:</td><td><input class="input" type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><? echo $form->error("pass"); ?></tr>
- <tr><td>Fulde navn:</td><td><input class="input" type="text" name="name" maxlength="50" value="<? echo $form->value("name"); ?>"></td><? echo $form->error("name"); ?></tr>
- <tr><td>Email:</td><td><input class="input" type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>"></td><? echo $form->error("email"); ?></td></tr>
- <tr><td>Alder:</td><td><input class="input" type="text" name="age" maxlength="2" value="<? echo $form->value("age"); ?>"></td><? echo $form->error("age"); ?></tr>
- <tr><td>Favorit spil:</td><td><input class="input" type="text" name="game" maxlength="50" value="<? echo $form->value("game"); ?>"></td><? echo $form->error("game"); ?></tr>
- <tr><td>Din beskrivelse: </td><td>
- <SELECT class="input" NAME="description" >
- <OPTION VALUE="Gamer" <? if($form->value("description") == "Gamer"){ echo "selected"; } ?>>Gamer</option>
- <OPTION VALUE="Coder" <? if($form->value("description") == "Coder"){ echo "selected"; } ?>>Koder</option>
- <OPTION VALUE="Random" <? if($form->value("description") == "Random"){ echo "selected"; } ?>>Blandet</option>
- </SELECT></td></td><td><? echo $form->error("description"); ?></td></tr>
- <tr><td valign="top">Quote:</td><td><textarea class="input" name="quote"></textarea></td><td></td></tr>
- <tr><td></td>
- <td><input type="hidden" name="subjoin" value="1"><input class="submitlink" type="submit" value="Opret!"></td></tr>
- <tr><td colspan="2" align="left"><a href="index.php"><br><br>Tilbage til forsiden</a></td></tr>
- </table>
- </form>
- <?
- }
- ?>
- </td>
- </tr>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement