Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Report Final H

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 77

AN

INTERNSHIP REPORT
On

SOCIETY MANAGMENT SYSTEM


Submitted
by
Harshil Gupta
(201430116089)

Guided By:
Milan
Bhadaliya

An
Internship Report
Submitted to

Gujarat Technological University


In fulfillment for the award of degreeof Bachelor of Engineering
in
Information Technology
ACADEMIC YEAR – 2024

NEW L. J. INSTITUTE OF ENGINEERING AND TECHNOLOGY


Pakwan, Behind Rajpath Club Gate to Sindhu Bhavan Road,
Sarkhej - Gandhinagar Hwy, AEC Char Rasta, Ahmedabad, Gujarat
380054
GUJARAT TECHNOLOGICAL UNIVERSITY
CERTIFICATEFORCOMPLETIONOFALLACTIVITIESATONLINEPROJECTPORTAL
B.E.SEMESTERVIII,ACADEMICYEAR2023-2024
Date of certificate generation : 19 April 2024 (02:35:03)

This is to certifythat, Gupta Harshil Rakeshbhai( Enrolment Number-


201430116089 ) working on project entitled withsociety management system
from INFORMATION TECHNOLOGY department of New L.J Institute of
Engineering and Technology had submitted following details at online project
portal.

Internship Project Report Completed

Name of Student : Gupta Harshil Name of Guide : Mr. Milan Jatinbhai Bhadaliya
Rakeshbhai

Signature of Student : *Signature of Guide :

Disclaimer :
This is a computer generated copy and does not indicate that your data has been evaluated. This is the receipt that GTU
has received a copy of the data that you have uploaded and submitted as your project work.

*Guide has to sign the certificate, Only if all above activities has been Completed.
ACKNOWLEDGEMENT
Any project is incomplete without guidance and
motivation. We are very much thankful to our mentor
MILAN BHADALIYA, who has provided us the
opportunity and motivation to gain knowledge throughout
the course of this project.

We are also thankful to SEJAL JADAV for providing us


the help of computer laboratory, which is a valuable input
resource for this project.

And last but not the least, we are thankful to all our
friends, batchmates, and other people who have directly or
indirectly helped us during the preparation of this project.
Thankyou.

ABSTRACT
Asthenamespecifies“HOSTELMANAGEMENTSYSTEM”isasoftwaredeveloped

formanagingvariousactivitiesinthehostel.Forthepastfewyearsthenumberofeducational

institutionsareincreasingrapidly.Therebythenumberofhostelsarealsoincreasingfortheaccom-

modationofthestudentsstudyinginthisinstitution.Andhencethereisalotofstrainontheperson

whoarerunningthehostelandsoftware’sarenotusuallyusedinthiscontext.Thisparticular

projectdealswiththeproblemsonmanagingahostelandavoidstheproblemswhichoccurwhen

carriedmanually.

Identificationofthedrawbacksoftheexistingsystemleadstothedesigningofcomputerized

systemthatwillbecompatibletotheexistingsystemwiththesystemWhichismoreuserfriendlyand

moreGUIoriented.Wecanimprovetheefficiencyofthesystem,thusovercomethedrawbacksof

theexistingsystem.

· Lesshumanerror

· Strengthandstrainofmanuallabourcanbereduced

· Highsecurity

· Dataredundancycanbeavoidedtosomeextent

· Dataconsistency

· Easytohandle

· Easydataupdating

· Easyrecordkeeping
LISTOFTABLES
Studentaccountcreation.............................................................................................................. 29

AdministratorLogin.................................................................................................................... 29

Application form....................................................................................................................... 30

Allotment................................................................................................................................... 31

Vacatingandediting.................................................................................................................... 31

NoticeBoard.............................................................................................................................. 32

LISTOFFIGURES
ContextLevelDFD............................................................................................................................. 25

StudentModule................................................................................................................................... 25

RegistrationProcess............................................................................................................................ 26

Administrat or Module...................................................................................................................... 32

Allotment Process............................................................................................................................. 32

Vacating Process................................................................................................................................ 33

LIST OF SYMBOLS
Rectangle........................................................................................................................................... 26

Arrow....................................................................................................................................... 26

Circle................................................................................................................................................. 26

Openrectangle.................................................................................................................................... 26
TABLEOFCONTENTS
1. INTRODUCTION.......................................................................................................................... 01
ProblemDefinition......................................................................................................... 01

Userpanel...................................................................................................................... 01

Userlogin.................................................................................................. 01

Home......................................................................................... 01

Registrationform.................................................................02

NoticeBoard.......................................................................02

Adminpanel.................................................................................................................... 02

AdministratorLogin.............................................................................. 02

Home........................................................................................ 02

Allotmentofthehostels...............................................02

Vacatingtherooms.....................................................02

2. SYSTEMENVIRONMENT.......................................................................................................... 03

HardwareConfiguration................................................................................................ 04

SoftwareConfiguration.................................................................................................. 04

SoftwareFeatures......................................................................................................... 04

phptriad.............................................................................................. 04

php. 04 Speedoptimization 07
Security....................................................................08

Syntax.......................................................................08

Datatypes.................................................................09

Functions..................................................................10

Objects.....................................................................11

Resources.................................................................12
MySQL................................................................................13

2..3.1.2.1Databasetables...........................................................13

2..3.1.2.2 Queries...................................................................13

CreateaConnectiontoDatabase..........................14

Closingaconnection...........................................14

Createadatabase...............................................15

Createa table....................................................15

2.3.1.2.3MySqlfunctions...........................................................16

MacromediaDreamweaver8..................................................17

Dreamweaver&accessibility........................................18
phpMyAdmin..........................................................................19
Requirements............................................................21

Apachewebserver..................................................................22

3. SYSTEMANALYSIS..................................................................................................................... 24

ExistingSystem.............................................................................................................. 25

4. SYSTEMDESIGN......................................................................................................................... 26

InputDesign.................................................................................................................... 27

Administrator.......................................................................................... 27

ProcessDesign................................................................................................................ 28

DataFlowDiagram.................................................................................. 29

DatabaseDesign............................................................................................................. 31

OutputDesign.................................................................................................................. 35

5. SYSTEMTESTING......................................................................................................................... 36

Unittesting....................................................................................................................... 37

Integrationtesting........................................................................................................... 37

UserAcceptancetesting................................................................................................... 37
6. IMPORTANTCODE....................................................................................................................... 38

Administratoraccountwithdatabaseconnectivity................................................................39

AdministratorLoginCode................................................................................................ 40

JavascriptValidationCode............................................................................................... 41

EditingStudentDetails..................................................................................................... 41

StoringvaluesfromDatabase............................................................................................ 44

IncludingaFile................................................................................................................. 44

7. IMPLEMENTATION..................................................................................................................... 45

UserTraining.................................................................................................................. 46

SecurityandMaintanance................................................................................................ 47

8. CONCLUSION.............................................................................................................................. 48

9. BIBLIOGRAPHY........................................................................................................................... 50

APPENDIX-I.......................................................................................................................... 53

APPENDIX-II........................................................................................................................ 64

APPENDIX-III....................................................................................................................... 66
HostelMangementSystem

CHAPTER1
INTRODUCTION

Problemdefinition

Wehavegotninehostelsinouruniversity,whichconsistoffourboy’shostelandfivegirl’shostel.

Allthesehostelsatpresentaremanagedmanuallybythehosteloffice.TheRegistrationformverification

tothedifferentdataprocessingaredonemanually.

Thustherearealotofrepetitionswhichcanbeeasilyavoided.Andhencethereisalotofstrain

onthepersonwhoarerunningthehostelandsoftware’sarenotusuallyusedinthiscontext.Thisparticu- lar project

deals with the problems on managing a hostel and avoids the problems which occur when

carriedmanually

Identificationofthedrawbacksoftheexistingsystemleadstothedesigningofcomputerized

systemthatwillbecompatibletotheexistingsystemwiththesystemwhichismoreuserfriendlyand

moreGUIoriented.Wecanimprovetheefficiencyofthesystem,thusovercomethedrawbacksof

theexistingsystem.

UserPanel

UserLogin

Home

1. Thisconsistofthedifferentpop-upmenusshowingthedetailsofthedifferenthostels

2. ItcontainalinktotheCUSATofficialweb-site.

3. Itallowsthedifferentuserstoaccesstheregistrationforms.

4. HecanviewtheStudentadministrationdivisionofthedifferenthostelsandalsoviewthenotice

boards.

DivisionofcomputerEngineering,SOE 1
HostelMangementSystem

RegistrationForm

Thissectionprovidesanonlineformtothestudentswhichcanbefilledbythem,andacopyofthe

filledpagecanbetakenintheprintedform.ThisislatersubmittedtotheHostelauthoritieswhichcanbe

verifiedbythembeforealottingthemtotherespectivehostels.

Notice Board

Allthe9hostelshavetheirNoticeboards.AnychangeintheHostelfee,messfeewillbeshownin

this.Itcanbealsousedfordifferentnotifications.

AdminPanel

AdministratorLogin

Home

TheAdministratorcan:

1. Allotdifferentstudentstothedifferenthostels.

2. Vacatethestudentsforthehostels.

3. Controlthestatusofthefeepayement.

4. Editthedetailsofthestudents&modifythestudentrecords.

Allotmentofthehostels

Theirwillbepre-definedcriteriasfortheadmissiontothehostels.Hecheckstheattested

applicationformsofthestudentsobtainedfromtheinternetandvarifyitwiththestudentdatabase.Ifthe

studentsarefoundeligiblethentheyareallottedtothehostel.

Vacatingtherooms

Asthestudent’scourseisovertheywillvacatetheirrooms.Soitisrequiredfortheadministratorto remove

their records from the database tables. This section includes the option for the room vacation and

thedeletionoftheparticularrecordfromthedatabase.

DivisionofcomputerEngineering,SOE 2
HostelMangementSystem

CHAPTER2

DivisionofcomputerEngineering,SOE 3
HostelMangementSystem

CHAPTER 2
SYSTEMENVIRONMENT

HardwareConfiguration

1. PentiumIVProcessor

2.512MBRAM

3. 40GBHDD

4. 1024*768ResolutionColorMonitor

Note:Thisisnotthe“SystemRequirements”.

SoftwareConfiguration

1. OS:WindowsXP

2. PHPTriad(PHP,MySQL,Apache,andPHPMyAdmin)

SoftwareFeatures

PHPTRIAD

PHPTriadinstallsacompleteworkingPHP/MySQLserverenvironmentonWindowsplatforms(9x/

NT).InstallsPHP,MySQL,Apache,andPHPMyAdmin.

PHP

PHPisascriptinglanguageoriginallydesignedforproducingdynamicwebpages.Ithasevolvedto

includeacommandlineinterfacecapabilityandcanbeusedinstandalonegraphicalapplications.WhilePHP

wasoriginallycreatedbyRasmusLerdorfin1995,themainimplementationofPHPisnowproducedbyThe

PHPGroupandservesasthedefactostandardforPHPasthereisnoformalspecification.PHPisfree

softwarereleasedunderthePHPLicense,howeveritisincompatiblewiththeGNUGeneralPublicLicense

DivisionofcomputerEngineering,SOE 4
HostelMangementSystem

(GPL),duetorestrictionsontheusageofthetermPHP.Itisawidely-usedgeneral-purposescriptinglanguagethat is

especially suited for web development and can be embedded into HTML. It generally runs on a web

server,takingPHPcodeasitsinputandcreatingwebpagesasoutput.Itcanbedeployedonmostwebservers

andonalmosteveryoperatingsystemandplatformfreeofcharge.PHPisinstalledonmorethan20million

websitesand1millionwebservers.

PHPoriginallystoodforPersonalHomePage.Itbeganin1994asasetofCommonGatewayInterface

binarieswrittenintheCprogramminglanguagebytheDanish/GreenlandicprogrammerRasmusLerdorf.

LerdorfinitiallycreatedthesePersonalHomePageToolstoreplaceasmallsetofPerlscriptshehadbeen

usingtomaintainhispersonalhomepage.Thetoolswereusedtoperformtaskssuchasdisplayinghisrésumé

andrecordinghowmuchtraffichispagewasreceiving.HecombinedthesebinarieswithhisFormInterpreter

tocreatePHP/FI,whichhadmorefunctionality.PHP/FIincludedalargerimplementationfortheCprogramming

languageandcouldcommunicatewithdatabases,enablingthebuildingofsimple,dynamicwebapplications.

LerdorfreleasedPHPpubliclyonJune8,1995toacceleratebuglocationandimprovethecode.This

releasewasnamedPHPversion2andalreadyhadthebasicfunctionalitythatPHPhastoday.Thisincluded Perl-

likevariables,formhandling,andtheabilitytoembedHTML.ThesyntaxwassimilartoPerlbutwas

morelimited,simpler,andlessconsistent.ZeevSuraskiandAndiGutmans,twoIsraelidevelopersatthe

TechnionIIT,rewrotetheparserin1997andformedthebaseofPHP3,changingthelanguage’snametothe

recursiveinitialismPHP:HypertextPreprocessor.ThedevelopmentteamofficiallyreleasedPHP/FI2in

November1997aftermonthsofbetatesting.Afterwards,publictestingofPHP3began,andtheofficiallaunch

cameinJune1998.SuraskiandGutmansthenstartedanewrewriteofPHP’score,producingtheZend

Enginein1999.TheyalsofoundedZendTechnologiesinRamatGan,Israel.

OnMay22,2000,PHP4,poweredbytheZendEngine1.0,wasreleased.OnJuly13,2004,PHP5

wasreleased,poweredbythenewZendEngineII.PHP5includednewfeaturessuchasimprovedsupportfor object-

oriented programming, the PHP Data Objects extension (which defines a lightweight and consistent

interfaceforaccessingdatabases),andnumerousperformanceenhancements.Themostrecentupdatereleased

byThePHPGroupisfortheolderPHPversion4codebranch.

DivisionofcomputerEngineering,SOE 5
HostelMangementSystem

In2008,PHP5becametheonlystableversionunderdevelopment.Latestaticbindinghasbeen

missingfromPHPandwillbeaddedinversion5.3.PHP6isunderdevelopmentalongsidePHP5.Major changes

include the removal of register_globals, magic quotes, and safe mode. The reason for the removals

wasbecauseregister_globalshadgivenwaytosecurityholes,andmagicquoteshadanunpredictablenature, and was

best avoided. Instead, to escape characters, Magic quotes may be substituted with the addslashes()

function, or more appropriately an escape mechanism specific to the database vendor itself like

mysql_real_escape_string()forMySQL.

PHPdoesnothavecompletenativesupportforUnicodeormultibytestrings;Unicodesupportwillbe

includedinPHP6.ManyhighprofileopensourceprojectsceasedtosupportPHP4innewcodeasof

February5,2008,duetotheGoPHP5initiative,providedbyaconsortiumofPHPdeveloperspromotingthe

transitionfromPHP4toPHP5.Itrunsinboth32-bitand64-bitenvironments,butonWindowstheonly

officialdistributionis32-bit,requiringWindows32-bitcompatibilitymodetobeenabledwhileusingIISina 64-

bitWindowsenvironment.Thereisathird-partydistributionavailablefor64-bitWindows.

Usage

PHPisageneral-purposescriptinglanguagethatisespeciallysuitedforwebdevelopment.PHPgenerally

runsonawebserver,takingPHPcodeasitsinputandcreatingwebpagesasoutput.Itcanalsobeusedfor command-

linescriptingandclient-sideGUIapplications.PHPcanbedeployedonmostwebservers,many operating systems

and platforms, and can be used with many relational database management systems. It is

availablefreeofcharge,andthePHPGroupprovidesthecompletesourcecodeforuserstobuild,customize

andextendfortheirownuse.

PHPprimarilyactsasafilter,takinginputfromafileorstreamcontainingtextand/orPHPinstructions

andoutputsanotherstreamofdata;mostcommonlytheoutputwillbeHTML.Itcanautomaticallydetectthe

languageoftheuser.FromPHP4,thePHPparsercompilesinputtoproducebytecodeforprocessingbythe

ZendEngine,givingimprovedperformanceoveritsinterpreterpredecessor.Originallydesignedtocreate

dynamicwebpages,PHP’sprincipalfocusisserver-sidescripting,anditissimilartootherserver-sidescripting

DivisionofcomputerEngineering,SOE 6
HostelMangementSystem

languagesthatprovidedynamiccontentfromawebservertoaclient,suchasMicrosoft’sActiveServer

Pages,SunMicrosystems’JavaServerPages,andmod_perl.PHPhasalsoattractedthedevelopmentof

manyframeworksthatprovidebuildingblocksandadesignstructuretopromoterapidapplicationdevelo-

pment(RAD).SomeoftheseincludeCakePHP,Symfony,CodeIgniter,andZendFramework,offering

featuressimilartootherwebapplicationframeworks.

TheLAMParchitecturehasbecomepopularinthewebindustryasawayofdeployingwebapplic-

ations.PHPiscommonlyusedasthePinthisbundlealongsideLinux,ApacheandMySQL,althoughtheP

mayalsorefertoPythonorPerl.

AsofApril2007,over20millionInternetdomainswerehostedonserverswithPHPinstalled,andPHP

wasrecordedasthemostpopularApachemodule.SignificantwebsitesarewritteninPHPincludingtheuser-

facingportionofFacebook,Wikipedia(MediaWiki),Yahoo!,MyYearbook,,Digg,WordpressandTagged.

Inadditiontoserver-sidescripting,PHPcanbeusedtocreatestand-alone,compiledapplicationsandlibraries,

itcanbeusedforshellscripting,andthePHPbinariescanbecalledfromthecommandline.

Speedoptimization

Aswithmanyscriptinglanguages,PHPscriptsarenormallykeptashuman-readablesourcecode,even

onproductionwebservers.Inthiscase,PHPscriptswillbecompiledatruntimebythePHPengine,which

increasestheirexecutiontime.PHPscriptsareabletobecompiledbeforeruntimeusingPHPcompilersaswith

otherprogramminglanguagessuchasC(thelanguagePHPanditsextensionsarewrittenin).Codeoptimizers

aimtoreducethecomputationalcomplexityofthecompiledcodebyreducingitssizeandmakingother

changesthatcanreducetheexecutiontimewiththeoverallgoalofimprovingperformance.Thenatureofthe

PHPcompilerissuchthatthereareoftenopportunitiesforcodeoptimization,andanexampleofacode

optimizeristheZendOptimizerPHPextension.

Another approach for reducing overhead for high load PHP servers is using PHP accelerators.

These can offer significant performance gains by caching the compiled form of a PHP script in shared

memory to avoidtheoverheadofparsingandcompilingthecodeeverytimethescriptruns.

DivisionofcomputerEngineering,SOE 7
HostelMangementSystem

Security

The NationalVulnerability Database stores all vulnerabities found in computer software.The overall

proportion of PHP-related vulnerabilities on the database amounted to: 12% in 2003, 20% in 2004, 28%

in 2005,43%in2006,36%in2007,and35%in2008.MostofthesePHP-relatedvulnerabilitiescanbe

exploitedremotely:theyallowhackerstostealordestroydatafromdatasourceslinkedtothewebserver

(suchasanSQLdatabase),sendspamorcontributetoDOSattacksusingmalware,whichitselfcanbe

installedonthevulnerableservers.

Thesevulnerabilitiesarecausedmostlybynotfollowingbestpracticeprogrammingrules:technical

securityflawsofthelanguageitselforofitscorelibrariesarenotfrequent.Recognizingthatprogrammers

cannotbetrusted,somelanguagesincludetaintcheckingtodetectautomaticallythelackofinputvalidation

whichinducesmanyissues.However,suchafeatureisbeingdevelopedforPHP

HostingPHPapplicationsonaserverrequiresacarefulandconstantattentiontodealwiththese

securityrisks.ThereareadvancedprotectionpatchessuchasSuhosinandHardening-Patch,especiallydesigned

forwebhostingenvironments.InstallingPHPasaCGIbinaryratherthanasanApachemoduleisthepreferred

methodforaddedsecurity.Withrespecttosecuringthecodeitself,PHPcodecanbeobfuscatedtomakeit

difficulttoreadwhileremainingfunctional.

Syntax

<html>
<head>

<title>PHPTest</title>

</head>

<body>

<?phpecho“<p>HelloWorld</p>”;?>

</body></html>

Note:-CodeinboldlettersshowsthePHPcodeembeddedwithinHTML

DivisionofcomputerEngineering,SOE 8
HostelMangementSystem

PHPonlyparsescodewithinitsdelimiters.Anythingoutsideitsdelimitersissentdirectlytotheoutput

andisnotparsedbyPHP.Themostcommondelimitersare<?phpand?>,whichareopenandclosedelimiters

respectively. <script language=”php”> and </script> delimiters are also available. Short tags can be used

to startPHPcode,<?or<?=(whichisusedtoechobackastringorvariable)andthetagtoendPHPcode,?>.

Thesetagsarecommonlyused,butlikeASP-style tags (<% or <%= and %>), they are less portable as

they canbedisabledinthePHPconfiguration.Forthisreason,theuseofshorttagsandASP-styletagsisdiscouraged.

ThepurposeofthesedelimitersistoseparatePHPcodefromnon-PHPcode,includingHTML.

Variablesareprefixedwithadollarsymbolandatypedoesnotneedtobespecifiedinadvance.

Unlikefunctionandclassnames,variablenamesarecasesensitive.Bothdouble-quoted(“”)andheredoc

stringsallowtheabilitytoembedavariable’svalueintothestring.PHPtreatsnewlinesaswhitespaceinthe

mannerofafree-formlanguage(exceptwheninsidestringquotes),andstatementsareterminatedbyasemicolon.

PHPhasthreetypesofcommentsyntax:/**/servesasblockcomments,and//aswellas#areusedforinline

comments.TheechostatementisoneofseveralfacilitiesPHPprovidestooutputtext(e.g.toawebbrowser).

Intermsofkeywordsandlanguagesyntax,PHPissimilartomosthighlevellanguagesthatfollowthe

Cstylesyntax.Ifconditions,forandwhileloops,andfunctionreturnsaresimilarinsyntaxtolanguagessuch as C,

C++, Java and Perl.

Data types

PHPstoreswholenumbersinaplatform-dependentrange.Thisrangeistypicallythatof32-bitsigned

integers.Unsignedintegersareconvertedtosignedvaluesincertainsituations;thisbehaviorisdifferentfrom

otherprogramminglanguages.Integervariablescanbeassignedusingdecimal(positiveandnegative),octal,

andhexadecimalnotations.Floatingpointnumbersarealsostoredinaplatform-specificrange.Theycanbe

specifiedusingfloatingpointnotation,ortwoformsofscientificnotation.PHPhasanativeBooleantypethat

issimilartothenativeBooleantypesinJavaandC++.UsingtheBooleantypeconversionrules,non-zero

valuesareinterpretedastrueandzeroasfalse,asinPerlandC++.Thenulldatatyperepresentsavariablethat hasnovalue.

DivisionofcomputerEngineering,SOE 9
HostelMangementSystem

Theonlyvalue in the null data type is NULL.Variables of the “resource” type represent references to

resourcesfromexternalsources.Thesearetypicallycreatedbyfunctionsfromaparticularextension,andcan

onlybeprocessedbyfunctionsfromthesameextension;examplesincludefile,image,anddatabaseresources.

ArrayscancontainelementsofanytypethatPHPcanhandle,includingresources,objects,andevenother

arrays.Orderispreservedinlistsofvaluesandinhasheswithbothkeysandvalues,andthetwocanbe

intermingled. PHP also supports strings, which can be used with single quotes, double quotes, or heredoc

syntax.TheStandardPHPLibrary(SPL)attemptstosolvestandardproblemsandimplementsefficientdata

accessinterfacesandclasses.

Functions

PHPhashundredsofbasefunctionsandthousandsmorefromextensions.Thesefunctionsarewell

documentedonthePHPsite,butunfortunately,thebuilt-inlibraryhasawidevarietyofnamingconventions

andinconsistencies.PHPcurrentlyhasnofunctionsforthreadprogramming.

Version5.2andearlier

Functionsarenotfirst-classfunctionsandcanonlybereferencedbytheirname—directlyordynamically

byavariablecontainingthenameofthefunction.User-definedfunctionscanbecreatedatanytimewithout

beingprototyped.Functionscanbedefinedinsidecodeblocks,permittingarun-timedecisionastowhetheror not a

function should be defined. Function calls must use parentheses, with the exception of zero argument

classconstructorfunctionscalledwiththePHPnewoperator,whereparenthesesareoptional.PHPsupports quasi-

anonymousfunctionsthroughthecreate_function()function,althoughtheyarenottrueanonymousfunctions

becauseanonymousfunctionsarenameless,butfunctionscanonlybereferencedbyname,orindirectlythrough

avariable$function_name();,inPHP.

Version5.3andnewer

PHPgainedsupportforfirst-classfunctionsandclosures.Trueanonymousfunctionsaresupported

functiongetAdder($x)usingthefollowingsyntax:

{DivisionofcomputerEngineering,SOE 10
HostelMangementSystem

functiongetAdder($x)
{
return function ($y) use ($x)
{ return $x + $y;
};
}
$adder=getAdder(8);
echo$adder(2);//prints“10”

Here,getAdder()functioncreatesaclosureusingparameter$x(keyword“use”forcesgettingvariable

fromcontext),whichtakesadditionalargument$yandreturnsittothecaller.Suchafunctioncanbestored,

givenastheparametertoanotherfunctions,etc.FormoredetailsseeLambdafunctionsandclosuresRFC.

Objects

Basicobject-orientedprogrammingfunctionalitywasaddedinPHP3.Objecthandlingwascompletely

rewrittenforPHP5,expandingthefeaturesetandenhancingperformance.InpreviousversionsofPHP,

objectswerehandledlikeprimitivetypes.Thedrawbackofthismethodwasthatthewholeobjectwascopied when a

variable was assigned or passed as a parameter to a method. In the new approach, objects are

referencedbyhandle,andnotbyvalue.PHP5introducedprivateandprotectedmembervariablesand

methods, along with abstract classes and final classes as well as abstract methods and final methods. It

also introduced a standard way of declaring constructors and destructors, similar to that of other object-

oriented languagessuchasC++,andastandardexceptionhandlingmodel.

Furthermore,PHP5addedinterfacesandallowedformultipleinterfacestobeimplemented.Thereare

specialinterfacesthatallowobjectstointeractwiththeruntimesystem.ObjectsimplementingArrayAccess

canbeusedwitharraysyntaxandobjectsimplementingIteratororIteratorAggregatecanbeusedwiththe

foreachlanguageconstruct.Thereisnovirtualtablefeatureintheengine,sostaticvariablesareboundwitha

nameinsteadofareferenceatcompiletime.

DivisionofcomputerEngineering,SOE 11
HostelMangementSystem

Ifthedevelopercreatesacopyofanobjectusingthereservedwordclone,theZendenginewill

checkifaclone()methodhasbeendefinedornot.Ifnot,itwillcalladefaultclone()whichwillcopy

theobject’sproperties.Ifaclone()methodisdefined,thenitwillberesponsibleforsettingthenecessary

propertiesinthecreatedobject.Forconvenience,theenginewillsupplyafunctionthatimportsthe

propertiesofthesourceobject,sothattheprogrammercanstartwithaby-valuereplicaofthesource

objectandonlyoverridepropertiesthatneedtobechanged.

Resources

PHPincludesfreeandopensourcelibrarieswiththecorebuild.PHPisafundamentallyInternet-

awaresystemwithmodulesbuiltinforaccessingFTPservers,manydatabaseservers,embeddedSQLlibraries

suchasembeddedPostgreSQL,MySQLandSQLite,LDAPservers,andothers.Manyfunctionsfamiliarto

CprogrammerssuchasthoseinthestdiofamilyareavailableinthestandardPHPbuild.PHPhastraditionally

usedfeaturessuchas“magic_quotes_gpc”and“magic_quotes_runtime”whichattempttoescapeapostrophes

(‘)andquotes(“)instringsintheassumptionthattheywillbeusedindatabases,topreventSQLinjection

attacks.Thisleadstoconfusionoverwhichdataisescapedandwhichisnot,andtoproblemswhendataisnot

infactusedasinputtoadatabaseandwhentheescapingusedisnotcompletelycorrect.Tomakecode

portablebetweenserverswhichdoanddonotusemagicquotes,developerscanprefacetheircodewitha

scripttoreversetheeffectofmagicquoteswhenitisapplied.

PHPallowsdeveloperstowriteextensionsinCtoaddfunctionalitytothePHPlanguage.Thesecan

thenbecompiledintoPHPorloadeddynamicallyatruntime.Extensionshavebeenwrittentoaddsupportfor

theWindowsAPI,processmanagementonUnix-likeoperatingsystems,multibytestrings(Unicode),cURL,

andseveralpopularcompressionformats.SomemoreunusualfeaturesincludeintegrationwithInternetRelay

Chat,dynamicgenerationofimagesandAdobeFlashcontent,andevenspeechsynthesis.ThePHPExtension

CommunityLibrary(PECL)projectisarepositoryforextensionstothePHPlanguage.Zendprovidesa

certificationexamforprogrammerstobecomecertifiedPHPdevelopers.

DivisionofcomputerEngineering,SOE 12
HostelMangementSystem

MYSQL

Whatisadatabase?Quitesimply,it’sanorganizedcollectionofdata.Adatabasemanagementsystem

(DBMS)suchasAccess,FileMakerPro,OracleorSQLServerprovidesyouwiththesoftwaretoolsyou

needtoorganizethatdatainaflexiblemanner.Itincludesfacilitiestoadd,modifyordeletedatafromthe

database,askquestions(orqueries)aboutthedatastoredinthedatabaseandproducereportssummarizing

selectedcontents.

MySQLisamultithreaded,multi-userSQLdatabasemanagementsystem(DBMS).Thebasicprogram

runsasaserverprovidingmulti-useraccesstoanumberofdatabases.Originallyfinancedinasimilarfashionto

theJBossmodel,MySQLwasownedandsponsoredbyasinglefor-profitfirm,theSwedishcompany

MySQLABnowasubsidiaryofSunMicrosystem,whichholdsthecopyrighttomostofthecodebase.The

project’ssourcecodeisavailableundertermsoftheGNUGeneralPublicLicence,aswellasunderavariety

ofproprietoryagreements.

MySQLisadatabase.ThedatainMySQLisstoredindatabaseobjectscalledtables.Atableisa

collectionsofrelateddataentriesanditconsistsofcolumnsandrows.Databasesareusefulwhenstoring

informationcategorically.Acompanymayhaveadatabasewiththefollowingtables:“Employees”,“Products”,

“Customers”and“Orders”.

DatabaseTables

Adatabasemostoftencontainsoneormoretables.Eachtableisidentifiedbyaname(e.g.“Customers”

or“Orders”).Tablescontainrecords(rows)withdata.

Queries

Aqueryisaquestionorarequest.WithMySQL,wecanqueryadatabaseforspecificinformationand have a

recordset returned.

DivisionofcomputerEngineering,SOE 13
HostelMangementSystem

Createaconnectiontoadatabase

Beforeyoucanaccessdatainadatabase,youmustcreateaconnectiontothedatabase.InPHP,thisis

donewiththemysql_connect()function.

Syntax

Example

Inthefollowingexamplewestoretheconnectioninavariable($con)forlateruseinthescript.The“die”

partwillbeexecutediftheconnectionfails:

ClosingaConnection

Theconnectionwillbeclosedautomaticallywhenthescriptends.Toclosetheconnectionbefore,use

themysql_close()function:

DivisionofcomputerEngineering,SOE 14
HostelMangementSystem

CreateaDatabase

TheCREATEDATABASEstatementisusedtocreateadatabaseinMySQL.

Syntax

CREATEDATABASEdatabase_name

TogetPHPtoexecutethestatementabovewemustusethemysql_query()function.Thisfunctionis

usedtosendaqueryorcommandtoaMySQLconnection.

CreateaTable

TheCREATETABLEstatementisusedtocreateatableinMySQL

Syntax

CREATETABLEtable_name
(
column_name1data_type,
column_name2data_type,
column_name3data_type,
....

DivisionofcomputerEngineering,SOE 15
HostelMangementSystem

MySQLFunctions

mysql_affected_rows—GetnumberofaffectedrowsinpreviousMySQLoperation

mysql_change_user—Changeloggedinuseroftheactiveconnection

mysql_client_encoding—Returnsthenameofthecharacterset mysql_close—

CloseMySQLconnection mysql_connect—OpenaconnectiontoaMySQLServer

mysql_create_db — Create a MySQL database mysql_data_seek

—Moveinternalresultpointer mysql_db_name—Getresultdata

mysql_db_query—SendaMySQLquery mysql_drop_db—

Drop(delete)aMySQLdatabase

mysql_errno—ReturnsthenumericalvalueoftheerrormessagefrompreviousMySQLoperation mysql_error

—ReturnsthetextoftheerrormessagefrompreviousMySQLoperation mysql_escape_string—

Escapesastringforuseinamysql_query mysql_fetch_array—

Fetcharesultrowasanassociativearray,anumericarray,orboth mysql_fetch_assoc—

Fetcharesultrowasanassociativearray mysql_fetch_field—

Getcolumninformationfromaresultandreturnasanobject mysql_fetch_lengths—

Getthelengthofeachoutputinaresult mysql_fetch_object— Fetcharesultrowasanobject

DivisionofcomputerEngineering,SOE 16
HostelMangementSystem

wsmysql_num_rows—Getnumberofrowsinresult mysql_pconnect—

OpenapersistentconnectiontoaMySQLserver

mysql_ping—Pingaserverconnectionorreconnectifthereisnoconnection mysql_query—

SendaMySQLquery

mysql_result—Getresultdata mysql_select_db—

SelectaMySQLdatabase mysql_set_charset—

Setstheclientcharacterset mysql_stat—Getcurrentsystemstatus

mysql_tablename—Gettablenameoffield mysql_thread_id—

ReturnthecurrentthreadID

mysql_unbuffered_query—SendanSQLquerytoMySQL,withoutfetchingandbufferingtheresult (See

Appendix 2 for more My_SQL Functions.)

MacromediaDreamweaver8

IsaprofessionalHTMLeditorfordesigning,coding,anddevelopingwebsites,webpages,andweb

applications.Whetheryouenjoythecontrolofhand-codingHTMLorprefertoworkinavisualediting

environment,Dreamweaverprovidesyouwithhelpfultoolstoenhanceyourwebcreationexperience.

ThevisualeditingfeaturesinDreamweaverletyouquicklycreatepageswithoutwritingalineof

code.Youcanviewallyoursiteelementsorassetsanddragthemfromaneasy-to-usepaneldirectlyintoa

document.YoucanstreamlineyourdevelopmentworkflowbycreatingandeditingimagesinMacromedia

Fireworksoranothergraphicsapplication,thenimportingthemdirectlyintoDreamweaver,orbyadding

MacromediaFlashobjects.

DivisionofcomputerEngineering,SOE 17
HostelMangementSystem

Dreamweaveralsoprovidesafull-featuredcodingenvironmentthatincludescode-editingtools(suchas

codecoloringandtagcompletion)andlanguagereferencematerialonCascadingStyleSheets(CSS),JavaScript,

andColdFusionMarkupLanguage(CFML),amongothers.MacromediaRoundtripHTMLtechnologyimports

yourhand-codedHTMLdocumentswithoutreformattingthecode;youcanthenreformatcodewithyour

preferredformattingstyle.Dreamweaveralsoenablesyoutobuilddynamicdatabase-backedwebapplications

usingservertechnologiessuchasCFML,ASP.NET,ASP,JSP,andPHP.

Dreamweaverandaccessibility

Accessibilityreferstomakingwebsitesandwebproductsusableforpeoplewithvisual,auditory,

motor,andotherdisabilities.Examplesofaccessibilityfeaturesforsoftwareproductsandwebsitesinclude

screenreadersupport,textequivalentsforgraphics,keyboardshortcuts,changeofdisplaycolorstohigh

contrast,andsoon.Dreamweaverprovidestoolsthatmaketheproductaccessibleandtoolsthathelpyou

authoraccessiblecontent:

Using Dreamweaver accessibility features For Dreamweaver web designers who need to use

accessibilityfeatures,Dreamweaveroffersscreenreadersupport,keyboardnavigation,andoperatingsystem

accessibilitysupport.Formoreinformation,seeUsingDreamweaveraccessibilityfeatures.

Authoring for accessibility For Dreamweaver web designers who need to create accessible content,

Dreamweaverassistsyouincreatingaccessiblepagesthatcontainusefulcontentforscreenreadersand

complywithgovernmentguidelines.

Dreamweaver provides dialog boxes that prompt you to enter accessibility attributes when you insert

pageelements(seeOptimizingtheworkspaceforaccessiblepagedesign).Forexample,theaccessibilitydialog

boxforimagesremindsyoutoaddtextequivalentsforgraphics.Then,whentheimageappearsonapagefor

auserwithvisualdisabilities,thescreenreaderreadsthedescription.

DivisionofcomputerEngineering,SOE 18
HostelMangementSystem

LayingOutPageswithCSS

InMacromediaDreamweaver8,youcanuseCSSstylestolayoutyourpage.Youcaneitherinsertdiv tags

manually and apply CSS positioning styles to them, or you can use Dreamweaver layers to create

your layout.AlayerinDreamweaverisanHTMLpageelement—specifically,adivtag,oranyothertag—thathas

anabsolutepositionassignedtoit.WhetheryouuseCSS,tables,orframestolayoutyourpages,Dreamweaver

hasrulersandgridsforvisualguidanceinyourlayout.Dreamweaveralsohasatracingimagefeature,which

youcanusetore-createapagedesignthatwascreatedinagraphicsapplication.

Client-sideroleofforms

Formssupporttheclientsideoftheclient-serverrelationship.Whenavisitorentersinformationintoa

formdisplayedinawebbrowser(theclient)andclicksthesubmitbutton,theinformationissenttotheserver

whereaserver-sidescriptorapplicationprocessesit.Commonserver-sidetechnologiesusedforprocessing

formdataincludeMacromediaColdFusion,MicrosoftActiveServerPages(ASP),andPHP.Theserver

responds by sending requested information back to the user (or client), or performing some action based

on theform’scontents.

(Note:-SeeAppendix1formoreaboutMacromediaDreamweaver8andphpMyAdmin)

phpMAdmin

phpMyAdminisanopensourcetoolwritteninPHPintendedtohandletheadministrationofMySQL

overtheWorldWideWeb.phpMyAdminsupportsawiderangeofoperationswithMySQL.Currentlyitcan

createanddropdatabases,create/drop/altertables,delete/edit/addfields,executeanySQLstatement,manage

usersandpermissions,andmanagekeysonfields.whileyoustillhavetheabilitytodirectlyexecuteanySQL

statement.phpMyAdmincanmanageawholeMySQLserver(needsasuper-user)aswellasasingledatabase.

Toaccomplishthelatteryou’llneedaproperlysetupMySQLuserwhocanread/writeonlythedesired

database.It’suptoyoutolookuptheappropriatepartintheMySQLmanual.

DivisionofcomputerEngineering,SOE 19
HostelMangementSystem

phpMyAdmincan:

· browseanddropdatabases,tables,views,fieldsandindexes

· create,copy,drop,renameandalterdatabases,tables,fieldsandindexes

· maintenanceserver,databasesandtables,withproposalsonserverconfiguration

· execute,editandbookmarkanySQL-statement,evenbatch-queries

· loadtextfilesintotables

· createandreaddumpsoftables

· export data to various formats: CSV, XML, PDF, ISO/IEC 26300 - OpenDocument Text

and Spreadsheet,Word,ExcelandLEATXformats

· administermultipleservers

· manageMySQLusersandprivileges

· checkreferentialintegrityinMyISAMtables

· usingQuery-by-example(QBE),createcomplexqueriesautomaticallyconnectingrequiredtables

· createPDFgraphicsofyourDatabaselayout

· searchgloballyinadatabaseorasubsetofit

· transformstoreddataintoanyformatusingasetofpredefinedfunctions,likedisplayingBLOB- data

as image or download-link

· supportInnoDBtablesandforeignkeys

· supportmysqli,theimprovedMySQLextension

DivisionofcomputerEngineering,SOE 20
HostelMangementSystem

Awordaboutusers:

Manypeoplehavedifficultyunderstandingtheconceptofusermanagementwithregards

tophpMyAdmin.WhenauserlogsintophpMyAdmin,thatusernameandpasswordarepasseddirectly

toMySQL.phpMyAdmindoesnoaccountmanagementonitsown(otherthanallowingonetomanipulate

theMySQLuseraccountinformation);allusersmustbevalidMySQLusers.

1)phpMyAdmincancompress(Zip,GZip-RFC1952-orBzip2formats)dumpsandCSVexports if you

use PHP with Zlib support (—with-zlib) and/or Bzip2 support (—with-bz2). Proper support

mayalsoneedchangesinphp.ini.aphpMyAdminscreenappearsasshownbelow.

2.3.1.4.1 Requirements

o PHP

o YouneedPHP5.2.0ornewer,withsessionsupportandtheStandardPHPLibrary(SPL)

extension.

o TosupportuploadingofZIPfiles,youneedthePHPzipextension.

o Forpropersupportofmultibytestrings(eg.UTF-8,whichiscurrentlydefault),youshould

installmbstringandctypeextensions.

o YouneedGD2supportinPHPtodisplayinlinethumbnailsofJPEGs(“image/jpeg:inline”)

withtheiroriginalaspectratio

o Whenusingthe“cookie”authenticationmethod,themcryptextensionisstronglysuggested

formostusersandisrequiredfor64–bitmachines.NotusingmcryptwillcausephpMyAdmin

toloadpagessignificantlyslower.

DivisionofcomputerEngineering,SOE 21
HostelMangementSystem

ApacheWebserver

OftenreferredtoassimplyApache,apublic-domainopensourceWebserverdevelopedbyaloosely-

knitgroupofprogrammers.ThefirstversionofApache,basedontheNCSAhttpdWebserver,wasdeveloped in1995.

CoredevelopmentoftheApacheWebserverisperformedbyagroupofabout20volunteerprogrammers,

calledtheApacheGroup.However,becausethesourcecodeisfreelyavailable,anyonecanadapttheserver

forspecificneeds,andthereisalargepubliclibraryofApacheadd-ons.Inmanyrespects,developmentof

ApacheissimilartodevelopmentoftheLinuxoperatingsystem.

TheoriginalversionofApachewaswrittenforUNIX,buttherearenowversionsthatrununderOS/

2,Windowsandotherplatforms.ThenameisatributetotheNativeAmericanApacheIndiantribe,atribewell

knownforitsenduranceandskillinwarfare.AcommonmisunderstandingisthatitwascalledApachebecause

itwasdevelopedfromexistingNCSAcodeplusvariouspatches,hencethenameapatchyserver,orApache server.

Apacheconsistentlyratesastheworld’smostpopularWebserveraccordingtoanalystsurveys.

Apachehasattractedsomuchinterestbecauseitisfull-featured,reliable,andfree.Originallydevelopedfor

UNIX™operating systems,Apache has been updated to run onWindows, OS/2, and other platforms.

One aspectofApachethatsomesiteadministratorsfindconfusing—especiallythoseunfamiliarwithUNIX-style

software—isitsconfigurationscheme.Insteadofusingapoint-and-clickgraphicuserinterface(GUI)or

WindowsRegistrykeysasmostothermodernsoftwarepackages,Apachegenerallyreliesonsimpletextfiles

foritsconfigurationsettings.

DivisionofcomputerEngineering,SOE 22
HostelMangementSystem

ConfigurationFiles

Apacheusesasystemofthreetextfilesformanagingitsconfigurationdata.Allthreeofthesefiles(almost

always)appearinApache’s./confdirectoryandaredesignedtobeeditedbysystemadministrators:

1. httpd.confforgeneralsettings

2. srm.confforresourcesettings

3. access.confforsecuritysettings

WhenApachefirststarts,thesefilesareprocessedintheordershownabove.Originally,theinitial

installationofApacheincludeddefaultentrieswithineachofthethreefiles.Inthemostrecentversionsof

Apache,however,thedefaultinstallationhaschanged.Nowhttpd.confistreatedasthe“master”configuration

fileanditcontainsallofthesettings.Bothsrm.confandaccess.confstillexistintheinstallation,buttheycontain

nosettingsandareemptyexceptforsomecomments.

InsideHttpd.conf

Traditionalyhttpd.confcontainedgeneralsettingssuchastheServerNameandPortnumber.These

entriesappearasfollowsinthefile:ServerNamecompnetworking.about.comPort80Theterm“httpd”

standsforHTTPDaemon.RecallthatinaUNIXenvironment,thetermdaemonreferstoatypeofprocess

designedtolaunchatsystembootandcontinuerunningforverylongperiodsoftime.Thisfilecontainsa

numberofotherentries(technicallycalleddirectives),butformostofthese,modificationsareoptional.Probably

themostusefuloftheseentriesisServerAdmin.

AccessandSecuritySettings

ItisrecommendedpracticenowforApacheadministratorstomanagetheirresourceand security

settingsfromhttpd.conf.AdministratorsofolderversionsofApachecansimplycuttheirentriesfromsrm.conf

andaccess.confandpastethemintothemasterfile.Ifanadministratorwantstogoonestepfurtheranddelete

thetwoemptyfiles,theyshouldalsoplacethefollowingentriesinhttpd.conftopreventApachefromattempting

toaccessthem.

DivisionofcomputerEngineering,SOE 23
HostelMangementSystem

CHAPTER3

DivisionofcomputerEngineering,SOE 24
HostelMangementSystem

CHAPTER3
SYSTEMANALYSIS
ExistingSystem
Forthepastfewyearsthenumberofeducationalinstitutionsareincreasingrapidly.Therebythenumber

ofhostelsarealsoincreasingfortheaccommodationofthestudentsstudyinginthisinstitution.Andhencethere

isalotofstrainonthepersonwhoarerunningthehostelandsoftware’sarenotusuallyusedinthiscontext.

Thisparticularprojectdealswiththeproblemsonmanagingahostelandavoidstheproblemswhichoccur

whencarriedmanually

Identificationofthedrawbacksoftheexistingsystemleadstothedesigningofcomputerizedsystem

thatwillbecompatibletotheexistingsystemwiththesystemwhichismoreuserfriendlyandmoreGUI

oriented.Wecanimprovetheefficiencyofthesystem,thusovercomethefollowingdrawbacksofthe

existingsystem.

· morehumanerror.

· morestrengthandstrainofmanuallabourneeded

· Repetitionofthesameprocedures.

· lowsecurity

· Dataredundancy

· difficulttohandle

· difficulttoupdatedata

· recordkeepingisdifficult

· Backupdatacanbeeasilygenerated

DivisionofcomputerEngineering,SOE 25
HostelMangementSystem

CHAPTER4

DivisionofcomputerEngineering,SOE 26
HostelMangementSystem

CHAPTER4

SYSTEMDESIGN
InputDesign
Thesystemdesignisdividedintotwoportions.TheAdministratorsectionandtheUser(student’s)

section.

Administrator

1. TheAdministratorcanallotdifferentstudentstothedifferenthostels.

2.Hecanvacatethestudentsforthehostels.

3.Hecancontrolthestatusofthefeepayement.

4.Hecaneditthedetailsofthestudents.Hecanchangetheirrooms,editanddeletethestudentrecords.

Aprocessofconvertinguseroriginatedinputstoacomputer-basedformat.Inputdesignisanimportant

partofdevelopmentprocesssinceinaccurateinputdataarethemostcommoncauseoferrorsindataprocessing.

Erroneousentriescanbecontrolledbyinputdesign.Itconsistsofdevelopingspecificationsandprocedures

forenteringdataintoasystemandmustbeinsimpleformat.Thegoalofinputdatadesignistomakedataentry

aseasy,logicalandfreefromerrorsaspossible.Ininputdatadesign,wedesignthesourcedocumentthat

capturethedataandthenselectthemediausedtoenterthemintothecomputer.

Therearetwomajorapproachesforenteringdataintothecomputer.Theyare

· Menus.

· DialogBoxes.

Menus

Amenuisaselectionlistthatsimplifiescomputerdataaccessorentry.Insteadofrememberingwhatto

enter,theuserchoosesfromalistofoptions.Amenulimitsauserchoiceofresponsebutreducethechances

forerrorindataentry.

DivisionofcomputerEngineering,SOE 27
HostelMangementSystem

DialogBox

Dialogboxesarewindowsandthesewindowsaremainlypopup,whichappearinresponsetocertain

conditionsthatoccurwhenaprogramisrun.Itallowsthedisplayofbitmapsandpictures.Itcanhavevarious

controlslikebuttons,textboxes,listboxesandcomboboxes.Usingthesecontrolswecanmakea‘dialog’

withtheprogram.

Theproposedsystemhasthreemajorinputs.TheyareMachineRegistration,MachineScheduling

andRequestForm.

ProcessDesign

Processdesignplaysanimportantroleinprojectdevelopment.Inordertounderstandthe

workingprocedure,processdesignisnecessary.DataFlowDiagramandSystemFlowchartarethe

toolsusedforprocessdesign.

SystemFlowChartisagraphicalrepresentationofthesystemshowingtheoverallflowofcontrol

inprocessingatthejoblevel;specifieswhatactivitiesmustbedonetoconvertfromaphysicaltological model.

DataFlowDiagramisthelogicalrepresentationofthedataflowoftheproject.TheDFDis

drawnusingvarioussymbols.Ithasasourceandadestination.Theprocessisrepresentedusingcircles

andsourceanddestinationarerepresentedusingsquares.Thedataflowisrepresentedusingarrows.

OnereadercaneasilygettheideaabouttheprojectthroughDataFlowDiagram.

DivisionofcomputerEngineering,SOE 28
HostelMangementSystem

SYMBOLSUSEDINDATAFLOWDIAGRAM

-sourcerectangle,whichdefinesordestination

-Arrow,whichshowsdataflow.

-Circle,whichrepresentaprocessthattransformsincomingdata intooutgoingflow.

-Openrectangle,whichshowsadatastore.

4.2.1 DataFlowDiagram

ContextlevelDFD

StudentModule

DivisionofcomputerEngineering,SOE 29
HostelMangementSystem

Registrationprocess

Adminmodule

Allotmentprocess

DivisionofcomputerEngineering,SOE 30
HostelMangementSystem

Vacatingprocess

DatabaseDesign
Thedatainthesystemhastobestoredandretrievedfromdatabase.Designingthedatabaseispart

ofsystemdesign.Dataelementsanddatastructurestobestoredhavebeenidentifiedatanalysisstage.

Theyarestructuredandputtogethertodesignthedatastorageandretrievalsystem.

Adatabaseisacollectionofinterrelateddatastoredwithminimumredundancytoservemanyusers

quicklyandefficiently.Thegeneralobjectiveistomakedatabaseaccesseasy,quick,inexpensiveand

flexiblefortheuser.Relationshipsareestablishedbetweenthedataitemsandunnecessarydataitems

areremoved.Normalizationisdonetogetaninternalconsistencyofdataandtohaveminimum

redundancyandmaximumstability.Thisensuresminimizingdatastoragerequired,minimizingchancesof

datainconsistenciesandoptimizingforupdates.TheMSAccessdatabasehasbeenchosenfor

developingtherelevantdatabases.

DivisionofcomputerEngineering,SOE 31
HostelMangementSystem

Thefollowingarethetablesthatareinvolvedintheproposedsystem

1. Studentaccountcreation

2. AdministratorLogin

DivisionofcomputerEngineering,SOE 32
HostelMangementSystem

3. Applicationform

DivisionofcomputerEngineering,SOE 33
HostelMangementSystem

4. Allotment

5. Vacatingandediting

DivisionofcomputerEngineering,SOE 34
HostelMangementSystem

6. NoticeBoard

OutputDesign
Designingcomputeroutputshouldproceedinanorganized,wellthroughoutmanner;therightoutput

elementisdesignedsothatpeoplewillfindthesystemwhetherorexecuted.Whenwedesignanoutputwe

mustidentifythespecificoutputthatisneededtomeetthesystem.Theusefulnessofthenewsystemis

evaluatedonthebasisoftheiroutput.

Oncetheoutputrequirementsaredetermined,thesystemdesignercandecidewhattoincludeinthe

systemandhowtostructureitsothattherequireoutputcanbeproduced.Fortheproposedsoftware,itis

necessarythattheoutputreportsbecompatibleinformatwiththeexistingreports.Theoutputmustbeconcerned

totheoverallperformanceandthesystem’sworking,asitshould.Itconsistsofdevelopingspecificationsand

procedures for data preparation, those steps necessary to put the inputs and the desired output, ie

maximum userfriendly.Propermessagesandappropriatedirectionscancontrolerrorscommittedbyusers.

Theoutputdesignisthekeytothesuccessofanysystem.Outputisthekeybetweentheuserandthe

sensor.Theoutputmustbeconcernedtothesystem’sworking,asitshould.

Output design consists of displaying specifications and procedures as data presentation. User

never left with the confusion as to what is happening without appropriate error and acknowledges

message being

received.Evenanunknownpersoncanoperatethesystemwithoutknowinganythingaboutthesystem.

DivisionofcomputerEngineering,SOE 35
HostelMangementSystem

CHAPTER5

DivisionofcomputerEngineering,SOE 36
HostelMangementSystem

CHAPTER5

SYSTEMTESTING
Systemtestingisthestageofimplementation,whichisaimedatensuringthatthesystemworksaccurately

andefficientlybeforeliveoperationcommences.Testingistheprocessofexecutingtheprogramwiththeintent

offindingerrorsandmissingoperationsandalsoacompleteverificationtodeterminewhethertheobjectives

aremetandtheuserrequirementsaresatisfied.Theultimateaimisqualityassurance.

Tests are carried out and the results are compared with the expected document. In the case of erroneous

results,debuggingisdone.Usingdetailedtestingstrategiesatestplaniscarriedoutoneachmodule.The

varioustestsperformedin“NetworkBackupSystem”areunittesting,integrationtestinganduseracceptance testing.

UnitTesting
The software units in a system are modules and routines that are assembled and integrated to perform a

specific function. Unit testing focuses first on modules, independently of one another, to locate errors.

This enables,todetecterrorsincodingandlogicthatarecontainedwithineachmodule.Thistestingincludes

enteringdataandascertainingifthevaluematchestothetypeandsizesupportedbyjava.Thevariouscontrols

aretestedtoensurethateachperformsitsactionasrequired.

IntegrationTesting
Data can be lost across any interface, one module can have an adverse effect on another, sub functions

whencombined,maynotproducethedesiredmajorfunctions.Integrationtestingisasystematictestingto

discovererrorsassociatedwithintheinterface.Theobjectiveistotakeunittestedmodulesandbuildaprogram

structure.Allthemodulesarecombinedandtestedasawhole.HeretheServermoduleandClientmodule

optionsareintegratedandtested.Thistestingprovidestheassurancethattheapplicationiswellintegrated

functionalunitwithsmoothtransitionofdata.

UserAcceptanceTesting
Useracceptanceofasystemisthekeyfactorforthesuccessofanysystem.Thesystemunder

considerationistestedforuseracceptancebyconstantlykeepingintouchwiththesystemusersattimeof

developingandmakingchangeswheneverrequired.

DivisionofcomputerEngineering,SOE 37
HostelMangementSystem

CHAPTER6

DivisionofcomputerEngineering,SOE 38
HostelMangementSystem

CHAPTER6
IMPORTANTCODE

Administratoraccountwithdatabaseconnectivity

<?php

session_start();

$a=$_POST["user1"];

$b=$_POST["pass1"];

$c=$_POST["pass1"];

$_SESSION['user1']=$user1;

$_SESSION['pass1']=$pass1;

$cc=mysql_connect("localhost","root","");

mysql_select_db("hostel");

$abc="CREATETABLEIFNOTEXISTS'adm_account'( 'i

d' INT(20) NOTNULLAUTO_INCREMENT,

'user'VARCHAR(60)NOTNULL,

'pass'VARCHAR(60)NOTNULL,

'pass_r'VARCHAR(60)NOTNULL,PRIMARYKEY('id'))";

mysql_query($abc);

$sql="insertintoadm_account(user,pass,pass_r)values('$user1','$pass1','$pass1')";

mysql_query($sql);

mysql_close($cc);

?>

DivisionofcomputerEngineering,SOE 39
HostelMangementSystem

AdministratorLoginCode

<?
session_start();
if(isset($_REQUEST['sub1']))
{
$user=$_REQUEST['user1'];
$pass=$_REQUEST['pass1'];
$cc=mysql_connect("localhost","root","");
mysql_select_db("hostel");
$sql="SELECT*FROMadm_accountwhereuser1='$user'ANDpass1='$pass'";
$res=@mysql_query($sql);
//$a=@mysql_affected_rows();
//if($a>=1)
$num=mysql_num_rows($res);
if($num>0)
{
$_SESSION['pass']=$pass;
$_SESSION['user']=$user;
header("location:admin_home.php");
}
else
{
$flag=1;
$msg="Wrongusernameorpassword";
}

? >
Divisio n ofcomputerEngineering,SOE 40
HostelMangementSystem

JavascriptValidationCode

functionvalidate(f)
{
if((f.user.value=="")||(f.user.value.length<5))
{
alert("Pleaseenteravalidusername");
f.user.focus();
returnfalse;
}
if((f.pass.value=="")||(f.pass.value.length<6))
{
alert("Pleaseenteravalidpassword");
f.pass.focus();
returnfalse;
}
returntrue;
}

EditingStudentdetails

<?php
session_start(); if(!(isset($_SESSION['user']))&&!
(isset($_SESSION['pass']))) header("location:index.php");
include_once("include_files/db.php");
$con=newdbconnect();
$con->open();

//acceptingvaluesfromformandinsertingthemintodatabase

DivisionofcomputerEngineering,SOE 41
HostelMangementSystem

if(isset($_REQUEST['edit']))
{

//receivesdatafromcurrentform
$year=$_REQUEST['year'];
$message="For".""."-".$year.""."Batch";
$table=$year.'r';
$f1=0;
$f2=0;
$table_a=$year.'a';
$sql="SELECT*FROM$table_a";
$result=@mysql_query($sql);
$total_num=@mysql_num_rows($result);
if($total_num<=0)
{
$f1=1;
}
$table_i=$year.'i';
$sql="SELECT*FROM$table_i";
$result=@mysql_query($sql);
$total_num=@mysql_num_rows($result);
if($total_num<=0)
{
$f2=1;
}

$s_code=substr($sem,1,1);
$stud_num=$_REQUEST['stud_num'];

DivisionofcomputerEngineering,SOE 42
HostelMangementSystem

for($i=1;$i<=$stud_num;$i++)
{
$id[$i]=$_POST["id".$i];
$roll_no[$i]=$_POST["roll_no".$i];
$reg_no[$i]=$_POST["reg_no".$i];
$name[$i]=$_POST['name'.$i];
$email[$i]=$_POST['email'.$i];

}
for($i=1;$i<=$stud_num;$i++)
{
$sql="UPDATE$tableSET
roll_no='{$roll_no[$i]}',reg_no='{$reg_no[$i]}',name='{$name[$i]}',
email='{$email[$i]}'WHEREid='{$id[$i]}'";
$con->update($sql);
if($f1==0)
{
$sql_a="UPDATE$table_aSETroll_no='{$roll_no[$i]}',name='{$name[$i]}'WH
EREid='{$id[$i]}'";
$con->update($sql_a);
}
if($f2==0)
{
$sql_i="UPDATE$table_iSETroll_no='{$roll_no[$i]}',name='{$name[$i]}'W
HEREid='{$id[$i]}'";
$con->update($sql_i);
}

}
header("location:stud_edit.php?year={$year}");
}

DivisionofcomputerEngineering,SOE 43
HostelMangementSystem

if(isset($_REQUEST['delete']))
{

$year=$_REQUEST['year'];
$table=$year.'r';
$sql="DROPTABLE$table";
@mysql_query($sql);
header("location:admin_home.php");
}

?>

Storingvaluesfromdatabase

$i=1;
while($row=@mysql_fetch_array($result))
{
$id[$i]=$row['id'];
$roll_no[$i]=$row['roll_no'];
$reg_no[$i]=$row['reg_no'];
$name[$i]=$row['name'];
$email[$i]=$row['email'];
$i++;
}

Includinafile

<?include_once("include_files/footer.htm");?>

DivisionofcomputerEngineering,SOE 44
HostelMangementSystem

CHAPTER7

DivisionofcomputerEngineering,SOE 45
HostelMangementSystem

CHAPTER7
IMPLEMENTATION
Implementationisthestageintheprojectwherethetheoreticaldesignisturnedintoaworkingsystem

andisgivingconfidenceonthenewsystemfortheusersthatitwillworkefficientlyandeffectively.Itinvolves

carefulplanning,investigationofthecurrentsystemanditsconstraintsonimplementation,designofmethodsto

achievethechangeover,anevaluationofchangeovermethods.Apartfromplanningmajortaskofpreparing

theimplementationareeducationandtrainingofusers.Theimplementationprocessbeginswithpreparinga

planfortheimplementationofthesystem.Accordingtothisplan,theactivitiesaretobecarriedout,discussions

maderegardingtheequipmentandresourcesandtheadditionalequipmenthastobeacquiredtoimplementthe

newsystem.Innetworkbackupsystemnoadditionalresourcesareneeded.

Implementationisthefinalandthemostimportantphase.Themostcriticalstageinachievingasuccessful

newsystemisgivingtheusersconfidencethatthenewsystemwillworkandbeeffective.Thesystemcanbe

implementedonlyafterthoroughtestingisdoneandifitisfoundtobeworkingaccordingtothespecification.

Thismethodalsooffersthegreatestsecuritysincetheoldsystemcantakeoveriftheerrorsarefoundor

inabilitytohandlecertaintypeoftransactionswhileusingthenewsystem.

UserTraining

Afterthesystemisimplementedsuccessfully,trainingoftheuserisoneofthemostimportant

subtasksofthedeveloper.Forthispurposeusermanualsarepreparedandhandledovertotheusertooperate

thedevelopedsystem.Thustheusersaretrainedtooperatethedevelopedsystem.Boththehardwareand

softwaresecuritiesaremadetorunthedevelopedsystemssuccessfullyinfuture.Inordertoputnewapplication

systemintouse,thefollowingactivitiesweretakencareof:

· Preparationofuserandsystemdocumentation

.Conductingusertrainingwithdemoandhandson

· Testrunforsomeperiodtoensuresmoothswitchingoverthesystem

DivisionofcomputerEngineering,SOE 46
HostelMangementSystem

Theusersaretrainedtousethenewlydevelopedfunctions.Usermanualsdescribingtheproceduresfor

usingthefunctionslistedonmenuarecirculatedtoalltheusers.Itisconfirmedthatthesystemisimplemented

uptousersneedandexpectations.

7.2SecurityandMaintenance

Maintenanceinvolvesthesoftwareindustrycaptive,typingupsystemresources.Itmeansrestoring

somethingtoitsoriginalcondition.Maintenancefollowsconversiontotheextendthatchangesarenecessaryto

maintainsatisfactoryoperationsrelativetochangesintheuser’senvironment.Maintenanceoftenincludes minor

enhancements or corrections to problems that surface in the system’s operation.Maintenance is also

donebasedonfixingtheproblemsreported,changingtheinterfacewithothersoftwareorhardwareenhancing

thesoftware.

Anysystemdevelopedshouldbesecuredandprotectedagainstpossiblehazards.Securitymeasures

areprovidedtopreventunauthorizedaccessofthedatabaseatvariouslevels.Anuninterruptedpowersupply

shouldbesothatthepowerfailureorvoltagefluctuationswillnoterasethedatainthefiles.

Passwordprotectionandsimpleprocedurestopreventtheunauthorizedaccessareprovidedtothe

users.Thesystemallowstheusertoenterthesystemonlythroughproperusernameandpassword.

DivisionofcomputerEngineering,SOE 47
HostelMangementSystem

CHAPTER8

DivisionofcomputerEngineering,SOE 48
HostelMangementSystem

CHAPTER8
CONCLUSION

Toconcludethedescriptionabouttheproject:Theproject,developedusingPHPandMySQLis

basedontherequirementspecificationoftheuserandtheanalysisoftheexistingsystem,withflexibilityfor

futureenhancement.

Theexpandedfunctionalityoftoday’ssoftwarerequiresanappropriateapproachtowardssoftware

development.Thishostelmanagementsoftwareisdesignedforpeoplewhowanttomanagevariousactivi-

tiesinthehostel.Forthepastfewyearsthenumberofeducationalinstitutionsareincreasingrapidly.

Therebythenumberofhostelsarealsoincreasingfortheaccommodationofthestudentsstudyinginthis

institution.Andhencethereisalotofstrainonthepersonwhoarerunningthehostelandsoftware’sarenot

usuallyusedinthiscontext.Thisparticularprojectdealswiththeproblemsonmanagingahostelandavoids

theproblemswhichoccurwhencarriedmanually.

Identificationofthedrawbacksoftheexistingsystemleadstothedesigningofcomputerizedsystem

thatwillbecompatibletotheexistingsystemwiththesystemwhichismoreuserfriendlyandmoreGUI oriented.

DivisionofcomputerEngineering,SOE 49
HostelMangementSystem

CHAPTER9

DivisionofcomputerEngineering,SOE 50
HostelMangementSystem

CHAPTER9
BIBILIOGRAPHY

1. www.w3schools.com

2. in.php.net

3. en.wikipedia.org/wiki/PHP

4. www.hotscripts.com/category/php/

5. www.apache.org/

6. www.mysql.com/click.php?e=35050

DivisionofcomputerEngineering,SOE 51
HostelMangementSystem

APPENDIX

DivisionofcomputerEngineering,SOE 52
HostelMangementSystem

APPENDIX-I

Dreamweaver8&phpMyAdmin

Dreamweaver8includesvariousnewfeaturesthatimproveusabilityandhelpyoutobuildpageswhether

you’reworkinginthedesignorthecodingenvironment.First,Dreamweaver8providessupportforbest

practicesandindustrystandards,includingsupportforadvancedCSSuse,XMLandRSSfeeds,andaccessibility

requirements.

DivisionofcomputerEngineering,SOE 53
HostelMangementSystem

Getmoredoneinlesstimewithoptimizeduserworkflowsthatreducethetimerequiredtocomplete

commontasks.Dreamweaver8takesthehassleoutofthelittlethingssoyoucanspendmoretimedesigning

anddevelopingengagingwebsitesandapplications.

DivisionofcomputerEngineering,SOE 54
HostelMangementSystem

Dreamweaver8supportseffortstolearnandtakeadvantageofnewtechnologies,includingPHP5,

FlashVideo,ColdFusionMX7,andtheMacromediaWebPublishingSystem.

DivisionofcomputerEngineering,SOE 55
HostelMangementSystem

Dreamweaverandaccessibility

Accessibilityreferstomakingwebsitesandwebproductsusableforpeoplewithvisual,auditory,

motor,andotherdisabilities.Examplesofaccessibilityfeaturesforsoftwareproductsandwebsitesinclude

screenreadersupport,textequivalentsforgraphics,keyboardshortcuts,changeofdisplaycolorstohigh

contrast,andsoon.Dreamweaverprovidestoolsthatmaketheproductaccessibleandtoolsthathelpyou

authoraccessiblecontent:

UsingDreamweaveraccessibilityfeaturesForDreamweaverwebdesignerswhoneedtouseaccessibility

features,Dreamweaveroffersscreenreadersupport,keyboardnavigation,andoperatingsystemaccessibility

support.Formoreinformation,seeUsingDreamweaveraccessibilityfeatures.

Authoring for accessibility For Dreamweaver web designers who need to create accessible content,

Dreamweaverassistsyouincreatingaccessiblepagesthatcontainusefulcontentforscreenreadersand

complywithgovernmentguidelines.

Dreamweaver provides dialog boxes that prompt you to enter accessibility attributes when you insert

pageelements(seeOptimizingtheworkspaceforaccessiblepagedesign).Forexample,theaccessibilitydialog

boxforimagesremindsyoutoaddtextequivalentsforgraphics.Then,whentheimageappearsonapagefor

auserwithvisualdisabilities,thescreenreaderreadsthedescription.
Dreamweaveralsoprovidessamplewebpagesthatweredesignedforaccessibility(seeCreatinga

documentbasedonaDreamweaverdesignfile)andanaccessibilityreportthatyoucanruntotestyourpage

orsiteagainsttheSection508accessibilityguidelines.

Theworkspacelayout

InWindows,Dreamweaverprovidesanall-in-one-windowintegratedlayout.Intheintegratedworkspace,

allwindowsandpanelsareintegratedintoasinglelargerapplicationwindow.

DivisionofcomputerEngineering,SOE 56
HostelMangementSystem

OntheMacintosh,Dreamweavercandisplaymultipledocumentsinasinglewindowwithtabsthat

identifyeachdocument.Dreamweavercanalsodisplayafloatingworkspaceinwhicheachdocumentappears

initsownindividualwindow.Panelgroupsareinitiallydockedtogether,butcanbeundockedintotheirown

windows.Windows“snap”automaticallytoeachother,tothesidesofthescreen,andtotheDocument

windowasyoudragorresizethem.

DivisionofcomputerEngineering,SOE 57
HostelMangementSystem

Dreamweaverworkspaceelements

ThissectionbrieflydescribessomeelementsoftheDreamweaverworkspace.

TheStartpageenablesyoutoopenarecentdocumentorcreateanewdocument.FromtheStart

pageyoucanalsolearnmoreaboutDreamweaverbytakingaproducttouroratutorial.

TheInsertbarcontainsbuttonsforinsertingvarioustypesof“objects,”suchasimages,tables,and

layers,intoadocument.EachobjectisapieceofHTMLcodethatenablesyoutosetvariousattributesas

youinsertit.Forexample,youcaninsertatablebyclickingtheTablebuttonintheInsertbar.Ifyouprefer,

youcaninsertobjectsusingtheInsertmenuinsteadoftheInsertbar.

TheDocumenttoolbarcontainsbuttonsthatprovideoptionsfordifferentviewsoftheDocument

window (such as Design view and Code view), various viewing options, and some common

operations suchaspreviewinginabrowser.

TheStandardtoolbar(notdisplayedinthedefaultworkspacelayout)containsbuttonsforcommon

operationsfromtheFileandEditmenus:New,Open,Save,SaveAll,Cut,Copy,Paste,Undo,andRedo.

TodisplaytheStandardtoolbar,selectView>Toolbars>Standard.

TheCodingtoolbar(displayedinCodeviewonly)containsbuttonsthatletyouperformmany

standardcodingoperations.
DivisionofcomputerEngineering,SOE 58
HostelMangementSystem

TheStyleRenderingtoolbar(hiddenbydefault)containsbuttonsthatletyouseehowyour

designwouldlookindifferentmediatypesifyouusedmedia-dependentstylesheets.Italsocontainsa

buttonthatletsyouenableordisableCSSstyles.TheDocumentwindowdisplaysthecurrentdocument as you

create and edit it.

ThePropertyinspectorletsyouviewandchangeavarietyofpropertiesfortheselectedobjector

text.Eachkindofobjecthasdifferentproperties.ThePropertyinspectorisnotexpandedbydefaultinthe

Coderworkspacelayout.ThetagselectorinthestatusbaratthebottomoftheDocumentwindow

showsthehierarchyoftagssurroundingthecurrentselection.Clickanytaginthehierarchytoselectthat

tagandallitscontents.Panelgroupsaresetsofrelatedpanelsgroupedtogetherunderoneheading.To

expandapanelgroup,clicktheexpanderarrowattheleftofthegroup’sname;toundockapanelgroup,

dragthegripperattheleftedgeofthegroup’stitlebar.TheFilespanelenablesyoutomanageyourfiles

andfolders,whethertheyarepartofaDreamweaversiteoronaremoteserver.TheFilespanelalso

enablesyoutoaccessallthefilesonyourlocaldisk,muchlikeWindowsExplorer(Windows)orthe

Finder(Macintosh).

LayingOutPageswithCSS

InMacromediaDreamweaver8,youcanuseCSSstylestolayoutyourpage.Youcaneitherinsert

divtagsmanuallyandapplyCSSpositioningstylestothem,oryoucanuseDreamweaverlayerstocreate

yourlayout.AlayerinDreamweaverisanHTMLpageelement—specifically,adivtag,oranyothertag—

thathasanabsolutepositionassignedtoit.Dreamweaveralsohasatracingimagefeature,whichyou

canusetore-createapagedesignthatwascreatedinagraphicsapplication.

Client-sideroleofforms

Formssupporttheclientsideoftheclient-serverrelationship.Whenavisitorentersinformationinto

aformdisplayedinawebbrowser(theclient)andclicksthesubmitbutton,theinformationissenttothe server

where a server-side script or application processes it. Common server-side technologies used for

processingformdataincludeMacromediaColdFusion,MicrosoftActiveServerPages(ASP),andPHP.

DivisionofcomputerEngineering,SOE 59
HostelMangementSystem

phpMyAdmin

DivisionofcomputerEngineering,SOE 60
HostelMangementSystem

Transformations

To enable transformations, you have to setup the column_info table and the proper directives.

Please seetheConfigurationsectiononhowtodoso.Youcanapplydifferenttransformationstothecontentsofeach

field.Thetransformationwilltakethecontentofeachfieldandtransformitwithcertainrulesdefinedinthe

selectedtransformation.Sayyouhaveafield‘filename’whichcontainsafilename.Normallyyouwouldseein

phpMyAdminonlythisfilename.UsingtransformationsyoucantransformthatfilenameintoaHTMLlink,so

youcanclickinsideofthephpMyAdminstructureonthefield’slinkandwillseethefiledisplayedinanew

browserwindow.Usingtransformationoptionsyoucanalsospecifystringstoappend/prependtoastringor

theformatyouwanttheoutputstoredin.Forageneraloverviewofallavailabletransformationsandtheir options,

you can consult your<www.your-host.com>/<your-install-dir>/transformation_overview.php

installation.Foratutorialonhowtoeffectivelyusetransformations,seeourLinksectionontheofficial

phpMyAdminhomepage.

DivisionofcomputerEngineering,SOE 61
HostelMangementSystem

Usage

Gotoyourtbl_structure.phppage(i.e.reachedthroughclickingonthe‘Structure’linkforatable).

Thereclickon“Change”(orchangeicon)andthereyouwillseethreenewfieldsattheendoftheline.Theyare

called‘MIME-type’,‘Browsertransformation’and‘Transformationoptions’.

· Thefield‘MIME-type’isadrop-downfield.SelecttheMIME-typethatcorrespondstothecolumn’s

contents.PleasenotethattransformationsareinactiveaslongasnoMIME-typeisselected.

· Thefield‘Browsertransformation’isadrop-downfield.Youcanchoose from a hopefully growing

amount of pre-defined transformations. See below for information on how to build your own

transformation.Thereareglobaltransformationsandmimetype-boundtransformations.Global

transformationscanbeusedforanymimetype.Theywilltakethemimetype,ifnecessary,intoregard.

Mimetype-boundtransformationsusuallyonlyoperateonacertainmimetype.Therearetransformations

whichoperateonthemainmimetype(like‘image’),whichwillmostlikelytakethesubtypeintoregard,

andthosewhoonlyoperateonaspecificsubtype(like‘image/jpeg’).Youcanusetransformationson

mimetypesforwhichthefunctionwasnotdefinedfor.Thereisnosecuritycheckforyouselectedthe

righttransformation,sotakecareofwhattheoutputwillbelike.

· Thefield‘Transformationoptions’isafree-typetextfield.Youhavetoentertransform-functionspecific

optionshere.Usuallythetransformscanoperatewithdefaultoptions,butitisgenerallyagoodideato

lookuptheoverviewtoseewhichoptionsarenecessary.MuchliketheENUM/SET-Fields,youhave to split

up several options using the format ‘a’,’b’,’c’,...(NOTE THE MISSING BLANKS). This is

becauseinternallytheoptionswillbeparsedasanarray,leavingthefirstvaluethefirstelementinthe array, and

so forth.If you want to specify a MIME character set you can define it in the

transformation_options.

DivisionofcomputerEngineering,SOE 62
HostelMangementSystem

.Youhavetoputthatoutsideofthepre-definedoptionsofthespecificmime-transform,asthelastvalue

oftheset.Usetheformat“‘;charset=XXX’”.Ifyouuseatransform,forwhichyoucanspecify2

optionsand you wantto appenda characterset,enter“‘firstparameter’,’second

parameter’,’charset=us-ascii’”.Youcan,howeverusethedefaultsfortheparameters:“‘’,’’,’charset=us- ascii’”.

Filestructure

Allmimetypesandtheirtransformationsaredefinedthroughsinglefilesinthedirectory‘libraries/

transformations/’.Theyarestoredinfilestoeaseupcustomizationandeasyaddingofnewtransformations.

Becausetheusercannotenterownmimetypes,itiskeptsurethattransformationsalwayswork.It

makesnosensetoapplyatransformationtoamimetype,thetransform-functiondoesn’tknowtohandle.

Onecan,however,useemptymime-typesandglobaltransformationswhichshouldworkformany

mimetypes.Youcanalsousetransformsonadifferentmimetypetheywherebuiltfor,butpayattentionto

optionusageaswellaswhatthetransformationdoestoyourfield.Thereisabasicfilecalled‘global.inc.php’.

Thisfunctioncanbeincludedbyanyothertransformfunctionandprovidessomebasicfunctions.

Thereare5possiblefilenames:

1.Amimetype+subtypetransform:[mimetype]_[subtype][transform].inc.php.Pleasenotethat

mimetypeandsubtypeareseparatedvia‘_’,whichshallnotbecontainedintheirnames.Thetransform

functionfilenamemaycontainonlycharacterswhichcausenoproblemsinthefilesystemaswellasthe

PHPfunctionnamingconvention.Thetransformfunctionwillthebe

calledPMA_transform_[mimetype]_[subtype][transform]()’.

DivisionofcomputerEngineering,SOE 63
HostelMangementSystem

APPENDIX-II
My_SQLFunctions
mysql_field_len—Returnsthelengthofthespecifiedfield

mysql_field_name—Getthenameofthespecifiedfieldinaresult

mysql_field_seek—Setresultpointertoaspecifiedfieldoffset

mysql_field_table—Getnameofthetablethespecifiedfieldisin

mysql_field_type—Getthetypeofthespecifiedfieldinaresult

mysql_free_result—Freeresultmemory mysql_get_client_info—

GetMySQLclientinfo mysql_get_host_info—GetMySQLhostinfo

mysql_get_proto_info—GetMySQLprotocolinfo

mysql_get_server_info—GetMySQLserverinfo mysql_info—

Getinformationaboutthemostrecentquery mysql_insert_id—

GettheIDgeneratedfromthepreviousINSERToperation mysql_list_dbs—

ListdatabasesavailableonaMySQLserver mysql_list_fields—

ListMySQLtablefields mysql_list_processes—ListMySQLprocesses

mysql_list_tables—ListtablesinaMySQLdatabase mysql_num_fields—

Getnumberoffieldsinresult wsmysql_num_rows—

Getnumberofrowsinresult mysql_pconnect—

OpenapersistentconnectiontoaMySQLserver

DivisionofcomputerEngineering,SOE 64
HostelMangementSystem

mysql_fetch_row—Getaresultrowasanenumeratedarray mysql_field_flags—

Gettheflagsassociatedwiththespecifiedfieldinaresult mysql_field_len—

Returnsthelengthofthespecifiedfield mysql_field_name—

Getthenameofthespecifiedfieldinaresult mysql_field_seek—

Setresultpointertoaspecifiedfieldoffset mysql_field_table—

Getnameofthetablethespecifiedfieldisin mysql_field_type—

Getthetypeofthespecifiedfieldinaresult mysql_free_result—

Freeresultmemory mysql_get_client_info—GetMySQLclientinfo

mysql_get_host_info—GetMySQLhostinfo mysql_get_proto_info—

GetMySQLprotocolinfo mysql_get_server_info—GetMySQLserverinfo

mysql_info—Getinformationaboutthemostrecentquery mysql_insert_id—

GettheIDgeneratedfromthepreviousINSERToperation mysql_list_dbs—

ListdatabasesavailableonaMySQLserver mysql_list_fields—

ListMySQLtablefields mysql_list_processes—ListMySQLprocesses

mysql_list_tables—ListtablesinaMySQLdatabase mysql_num_fields—

Getnumberoffieldsinresult

DivisionofcomputerEngineering,SOE 65
HostelMangementSystem

APPENDIX-III
SCREENSHOTS
AdministratorAccount

RegistrationDatabase

DivisionofcomputerEngineering,SOE 66
HostelMangementSystem

UserDatabase

Student

DivisionofcomputerEngineering,SOE 67
HostelMangementSystem

DivisionofcomputerEngineering,SOE 68

You might also like