+<?php
+// Get a link helper instance
+$linkInstance = WebLinkHelper::createWebLinkHelper($this, 'company_links', 'index.php?app=ship-simu&page=login_area');
+
+// Preftech the user data
+$linkInstance->prefetchValueInstance('user');
+
+// Maximum of allowed companies reached?
+if ($linkInstance->getValueInstance()->ifUserCreatedMaximumAllowedCompanies()) {
+ // No more companies allowed to create
+} elseif ($linkInstance->getValueInstance()->ifUserPointsEnougth('found_new_company')) {
+ // Enough money to found company
+} elseif ($linkInstance->getValueInstance()->ifUserPointsEnougth('write_applications')) {
+ // Enough money to write applications to other companies
+} elseif ($linkInstance->getValueInstance()->ifGovermentPaysStartupHelp()) {
+ // Display link to goverment for startup help
+} // END - if
+
+if ($linkInstance->getValueInstance()->ifUserAllowTakeCreditsFromMoneyBank()) {
+ // Display link to money bank page
+} elseif ($linkInstance->getValueInstance()->ifUserHasMaximumCreditsWithMoneyBank()) {
+ // Maximum credits reached which a money bank can lent
+} else {
+ // Money bank is closed!
+}
+
+if ($linkInstance->getValueInstance()->ifRefillPageActive()) {
+ // Display link to refill page
+} else {
+ // Refill page not active
+}
+
+// Flush content to the template
+$linkInstance->flushContent();
+
+// End of PHP commands
+?>
<div class="table_header" id="list_company_header">
Auflistung der Reedereien, an denenen du dich beteiligst:
</div>
</div>
<div class="table_footer">
- [<a href="$config[base_url]/index.php?app=ship-simu&page=login_area&action=new_company" title="Hier kannst du mit ausreichend Guthaben eine neue Reederei gründen.">Neue Reederei gründen</a>] -
- [<a href="$config[base_url]/index.php?app=ship-simu&page=login_area&action=list_companies" title="Wenn du dich bei einer Reederei bewerben willst, versuche mal hier dein Glück.">Reedereien auflisten</a>] -
- [<a href="$config[base_url]/index.php?app=ship-simu&page=login_area&action=search_companies" title="Suche hier direkt nach einer Reederei anhand des Namens oder Firmenkürzels.">Reederei suchen</a>]
+ {?company_links?}
</div>