• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

NathanGibbs3 / BASE / 624

pending completion
624

push

travis-ci-com

NathanGibbs3
Merge branch 'devel'

562 of 562 new or added lines in 28 files covered. (100.0%)

3145 of 17504 relevant lines covered (17.97%)

23.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/setup/setup1.php
1
<?php
2
/*******************************************************************************
3
** Basic Analysis and Security Engine (BASE)
4
** Copyright (C) 2004 BASE Project Team
5
** Copyright (C) 2000 Carnegie Mellon University
6
**
7
** (see the file 'base_main.php' for license details)
8
**
9
** Project Leads: Kevin Johnson <kjohnson@secureideas.net>
10
**                Sean Muller <samwise_diver@users.sourceforge.net>
11
** Built upon work by Roman Danyliw <rdd@cert.org>, <roman@danyliw.com>
12
**
13
** Purpose: This file is the first step in the setup program
14
********************************************************************************
15
** Authors:
16
********************************************************************************
17
** Kevin Johnson <kjohnson@secureideas.net
18
**
19
********************************************************************************
20
*/
21
if ( session_id() != '' ){
×
22
        session_start();
×
23
}
24

25
define( "_BASE_INC", 1 );
×
26
include_once("../base_common.inc.php");
×
27
include("../includes/base_setup.inc.php");
×
28
include_once("../includes/base_state_common.inc.php");
×
29

30
if (file_exists('../base_conf.php'))
×
31
        die ("If you wish to re-run the setup routine, please either move OR delete your previous base_conf file first.");
×
32

33
$errorMsg = '';
×
34

35
/* build array of languages */
36
$i = 0;
×
37
if ($handle = opendir('../languages')) {
×
38
   while (false !== ($file = readdir($handle))) {
×
39
       if ($file != "." && $file != ".." && $file != "CVS" && $file != "index.php") {
×
40
           $filename = explode(".", $file);
×
41
           $languages[$i] = $filename[0];
×
42
           $i++;
×
43
           
44
       }
45
   }
46
   closedir($handle);
×
47
}
48

49
if (@$_GET['action'] == "check")
×
50
{
51
    // form has been submitted.  Check answers.
52
    $_SESSION['language'] = ImportHTTPVar("language", "", $languages);
×
53
    
54
    //Check path to ADODB
55
    $adodbexists = file_exists($_POST['adodbpath'] . "/adodb.inc.php");
×
56
    if ($adodbexists != 1){
×
57
        $errorMsg = $errorMsg . "<br>The Path to ADODB does not appear to be correct!<br>";
×
58
        $errorMsg = $errorMsg . "Please correct.";
×
59
        $error = 1;
×
60
    } else {
×
61
        $_SESSION['adodbpath'] = realpath($_POST['adodbpath']);
×
62
        $error = 0;
×
63
    }
64
    
65
    if ($error != 1)
×
66
    {
67
        header("Location: setup2.php");
×
68
        die (__FILE__ . ":" . __LINE__ . ": ERROR: This line should not have been reached.<BR>\n");
×
69
    }
70
    
71
}
72

73

74
?>
75
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
76
<!-- Basic Analysis and Security Engine (BASE) -->
77
<HTML>
78

79
<HEAD>
80
  <META HTTP-EQUIV="pragma" CONTENT="no-cache">
81
  <TITLE>Basic Analysis and Security Engine (BASE)</TITLE>
82
  <LINK rel="stylesheet" type="text/css" HREF="../styles/base_style.css">
83
</HEAD>
84
<BODY>
85
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=5>
86
    <TR>
87
      <TD class="mainheader"> &nbsp </TD>
88
      <TD class="mainheadertitle">
89
         Basic Analysis and Security Engine (BASE) Setup Program
90
      </TD>
91
    </TR>
92
</TABLE>
93
<br>
94
<P>
95
<?php echo("<div class='errorMsg' align='center'>".$errorMsg."</div>"); ?>
96
<form action=setup1.php?action=check method="POST">
97
<center><table width="50%" border=1 class ="query">
98
<tr><td colspan=2 align="center" class="setupTitle">Step 1 of 5</td><tr>
99
<tr><td class="setupKey" width="50%">Pick a Language:</td><td class="setupValue"><select name="language">
100
<?php
101
    $langCount = count($languages);
×
102
    for ($y = 0; $y < $langCount; $y++) {
×
103
                // If there is language saved from session then make it selected. If
104
                // there was no session language - make 'english' selected.
105
                if( is_key('language', $_SESSION) ){
×
106
            if ( 
×
107
                 ($languages[$y] == $_SESSION['language']) || 
×
108
                 ($_SESSION['language'] == '' && $languages[$y] == 'english')
×
109
               )           
110
            {
111
              echo("<OPTION name='".$languages[$y]."' SELECTED>".$languages[$y]);
×
112
            }
113
            else
×
114
            {
115
              echo("<OPTION name='".$languages[$y]."'>".$languages[$y]);
×
116
            }
117
        }
118
        else
×
119
        {
120
            if ($languages[$y] == 'english')
×
121
            {
122
               echo("<OPTION name='".$languages[$y]."' SELECTED>".$languages[$y]);
×
123
            }
124
            else
×
125
            {
126
              echo("<OPTION name='".$languages[$y]."'>".$languages[$y]);
×
127
            }
128
        }
129
    }
130
?>
131
</select>
132
[<a href="../help/base_setup_help.php#language" onClick="javascript:window.open('../help/base_setup_help.php#language','helpscreen','width=300,height=300');">?</a>]
133
</td></tr>
134
<tr><td class="setupKey">
135
Path to ADODB:
136
</td><td class="setupValue">
137
<input type="text" name="adodbpath" value="<?php echo(@$_POST['adodbpath']); ?>">
138
[<a href="../help/base_setup_help.php#adodb" onClick="javascript:window.open('../help/base_setup_help.php#adodb','helpscreen','width=300,height=300');">?</a>]
139
</td></tr>
140
<tr><td colspan=2 align="center"><input type="submit" value="Continue"></td></tr>
141
</table></center></form>
142
</BODY>
143
</HTML>
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc