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

NathanGibbs3 / BASE / 625

pending completion
625

push

travis-ci-com

NathanGibbs3
20230512 Standardized BASE Iconography.
         Using 3dicons from @realvjy
         https://github.com/realvjy/3dicons
         Thank You. :smile:

33 of 33 new or added lines in 3 files covered. (100.0%)

648 of 10178 relevant lines covered (6.37%)

71.31 hits per line

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

0.0
/base_graph_main.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: Input GET/POST variables
14
**   - submit:
15
**   - time:
16
**   - time_sep:
17
********************************************************************************
18
** Authors:
19
********************************************************************************
20
** Kevin Johnson <kjohnson@secureideas.net
21
**
22
********************************************************************************
23
*/
24

25
$sc = DIRECTORY_SEPARATOR;
×
26
require_once("includes$sc" . 'base_krnl.php');
×
27
include("$BASE_path/includes/base_include.inc.php");
×
28
include_once("$BASE_path/base_db_common.php");
×
29
include_once("$BASE_path/base_graph_common.php");
×
30

31
$EMPfx = __FILE__ . ': '; // Error Message Prefix.
×
32
if ( VerifyGraphingLib() ){ // Graphics Libs Check
×
33

34
function check_worldmap(){
35
        GLOBAL $debug_mode;
36
        $EMPfx = __FUNCTION__ . ': ';
×
37
        $ok = 0;
×
38
        $php_path_array = explode(PATH_SEPARATOR, ini_get('include_path'));
×
39
        if ( $debug_mode > 0 ){
×
40
                ErrorMessage( $EMPfx . 'Find the worldmap?','black',1);
×
41
        }
42
        $EMPfx .= 'ERROR: ';
×
43
        $sc = DIRECTORY_SEPARATOR;
×
44
        $MapLoc = implode( $sc, array('Image','Graph','Images','Maps') );
×
45
        $WMif = 'world_map6.png';
×
46
        $WMcf = 'world_map6.txt';
×
47
        foreach( $php_path_array as $single_path ){
×
48
                $WMapImg = implode( $sc, array($single_path, $MapLoc, $WMif) );
×
49
                if ( $debug_mode > 0 ){
×
50
                        ErrorMessage( "&quot;" . $WMapImg . "&quot;",'black',1);
×
51
                }
52
                $tmp = ChkAccess($WMapImg);
×
53
                $EMsg = '';
×
54
                if ( $tmp == 1 ){
×
55
                        // We ASSUME, that this is the correct worldmap file.
56
                        // Not necessarily true, though. A simplification, therefore.
57
                        $WMapCsf = implode( $sc, array($single_path, $MapLoc, $WMcf) );
×
58
                        $tmp = ChkAccess($WMapCsf);
×
59
                        if ( $tmp == 1 ){
×
60
                                        $ok = 1;
×
61
                                        break;
×
62
                        }else{
×
63
                                $EMsg = "$EMPfx Coordinates: $WMapCsf not ";
×
64
                                if ( $tmp == -1 ){
×
65
                                        $EMsg .= 'found';
×
66
                                }elseif ( $tmp == -2 ){
×
67
                                        $EMsg .= 'readable';
×
68
                                }
69
                                $$EMsg .= '.';
×
70
                                ErrorMessage($EMsg, 0, 1);
×
71
                        }
72
                }else{
×
73
                        if ( $tmp == -2 ){
×
74
                                $EMsg = "$EMPfx Image: $WMapImg not readable.";
×
75
                                ErrorMessage($EMsg, 0, 1);
×
76
                        }
77
                }
78
                if ( $EMsg != '' ){
×
79
                        $rv = ini_get("safe_mode");
×
80
                        if ( $rv == 1 ){
×
81
                                ErrorMessage(
×
82
                                        "In &quot;safe_mode&quot; both $WMif and $WMcf must be owned by the user under which the web server is running.",
×
83
                                        0, 1
84
                                );
85
                        }
86
                }
87
        }
88
        if ( $ok != 1 ){
×
89
                ErrorMessage(
×
90
                        $EMPfx . "Worldmap functions not available. Go into the \"PEAR directory\", as can be found by \"pear config-show\", and then into the subdirectory $MapLoc$sc. This is the location where $WMif and $WMcf must be installed.",
×
91
                        0, 1
92
                );
93
                $rv = ini_get("safe_mode");
×
94
                if ( $rv == 1 ){
×
95
                        ErrorMessage(
×
96
                                "In &quot;safe_mode&quot; both $WMif and $WMcf must be owned by the user under which the web server is running.",
×
97
                                0, 1
98
                        );
99
                }
100
                return 0;
×
101
        }
102
        return 1;
×
103
}
104

105
AuthorizedRole(10000);
×
106
$cs = new CriteriaState("base_stat_alerts.php");
×
107
$cs->ReadState();
×
108
$new = ImportHTTPVar("new", VAR_DIGIT);
×
109
$submit = ImportHTTPVar("submit", VAR_ALPHA | VAR_SPACE);
×
110
// Set default values if the submit button hasn't been pressed.
111
if ( $new == 1 && $submit == '' ){ // Totally new Graph
×
112
    $height            = 800;
×
113
    $width             = 600;
×
114
    $pmargin0          = 50;
×
115
    $pmargin1          = 50;
×
116
    $pmargin2          = 70;
×
117
    $pmargin3          = 80;
×
118
    $user_chart_title  = _CHRTTITLE;
×
119
    $min_size          = 0;
×
120
    $rotate_xaxis_lbl  = 0;
×
121
    $xaxis_label_inc   = 1;
×
122
    $yaxis_scale       = 0;
×
123
    $chart_style       = "bar";
×
124
    $use_alerts        = 0;
×
125
    $xaxis_grid        = 0;
×
126
    $yaxis_grid        = 1;
×
127
    $element_start     = 0;
×
128
}else{ // Retrieve data from submit and store for later use.
×
129
    $height       = ImportHTTPVar("height", VAR_DIGIT);
×
130
    $width        = ImportHTTPVar("width", VAR_DIGIT);  
×
131
    $pmargin0     = ImportHTTPVar("pmargin0", VAR_DIGIT);
×
132
    $pmargin1     = ImportHTTPVar("pmargin1", VAR_DIGIT);
×
133
    $pmargin2     = ImportHTTPVar("pmargin2", VAR_DIGIT);
×
134
    $pmargin3     = ImportHTTPVar("pmargin3", VAR_DIGIT);
×
135
    $user_chart_title = ImportHTTPVar("user_chart_title", VAR_ALPHA | VAR_SPACE);
×
136
    $min_size         = ImportHTTPVar("min_size", VAR_DIGIT);
×
137
    $rotate_xaxis_lbl = ImportHTTPVar("rotate_xaxis_lbl", VAR_DIGIT);
×
138
    $xaxis_label_inc  = ImportHTTPVar("xaxis_label_inc", VAR_DIGIT);
×
139
    $yaxis_scale      = ImportHTTPVar("yaxis_scale", VAR_DIGIT);
×
140
    $chart_style      = ImportHTTPVar("chart_style", VAR_ALPHA);
×
141
    $xaxis_grid       = ImportHTTPVar("xaxis_grid", VAR_DIGIT);
×
142
    $yaxis_grid       = ImportHTTPVar("yaxis_grid", VAR_DIGIT);
×
143
    $element_start    = ImportHTTPVar("element_start", VAR_DIGIT);
×
144
}
145
  $data_source       = ImportHTTPVar("data_source", VAR_DIGIT);
×
146
  $chart_type        = ImportHTTPVar("chart_type", VAR_DIGIT);
×
147
  $chart_interval    = ImportHTTPVar("chart_interval", VAR_DIGIT);
×
148
  $chart_begin_hour  = ImportHTTPVar("chart_begin_hour", VAR_DIGIT);
×
149
  $chart_begin_month = ImportHTTPVar("chart_begin_month", VAR_DIGIT);
×
150
  $chart_begin_day   = ImportHTTPVar("chart_begin_day", VAR_DIGIT);
×
151
  $chart_begin_year  = ImportHTTPVar("chart_begin_year", VAR_DIGIT);
×
152
  $chart_end_hour    = ImportHTTPVar("chart_end_hour", VAR_DIGIT);
×
153
  $chart_end_month   = ImportHTTPVar("chart_end_month", VAR_DIGIT);
×
154
  $chart_end_day     = ImportHTTPVar("chart_end_day", VAR_DIGIT);
×
155
  $chart_end_year    = ImportHTTPVar("chart_end_year", VAR_DIGIT);
×
156
  $aggregate_type    = ImportHTTPVar("aggregate_type", VAR_DIGIT);
×
157

158
$page_title = _GRAPHALERTDATA;
×
159
PrintBASESubHeader(
×
160
        $page_title, $page_title, $cs->GetBackLink(), $refresh_all_pages
×
161
);
162
$db = NewBASEDBConnection($DBlib_path, $DBtype); // Connect to the Alert DB.
×
163
$db->baseDBConnect(
×
164
        $db_connect_method,$alert_dbname, $alert_host, $alert_port, $alert_user,
165
        $alert_password
166
);
167
UpdateAlertCache($db);
×
168
include("$BASE_path/base_graph_form.php");
×
169
$data_pnt_cnt = 0;
×
170
if ( $submit != '' && $chart_type == ' ' ){ // Error Conditions.
×
171
        ErrorMessage('<b>'._ERRCHRTNOTYPE.'</b>.');
×
172
}elseif ( $submit != '' ){ // Calculate the data set.
×
173
        if ( $data_source == ' ' ){
×
174
                ErrorMessage(_ERRNOAGSPEC);
×
175
                $data_source = NULL;
×
176
        }
177
        unset($xdata);
×
178
        unset($xlabel);
×
179
        if ( $debug_mode > 1 ){
×
180
       echo "<H3>"._CHRTDATAIMPORT."...</H3>";
×
181
        }
182
        // Building Criteria.
183
        $criteria = array(2);
×
184
        if ( !empty($data_source) ){
×
185
        $criteria[0] = "LEFT JOIN acid_ag_alert ".
×
186
                      "ON (acid_event.sid=acid_ag_alert.ag_sid AND acid_event.cid=acid_ag_alert.ag_cid) ";
187
        $criteria[1] = "acid_ag_alert.ag_id = $data_source";
×
188
        }else{
×
189
                $criteria[0] = '';
×
190
                // $tmp = "acid_event.sid > 0 ";
191
                $tmp = " 1 = 1 "; // Shim SQL when not querying alert groups.
×
192
                $criteria[1] = $tmp;
×
193
        }
194
        // Adding Time Constraint
195
        $time_constraint = ProcessChartTimeConstraint(
×
196
                $chart_begin_hour, $chart_begin_day, $chart_begin_month, $chart_begin_year,
197
                $chart_end_hour, $chart_end_day, $chart_end_month, $chart_end_year
198
        );
199
        if ( !empty($time_constraint) ){
×
200
                $criteria[1] .= $time_constraint;
×
201
        }
202
        if ( $debug_mode > 0 ){
×
203
       echo "<H3>Chart criteria</H3><PRE>";
×
204
       print_r($criteria);
×
205
       echo "</PRE>";
×
206
        }
207
        $WorldMap = false;
×
208
        if ( $chart_type == 15 || $chart_type == 17 ){
×
209
                // CHARTTYPE_*_COUNTRY_ON_MAP
210
                $WorldMap = true;
×
211
        }
212
        switch ($chart_type){
×
213
                case CHARTTYPE_HOUR; // hours vs num of alerts
×
214
                case CHARTTYPE_DAY; // days vs num of alerts
×
215
                case CHARTTYPE_WEEK; // weeks vs num of alerts
×
216
                case CHARTTYPE_MONTH; // months vs num of alerts
×
217
                case CHARTTYPE_YEAR; // years vs num of alerts
×
218
            $chart_title = _CHRTTIMEVNUMBER;
×
219
            $xaxis_label = _CHRTTIME;
×
220
            $yaxis_label = _CHRTALERTOCCUR;
×
221
            $data_pnt_cnt = GetTimeDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
222
            /* Any kinds of special characters, like slashes, two points
223
             * and so on seem to NOT work with Image_Graph */
224
            //$chart_title = $chart_title."\n ( ".$xdata[0][0]." - ".$xdata[count($xdata)-1][0]." )";      
225
            //$xaxis_label .= " from ". $xdata[0][0] . " to " . $xdata[count($xdata)-1][0] . " ";
226
            break;
×
227
                case CHARTTYPE_SRC_IP;  // Src. IP vs. Num Alerts
×
228
            $chart_title = _CHRTSIPNUMBER;
×
229
            $xaxis_label = _CHRTSIP;
×
230
            $yaxis_label = _CHRTALERTOCCUR;
×
231
            $data_pnt_cnt = GetIPDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
232
            break;
×
233
                case CHARTTYPE_DST_IP; // Dst. IP vs. Num Alerts
×
234
            $chart_title = _CHRTDIPALERTS;
×
235
            $xaxis_label = _CHRTDIP;
×
236
            $yaxis_label = _CHRTALERTOCCUR;
×
237
            $data_pnt_cnt = GetIPDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
238
            break;
×
239
                case CHARTTYPE_DST_UDP_PORT; // UDP Port vs. Num Alerts
×
240
            $chart_title = _CHRTUDPPORTNUMBER;
×
241
            $xaxis_label = _CHRTDUDPPORT;
×
242
            $yaxis_label = _CHRTALERTOCCUR;
×
243
            $data_pnt_cnt = GetPortDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
244
            break;
×
245
                case CHARTTYPE_SRC_UDP_PORT; // UDP Port vs. Num Alerts
×
246
            $chart_title = _CHRTSUDPPORTNUMBER;
×
247
            $xaxis_label = _CHRTSUDPPORT;
×
248
            $yaxis_label = _CHRTALERTOCCUR;
×
249

250
            $data_pnt_cnt = GetPortDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
251
            break;
×
252
                case CHARTTYPE_DST_TCP_PORT; // TCP Port vs. Num Alerts
×
253
            $chart_title = _CHRTPORTDESTNUMBER;
×
254
            $xaxis_label = _CHRTPORTDEST;
×
255
            $yaxis_label = _CHRTALERTOCCUR;
×
256
            $data_pnt_cnt = GetPortDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
257
            break;
×
258
                case CHARTTYPE_SRC_TCP_PORT; // TCP Port vs. Num Alerts
×
259
            $chart_title = _CHRTPORTSRCNUMBER;
×
260
            $xaxis_label = _CHRTPORTSRC;
×
261
            $yaxis_label = _CHRTALERTOCCUR;
×
262
            $data_pnt_cnt = GetPortDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
263
            break;
×
264
                case CHARTTYPE_CLASSIFICATION; // Classification vs. Num Alerts
×
265
            $chart_title = _CHRTSIGNUMBER;
×
266
            $xaxis_label = _CHRTCLASS;
×
267
            $yaxis_label = _CHRTALERTOCCUR;
×
268
            $data_pnt_cnt = GetClassificationDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
269
            break;
×
270
                case CHARTTYPE_SENSOR; // Sensor vs. Num Alerts
×
271
            $chart_title = _CHRTSENSORNUMBER;
×
272
            $xaxis_label = _SENSOR;
×
273
            $yaxis_label = _CHRTALERTOCCUR;
×
274
            $data_pnt_cnt = GetSensorDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
275
            break;
×
276
                case CHARTTYPE_SRC_COUNTRY; // Src Countries vs. Num Alerts
×
277
                case CHARTTYPE_SRC_COUNTRY_ON_MAP; // dto., but on worldmap
×
278
                        if ( $WorldMap ){
×
279
           if (!check_worldmap())
×
280
           {
281
             return 0;
×
282
           }
283
                        }
284
         $chart_title = "Countries of origin vs. number of alerts";
×
285
         $xaxis_label = "Src countries";
×
286
         $yaxis_label = "Number of alerts";
×
287

288
         $data_pnt_cnt = GetCountryDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
289
         break;
×
290
                case CHARTTYPE_DST_COUNTRY; // Dst Countries vs. Num Alerts
×
291
                case CHARTTYPE_DST_COUNTRY_ON_MAP; // dto., but on worldmap
×
292
                        if ( $WorldMap ){
×
293
           if (!check_worldmap())
×
294
           {
295
             return 0;
×
296
           }
297
                        }
298
         $chart_title = "Destination Countries vs. number of alerts";
×
299
         $xaxis_label = "Dst countries";
×
300
         $yaxis_label = "Number of alerts";
×
301

302
         $data_pnt_cnt = GetCountryDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
303
         break;
×
304
                case CHARTTYPE_UNIQUE_SIGNATURE; // Unique alerts vs. number of alerts
×
305
         $chart_title = "Unique alerts vs. number of alerts";
×
306
         $xaxis_label = "Unique alerts";
×
307
         $yaxis_label = "Number of alerts";
×
308
         $data_pnt_cnt = GetUniqueDataSet($xdata, $chart_type, $data_source, $min_size, $criteria);
×
309
         break;
×
310
                default;
×
311
         print "WARNING: charttype \"$charttype\" is not supported. Returning.";
×
312
         return 0;
×
313
        }
314
        if ( $data_pnt_cnt > 0 ){
×
315
                $number_array_elements = count($xdata);
×
316
                if ( $debug_mode > 0 ){
×
317
        echo "chart_type = $chart_type<BR>
×
318
              data_source = $data_source<BR>
319
              chart_interval = $chart_interval<BR>
320
              element_start  = $element_start<BR>
321
              count(\$xdata) = $number_array_elements<BR>\n";
322
        echo "<H3>"._CHRTHANDLEPERIOD."...</H3>\n";
×
323
                }
324
                if ( $chart_interval || $number_array_elements ){
×
325
                        if ( $element_start >= $number_array_elements ){ 
×
326
                                // Validity check
327
                                if ( $debug_mode > 0 ){
×
328
                                        ErrorMessage("WARNING: i >= number_array_elements");
×
329
                                }
330
                                ErrorMessage(_ERRCHRTNODATAPOINTS);
×
331
                                PrintBASESubFooter();
×
332
                                return;
×
333
                        }
334

335
                        // From which element on should the "for"-loop start:
336
                        if (
×
337
                                ctype_digit($element_start) && $element_start > 0
×
338
                                && $element_start < $number_array_elements
339
                        ){
340
                                $i = $element_start;
×
341
                        }else{
×
342
                                $i = 0;
×
343
                        }
344
                        if ( $debug_mode > 0 ){
×
345
          print "i = $i<BR>";
×
346
          print "element_start = $element_start<BR>";
×
347
          print "number_array_elements = " . $number_array_elements . "<BR>";
×
348
          print "count(xdata) = " . count($xdata) . "<BR><BR>";
×
349
                        }
350
                        // set up array
351
                        for ( $j = 0; $i < $number_array_elements; $i++, $j++ ){
×
352
                                // How many columns/elements do you want to see?
353
                                if ( $chart_interval > 0 ){
×
354
                                        if ( $j >= $chart_interval ){
×
355
                                                break;
×
356
                                        }
357
                                }
358
                                if ( $debug_mode > 1 ){
×
359
            print $i . ": " . $xdata[$i][0] . " - " . $xdata[$i][1] . "<BR>";
×
360
                                }
361
                                // define x-axis value:
362
                                if ( isset($xdata[$i][0]) ){
×
363
                                        $chart_array [$j][0] = $xdata[$i][0];
×
364
                                }else{
×
365
                                        $chart_array[$j][0] = '';
×
366
                                }
367
                                // define y-axis value:
368
                                if ( isset($xdata[$i][1]) ){
×
369
                                        $chart_array [$j][1] = $xdata[$i][1];
×
370
                                }else{
×
371
                                        $chart_array[$j][1] = 0;
×
372
                                }
373
                        } // for-loop
374
                        if (
×
375
                                ($chart_style == "bar" || $chart_style == "line")
376
                                && count($chart_array) == 1
×
377
                        ){
378
        /* then there's is a bug in PEAR::Image_Graph; 
379
         * Cf. http://pear.php.net/bugs/bug.php?id=12763
380
         *     http://pear.php.net/bugs/7423
381
         *     https://pear.php.net/bugs/bug.php?id=16335
382
         * the following
383
         * appends one element, that does, of course, not really exist,
384
         * as a workaround: */
385
                                if ( $debug_mode > 0 ){
×
386
            print "WARNING: Workaround: Adding one dummy element, that does NOT really exist!<BR>\n";
×
387
                                }
388
                                $chart_array[1][0] = '';
×
389
                                $chart_array[1][1] = 0;
×
390
                        }
391
                        // finally, set up xdata
392
                        $xdata = $chart_array;
×
393
                } //  if ( $chart_interval || $number_array_elements) {
394
                if ( $debug_mode > 0 ){
×
395
        print "count(xdata) = " . count($xdata) . "<BR>\n";
×
396
        // disabled because does not work as expected
397
        //echo "<H3>"._CHRTDUMP." $xaxis_label_inc)</H3>";
398
                }
399
                for ( $i = 0; $i < count($xdata); $i++ ){
×
400
                        if ( $debug_mode > 0 ){
×
401
          echo $i." -- ".$xdata[$i][0]." - ".$xdata[$i][1]."<BR>";
×
402
                        }
403
       // The following does not work as expected with PEAR::Image_Graph-0.7.2
404
       // Although as many pieces of data are added to the plot
405
       // as count($xdata) suggests, in the end are only those
406
       // bars (lines) displayed, that do NOT have an empty string
407
       // in $xdata[$i][0] (and even not a space!). I'm inclined to
408
       // consider this as one more bug of Image_Graph library.
409
       /*  
410
       // Apply the X-Axis label clean-up -- 
411
       // only write every N axis labels (erase the rest)
412
       if (($xaxis_label_inc != 0) && ( ($i % $xaxis_label_inc ) != 0 ))
413
       {
414
         $xdata[$i][0] = "";
415
       }
416
       */
417
                }
418
                if ( $debug_mode > 0 ){
×
419
        echo "<H3>"._CHRTDRAW." ($width x $height)</H3>";
×
420
                }
421
                $et->Mark("Extracting data");
×
422
      echo '<CENTER>
×
423
            <TABLE BGCOLOR="#000000" CELLSPACING=0 CELLPADDING=2 BORDER=0 SUMMARY="table from base_graph_main.php">
424
            <TR>
425
            <TD>';
426

427
      $_SESSION['xdata'] = $xdata;
×
428
      echo "<CENTER>";
×
429
                if ( $WorldMap ){
×
430
        echo "<A HREF=\"base_graph_display.php?";
×
431
        echo "&amp;pmargin0=$pmargin0&pmargin1=$pmargin1".
×
432
             "&amp;pmargin2=$pmargin2&pmargin3=$pmargin3".
×
433
             "&amp;title=".rawurlencode($user_chart_title." \n".$chart_title).
×
434
             "&amp;xaxis_label=".rawurlencode($xaxis_label).
×
435
             "&amp;yaxis_label=".rawurlencode($yaxis_label).
×
436
             //         "&amp;yaxis_scale=".rawurlencode($yaxis_scale).
437
             "&amp;yaxis_scale=" . $yaxis_scale .
438
             "&amp;rotate_xaxis_lbl=".rawurlencode($rotate_xaxis_lbl).
×
439
             "&amp;xaxis_grid=".$xaxis_grid.
440
             "&amp;yaxis_grid=".$yaxis_grid.
441
             "&amp;chart_type=".$chart_type.
442
             "&amp;style=".$chart_style."\">";
443

444
        echo "<IMG WIDTH=600 HEIGHT=300 SRC=\"base_graph_display.php?";
×
445
                }else{
×
446
        echo "<IMG SRC=\"base_graph_display.php?width=$width&amp;height=$height";
×
447
                }
448
      echo "&amp;pmargin0=$pmargin0&pmargin1=$pmargin1".
×
449
           "&amp;pmargin2=$pmargin2&pmargin3=$pmargin3".
×
450
           "&amp;title=".rawurlencode($user_chart_title." \n".$chart_title).
×
451
           "&amp;xaxis_label=".rawurlencode($xaxis_label).
×
452
           "&amp;yaxis_label=".rawurlencode($yaxis_label).
×
453
           //         "&amp;yaxis_scale=".rawurlencode($yaxis_scale).
454
           "&amp;yaxis_scale=" . $yaxis_scale .
455
           "&amp;rotate_xaxis_lbl=".rawurlencode($rotate_xaxis_lbl).
×
456
           "&amp;xaxis_grid=".$xaxis_grid.
457
           "&amp;yaxis_grid=".$yaxis_grid.
458
           "&amp;chart_type=".$chart_type.
459
           "&amp;style=".$chart_style."\">";
460
                if ( $WorldMap ){
×
461
        echo "</A><BR>\n";
×
462
                }
463
      echo "</CENTER>";
×
464

465
        PrintFramedBoxFooter(1,2);
×
466
        NLIO('<br/>',2);
×
467
                if ( $WorldMap ){
×
468
        echo '(click at the image or - after it has been reloaded - click at it for a second time to get a bigger size of it)<BR><BR>';
×
469
                }
470
      echo '</CENTER>';
×
471
                        $et->Mark('Rendering graph.');
×
472
                }else{
×
473
                        ErrorMessage(_ERRCHRTNODATAPOINTS);
×
474
                }
475
        }
476
        PrintBASESubFooter();
×
477
}else{ // Graphics Libs Check failed.
×
478
        error_log($EMPfx . 'Graphics Libs check failed.');
×
479
        HTTP_header('Location: base_main.php');
×
480
}
481
?>
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