omis 107 nfc project report

Upload: brian-grossman

Post on 01-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Omis 107 Nfc Project Report

    1/29

  • 8/9/2019 Omis 107 Nfc Project Report

    2/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page ')'*

    Table o% 'ontents

    Executive Summary

    Business Problem and Background

    Problem

    OpportunitySolution

    o! it "orks

    Our Competition

    Business Case

    Tec#nical $iscussion

    So%t!are &ntegrated

    "indo!s NFC app

    PP

    T'()CSS

    S*("eb+based server 

    o! &t "orks

    $atabase Sc#ema $escription

    Future $evelopments

    ,e%erence Citations

    Appendices

    -oToTags + "indo!s NFC App

    Attendance. &nstructor. and Student tables /myS*(0

    Source Code1 index2p#p

    myS*( $atabase $ump

    Attend3452com + Access &n%ormation

  • 8/9/2019 Omis 107 Nfc Project Report

    3/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page +)'*

    I( )*ec+tie S+mmary

    Present6 is a %res# take on t#e !orld o% attendance tracking2 Our company is dedicated to makingattendance tracking better. muc# better. because as experienced college students. !e understand

    t#e value o% attendance %or students and teac#ers alike2 Currently. !e are comprised o% sixupperclassmen attending Santa Clara 7niversity2 $uring our years at sc#ool. !e #ave takenmany classes !it# many di%%erent types o% attendance tracking. giving us tremendous experience  o% !#at !orks and !#at doesn8t2 T#e 9uestion no! is !#y. and !#y no!: "e ans!er t#at9uestion !it# anot#er one1 "#y #asn8t our sc#ool adopted a pro%essional. e%%icient. and easy+to+use attendance system: "e pride ourselves on being leading edge on all ne! tec#nologies #ere int#e Silicon ;alley. yet !e are still leaving it up to t#e pro%essors at t#is sc#ool to %igure out t#eiro!n !ay to track attendance2 T#ere needs to be a better option %or t#ese pro%essors. one t#ataligns itsel% !it# t#e #ig#+tec# identity o% t#e Silicon ;alley2 T#at is t#e need !e strive to address#ere at Present6. and !e are ecstatic to present our solution to t#e !orld2

    II( B+siness Problem and Bac-gro+nd

    .( Problem

    Anyone #oping to track audience attendance #as %aced t#e same #eadac#e %or years2 From

    teac#ers to business pro%essionals. t#is essential metric #as been marred by cra%ty students and

    employees alike !#o relis# in circumventing t#e system2 Pro%essors in particular lack a standard.

    reliable !ay o% veri%ying student attendance2 &n t#e past. t#ey #ave relied on roll call. sign+ins or

    daily 9ui

  • 8/9/2019 Omis 107 Nfc Project Report

    4/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page ()'*

    B( O//ort+nity

    “Students need to understand that a college classroom is not like a film screening, a

     sunset, or a meteor shower, all of which will proceed in exactly the same way, whether

    they are present or not. In my class they are an integral part of the action, valued

     participants who ask questions, contribute to discussions, and critically affect the

    learning of others as well as their own. Even a lecturer is affected by her audience,

    responding if she is skillful to smiles and looks of confusion, level of attention, and pace

    or absence! of note"taking. #uestions often stimulate further questioning.$

    /excerpted %rom #ttp1))!!!2nea2org)#ome)>3?@2#tm0

    According to Nance a#n. a pro%essor %rom Syracuse. attendance is integral to t#e pro%essor and

    student alike and it !ould seem pro%essors t#at track attendance most de%initely agree2 T#e actual

     process o% tracking !#o s#o!s up. is not 9uite as simple as it seems. #o!ever2 Every pro%essor

    #as a di%%erent system to collect t#is in%ormation. and every university #as a di%%erent attendance

     policy2 At bot# o% t#ese levels. attendance systems /roll call. sign+ins. ect0. can be largely

    inaccurate. an issue t#at de%eat t#e purpose o% gat#ering attendance in t#e %irst place2 Some

    universities. like Emerson 7niversity. #ave an institutional policy o% dropping an entire letter

    grade i% a student misses more t#an t!o sessions. per class. per semester2 &t is very clear #o!

    t#ese non+standard and inaccurate attendance systems could #ave massive rami%ications %or

    students2

    '( Sol+tion

    To recti%y t#is issue. at an individual and institutional level. an attendance system must bescalable. simple and inexpensive2 Present6 an elegant solution t#at meets all t#ese 9uali%ications2

    T#e sticker #olds a student8s uni9ue identi%ier are extremely inexpensive and can easily be

     programmed and distributed by t#e pro%essor or t#e university on t#e %irst day o% class2 ,eplacing

    lost tags is ust as easy and inexpensive2 Additionally. Present6 &s very user %riendly %or t#e

    student and pro%essor2 Setup is easy and 9uick. pro%essors !ill no longer need to prepare and

     print attendance slips. create sign+ins or spend class time calling roll2 Students need only to

    remember t#eir sticker. !#ic#. !#en attac#ed to a student &$. !ill not inter%ere !it# t#e

    %unctionality o% t#e &$2 Furt#er more. eco+%riendliness #as been an initiative across t#e board %or

    many organi

  • 8/9/2019 Omis 107 Nfc Project Report

    5/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page )'*

    Present6 is a %ully integrated tracking system t#at relies on NFC tec#nology to accurately

    collect and aggregate attendance2 ere8s #o! it !orks1 students !ill be given an NFC

    sticker /or tag0. eac# containing a uni9ue identi%ier2 Be%ore class. t#e pro%essor !ill be

    re9uired to plug in an NFC reader into any computer8s 7SB2 7pon entering class.

    students !ill tap t#eir NFC tags on t#e reader2 Once t#e cursor is active students can tap

    in and t#eir presence is documented2 A%ter t#e attendance session is complete. t#e

     pro%essor clicks submit and t#e !eb server trans%ers t#e data into an online database2 T#e

    reader !ill send t#e student8s uni9ue in%ormation to a !eb+based server. !#ic# !ill

    aggregate and produce t#e appropriate metrics in any time %rame o% t#e pro%essor8s

    c#oosing2 Present6 is simple. time+e%%icient and cost+e%%ective2 

    &( O+r 'om/etition

    Aside %rom !asting valuable class time. t#e

    %ollo!ing traditional roll call systems elicit by

    nature a multitude o% problems1

    Sign+in s#eets and 9uestionnaires #ave a #ig#

    tendency %or %raud as t!o or more %orms can

    easily be submitted by one student2 Attendance

    9uestionnaires like t#e ones used by Pro%essor 

    Brian 'oon in Systems Programming. t#oug#

    use%ul. re9uire class time to be aside %or a process

    t#at #as t#e potential to be automated2

    $aily 9ui

  • 8/9/2019 Omis 107 Nfc Project Report

    6/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page -)'*

    Present6 is an extremely inexpensive. eco+%riendly. extremely scalable. and easy to use alternative

    to properly keeping track o% attendance2 Present6 is de%initely a cost e%%icient alternative to

    keeping track o% attendance because t#e implementation only cost a total o% D@22 T#e only t!o

    in#erent costs are buying t#e NFC c#ips)reader and #osting a !eb server2 Present6 is de%initely an

    eco+%riendly option to keeping track o% attendance because it is paperless= everyt#ing is done on

    t#e computer. !#ic# means no paper is beings used at all or being !asted2 T#is paperless system

    not only saves trees. it eviscerates printing costs2 Present6 is an extremely scalable attendance

    solution because any industry or business today re9uires some sort o% system to properly keep

    track o% attendance or !#o !as t#ere on a certain day2 Present6 is setup in a !ay !#ere someone

    !#o does not come %rom a tec#nical background can easily pick up t#e NFC c#ips)reader and

    naviagate to !!!2attend3452com and start using t#e system2 T#e sticker t#at #olds a student8s

    uni9ue identi%ier are extremely inexpensive and can easily programmed and distributed by t#e

     pro%essor or t#e university on t#e %irst day o% class or on t#e %irst day o% sc#ool2 ,eplacing lost

    tags is ust as easy and inexpensive2 Additionally. Present6 &s very user %riendly %or t#e student

    and pro%essor2 Setup is easy and 9uick. pro%essors !ill no longer need to prepare and printattendance slips. create sign+ins or spend class time calling roll2 Students need only to remember

    t#eir sticker. !#ic#. !#en attac#ed to a student &$. !ill not inter%ere !it# t#e %unctionality o% t#e

    &$2

    "e plan to implement our Present6 NFC attendance tracking system into sc#ools. business. or

    clubs= really any!#ere !#ere attendance is an integral part to t#e experience at #and2 Our plan to

    moneti>20 and!eb server /3?02 A suggested retail cost o% 2 !ould result in a > marginal pro%it2

    III( Technical &isc+ssion

    .( ardare2 3"' 4eader

    Early on in t#e design p#ase. our group determined an NFC attendance system !ould be very

    use%ul. but 9uestions remained on t#e %iner details2 "e discussed exploiting t#e NFC capability

     built in to modern smartp#ones /since t#e availability o% t#e tec#nology is sure to expand02 T#e

    idea !as to #ave a single NFC card in t#e classroom !#ic# could be read by a smartp#one2 T#e

    smartp#one !ould transmit a student number. date. and class &$ to a server2 o!ever. !e axed

    t#at idea as too potentially error prone /dead p#ones being t#e most basic o% examples02 "it#out

    %urt#er t#oug#t. one #otkey later !e !ere skimming Ama>22

    "e 9uickly pulled t#e trigger a%ter looking into t#e so%t!are included !it# purc#ase2 T#e NFC

    http://www.attend107.com/http://www.attend107.com/

  • 8/9/2019 Omis 107 Nfc Project Report

    7/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page &)'*

    reader ended up being consistently reliable2 Plus. it8s small. durable. convenient. and

    inexpensive2 T#e -oToTags reader !as t#e per%ect #ard!are component %or us. and t#e tags

    !orked %la!lessly2

    .( So%tare Integrated

    a( Windos 3"' a//

    ard!are is useless !#en it doesn8t #ave t#e ability to communicate2 One o% t#e boons !it# our

    system !as t#at !e !ere able to devote resources to more crucial components because t#e

    -oToTags group provides %ree so%t!are to use !it# t#eir NFC readers2 T#e so%t!are !orked

    really !ell. and !e only needed to make a %e! modi%ications2 "e disabled Gauto per%orm %irst

    record actionG under t#e Tags menu2 7nder &ntegration. !e modi%ied t#e settings to autopaste t#e

    records text2 "e also #ad it automatically append a press o% t#e enter key a%ter!ards2 Once

    modi%ied. t#e so%t!are !ill automatically paste a student name. student number. and #it enter

    every time a ne! tag is touc#ed to t#e reader2 T#is app runs in t#e system tray silently and

    !it#out using many system resources2 &t8s per%ect %or our application2

    b( PP

    T#e bulk o% t#e inner !orkings o% t#e proect is PP2 &t8s t#e language t#at !e used to connect to

    our myS*( database2 PP supports t#e integration o% user account systems2H &t provides t#e

    ability %or data input on Attend3452com. !#ic# is saved into arrays %rom !#ic# myS*( can

    extract data2 &t8s able to properly insert student names and t#eir numbers into t#eir respective

    tables along !it# t#e day8s date2 Finally. it calculates and displays attendance and absenteeism2For t#e date picker on t#e site. !e !ere able to source some simple code t#at !as per%ect %or t#e

     ob2

    H"#en pass!ords are stored. t#ey are #as#ed using t#e '$D algorit#m be%ore t#ey are stored2

    Storing pass!ords in plain text is a maor security %la!. so !e avoided it %rom t#e beginning2

    c( TML5'SS

    &t !ould be #ard to make a !ebsite !it#out using a bit o% T'()CSS2 T'()CSS !ere simply

    used to display titles and #eaders and %ormat t#e !ebsite2 T#ey didn8t play an integral part in t#e

    inner !orkings. ust t#e %aIade2 Particularly. t#e user account creation system and login page

    relied on t#e language and style s#eets2

    d( S6L

  • 8/9/2019 Omis 107 Nfc Project Report

    8/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page .)'*

    myS*( is t#e end destination %or t#e data input using PP2 &t takes t#e student and attendance

    data stored in arrays and associates various tables !it# eac# ot#er to eliminate t#e in%easibility o% 

    needing to keep redundant data %or eac# ne! association2 "e used a %e! di%%erent tables to matc#

    instructors. t#eir students. and t#eir students8 attendance2 &t stores accounts and #as#ed

     pass!ords2 myS*( is smart and is able to matc# one student record !it# multiple days o%

    attendance or !it# multiple instructors2 T#is ensures !e are &-(J scalable2

    e( Web!based serer

    i2 3and3

    T#oug# !e started using Apac#e)myS*( /%acilitated by KA'PP0. !e decided it !ould be a bit

    more o% a realistic demo i% !e !ere to purc#ase access to a premium server2 3and32com. !#ile

    not t#e best rated servers on t#e planet. !as very a%%ordable and per%ect %or our proo% o% concept2

    "e gave up some perks like root access compared to our abilities !it# KA'PP. but t#e cloud+

     based nature !as a big enoug# perk to make up %or it2 (ogin in%ormation is included %or your

    testing++see %inal page2

    B( o It Wor-s

    T#is is #o! !e connected to t#e database2 Be%ore t#is code !e set variables %or username.

     pass!ord. database. and #ostname2 7sing t#ose parameters !e !ere able to connect our code to

    our database on t#e !eb+based server2

  • 8/9/2019 Omis 107 Nfc Project Report

    9/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page *)'*

    T#is is our main section %or t#e login %eature2 7pon a login re9uest. t#e system !ill pull t#e

    username and pass!ord %rom t#e myS*( database2 T#e pass!ord t#at is re9uested is re9uestedusing '$D #as#ing2 &% t#e username and pass!ord are correct. t#e session is aut#ori

  • 8/9/2019 Omis 107 Nfc Project Report

    10/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page $%)'*

    Once t#e user #its submit. t#e data is inputted into t#e database using an insert statement only i%

    t#e %irst 9uery comes back !it#out a record o% t#e input2

    T#is is t#e PP be#ind t#e datepicker2 T#e user is able to select a start and end date to run a

    9uery against2 T#e script modi%ies t#e 9ueries based upon t#e user input2

  • 8/9/2019 Omis 107 Nfc Project Report

    11/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page $$)'*

    T#is is t#e main %unction be#ind our script2 T#is code determines !#ic# students !ere present

    and !#ic# ones !ere absent2 7pon %ind t#e absent students. it !ill print t#e students name under 

    t#e date in !#ic# t#ey !ere absent2 &% no students !ere absent on any given day. t#e script

    s#o!s t#at no students !ere missing

    Since !e already %igured out #o! to s#o! absent students. !e decided to implement a

     percentage system2 T#is section o% t#e code takes t#e number o% attendances and divides it

    against t#e total number o% days2 &t t#en displays t#e percentages to t#e user2

  • 8/9/2019 Omis 107 Nfc Project Report

    12/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page $')'*

    T#is is signup code %or Attend3452com2 T#is is setting up t#e %ields %or t#e user to input2 Oncet#e user %ills in t#e %ields. a re9uest %or signup is processed by p#p re9uest statements2 T#e PP

    on t#e backend o% t#is %orm t#en inserts t#e in%ormation into t#e database2

    T#e code above is t#e T'( %or t#e date picker2 &t provides t#e user !it# calendar %ields toselect t#e start date and end date o% t#eir c#oice2

    T#is is t#e T'( %or t#e input %ield2 &t allo!s t#e user to input t#e data %rom t#e NFC tags into

    t#e input %ield2 T#en t#e user #its submit and t#e PP inserts t#e data into t#e myS*( database2

    '( &atabase Schema &escri/tion

    As noted. t#e current iteration o% t#e system uses t#ree tables1 student. attendance. and instructor2

    A single student can be associated !it# many attendance records2 An instructor is able to

  • 8/9/2019 Omis 107 Nfc Project Report

    13/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page $+)'*

    associate !it# many di%%erent attendance records2 T#us. many students can #ave di%%erent or t#e

    same classes !it# di%%erent or t#e same pro%essors2

    See t#e more complex sc#ema to see our vision %or adding tables to %acilitate multiple classes2

    I7( "+t+re &eelo/ments

    T#e %uture #olds many opportunities %or Present6 T#ere is a potential market in all industries t#at

    re9uire a tracking system %or attendance2 ,ig#t no!. !e8re poised to expand across #ig#er

    education !it# %e! additional modi%ications /namely. t#e class table02 &t !ould be trivial to add

    CAPTCA and email veri%ication. and an export %eature %or systems like Camino2 Be%ore !e are

    capable o% expanding into a business environment. our current system !ill #ave to undergo somemodi%ications2 "e !ill #ave to develop bot# a c#eck in and c#eck out %eature t#at tracks not only

    date but also time2 &nstead o% absenteeism. !e !ould #ave to adapt our code to s#o! #ours per

    day or !eek depending on t#e manager8s c#oice2 (ooking %urt#er into t#e %uture. !e are

     planning to introduce our o!n application t#at !e !ill be able to market to consumers2 "e

     believe t#at a %ully packaged system !ill #ave more appeal to businesses2

    "it# our packaged system. !e intend to roll out ne! %eatures2 "e are developing a simple. clean

    grap#ical user inter%ace t#at !ill allo! any user to learn #o! to use our so%t!are 9uickly2 "e

     believe t#at an intuitive -7& is essential to adding value to our product2 &n addition. !e plan to

    allo! t#e admin user. !#et#er instructor or manager. to export t#e data into an excel %ile so t#at

    t#ey can manage t#e data2 "e also #ave to increase our current admin %unctionality2 Taking our

    current system. teac#ers !ill need to be able to monitor multiple classes2

  • 8/9/2019 Omis 107 Nfc Project Report

    14/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page $()'*

     

    To correct t#is. !e #ave to add a class table2 T#e instructor table !ill t#en be linked to t#e class

    table and an associative table !ill be used to %orm a connection bet!een student and t#eir

    classes2 Once !e #ave t#e structure. !e can give t#e option to t#e instructor to s!itc# bet!een

    classes and vie! t#e attendance data separately2 T#e last %eature !e are !orking to develop isadditional tracking %eatures2 T#is is our long term goal2 "e !ant to allo! our NFC tec#nology

    to allo! t#e user to set !#at t#ey !ant to track and !#at in%ormation t#ey !ant tracked2 "e

    intend to give t#is %unctionality t#roug# our app2 T#e user !ill be able to program our tags

    giving t#em t#e %reedom to c#oose t#eir %unctionality2

  • 8/9/2019 Omis 107 Nfc Project Report

    15/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page $)'*

    T#e goal is to make our application compatible !it# local servers2 Security is also a concern2

    Our code implements t#e '$D #as#ing command2 T#is command is easily susceptible to brute

    %orce2 Almost any targeted attack can reverse t#e algorit#m2 &n order to keep our in%ormation

    secure. !e !ill #ave to upgrade our security to at least a SA+? #as#ing algorit#m2 T#is #as#ing

    met#od doubles our output si

  • 8/9/2019 Omis 107 Nfc Project Report

    16/29

  • 8/9/2019 Omis 107 Nfc Project Report

    17/29

  • 8/9/2019 Omis 107 Nfc Project Report

    18/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page $.)'*

    margin+le%t1auto=margin+rig#t1auto= padding1?4px= border+radius134px= border+style1solid=

     border+color1Qccc= border+!idt#13px=

    Rlabel

    display1inline+block=!idt#1?44px=

    R2ro!

    margin134px=R

     body %ont+%amily1Arial=color1Q= background+color1Qeee=

    R2input+data

    !idt#1D44px=#eig#t1?44px=

    R)styleM

    scriptM))date picker ))sourced %rom1 #ttp1))9ueryui2com)datepicker)/%unction/0

    /G2datepickerG02datepicker/0=R0=)scriptM

    )#eadM

    bodyMdiv classGcontainerGM

    #3 classGmaintitleGMAttend 345 Proect)#3M:p#p)) First. !e set variables associated !it# a speci%ic database on a remote server2

    #ostLname GdbDD>D?452db23and32comG=database GdbDD>D?45G=userLname GdboDD>D?45G=pass!ord Gm44nsover345G=

  • 8/9/2019 Omis 107 Nfc Project Report

    19/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page $*)'*

     )) 7sing our variables. !e connect to t#at database2connect mys9liLconnect/#ostLname. userLname. pass!ord. database0=

     )) S#ould t#ere be a %ailure /like s#ould t#e server be do!n0. !ell see an error message2 

    i% /mys9liLconnectLerrno/00

    ec#o GFailed to connect to 'yS*(1 G 2 mys9liLconnectLerror/0=R

    db ne! mys9li/dbDD>D?452db23and32com. dboDD>D?45. m44nsover345.dbDD>D?450=

    i%/db+MconnectLerrno M 40 die/unable to connect0=

    R

    ))logout re9uesti%/isset/L,E*7ESTlogoutU00

    unset/LSESS&ONusernameU0=unset/LSESS&ONaut#edU0=sessionLunset/0=sessionLdestroy/0=

    R else i%/isset/L,E*7ESTsignupLsubmitU00 ))signup re9uestusername L,E*7ESTusernameU=i%/L,E*7ESTpass!ordU6L,E*7ESTpass!ordLcon%irmU0 ))error

    c#eck %or pass input

    signupLerror Gpass!ords not t#e sameG=R else pass!ord L,E*7ESTpass!ordU=

    9 GSE(ECT H F,O' instructor "E,E usernameG2username2G=G=

    res db+M9uery/90=

    ))case user already existsi%/res+MnumLro!sM40

    signupLerror G7ser already existsG=R else

      ))i% user does not exist. insert user and pass into database using '$D pass!ord #as#ing

    9 G&NSE,T &NTO instructor /username. pass!ord0 ;A(7ES/G2username2G. G2mdD/pass!ord02G0=G=

    res db+M9uery/90=

    ))c#eck i% user and pass !ere created success%ully

  • 8/9/2019 Omis 107 Nfc Project Report

    20/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page '%)'*

    i%/res0 9 GSE(ECT H F,O' instructor "E,E

    usernameG2username2G AN$ pass!ordG2mdD/pass!ord02G=G=res db+M9uery/90=

    i%/res0 ro! mys9liL%etc#Lassoc/res0=LSESS&ONusernameU ro!usernameU=LSESS&ONaut#edU ro!instructorLidU=

    RR else

    signupLerror GErrorG=R

    RR

    R else i%/isset/L,E*7ESTloginLsubmitU00 ))login re9uest

    username L,E*7ESTusernameU=pass!ord L,E*7ESTpass!ordU=

    ))get pass!ord %rom database using '$D pass!ord #as#ing9 GSE(ECT H F,O' instructor "E,E usernameG2username2G AN$

     pass!ordG2mdD/pass!ord02G=G=res db+M9uery/90=

    ))c#eck to see i% inputted pass!ord is correcti%/res+MnumLro!s M 40

    ro! mys9liL%etc#Lassoc/res0=

    LSESS&ONusernameU ro!usernameU=LSESS&ONaut#edU ro!instructorLidU=R else

    signupLerror G7sername)pass!ord combo incorrectG=R

    Ri%/isset/LSESS&ONaut#edU0 VV LSESS&ONaut#edU true0

    i%/isset/LSESS&ONusernameU00 ec#o G"elcome back. G2LSESS&ONusernameU2G6br)Mbr)MG=

    )) Collaborative Partner1 $ane &racleousi%/isset/L,E*7ESTdataU00 ec#o G#3M&mporting data222)#3MG=content L,E*7ESTdataU=tempLa explode/GWrWnG. content0=

    a tempLa=

  • 8/9/2019 Omis 107 Nfc Project Report

    21/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page '$)'*

    d date/GJ+m+dG0=

    i 4=%a array/0=!#ile/iX3 si

  • 8/9/2019 Omis 107 Nfc Project Report

    22/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page '')'*

    %res db+M9uery/90=Ri%/6%res0

    error true=ec#o G222%ailed6G=

    R else ec#o G222success6G=

    Rec#o G)divMG=

    R

    ec#o Gbr)Mbr)M222done6br)Mbr)MG=R

    :M%orm actionG:p#p ec#o LSE,;E,PPLSE(FU= :MG met#odGpostGM

    #?MPaste cursor in input %ield be%ore scanning)#?Mtextarea nameGdataG classGinput+dataGM)textareaMbr)Minput typeGsubmitG nameGsubmitG )M

    )%ormM

    :p#p))date picker ))sourced %rom1 #ttp1))9ueryui2com)datepicker)))allo!s instructor to modi%y date range t#ey !ant to c#eck %or attendance

    i%/isset/L,E*7ESTstartU00

    L,E*7ESTstartU date/GJ+m+dG. strtotime/L,E*7ESTstartU00=Ri%/isset/L,E*7ESTendU00

    L,E*7ESTendU date/GJ+m+dG. strtotime/L,E*7ESTendU00=Rmodi%yLa array/0=modi%yLaU G"E,E instructorLidG2LSESS&ONaut#edU2GG=i%/isset/L,E*7ESTstartU00

    modi%yLaU Ga2date M G2L,E*7ESTstartU2GG=modi%yLstart L,E*7ESTstartU=

    R else

    modi%yLstart GG=Ri%/isset/L,E*7ESTendU00

    modi%yLaU Ga2date G2L,E*7ESTendU2GG=modi%yLend L,E*7ESTendU=

    R else modi%yLend GG=

    R

  • 8/9/2019 Omis 107 Nfc Project Report

    23/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page '+)'*

    i%/si4

    days array/0=studentLt array/0=!#ile/ro! res+M%etc#Lassoc/00

    i%/6isset/daysro!dateUU00 daysro!dateUU array/0=

    Ri%/6isset/studentLtro!nameUU00 studentLtro!nameUU 4=

    Rtemp array/0=tempstudentLidU ro!studentLidU=tempattendanceLidU ro!attendanceLidU=tempcodeU ro!codeU=

  • 8/9/2019 Omis 107 Nfc Project Report

    24/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page '()'*

    tempnameU ro!nameU=daysro!dateUUU temp=studentLtro!nameUUXX=

    R))screens#ot /display o% absent students on !ebsite0

    i%/si

  • 8/9/2019 Omis 107 Nfc Project Report

    25/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page ')'*

    %oreac#/studentLt as k M v0 ec#o GbMG2k2G)bM1 G2/v ) #ig#est H 34402GZ attendance /G2/#ig#est

    + v02G times absent0br)MG=R

    R

    :Mbr)Mbr)Mbr)Ma #re%G:p#p ec#o LSE,;E,PPLSE(FU= :M:logout3GM(og Out)aM:p#p

    R else i%/isset/L,E*7ESTsignupU00 :M%orm actionG:p#p ec#o LSE,;E,PPLSE(FU= :M:signup3G met#odGpostGM:p#p

    i%/isset/signupLerror00 ec#o signupLerror2Gbr)Mbr)MG=

    R:M%ieldsetMlegendM&nstructor Signup)legendMdiv classGro!GM

    labelM7sername)labelM input typeGtextG nameGusernameG )M)divMdiv classGro!GM

    labelMPass!ord)labelM input typeGpass!ordG nameGpass!ordG )M)divMdiv classGro!GM

    labelM,e+enter pass!ord)labelM input typeGpass!ordG nameGpass!ordLcon%irmG

    )M)divMdiv classGro!GM

    labelM)labelMinput typeGsubmitG nameGsignupLsubmitG valueGSign 7pG )M)divM)%ieldsetM)%ormMbr)Mbr)Ma #re%G:p#p ec#o LSE,;E,PPLSE(FU= :MGMBack to login)aM:p#pR else

    :M%orm actionG:p#p ec#o LSE,;E,PPLSE(FU= :MG met#odGpostGM:p#p

    i%/isset/loginLerror00 ec#o loginLerror2Gbr)Mbr)MG=

    R:M%ieldsetMlegendM&nstructor (ogin)legendM

  • 8/9/2019 Omis 107 Nfc Project Report

    26/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page '-)'*

    div classGro!GMlabelM7sername)labelM input typeGtextG nameGusernameG )M

    )divMdiv classGro!GM

    labelMPass!ord)labelM input typeGpass!ordG nameGpass!ordG )M

    )divMdiv classGro!GM

    labelM)labelMinput typeGsubmitG nameGloginLsubmitG valueG(og &nG )M)divM)%ieldsetM)%ormMbr)Mbr)M$ont #ave an account: a #re%G:p#p ec#o LSE,;E,PPLSE(FU= :M:signup3GMClick#ere to signup)aM:p#pR

    :M)divM)bodyM)#tmlM

  • 8/9/2019 Omis 107 Nfc Project Report

    27/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page '&)'*

    myS6L &atabase &+m/

    ++ p#p'yAdmin S*( $ump++ version >2323>2@

    ++ #ttp1))!!!2p#pmyadmin2net++++ ost1 dbDD>D?452db23and32com++ -eneration Time1 $ec 4. ?43> at 3314? P'++ Server version1 D2325+log++ PP ;ersion1 D2>2D+4Xdeb5u?

    SET S*(L'O$E GNOLA7TOL;A(7ELONL[E,OG=SET timeL4343 SET \O($LCA,ACTE,LSETLC(&ENT\\CA,ACTE,LSETLC(&ENT H)=

    )H6>4343 SET \O($LCA,ACTE,LSETL,ES7(TS\\CA,ACTE,LSETL,ES7(TSH)=)H6>4343 SET \O($LCO((AT&ONLCONNECT&ON\\CO((AT&ONLCONNECT&ONH)=)H6>4343 SET NA'ES ut% H)=

    ++++ $atabase1 ]dbDD>D?45]++

    ++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    ++++ Table structure %or table ]attendance]++

    C,EATE TAB(E &F NOT EK&STS ]attendance] /  ]attendenceLid] int/330 NOT N7(( A7TOL&NC,E'ENT.  ]instructorLid] int/330 NOT N7((.  ]studentLid] int/330 NOT N7((.  ]date] date NOT N7((.  P,&'A,J ̂ EJ /]attendenceLid]0

    0 EN-&NE&nno$B $EFA7(T CA,SETut% A7TOL&NC,E'ENT3@ =

    ++++ $umping data %or table ]attendance]++

    &NSE,T &NTO ]attendance] /]attendenceLid]. ]instructorLid]. ]studentLid]. ]date]0 ;A(7ES/3. >. 3. ?43>+33+?50.

  • 8/9/2019 Omis 107 Nfc Project Report

    28/29

    Brian Grossman, Jacob Matta, Sean Meagher, Josh Mitchell, Josh Taylor, Lilly Wilhelms

    NFC Project Reort ! "M#S $%&, Fall '%$( ! Page '.)'*

    /?. >. ?. ?43>+33+?50./. >. . ?43>+33+?50./>. >. 3. ?43>+3?+4?0./D. >. >. ?43>+3?+4?0./@. >. ?. ?43>+3?+4?0.

    /5. >. D. ?43>+3?+4?0./. >. . ?43>+3?+4?0./. @. 3. ?43>+3?+4?0./34. @. ?. ?43>+3?+4?0./33. @. . ?43>+3?+4?0./3?. @. >. ?43>+3?+4?0./3. @. D. ?43>+3?+4?0./3>. @. 3. ?43>+3?+40./3D. @. ?. ?43>+3?+40=

    ++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    ++++ Table structure %or table ]instructor]++

    C,EATE TAB(E &F NOT EK&STS ]instructor] /  ]instructorLid] int/330 NOT N7(( A7TOL&NC,E'ENT.  ]username] varc#ar/?DD0 CO((ATE latin3LgeneralLci NOT N7((.  ]pass!ord] varc#ar/34440 CO((ATE latin3LgeneralLci NOT N7((.  P,&'A,J ^EJ /]instructorLid]00 EN-&NE'y&SA' $EFA7(T CA,SETlatin3 CO((ATElatin3LgeneralLci

    A7TOL&NC,E'ENT =

    ++++ $umping data %or table ]instructor]++

    &NSE,T &NTO ]instructor] /]instructorLid]. ]username]. ]pass!ord]0 ;A(7ES/3. 6. 4e4e4D%?>5c4cc4d4c5>cb0./?. yes. a@34Dc4a@33b>3b4%3?4D4@D4?5e0./. epic. 4?4be3@DaeD5d5ccb>cec?0./>. admn. D>%@c54b@@?%Dc44ea?c33a>4%5a0./D. testuser. Ddc@c@cD4edd4?a?%c%D>%@b@0./@. sean. b534?333@%?4?%ed>D5cd4Dc0./5. os#. 44d>d344bbD4Deee>D5@b?4ba5c0=

    ++ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    ++++ Table structure %or table ]student]

  • 8/9/2019 Omis 107 Nfc Project Report

    29/29