![]() |
|---|
| [ Index ] |
Source Code Reference for V1.00 |
[Summary view] [Print] [Text view]
1 <?php /* STYLE/DEFAULT $Id: header.php,v 1.7 2005/05/19 05:55:01 ajdonnison Exp $ */ 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 if (is_object($xajax)) 21 $xajax->printJavascript($w2Pconfig['base_url'] . '/lib/xajax'); ?> 22 <?php $AppUI->loadHeaderJS(); ?> 23 <script> 24 function gt_hide_tabs() { 25 var tabs = document.getElementsByTagName('td'); 26 var i; 27 for (i = 0, i_cmp = tabs.length; i < i_cmp; i++) { 28 if (tabs[i].className == 'tabon') 29 tabs[i].className = 'taboff'; 30 } 31 var divs = document.getElementsByTagName('div'); 32 for (i =0, i_cmp = divs.length; i < i_cmp; i++) { 33 if (divs[i].className == 'tab') 34 divs[i].style.display = 'none'; 35 } 36 var imgs = document.getElementsByTagName('img'); 37 for (i = 0, i_cmp = imgs.length; i < i_cmp; i++) { 38 if (imgs[i].id) { 39 if (imgs[i].id.substr(0,8) == 'lefttab_') 40 imgs[i].src = './style/<?php echo $uistyle; ?>/bar_top_left.gif'; 41 else if (imgs[i].id.substr(0,9) == 'righttab_') 42 imgs[i].src = './style/<?php echo $uistyle; ?>/bar_top_right.gif'; 43 } 44 } 45 } 46 function gt_show_tab(i) { 47 var tab = document.getElementById('tab_' + i); 48 tab.style.display = 'block'; 49 tab = document.getElementById('toptab_' + i); 50 tab.className = 'tabon'; 51 var img = document.getElementById('lefttab_' + i); 52 img.src = './style/<?php echo $uistyle; ?>/bar_top_Selectedleft.gif'; 53 img = document.getElementById('righttab_' + i); 54 img.src = './style/<?php echo $uistyle; ?>/bar_top_Selectedright.gif'; 55 } 56 hide_tab_function = gt_hide_tabs; 57 show_tab_function = gt_show_tab; 58 </script> 59 </head> 60 61 <body onload="this.focus();"> 62 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 63 <tr> 64 <td> 65 <table width="100%" cellpadding="0" cellspacing="0" border="0"> 66 <tr> 67 <th style="background: url(style/<?php echo $uistyle; ?>/title_bkgd.jpg);" align="left"> 68 <!-- Product Version would go here--> 69 70 </th> 71 <th style="background: url(style/<?php echo $uistyle; ?>/title_bkgd.jpg);" align="right" width="123"><a href='http://www.web2project.net/' <?php if ($dialog) 72 echo 'target="_blank"'; ?>><img src="style/<?php echo $uistyle; ?>/title.jpg" border="0" class="banner" align="left" /></th> 73 <th style="background: url(style/<?php echo $uistyle; ?>/title_bkgd.jpg);" align="right" width="5"> 74 <!--a little spacer--> 75 76 </th> 77 </tr> 78 </table> 79 </td> 80 </tr> 81 <?php if (!$dialog) { 82 //Pedro A. <script type="text/javascript" src="<?php echo "{$w2Pconfig['base_url']}/lib/fckeditor/fckeditor.js""></script> 83 // top navigation menu 84 $nav = $AppUI->getMenuModules(); 85 $perms = &$AppUI->acl(); 86 ?> 87 <tr> 88 <td align="left"> 89 <table width="100%" cellpadding="0" cellspacing="0" width="100%"> 90 <tbody> 91 <form name="frm_new" method="GET" action="./index.php"> 92 <?php 93 echo '<input type="hidden" name="a" value="addedit" />' . "\n"; 94 95 //build URI string 96 if (isset($company_id)) { 97 echo '<input type="hidden" name="company_id" value="' . $company_id . '" />'; 98 } 99 if (isset($task_id)) { 100 echo '<input type="hidden" name="task_parent" value="' . $task_id . '" />'; 101 } 102 if (isset($file_id)) { 103 echo '<input type="hidden" name="file_id" value="' . $file_id . '" />'; 104 } 105 ?> 106 <tr class="nav"> 107 <td> 108 <ul> 109 <?php 110 $links = array(); 111 foreach ($nav as $module) { 112 if ($perms->checkModule($module['mod_directory'], 'access')) { 113 $links[] = '<li><a href="?m=' . $module['mod_directory'] . '">' . $AppUI->_($module['mod_ui_name']) . '</a></li>'; 114 } 115 } 116 echo implode('', $links); 117 echo "\n"; 118 ?> 119 </ul> 120 </td> 121 <?php 122 if ($AppUI->user_id > 0) { 123 //Do this check in case we are not using any user id, for example for external uses 124 echo '<td nowrap="nowrap" align="right">'; 125 $newItem = array('' => '- New Item -'); 126 if ($perms->checkModule('companies', 'add')) { 127 $newItem['companies'] = 'Company'; 128 } 129 if ($perms->checkModule('contacts', 'add')) { 130 $newItem['contacts'] = 'Contact'; 131 } 132 if ($perms->checkModule('calendar', 'add')) { 133 $newItem['calendar'] = 'Event'; 134 } 135 if ($perms->checkModule('files', 'add')) { 136 $newItem['files'] = 'File'; 137 } 138 if ($perms->checkModule('projects', 'add')) { 139 $newItem['projects'] = 'Project'; 140 } 141 echo arraySelect($newItem, 'm', 'style="font-size:10px" onChange="f=document.frm_new;mod=f.m.options[f.m.selectedIndex].value;if(mod) f.submit();"', '', true); 142 echo '</td>' . "\n"; 143 } 144 $df = $AppUI->getPref('SHDATEFORMAT'); 145 $df .= ' ' . $AppUI->getPref('TIMEFORMAT'); 146 $cf = $df; 147 $cal_df = $cf; 148 $cal_df = str_replace('%S', '%s', $cal_df); 149 $cal_df = str_replace('%M', '%i', $cal_df); 150 $cal_df = str_replace('%p', '%a', $cal_df); 151 $cal_df = str_replace('%I', '%h', $cal_df); 152 $cal_df = str_replace('%b', '%M', $cal_df); 153 $cal_df = str_replace('%', '', $cal_df); 154 $df = $cal_df; 155 ?> 156 </tr> 157 </form> 158 <tr> 159 <td colspan="2" valign="top" style="background: url(style/<?php echo $uistyle; ?>/nav_shadow.jpg);" align="left"> 160 <img width="1" height="13" src="style/<?php echo $uistyle; ?>/nav_shadow.jpg"/> 161 </td> 162 </tr> 163 </tbody> 164 </table> 165 </td> 166 </tr> 167 <tr> 168 <table cellspacing="0" cellpadding="3" border="0" width="100%"> 169 <tr> 170 <td width="75%"> 171 <table cellspacing="0" cellpadding="3" border="0" width="100%"> 172 <tr> 173 <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> 174 </tr> 175 </table> 176 </td> 177 <?php 178 if ($AppUI->user_id > 0) { 179 //Just show this stuff if there is a user logged in 180 181 ?> 182 <td width="170" valign="middle" nowrap="nowrap"><table><tr><form name="frm_search" action="?m=smartsearch" method="POST"><td> 183 <?php 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') . '...'; ?>'" /> 184 </td></form></tr></table></td> 185 <td width="275" nowrap="nowrap"> 186 <table cellspacing="0" cellpadding="3" border="0" width="100%"> 187 <tr> 188 <td nowrap="nowrap" align="right"> 189 <a class="button" href="#" 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> 190 </td> 191 <td nowrap="nowrap" align="right"> 192 <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> 193 </td> 194 <?php 195 if ($perms->checkModule('tasks', 'access')) { 196 ?> 197 <td nowrap="nowrap" align="right"> 198 <a class="button" href="./index.php?m=tasks&a=todo"><span><b><?php echo $AppUI->_('Todo'); ?></b></span></a> 199 </td> 200 <?php 201 } 202 if ($perms->checkModule('calendar', 'access')) { 203 $now = new CDate(); 204 ?> 205 <td nowrap="nowrap" align="right"> 206 <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> 207 </td> 208 <?php } ?> 209 <td nowrap="nowrap" align="right"> 210 <a class="button" href="./index.php?logout=-1"><span><?php echo $AppUI->_('Logout'); ?></span></a> 211 </td> 212 </td> 213 </tr> 214 </table> 215 </td> 216 <?php } ?> 217 </tr> 218 </table> 219 </td> 220 </tr> 221 <?php } // END showMenu ?> 222 </table> 223 224 <table width="100%" cellspacing="0" cellpadding="4" border="0"> 225 <tr> 226 <td valign="top" align="left" width="98%"> 227 <?php 228 echo $AppUI->getMsg(); 229 $AppUI->boxTopRendered = false; 230 if ($m == 'help' && function_exists('styleRenderBoxTop')) { 231 echo styleRenderBoxTop(); 232 } 233 ?>
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 |