Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $username = "eric";
- $password = "poop";
- if ($_POST['username'] != $username || $_POST['password'] != $password) {
- ?>
- <div id="login">
- <form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
- <ul>
- <li><input type="text" name="username"></li>
- <li><input type="password" name="password"></li>
- <li class="submit"><input class="submit" type="submit" name="submit" value="login"></li>
- </ul>
- </form>
- </div>
- <?php
- }
- else {
- $handle = opendir('/home/elekchron/artoferichu.com/files/');
- print('<div id="files"><ul>');
- while ($file = readdir($handle)) {
- if ($file == "index.php") {
- break;
- }
- else {
- print('<li><a href="/files/' . $file . '">' . $file .'</a></li>' . "\n");
- }
- }
- print('</ul></div>');
- }
- ?>
Add Comment
Please, Sign In to add comment