]> dev.renevier.net Git - syj.git/blob - application/layouts/scripts/footer.phtml
syj session controller helper
[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("main page");
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  * login, logout, account links
33  */
34 if ($this->loggedUser) {
35     echo $this->footerLink(array(
36             'route' => 'account',
37             'action'     => 'index',
38             'controller' => 'account'),
39         $this->translate("my account"));
40     if (!$mainpage) {
41         echo $this->footerLink(array(
42             'route' => 'logout',
43             'action'     => 'logout',
44             'controller' => 'login'),
45         $this->translate("logout"),
46         false);
47     }
48 } else {
49     if (!$mainpage) {
50         echo $this->footerLink(array(
51             'route' => 'login',
52             'action'     => 'login',
53             'controller' => 'login'),
54         $this->translate("login"),
55         isset($this->redirectLinks) ? $this->redirectLinks : true
56         );
57     }
58 }
59
60 /*
61  * termsofuse
62  */
63 echo $this->footerLink(array(
64     'route' => 'termsofuse',
65     'action'     => 'index',
66     'controller' => 'termsofuse'),
67     $this->translate("terms of use"),
68     false);
69
70 echo '</div>' . PHP_EOL;
71
72 ?>