File: index.php3

package info (click to toggle)
imp 3%3A2.2.6-5.2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 5,476 kB
  • ctags: 766
  • sloc: php: 4,253; sh: 831; makefile: 98; perl: 50; pascal: 15
file content (69 lines) | stat: -rw-r--r-- 2,045 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php

$imp_configured     = @is_readable('./config/defaults.php3');
$imp_configurable   = (@is_readable('../setup.php3') && @is_writeable('./config/defaults.php3'));

if ($imp_configured && ! $imp_configurable) {
  /* Bring in the horde library for the WebClient class */
  include '../lib/horde.lib';
  include './lib/imp.lib';
  include './config/defaults.php3';
  include './lib/postconf.php3';
  
  /* Detect that browser */
  $this_client = new WebClient;
  page_open(array('sess' => 'HordeSession'));  
  page_close();
 
  if ($default->db_security_nag && $default->use_db && ($default->db_password == "hordemgr")) {
    
    /* IMP isn't secure */
    include './templates/index/imp_notsecure.inc';
    
  } else if ($this_client->frames && !$this_client->lynx) {
    
    /* Frames mode */
    echo '<html>';
    echo '<head>';
    echo '<title>IMP</title>';
    include './templates/index/frames_mode.inc';
    echo '</html>';
    
    /* } else if ($this_client->tables) { */
    /* Table mode? Per User Request = Lynx Mode? */
  } else if ($this_client->lynx) {
 
    /* Lynx Mode */

   header('Location: ' . $default->root_url . '/' . $sess->url('login.php3'));  

    
  } else {
    
    /* Ooo what browser is this? */
    /* assume it can handle IMP, but alert the user anyway */
    echo '<html>';
    echo '<head>';
    echo '<title>IMP</title>';
    echo '<script language="JavaScript">';
    echo "<!--\n";
    echo 'alert("IMP does not recognize your browser. Please\nsend the following line to dev@lists.horde.org,\nalong with a list of what your browser can do -\ntables, frames, javascript, etc.\n\nHTTP_USER_AGENT: ' . $HTTP_USER_AGENT . '");' . "\n";
    echo '// -->';
    echo '</script>';
    include './templates/index/frames_mode.inc';
    echo '</html>';
    
  }
  
} else if ($imp_configurable) {
  /* IMP is web congigurable */
  include './templates/index/imp_configurable.inc';
  
} else if (!$imp_configured) {
  
  /* IMP Isn't configured */
  include './templates/index/imp_notconfigured.inc';
  
}

?>