Exemple #1
0
        $edit = explode(":::", $edit);
        $user = $_COOKIE['user'];
        $lines = file("Users/" . $user . ".php");
        $admin = $lines[2];
        if ($edit[0] == $_GET["p"] && $edit[1] > time() - 300 && @(!strpos($admin, "1"))) {
            //$disabled = true;
        }
    }
    if ($disabled == true) {
        echo '<h1>Editing: ' . $_GET['p'] . '</h1>
This page was last edited less than 5 minutes ago!';
    } else {
        echo '<h1>Editing: ' . $_GET['p'] . '</h1>
<form method="post" action="Wiki/edit_action.php" autocomplete="off">  
<textarea id="editor" name="contents" autocomplete="off">';
        echo wikiPage($_GET['p']);
        echo '</textarea>
  <input type="hidden" name="page" value="' . $_GET['p'] . '">
  <br><input type="submit" value="Save"> or <a href="Wiki/?p=' . $_GET['p'] . '">Cancel</a>
</form>
<form method="post" action="Wiki/edit_delete.php">  
  <input type="hidden" name="page" value="' . $_GET['p'] . '">
  <br><input type="submit" value="Delete Page (Can\'t be undone!)">
</form>';
    }
} else {
    echo "Please log in as a Member to edit the Wiki!";
}
?>
		</article>
    	<?php 
Exemple #2
0
			<tr><td align="right" width="25%">Your E-Mail:</td><td align="left"><input type="text" placeholder="E-mail" name="email"></td></tr>
			<tr><td align="right" width="25%">Password:</td><td align="left"><input type="password" placeholder="Password" name="password"></td></tr>
			<tr><td align="right" width="25%"></td><td align="left"><input type="submit" value="Log in"> <a href="Wiki/forgot.php">Forgot password?</a></td></tr>
			</table>
			</form>
			</fieldset><br>
			<fieldset><legend>Register</legend>
			<form method="post" action="register.php">
			<table border="0" width="100%">
			<tr><td align="right" width="25%">Your Name:</td><td align="left"><input type="text" placeholder="Your Name" name="name"></td></tr>
			<tr><td align="right" width="25%">E-Mail:</td><td align="left"><input type="text" placeholder="E-mail" name="email"> <input type="text" placeholder="Confirm" name="emailconf"></td></tr>
			<tr><td align="right" width="25%">Password:</td><td align="left"><input type="password" placeholder="Password" name="password"> <input type="password" placeholder="Confirm" name="passconf"></td></tr>
			<tr><td align="right" width="25%">Fill in the blank:</td><td align="left">Our meetings take place in room number <input type="text" name="security"></tr>
			<tr><td align="right" width="25%"></td><td align="left"><input type="hidden" name="acctype" value="Member"><input type="submit" value="Register"></td></tr>
			</table>
			</form>
			</fieldset>
			<br>However, you may see the main page of our wiki.<br>
			<h1>Wiki Home</h1>
			';
    echo wikiPage("Home");
}
?>
		</article>
    	<?php 
footerSetup();
?>
	</body>
</html>