You are on page 1of 5

PHP LIBRARY SYSTEM

If u login as ADMIN:
Using this code you can ADD books to the file.
YOU can UPDATE the existing record of books.
You can delete the books.
You can Return Books to the stock.
You can display all the books inside the record.
And issue a book to the Students.

IF u login as STudent:
You can only Check IN/OUT status of the book.

1. Encrypted Password (Student + Administrator)

Make Program which has a feature of password protection.

Both student section and Admin sections should be protected by password Can only have
a access to own section on entering correct password.

2. Issue/Return of Book (BY Administrator to Students)

In this section admin can issue/return books by/to students.

3. User tracking (Administrator)

Admin should have a record of students i.e there names,department,class or


Degree../reg.no

Which books are issued to specific students.

4. Search feature (by name , Std ID, Book ID, Author ) (Student)

Students can search books by by name , Std ID, Book ID, Author

5. Checking the availability of books. (Student )

Student can check IN/Out Status of book.

6. ADD/Remove Books (Administrator)

Addition/Removing of Books in Library Stock.

Runs best at visual studio 2005-2010.

<html>
<head>

<title>MyMP3s v0.1</title>

</head>

<body>

<font face="verdana" size="2"><b>This is the search form</b></font><br><br>

<font face="verdana" size="2">Please type in your search keyword...</font><br>

<form name="search" action="<? echo $PHP_SELF; ?>" method="post">

<font face="verdana" size="2">Type: </font><select name="Type">

<option value="Artist">Artist</option>

<option value="Song">Song</option>

<option value="Genre">Genre</option>

<option value="Folder">Folder</option>

</select>

<input type="text" name="searchstring">

<br><br><input type="submit" name="submit">

</form>

<?

include("dbclass.php");

if ($submit) {

$DBObject = new DBConnection;

$QueryInfo = new QueryInfo;

$Conn = $DBObject->Connect();

$TheQuery = "Select FileName, FileSize, Folder, Song, Artist, Album, Year, Genre from mp3list
WHERE " . $Type . "='" . $searchstring . "' OR FileName LIKE '%" . $searchstring . "%'";
$Result = $DBObject->Query($TheQuery);

echo "<table width=\"850\" border=\"1\" bordercolor=\"#000000\" cellspacing=\"2\"


cellpadding=\"2\">";

while ($row = $DBObject->ReturnRows($Result)) {

if ($fieldslisted == FALSE) {

$Fields = array();

$Fields = $QueryInfo->GetFieldNames($Result);

echo "<tr>\n";

for ($j=0;$j<=count($Fields);$j++) {

echo "<th align=\"left\">\n";

echo "<font face=\"verdana\" size=\"2\">$Fields[$j]</font>";

echo "</th>\n";

echo "</tr>\n";

$fieldslisted = TRUE;

echo "<tr>\n";
for ($i=0;$i<=count($row);$i++) {

if ($row[$i] === null) {

$String = "&nbsp;";

else {

$String = $row[$i];

echo "<td>\n";

echo "<font face=\"verdana\" size=\"2\">$row[$i]</font>";

echo "</td>\n";

echo "</tr>\n";

if ($QueryInfo->GetAffectedRows($Conn) == "") {

echo "<font face=\"verdana\" size=\"2\"><b>No mp3 tracks found!</b></font>";


}

$DBObject->Close($Conn);

echo "</table>";

?>

</body>

</html>

You might also like