This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT incident.id as "#", incident_title AS "INCIDENT TITLE", incident_date AS "INCIDENT DATE", location.location_name AS LOCATION, incident_description AS DESCRIPTION, category.category_title AS CATEGORY, location.latitude AS LATITUDE, location.longitude AS LONGITUDE, CASE WHEN incident_active = 1 THEN "YES" ELSE "NO" END AS APPROVED, CASE WHEN incident_verified = 1 THEN "YES" ELSE "NO" END AS VERIFIED | |
FROM incident INNER JOIN location ON incident.location_id = location.id LEFT JOIN incident_category ON incident.id = incident_category.incident_id LEFT JOIN category ON incident_category.category_id = category.id | |
GROUP BY incident.id | |
ORDER BY incident.id ASC; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import math | |
import sys | |
import MySQLdb | |
MAP_ZOOM = 21 | |
MAP_OFFSET = 268435456 # half the Earth's circumference at zoom level 21 | |
MAP_RADIUS = MAP_OFFSET / math.pi | |
def longitude_to_x(longitude): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Map helper class | |
* | |
* Portions of this class credited to: zzolo, phayes, tmcw, brynbellomy, bdragon | |
* | |
* @package Map | |
* @author Ushahidi Team | |
* @copyright (c) 2008 Ushahidi Team | |
* @license http://www.ushahidi.com/license.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"payload": { | |
"domain": "http:\/\/ushahidi.dev\/", | |
"incidents": [ | |
{ | |
"incident": { | |
"incidentid": "3494", | |
"incidenttitle": "National Palace damaged", | |
"incidentdescription": "National Palace has extensive damage. President and First Lady are safe.", | |
"incidentdate": "2010-01-12 10:43:00", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"categories": { | |
"24": "2B. PENURIE D'EAU | WATER SHORTAGE", | |
"44": "2A. PENURIE D'ALIMENTS | FOOD SHORTAGE" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"payload": { | |
"domain": "http:\/\/ushahidi.dev\/", | |
"incidents": [ | |
{ | |
"incident": { | |
"incidentid": "1", | |
"incidenttitle": "Hello Ushahidi!", | |
"incidentdescription": "Welcome to Ushahidi. Please replace this report with a valid incident", | |
"incidentdate": "2010-08-30 22:49:00", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"payload": { | |
"domain": "http:\/\/ushahidi.dev\/", | |
"incidents": [ | |
{ | |
"incident": { | |
"incidentid": "1", | |
"incidenttitle": "Hello Ushahidi!", | |
"incidentdescription": "Welcome to Ushahidi. Please replace this report with a valid incident", | |
"incidentdate": "2010-08-30 22:49:00", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE `roles` ADD `reports_view` tinyint(4) NOT NULL default '0' AFTER `description`; | |
ALTER TABLE `roles` ADD `reports_edit` tinyint(4) NOT NULL default '0' AFTER `reports_view`; | |
ALTER TABLE `roles` ADD `reports_evaluation` tinyint(4) NOT NULL default '0' AFTER `reports_edit`; | |
ALTER TABLE `roles` ADD `reports_comments` tinyint(4) NOT NULL default '0' AFTER `reports_evaluation`; | |
ALTER TABLE `roles` ADD `reports_download` tinyint(4) NOT NULL default '0' AFTER `reports_comments`; | |
ALTER TABLE `roles` ADD `reports_upload` tinyint(4) NOT NULL default '0' AFTER `reports_download`; | |
ALTER TABLE `roles` ADD `messages` tinyint(4) NOT NULL default '0' AFTER `reports_upload`; | |
ALTER TABLE `roles` ADD `messages_reporters` tinyint(4) NOT NULL default '0' AFTER `messages`; | |
ALTER TABLE `roles` ADD `stats` tinyint(4) NOT NULL default '0' AFTER `messages_reporters`; | |
ALTER TABLE `roles` ADD `settings` tinyint(4) NOT NULL default '0' AFTER `stats`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Clickatell HTTP GET Controller | |
* Acts as the HTTP callback for Clickatell | |
* | |
* PHP version 5 | |
* LICENSE: This source file is subject to LGPL license | |
* that is available through the world-wide-web at the following URI: | |
* http://www.gnu.org/copyleft/lesser.html | |
* @author Ushahidi Team <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
git-ftp: painless, quick and easy working copy syncing over FTP | |
Copyright (c) 2008-2009 | |
Edward Z. Yang <[email protected]> and Mauro Lizaur <[email protected]> | |
Permission is hereby granted, free of charge, to any person | |
obtaining a copy of this software and associated documentation |
OlderNewer