admin_frame_header.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php if(!defined('UC_ROOT')) exit('Access Denied');?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo UC_CHARSET;?>" />
  6. <title>UCenter Administrator's Control Panel</title>
  7. <link rel="stylesheet" href="images/admincp.css" type="text/css" media="all" />
  8. <meta content="Comsenz Inc." name="Copyright" />
  9. </head>
  10. <body>
  11. <div class="mainhd">
  12. <div class="logo">UCenter Administrator's Control Panel</div>
  13. <div class="uinfo">
  14. <p>您好, <em><?php echo $username;?></em> [ <a href="admin.php?m=user&a=logout" target="_top">退出</a> ]</p>
  15. <?php if($admincp) { ?>
  16. <p id="others"><a href="#" class="othersoff" onclick="showmenu(this);">其他管理平台</a></p>
  17. <script type="text/javascript">
  18. function showmenu(ctrl) {
  19. ctrl.className = ctrl.className == 'otherson' ? 'othersoff' : 'otherson';
  20. var menu = parent.document.getElementById('toggle');
  21. if(!menu) {
  22. menu = parent.document.createElement('div');
  23. menu.id = 'toggle';
  24. menu.innerHTML = '<ul><?php echo $admincp;?></ul>';
  25. var obj = ctrl;
  26. var x = ctrl.offsetLeft;
  27. var y = ctrl.offsetTop;
  28. while((obj = obj.offsetParent) != null) {
  29. x += obj.offsetLeft;
  30. y += obj.offsetTop;
  31. }
  32. menu.style.left = x + 'px';
  33. menu.style.top = y + ctrl.offsetHeight + 'px';
  34. menu.className = 'togglemenu';
  35. menu.style.display = '';
  36. parent.document.body.appendChild(menu);
  37. } else {
  38. menu.style.display = menu.style.display == 'none' ? '' : 'none';
  39. }
  40. }
  41. </script>
  42. <?php } ?>
  43. </div>
  44. </div>
  45. </body>
  46. </html>