/** * Copyright (C) 2008-2011 Ulteo SAS * http://www.ulteo.com * Author Laurent CLOUET <*****@*****.**> 2008-2010 * Author Jeremy DESVAGES <*****@*****.**> 2008-2010 * Author Julien LANGLOIS <*****@*****.**> 2008-2011 * Author Omar AKHAM <*****@*****.**> 2011 * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; version 2 * of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. **/ function header_static($title_ = false) { $title_ = DEFAULT_PAGE_TITLE; $logo_url = DEFAULT_LOGO_URL; global $html_dir; $html_dir = get_component_orientation(); echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="' . $html_dir . '"> <head> <title>' . $title_ . ' - ' . _('Administration') . '</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="shortcut icon" type="image/png" href="media/image/favicon.ico" /> <link rel="stylesheet" type="text/css" href="media/style/common.css" /> <link rel="stylesheet" type="text/css" href="media/script/lib/nifty/niftyCorners.css" /> <script type="text/javascript" src="media/script/lib/nifty/niftyCorners.js" charset="utf-8"></script> <script type="text/javascript" charset="utf-8"> NiftyLoad = function() { Nifty(\'div.rounded\'); } </script> <script type="text/javascript" src="media/script/lib/prototype/prototype.js" charset="utf-8"></script> <script type="text/javascript" src="media/script/lib/scriptaculous/scriptaculous.js" charset="utf-8"></script> <script type="text/javascript" src="media/script/lib/scriptaculous/slider.js" charset="utf-8"></script> <script type="text/javascript" src="media/script/common-regular.js" charset="utf-8"></script> <script type="text/javascript" src="media/script/sortable.js" charset="utf-8"></script> <script type="text/javascript" src="media/script/common.js" charset="utf-8"></script> <script type="text/javascript" src="media/script/ajax/configuration.js" charset="utf-8"></script> </head> <body> <div id="mainWrap"> <div id="headerWrap" style="border-bottom: 1px solid #ccc;"> <table style="width: 100%;" border="0" cellspacing="0" cellpadding="0"> <tr> <td style="text-align: left" class="logo">'; if (isset($logo_url) && $logo_url != '') { echo '<a href="index.php"><img src="' . $logo_url . '" alt="' . $title_ . '" title="' . $title_ . '" /></a>'; } echo ' </td> <td style="text-align: center; width: 100%;" class="title centered"> <h1 class="centered">' . $title_ . ' - ' . _('Administration') . '</h1> </td> </tr> </table> </div> <div class="spacer"></div> <div id="pageWrap">'; if (isset($_GET['error']) && $_GET['error'] != '') { echo '<p class="msg_error">' . $_GET['error'] . '</p><br /><br />'; } }
function page_header($params_ = array()) { $title = 'Open Virtual Desktop - ' . _('Administration'); if (isset($_SESSION['errormsg'])) { $errors = array_unique($_SESSION['errormsg']); unset($_SESSION['errormsg']); } else { $errors = array(); } if (isset($_SESSION['infomsg'])) { $infos = array_unique($_SESSION['infomsg']); unset($_SESSION['infomsg']); } else { $infos = array(); } if (is_premium()) { $link = array("<a href='/ovd/admin/certificate.php'>", "</a>"); $expirity = $_SESSION['service']->has_valid_certificate(); if ($expirity !== false) { $expirity = ceil(($expirity - gmmktime()) / (60 * 60 * 24)); if ($expirity > 0 && $expirity < 20) { $errors[] = sprintf(_("Your %sPremium Edition Subscription Key%s will expire in %d days"), $link[0], $link[1], $expirity); } elseif ($expirity <= 0) { $errors[] = sprintf(_("Your %sPremium Edition Subscription Key%s has expired."), $link[0], $link[1]); } } else { $errors[] = sprintf(_("You don't have any valid %sPremium Edition Subscription Keys%s."), $link[0], $link[1]); } } global $html_dir; $html_dir = get_component_orientation(); echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'; echo '<html xmlns="http://www.w3.org/1999/xhtml" dir="' . $html_dir . '">'; echo '<head>'; echo '<title>' . $title . '</title>'; //echo '<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />'; echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'; echo '<link rel="shortcut icon" type="image/png" href="' . ROOT_ADMIN_URL . '/media/image/favicon.ico" />'; echo '<link rel="stylesheet" type="text/css" href="' . ROOT_ADMIN_URL . '/media/style/common.css" />'; echo '<link rel="stylesheet" type="text/css" href="' . ROOT_ADMIN_URL . '/media/script/lib/nifty/niftyCorners.css" />'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/lib/nifty/niftyCorners.js" charset="utf-8"></script>'; echo '<script type="text/javascript" charset="utf-8">'; echo ' NiftyLoad = function() {'; echo ' Nifty("div.rounded");'; echo ' }'; echo '</script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/lib/prototype/prototype.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/lib/edit_area/edit_area_full.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/file.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/lib/scriptaculous/scriptaculous.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/lib/scriptaculous/slider.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/common-regular.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/sortable.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/time_grid.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/common.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/ajax/configuration.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/ajax/user.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/ajax/usergroup.js" charset="utf-8"></script>'; echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/media/script/ajax/add_del_rows.js" charset="utf-8"></script>'; if (is_array($params_) && isset($params_['js_files']) && is_array($params_['js_files'])) { foreach ($params_['js_files'] as $js_file) { echo '<script type="text/javascript" src="' . ROOT_ADMIN_URL . '/' . $js_file . '" charset="utf-8"></script>'; } } echo '</head>'; echo '<body>'; echo '<div id="infoBulle" style="position: absolute; border: 1px solid black; background: #fec; padding: 5px; display: none; margin-right: 11px; max-width: 600px; z-index: 5000;"></div>'; echo '<div id="mainWrap">'; echo '<div id="headerWrap">'; echo '<table style="width: 100%;" border="0" cellspacing="0" cellpadding="0">'; echo '<tr>'; echo '<td style="min-width: 10%; text-align: inherit;" class="menu">'; page_menu(); echo '</td>'; //echo '<td style="text-align: center; width: 100%;" class="title centered">'; //echo '<h1 class="centered">'.$title.'</h1>'; //echo '</td>'; echo '<td class="logo">'; echo '<a href="index.php"><img src="' . ROOT_ADMIN_URL . '/media/image/header.png" alt="' . $title . '" title="' . $title . '" /></a>'; echo '</td>'; echo '</tr>'; echo '</table>'; echo '</div>'; echo '<div class="spacer"></div>'; echo '<div id="pageWrap">'; echo '<br />'; echo '<div class="spacer"></div>'; echo '<div id="adminContent">'; if (count($errors) > 0) { echo '<div id="adminError">'; echo '<span class="msg_error">'; if (count($errors) > 1) { echo '<ul>'; foreach ($errors as $error_msg) { echo '<li>' . $error_msg . '</li>'; } echo '</ul>'; } else { echo $errors[0]; } echo '</span>'; echo '</div>'; } if (count($infos) > 0) { echo '<div id="adminInfo">'; echo '<span class="msg_ok">'; if (count($infos) > 1) { echo '<ul>'; foreach ($infos as $info_msg) { echo '<li>' . $info_msg . '</li>'; } echo '</ul>'; } else { echo $infos[0]; } echo '</span>'; echo '</div>'; } page_sub_menu(); }