Login area - company page now with more stubs
[shipsimu.git] / application / ship-simu / templates / de / code / action_login_company.ctp
1 <?php
2 // Get a link helper instance
3 $linkInstance = WebLinkHelper::createWebLinkHelper($this, 'company_links', 'index.php?app=ship-simu&amp;page=login_area');
4
5 // Preftech the user data
6 $linkInstance->prefetchValueInstance('user');
7
8 // Maximum of allowed companies reached?
9 if ($linkInstance->getValueInstance()->ifUserCreatedMaximumAllowedCompanies()) {
10         // No more companies allowed to create
11 } elseif ($linkInstance->getValueInstance()->ifUserPointsEnougth('found_new_company')) {
12         // Enough money to found company
13 } elseif ($linkInstance->getValueInstance()->ifUserPointsEnougth('write_applications')) {
14         // Enough money to write applications to other companies
15 } elseif ($linkInstance->getValueInstance()->ifGovermentPaysStartupHelp()) {
16         // Display link to goverment for startup help
17 } // END - if
18
19 if ($linkInstance->getValueInstance()->ifUserAllowTakeCreditsFromMoneyBank()) {
20         // Display link to money bank page
21 } elseif ($linkInstance->getValueInstance()->ifUserHasMaximumCreditsWithMoneyBank()) {
22         // Maximum credits reached which a money bank can lent
23 } else {
24         // Money bank is closed!
25 }
26
27 if ($linkInstance->getValueInstance()->ifRefillPageActive()) {
28         // Display link to refill page
29 } else {
30         // Refill page not active
31 }
32
33 // Flush content to the template
34 $linkInstance->flushContent();
35
36 // End of PHP commands
37 ?>
38 <div class="table_header" id="list_company_header">
39         Auflistung der Reedereien, an denenen du dich beteiligst:
40 </div>
41
42 <div class="table_list">
43         {?company_list?}
44 </div>
45
46 <div class="table_footer">
47         {?company_links?}
48 </div>