- ./
- ./images
- ./includes/common
- ./includes/config
- ./includes/functions
- ./javascript
- ./styles
- ./templates/borrower
- ./templates/main
- ./templates/manage
- ./templates/search
./includes/functions/user.php
<?php
if ( !defined('IN_SITE'))
{
report ('Hacking attempt.', 'Insite unset');
}
class User {
var $login;
var $name;
var $id;
var $maxbooks;
var $status;
function login($id)
{
$this->login = 'true';
$query = "SELECT * FROM `borrower` WHERE `BorId`='$id';";
$result = mysql_query($query) or report ('Unable to run SQL query', $query);
while($row = mysql_fetch_object($result))
{
$this->name = $row->BorName;
$this->id = $id;
$this->maxbooks = $row->BorMaxBooks;
}
}
}