<body>
	

	<div class= "background">

		<img src="background.jpg" id="bck1" > 	

	</div>

	<div class="header">
		<p><b> Fitness Tracking Database </b></p>
  	</div>	
	
	<div class=container1>
		<?php 
printUser();
?>
		
		<?php 
loginButton();
?>
		<form action="createlogin.php">
		<button id="creatAccountButton", type="submit"> Create Account 
		</button>	
		</form>

		<form method='post' >   		
		<button id="logout" , name = "logout", type="submit"> Log out </button>
		</form>
  
  	<p>
    $servername = "localhost";
    $username = "******";
    $password = "";
    $dbname = "cookbooknetwork";
    $conn = new mysqli($servername, $username, $password, $dbname);
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
    $sql = "SELECT * FROM account WHERE email = '{$e}' or username ='******'";
    $result = $conn->query($sql);
    if ($result->num_rows > 0) {
        echo '<h1>' . $result->num_rows . ' results: <h1>';
        while ($row = $result->fetch_assoc()) {
            echo '<br><h3><a href="view-account-info.php?user_id=' . $row["user_id"] . '">email: ' . $row["email"] . '<br> username: '******'</a></h3> ';
        }
    } else {
        echo '0 results';
    }
    $conn->close();
}
$input = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $input = $_POST["email"];
    printUser($input);
}
?>
		</div>
		
		<div class="footer"><p>&#169; Cookbook Network, 2015. All Rights Reserved.</p></div>
	</body>
</html>
                            }
                            $print_next = 0;
                            $nMax2 = sizeof($arrCPResult);
                            for ($nIndex2 = 0; $nIndex2 < $nMax2; $nIndex2++) {
                                $arrCurCP = $arrCPResult[$nIndex2];
                                if ($print_next && $arrCurCP['nIsSubstitiuteOf'] != 0) {
                                    ?>
														</tr>
														<tr style="<?php 
                                    if ($bLastUser && $arrSubstitute && $arrCurCP['nDecissionState'] == 0) {
                                        echo 'background-color: #FFE88E;';
                                    }
                                    ?>
 height:22px;">
														<?php 
                                    printUser($arrCurCP, true, $nSubstituteId, $bLastUser);
                                } else {
                                    $print_next = 0;
                                }
                                if ($arrCurCP['nID'] == $nCurPiId) {
                                    $print_next = 1;
                                }
                            }
                        }
                        ?>
											</tr>
											<?php 
                        $nPosInSlot++;
                    }
                }
            }
                if ($pos > -1) {
                    $user->setAccessLevel(3);
                }
                // Determine if they have ban manager powers
                $findme = 'b';
                $pos = strpos($flags, $findme);
                if ($pos > -1) {
                    $user->setAccessLevel(2);
                }
                printUser($user);
            }
        }
    } else {
        // Only add them if they are active and have powers
        // It will also go to here if the "gban plugin" is not added on the admin group page to the group
        printUser($user);
    }
}
function printUser($user)
{
    if ($user->getActive() == 1 && $user->getAccessLevel() != 5) {
        $admin = 0;
        echo "\n  \"" . $user->getSteamId() . "\"\n";
        echo "  {\n";
        // Determine if the user has "admin" privileges
        // 4 is member only
        if ($user->getAccessLevel() == 4) {
            $admin = 0;
        } else {
            $admin = 1;
        }