<?php

include '../Include/xplanetbg.inc.php';

$hintergrundbild "xplanet xpb xp"$xplanet_bg " b" $xplanet_bg ".123"/* Ist eigentlich kein Bild mehr, sondern eine "class" */
$description "The redistribution of money through interest within a society.";
$keywords=", dept, financial crisis, economic crisis, crash, capitalism, “Miracle of Compound Interest”";
$titel "The redistribution through interest visualised";
$root "../";

$css "
 table.daten { color:black;float:right; }
 table.daten, div.daten, img.wborder {border-width:1px;border-color:white;border-style:solid;margin:0.5em; }
 table.daten th { text-align:center; }
 blockquote {font-style:italic;margin-bottom:0.6em;}
 img.rechtsBild, img.linksBild {border-color:white;}

 td.ergebnis, td.nergebnis, td.pergebnis { width:3em; }
 td.ergebnis { color:black;}
 td.nergebnis { color:red;}
 td.pergebnis { color:green;}
 "
;

if (!
function_exists('svg_embed')){
  include 
$root 'Include/svg_embed.inc';
}

/* Name der tatsächlichen Inhaltsdatei: */
$filename __FILE__;

$ietext '<div>Your web browser is too old! With <a href="http://en.wikipedia.org/wiki/Internet_Explorer_9" title="Internet Explorer article in Wikipedia">version 9</a> (early 2011?) even the <i>Internet Explorer</i> can finally do what other browsers like <a href="http://firefox.com/" title="recommended browser">Firefox</a>, Opera,or Safari can already do it for years: display <a href="http://en.wikipedia.org/wiki/Scalable_Vector_Graphics" title="SVG explained">SVG</a>.</div>';

if (
$_POST['anwenden']) {
  
/*  $v = $_POST['v'];
  for ($i = 0; $i < (10); $i++)
  $v[$i] = $_POST['v']['$i']; */
  
$zeige_summen $_POST['zeige_summen'];
  
$zinssatz_n $_POST['zinssatz_n'] / 100;
  
$zinssatz_r $_POST['zinssatz_r'] / 100;
  
$zinsanteil $_POST['zinsanteil'] / 100;
  
$zinsanteil_ber $_POST['zinsanteil_ber'];
  
$haushalte_pro_gruppe $_POST['haushalte_pro_gruppe'];
  
reset($_POST);
  
$v[1] = current($_POST);
  for (
$i 2$i <= 10$i++)
    
$v[$i] = next($_POST);
  for (
$i 1$i <= 10$i++)  
    
$ea[$i] = next($_POST);
  for (
$i 1$i <= 10$i++)  
    
$s[$i] = next($_POST);
}
else
{
  
/* Vermögen: */
  
$v = array(=> 000312601262345971965);
  
/* Einkommen: */
  /*  $e = array(1 => 12, 19, 24, 28, 32, 38, 43, 49, 59, 101); */
  /* Einkomen aus Arbeit: */
  
$ea = array(=> 12192427.931.535.738.241.136.310.6);
  
/* Ersparnisse: */
  
$s = array(=> 000.31.12.23.64.75.59.716.8);
  
/* Zinssätze "normal" und "reich" */
  
$zinssatz_n 0.038;
  
$zinssatz_r 0.046;
  
$zinsanteil 0.348;
  
$haushalte_pro_gruppe 3.8;
  
$zeige_summen FALSE;
  
$zinsanteil_ber FALSE;
};

/* Zinsanteile an Haushaltseinkommen und -ausgaben werden berechnet: */
for ($i 1$i <= 10$i++){
  
$ez[$i] = ($i 10 $v[$i] * $zinssatz_n $v[$i] * $zinssatz_r); /* Zinseinkommen */
  
$e[$i] = $ea[$i] + $ez[$i];
  if ( 
$s[$i] > $e[$i] )
    
$s[$i] = $e[$i];
  
$a[$i] = $e[$i] - $s[$i];
}

if (
$zinsanteil_ber) {
  
$alle_ausgaben 0;
  
$alle_zinsen 0;
  for (
$i 1$i <= 10$i++){
    
$alle_zinsen += $ez[$i];
    
$alle_ausgaben += $a[$i];
  }
  
$zinsanteil $alle_zinsen $alle_ausgaben;
}

for (
$i 1$i <= 10$i++)
  
$az[$i] = $a[$i] * $zinsanteil/* Zinslasten */

/* Die Summen für die Gruppen werden nur berechnet, wenn sie gezeigt werden sollen */
if ($zeige_summen){
  
$v_gruppensumme '<tr style="font-style:italic;">
<td class="xpw">billions € per group</td>'
;
  
$e_gruppensumme $v_gruppensumme;
  
$s_gruppensumme $v_gruppensumme;
  
$a_gruppensumme $v_gruppensumme;
  
$z_gruppensumme $v_gruppensumme;
  for (
$j 1$j <= 10$j++){
    
$v_gruppensumme $v_gruppensumme '<td>' round($v[$j] * $haushalte_pro_gruppe1) . '</td>';
    
$e_gruppensumme $e_gruppensumme '<td>' round($e[$j] * $haushalte_pro_gruppe1) . '</td>';
    
$s_gruppensumme $s_gruppensumme '<td>' round($s[$j] * $haushalte_pro_gruppe1) . '</td>';
    
$a_gruppensumme $a_gruppensumme '<td>' round($a[$j] * $haushalte_pro_gruppe1) . '</td>';
    
$saldo = ($ez[$j] - $az[$j]) * $haushalte_pro_gruppe;
    
$z_gruppensumme $z_gruppensumme '<td class="' . ($saldo >= 0'p' 'n') . 'ergebnis">' round($saldo1) . '</td>';   
  }
  
$v_gruppensumme $v_gruppensumme '</tr>';
  
$z_gruppensumme $z_gruppensumme '</tr>';
  
$e_gruppensumme $e_gruppensumme '</tr>';
  
$s_gruppensumme $s_gruppensumme '</tr>';
}

for (
$i 1$i <= 10$i++){
  
$v_summe += $v[$i]; /* nicht die Summe aller Vermögen, sondern nur die je eines Haushalts pro Gruppe */
  
$e_summe += $e[$i]; /* nicht die Summe aller Einkommen... */
  
$s_summe += $s[$i]; /* nicht die Summe aller Ersparnisse... */
  
$a_summe += $a[$i]; /* nicht die Summe aller Ausgaben... */
}

for (
$i 1$i <= 10$i++){
  
$v_gruppenprozent $v_gruppenprozent '<td>' round(($v[$i] / $v_summe 100), 1) . '</td>';
  
$v_gruppeneink =  $v_gruppeneink '<td><input name="v' $i '" type="text" size="4" maxlength="4" value="' $v[$i] . '"></td>';
  
$e_gruppenprozent $e_gruppenprozent '<td>' round(($e[$i] / $e_summe 100), 1) . '</td>'
  
$e_zinsen $e_zinsen '<td>' round($ez[$i], 1) . '</td>';   
  
$e_arbeit $e_arbeit '<td><input name="ea' $i '" type="text" size="4" maxlength="4" value="' $ea[$i] . '"></td>';
  
$e_gruppeneink $e_gruppeneink '<td>' round($e[$i], 1) . '</td>';   
  
$s_gruppenprozent $s_gruppenprozent '<td>' round(($s[$i] / $s_summe 100), 1) . '</td>'
  
$s_gruppeneink $s_gruppeneink .  '<td><input name="s' $i '" type="text" size="4" maxlength="4" value="' $s[$i] . '"></td>';
  
$a_gruppenprozent $a_gruppenprozent '<td>' round(($a[$i] / $a_summe 100), 1) . '</td>'
  
$a_zinsen $a_zinsen '<td>' round($az[$i], 1) . '</td>';   
  
$a_gruppenausg $a_gruppenausg .  '<td class="ergebnis">' round($a[$i], 1) . '</td>';
}

/* Zinssaldenberechnung */
for ($k 1$k <= 10$k++){
  
$saldo $ez[$k] - $az[$k];
  
$saldosumme += $saldo;
  
$zinssaldo $zinssaldo '<td class="' . ($saldo >= 0'p' 'n') . 'ergebnis">' round($saldo1) . '</td>';   
}

/* Parameter für Visualisierung */
for ($k 1$k <= 10$k++){
  
$parameter $parameter "&amp;e$k=" $e[$k] . "&amp;a$k=" $a[$k] . "&amp;z$k=" $ez[$k] . "&amp;l$k=" $az[$k];
}

$text $text '

<h2>Distribution of capital:</h2>

<form method="post" action="index.php.en" accept-charset="utf-8">
<table>
<tr>
  <th>Group</th>
  <th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>10</th>
</tr>
<tr>
  <td>in % per group</td>' 
.
  
$v_gruppenprozent '
</tr>
<tr>
  <td title="in thousand € per household">in k € / househ.</td>' 
.
  
$v_gruppeneink '
</tr>'
.  $v_gruppensumme '
</table>

<h2>Distribution of household incomes:</h2>

<table>
<tr>
  <th>group</th>
  <th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>10</th>
</tr>
<tr>
  <td>in % per group</td>' 
.
  
$e_gruppenprozent '
</tr>
<tr>
  <td title="interest in thousand € per household">from interest*</td>' 
.
  
$e_zinsen '  
</tr>
<tr>
  <td title="Wages etc / in thousand € per household">other income</td>' 
.
  
$e_arbeit '
</tr>
<tr>
  <td title="in thousand € per household">in k € / housh.</td>' 
.
  
$e_gruppeneink '
</tr>' 
.
  
$e_gruppensumme '
</table>

<h2>Distribution of the annual savings:</h2>

<table>
<tr>
  <th>group</th>
  <th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>10</th>
</tr>
<tr>
  <td>in % je group</td>' 
.
  
$s_gruppenprozent '
</tr>
<tr>
  <td title="in thousand € per household">in k € / househ.</td>' 
.
  
$s_gruppeneink '
</tr>' 
.
  
$s_gruppensumme '
</table>

<h2>Distribution of household expenses:</h2>

<table>
<tr>
  <th>group</th>
  <th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>10</th>
</tr>
<tr>
  <td>in % je group</td>' 
.
  
$a_gruppenprozent '
</tr>
<tr class="xpw">
  <td title="in thousand € per household">in k € / househ.</td>' 
.
  
$a_gruppenausg '
</tr>
<tr>
  <td title="interest burden in thousand € per household">interest burden included*</td>' 
.
  
$a_zinsen '  
</tr>' 
.
  
$a_gruppensumme '
</table>


<h2>Redistribution through interest:</h2>

<table>
<tr>
  <th>group</th>
  <th>1</th><th>2</th><th>3</th><th>4</th><th>5</th><th>6</th><th>7</th><th>8</th><th>9</th><th>10</th>
</tr>
<tr>
  <td title="annual interest burden in thousand € per household">interest burden<small> (k € / hh.)</small></td>' 
.
  
$a_zinsen '
</tr>
<tr>
  <td title="annual interest income in thousand € per household">interest<small> (k € / hh.)</small></td>' 
.
  
$e_zinsen '
</tr>
<tr class="xpw">
  <td title="annual interest balance in thousand € per household">interest balance<small> (k € / hh.)</small></td>' 
.
  
$zinssaldo '  
</tr>'
$z_gruppensumme '
</table>

<h3>Settings:</h3>

<div style="float:left;"><input type="submit" value="submit" name="anwenden" title="Calculates the redistribution according to the user input"></div>

<div style="margin-left:6em;margin-top:0em;">
“ordinary” interest rate: <input name="zinssatz_n" type="text" size="3" maxlength="4" title="Interest rate for the lower nine tenths" value="' 
$zinssatz_n 100 '">% 
&nbsp; interest rate “rich”: <input name="zinssatz_r" type="text" size="3" maxlength="4" title="Interest rate for the richtest tenth" value="' 
$zinssatz_r 100 '">% 
<br>
Interest component: <input name="zinsanteil" type="text" size="3" maxlength="4" value="' 
$zinsanteil 100 '" title="average interest component in all prices">%
<input name="zinsanteil_ber" type="checkbox" ' 
. ($zinsanteil_ber 'checked ' '') . 'title="calculates an interest component that matches the interest income from the capital"> determine automatically
<br>show <i>group sums</i>: <input name="zeige_summen" type="checkbox" '
. ($zeige_summen 'checked ' '') . 'title="little additional information">
&nbsp; households per group (in mill.): <input name="haushalte_pro_gruppe" type="text" size="4" maxlength="5" title="only relevant when group sums are displayed" value="' 
$haushalte_pro_gruppe '">
</div>
</form>

<div style="width:90%;margin:auto;margin-top:1em;margin-bottom:1em;color:black;" class="daten xpw">'
 
svg_embed("redistribution.php?titel=Redistribution_through_interest" $parameter"umverteilung.png""100%""""475""305""Graph"$ietext''""""0) . '</div>

<p>The ten household groups each consist of ' 
$haushalte_pro_gruppe ' million households and are arranged according to their capital. The total capital thus is ' round($v_summe $haushalte_pro_gruppe) . ' billion €.</p>

<p>Sum over the balance row (should be close to 0): ' 
round($saldosumme1) . ' <small> - This much profit (if positive) ten average households (one from each group) make from the interest system (probably at the expense of corporations, the state, or foreign countries) - together ' round($saldosumme $haushalte_pro_gruppe2) . ' billion €.</small></p>

.

svg_embed("vermoegensverteilung_bpb_web.svg""vermoegensverteilung_bpb_web.png""32em""""450""365""Capital distribution"$ietext''"margin:1em;float:right;clear:both;"" class='xpw' id='verteilung'"0)

.

'
<p>All num­bers used in the cal­cu­la­tions can be modi­fied through the input fields! The pre­set num­bers are from <a href="http://helmut-creutz.de/" title="The German activist’s website">Hel­mut Creutz</a>’ ar­ti­cle <i>Wie groß ist die Umverteilung durch den Zins?</i> (“How big is the re­dis­tri­bu­tion caused by in­ter­est?”) in <a href="http://inwo.de/index.php?id=139" title="The German paper’s website">Fair­con­o­my</a> no 3/ 2010, and rep­re­sent the si­t­u­a­tion in Ger­many. The gen­er­al table lay­out is also derived from the ta­bles in the ar­ti­cle, but I used a dif­fer­ent model for my graph, a <a href="http://www.rheinahrcampus.de/fileadmin/prof_seiten/kremer/applets/DynamicAnalysis/AppletDynamicAnalysis.html" title="...show, that the economies studied with realistic initial input and under standard assumptions become instable in the long run...">sim­u­la­tion</a> by busi­ness math­e­mati­cian <a href="http://kremer.rheinahrcampus.de/" title="The scientist’s website">Prof. Dr. Jür­gen Kre­mer</a>.</p>

<p>The pre­set val­ues for the cap­i­tal dis­tri­bu­tion are sim­i­lar to what the <a href="http://www.bpb.de/wissen/U4CJQA,0,Verm%F6gensverteilung.html" title="They assume a total capital of 8 instead of about 10 Billionen €, but that is not relevant for the principle shown here">Bun­des­zen­­tra­le für Po­li­ti­sche Bil­­dung</a> (<i>Fed­er­al Cen­ter for Po­lit­i­cal Ed­u­ca­tion</i>) pub­lished in 2009 (see graph on the right).
</p>

<p><small>*Interest is calculated as <i>capital times interest rate</i>, the interest burden as <i>expenses times interest component</i>. The expenses are calculated as <i>income minus savings</i>.</small></p>

<p><small>The <b>source codes</b> of <a href="index_en.phps">this page</a> and the <a href="redistribution.phps">SVG graph</a> can be accessed and reused.</small></p>

'
;

include 
'../Include/layoutE.inc.php';

?>