diff options
author | Romain d'Alverny <rda@mageia.org> | 2012-03-01 18:07:59 +0000 |
---|---|---|
committer | Romain d'Alverny <rda@mageia.org> | 2012-03-01 18:07:59 +0000 |
commit | d63bc15119288fea0fd818212e25af0bdb5bdbd6 (patch) | |
tree | cc2732920edd6c25efb0b037b2ca351a805d9eee /en/about | |
parent | be8103995864baa12a3fbfb2caf6687ef3822ef7 (diff) | |
download | www-d63bc15119288fea0fd818212e25af0bdb5bdbd6.tar www-d63bc15119288fea0fd818212e25af0bdb5bdbd6.tar.gz www-d63bc15119288fea0fd818212e25af0bdb5bdbd6.tar.bz2 www-d63bc15119288fea0fd818212e25af0bdb5bdbd6.tar.xz www-d63bc15119288fea0fd818212e25af0bdb5bdbd6.zip |
2011 report update (did I mention this code is an abomination? well, it is)
Diffstat (limited to 'en/about')
-rw-r--r-- | en/about/index.php | 3 | ||||
-rw-r--r-- | en/about/reports/2011/index.php | 379 | ||||
-rw-r--r-- | en/about/reports/2011/index3.php | 76 | ||||
-rw-r--r-- | en/about/reports/index.php | 41 |
4 files changed, 346 insertions, 153 deletions
diff --git a/en/about/index.php b/en/about/index.php index 422f9d9fe..01ca6f244 100644 --- a/en/about/index.php +++ b/en/about/index.php @@ -34,8 +34,7 @@ <li><a href="./values/">Values</a></li> <li><a href="./code-of-conduct/">Code of conduct</a></li> <li><a href="/en/policies/">Policies</a></li> - <li>Financial reports: <a href="/en/about/reports/2010/">2010</a>, - <a href="/en/about/reports/2011/">2011</a></li> + <li><a href="/en/about/reports/">Financial reports</a></li> <li><a href="/en/thank-you/">Thanks!</a></li> <li><a href="/en/policies/privacy/">Privacy policy</a></li> <li><a href="/en/about/media/">Logo, CD covers files, media files</a>.</li> diff --git a/en/about/reports/2011/index.php b/en/about/reports/2011/index.php index 581fab48f..144687024 100644 --- a/en/about/reports/2011/index.php +++ b/en/about/reports/2011/index.php @@ -1,87 +1,318 @@ -<!DOCTYPE html> +<?php + +$_months = array( + 1 => 'January', 2 => 'February', 3 => 'March', + 4 => 'April', 5 => 'May', 6 => 'June', + 7 => 'July', 8 => 'August', 9 => 'September', + 10 => 'October', 11 => 'November', 12 => 'December' +); + +$data = file('mageia-financial-report-2011.csv'); +$parsed = array(); +foreach ($data as $l) { + if (trim($l) == ',,,,,,') + continue; + + $l = str_getcsv(str_replace(array(',,,', ",\n"), '', $l)); + if (substr($l[0], 0, 2) == '# ') { + $tag = $l[0]; + $parent = $tag; + } elseif (substr($l[0], 0, 2) == '##') { + $tag = $parent . ' > ' . $l[0]; + } else { + $parsed[$tag][] = $l; + } +} + +foreach ($parsed as $tag => $values) { + $val2 = array(); + $tag2 = strtolower($tag); + $teststr = strlen($tag) > 12 ? substr($tag2, 0, 13) : null; + foreach ($values as $v) { + if ($tag2 == "# head" + || $teststr == "# account bal" + || $teststr == "# income stat" + || $teststr == "# balance she" + || $tag2 == '## expenses' + || $tag2 == '## revenues' + || $tag2 == '## liabilities' + || $tag2 == '## assets') { + $val2[$v[0]] = $v[1]; + } else { + $val2[] = $v; + } + } + + $parsed[$tag] = $val2; +} +$flow = array(); + +$list = array(); +$count = array(); +foreach ($parsed['# Expenses details > ## Monthly summary'] as $line) { + $list[] = $line[2]; + $count[] = $line[1]; +} +unset($list[0]); +unset($list[13]); +unset($count[0]); +unset($count[13]); + +$flow = array( + 'expenses' => $list, + 'expenses_op' => $count, + 'revenue' => null, + 'revenue_op' => null +); + +$list = array(); +$count = array(); +foreach ($parsed['# Income details > ## Donations monthly summary'] as $line) { + $list[] = $line[2]; + $count[] = $line[1]; +} +unset($list[0]); +unset($list[13]); +unset($count[0]); +unset($count[13]); + +$flow['revenue'] = $list; +$flow['revenue_op'] = $count; + + +?><!DOCTYPE html> <html dir="ltr" lang="en"> <head> - <meta charset="utf-8" /> - <title>Mageia Financial Report (2011)</title> - <meta name="description" content="Mageia is new community-based Linux distribution." /> - <meta name="keywords" content="mageia, financial report, 2011" /> - <meta name="author" content="Mageia" /> - <link rel="stylesheet" type="text/css" href="/g/style/all.css" /> + <meta charset="utf-8"> + <title>Mageia 2011 Financial Report</title> + <meta name="description" content="Financial report for Mageia.org activity in 2011."> + <meta name="keywords" content="mageia, financial report, 2011, revenues, expenses"> + <meta name="author" content="Mageia"> + <link rel="stylesheet" type="text/css" href="/g/style/all.css"> <?php include '../../../../analytics.php'; ?> + <!--Load the AJAX API--> + <script type="text/javascript" src="https://www.google.com/jsapi"></script> + <script type="text/javascript"> + google.load('visualization', '1', {packages: ['corechart']}); + </script> + <script type="text/javascript"> + function drawVisualization() { + // Some raw data (not necessarily accurate) + var data = google.visualization.arrayToDataTable([ + ['Month', 'Revenues', 'Expenses'], + <?php + $arr = array(); + $qRevenues = 0; + $qExpenses = 0; + $i = 0; + $j = 0; + $qarr = array(); + foreach ($flow['revenue'] as $month => $val) { + $arr[] = sprintf("['%s', %s, %s]", $_months[$month], str_replace(',', '.', $val), str_replace(',', '.', $flow['expenses'][$month])); + $i += 1; + if ($i == 3) { + $j += 1; + $qarr[] = sprintf("['%s', %s, %s]", 'Q' . $j, $qRevenues, $qExpenses); + $qRevenues = 0; + $qExpenses = 0; + $i = 0; + } else { + $qRevenues += str_replace(',', '.', $val); + $qExpenses += str_replace(',', '.', $flow['expenses'][$month]); + } + } + echo implode(', ', $arr); + ?> + ]); + + var options = { + title : 'Monthly Cash Flow', + vAxis: {title: "Amount (€)"}, + hAxis: {title: "2011"}, + seriesType: "bars", + }; + + var chart = new google.visualization.ComboChart(document.getElementById('chart_div')); + chart.draw(data, options); + + var data2 = google.visualization.arrayToDataTable([ + ['Year', 'Revenues', 'Expenses'], + ['2010', 8801.66, 1277.77], + ['2011', 11154.02, 8327.25] + ]); + var options2 = { + title : 'Yearly Cash Flow', + vAxis: {title: "Amount (€)"}, + hAxis: {title: "Years"}, + seriesType: "bars" + }; + + var chart2 = new google.visualization.ComboChart(document.getElementById('chart2')); + chart2.draw(data2, options2); + + var data3 = google.visualization.arrayToDataTable([ + ['Quarter', 'Revenues', 'Expenses'], + <?php echo implode(', ', $qarr); ?> + ]); + var options3 = { + title : 'Quarterly Cash Flow', + vAxis: {title: "Amount (€)"}, + hAxis: {title: "2011"}, + seriesType: "bars" + }; + + var chart3 = new google.visualization.ComboChart(document.getElementById('chart3')); + chart3.draw(data3, options3); + } + google.setOnLoadCallback(drawVisualization); + </script> </head> <body> <?php include '../../../../langs.php'; ?> - <div id="doc" class="yui-t7"> - <div id="hd" role="banner"><h1><a id="logo" href="/"><span>Mageia</span></a> <span class="lsep">|</span> <span class="subh">Financial Report (2011)</span></h1></div> + <div id="doc4" class="yui-t7"> + <div id="hd" role="banner"><h1><a id="logo" href="/en/"><span>Mageia</span></a> <span class="lsep">|</span> <span class="subh">2011 Financial Report</span></h1></div> <div id="bd" role="main"> <div class="yui-g"> <div class="para values"> - <h2>Summary</h2> - <ul> - <li>Outstanding amount of <a href="/en/about/reports/2010">2010</a>: EUR 7 523.96</li> - <li>Amount collected: EUR 3 379.86</li> - <li>Amount spent: EUR 3 469.75</li> - <li>Amount remaining: <?php echo $g_amount_remain; ?></li> - </ul> - <h2>Financial Report</h2> - <table id="fr-table"><thead><tr><th>Transaction description</th><th>Income</th><th>Outgoing</th></tr></thead><tbody><tr> - <tr><td colspan=3>Donations and Sales</td></tr> - <tr><td>Donations by Paypal/transfer/check</td><td class="money">EUR 1 920.97</td><td class="money"> </td></tr> - <tr><td>Sale of Tee-Shirts</td><td class="money">EUR 1 050.00</td><td class="money"> </td></tr> - <tr><td colspan=3>Fees and Administration Costs</td></tr> - <tr><td>Administrative cost for the birth of Mageia.Org (JO)</td><td class="money"> </td><td class="money">EUR 44.00</td></tr> - <tr><td>April (annual fee)</td><td class="money"> </td><td class="money">EUR 100.00</td></tr> - <tr><td>INPI brand registration for 10 years (rda)</td><td class="money"> </td><td class="money">EUR 250.00</td></tr> - <tr><td>Annual interest of our savings account</td><td class="money">EUR 3.06</td><td class="money"> </td></tr> - <tr><td colspan=3>Goodies and accessories</td></tr> - <tr><td>Posters + flyers for Solutions Linux (rda)</td><td> </td><td class="money">EUR 159.25</td></tr> - <tr><td>Stickers + Tee-Shirts (fosdem)</td><td> </td><td class="money">EUR 1 932.14</td></tr> - <tr><td>Money box (dams)</td><td> </td><td class="money">EUR 17.93</td></tr> - <tr><td colspan=3>Shipments</td></tr> - <tr><td>40 TS to wobo for the Chemnitzer Linuxtage</td><td> </td><td class="money">EUR 54.65</td></tr> - <tr><td>3 TS to donors in France (dams)</td><td> </td><td class="money">EUR 12.30</td></tr> - <tr><td>2 TS to saipo for an event in France (dams)</td><td> </td><td class="money">EUR 25.00</td></tr> - <tr><td colspan=3>Hardware or hosting</td></tr> - <tr><td>RAM on Gandi hosting (for blog/planet/www)</td><td> </td><td class="money">EUR 250.00</td></tr> - <tr><td>SSL for domains on Gandi.net</td><td> </td><td class="money">EUR 215.28</td></tr> - <tr><td>HDD for servers (boklm)</td><td> </td><td class="money">EUR 242.70</td></tr> - <tr><td colspan=3>Travels and events</td></tr> - <tr><td>Hotel + train for wobo (fosdem 2011)</td><td> </td><td class="money">EUR 166.50</td></tr> - <tr><td colspan=3> </td></tr> - <tr><td>Total</td><td class="money">EUR </td><td class="money">EUR 3 469.75</td></tr> - <tr><td>Balance</td><td colspan=2 class="money">EUR </td></tr></tbody> - </table> - <h2>Bank accounts situation</h2> - <ul> - <li>Paypal (non-for-profit organisation account): EUR 898.42</li> - <li>Main account (with checkbook and no credit card): EUR 511.13</li> - <li>Savings account (between 2% and 4% of interest): EUR 7 218.72</li> - </ul> - <h2>Forecast for 2011</h2> - <table id="fr-table"><thead><tr><th>Description of planned expenditure</th><th>Unit Price</th><th>Quantity</th><th>Recurrence</th><th>Total Price</th><th>Status</th></tr></thead><tbody><tr> - <tr><td>Goodies</td><td class="money">EUR 4 500.00</td><td class="money">1</td><td class="money">1</td><td class="money">EUR 4 500.00</td><td>pending</td></tr> - <tr><td>April</td><td class="money">EUR 100.00</td><td class="money">1</td><td class="money">1</td><td class="money">EUR 100.00</td><td>pending</td></tr> - <tr><td>Gandi (hosting: +1536 MB of RAM)</td><td class="money">EUR 2.39</td><td class="money">6</td><td class="money">12</td><td class="money">EUR 172.08</td><td>done (Wed Mar 30)</td></tr> - <tr><td>Internet domains</td><td class="money">EUR 15.00</td><td class="money">7</td><td class="money">1</td><td class="money">EUR 105.00</td><td>pending</td></tr> - <tr><td>HDD for Fiona (backup server)</td><td class="money">EUR 205.00</td><td class="money">4</td><td class="money">1</td><td class="money">EUR 820.00</td><td>pending</td></tr> - <tr><td>1 new server for BS (QA & packagers)</td><td class="money">EUR 2 669.60</td><td class="money">1</td><td class="money">1</td><td class="money">EUR 2 669.60</td><td>done (Fri Oct 21)</td></tr> - <tr><td>Event box</td><td class="money">EUR 1500.00</td><td class="money">1</td><td class="money">1</td><td class="money">EUR 1 500.00</td><td>pending</td></tr> - <tr><td>Event travel</td><td class="money">EUR 1 000.00</td><td class="money">1</td><td class="money">2</td><td class="money">EUR 2 000.00</td><td>pending</td></tr> - <tr><td>HW for spare</td><td class="money">EUR 3 000.00</td><td class="money">1</td><td class="money">1</td><td class="money">EUR 3 000.00</td><td>pending</td></tr> - <tr><td>Brand registration</td><td class="money">EUR 280.00</td><td class="money">1</td><td class="money">1</td><td class="money">EUR 280.00</td><td>pending</td></tr> - <tr><td>Reserve fund</td><td class="money">EUR 4 000.00</td><td class="money">1</td><td class="money">1</td><td class="money">EUR 4 000.00</td><td>pending</td></tr> - <tr><td colspan=6> </td></tr> - <tr><td colspan=4>Total</td><td class="money">EUR 19 146.68</td><td>pending</td></tr> - </table> - <h2>Miscellaneous</h2> - <ul> - <li>You can <a href="#" hreflang="en">download this report</a> as a PDF file.</li> - <li>You can help Mageia.Org by <a href="/en/donate/" hreflang="en">doing a donation</a>.</li> - <li>You can see the <a href="/en/thank-you" hreflang="en">"thank you" page</a>.</li> - </ul> - <h2>Contact</h2> - Financial report published by Damien Lallement (Mageia.Org Treasurer on the 2011 Fiscal Year).<br/>You can contact him by sending an email to <em>treasurer[at]mageia[dot]org</em>.<br/>Last update: Tue Jan 10 16:12:13 CET 2012. + <p>Here is our financial report for 2011.</p> + + <ul> + <li>Read the <a href="mageia_rapport_financier_2011_fr.pdf" hreflang="fr">French, original report</a> + or the <a href="mageia_financial_report_2011_en.pdf" hreflang="en">English translation</a> + (both are PDF documents).</li> + <li>Get the <a href="mageia-financial-report-2011.csv">raw report data</a> + (CSV document, licensed under <a href="http://opendatacommons.org/licenses/odbl/1.0/">ODbL 1.0</a>). + The rest of this page is built from this data.</li> + </ul> + + <p>Last updated on <?php echo $parsed['# Head']['last updated']; ?>.</p> + + <hr> + <h2>Account status on December 31<sup>st</sup>, 2011</h2> + <?php + $v = $parsed['# Account balance on 2011/12/31']; + echo '<table class="fr-table">'; + foreach ($v as $k => $w) { + $s .= sprintf('<tr><td>%s</td><td class="money"><span class="currency">EUR</span> %s</td></tr>', $k, $w); + } + $s .= '</table>'; + echo $s; + ?> + + <hr> + + <h2>Cash flow</h2> + <div id="chart_div" style="width: 650px; height: 280px;"></div> + <div id="chart3" style="width: 650px; height: 200px;"></div> + <div id="chart2" style="width: 650px; height: 200px;"></div> + <hr> + + <h2>Income statement</h2> + <table> + <tr><th>Revenues</th><th>Expenses</th></tr> + <tr><td> + <table class="fr-table"> + <?php + $s = ''; + foreach ($parsed['# Income Statement > ## Revenues'] as $k => $v) + $s .= sprintf('<tr><td>%s</td><td class="money"><span class="currency">EUR</span> %s</td></tr>', $k, $v); + + echo $s; + ?> + </table> + </td><td> + <table class="fr-table"> + <?php + $s = ''; + foreach ($parsed['# Income Statement > ## Expenses'] as $k => $v) + $s .= sprintf('<tr><td>%s</td><td class="money"><span class="currency">EUR</span> %s</td></tr>', $k, $v); + + echo $s; + ?> + </table> + </td></tr> + </table> + + <hr> + + <h2>Balance sheet</h2> + <table> + <tr><th>Revenues</th><th>Expenses</th></tr> + <tr><td> + <table> + <?php + $s = ''; + foreach ($parsed['# Balance Sheet (incomplete) > ## Assets'] as $k => $v) + $s .= sprintf('<tr><td>%s</td><td>%s</td></tr>', $k, $v); + + echo $s; + ?> + </table> + </td><td> + <table> + <?php + $s = ''; + foreach ($parsed['# Balance Sheet (incomplete) > ## Liabilities'] as $k => $v) + $s .= sprintf('<tr><td>%s</td><td>%s</td></tr>', $k, $v); + + echo $s; + ?> + </table> + </td></tr> + </table> + <hr> + + <h2>Expenses</h2> + + <?php + + $v = $parsed['# Expenses details > ## Monthly summary']; + echo '<table class="fr-table">'; + foreach ($v as $line) { + echo sprintf('<tr><td>%s</td><td>%s</td><td class="money"><span class="currency">EUR</span> %s</td></tr>', + $_months[$line[0]], $line[1], $line[2]); + } + echo '</table>'; + ?> + + <h3>Details</h3> + + <table class="fr-table"> + <?php + $v = $parsed['# Expenses details > ## More details']; + foreach ($v as $line) { + echo sprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td class="money"><span class="currency">EUR</span> %s</td></tr>', + $line[0], $line[1], + $line[2], $line[3], + $line[4], + $line[5]); + } + ?> + </table> + <hr> + <h2>Income, donations</h2> + <?php + + $v = $parsed['# Income details > ## Donations monthly summary']; + echo '<table class="fr-table">'; + foreach ($v as $line) { + echo sprintf('<tr><td>%s</td><td>%s</td> + <td class="money"><span class="currency">EUR</span> %s</td> + <td class="money"><span class="currency">EUR</span> %s</td> + <td class="money"><span class="currency">EUR</span> %s</td> + <td class="money"><span class="currency">EUR</span> %s</td> + <td class="money"><span class="currency">EUR</span> %s</td></tr>', + $_months[$line[0]], $line[1], $line[2], + $line[3], + $line[4], + $line[5], $line[6]); + } + echo '</table>'; + ?> + + <hr> + <p>Feel free to <a href="/en/contact/">contact us</a> regarding this report.</p> </div> </div> </div> diff --git a/en/about/reports/2011/index3.php b/en/about/reports/2011/index3.php deleted file mode 100644 index dab32dcee..000000000 --- a/en/about/reports/2011/index3.php +++ /dev/null @@ -1,76 +0,0 @@ -<?php - -//include G_APP_ROOT . '/lib/fi-report.php'; - -$data = file('mageia-financial-report-2011.csv'); -$parsed = array(); -foreach ($data as $l) { - if (trim($l) == ',,,,,,') - continue; - - $l = str_getcsv(str_replace(array(',,,', ",\n"), '', $l)); - if ($l[0][0] == '#') { - $tag = $l[0]; - } else { - $parsed[$tag][] = $l; - } -} -#echo '<pre style="text-align: left;">', print_r($parsed, true), '</pre>'; - -?><!DOCTYPE html> -<html dir="ltr" lang="en"> -<head> - <meta charset="utf-8"> - <title>Mageia 2011 Financial Report</title> - <meta name="description" content="Financial report for Mageia.org activity in 2011."> - <meta name="keywords" content="mageia, financial report, 2011, revenues, expenses"> - <meta name="author" content="Mageia"> - <link rel="stylesheet" type="text/css" href="/g/style/all.css"> - <?php include '../../../../analytics.php'; ?> -</head> -<body> - <?php include '../../../../langs.php'; ?> - - <div id="doc" class="yui-t7"> - <div id="hd" role="banner"><h1><a id="logo" href="/en/"><span>Mageia</span></a> <span class="lsep">|</span> <span class="subh">2011 Financial Report</span></h1></div> - <div id="bd" role="main"> - <div class="yui-g"> - <div class="para values"> - <p style="color: #fff; background: red; padding: 0.3em 0.4em 0.4em 0.6em; font-size: 85%;"> - Being redesigned – Take with a grain of salt for now.</p> - - <ul> - <li><a href="mageia_rapport_financier_2011_fr.pdf" hreflang="fr">Lire le rapport financier 2011 (in French, PDF)</a></li> - <li><a href="mageia_financial_report_2011_en.pdf" hreflang="en">Read financial report 2011 (in English, translated from French original, PDF)</a></li> - <li><a href="mageia-financial-report-2011.csv">Get the raw report data (CSV, under ODbL 1.0)</a></li> - </ul> - - <h2>Account status</h2> - TODO - <hr> - - <h2>Cash flow</h2> - TODO - <hr> - - <h2>Income statement</h2> - TODO - <hr> - - <h2>Balance sheet</h2> - TODO - <hr> - - <h2>2012 Forecast</h2> - TODO - - <hr> - <h2>Contact</h2> - <p>Financial report published by Damien Lallement (Mageia Treasurer on the 2011 Fiscal Year).<br> - You can contact him by sending an email to <em>treasurer[at]mageia[dot]org</em>.</p> - </div> - </div> - </div> - </div> -</body> -</html> diff --git a/en/about/reports/index.php b/en/about/reports/index.php index 734f690aa..58de0a20c 100644 --- a/en/about/reports/index.php +++ b/en/about/reports/index.php @@ -1 +1,40 @@ -<?php header('Location: ./2011/'); die;
\ No newline at end of file +<!DOCTYPE html> +<html dir="ltr" lang="en"> +<head> + <meta charset="utf-8"> + <title>Mageia activity & financial reports</title> + <meta name="description" content="Mageia reports, every year."> + <meta name="keywords" content="mageia, reports, activity, financial"> + <meta name="author" content="Mageia"> + <link rel="stylesheet" type="text/css" href="/g/style/all.css"> + <?php include '../../../analytics.php'; ?> +</head> +<body> + <?php include '../../../langs.php'; ?> + + <div id="doc" class="yui-t7"> + <div id="hd" role="banner"><h1><a id="logo" href="/en/"><span>Mageia</span></a> <span class="lsep">|</span> <span class="subh">Activity reports</span></h1></div> + <div id="bd" role="main"> + <div class="yui-g"> + <div class="para values"> + <p>Here you will find our various activity and financial reports for every year.</p> + + <ul> + <li>2012: + <a href="2012/">financial report</a> (in progress)</a></li> + + <li>2011: + Moral report: <a href="https://wiki.mageia.org/en/Rapport_moral_2011">https://wiki.mageia.org/en/Rapport_moral_2011</a> + (in French & English), + <a href="2011/">financial report</a></li> + + <li>2010: + Moral report: , + <a href="2010/">financial report</a></li> + </ul> + </div> + </div> + </div> + </div> +</body> +</html> |