You are on page 1of 23

A?8CLL S?

S1LM




SYW

$:-2990/-

RA1APRIYAN.K


.Tech (VI Sem.)

IN
lnformaLlon 1echnology

ANNA UNIVLkSI1

11 2011

A?8CLL S?S1LM




SYW

$%#%

Introduct|on

prepares professlonals Lo manage a payroll deparLmenL by lnLroduclng Lhem Lo Lhe
mosL appllcable core managemenL sub[ecLs 8ased on markeL research Lhe course provldes Lhe
managemenL conLenL and Lools requlred Lo be a successful manager such as declslon maklng
and pro[ecL managemenL lL bullds on Lhe foundaLlon of a ayroll Compllance racLlLloners
experlence knowledge and appllcaLlon of leglslaLlve monlLorlng and effecLlve communlcaLlon
of payroll programs and pollcles



Approach

When we were flrsL glven Lhls pro[ecL we meL Lo deLermlne how we were Lo carry ouL Lhe Lask
Asslgned Lo us We drew up a Llmellne dlscussed abouL Lhe programmlng language Lo use Lo
carry ouL Lhe Lask how Lhe Cul would look llke and also Lo make sure LhaL we undersLood whaL
was asslgned Lo us We flnally seLLled for n MSL as our programmlng language We goL
more lnformaLlon on whaL we were Lo do and seL abouL compleLlng our Lask maklng use of Lhe
new ldeas LaughL ln class and especlally splkes


Ach|evement
Cur Lask was Lo develop a payroll sysLem LhaL would keep a record of employee daLa
lncludlng Lhelr penslon plan unlon membershlp sLaLus and Laxes and also Lo be able Lo
calculaLe Lhe pay of Lhe employees Laklng lnLo conslderaLlon employee daLa We have been
able Lo achleve Lhese Lasks 1he sofLware we developed calculaLes Lhe employee neL pay from
Lhe deducLlons 1he pay sllp can be prlnLed ouL as a recelpL MosL of Lhe bugs LhaL we found
and Lhose LhaL Lhe cllenLs and beLa users found have been correcLed

Any new bugs found wlll also be correcLed and Lhe sofLware wlll be updaLed and
released 8ecause we used ob[ecLorlenLed prlnclples modlfylng Lhe sofLware Lo flx bugs
or add a new feaLure has been relaLlvely easy

A?8CLL S?S1LM




SYW


1|t|e User Log|n


rogram

body
form acLlonvalldphp meLhodposL dlv allgncenLer
pnbsp/p
pnbsp/p
pnbsp/p
Lable wldLh300 helghL131 border0 bordercolor#000033 bgcolor#LCL9u8
Lr
Ldspan classsLyle2user name /span/Ld
LdlnpuL nameLxLuser LypeLexL ldLxLuser //Ld
/Lr
Lr
Ldspan classsLyle2assword/span/Ld
LdlnpuL nameLxLpwd Lypepassword ldLxLpwd //Ld
/Lr
Lr
Ld allgnrlghLlnpuL namebuLlogln LypesubmlL ldbuLlogln valueLogln //Ld
LdlnpuL namebuLclr LypereseL ldbuLclr valueClear //Ld
/Lr
/Lable
/dlv
/form
/body

A?8CLL S?S1LM




SYW

1|t|e assword Change


rogram

hLml xmlnshLLp//wwww3org/1999/xhLml
head
meLa hLLpequlvConLenL1ype conLenLLexL/hLml charseLlso88391 /
LlLleunLlLled uocumenL/LlLle
sLyle LypeLexL/css
!
body
backgroundcolor #00CCll


/sLyle/head
body
form ldpwdchange nameassword Change meLhodposL acLlonwdChangevalldphp
dlv allgncenLer
pnbsp/p
pnbsp/p
pnbsp/p
pnbsp/p
pnbsp/p
Lable wldLh303 border0 cellpaddlng10 cellspaclng0
Lr
Lh wldLh174 allgnrlghL scoperowlabel/label
A?8CLL S?S1LM




SYW

nbspCld assword /Lh
Ld wldLh313dlv allgnlefL
lnpuL nameCldwd Lypepassword ldCldwd /
/dlv/Ld
/Lr
Lr
Lh allgnrlghL scoperownew assword /Lh
Lddlv allgnlefL
lnpuL namenewwd Lypepassword ldnewwd /
/dlv/Ld
/Lr
Lr
Lh allgncenLer scoperowConflrm assword /Lh
Lh allgncenLer scoperowdlv allgnlefL
lnpuL nameCfmwd Lypepassword ldCfmwd /
/dlv/Lh
/Lr
Lr
Lh colspan2 allgncenLer scoperowlnpuL namebuLupdaLe LypesubmlL
ldbuLupdaLe value updaLe /
lnpuL namebuLclr LypereseL ldbuLclr value Clear /
lnpuL namebuLcancel LypebuLLon ldbuLcancel value Cancel //Lh
/Lr
/Lable
/dlv
/form
/body
/hLml


















A?8CLL S?S1LM




SYW

1|t|e Department V|ew



rogram

hLml
head
LlLlevlew 8ecords/LlLle
/head
body
?php
/*
vlLWP
ulsplays all daLa from players Lable
*/
// connecL Lo Lhe daLabase
lnclude(connecLdbphp)
// geL resulLs from daLabase
$resulL mysql_query(SLLLC1 * l8CM ay_ueparLmenL order by uepL_Code)
or dle(mysql_error())
// dlsplay daLa ln Lable
//echo pbvlew All/b | a hrefvlewpaglnaLedphp?page1vlew aglnaLed/a/p
echo Lable allgncenLer border1 cellpaddlng10
A?8CLL S?S1LM




SYW

echo LrLhCode/LhLhueparLmenL
name/LhLhSLaLus/LhLhAcLlon/LhLhAcLlon/Lh/Lr
// loop Lhrough resulLs of daLabase query dlsplaylng Lhem ln Lhe Lable
whlle($row mysql_feLch_array( $resulL ))
// echo ouL Lhe conLenLs of each row lnLo a Lable
echo Lr
echo Ld $rowuepL_Code /Ld
echo Ld $rowuepL_name /Ld
echo Ld $rowSLaLus /Ld
echo Lda hrefuepLLdlLphp?ld $rowuepL_Code LdlL/a/Ld
echo Lda hrefuepLuelphp?ld $rowuepL_Code ueleLe/a/Ld
echo /Lr

// close Lable
echo /Lable
?
pa hrefMsLruepLphph3 allgncenLer Add a new record/h3/a/p
/body
/hLml


1|t|e Master Department



A?8CLL S?S1LM




SYW%

rogram

?php
/*
Lul1P
Allows user Lo edlL speclflc enLry ln daLabase
*/
// creaLes Lhe edlL record form
// slnce Lhls form ls used mulLlple Llmes ln Lhls flle l have made lL a funcLlon LhaL ls easlly reusable
funcLlon renderlorm($ld $uepLname $error)

?
!uCC1?L P1ML u8LlC //W3C//u1u P1ML 401//Ln hLLp//wwww3org/18/hLml4/sLrlcLdLd
hLml
head
LlLleLdlL ueparLmenL/LlLle
meLa hLLpequlvConLenL1ype conLenLLexL/hLml charseLlso88391
sLyle LypeLexL/css
!
body
backgroundcolor #00CCll


/sLyle
/head
body
?php
//lf Lhere are any errors dlsplay Lhem
lf ($error ! )

echo dlv sLylepaddlng4px border1px solld red colorred$error/dlv

?
form lduepL nameueparLmenL MasLer meLhodposL
lnpuL Lypehldden nameld value?php echo $ld ?/
dlv allgncenLer
pnbsp/p
pnbsp/p
pnbsp/p
pnbsp/p
pnbsp/p
Lable wldLh303 border0 cellpaddlng10 cellspaclng0
Lr
Lh wldLh174 allgnrlghL scoperowlabel/label
ueparLmenL Code /Lh
Ld wldLh313p?php echo $ld ?/p/Ld
A?8CLL S?S1LM




SYW%

/Lr
Lr
Lh allgnrlghL scoperowueparLmenL name /Lh
Lddlv allgnlefL
lnpuL nameuepLname LypeLexL lduepLname value?php echo $uepLname ? /
/dlv/Ld
/Lr
Lr
Lh colspan2 allgncenLer scoperowlnpuL namebuLsave LypesubmlL ldbuLsave
value Save /
lnpuL namebuLclr LypereseL ldbuLclr value Clear /
label forSubmlL/label
lnpuL namebuLcancel LypebuLLon ldbuLcancel value Cancel oncllckhlsLorygo(1)
reLurn Lrue //Lh
/Lr
/Lable
/dlv
/form
/body
/hLml
?php

// connecL Lo Lhe daLabase
lnclude(connecLdbphp)

// check lf Lhe form has been submlLLed lf lL has process Lhe form and save lL Lo Lhe daLabase
lf (lsseL($_CS1buLsave))

// conflrm LhaL Lhe ld value ls a valld lnLeger before geLLlng Lhe form daLa
lf (ls_numerlc($_CS1ld))

// geL form daLa maklng sure lL ls valld
$ld $_CS1ld
$uepLname mysql_real_escape_sLrlng(hLmlspeclalchars($_CS1uepLname))
//$lasLname mysql_real_escape_sLrlng(hLmlspeclalchars($_CS1lasLname))
// check LhaL flrsLname/lasLname flelds are boLh fllled ln
lf ($uepLname )

// generaLe error message
$error L88C8 lease flll ln all requlred flelds!
//error dlsplay form
renderlorm($ld $uepLname $lasLname $error)

else

// save Lhe daLa Lo Lhe daLabase
A?8CLL S?S1LM




SYW

mysql_query(uuA1L ay_ueparLmenL SL1 uepL_name$uepLname WPL8L
uepL_Code$ld)
or dle(mysql_error())

// once saved redlrecL back Lo Lhe vlew page
header(LocaLlon uepLvlewphp)


else

// lf Lhe ld lsnL valld dlsplay an error
echo Lrror!


else
// lf Lhe form hasnL been submlLLed geL Lhe daLa from Lhe db and dlsplay Lhe form

// geL Lhe ld value from Lhe u8L (lf lL exlsLs) maklng sure LhaL lL ls valld (checlng LhaL lL ls
numerlc/larger Lhan 0)
lf (lsseL($_CL1ld) ls_numerlc($_CL1ld) $_CL1ld 0)

// query db
$ld $_CL1ld
$resulL mysql_query(SLLLC1 * l8CM ay_ueparLmenL WPL8L uepL_Code$ld)
or dle(mysql_error())
$row mysql_feLch_array($resulL)
// check LhaL Lhe ld maLches up wlLh a row ln Lhe daLabse
lf($row)

// geL daLa from db
$uepLname $rowuepL_name
// show form
renderlorm($ld $uepLname )

else
// lf no maLch dlsplay resulL

echo no resulLs!


else
// lf Lhe ld ln Lhe u8L lsnL valld or lf Lhere ls no ld value dlsplay an error

echo Lrror!?


A?8CLL S?S1LM




SYW

1|t|e Des|gnat|on V|ew



rogram

hLml
head
LlLlevlew 8ecords/LlLle
/head
body

?php
/*
vlLWP
ulsplays all daLa from players Lable
*/

// connecL Lo Lhe daLabase
lnclude(connecLdbphp)

// geL resulLs from daLabase
$resulL mysql_query(SLLLC1 * l8CM pay_deslgnaLlon order by uesn_Code)
or dle(mysql_error())

// dlsplay daLa ln Lable
//echo pbvlew All/b | a hrefvlewpaglnaLedphp?page1vlew aglnaLed/a/p
A?8CLL S?S1LM




SYW


echo Lable allgncenLer border1 cellpaddlng10
echo LrLhCode/LhLhuelgnaLlon
name/LhLhSLaLus/LhLhAcLlon/LhLhAcLlon/Lh/Lr

// loop Lhrough resulLs of daLabase query dlsplaylng Lhem ln Lhe Lable
whlle($row mysql_feLch_array( $resulL ))

// echo ouL Lhe conLenLs of each row lnLo a Lable
echo Lr
echo Ld $rowuesn_Code /Ld
echo Ld $rowuesn_name /Ld
echo Ld $rowSLaLus /Ld
echo Lda hrefuesgLdlLphp?ld $rowuesn_Code LdlL/a/Ld
echo Lda hrefuesguelphp?ld $rowuesn_Code ueleLe/a/Ld
echo /Lr


// close Lable
echo /Lable
?
pa hrefMsLruesgnphph3 allgncenLer Add a new record/h3/a/p

/body
/hLml
1|t|e Master Des|gnat|on


A?8CLL S?S1LM




SYW

rogram

hLml xmlnshLLp//wwww3org/1999/xhLml
head
meLa hLLpequlvConLenL1ype conLenLLexL/hLml charseLlso88391 /
LlLleunLlLled uocumenL/LlLle
sLyle LypeLexL/css
!
body
backgroundcolor #00CCll


/sLyle/head

body
form lduesn nameueslgnaLlon MasLer meLhodposL acLlonSaveuesnphp
dlv allgncenLer
pnbsp/p
pnbsp/p
pnbsp/p
pnbsp/p
pnbsp/p
Lable wldLh303 border0 cellpaddlng10 cellspaclng0
Lr
Lh wldLh174 allgnrlghL scoperowlabel/label
ueslgnaLlon Code /Lh
Ld wldLh313dlv allgnlefL
lnpuL nameuesnCode LypePldden lduesnCode
value?php
lnclude(connecLdbphp)
$resulL mysql_query(SLLLC1 Max(uesn_Code)+1 as
uesnCode l8CM pay_deslgnaLlon)
whlle($row mysql_feLch_array($resulL))

echo $rowuesnCode

? /
p?php
lnclude(connecLdbphp)
$resulL mysql_query(SLLLC1 Max(uesn_Code)+1 as
uesnCode l8CM pay_deslgnaLlon)
whlle($row mysql_feLch_array($resulL))

echo $rowuesnCode

?/p
A?8CLL S?S1LM




SYW


/dlv/Ld
/Lr
Lr
Lh allgnrlghL scoperowueslgnaLlon name /Lh
Lddlv allgnlefL
lnpuL nameuesnname LypeLexL lduesnname /
/dlv/Ld
/Lr
Lr
Lh colspan2 allgncenLer scoperowlnpuL namebuLsave LypesubmlL ldbuLsave
value Save /
lnpuL namebuLclr LypereseL ldbuLclr value Clear /
label forSubmlL/label
lnpuL namebuLcancel LypebuLLon ldbuLcancel value Cancel oncllckhlsLorygo(
1) reLurn Lrue //Lh
/Lr
/Lable
/dlv
/form
/body
/hLml
























A?8CLL S?S1LM




SYW

1|t|e Lmp|oyee Master V|ew


rogram

!uCC1?L P1ML u8LlC //W3C//u1u P1ML 401//Ln hLLp//wwww3org/18/hLml4/sLrlcLdLd
hLml
head
LlLlevlew 8ecords/LlLle
/head
body

?php
/*
vlLWP
ulsplays all daLa from players Lable
*/

// connecL Lo Lhe daLabase
lnclude(connecLdbphp)

// geL resulLs from daLabase
A?8CLL S?S1LM




SYW

$resulL mysql_query(SLLLC1 Lmp_CodeLmp_nameuC8dm
?uepL_Codeuesn_CodeSalarySLaLus l8CM pay_emp_masLer order by Lmp_Code)
or dle(mysql_error())

// dlsplay daLa ln Lable
//echo pbvlew All/b | a hrefvlewpaglnaLedphp?page1vlew aglnaLed/a/p

echo Lable allgncenLer border1 cellpaddlng10
echo LrLhLmp Code/LhLh Lmployee name/LhLhuC8/LhLhuepL
Code/LhLhuesg Code/LhLhSalary/LhLhSLaLus/LhLhAcLlon/LhLhAcLlon/Lh/Lr

// loop Lhrough resulLs of daLabase query dlsplaylng Lhem ln Lhe Lable
whlle($row mysql_feLch_array( $resulL ))

// echo ouL Lhe conLenLs of each row lnLo a Lable
echo Lr
echo Ld $rowLmp_Code /Ld
echo Ld $rowLmp_name /Ld
echo Ld $rowuC8 /Ld
echo Ld $rowuepL_Code /Ld
echo Ld $rowuesn_Code /Ld
echo Ld $rowSalary /Ld
echo Ld $rowSLaLus /Ld
echo Lda hrefLmpLdlLphp?ld $rowLmp_Code LdlL/a/Ld
echo /Lr


// close Lable
echo /Lable
?
pa hrefLmp_MasLerphph3 allgncenLer Add a new record/h3/a/p

/body
/hLml












A?8CLL S?S1LM




SYW

1|t|e Master Lmp|oyee


rogram

hLmlsLyle LypeLexL/css
!
body
backgroundcolor #00CCll


/sLyle
body

form nameLmp_MasLer meLhodposL acLlonSavephp
dlv allgncenLer
plabelnew/labelnbsp/p
Lable wldLh303 border1 cellpaddlng3 cellspaclng0 bgcolor#LCL9u8
Lr
Lh wldLh174 allgnrlghL scoperowlabel/label
nbspLmployee Code /Lh
Ld wldLh313dlv allgnlefL
lnpuL nameempCode LypeLexL ldempCode
/dlv/Ld
/Lr
A?8CLL S?S1LM




SYW%

Lr
Lh allgnrlghL scoperowLmployee name /Lh
Lddlv allgnlefL
lnpuL nameempname LypeLexL ldempname
/dlv/Ld
/Lr
Lr
Lh allgnrlghL scoperowuaLe of 8lrLh /Lh
Lddlv allgnlefLuay
selecL namedobday lddobday
?php
echo opLlon selecLed$uay/opLlon
for ($l1 $l31 $l++)

echo opLlon $l /opLlon

?
/selecL
MonLh
selecL namedobmon lddobmon onChange
opLlon selecLed01/opLlon
?php
echo opLlon selecLed$MonLh/opLlon
for ($l2 $l12 $l++)

echo opLlon $l /opLlon

?
/selecL

?ear
lnpuL namedobyear LypeLexL lddobyear slze10 maxlengLh4
/dlv/Ld
/Lr
Lr
Lh allgnrlghL scoperowueparLmenL/Lh
Lddlv allgnlefL
label forselecL/label
selecL nameseluepL ldseluepL
?php
$con mysql_connecL(localhosLrooL)
lf (!$con)

dle(Could noL connecL mysql_error())


A?8CLL S?S1LM




SYW%

mysql_selecL_db(ra[a $con)

$resulL mysql_query(SLLLC1 uepL_CodeuepL_name l8CM
ay_ueparLmenL Where SLaLus1)
whlle($row mysql_feLch_array($resulL))

echo opLlon value $rowuepL_Code $rowuepL_name
/opLlon


mysql_close($con)

?
/selecL
/dlv/Ld
/Lr
Lr
Lh allgnrlghL scoperowueslgnaLlon/Lh
Lddlv allgnlefL
label forselecL/label
selecL nameseluesn ldseluesn
?php
$con mysql_connecL(localhosLrooL)
lf (!$con)

dle(Could noL connecL mysql_error())


mysql_selecL_db(ra[a $con)

$resulL mysql_query(SLLLC1 uesn_Codeuesn_name l8CM
pay_deslgnaLlon Where SLaLus1)
whlle($row mysql_feLch_array($resulL))

echo opLlon value $rowuesn_Code $rowuesn_name
/opLlon


mysql_close($con)

?
/selecL
/dlv/Ld
/Lr
Lr
Lh allgnrlghL scoperow8aslc Salary /Lh
A?8CLL S?S1LM




SYW

Ld
dlv allgnlefL
lnpuL namesalary LypeLexL ldsalary
/dlv/Ld
/Lr
Lr
Lh allgnrlghL scoperowWorklng SLaLus /Lh
Lddlv allgnlefL
selecL namewsLaLus ldwsLaLus
opLlon selecLedWC8klnC/opLlon
opLlon8LSlCnLu/opLlon
/selecL
/dlv/Ld
/Lr
Lr
Lh colspan2 allgncenLer scoperowlnpuL namebuLsave LypesubmlL ldbuLsave
value Save
lnpuL namebuLclr LypereseL ldbuLclr value Clear
lnpuL namebuLcancel LypebuLLon ldbuLcancel valueCancel/Lh
/Lr
/Lable
/dlv
/form
h1nbsp/h1

/body
/hLml



















A?8CLL S?S1LM




SYW

1|t|e 1ransact|on




rogram

!uCC1?L hLml u8LlC //W3C//u1u xP1ML 10 1ranslLlonal//Ln
hLLp//wwww3org/18/xhLml1/u1u/xhLml1LranslLlonaldLd
hLml xmlnshLLp//wwww3org/1999/xhLml
head
meLa hLLpequlvConLenL1ype conLenLLexL/hLml charseLlso88391 /
LlLleunLlLled uocumenL/LlLle
sLyle LypeLexL/css
!
body
backgroundcolor #00CCll


/sLyle/head

body
/body
/hLml
A?8CLL S?S1LM




SYW





1|t|e Attendence



rogram

!uCC1?L P1ML u8LlC //W3C//u1u P1ML 401//Ln hLLp//wwww3org/18/hLml4/sLrlcLdLd
hLml
head
LlLlevlew 8ecords/LlLle
/head
body

?php
/*
vlLWP
ulsplays all daLa from players Lable
*/

// connecL Lo Lhe daLabase
lnclude(connecLdbphp)

// geL resulLs from daLabase
A?8CLL S?S1LM




SYW

$resulL mysql_query(SelecL Lmp_CodeLmp_nameuA1L_lC8MA1(SysuaLe()dm?) as
ALL_uaLe from ay_Lmp_MasLer Crder by Lmp_Code)
or dle(mysql_error())

// dlsplay daLa ln Lable
//echo pbvlew All/b | a hrefvlewpaglnaLedphp?page1vlew aglnaLed/a/p

echo Lable allgncenLer border1 cellpaddlng10
echo LrLhLmp Code/LhLhLmp name/LhLhuaLe/LhLhln1lme/LhLhCuL
1lme/LhLhAbsence/LhLhAcLlon/Lh/Lr

// loop Lhrough resulLs of daLabase query dlsplaylng Lhem ln Lhe Lable
whlle($row mysql_feLch_array( $resulL ))

// echo ouL Lhe conLenLs of each row lnLo a Lable
echo Lr
echo Ld allgncenLer $rowLmp_Code /Ld
echo Ld allgncenLer $rowLmp_name /Ld
echo Ld allgncenLer $rowALL_uaLe /Ld
echo Ld allgncenLerlnpuL LypeLexL namelnLlme slze6
maxlengLh3 //Ld
echo Ld allgncenLerlnpuL LypeLexL nameCuLLlme slze6
maxlengLh3 //Ld
echo Ld allgncenLerlnpuL Lypecheckbox namechkAbs
valuecheckbox //Ld
echo Lda hrefuepLLdlLphp?ld $rowLmp_Code updaLe/a/Ld

echo /Lr


// close Lable
echo /Lable
?

/body
/hLml

You might also like