<?php\r
+\r
class commonPage {\r
- public static function header($args)\r
- {\r
+\r
+ public static function header($args) {\r
global $js;\r
global $core;\r
// Entête HTML\r
if ($core->user) {\r
$search = self::search($args);\r
\r
- $class = $search?' class="with-search"':'';\r
+ $class = $search ? ' class="with-search"' : '';\r
// Le message personnalisé avec un lien pour se déconnecter\r
$res .= '<div id="welcome"' . $class . '>' . __('Bienvenue') . ' ' . $core->user->prenom . ' ' . $core->user->nom . ' ';\r
$res .= '| <a href="#" class="popup" rel="mesParametres">' . __('Mes paramètres') . '</a> ';\r
return $res;\r
}\r
\r
- public static function search($args)\r
- {\r
+ public static function search($args) {\r
global $core;\r
\r
if (!commonDroits::recherche($args[0])) {\r
$settings = $core->user->getSettings($args[0]);\r
$action = 'search' . ucfirst($args[0]);\r
\r
- $default = isset($_POST['q'])?$_POST['q']:__('Rechercher');\r
+ $default = isset($_POST['q']) ? $_POST['q'] : __('Rechercher');\r
// Formulaire de recherche\r
$res = '<form action="' . $action . '" method="post">';\r
$res .= '<div id="search">' . form::field('q', 20, 128, $default, 'empty_field') . '<a href="#" class="submit">' . cubeMedia::spacer(22, 22) . '</a></div>';\r
return $res;\r
}\r
\r
- public static function nav($args)\r
- {\r
+ public static function nav($args) {\r
// Barre d'onglets\r
global $core;\r
// Liste des onglets\r
$supp = array('stats' => 'publications');\r
\r
$res = '<div id="nav">';\r
- foreach($onglets as $titre => $url) {\r
+ foreach ($onglets as $titre => $url) {\r
// Si cet onglet correspond à la page active, on le place actif\r
- $active = ($args[0] == $url || (isset($supp[$args[0]]) && $supp[$args[0]] == $url))?' class="active"':'';\r
+ $active = ($args[0] == $url || (isset($supp[$args[0]]) && $supp[$args[0]] == $url)) ? ' class="active"' : '';\r
$res .= '<a href="' . SITE_PATH . $url . '"' . $active . '>' . cubeMedia::cssRollover($core->typo->Onglet($titre, '', false)) . '</a>';\r
}\r
$res .= '</div>';\r
return $res;\r
}\r
\r
- public static function barre($filtres = null, $action = null, $dashboard = null, $shortcuts = null)\r
- {\r
+ public static function barre($filtres = null, $action = null, $dashboard = null, $shortcuts = null) {\r
if (is_null($shortcuts) && is_null($filtres)) {\r
return '<div id="bar" class="vide"></div>';\r
}\r
if (!is_null($filtres) && is_array($filtres)) {\r
$res .= '<form action="' . $action . '" method="post" class="submitonchange">';\r
$hasRealFilters = false;\r
- foreach($filtres as $filtre) {\r
+ foreach ($filtres as $filtre) {\r
$res .= $filtre->display();\r
if ($filtre instanceof commonFiltre) {\r
$hasRealFilters = true;\r
return $res;\r
}\r
\r
- public static function shortcuts($shortcuts)\r
- {\r
+ public static function shortcuts($shortcuts) {\r
global $core;\r
\r
$res = '';\r
- foreach($shortcuts as $s) {\r
+ foreach ($shortcuts as $s) {\r
$res .= '<div class="shortcut">' . $s . '</div>';\r
}\r
return $res;\r
}\r
\r
- public static function tMain($id = null, $big = false)\r
- {\r
- $id = is_null($id)?'':' id="' . $id . '"';\r
- $big = $big?' class="big"':'';\r
+ public static function tMain($id = null, $big = false) {\r
+ $id = is_null($id) ? '' : ' id="' . $id . '"';\r
+ $big = $big ? ' class="big"' : '';\r
return '<div id="main"' . $big . '><div id="logo-main"></div><div class="content"' . $id . '>';\r
}\r
\r
- public static function bh($class = null)\r
- {\r
- $class = is_null($class)?' class="b"':' class="b ' . $class . '"';\r
+ public static function bh($class = null) {\r
+ return '<div class="b">';\r
+ $class = is_null($class) ? ' class="b"' : ' class="b ' . $class . '"';\r
+\r
+\r
\r
$res = '<table' . $class . '>';\r
$res .= '<tr class="b-top">';\r
return $res;\r
}\r
\r
- public static function bf($max = false)\r
- {\r
+ public static function bf($max = false) {\r
+ return '</div>';\r
$res = '</div></td><td class="b-e"></td>';\r
$res .= '</tr>';\r
$res .= '<tr class="b-footer">';\r
return $res;\r
}\r
\r
- public static function pager($current, $nb, $par_page, $url)\r
- {\r
+ public static function pager($current, $nb, $par_page, $url) {\r
$style = 'pgleft';\r
if ($par_page == 0 || $nb <= $par_page) {\r
return;\r
return $res;\r
}\r
\r
- public static function bMain()\r
- {\r
+ public static function bMain() {\r
return '</div></div>';\r
}\r
\r
- public static function footer()\r
- {\r
+ public static function footer() {\r
$res = '<div id="footer"></div>';\r
$res .= cubePage::googleAnalytics(GA);\r
$res .= '</body>';\r
$res .= '</html>';\r
return $res;\r
}\r
+\r
}\r
\r
?>
\ No newline at end of file
}\r
\r
\r
-\r
-/* Cadre */\r
-.b{margin:0 auto;}\r
-.b-c{overflow:hidden;}\r
-.b-c>div{background:#fff;}\r
-.b-c>div table{width:100%;}\r
-.b-nw{background:url(b-nw.png) no-repeat transparent;}\r
-.b-n{background:url(b-n.png) repeat-x;}\r
-.b-ne{background:url(b-ne.png) no-repeat transparent;}\r
-.b-w{background:url(b-w.png) repeat-y transparent;}\r
-.b-e{background:url(b-e.png) repeat-y top right transparent;}\r
-.b-sw{background:url(b-sw.png) no-repeat bottom left transparent;}\r
-.b-s{background:url(b-s.png) repeat-x;}\r
-.b-se{background:url(b-se.png) no-repeat transparent;}\r
-\r
-.b-nw, .b-sw, .b-w{width:12px;max-width:12px;min-width:12px;}\r
-.b-ne, .b-se, .b-e{width:11px;max-width:11px;min-width:11px;}\r
-.b-n, .b-ne, .b-nw{height:11px;max-height:11px;min-height:11px;}\r
-.b-s, .b-se, .b-sw{height:10px;max-height:10px;min-height:10px;}\r
-.b-n, .b-s{width:auto;}\r
-.b-e, .b-w{height:auto;}\r
-\r
.popupOverlay{background:#666;opacity:0;position:fixed;display:none;top:0px;left:0px;width:100%;height:100%;}\r
.popupWindow{display:none;opacity:1;position:fixed;}\r
/*.popupWindow>table{width:600px;}*/\r
\r
.content .swfPanel{height:100%;}\r
\r
-.big .liste{width:1180px !important;}\r
.big .liste td{font-size:11px !important;padding-left:5px;padding-right:5px;}\r
.big .liste th{padding-left:5px;padding-right:5px;}\r
.big .content{width:1210px;}\r
background-position:bottom left;\r
}\r
\r
-\r
-/* Cadre */\r
-.b{margin:0 auto;}\r
-.b-c{overflow:hidden;}\r
-.b-c>div{background:#fff;}\r
-.b-c>div table{width:100%;}\r
-.b-nw{background:url(b-nw.png) no-repeat transparent;}\r
-.b-n{background:url(b-n.png) repeat-x;}\r
-.b-ne{background:url(b-ne.png) no-repeat transparent;}\r
-.b-w{background:url(b-w.png) repeat-y transparent;}\r
-.b-e{background:url(b-e.png) repeat-y top right transparent;}\r
-.b-sw{background:url(b-sw.png) no-repeat bottom left transparent;}\r
-.b-s{background:url(b-s.png) repeat-x;}\r
-.b-se{background:url(b-se.png) no-repeat transparent;}\r
-\r
-.b-nw, .b-sw, .b-w{width:12px;max-width:12px;min-width:12px;}\r
-.b-ne, .b-se, .b-e{width:11px;max-width:11px;min-width:11px;}\r
-.b-n, .b-ne, .b-nw{height:11px;max-height:11px;min-height:11px;}\r
-.b-s, .b-se, .b-sw{height:10px;max-height:10px;min-height:10px;}\r
-.b-n, .b-s{width:auto;}\r
-.b-e, .b-w{height:auto;}\r
-\r
.popupOverlay{background:#a8aa95;opacity:0;position:fixed;display:none;top:0px;left:0px;width:100%;height:100%;}\r
.popupWindow{display:none;opacity:1;position:fixed;}\r
/*.popupWindow>table{width:600px;}*/\r
\r
.downbookContextMenu a{\r
text-decoration:none;\r
-}\r
-\r
-\r
+}
\ No newline at end of file