GSoC/GCI Archive
Google Code-in 2012 The Fedora Project

Task A08 – Implement Interface and Logic for tbl_Expenses_Type

completed by: Calin

mentors: bckurera

Design an interface with controllers (No need of formatting with CSS just use controllers).

Form Title : Add New Expense Type

1.  Field Name - Expense Type

1.  Value – String of 50 characters with only alphabetic characters.

2.  Field Name – Description

1.  Value – String with 100 max.

3.  Field Name – Valid Till

1.  Value – Date (yyyy/mm/dd)

4.  Field Name – Valid From

1.  Value – Date (yyyy/mm/dd)

5.  Field Name – Account

1.  Value – Integer max 5 digits

6.  Field Name – Remarks

1.  Value – Text


Then refer to https://fedoraproject.org/w/uploads/1/12/ER_Model.PNG for the tbl_Expense_Type table. Using PHP develop a script that fetch entered values from the designed interface and store in tbl_Expense_Type table. Data validation should be performed in both interface level and script level.

Valid Till and Valid From should be in above format on the form but in the script it should be converted to PHP timestamp and store which is a INT 10 value after conversion.