Author: mgallegos Date: 2013-03-20 05:46:42 +0100 (Wed, 20 Mar 2013) New Revision: 614 Modified: trunk/src/mc-dia-form2.js trunk/wp-theme/mc2-form-controller.php Log: IN PROGRESS - Enhancement #488:Save registrations in CSV or similar Modified: trunk/src/mc-dia-form2.js =================================================================== --- trunk/src/mc-dia-form2.js 2013-03-20 04:23:16 UTC (rev 613) +++ trunk/src/mc-dia-form2.js 2013-03-20 04:46:42 UTC (rev 614) @@ -459,6 +459,7 @@ str = str.replace(/>/g,'>'); str = str.replace(/"/g,'"'); str = str.replace(/'/g,'''); + str = str.replace(/,/g,'|'); return str; } Modified: trunk/wp-theme/mc2-form-controller.php =================================================================== --- trunk/wp-theme/mc2-form-controller.php 2013-03-20 04:23:16 UTC (rev 613) +++ trunk/wp-theme/mc2-form-controller.php 2013-03-20 04:46:42 UTC (rev 614) @@ -1,4 +1,29 @@ <?php - - + $SimpleXMLElement = new SimpleXMLElement(file_get_contents('php://input')); + $data = $SimpleXMLElement->NAME.","; + $data .= $SimpleXMLElement->WEB_ADDRESS.","; + $data .= $SimpleXMLElement->LANGUAGES.","; + $data .= $SimpleXMLElement->KEYWORDS.","; + $data .= $SimpleXMLElement->LOCATION.","; + $data .= $SimpleXMLElement->INITIATIVE_NON_PROFIT.","; + $data .= $SimpleXMLElement->WE_ARE_OFFICIALLY_REGISTERED.","; + $data .= $SimpleXMLElement->WE_HAVE_WEBPAGE_WHERE_OUR_ACCOUNTING_IS_PUBLIC.","; + $data .= $SimpleXMLElement->WE_HAVE_A_WEBPAGE_TO_RECEIVE_ONLINE_DONATIONS.","; + $data .= $SimpleXMLElement->INITIATIVE_REPRODUCIBLE.","; + $data .= $SimpleXMLElement->WE_HAVE_TERMS_OF_USE_OF_OUR_CONTENTS.","; + $data .= $SimpleXMLElement->CREATIVE_COMMONS_LICENSE_FOR_SHARING_OUR_CONTENT.","; + $data .= $SimpleXMLElement->OTHER_LICENSE_FOR_SHARING_OUR_CONTENT.","; + $data .= $SimpleXMLElement->OUR_ORGANIZATION.","; + $data .= $SimpleXMLElement->OUR_INTERNAL_PROCEDURES.","; + $data .= $SimpleXMLElement->OUR_LIST_OF_MEMBERS.","; + $data .= $SimpleXMLElement->OUR_FUNDING_SOURCES.","; + $data .= $SimpleXMLElement->INITIATIVE_GRASSROOTS.","; + $data .= $SimpleXMLElement->WE_TAKE_DECISIONS_MAINLY_THROUGH_GENERAL_ASSEMBLIES.","; + $data .= $SimpleXMLElement->WE_HAVE_REPRESENTATIVES_CHOSEN_DEMOCRATICALLY.","; + $data .= $SimpleXMLElement->WE_TAKE_DECISIONS_THROUGH.","; + $data .= $SimpleXMLElement->INITIATIVE_REINFORCE_THE_COMMONS.","; + $data .= $SimpleXMLElement->MAIN_FOCUS_OF_THE_INITIATIVE."\n"; + $fp = fopen('initiatives.txt', 'w'); + fwrite($fp, $data); + fclose($fp); ?> \ No newline at end of file
participants (1)
-
Mario Gallegos