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