]> dev.renevier.net Git - syj.git/blob - application/layouts/scripts/footer.phtml
my account link appears when logging from main page
[syj.git] / application / layouts / scripts / footer.phtml
1 <?php
2 echo '<div id="footer">' . PHP_EOL;
3 echo '<div id="footer-padding"></div>' . PHP_EOL;
4
5 /*
6  * main page link
7  */
8
9 $front = Zend_Controller_Front::getInstance();
10 $reqParams = $front->getRequest()->getParams();
11 if ($reqParams['controller'] == 'idx' and (!isset($reqParams['url']))) {
12     $mainpage = true;
13 } else {
14     $mainpage = false;
15 }
16
17 $content = $this->translate("create a route");
18 $link = ($mainpage) ? $this->escape($content) : $this->anchor($this->baseUrl(), $content, array('class' => 'footer-anchor'));
19 echo '<div class="footer-link">' . $link . '</div>' . PHP_EOL;
20
21 /*
22  * contact page link
23  */
24 echo $this->footerLink(array(
25         'action'     => 'index',
26         'controller' => 'contact',
27         'route' => 'contact'),
28     $this->translate("contact"),
29     isset($this->redirectLinks) ? $this->redirectLinks : true);
30
31 /*
32  * account link
33  */
34 if ($mainpage or $this->loggedUser) {
35     echo $this->footerLink(array(
36             'route' => 'account',
37             'action'     => 'index',
38             'controller' => 'account'),
39         $this->translate("my account"), true,
40         'logged-show');
41 }
42
43 /*
44  * login or logout links
45  */
46 if (!$mainpage) {
47     if ($this->loggedUser) {
48
49         echo $this->footerLink(array(
50             'route' => 'logout',
51             'action'     => 'logout',
52             'controller' => 'login'),
53         $this->translate("logout"),
54         false);
55     } else {
56         echo $this->footerLink(array(
57             'route' => 'login',
58             'action'     => 'login',
59             'controller' => 'login'),
60         $this->translate("login"),
61         isset($this->redirectLinks) ? $this->redirectLinks : true
62         );
63     }
64 }
65
66 /*
67  * termsofuse
68  */
69 echo $this->footerLink(array(
70     'route' => 'termsofuse',
71     'action'     => 'index',
72     'controller' => 'termsofuse'),
73     $this->translate("terms of use"),
74     false);
75
76 echo '</div>' . PHP_EOL;
77
78 ?>