![]() |
|---|
| [ Index ] |
Source Code Reference for V1.00 |
[Summary view] [Print] [Text view]
1 <?php /* $Id: header.php 132 2008-04-03 21:54:15Z pedroix $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/style/w2p-snowball/header.php $ */ 2 $dialog = w2PgetParam($_GET, 'dialog', 0); 3 if ($dialog) { 4 $page_title = ''; 5 } else { 6 $page_title = ($w2Pconfig['page_title'] == 'web2Project') ? $w2Pconfig['page_title'] . ' ' . $AppUI->getVersion() : $w2Pconfig['page_title']; 7 } 8 ?> 9 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 10 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 11 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 12 <head> 13 <meta name="Description" content="web2Project Default Style" /> 14 <meta name="Version" content="<?php echo $AppUI->getVersion(); ?>" /> 15 <meta http-equiv="Content-Type" content="text/html;charset=<?php echo isset($locale_char_set) ? $locale_char_set : 'UTF-8'; ?>" /> 16 <title><?php echo @w2PgetConfig('page_title'); ?></title> 17 <link rel="stylesheet" type="text/css" href="./style/<?php echo $uistyle; ?>/main.css" media="all" /> 18 <style type="text/css" media="all">@import "./style/<?php echo $uistyle; ?>/main.css";</style> 19 <link rel="shortcut icon" href="./style/<?php echo $uistyle; ?>/favicon.ico" type="image/ico" /> 20 <?php 21 if (is_object($xajax)) { 22 $xajax->printJavascript(w2PgetConfig('base_url') . '/lib/xajax'); 23 } 24 ?> 25 <?php $AppUI->loadHeaderJS(); ?> 26 </head> 27 28 <body onload="this.focus();"> 29 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 30 <tr> 31 <td> 32 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 33 <tr> 34 <th style="background: url(style/<?php echo $uistyle; ?>/title_bkgd.jpg);" align="left"> 35 <!-- Product Version would go here--> 36 37 </th> 38 <th style="background: url(style/<?php echo $uistyle; ?>/title_bkgd.jpg);" align="right" width="123"><a href='http://www.web2project.net/' <?php if ($dialog) 39 echo 'target="_blank"'; ?>><?php echo w2PtoolTip('web2Project v. ' . $AppUI->getVersion(), 'click to visit web2Project site', true);?><img src="style/<?php echo $uistyle; ?>/title.jpg" border="0" class="banner" align="left" /><?php echo w2PendTip();?></th> 40 <th style="background: url(style/<?php echo $uistyle; ?>/title_bkgd.jpg);" align="right" width="5"> 41 <!--a little spacer--> 42 43 </th> 44 </tr> 45 </table> 46 </td> 47 </tr> 48 <?php if (!$dialog) { 49 // top navigation menu 50 $nav = $AppUI->getMenuModules(); 51 $perms = &$AppUI->acl(); 52 ?> 53 <tr> 54 <td align="left"> 55 <table width="100%" cellpadding="0" cellspacing="0" width="100%"> 56 <tbody> 57 <form name="frm_new" method="GET" action="./index.php"> 58 <?php 59 echo '<input type="hidden" name="a" value="addedit" />'; 60 61 //build URI string 62 if (isset($company_id)) { 63 echo '<input type="hidden" name="company_id" value="' . $company_id . '" />'; 64 } 65 if (isset($task_id)) { 66 echo '<input type="hidden" name="task_parent" value="' . $task_id . '" />'; 67 } 68 if (isset($file_id)) { 69 echo '<input type="hidden" name="file_id" value="' . $file_id . '" />'; 70 } 71 ?> 72 <tr class="nav"> 73 <td> 74 <ul> 75 <?php 76 $links = array(); 77 foreach ($nav as $module) { 78 if ($perms->checkModule($module['mod_directory'], 'access')) { 79 $links[] = '<li><a href="?m=' . $module['mod_directory'] . '">' . $AppUI->_($module['mod_ui_name']) . '</a></li>'; 80 } 81 } 82 echo implode('', $links); 83 ?> 84 </ul> 85 </td> 86 <?php 87 if ($AppUI->user_id > 0) { 88 //Do this check in case we are not using any user id, for example for external uses 89 echo '<td nowrap="nowrap" align="right">'; 90 $newItem = array('' => '- New Item -'); 91 if ($perms->checkModule('companies', 'add')) { 92 $newItem['companies'] = 'Company'; 93 } 94 if ($perms->checkModule('contacts', 'add')) { 95 $newItem['contacts'] = 'Contact'; 96 } 97 if ($perms->checkModule('calendar', 'add')) { 98 $newItem['calendar'] = 'Event'; 99 } 100 if ($perms->checkModule('files', 'add')) { 101 $newItem['files'] = 'File'; 102 } 103 if ($perms->checkModule('projects', 'add')) { 104 $newItem['projects'] = 'Project'; 105 } 106 if ($perms->checkModule('admin', 'add')) { 107 $newItem['admin'] = 'User'; 108 } 109 echo arraySelect($newItem, 'm', 'style="font-size:10px" onchange="f=document.frm_new;mod=f.m.options[f.m.selectedIndex].value;if (mod == \'admin\') document.frm_new.a.value=\'addedituser\';if(mod) f.submit();"', '', true); 110 echo '</td>'; 111 } 112 $df = $AppUI->getPref('SHDATEFORMAT'); 113 $df .= ' ' . $AppUI->getPref('TIMEFORMAT'); 114 $cf = $df; 115 $cal_df = $cf; 116 $cal_df = str_replace('%S', '%s', $cal_df); 117 $cal_df = str_replace('%M', '%i', $cal_df); 118 $cal_df = str_replace('%p', '%a', $cal_df); 119 $cal_df = str_replace('%I', '%h', $cal_df); 120 $cal_df = str_replace('%b', '%M', $cal_df); 121 $cal_df = str_replace('%', '', $cal_df); 122 $df = $cal_df; 123 ?> 124 </tr> 125 </form> 126 <tr> 127 <td colspan="2" valign="top" style="background: url(style/<?php echo $uistyle; ?>/nav_shadow.jpg);" align="left"> 128 <img width="1" height="13" src="style/<?php echo $uistyle; ?>/nav_shadow.jpg"/> 129 </td> 130 </tr> 131 </tbody> 132 </table> 133 </td> 134 </tr> 135 <tr> 136 <table cellspacing="0" cellpadding="3" border="0" width="100%"> 137 <tr> 138 <td width="75%"> 139 <table cellspacing="0" cellpadding="3" border="0" width="100%"> 140 <tr> 141 <td><?php echo $AppUI->_('Welcome') . ' ' . ($AppUI->user_id > 0 ? ($AppUI->user_first_name . ' ' . $AppUI->user_last_name . '. ' . $AppUI->_('Server time is') . ' ' . date($df)) : $outsider); ?></td> 142 </tr> 143 </table> 144 </td> 145 <?php 146 if ($AppUI->user_id > 0) { 147 //Just show this stuff if there is a user logged in 148 149 ?> 150 <td width="170" valign="middle" nowrap="nowrap"><table><tr><form name="frm_search" action="?m=smartsearch" method="POST"><td> 151 <?php 152 if ($perms->checkModule('smartsearch', 'access')) { 153 echo w2PshowImage('search.png') ?> <input class="text" size="20" type="text" id="keyword" name="keyword" value="<?php echo $AppUI->_('Global Search') . '...'; ?>" onclick="document.frm_search.keyword.value=''" onblur="document.frm_search.keyword.value='<?php echo $AppUI->_('Global Search') . '...'; ?>'" /> 154 <?php 155 } else { 156 echo ' '; 157 } 158 ?> 159 </td></form></tr></table></td> 160 <td width="275" nowrap="nowrap"> 161 <table cellspacing="0" cellpadding="3" border="0" width="100%"> 162 <tr> 163 <td nowrap="nowrap" align="right"> 164 <a class="button" href="javascript: void(0);" onclick="javascript:window.open('?m=help&dialog=1&hid=', 'contexthelp', 'width=800, height=600, left=50, top=50, scrollbars=yes, resizable=yes')"><span><?php echo $AppUI->_('Help'); ?></span></a> 165 </td> 166 <td nowrap="nowrap" align="right"> 167 <a class="button" href="./index.php?m=admin&a=viewuser&user_id=<?php echo $AppUI->user_id; ?>"><span><?php echo $AppUI->_('My Info'); ?></span></a> 168 </td> 169 <?php 170 if ($perms->checkModule('tasks', 'access')) { 171 ?> 172 <td nowrap="nowrap" align="right"> 173 <a class="button" href="./index.php?m=tasks&a=todo"><span><b><?php echo $AppUI->_('Todo'); ?></b></span></a> 174 </td> 175 <?php 176 } 177 if ($perms->checkModule('calendar', 'access')) { 178 $now = new CDate(); 179 ?> 180 <td nowrap="nowrap" align="right"> 181 <a class="button" href="./index.php?m=calendar&a=day_view&date=<?php echo $now->format(FMT_TIMESTAMP_DATE); ?>"><span><?php echo $AppUI->_('Today'); ?></span></a> 182 </td> 183 <?php } ?> 184 <td nowrap="nowrap" align="right"> 185 <a class="button" href="./index.php?logout=-1"><span><?php echo $AppUI->_('Logout'); ?></span></a> 186 </td> 187 </td> 188 </tr> 189 </table> 190 </td> 191 <?php } ?> 192 </tr> 193 </table> 194 </td> 195 </tr> 196 <?php } // END showMenu ?> 197 </table> 198 199 <table width="100%" cellspacing="0" cellpadding="4" border="0"> 200 <tr> 201 <td valign="top" align="left" width="98%"> 202 <?php 203 echo $AppUI->getMsg(); 204 $AppUI->boxTopRendered = false; 205 if ($m == 'help' && function_exists('styleRenderBoxTop')) { 206 echo styleRenderBoxTop(); 207 } 208 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Jan 8 03:00:03 2009 | Cross-referenced by PHPXref 0.7 |