function Get_Standard_Top_Section_HTML($title = null) { require_once __DIR__ . "/../../static_php/standard_header.php"; $HTML = ""; $HTML .= get_standard_header($title); // container for the page $HTML .= "<div class=\"page_container\">"; // menu bar $HTML .= "<div class=\"left_box_menu\"\">"; $HTML .= Get_File_Contents(__DIR__ . "/../../static_html/goc5_logo.html"); //Insert a portal is in read only warning message, if it is if (\Factory::getConfigService()->IsPortalReadOnly()) { $HTML .= Get_File_Contents(__DIR__ . "/../../static_html/read_only_warning.html"); } require_once "menu.php"; $HTML .= draw_menu("main_menu"); $HTML .= "</div>"; //$HTML .= "<h3 class=\"spacer\">Test</h3>"; $HTML .= Get_Search_Box_HTML(); $HTML .= Get_User_Info_Box_HTML(); $HTML .= Get_bottom_logos_Box_HTML(); // right side of the page $HTML .= "<div class=\"right_box\">"; // logout button (if set - does not always need to be rendered) if (!empty(\Factory::$properties['LOGOUTURL'])) { $HTML .= "<div style='text-align: right;'>"; //$HTML .= '<a href="'.htmlspecialchars(\Factory::$properties['LOGOUTURL']).'"><b><font colour="red">Logout</font></b></a>'; $HTML .= '<a href="' . htmlspecialchars(\Factory::$properties['LOGOUTURL']) . '"><b><font class="btn btn-danger btn-xs">Logout</font></b></a>'; $HTML .= "</div>"; } return $HTML; }
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // check for valid session session_start(); include 'odm-load.php'; if (!isset($_SESSION['uid'])) { redirect_visitor(); } $last_message = isset($_REQUEST['last_message']) ? htmlspecialchars($_REQUEST['last_message']) : ''; $user_obj = new User($_SESSION['uid'], $pdo); if (!$user_obj->isAdmin()) { header('Location: error.php?ec=4'); exit; } if (isset($_REQUEST['cancel']) and $_REQUEST['cancel'] != 'Cancel') { draw_menu($_SESSION['uid']); } if (isset($_GET['submit']) && $_GET['submit'] == 'add') { draw_header(msg('area_add_new_udf'), $last_message); $GLOBALS['smarty']->assign('last_message', $last_message); display_smarty_template('udf/add.tpl'); draw_footer(); } elseif (isset($_REQUEST['submit']) && $_REQUEST['submit'] == 'Add User Defined Field') { udf_functions_add_udf(); $last_message = urlencode(msg('message_udf_successfully_added') . ': ' . $_REQUEST['display_name']); header('Location: admin.php?last_message=' . $last_message); } elseif (isset($_REQUEST['submit']) && $_REQUEST['submit'] == 'delete' && isset($_REQUEST['item'])) { draw_header(msg('label_delete') . ' ' . msg('label_user_defined_fields'), $last_message); $query = "\n SELECT\n id,\n table_name,\n display_name,\n field_type\n FROM\n {$GLOBALS['CONFIG']['db_prefix']}udf\n WHERE\n table_name = :item\n "; $stmt = $pdo->prepare($query); $stmt->execute(array(':item' => $_REQUEST['item']));
echo $config['url_path']; ?> images/transparent_line.gif" style="height:2px;width:135px;" border="0"><br> </td> <td colspan="2" style="height:8px;background-image: url(<?php echo $config['url_path']; ?> images/shadow.gif); background-repeat: repeat-x;" bgcolor="#ffffff"> </td> </tr> <tr> <td valign="top" colspan="1" rowspan="2" style="width:135px;padding:5px;border-right:#aaaaaa 1px solid;" bgcolor='#f5f5f5'> <table bgcolor="#f5f5f5" width="100%" cellpadding="1" cellspacing="0" border="0" style="width:135px;"> <?php draw_menu(); ?> </table> <img src="<?php echo $config['url_path']; ?> images/transparent_line.gif" style="height:5px;width:135px;" border="0"><br> <p style="width:135px;" align="center"><a href='<?php echo $config['url_path']; ?> about.php'><img src="<?php echo $config['url_path']; ?> images/cacti_logo.gif" border="0"></a></p> <img src="<?php
</td> <td align="right"> <?php if (read_config_option("auth_method") != 0) { ?> Logged in as <strong><?php print db_fetch_cell("select username from user_auth where id=" . $_SESSION["sess_user_id"]);?></strong> (<a href="logout.php">Logout</a>) <?php } ?> </td> </tr> </table> </td> </tr> <tr> <td bgcolor="#f5f5f5" colspan="1" height="8" width="135" style="background-image: url(images/shadow_gray.gif); background-repeat: repeat-x; border-right: #aaaaaa 1px solid;"> <img src="images/transparent_line.gif" width="135" height="2" border="0"><br> </td> <td colspan="2" height="8" style="background-image: url(images/shadow.gif); background-repeat: repeat-x;" bgcolor="#ffffff"> </td> </tr> <tr> <td valign="top" colspan="1" rowspan="2" width="135" style="padding: 5px; border-right: #aaaaaa 1px solid;" bgcolor='#f5f5f5'> <table bgcolor="#f5f5f5" width="100%" cellpadding="1" cellspacing="0" border="0"> <?php draw_menu();?> </table> <img src="images/transparent_line.gif" width="135" height="5" border="0"><br> <p align="center"><a href='about.php'><img src="images/cacti_logo.gif" border="0"></a></p> <img src="images/transparent_line.gif" width="135" height="5" border="0"><br> </td> <td width="100%" colspan="2" valign="top" style="padding: 5px; border-right: #aaaaaa 1px solid;"><?php display_output_messages();?>
<?php echo draw_login_status(); ?> </div> </td> </tr> </table> </td> </tr> <tr><?php if (isset($user_menu) && is_array($user_menu)) { ?> <td id='navigation' class='cactiConsoleNavigationArea' valign='top'> <table> <?php draw_menu($user_menu); ?> <tr> <td class='cactiLogo' align='center'> <a href='<?php echo $config['url_path']; ?> about.php'><img src='<?php echo $config['url_path']; ?> images/cacti_logo.gif' border='0'></a> </td> </tr> </table> </td><?php }
* License information * * Copyright 2009 STFC * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * /*====================================================== */ if (isset($_REQUEST['menu'])) { draw_menu($_REQUEST['menu']); } function draw_menu($menu_name) { // Open the XML file of possible menus // as a SimpleXML object $menus_xml = simplexml_load_file(__DIR__ . '/../../../../config/web_portal/menu.xml'); $menu_html = xml_to_menu($menu_name, $menus_xml); return $menu_html; } // Reads a menu with the name $menu_name from the $menus_xml simplexml object // and draws that menu as HTML function xml_to_menu($menu_name, $menus_xml) { $html = ""; $html .= "<hr style=\"clear: both;\"/>";