This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -name '*.php' -exec awk 'END {print NR}' '{}' + 2>/dev/null | awk '{ total+=$1 }END{print total}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="index.php" method="post" enctype="application/x-www-form-urlencoded"> | |
<h3>Log In</h3> | |
<b>Email Address</b> <br /> | |
<input type='text' name='loginEmail' /> | |
<?php | |
if($unknown_email) | |
{ | |
echo "Unknown email address."; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//A script for testing submitted login details against the database. | |
$unknown_email = false; | |
$wrong_password = false; | |
//Check for registration. | |
if($_POST['login']) | |
{ | |
//Data has been submitted, now its time to save it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//A script for taking the user's login details and adding their registration entry to the | |
//database. | |
//Flags for storing information about invalid form data. | |
$bad_email = false; | |
$email_exists = false; | |
$name_exists = false; | |
$name_needed = false; | |
$password1_needed = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//The purpose of this file is to check for the submission of data to the server via POST. | |
//If it finds a specific identifying value it will pass control to child code which will handle | |
//that specific submission. | |
//Check for registration. | |
if(isset($_POST['register'])) | |
{ | |
include "logic/logic.register.php"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="index.php" method="post" enctype="application/x-www-form-urlencoded"> | |
<h3>Register</h3> | |
<b>Name</b> <br /> | |
<input type='text' name='registerUsername' /> | |
<?php | |
if($name_exists) | |
{ | |
echo "The name you chose is already taken."; | |
} | |
else if($name_needed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MyTronBot.cc | |
// Author: Nathan - http://experimentgarden.blogspot.com | |
#include "Map.h" | |
#include <string> | |
#include <vector> | |
#include <cstdio> | |
#include <cstdlib> | |
#define NORTH 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MyTronBot.java | |
// Author: Nathan - http://experimentgarden.blogspot.com | |
import java.util.*; | |
import java.io.*; | |
class MyTronBot | |
{ | |
static String lastDirection = ""; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include "logic/logic.initialize.php"; | |
echo "Connected to the database correctly!"; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$_SESSION['loggedIn'] = 1; | |
if($_SESSION['loggedIn']===1) | |
{ | |
echo "Logged in!"; | |
} | |
$_SESSION['loggedIn'] = 0; |