home *** CD-ROM | disk | FTP | other *** search
/ Clickx 23 / Clickx 23.iso / DATA / wordpress / wp-admin / admin-header.php < prev    next >
Encoding:
PHP Script  |  2005-04-20  |  3.0 KB  |  99 lines

  1. <?php 
  2. @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
  3. if (!isset($_GET["page"])) require_once('admin.php'); ?>
  4. <?php get_admin_page_title(); ?>
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml">
  7. <head>
  8. <title><?php bloginfo('name') ?> › <?php echo $title; ?> — WordPress</title>
  9. <link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css?version=<?php bloginfo('version'); ?>" type="text/css" />
  10. <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
  11.  
  12. <script type="text/javascript">
  13. //<![CDATA[
  14.  
  15. function customToggleLink() {
  16.     // TODO: Only show link if there's a hidden row
  17.     document.write('<small>(<a href="javascript:;" id="customtoggle" onclick="toggleHidden()"><?php _e('Show hidden'); ?></a>)</small>');
  18.     // TODO: Rotate link to say "show" or "hide"
  19.     // TODO: Use DOM
  20. }
  21.  
  22. function toggleHidden() {
  23.     var allElements = document.getElementsByTagName('tr');
  24.     for (i = 0; i < allElements.length; i++) {
  25.         if ( allElements[i].className.indexOf('hidden') != -1 ) {
  26.              allElements[i].className = allElements[i].className.replace('hidden', '');
  27.         }
  28.     }
  29. }
  30.  
  31. <?php if ( isset($xfn) ) : ?>
  32.  
  33. function GetElementsWithClassName(elementName, className) {
  34.     var allElements = document.getElementsByTagName(elementName);
  35.     var elemColl = new Array();
  36.     for (i = 0; i < allElements.length; i++) {
  37.         if (allElements[i].className == className) {
  38.             elemColl[elemColl.length] = allElements[i];
  39.         }
  40.     }
  41.     return elemColl;
  42. }
  43.  
  44. function meChecked() {
  45.   var undefined;
  46.   var eMe = document.getElementById('me');
  47.   if (eMe == undefined) return false;
  48.   else return eMe.checked;
  49. }
  50.  
  51. function upit() {
  52.     var isMe = meChecked(); //document.getElementById('me').checked;
  53.     var inputColl = GetElementsWithClassName('input', 'valinp');
  54.     var results = document.getElementById('rel');
  55.     var linkText, linkUrl, inputs = '';
  56.     for (i = 0; i < inputColl.length; i++) {
  57.          inputColl[i].disabled = isMe;
  58.          inputColl[i].parentNode.className = isMe ? 'disabled' : '';
  59.          if (!isMe && inputColl[i].checked && inputColl[i].value != '') {
  60.             inputs += inputColl[i].value + ' ';
  61.                 }
  62.          }
  63.     inputs = inputs.substr(0,inputs.length - 1);
  64.     if (isMe) inputs='me';
  65.     results.value = inputs;
  66.     }
  67.  
  68. function blurry() {
  69.     if (!document.getElementById) return;
  70.  
  71.     var aInputs = document.getElementsByTagName('input');
  72.  
  73.     for (var i = 0; i < aInputs.length; i++) {        
  74.          aInputs[i].onclick = aInputs[i].onkeyup = upit;
  75.     }
  76. }
  77.  
  78. window.onload = blurry;
  79. <?php endif; ?>
  80.  
  81. //]]>
  82. </script>
  83.  
  84. <?php do_action('admin_head', ''); ?>
  85. </head>
  86. <body>
  87.  
  88. <div id="wphead">
  89. <h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') . '/'; ?>"><?php _e('View site') ?> »</a>)</span></h1>
  90. </div>
  91.  
  92. <?php
  93. require(ABSPATH . '/wp-admin/menu-header.php');
  94.  
  95. if ( $parent_file == 'options-general.php' ) {
  96.     require(ABSPATH . '/wp-admin/options-head.php');
  97. }
  98. ?>
  99.