home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / groupoffice-com-2.01 / login.inc < prev    next >
Text File  |  2004-03-08  |  5KB  |  163 lines

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
  4. <link rel="stylesheet" type="text/css" href="<?php echo $GO_CONFIG->host; ?>lib/login.css" />
  5. <script language="javascript" type="text/javascript" src="<?php echo $GO_CONFIG->host; ?>javascript/common.js"></script>
  6. <link rel="shortcut icon" href="<?php echo $GO_CONFIG->host; ?>lib/favicon.ico" />
  7. <title><?php echo $GO_CONFIG->title; ?></title>
  8. </head>
  9. <body>
  10. <form method="post" action="<?php echo $GO_CONFIG->host; ?>index.php" name="login" target="_parent">
  11. <input type="hidden" name="task" value="login" />
  12.  
  13. <?php
  14. if (isset($_GET['return_to']))
  15. {
  16.     echo '<input type="hidden" name="return_to" value="'.$_GET['return_to'].'" />';
  17. }
  18. ?>
  19. <table border="0" width="100%" height="95%" cellpadding="0" cellspacing="0">
  20. <tr>
  21.     <td align="center" valign="center">
  22.     <table id="header" border="0">
  23.     <tr>
  24.         <td id="header-logo">
  25.             <img src="<?php echo $GO_CONFIG->login_image; ?>" border="0" align="absmiddle" />
  26.         </td>
  27.     </tr>
  28.     <tr>
  29.         <td id="header-border"></td>
  30.     </tr>
  31.  
  32.     <tr>
  33.         <td align="center">
  34.         <table cellspacing="2" border="0" cellpadding="1" valign="middle" align="center" style="margin: 20px;">
  35.         <tr>
  36.             <td colspan="2" align="center"><h1><?php echo $GO_CONFIG->title; ?></h1></td>
  37.         </tr>
  38.         <tr>
  39.                 <td colspan="2" align="center">
  40.                 <h3><?php echo $login_text; ?></h3>
  41.                 <br />
  42.                 <?php if (isset($feedback)) echo $feedback; ?>
  43.                 </td>
  44.         </tr>
  45.         <tr>
  46.                 <td align="right" nowrap>
  47.                 <?php echo $login_username; ?>: 
  48.                 </td>
  49.                 <td>
  50.                 <?php
  51.                 require($GO_CONFIG->root_path.'auth_mail_servers.inc');
  52.                 if ($GO_CONFIG->auth_db_type == 'mail' && count($auth_mail_servers) > 0)
  53.                 {
  54.                     $dropbox = new dropbox();
  55.                     $dropbox->add_value(-1, 'Group-Office');
  56.                     for($i=0;$i<count($auth_mail_servers); $i++)
  57.                     {
  58.                         $dropbox->add_value($i, $auth_mail_servers[$i]['domain']);
  59.                     }
  60.                     echo '
  61.                     <table border="0" cellpadding="1" cellspacing="0">
  62.                     <tr><td><input type="text" class="textbox" name="username" value="" size="30" /></td><td>@</td><td>
  63.                     ';
  64.                     $_COOKIE['GO_AUTH_MAIL_SERVER_KEY'] = isset($_COOKIE['GO_AUTH_MAIL_SERVER_KEY']) ? $_COOKIE['GO_AUTH_MAIL_SERVER_KEY'] : '0';
  65.                     $auth_mail_server_key = isset($auth_mail_server_key) ? $auth_mail_server_key : $_COOKIE['GO_AUTH_MAIL_SERVER_KEY'];
  66.                     $dropbox->print_dropbox('auth_mail_server_key', $auth_mail_server_key);
  67.                     echo '</td></tr></table>';
  68.                 }else
  69.                 {
  70.                     echo '<input type="text" class="textbox" name="username" value="" size="30" />';
  71.                 }
  72.                 ?>
  73.                 </td>
  74.  
  75.         </tr>
  76.         <tr>
  77.                 <td align="right" nowrap>
  78.                 <?php echo $login_password; ?>: 
  79.                 </td>
  80.  
  81.                 <td>
  82.                 <input class="textbox" type="password" name="password" value="" size="30" />
  83.                 </td>
  84.         </tr>
  85.         <tr>
  86.                 <td align="right" nowrap>
  87.                 <?php echo $login_language; ?>: 
  88.                 </td>
  89.                 <td>
  90.                 <?php
  91.                 $languages = $GO_LANGUAGE->get_languages();
  92.                 $dropbox = new dropbox();
  93.                 $dropbox->add_arrays($languages, $languages);
  94.                 $dropbox->print_dropbox("SET_SESSION_LANGUAGE", $GO_LANGUAGE->language, 'onchange="javascript:set_language(this)"');
  95.                 ?>
  96.                 </td>
  97.  
  98.         </tr>
  99.         <tr>
  100.                 <td colspan="2">
  101.                 <br />
  102.                 <?php
  103.                 $checkbox = new checkbox('remind', 'true', $login_remind, false);
  104.                 ?>
  105.                 </td>
  106.         </tr>
  107.  
  108.         <tr>
  109.                 <td colspan="2" align="center">
  110.                 <br />
  111.                 <?php
  112.                 $button = new button($cmdLogin, 'javascript:document.forms[0].submit();');
  113.                 ?>
  114.                 </td>
  115.         </tr>
  116.         </table>
  117.         </td>
  118.     </tr>
  119.     <tr>
  120.         <td id="FooterBar">
  121.             <a style="color: white;" target="_blank" href="http://www.intermesh.nl">Intermesh Group-Office <?php echo $GO_CONFIG->version; ?></a>
  122.         </td>
  123.     </tr>
  124.     </table>
  125.     </td>
  126. </tr>
  127. </table>
  128.  
  129. <script type="text/javascript" language="javascript">
  130. var nav4 = window.Event ? true : false;
  131. function processkeypress(e)
  132. {
  133.     if(nav4)
  134.     {
  135.         var whichCode = e.which;
  136.     }else
  137.      {
  138.         var whichCode = event.keyCode;
  139.     }
  140.  
  141.     if (whichCode == 13)
  142.     {
  143.         window.document.forms[0].submit();
  144.         return true;
  145.     }
  146. }
  147. if (window.Event) //if Navigator 4.X
  148. {
  149.     document.captureEvents(Event.KEYPRESS)
  150. }
  151. document.onkeypress = processkeypress;
  152. document.forms[0].username.focus();
  153.  
  154. function set_language(dropbox)
  155. {
  156.     document.location='<?php echo $_SERVER['PHP_SELF']; ?>?SET_SESSION_LANGUAGE='+dropbox.value;
  157. }
  158. </script>
  159. </form>
  160. </body>
  161. </html>
  162.  
  163.