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

NathanGibbs3 / BASE / 590

pending completion
590

push

travis-ci-com

NathanGibbs3
20230420 Fix CI build breakage. 2

2755 of 16977 relevant lines covered (16.23%)

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

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

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

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

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

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

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

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

464
        PrintFramedBoxFooter(1,2);
×
465
        NLIO('<br/>',2);
×
466
                if ( $WorldMap ){
×
467
        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>';
×
468
                }
469
      echo '</CENTER>';
×
470
                $et->Mark("Rendering graph");
×
471
        }else{
×
472
                ErrorMessage(_ERRCHRTNODATAPOINTS);
×
473
        }
474
}
475
PrintBASESubFooter();
×
476
}else{ // Graphics Libs Check failed.
×
477
        error_log($EMPfx . 'Graphics Libs check failed.');
×
478
        base_header("Location: base_main.php");
×
479
}
480
?>
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