mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
check if session exists
This commit is contained in:
parent
17ca27d95b
commit
69c84c86fd
|
@ -100,7 +100,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
|
|||
$this->callHook('startPage');
|
||||
echo "<!DOCTYPE html>\n";
|
||||
echo "<html lang=\"";
|
||||
if($this->params['session'] && ($slang = $this->params['session']->getLanguage())) {
|
||||
if(!empty($this->params['session']) && ($slang = $this->params['session']->getLanguage())) {
|
||||
echo str_replace('_', '-', $slang);
|
||||
} else {
|
||||
echo str_replace('_', '-', $this->params['settings']->_language);
|
||||
|
@ -113,7 +113,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
|
|||
elseif($this->baseurl)
|
||||
echo '<base href="'.$this->baseurl.'">'."\n";
|
||||
$sitename = trim(strip_tags($this->params['sitename']));
|
||||
if($this->params['session'])
|
||||
if(!empty($this->params['session']))
|
||||
echo '<link rel="search" type="application/opensearchdescription+xml" href="'.$this->params['settings']->_httpRoot.'out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "").'"/>'."\n";
|
||||
echo '<link href="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/bootstrap/css/bootstrap.css" rel="stylesheet"/>'."\n";
|
||||
echo '<link href="'.$this->params['settings']->_httpRoot.'styles/'.$this->theme.'/bootstrap/css/bootstrap-responsive.css" rel="stylesheet"/>'."\n";
|
||||
|
@ -147,7 +147,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
|
|||
echo '<link rel="icon" href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/images/favicon.svg" type="image/svg+xml"/>'."\n";
|
||||
echo '<link rel="apple-touch-icon" sizes="180x180" href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/images/apple-touch-icon.png">'."\n";
|
||||
}
|
||||
if($this->params['session'] && $this->params['session']->getSu()) {
|
||||
if(!empty($this->params['session']) && $this->params['session']->getSu()) {
|
||||
?>
|
||||
<style type="text/css">
|
||||
.navbar-inverse .navbar-inner {
|
||||
|
@ -161,7 +161,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo "<title>".(strlen($sitename)>0 ? $sitename : "SeedDMS").(strlen($title)>0 ? ": " : "").htmlspecialchars($title)."</title>\n";
|
||||
echo "</head>\n";
|
||||
echo "<body".(strlen($bodyClass)>0 ? " class=\"".$bodyClass."\"" : "").">\n";
|
||||
if($this->params['session'] && $flashmsg = $this->params['session']->getSplashMsg()) {
|
||||
if(!empty($this->params['session']) && $flashmsg = $this->params['session']->getSplashMsg()) {
|
||||
$this->params['session']->clearSplashMsg();
|
||||
echo "<div class=\"splash\" data-type=\"".$flashmsg['type']."\"".(!empty($flashmsg['timeout']) ? ' data-timeout="'.$flashmsg['timeout'].'"': '').">".$flashmsg['msg']."</div>\n";
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
|
|||
$this->callHook('startPage');
|
||||
echo "<!DOCTYPE html>\n";
|
||||
echo "<html lang=\"";
|
||||
if($this->params['session'] && ($slang = $this->params['session']->getLanguage())) {
|
||||
if(!empty($this->params['session']) && ($slang = $this->params['session']->getLanguage())) {
|
||||
echo str_replace('_', '-', $slang);
|
||||
} else {
|
||||
echo str_replace('_', '-', $this->params['settings']->_language);
|
||||
|
@ -115,7 +115,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
|
|||
elseif($this->baseurl)
|
||||
echo '<base href="'.$this->baseurl.'">'."\n";
|
||||
$sitename = trim(strip_tags($this->params['sitename']));
|
||||
if($this->params['session'])
|
||||
if(!empty($this->params['session']))
|
||||
echo '<link rel="search" type="application/opensearchdescription+xml" href="'.$this->params['settings']->_httpRoot.'out/out.OpensearchDesc.php" title="'.(strlen($sitename)>0 ? $sitename : "").'"/>'."\n";
|
||||
$parenttheme = 'bootstrap';
|
||||
echo '<link href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/styles/seeddms.css" rel="stylesheet"/>'."\n";
|
||||
|
@ -149,7 +149,7 @@ class SeedDMS_Theme_Style extends SeedDMS_View_Common {
|
|||
echo '<link rel="icon" href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/images/favicon.svg" type="image/svg+xml"/>'."\n";
|
||||
echo '<link rel="apple-touch-icon" sizes="180x180" href="'.$this->params['settings']->_httpRoot.'views/'.$this->theme.'/images/apple-touch-icon.png">'."\n";
|
||||
}
|
||||
if($this->params['session'] && $this->params['session']->getSu()) {
|
||||
if(!empty($this->params['session']) && $this->params['session']->getSu()) {
|
||||
?>
|
||||
<style type="text/css">
|
||||
nav.navbar.fixed-top {
|
||||
|
@ -163,7 +163,7 @@ background-image: linear-gradient(to bottom, #882222, #111111);;
|
|||
echo "<title>".(strlen($sitename)>0 ? $sitename : "SeedDMS").(strlen($title)>0 ? ": " : "").htmlspecialchars($title)."</title>\n";
|
||||
echo "</head>\n";
|
||||
echo "<body".(strlen($bodyClass)>0 ? " class=\"".$bodyClass."\"" : "").">\n";
|
||||
if($this->params['session'] && $flashmsg = $this->params['session']->getSplashMsg()) {
|
||||
if(!empty($this->params['session']) && $flashmsg = $this->params['session']->getSplashMsg()) {
|
||||
$this->params['session']->clearSplashMsg();
|
||||
echo "<div class=\"splash\" data-type=\"".$flashmsg['type']."\"".(!empty($flashmsg['timeout']) ? ' data-timeout="'.$flashmsg['timeout'].'"': '').">".$flashmsg['msg']."</div>\n";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user