3326c51f4405e4c7f7c2bcca1cd686d4b1ed8eeb
[shipsimu.git] / application / ship-simu / templates / de / code / login_main.ctp
1 <?php
2 ///////////////////////////////
3 // Assign personal user data //
4 ///////////////////////////////
5
6 // Get a new instance for personal data
7 $blockInstance = WebBlockHelper::createWebBlockHelper($this, 'persona_data');
8
9 // Set the data source instance which must exist in registry
10 $blockInstance->prefetchValueInstance('user');
11
12 // Assign fields with template variables
13 $blockInstance->assignField('username');
14
15 // Shall we include registration date?
16 if ($blockInstance->ifIncludeRegistrationStamp()) {
17         // Then assign it as well!
18         $blockInstance->assignFieldWithFilter('registered', 'formatTimestamp');
19 } // END - if
20
21 // Flush the content out to a template variable
22 $blockInstance->flushContent();
23
24 //////////////////////////////////////
25 // Assign the shipping company data //
26 //////////////////////////////////////
27
28 // Get a new instance for personal data
29 $blockInstance = WebBlockHelper::createWebBlockHelper($this, 'company_data');
30
31 // Get the user instance 
32 $userInstance = Registry::getRegistry()->getInstance('user');
33
34 // Get a shipping company instance ready
35 $companyInstance = ObjectFactory::createObjectByConfiguredName('company_class', array($userInstance));
36
37 // Flush the content out to a template variable
38 //$blockInstance->flushContent();
39
40 // End of all PHP commands
41 ?>
42 <div id="content_header">
43         Willkommen im Loginbereich  von {?app_full_name?}!
44 </div>
45
46 <div id="content_body">
47         {?login_content?}
48 </div>
49
50 <div id="persona_data" title="Informationen zu Deinem Spieleaccount">
51         <div id="persona_header">
52                 Account-Infos:
53         </div>
54
55         <div id="persona_body">
56                 {?persona_data?}
57         </div>
58
59         <div id="logout_link">
60                 [<a href="$config[base_url]/index.php?app=ship-simu&amp;page=login_area&amp;action=logout"
61                  title="Aus dem Spiel ausloggen">Ausloggen</a>]
62         </div>
63 </div>
64
65 <div id="company_data" title="Informationen zu der aktuell ausgew&auml;hlten Reederei">
66         <div id="company_header">
67                 Reederei-Infos:
68         </div>
69
70         <div id="company_body">
71                 {?company_data?}
72         </div>
73 </div>