Log in with username/password: lyceum/lyceum

root/trunk/src/lib/wp-admin/admin-header.php

Revision 616, 3.8 kB (checked in by jjb, 4 years ago)

Subdomains!

Most of the pieces in order to use subdomains. The way that cookies are set needs to be adapted to this system. As it is now, users have to keep re-logging-in when they switch from one domain to another.

Many thanks to coffelius of http://bloggear.net for help and code.

ticket:326

Line 
1 <?php
2 @header('Content-type: ' . get_option('html_type') . '; charset=' . get_option('blog_charset'));
3 assert('isset($parent_file)');
4 assert('isset($blog)');
5
6 if (!isset($_GET["page"])) require_once('admin.php');
7 if ( $editing ) {
8     $dbx_js = true;
9     $cat_js = true;
10 }
11 if ( 'active' != $blogstatus && 'profile.php' != $pagenow )
12     die(__("This blog does not exist or has been deactivated."));
13
14 if ( $list_js || $cat_js )
15     $sack_js = true;
16 ?>
17 <?php get_admin_page_title(); ?>
18 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
19 <html xmlns="http://www.w3.org/1999/xhtml">
20 <head>
21 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
22 <title><?php bloginfo('name') ?> &rsaquo; <?php echo $title; ?> &#8212; WordPress</title>
23 <link rel="stylesheet" href="<?php echo get_settings('siteurl') ?>/wp-admin/wp-admin.css" type="text/css" />
24 <script type="text/javascript">
25 //<![CDATA[
26 function addLoadEvent(func) {if ( typeof wpOnload!='function'){wpOnload=func;}else{ var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}}
27 //]]>
28 </script>
29 <script type="text/javascript" src="../../js/fat.js"></script>
30 <?php if ( $xfn_js ) { ?>
31 <script type="text/javascript" src="xfn.js"></script>
32 <?php } ?>
33 <?php if ( $sack_js ) { ?>
34 <script type="text/javascript" src="../../js/tw-sack.js"></script>
35 <?php } ?>
36 <?php if ( $list_js ) { ?>
37 <script type="text/javascript" src="list-manipulation.js"></script>
38 <?php } ?>
39 <?php if ( $dbx_js ) { ?>
40 <script type="text/javascript" src="../../js/dbx.js"></script>
41 <script type="text/javascript">
42 //<![CDATA[
43 addLoadEvent( function() {
44 <?php switch ( $pagenow ) : case 'post.php' : ?>
45 var manager = new dbxManager('postmeta');
46 <?php break; case 'page-new.php' : ?>
47 var manager = new dbxManager('pagemeta');
48 <?php break; endswitch; ?>
49 });
50 //]]>
51 </script>
52 <script type="text/javascript" src="../../js/dbx-key.js"></script>
53 <?php } ?>
54 <?php if ( $editing && user_can_richedit() ) { ?>
55 <script type="text/javascript" src="../../js/tinymce/tiny_mce_gzip.php?ver=20051211&amp;b=<?php echo $blog?>"></script>
56 <?php } ?>
57 <?php if ( $cat_js ) { ?>
58 <script type="text/javascript" src="../../wp-admin/cat-js.php?b=<?php echo $blog?>"></script>
59 <?php } ?>
60 <?php if ( ($parent_file != 'link-manager.php') && ($parent_file != 'options-general.php') ) : ?>
61 <style type="text/css">* html { overflow-x: hidden; }</style>
62 <?php endif; ?>
63 <?php do_action('admin_head'); ?>
64 </head>
65 <body>
66 <div id="lyceumhead">
67 <?php
68     echo '<strong>'.get_settings('site_title').'</strong>: ';
69     $inprofile = strpos($_SERVER['REQUEST_URI'],'profile');//this is... pretty weak. -jjb
70     if ($inprofile)
71         echo '<strong>'. __('My Account') . '</strong>';       
72     else
73         echo '<a href="'.get_settings('home').'/profile">'. __('My Account') . '</a>';
74
75     $myblogs = get_userblogs();
76     arrayify($myblogs);
77     foreach ($myblogs as $b){
78         if ($b->id == $blog && !$inprofile)
79             echo ' &bull; <strong>'.$b->blogname.'</strong>';
80         else
81             echo ' &bull; <a href="'.$b->home.'/admin/">'.$b->blogname.'</a>';
82     }
83     
84     if ($userdata->user_admin)
85         echo ' &bull; <a href="'.get_settings('siteurl').'/system-admin/settings.php">System Settings</a>';
86 ?>    
87 </div>
88
89 <div id="user_info"><p><?php printf(__('<strong>%s</strong>'), $user_identity) ?> [<a href="<?php echo get_settings('siteurl')
90      ?>/wp-login.php?action=logout" title="<?php _e('Log out of this account') ?>"><?php _e('Sign Out'); ?></a>] </p></div>
91
92 <?php if ("profile.php" != $parent_file) : ?>
93 <div id="wphead">
94 <h1><?php echo wptexturize(get_settings(('blogname'))); ?> <span>(<a href="<?php echo get_settings('home') ?>"><?php _e('View site') ?> &raquo;</a>)</span></h1>
95 </div>
96
97 <?php
98 require(WPADMININC . 'menu-header.php');
99 endif;
100
101 if ( $parent_file == 'options-general.php' ) {
102     require(WPADMININC . 'options-head.php');
103 }
104 ?>
105
Note: See TracBrowser for help on using the browser.
Log in with username/password: lyceum/lyceum