@ -72,6 +72,18 @@
};
};
};
function add_whole_line ( $A , $B , $C ){
$POPIN = array ();
foreach ( $C as $Key => $Value ){
if ( $Key != 'id' ){
$POPIN [] = $Value ;
$POLE [] = $Key ;
};
};
$QS = " INSERT INTO ` { $B } `(` " . implode ( " `,` " , $POLE ) . " `) VALUES(' " . implode ( " ',' " , $POPIN ) . " ') " ;
out_log ( $QS );
$A -> Query ( $QS );
;
if ( file_exists ( '/srv/www/web/lib/controller/data/mysqlitedb.db' ) ){
if ( ! class_exists ( 'SQLite_DB' ) ){
require_once ( $WDIR . '/SQLite_Class.php' );
@ -87,8 +99,8 @@
if ( isset ( $SENSOR_SETTINGS ) ) foreach ( $SENSOR_SETTINGS as $SS ) restore_line ( $INS_TIME_DB , 'lrf_sensors' , $SS );
if ( isset ( $TRAIN_FILTER_SETTINGS ) ) foreach ( $TRAIN_FILTER_SETTINGS as $FS ) restore_line ( $INS_TIME_DB , 'target_filter_train' , $FS );
if ( isset ( $BUBBLE_FILTER_SETTINGS ) ) foreach ( $BUBBLE_FILTER_SETTINGS as $FS ) restore_line ( $INS_TIME_DB , 'target_filter_bubble' , $FS );
if ( isset ( $FROZEN_BUBBLES ) ) foreach ( $FROZEN_BUBBLES as $FS ) restor e_line( $INS_TIME_DB , 'target_bubbles' , $FS );
if ( isset ( $DRAW_SETTINGS ) ) foreach ( $DRAW_SETTINGS as $DS ) restor e_line( $INS_TIME_DB , 'lrf_draw' , $DS );
if ( isset ( $FROZEN_BUBBLES ) ) foreach ( $FROZEN_BUBBLES as $FS ) add_whol e_line( $INS_TIME_DB , 'target_bubbles' , $FS );
if ( isset ( $DRAW_SETTINGS ) ) foreach ( $DRAW_SETTINGS as $DS ) add_whol e_line ( $INS_TIME_DB , 'lrf_draw' , $DS );
unset ( $INS_TIME_DB );
copy ( '/srv/www/web/lib/controller/data/mysqlitedb.db' , '/srv/www/distro/lib/data/mysqlitedb.db' );
} else out_log ( " New Database Not exists! " );