Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tp taiwan dylan #54

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .ftpquota
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6175 411103520
150 changes: 75 additions & 75 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
Ushahidi 2.1.x (Development version)
------------------------------------
* Themes
- Added bueno theme to the list of stock themes

Ushahidi 2.1 (Tunis), 09-08-2011
---------------------------------
* Usability
- A new multi-faceted reports listing page that provides the user with the ability
to filter reports using a variety of options such as categories, verification status, report submission channel
- Centralized the validation and saving of reports. This is now handled by the reports helper
- Streamlined the list of parameters for filtering reports on the frontend
- Implemented category sorting in a drag and drop fashion
- A new blocks feature to allow the user to toggle the display of certain sections on the front-end
- Enhanced the custom forms feature (courtesy of the Konpa Group) to better augment data collection via the reports submission page
- Ability to add geometries (polygons) to a report
- Option to get a taller/wider map in the report viewing page
* Checkins (Experimental)
- Checkins system
* Facebook Module
* Member Module
- New member module that allows people to log in to a deployment via OpenID or a username/password
pair specific to the deployment
* Performance
- Refactored the json controller to fetch all the reports via a single query instead of using multiple
queries
- Switched to straight SQL instead of ORM for fetching the reports
* Security
- Plugged SQL injection vulnerabilites
* Testing
- Added test framework (PHPUnit for unit tests and Selenium for functional tests) and tests
* JavaScript
- Switched from GML to Vector layers in timline.js for both the reports and KML layers on the main map
* Features removed from the core
- Removed Laconica from the list of message services. No longer supported

Ushahidi 2.0 (Luanda), 22-11-2010
---------------------------------
* Usability
- Improved reports listing to convey different sets of information quickly and in a practical way
* Themes
- Themes can now be created without having to tamper with the code.
* API
- Refactored the API controller and implemented the API system in a modular fashion.
API tasks/features are now availed by way of libraries
* Plugins
- New plugin architecture based on Kohana Events
- Implemented FrontlineSMS and Clickatell SMS services as plugins and added them to the list of stock plugins
- SMSSync plugin for the SMSSync Android application
* Scheduler
- Ability to schedule tasks in cron like fashion
* Upgrader
- An upgrader to automatically update the platform the latest release

Ushahidi 1.2 (After Haiti in Jan 2010)
--------------------------------------
*Usability
- A collapsible category tree on the submit report page
* Clustering
- Clustering of reports is now on the server side. It was previously being done on the client side via JavaScript
* Custom Forms
- A custom forms feature to collect additional information in addition to that in the "Submit Report" page
* Report Edit Logs
- Edit logs for a report are now available so a user of the admin console can see the series of changes/revisions/edits
that have been made to a report

Ushahidi 1.0 (Mogadishu) 10-12-2009
-----------------------------------
* A web installer is now bundled with the platform to ease the process of deploying/installing the platform
* New CSS based design that is easier to skin
* Admin email notifications on emails and comments
* Site statistics and analytics
* Feature to add custom pages and tabs
* Auto-geotagging of news feeds
* Ability to create reports from news feeds
Ushahidi 2.1.x (Development version)test
------------------------------------
* Themes
- Added bueno theme to the list of stock themes
Ushahidi 2.1 (Tunis), 09-08-2011
---------------------------------
* Usability
- A new multi-faceted reports listing page that provides the user with the ability
to filter reports using a variety of options such as categories, verification status, report submission channel
- Centralized the validation and saving of reports. This is now handled by the reports helper
- Streamlined the list of parameters for filtering reports on the frontend
- Implemented category sorting in a drag and drop fashion
- A new blocks feature to allow the user to toggle the display of certain sections on the front-end
- Enhanced the custom forms feature (courtesy of the Konpa Group) to better augment data collection via the reports submission page
- Ability to add geometries (polygons) to a report
- Option to get a taller/wider map in the report viewing page
* Checkins (Experimental)
- Checkins system
* Facebook Module
* Member Module
- New member module that allows people to log in to a deployment via OpenID or a username/password
pair specific to the deployment
* Performance
- Refactored the json controller to fetch all the reports via a single query instead of using multiple
queries
- Switched to straight SQL instead of ORM for fetching the reports
* Security
- Plugged SQL injection vulnerabilites
* Testing
- Added test framework (PHPUnit for unit tests and Selenium for functional tests) and tests
* JavaScript
- Switched from GML to Vector layers in timline.js for both the reports and KML layers on the main map
* Features removed from the core
- Removed Laconica from the list of message services. No longer supported
Ushahidi 2.0 (Luanda), 22-11-2010
---------------------------------
* Usability
- Improved reports listing to convey different sets of information quickly and in a practical way
* Themes
- Themes can now be created without having to tamper with the code.
* API
- Refactored the API controller and implemented the API system in a modular fashion.
API tasks/features are now availed by way of libraries
* Plugins
- New plugin architecture based on Kohana Events
- Implemented FrontlineSMS and Clickatell SMS services as plugins and added them to the list of stock plugins
- SMSSync plugin for the SMSSync Android application
* Scheduler
- Ability to schedule tasks in cron like fashion
* Upgrader
- An upgrader to automatically update the platform the latest release
Ushahidi 1.2 (After Haiti in Jan 2010)
--------------------------------------
*Usability
- A collapsible category tree on the submit report page
* Clustering
- Clustering of reports is now on the server side. It was previously being done on the client side via JavaScript
* Custom Forms
- A custom forms feature to collect additional information in addition to that in the "Submit Report" page
* Report Edit Logs
- Edit logs for a report are now available so a user of the admin console can see the series of changes/revisions/edits
that have been made to a report
Ushahidi 1.0 (Mogadishu) 10-12-2009
-----------------------------------
* A web installer is now bundled with the platform to ease the process of deploying/installing the platform
* New CSS based design that is easier to skin
* Admin email notifications on emails and comments
* Site statistics and analytics
* Feature to add custom pages and tabs
* Auto-geotagging of news feeds
* Ability to create reports from news feeds
* Feature to add KML/KMZ overlays on the map
21 changes: 21 additions & 0 deletions Tphp/ColorPlugin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

include("mysql_connect.php");

$strSqlCommand = "SELECT tb0.incident_id, tb1.category_color, tb2.category_color FROM incident_category tb0
LEFT JOIN category tb1 ON tb0.category_id = tb1.id
LEFT JOIN category tb2 ON tb1.parent_id = tb2.id";

$result = mysql_query($strSqlCommand);
// $rowDetail = @mysql_fetch_array($result);

$Items = array();
while($rowDetail = @mysql_fetch_array($result) )
{
$Items[ $rowDetail[0] ] = array( "id" => $rowDetail[0], "MyColor" => $rowDetail[1], "ParentColor" => $rowDetail[2]);
}

echo json_encode($Items);

?>

51 changes: 51 additions & 0 deletions Tphp/FieldRange.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?php
header("Content-type: text/javascript");
include("mysql_connect.php");
//category: id, parent_id, category_title, category_color, category_visible = 1, category_trusted = 0
//incident_category: incident_id, category_id
//incident: id, form_id

//form: id, form_active = 1
//form_field:id, form_id, field_name, field_required
//form_response: id, form_field_id, incident_id, form_respons
//form_field_option: form_field_id, option_name = field_datatype, option_value = numeric

// Search for Counter for each Cateogry.
if( !isset( $_GET['Field'] ) )
{
$Items[ 'data' ] = 0;
}
else
{
// Step 1.
// Search Field is % ?:
$strSqlCommand = " SELECT field_name
FROM form_field
WHERE id = ".$_GET['Field'];

$resultField = mysql_query($strSqlCommand);
$rowField = @mysql_fetch_array($resultField);

if( strpos( $rowField['field_name'], "%" ) )
{
$Items[ 'data' ] = 100;
}
else
{
// Step 2.
$strSqlCommand = " SELECT MAX( form_response ), MIN( form_response )
FROM form_response
WHERE form_field_id = ".$_GET['Field'];

$resultField = mysql_query($strSqlCommand);
$rowField = @mysql_fetch_array($resultField);

$Items[ 'data' ] = $rowField[0] - $rowField[1];
}
}
echo json_encode($Items);



?>

122 changes: 122 additions & 0 deletions Tphp/FormsFormat.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
<?php
//"CategoriesList" : [ idCate : { "idCate": idCate, "nameCate": name, "idParent": null / Parent_idCate } ]
// "FormList" : [ idForm : { "idForm": idForm,
// "rowData" : [ "Field_ID": idField, "Field_Name": strTitle,
// "Required": bIsRequired,
// "DataType": "Free Text"/"Numeric"/"Email"/"Phone #"] }

include("mysql_connect.php");

$strSqlCommand = "SELECT id, category_title, parent_id FROM category
WHERE category_trusted != 1
AND parent_id = 0
AND category_visible = 1";

$result = mysql_query($strSqlCommand);
// $rowDetail = @mysql_fetch_array($result);
$catIdandPid=array();
$Category = array();
while($rowDetail = @mysql_fetch_array($result) )
{

array_push($catIdandPid,array("id"=>$rowDetail[0],"title"=>$rowDetail[1]));

$strSqlCommand2 = "SELECT id, category_title, parent_id FROM category
WHERE category_trusted != 1
AND category_visible = 1
AND parent_id = '".$rowDetail[0]."'";

$result2 = mysql_query($strSqlCommand2);

//if parent category has sub category then ban it.
if(mysql_num_rows($result2) == 0){
//$Category[ $rowDetail[0] ] = array( "idCate" => $rowDetail[0], "nameCate" => $rowDetail[1], "idParent" => $rowDetail[2]);
array_push($Category, array( "idCate" => $rowDetail[0], "nameCate" => $rowDetail[1], "idParent" => $rowDetail[2]));
}

while($rowDetail2 = @mysql_fetch_array($result2) )
{
array_push($Category, array( "idCate" => $rowDetail2[0], "nameCate" => $rowDetail2[1], "idParent" => $rowDetail2[2]));
//$Category[ $rowDetail2[0] ] = array( "idCate" => $rowDetail2[0], "nameCate" => $rowDetail2[1], "idParent" => $rowDetail2[2]);
}

}
// 2012/12/14 Select All Form format to app
$strSqlCommand = "SELECT id, form_title FROM form WHERE 1";
// WHERE form_active = 1";

$result = mysql_query($strSqlCommand);
// $rowDetail = @mysql_fetch_array($result);

$FormList = array();
while($rowForm = @mysql_fetch_array($result) )
{
//2013/1/30 add 'tb1.field_default' in select field and marked 'AND tb2.option_name = \"field_datatype\"' tpo get all form_type
$strSqlCommand = "SELECT tb1.id, tb1.field_name, tb1.field_required, tb1.field_type, tb2.option_value , tb1.field_default
FROM form_field tb1
LEFT JOIN form_field_option tb2 ON tb2.form_field_id = tb1.id
WHERE tb1.form_id = ".$rowForm[0] ;
//AND tb2.option_name = \"field_datatype\"";

//var_dump( $strSqlCommand );

$resultField = mysql_query($strSqlCommand);
$FieldList = array();
while($rowField = @mysql_fetch_array($resultField) )
{
if($rowField[4]=="0")
continue;

switch ($rowField[3])
{
case '1':
$fieldtype = 'textfield';
break;
case '2':
$fieldtype = 'textarea';
break;
case '3':
$fieldtype = 'date';
break;
case '4':
$fieldtype = 'password';
break;
case '5':
$fieldtype = 'radio';
break;
case '6':
$fieldtype = 'checkbox';
break;
case '7':
$fieldtype = 'spinner';
break;
}
array_push($FieldList, array( "Field_ID" => $rowField[0], "Field_Name" => $rowField[1], "Required" => $rowField[2], "Field_Type" => $fieldtype, "Field_DataType" => $rowField[4],"Field_Default"=>$rowField[5] ));
//$FieldList[ $rowField[0] ] = array( "Field_ID" => $rowField[0], "Field_Name" => $rowField[1], "Required" => $rowField[2], "Field_Type" => $fieldtype, "Field_DataType" => $rowField[4]);
}
array_push($FormList, array( "idForm" => $rowForm[0], "nameForm" => $rowForm[1], "rowData" => $FieldList));
//$FormList[ $rowForm[0] ] = array( "idForm" => $rowForm[0], "nameForm" => $rowForm[1], "rowData" => $FieldList);
}

//For_APK_Group
$strSqlCommand4 = "SELECT id, GGroup_Name FROM GGroup WHERE 1";
$result4 = mysql_query($strSqlCommand4);
$FormList4 = array();
array_push($FormList4, array( "idGroup" => '0', "nameGroup" => 'No Group'));
while($rowGroup4 = mysql_fetch_array($result4)){
//echo "what".$rowGroup4['id'];
array_push($FormList4, array( "idGroup" => $rowGroup4['id'], "nameGroup" => $rowGroup4['GGroup_Name']));
}//Group

//while($rowGroup = @mysql_fetch_array($result4) )
//{
// array_push($FormList4, array( "idGroup" => $rowGroup['id'], "nameGroup" => $rowGroup['GGroup_Name']));
//}
//echo "hehehe".$rowGroup[0];

//$Items = array( 'CategoriesList' => $Category, 'FormList' => $FormList );
$Items = array( 'CategoriesList' =>$Category , 'FormList' => $FormList,'catIdandPid'=>$catIdandPid ,'FormList4' => $FormList4);//Group
echo json_encode($Items);

?>

Loading