Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
dev:gsoc09_pr [2009/08/14 00:33] kethees |
dev:gsoc09_pr [2009/08/14 01:21] kethees |
||
---|---|---|---|
Line 8: | Line 8: | ||
Person Registry(PR) is a centralized location in SAHANA Disaster Management System to collect Individual and Group/ | Person Registry(PR) is a centralized location in SAHANA Disaster Management System to collect Individual and Group/ | ||
- | There are several incidents where Individual or Group/ | + | There are several incidents where Individual or Group/ |
== Core Functionality == | == Core Functionality == | ||
Line 23: | Line 23: | ||
== Future Enhancement(s) == | == Future Enhancement(s) == | ||
- | * Tracking person roles such missing person, disaster victim, logistic oriented person and etc within PR. | + | * Integrating Person Registry with other person oriented modules. |
+ | * Tracking person roles such missing person, disaster victim, logistic oriented person and etc within PR. | ||
+ | * Enhancing Person API and lib_chart.inc library functionalities. | ||
- | === Person | + | ===== Person |
== Generate Person Box == | == Generate Person Box == | ||
Line 32: | Line 34: | ||
The function for person form is as follows: | The function for person form is as follows: | ||
- | shn_form_person(); | + | <code php> |
+ | shn_form_person(); | ||
+ | </ | ||
Above function will include form elements in your form | Above function will include form elements in your form | ||
- | <input name=" | + | <code php> |
- | <input name=" | + | <input name=" |
- | <input value=" | + | <input name=" |
+ | <input value=" | ||
+ | </code> | ||
In Add button click event person form is poped up with following form fields | In Add button click event person form is poped up with following form fields | ||
Line 48: | Line 53: | ||
Person full_name and person_id are returned and assigned in save action of the popup form. | Person full_name and person_id are returned and assigned in save action of the popup form. | ||
- | |||
- | == Person API == | ||
Person Registry class files | Person Registry class files | ||
data_class.php | data_class.php | ||
* Contents all sql statements. | * Contents all sql statements. | ||
+ | |||
person_class.php | person_class.php | ||
+ | <code php> | ||
* $person = New Person(); | * $person = New Person(); | ||
Line 61: | Line 66: | ||
* $person-> | * $person-> | ||
* $person-> | * $person-> | ||
+ | </ | ||
group_class.php | group_class.php | ||
+ | <code php> | ||
* $group = New Group(); | * $group = New Group(); | ||
Line 70: | Line 77: | ||
* $group-> | * $group-> | ||
* $group-> | * $group-> | ||
+ | </ | ||
address_class.php | address_class.php | ||
+ | <code php> | ||
* $address = New Address(); | * $address = New Address(); | ||
Line 77: | Line 86: | ||
* $address-> | * $address-> | ||
* $address-> | * $address-> | ||
+ | </ | ||
identity_class.php | identity_class.php | ||
+ | <code php> | ||
* $identity = New Identity(); | * $identity = New Identity(); | ||
Line 84: | Line 95: | ||
* $identity-> | * $identity-> | ||
* $identity-> | * $identity-> | ||
+ | </ | ||
+ | |||
+ | ===== Open Flash Chart Library ===== | ||
+ | |||
+ | This allows you to creat a chart with Flash capability. In order to use following function, you need to do is include lib_chart.inc library and call the shn_draw_chart() API function. | ||
+ | |||
+ | == Chart API == | ||
+ | |||
+ | * lib_chart.inc library includes following code snippets. | ||
+ | <code php> | ||
+ | | ||
+ | | ||
+ | |||
+ | | ||
+ | { | ||
+ | $base = ' | ||
+ | | ||
+ | } | ||
+ | |||
+ | </ | ||
+ | |||
+ | Sample $data_file_url formed via stream as follows. | ||
+ | |||
+ | e.g: | ||
+ | <code php> | ||
+ | $url_gender = ' | ||
+ | </ | ||
+ | |||
+ | <code php> | ||
+ | | ||
+ | $array = Data:: | ||
+ | $data = $array[' | ||
+ | $label = $array[' | ||
+ | |||
+ | foreach($data as $d){ | ||
+ | | ||
+ | } | ||
+ | | ||
+ | foreach($data as $key=> | ||
+ | | ||
+ | } | ||
+ | $g = new graph(); | ||
+ | $g-> | ||
+ | $g-> | ||
+ | $g-> | ||
+ | $g-> | ||
+ | $g-> | ||
+ | $g-> | ||
+ | echo $g-> | ||
+ | } | ||
+ | </ | ||
== Ontology == | == Ontology == | ||
* [[dev: | * [[dev: |