diff -urN ../base-1.4.5.orig/base_db_common.php ./base_db_common.php
old
|
new
|
|
80 | 80 | " "._ERRPHPERROR2."</FONT>"; |
81 | 81 | } |
82 | 82 | |
83 | | if ( ($DBtype == "mysql") || ($DBtype == "mysqlt") ) |
| 83 | if ( ($DBtype == "mysql") || ($DBtype == "mysqlt") || ($DBtype == "mysqli")) |
84 | 84 | { |
85 | 85 | if ( !(function_exists("mysql_connect")) ) |
86 | 86 | { |
diff -urN ../base-1.4.5.orig/base_graph_display.php ./base_graph_display.php
old
|
new
|
|
114 | 114 | else |
115 | 115 | { |
116 | 116 | // Create the graph area, legends on bottom -- Alejandro |
117 | | $Graph =& new Image_Graph(array('driver'=>'gd', |
| 117 | $Graph = new Image_Graph(array('driver'=>'gd', |
118 | 118 | 'width'=>$width, |
119 | 119 | 'height'=>$height)); |
120 | 120 | } |
… |
… |
|
320 | 320 | |
321 | 321 | // special case '"I0" => "private network (rfc 1918)"' and |
322 | 322 | // '"** (private network) " => "private network (rfc 1918)"' |
323 | | if (ereg("rfc 1918", $tmp, $substring) || (ereg("[*][*] \(private network\) ", $tmp_lower, $substring))) |
| 323 | if (preg_match("/rfc 1918/", $tmp, $substring) || (preg_match("/[*][*] \(private network\) /", $tmp_lower, $substring))) |
324 | 324 | { |
325 | 325 | $Dataset->addPoint("private network (rfc 1918)", $xdata[$i][1]); |
326 | 326 | } |
327 | 327 | // special case '?? (Not Found) ' => 'unknown' |
328 | | elseif(ereg("[?][?][ \t]+\(Not Found\)[ \t]*", $tmp, $substring)) |
| 328 | elseif(preg_match("/[?][?][ \t]+\(Not Found\)[ \t]*/", $tmp, $substring)) |
329 | 329 | { |
330 | 330 | $Dataset->addPoint("unknown", $xdata[$i][1]); |
331 | 331 | } |
332 | 332 | // anything inside parentheses, following a 2-letter TLD: |
333 | | elseif (ereg("^[-a-zA-Z0-9]{2}[ \t]\((.+)\)[ \t]*$", $tmp, $substring)) |
| 333 | elseif (preg_match("/^[-a-zA-Z0-9]{2}[ \t]\((.+)\)[ \t]*$/", $tmp, $substring)) |
334 | 334 | { |
335 | 335 | $Dataset->addPoint($substring[1], $xdata[$i][1]); |
336 | 336 | } |
337 | 337 | // anything after two-letter top level domain names and after one space or tab: |
338 | | elseif (ereg("[ \t]*[-a-zA-Z0-9]{2}[ \t]([-a-zA-Z0-9]+[-a-zA-Z0-9 ]*)", $tmp, $substring)) |
| 338 | elseif (preg_match("/[ \t]*[-a-zA-Z0-9]{2}[ \t]([-a-zA-Z0-9]+[-a-zA-Z0-9 ]*)/", $tmp, $substring)) |
339 | 339 | { |
340 | 340 | $Dataset->addPoint($substring[1], $xdata[$i][1]); |
341 | 341 | } |
342 | 342 | // two-letter top level domain names right at the beginning: |
343 | | elseif (ereg("[ \t]*([-a-zA-Z0-9]{2})[ \t]", $tmp_lower, $substring)) |
| 343 | elseif (preg_match("/[ \t]*([-a-zA-Z0-9]{2})[ \t]/", $tmp_lower, $substring)) |
344 | 344 | { |
345 | 345 | $Dataset->addPoint($substring[1], $xdata[$i][1]); |
346 | 346 | } |
diff -urN ../base-1.4.5.orig/base_qry_common.php ./base_qry_common.php
old
|
new
|
|
773 | 773 | } |
774 | 774 | } |
775 | 775 | /* if have chosen the address type to be both source and destination */ |
776 | | if ( ereg("ip_both", $tmp) ) |
| 776 | if ( preg_match("/ip_both/", $tmp) ) |
777 | 777 | { |
778 | | $tmp_src = ereg_replace("ip_both","ip_src",$tmp); |
779 | | $tmp_dst = ereg_replace("ip_both","ip_dst",$tmp); |
| 778 | $tmp_src = preg_replace("/ip_both/","ip_src",$tmp); |
| 779 | $tmp_dst = preg_replace("/ip_both/","ip_dst",$tmp); |
780 | 780 | |
781 | 781 | if ( $ip_addr[$i][2] == '=' ) |
782 | 782 | $tmp = "(".$tmp_src.') OR ('.$tmp_dst.')'; |
diff -urN ../base-1.4.5.orig/base_qry_sqlcalls.php ./base_qry_sqlcalls.php
old
|
new
|
|
259 | 259 | $line = split (" ", $current_sig_txt); |
260 | 260 | foreach ($line as $ps_element) |
261 | 261 | { |
262 | | if ( ereg("[0-9]*\.[0-9]*\.[0-9]*\.[0-9]", $ps_element) ) |
| 262 | if ( preg_match("/[0-9]*\.[0-9]*\.[0-9]*\.[0-9]/", $ps_element) ) |
263 | 263 | { |
264 | | $ps_element = ereg_replace (":", "", $ps_element); |
| 264 | $ps_element = preg_replace ("/:/", "", $ps_element); |
265 | 265 | qroPrintEntry("<A HREF=\"base_stat_ipaddr.php?ip=".$ps_element."&netmask=32\">". |
266 | 266 | $ps_element."</A>"); |
267 | 267 | } |
diff -urN ../base-1.4.5.orig/base_stat_common.php ./base_stat_common.php
old
|
new
|
|
312 | 312 | if (!stristr($where, "WHERE") && $where != "") |
313 | 313 | $where = " WHERE $where "; |
314 | 314 | |
315 | | if ( $db->DB_type == "mysql" ) |
| 315 | if ( $db->DB_type == "mysql" || $db->DB_type == "mysqli" ) |
316 | 316 | { |
317 | 317 | if ( $join == "" && $where == "") |
318 | 318 | $result = $db->baseExecute("SELECT COUNT(DISTINCT acid_event.ip_src, acid_event.ip_dst, acid_event.ip_proto) FROM acid_event"); |
diff -urN ../base-1.4.5.orig/base_stat_ipaddr.php ./base_stat_ipaddr.php
old
|
new
|
|
135 | 135 | print "</PRE><BR>\n"; |
136 | 136 | */ |
137 | 137 | |
138 | | if(ereg($ip, $contents)) { |
| 138 | if(preg_match("/$ip/", $contents)) { |
139 | 139 | $total++; |
140 | 140 | if( $total % 2 == 0 ) { |
141 | 141 | $color="DDDDDD"; |
… |
… |
|
143 | 143 | $color="FFFFFF"; |
144 | 144 | } |
145 | 145 | |
146 | | $contents = ereg_replace(" ", " ", $contents); |
| 146 | $contents = preg_replace("/ /", " ", $contents); |
147 | 147 | $elements = explode(" ", $contents); |
148 | 148 | |
149 | 149 | echo '<tr bgcolor="'.$color.'"><td align="center">'. |
… |
… |
|
183 | 183 | print "</PRE></TD>"; |
184 | 184 | |
185 | 185 | /* |
186 | | ereg("([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*):([0-9]*)",$elements[3],$store); |
| 186 | preg_match("/([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*):([0-9]*)/",$elements[3],$store); |
187 | 187 | $source_ip = $store[1]; |
188 | 188 | $source_port = $store[2]; |
189 | 189 | if (empty($source_ip)) |
… |
… |
|
197 | 197 | echo '<td align="center">' . $source_ip . '</td>'; |
198 | 198 | echo '<td align="center">' . $source_port . '</td>'; |
199 | 199 | |
200 | | ereg("([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*):([0-9]*)",$elements[5],$store); |
| 200 | preg_match("/([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*):([0-9]*)/",$elements[5],$store); |
201 | 201 | $destination_ip = $store[1]; |
202 | 202 | $destination_port = $store[2]; |
203 | 203 | if (empty($destination_ip)) |
diff -urN ../base-1.4.5.orig/includes/base_db.inc.php ./includes/base_db.inc.php
old
|
new
|
|
77 | 77 | { |
78 | 78 | GLOBAL $sql_trace_mode, $sql_trace_file; |
79 | 79 | |
80 | | $this->DB = NewADOConnection(); |
| 80 | // If they have mysqli, use it. Otherwise, fall back to the older "mysql" extension. |
| 81 | if ($this->DB_type == 'mysql') { |
| 82 | if (extension_loaded('mysqli')) { |
| 83 | $this->DB_type = 'mysqli'; |
| 84 | } else { |
| 85 | $this->DB_type = 'mysql'; |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | $this->DB = NewADOConnection($this->DB_type); |
81 | 90 | $this->DB_name = $database; |
82 | 91 | $this->DB_host = $host; |
83 | 92 | $this->DB_port = $port; |
… |
… |
|
108 | 117 | |
109 | 118 | /* Set the database schema version number */ |
110 | 119 | $sql = "SELECT vseq FROM schema"; |
111 | | if ($this->DB_type == "mysql") $sql = "SELECT vseq FROM `schema`"; |
| 120 | if ($this->DB_type == "mysql" || $this->DB_type == "mysqli") $sql = "SELECT vseq FROM `schema`"; |
112 | 121 | if ($this->DB_type == "mssql") $sql = "SELECT vseq FROM [schema]"; |
113 | 122 | |
114 | 123 | $result = $this->DB->Execute($sql); |
… |
… |
|
138 | 147 | function basePConnect($database, $host, $port, $username, $password) |
139 | 148 | { |
140 | 149 | GLOBAL $sql_trace_mode, $sql_trace_file; |
| 150 | |
| 151 | // If they have mysqli, use it. Otherwise, fall back to the older "mysql" extension. |
| 152 | if ($this->DB_type == 'mysql') { |
| 153 | if (extension_loaded('mysqli')) { |
| 154 | $this->DB_type = 'mysqli'; |
| 155 | } else { |
| 156 | $this->DB_type = 'mysql'; |
| 157 | } |
| 158 | } |
141 | 159 | |
142 | | $this->DB = NewADOConnection(); |
| 160 | $this->DB = NewADOConnection($this->DB_type); |
143 | 161 | $this->DB_name = $database; |
144 | 162 | $this->DB_host = $host; |
145 | 163 | $this->DB_port = $port; |
… |
… |
|
171 | 189 | /* Set the database schema version number */ |
172 | 190 | $sql = "SELECT vseq FROM schema"; |
173 | 191 | if ($this->DB_type == "mssql") $sql = "SELECT vseq FROM [schema]"; |
174 | | if ($this->DB_type == "mysql") $sql = "SELECT vseq FROM `schema`"; |
| 192 | if ($this->DB_type == "mysql" || $this->DB_type == "mysqli") $sql = "SELECT vseq FROM `schema`"; |
175 | 193 | |
176 | 194 | $result = $this->DB->Execute($sql); |
177 | 195 | if ( $this->baseErrorMessage() != "" ) |
… |
… |
|
209 | 227 | /* ** Begin DB specific SQL fix-up ** */ |
210 | 228 | if ($this->DB_type == "mssql") |
211 | 229 | { |
212 | | $sql = eregi_replace("''", "NULL", $sql); |
| 230 | $sql = preg_replace("/''/i", "NULL", $sql); |
213 | 231 | } |
214 | 232 | |
215 | 233 | if ($this->DB_type == "oci8") |
… |
… |
|
231 | 249 | $rs = new baseRS($this->DB->Execute($sql), $this->DB_type); |
232 | 250 | else |
233 | 251 | { |
234 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || |
| 252 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || |
235 | 253 | ($this->DB_type == "maxsql") ) |
236 | 254 | { |
237 | 255 | $rs = new baseRS($this->DB->Execute($sql." LIMIT ".$start_row.", ".$num_rows), |
… |
… |
|
321 | 339 | * the current point, so it can't be here and needs to be in the actual script after calling this function |
322 | 340 | * -- srh (02/01/2001) |
323 | 341 | */ |
324 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || |
| 342 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || |
325 | 343 | ($this->DB_type == "maxsql") || ($this->DB_type == "mssql")) |
326 | 344 | return $this->DB->Insert_ID(); |
327 | 345 | else if ($this->DB_type == "postgres" ||($this->DB_type == "oci8")) |
… |
… |
|
336 | 354 | |
337 | 355 | function baseSQL_YEAR($func_param, $op, $timestamp) |
338 | 356 | { |
339 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || |
| 357 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || |
340 | 358 | ($this->DB_type == "maxsql") || ($this->DB_type == "mssql") ) |
341 | 359 | return " YEAR($func_param) $op $timestamp "; |
342 | 360 | else if( $this->DB_type == "oci8" ) |
… |
… |
|
347 | 365 | |
348 | 366 | function baseSQL_MONTH($func_param, $op, $timestamp) |
349 | 367 | { |
350 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || |
| 368 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || |
351 | 369 | ($this->DB_type == "maxsql") || ($this->DB_type == "mssql") ) |
352 | 370 | return " MONTH($func_param) $op $timestamp "; |
353 | 371 | else if( $this->DB_type == "oci8" ) |
… |
… |
|
358 | 376 | |
359 | 377 | function baseSQL_DAY($func_param, $op, $timestamp) |
360 | 378 | { |
361 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "maxsql") ) |
| 379 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || ($this->DB_type == "maxsql") ) |
362 | 380 | return " DAYOFMONTH($func_param) $op $timestamp "; |
363 | 381 | else if($this->DB_type == "oci8") |
364 | 382 | return " to_number( to_char( $func_param, 'DD' ) ) $op $timestamp "; |
… |
… |
|
370 | 388 | |
371 | 389 | function baseSQL_HOUR($func_param, $op, $timestamp) |
372 | 390 | { |
373 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "maxsql") ) |
| 391 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || ($this->DB_type == "maxsql") ) |
374 | 392 | return " HOUR($func_param) $op $timestamp "; |
375 | 393 | else if($this->DB_type == "oci8") |
376 | 394 | return " to_number( to_char( $func_param, 'HH' ) ) $op $timestamp "; |
… |
… |
|
382 | 400 | |
383 | 401 | function baseSQL_MINUTE($func_param, $op, $timestamp) |
384 | 402 | { |
385 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "maxsql") ) |
| 403 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || ($this->DB_type == "maxsql") ) |
386 | 404 | return " MINUTE($func_param) $op $timestamp "; |
387 | 405 | else if($this->DB_type == "oci8") |
388 | 406 | return " to_number( to_char( $func_param, 'MI' ) ) $op $timestamp "; |
… |
… |
|
394 | 412 | |
395 | 413 | function baseSQL_SECOND($func_param, $op, $timestamp) |
396 | 414 | { |
397 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "maxsql") ) |
| 415 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || ($this->DB_type == "maxsql") ) |
398 | 416 | return " SECOND($func_param) $op $timestamp "; |
399 | 417 | else if($this->DB_type == "oci8") |
400 | 418 | return " to_number( to_char( $func_param, 'SS' ) ) $op $timestamp "; |
… |
… |
|
406 | 424 | |
407 | 425 | function baseSQL_UNIXTIME($func_param, $op, $timestamp) |
408 | 426 | { |
409 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "maxsql") ) |
| 427 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || ($this->DB_type == "maxsql") ) |
410 | 428 | { |
411 | 429 | return " UNIX_TIMESTAMP($func_param) $op $timestamp "; |
412 | 430 | } |
… |
… |
|
432 | 450 | |
433 | 451 | function baseSQL_TIMESEC($func_param, $op, $timestamp) |
434 | 452 | { |
435 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "maxsql") ) |
| 453 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || ($this->DB_type == "maxsql") ) |
436 | 454 | return " TIME_TO_SEC($func_param) $op $timestamp "; |
437 | 455 | else if($this->DB_type == "oci8") |
438 | 456 | return " to_number( $func_param ) $op $timestamp "; |
… |
… |
|
549 | 567 | |
550 | 568 | // Is This if statement necessary? -- Kevin |
551 | 569 | /* MS SQL Server 7, MySQL, Sybase, and Postgres natively support this function */ |
552 | | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "maxsql") || |
| 570 | if ( ($this->DB_type == "mysql") || ($this->DB_type == "mysqlt") || ($this->DB_type == "mysqli") || ($this->DB_type == "maxsql") || |
553 | 571 | ($this->DB_type == "mssql") || ($this->DB_type == "sybase") || ($this->DB_type == "postgres") || ($this->DB_type == "oci8")) |
554 | 572 | return $this->row->RecordCount(); |
555 | 573 | |
… |
… |
|
623 | 641 | if ( !( |
624 | 642 | ($type == "mysql") || |
625 | 643 | ($type == "mysqlt") || |
| 644 | ($type == "mysqli") || |
626 | 645 | ($type == "maxsql") || |
627 | 646 | ($type == "postgres") || |
628 | 647 | ($type == "mssql") || |
diff -urN ../base-1.4.5.orig/includes/base_net.inc.php ./includes/base_net.inc.php
old
|
new
|
|
391 | 391 | $line = explode(" ", $response_l[$i]); |
392 | 392 | for ($j=0; $j < sizeof($line); $j++ ) |
393 | 393 | { |
394 | | if ( eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $line[$j]) ) |
| 394 | if ( preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $line[$j]) ) |
395 | 395 | { |
396 | 396 | if ( $email == "" ) |
397 | 397 | $email = $line[$j]; |
diff -urN ../base-1.4.5.orig/includes/base_signature.inc.php ./includes/base_signature.inc.php
old
|
new
|
|
139 | 139 | { |
140 | 140 | if ($tmp_ref_system_name == "snort") |
141 | 141 | { |
142 | | if (ereg("([0-9]+):([0-9]+)", $ref_tag, $backref)) |
| 142 | if (preg_match("/([0-9]+):([0-9]+)/", $ref_tag, $backref)) |
143 | 143 | { |
144 | 144 | if ($backref[1] == "1") |
145 | 145 | { |
diff -urN ../base-1.4.5.orig/includes/base_state_citems.inc.php ./includes/base_state_citems.inc.php
old
|
new
|
|
963 | 963 | for ( $i = 0; $i < $this->criteria_cnt; $i++ ) |
964 | 964 | { |
965 | 965 | if ( (isset ($this->criteria[$i][3])) && |
966 | | (ereg("([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)", $this->criteria[$i][3])) ) |
| 966 | (preg_match("/([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)/", $this->criteria[$i][3])) ) |
967 | 967 | { |
968 | 968 | $tmp_ip_str = $this->criteria[$i][7] = $this->criteria[$i][3]; |
969 | 969 | $this->criteria[$i][3] = strtok($tmp_ip_str, "."); |
diff -urN ../base-1.4.5.orig/includes/base_state_common.inc.php ./includes/base_state_common.inc.php
old
|
new
|
|
181 | 181 | if ( ($valid_data & VAR_SCORE) > 0 ) |
182 | 182 | $regex_mask = $regex_mask . "\-"; |
183 | 183 | |
184 | | return ereg_replace("[^".$regex_mask."]", "", $item); |
| 184 | return preg_replace("/[^".$regex_mask."]/", "", $item); |
185 | 185 | } |
186 | 186 | |
187 | 187 | /* *********************************************************************** |
diff -urN ../base-1.4.5.orig/includes/base_state_criteria.inc.php ./includes/base_state_criteria.inc.php
old
|
new
|
|
252 | 252 | if ( isset($_POST['current_view']) ) $query_string .= "&current_view=".$_POST['current_view']; |
253 | 253 | if ( isset($_POST['submit']) ) $query_string .= "&submit=".$_POST['submit']; |
254 | 254 | |
255 | | $query_string = ereg_replace("back=1&", "", CleanVariable($query_string, VAR_PERIOD | VAR_DIGIT | VAR_PUNC | VAR_LETTER)); |
| 255 | $query_string = preg_replace("/back=1&/", "", CleanVariable($query_string, VAR_PERIOD | VAR_DIGIT | VAR_PUNC | VAR_LETTER)); |
256 | 256 | |
257 | 257 | ++$_SESSION['back_list_cnt']; |
258 | 258 | $_SESSION['back_list'][$_SESSION['back_list_cnt']] = |
diff -urN ../base-1.4.5.orig/setup/setup2.php ./setup/setup2.php
old
|
new
|
|
68 | 68 | $arcdbpasswd = ImportHTTPVar("arcdbpasswd"); |
69 | 69 | $arcdbname = ImportHTTPVar("arcdbname", VAR_ALPHA | VAR_SCORE | VAR_USCORE); |
70 | 70 | |
| 71 | // If they have mysqli, use it. Otherwise, fall back to the older "mysql" extension. |
| 72 | if ($dbtype == 'mysql') { |
| 73 | if (extension_loaded('mysqli')) { |
| 74 | $dbtype = 'mysqli'; |
| 75 | } else { |
| 76 | $dbtype = 'mysql'; |
| 77 | } |
| 78 | } |
| 79 | |
71 | 80 | $db = NewADOConnection($dbtype); |
72 | 81 | $dbconnect = $db->Connect( ( ( $dbport == "") ? $dbhost : ($dbhost.":".$dbport) ), |
73 | 82 | $dbusername, $dbpasswd, $dbname); |
diff -urN ../base-1.4.5.orig/setup/setup_db.inc.php ./setup/setup_db.inc.php
old
|
new
|
|
45 | 45 | } |
46 | 46 | |
47 | 47 | if ( !$tblBaseAG_present ) { |
48 | | if ( $db->DB_type == "mysql" ) { |
| 48 | if ( $db->DB_type == "mysql" || $db->DB_type == "mysqli") { |
49 | 49 | $sql = 'CREATE TABLE acid_ag ( ag_id INT UNSIGNED NOT NULL AUTO_INCREMENT, |
50 | 50 | ag_name VARCHAR(40), |
51 | 51 | ag_desc TEXT, |
… |
… |
|
114 | 114 | } |
115 | 115 | |
116 | 116 | if ( !$tblBaseAGAlert_present ) { |
117 | | if ( $db->DB_type == "mysql" ) { |
| 117 | if ( $db->DB_type == "mysql" || $db->DB_type == "mysqli") { |
118 | 118 | $sql = 'CREATE TABLE acid_ag_alert( ag_id INT UNSIGNED NOT NULL, |
119 | 119 | ag_sid INT UNSIGNED NOT NULL, |
120 | 120 | ag_cid INT UNSIGNED NOT NULL, |
… |
… |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | if ( !$tblBaseIPCache_present ) { |
154 | | if ( $db->DB_type == "mysql" ) { |
| 154 | if ( $db->DB_type == "mysql" || $db->DB_type == "mysqli") { |
155 | 155 | $sql = 'CREATE TABLE acid_ip_cache( ipc_ip INT UNSIGNED NOT NULL, |
156 | 156 | ipc_fqdn VARCHAR(50), |
157 | 157 | ipc_dns_timestamp DATETIME, |
… |
… |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | if ( !$tblBaseEvent_present ) { |
196 | | if ( $db->DB_type == "mysql" ) { |
| 196 | if ( $db->DB_type == "mysql" || $db->DB_type == "mysqli") { |
197 | 197 | if ( $db->baseGetDBversion() < 100 ) |
198 | 198 | $sig_ddl = "signature VARCHAR(255) NOT NULL,"; |
199 | 199 | else |
… |
… |
|
319 | 319 | |
320 | 320 | /* Added for base_roles and base_users -- Kevin */ |
321 | 321 | if ( !$tblBaseRoles_present ) { |
322 | | if ( $db->DB_type == "mysql" ) { |
| 322 | if ( $db->DB_type == "mysql" || $db->DB_type == "mysqli") { |
323 | 323 | $sql = 'CREATE TABLE base_roles ( role_id int(11) NOT NULL, |
324 | 324 | role_name varchar(20) NOT NULL, |
325 | 325 | role_desc varchar(75) NOT NULL, |
… |
… |
|
385 | 385 | } |
386 | 386 | |
387 | 387 | if ( !$tblBaseUsers_present ) { |
388 | | if ( $db->DB_type == "mysql" ) { |
| 388 | if ( $db->DB_type == "mysql" || $db->DB_type == "mysqli") { |
389 | 389 | $sql = 'CREATE TABLE base_users ( usr_id int(11) NOT NULL, |
390 | 390 | usr_login varchar(25) NOT NULL, |
391 | 391 | usr_pwd varchar(32) NOT NULL, |