home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / dotproject / style / classic / header.php < prev    next >
PHP Script  |  2004-01-11  |  5KB  |  121 lines

  1. <?php /* STYLE/CLASSIC $Id: header.php,v 1.7 2004/01/11 04:53:35 ajdonnison Exp $ */
  2. $dialog = dPgetParam( $_GET, 'dialog', 0 );
  3. ?>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  5.        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  6. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  7. <head>
  8.     <meta name="Description" content="Classic dotProject Style" />
  9.     <meta name="Version" content="<?php echo @$AppUI->getVersion();?>" />
  10.         <meta http-equiv="Content-Type" content="text/html;charset=<?php echo isset( $locale_char_set ) ? $locale_char_set : 'UTF-8';?>" />
  11.           <title><?php echo @$AppUI->getConfig( 'page_title' );?></title>
  12.     <link rel="stylesheet" type="text/css" href="./style/<?php echo $uistyle;?>/main.css" media="all" />
  13.     <style type="text/css" media="all">@import "./style/<?php echo $uistyle;?>/main.css";</style>
  14.  
  15.     <script language="JavaScript">
  16.     function doBtn() {
  17.         var oEl = event.srcElement;
  18.         var doit = event.type;
  19.     
  20.         while (-1 == oEl.className.indexOf( "Btn" )) {
  21.             oEl = oEl.parentElement;
  22.             if (!oEl) {
  23.                 return;
  24.             }
  25.         }
  26.         if (doit == "mouseover" || doit == "mouseup") {
  27.             oEl.className = "clsBtnOn";
  28.         } else if (doit == "mousedown") {
  29.             oEl.className = "clsBtnDown";
  30.         } else {
  31.             oEl.className = "clsBtnOff";
  32.         }
  33.     }
  34.     function tboff(){
  35.         var oEl = event.srcElement;
  36.         var doit = event.type;
  37.         oEl.className = "topBtnOff";
  38.     }
  39.     </script>
  40. </head>
  41. <body class="mainpage" background="style/classic/images/bground.gif">
  42. <table class="nav" width="100%" cellpadding="0" cellspacing="2">
  43. <tr>
  44.     <td nowrap width="33%"><?php echo $AppUI->cfg['company_name'];?></td>
  45. <?php if (!$dialog) { ?>
  46.     <td nowrap width="34%"><?php echo $AppUI->_('Current user').": $AppUI->user_first_name $AppUI->user_last_name"; ?></td>
  47.     <td nowrap width="33%" align="right">
  48.     <table cellpadding="1" cellspacing="1" width="150">
  49.     <tr>
  50.         <td class="topBtnOff" nowrap bgcolor="#cccccc" align="center"  onmouseover="doBtn();" onmouseout="tboff();" onmousedown="doBtn();" onmouseup="doBtn();"><a href="./index.php?m=admin&a=viewuser&user_id=<?php echo $AppUI->user_id;?>" onmouseover="doBtn();"><?php echo $AppUI->_('My Info');?></a></td>
  51.         <td class="topBtnOff" nowrap bgcolor="#cccccc" align="center"  onmouseover="doBtn();" onmouseout="tboff();" onmousedown="doBtn();" onmouseup="doBtn();"><a href="./index.php?logout=-1" onmouseover="doBtn();"><?php echo $AppUI->_('Logout');?></a></td>
  52.         <td class="topBtnOff" nowrap bgcolor="#cccccc" align="center"  onmouseover="doBtn();" onmouseout="tboff();" onmousedown="doBtn();" onmouseup="doBtn();"><?php echo dPcontextHelp( 'Help' );?></td>
  53.     </tr>
  54.     </table>
  55.     </td>
  56.     <form name="frm_new" method=GET action="./index.php">
  57. <?php
  58.     echo '<td>';
  59.     $newItem = array( ""=>'- New Item -' );
  60.     $newItem["companies"] = "Company";
  61.     $newItem["contacts"] = "Contact";
  62.     $newItem["calendar"] = "Event";
  63.     $newItem["files"] = "File";
  64.     $newItem["projects"] = "Project";
  65.  
  66.     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);
  67.  
  68.     echo '</td><input type="hidden" name="a" value="addedit" />';
  69.  
  70. //build URI string
  71.     if (isset( $company_id )) {
  72.         echo '<input type="hidden" name="company_id" value="'.$company_id.'" />';
  73.     }
  74.     if (isset( $task_id )) {
  75.         echo '<input type="hidden" name="task_parent" value="'.$task_id.'" />';
  76.     }
  77.     if (isset( $file_id )) {
  78.         echo '<input type="hidden" name="file_id" value="'.$file_id.'" />';
  79.     }
  80. ?>
  81.     </form>
  82. <?php } // END DIALOG BLOCK ?>
  83. </tr>
  84. </table>
  85. <table width="100%" cellpadding="0" cellspacing="0" border="0">
  86. <tr>
  87.     <td valign="top">
  88. <?php if (!$dialog) { 
  89.     // left side navigation menu
  90. ?>
  91.         <table cellspacing=0 cellpadding=2 border=0 height="600">
  92.         <tr>
  93.             <td><img src="images/shim.gif" width="70" height="3"></td>
  94.             <td rowspan="100"><img src="images/shim.gif" width="10" height="100"></td>
  95.         </tr>
  96.     <?php
  97.         $nav = $AppUI->getMenuModules();
  98.         $s = '';
  99.         foreach ($nav as $module) {
  100.             if (!getDenyRead( $module['mod_directory'] )) {
  101.                 $s .= '<tr><td align="center" valign="middle" class="nav">'
  102.                     .'<table cellspacing=0 cellpadding=0 border=0><tr><td class="clsBtnOff">'
  103.                     .'<a href="?m='.$module['mod_directory'].'">'
  104.                     .'<img src="'.dPfindImage( $module['mod_ui_icon'], $module['mod_directory'] ).'" onmouseover="doBtn();" onmouseout="doBtn();" onmousedown="doBtn();" onmouseup="doBtn();" alt="" border="0" width="30" height="30"></a></td></tr></table>'
  105.                     .$AppUI->_($module['mod_ui_name'])
  106.                     ."</td></tr>\n";
  107.             }
  108.         }
  109.         echo $s;
  110.         ?>
  111.         <tr height="100%">
  112.             <td> <img src="images/shim.gif" width="7" height="10"></td>
  113.         </tr>
  114.         </table>    
  115. <?php } // END DIALOG ?>
  116.     </td>
  117. <td valign="top" align="left" width="100%">
  118. <?php 
  119.     echo $AppUI->getMsg();
  120. ?>
  121.