Location: PHPKode > projects > Teampopor > teampopor-0.5/teampopor/themes/default/header.tpl.php
<?php
/**
 * template for #header
 */

global $theme;
add_css(get_path('theme', $theme) . '/header.css');

global $user;
if ($user->uid) {
  $current_network = get_current_network();
}
?>
    <div id="header">
      <div class="wrapper">
        <?php if ($user->uid) { ?>
        <?php
        $mynetwork = array(
          t('My Networks'),
          '<span class="label">' . t('My Home Network') . '</span>',
        );
        $result = db_query("SELECT n.* FROM {network_members} nm LEFT JOIN {networks} n ON n.nid = nm.nid WHERE n.is_external = 0 AND nm.uid = %d", $user->uid);
        while ($network = db_fetch_object($result)) {
          $mynetwork[] = '<a href="' . url('network/' . $network->nid) . '">' . $network->name . '</a>';
        }
        $mynetwork[] = array('title' => '<span class="label">' . t('External Networks') . '</span>', 'class' => 'separator');
        $result = db_query("SELECT n.* FROM {network_members} nm LEFT JOIN {networks} n ON n.nid = nm.nid WHERE n.is_external = 1 AND nm.uid = %d", $user->uid);
        while ($network = db_fetch_object($result)) {
          $mynetwork[] = '<a href="' . url('network/' . $network->nid) . '">' . $network->name . '</a>';
        }
        if (!$current_network->is_external) {
          $mynetwork[] = array('title' => '<a href="' . network_url('communities') . '">' . t('Browse External Networks') . '</a>', 'class' => 'separator');
          $mynetwork[] = array('title' => '<a href="' . network_url('groups/create/network') . '">' . t('Create a New Network') . '</a>', 'class' => 'separator');
        }

        global $user;
        $usermenu = array(
          '<a href="' . network_url('profile/' . $user->uid) . '">' . $user->name . '</a>',
          l(t('My Profile'), 'network/' . $current_network->nid . '/profile/' . $user->uid),
          l(t('Edit Account'), 'account/basics'),
          l(t('Logout'), 'logout'),
        );

        $menu = array(
          $mynetwork,
          $usermenu,
        );
        if ($user->role == USER_ROLE_ADMIN) {
          $menu[] = l(t('Site administer'), 'admin');
        }
        $menu[] = l(t('Logout'), 'logout');

        print theme('menu', $menu);
        ?>
        <?php } else { ?>
          <?php
          if (arg(0) != 'user' && arg(1) != 'login') {
            print get_form('user_login');
          }
          ?>
        <?php } ?>

        <h1 class="logo">
          <a title="Home" href="<?php print url() ?>"><?php print variable_get('site_name', 'Site name') ?></a>
        </h1>

        <?php if ($user->uid) { ?>
        <div class="search">
          <?php print get_form('global_search') ?>
        </div>
        <?php } ?>
      </div>
    </div>
Return current item: Teampopor