The trunk folder is for all new features that are not yet ready for release. This folder will be for stabilizing work as it is built and creating new features. The releases folder is used for release builds. The earliest available build is 2.3.x, and thus it will have the 2.3 folder. All maintenance and bug fixes go in this folder. No new features whatsoever are to be added in here, keeping those completely in the trunk. When the trunk is ready for the next version, it will have a new folder created for it (releases/2.4 for instance) to stabilizing for final release. The tags folder is used for individual releases. When a release build is ready to go out for download, that release folder will be cloned into an appropriate tag folder. For example, the releases/2.3 folder will be cloned into tags/2.3.1 for that release, and after more work on bug fixes, it will be cloned to tags/2.3.2. Thus, these tag folders should never be modified for any reason. The tag exists purely as a snapshot of a certain point on the release path, and to modify a snapshot defeats the purpose. Any bug in a tagged release should be fixed in the appropriate release folder (such as releases/2.3 for a bug found in 2.3.1).
45 lines
1.7 KiB
PHP
45 lines
1.7 KiB
PHP
<?php
|
|
mysql_select_db($database_brewing, $brewing);
|
|
$query_user = sprintf("SELECT * FROM users WHERE user_name = '%s'", $loginUsername);
|
|
$user = mysql_query($query_user, $brewing) or die(mysql_error());
|
|
$row_user = mysql_fetch_assoc($user);
|
|
$totalRows_user = mysql_num_rows($user);
|
|
|
|
function authenticateUserNav($connection, $username, $password)
|
|
{
|
|
// Test the username and password parameters
|
|
if (!isset($username) || !isset($password))
|
|
return false;
|
|
|
|
// Formulate the SQL find the user
|
|
$query = "SELECT password FROM users WHERE user_name = '{$username}'
|
|
AND password = '{$password}'";
|
|
|
|
// Execute the query
|
|
if (!$result = @ mysql_query ($query, $connection))
|
|
showerror();
|
|
|
|
// Is the returned result exactly one row? If so, then we have found the user
|
|
if (mysql_num_rows($result) != 1)
|
|
return false;
|
|
else
|
|
return true;
|
|
}
|
|
|
|
// Connects to a session and checks that the user has authenticated and that the remote IP address matches the address used to create the session.
|
|
|
|
function sessionAuthenticateNav()
|
|
{
|
|
include ('Connections/config.php');
|
|
mysql_select_db($database_brewing, $brewing);
|
|
$query_prefs = "SELECT menuLogin, menuLogout FROM preferences";
|
|
$prefs = mysql_query($query_prefs, $brewing) or die(mysql_error());
|
|
$row_prefs = mysql_fetch_assoc($prefs);
|
|
|
|
// Check if the user hasn't logged in
|
|
if (!isset($_SESSION["loginUsername"])) { echo "<li><a href=\"index.php?page=login\">".$row_prefs['menuLogin']."</a></li>"; }
|
|
if (isset($_SESSION["loginUsername"])) { echo "<li><a href=\"admin/index.php\" onMouseover=\"dropdownmenu(this, event, menu13, '180px')\" onMouseout=\"delayhidemenu()\">Admin</a></li><li><a href=\"includes/logout.inc.php\">".$row_prefs['menuLogout']."</a></li>"; }
|
|
}
|
|
|
|
?>
|