\n"; $eMsg .= "An error occured accessing the database.\n"; $eMsg .= "

 

\n"; } } else { $err = TRUE; $eMsg = "

 

\n"; $eMsg .= "Unable to select the database.\n"; $eMsg .= "

 

\n"; } // check for name/password found -- if so then // get user id and load permissions if ( (FALSE == $err) && ($i_result) && (0 < mysql_num_rows($i_result)) ) { $row = mysql_fetch_object($i_result); if ($row) { // user/password found, Get user name from database $FirstName = $row->FirstName; $LastName = $row->LastName; $SuperUser = "Y" == $row->Superuser ? TRUE : FALSE; $ValidUser = TRUE; $UserID = $row->UserID; if ($SuperUser) { $PermissionCount = 0; } else { // get specific permissions from database $sql = "SELECT * FROM Permissions WHERE UserID = ".$row->UserID; $p_result = mysql_query($sql,$connection); if (!$p_result) { $err = TRUE; $eMsg = "

 

\n"; $eMsg .= "An error occured accessing the database.\n"; $eMsg .= "

 

\n"; } if ( (FALSE == $err) && ($p_result) && (0 < mysql_num_rows($p_result)) ) { while ($permissions = mysql_fetch_object($p_result)) { $Company[] = $permissions->Company; $Project[] = $permissions->Project; } } $PermissionCount = count($Company); } } else { if ($connection) { if ($i_result) mysql_free_result($i_result); if ($p_result) mysql_free_result($p_result); mysql_close($connection); } header("Location: login.php3?ShowForm=YES&Error=YES&User=".$User."&ReturnURL=".$ReturnURL); exit; } } $Company[] = ""; $Project[] = ""; // // clean up // if ($i_result) mysql_free_result($i_result); if ($p_result) mysql_free_result($p_result); mysql_close($connection); } else { $err = TRUE; $eMsg = "

 

\n"; $eMsg .= "Unable to connect to the database.\n"; $eMsg .= "

 

\n"; } } include "cookies.inc"; ?> \n"; if (empty($ReturnURL)) $ReturnURL = "index.phtml"; if (empty($Error)) $Error = "NO"; if ("NO" != $ShowForm) { //------------------------------------------ // Original Entry //------------------------------------------ // set up the URL to return to after a good // log in response if (empty($User)) $User = ""; // now display the form echo "
\n"; // be sure to include a static value with "ShowForm=NO" to key the // page to a response -- not an original request. Also, for // completeness include "Error=NO" echo "\n"; // if this was entered with an error then show an error message if ("YES" == $Error) { echo "\n"; echo "\n"; echo "\n"; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "The USER and PASSWORD combination you specified is not valid.  \n"; echo "Please check your user name and re-enter your password.

\n"; echo "

User Name:
Password:\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
\n"; echo "
\n"; } else { if ($err) { echo $eMsg; } else { // display permissions in a table for users info if ($SuperUser) { echo "
\n"; echo "Hello ".$FirstName." ".$LastName."
\n"; echo "You have superuser status, access is granted to all areas of this site.
\n"; echo "

\n"; } else { echo "User = ".$User."
\n"; echo "Password = ".$Password."
\n"; echo "You are ".$FirstName." ".$LastName."

\n"; if(!empty($sql)) echo $sql."

\n"; if (!empty($ValidUser)) { echo "ValidUser = ".$ValidUser."
\n"; echo "SuperUser = ".$SuperUser."
\n"; echo "Password = ".$Password."
\n"; echo "FirstName = ".$FirstName."
\n"; echo "LastName = ".$LastName."
\n"; echo "User = ".$User."
\n"; echo "PermissionCount = ".$PermissionCount."
\n"; for ($i=0; $i < $PermissionCount; $i++) { echo "Company[$i] = ".$Company[$i]."
\n"; echo "Project[$i] = ".$Project[$i]."
\n"; } } echo "\n"; echo "\n"; echo "\n"; for ($x=0; $x < $PermissionCount; $x++) { echo "\n"; echo "\n"; echo "\n"; echo "\n"; } } } } ?>
"; echo "Access settings for ".$FirstName." ".$LastName."\n"; echo "
GROUPAREA
".$Company[$x]."".$Project[$x]."
\n"; echo "
\n"; echo "
\n"; echo "
\n"; } ?>  

Contact info@valueeng.com to receive a password or to change your password or access settings. Please be sure to include your full name, company affiliation, and email address.