Skip to content

Commit

Permalink
Paul Becker (PaulT commit): header.php: Add link to the Dashboard in …
Browse files Browse the repository at this point in the history
…the AppInfoUserDiv. (Forum contribution: http://www.weberp.org/forum/showthread.php?tid=8100)

Signed-off-by: Tim Schofield <tim@weberpafrica.com>
  • Loading branch information
Paul Becker authored and timschofield committed Feb 27, 2018
1 parent 634c3f9 commit ee8e7eb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 25 deletions.
1 change: 1 addition & 0 deletions doc/Change.log
@@ -1,5 +1,6 @@
webERP Change Log

16/2/18 Paul Becker (PaulT commit): header.php: Add link to the Dashboard in the AppInfoUserDiv. (Forum contribution: http://www.weberp.org/forum/showthread.php?tid=8100)
16/2/18 PaulT: Remove unused $db parameter from many functions within the /api area.
16/2/18 PaulT: upgrade4.14.1-4.14.2.sql: Add SQL update to support commit 7961.
16/2/18 Paul Becker (PaulT commit): AgedControlledInventory.php: Add UOM to output. (Reported in forums: http://www.weberp.org/forum/showthread.php?tid=8091&pid=14286#pid14286)
Expand Down
51 changes: 26 additions & 25 deletions includes/header.php
Expand Up @@ -12,8 +12,8 @@
}
}

$ViewTopic = isset($ViewTopic)?'?ViewTopic=' . $ViewTopic : '';
$BookMark = isset($BookMark)? '#' . $BookMark : '';
$ViewTopic = isset($ViewTopic) ? '?ViewTopic=' . $ViewTopic : '';
$BookMark = isset($BookMark) ? '#' . $BookMark : '';
$StrictXHTML=False;

if (!headers_sent()){
Expand All @@ -28,52 +28,54 @@
}
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'<html xmlns="http://www.w3.org/1999/xhtml">',

'<head>',
'<link rel="icon" href="', $RootPath, '/favicon.ico" />',
'<link rel="shortcut icon" href="', $RootPath, '/favicon.ico" />';

if ($StrictXHTML) {
echo '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />';
} else {
echo '<meta http-equiv="Content-Type" content="application/html; charset=utf-8" />';
}

echo '<link href="', $RootPath, '/css/menu.css" rel="stylesheet" type="text/css" />';
echo '<link href="', $RootPath, '/css/print.css" rel="stylesheet" type="text/css" media="print" />',
echo '<link href="', $RootPath, '/css/menu.css" rel="stylesheet" type="text/css" />',
'<link href="', $RootPath, '/css/print.css" rel="stylesheet" type="text/css" media="print" />',
'<link href="', $RootPath, '/css/', $_SESSION['Theme'], '/default.css" rel="stylesheet" type="text/css" media="screen"/>',
'<meta name="viewport" content="width=device-width, initial-scale=1">',//To tell the small device that the website is a responsive site (keep relationship between CSS pixels and device pixels).
'<script type="text/javascript" src="', $RootPath, '/javascripts/MiscFunctions.js"></script>',
'<title>', $Title, '</title>';

// If it is set the $_SESSION['ShowPageHelp'] parameter AND it is FALSE, hides the page help text:
if(isset($_SESSION['ShowPageHelp']) AND !$_SESSION['ShowPageHelp']) {
echo '<style>.page_help_text, DIV.page_help_text {display:none;}</style>';
}
echo '</head>',

echo '</head>',
'<body>',
'<div id="CanvasDiv">',
'<input type="hidden" name="Lang" id="Lang" value="', $Lang, '" />',
'<div id="HeaderDiv">',
'<div id="HeaderWrapDiv">';

if (isset($Title)) {
echo '<div id="AppInfoDiv">'; //===HJ===
echo '<div id="AppInfoCompanyDiv">';
echo '<img alt="'._('Company').'" src="'.$RootPath.'/css/'.$_SESSION['Theme'].'/images/company.png" title="'._('Company').'" />' . stripslashes($_SESSION['CompanyRecord']['coyname']);
echo '</div>';
echo '<div id="AppInfoUserDiv">';
echo '<a href="'.$RootPath.'/UserSettings.php"><img alt="'._('User').'" src="'.$RootPath.'/css/'.$_SESSION['Theme'].'/images/user.png" title="'._('User').'" />' . stripslashes($_SESSION['UsersRealName']) . '</a>';
echo '</div>';
echo '<div id="AppInfoModuleDiv">';
echo '<div id="AppInfoDiv">', //===HJ===
'<div id="AppInfoCompanyDiv">',
'<img alt="', _('Company'), '" src="', $RootPath, '/css/', $_SESSION['Theme'], '/images/company.png" title="', _('Company'), '" />&nbsp;', stripslashes($_SESSION['CompanyRecord']['coyname']),
'</div>',
'<div id="AppInfoUserDiv">',
'<a href="', $RootPath, '/UserSettings.php">&nbsp;<img alt="', _('User'), '" src="', $RootPath, '/css/', $_SESSION['Theme'], '/images/user.png" title="', _('User'), '" />&nbsp;', stripslashes($_SESSION['UsersRealName']), '</a>',
' | <a href="', $RootPath, '/Dashboard.php">', _('Dashboard'), '</a>',
'</div>',
'<div id="AppInfoModuleDiv">';
// Make the title text a class, can be set to display:none is some themes
echo $Title;
echo '</div>';
echo '</div>'; // AppInfoDiv

echo '</div>',
'</div>'; // AppInfoDiv

echo '<div id="QuickMenuDiv"><ul id="menu">';
echo '<div id="QuickMenuDiv">
<ul id="menu">
<li><a href="', $RootPath, '/index.php">', _('Main Menu'), '</a>';

echo '<li><a href="'.$RootPath.'/index.php">' . _('Main Menu') . '</a>';
if (isset($_POST['AddToMenu'])) {
if (!isset($_SESSION['Favourites'][$_POST['ScriptName']])) {
$_SESSION['Favourites'][$_POST['ScriptName']] = $_POST['Title'];
Expand All @@ -85,17 +87,16 @@
if (isset($_SESSION['Favourites']) AND count($_SESSION['Favourites'])>0) {
echo '<ul>';
foreach ($_SESSION['Favourites'] as $url=>$ttl) {
echo '<li><a href="' . $url . '">' . _($ttl) . '<a></li>';

echo '<li><a href="', $url, '">', _($ttl), '<a></li>';
}
echo '</ul>';
}
echo '</li>'; //take off inline formatting, use CSS instead ===HJ===

if (count($_SESSION['AllowedPageSecurityTokens'])>1){
echo '<li><a href="'.$RootPath.'/SelectCustomer.php">' . _('Customers') . '</a></li>';
echo '<li><a href="'.$RootPath.'/SelectProduct.php">' . _('Items') . '</a></li>';
echo '<li><a href="'.$RootPath.'/SelectSupplier.php">' . _('Suppliers') . '</a></li>';
echo '<li><a href="', $RootPath, '/SelectCustomer.php">', _('Customers'), '</a></li>';
echo '<li><a href="', $RootPath, '/SelectProduct.php">', _('Items'), '</a></li>';
echo '<li><a href="', $RootPath, '/SelectSupplier.php">', _('Suppliers'), '</a></li>';
/* $DefaultManualLink = '<li><a rel="external" accesskey="8" href="' . $RootPath . '/doc/Manual/ManualContents.php'. $ViewTopic . $BookMark. '">' . _('Manual') . '</a></li>';
if (mb_substr($_SESSION['Language'],0,2) != 'en'){
if (file_exists('locale/'.$_SESSION['Language'].'/Manual/ManualContents.php')){
Expand All @@ -109,7 +110,7 @@
echo '<li><a href="', $RootPath, '/ManualContents.php', $ViewTopic, $BookMark, '" rel="external" accesskey="8">', _('Manual'), '</a></li>';
}

echo '<li><a href="'.$RootPath.'/Logout.php" onclick="return confirm(\''._('Are you sure you wish to logout?').'\');">' . _('Logout') . '</a></li>';
echo '<li><a href="', $RootPath, '/Logout.php" onclick="return confirm(\'', _('Are you sure you wish to logout?'), '\');">', _('Logout'), '</a></li>';

echo '</ul></div>'; // QuickMenuDiv
}
Expand Down

0 comments on commit ee8e7eb

Please sign in to comment.