wifiStatus();
                        } else {
                            if (isset($_GET['selfUpdate'])) {
                                selfUpdate();
                            } else {
                                if (isset($_GET['modUpdate'])) {
                                    addModule($_GET['modUpdate']);
                                } else {
                                    if (isset($_GET['setLocalContent'])) {
                                        setLocalContent($_GET['setLocalContent']);
                                    } else {
                                        if (isset($_GET['getBatteryInfo'])) {
                                            getBatteryInfo();
                                        } else {
                                            if (isset($_GET['clearLogs'])) {
                                                clearLogs();
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
error_log("Unknown request to background.php: " . print_r($_GET, true));
header("HTTP/1.1 500 Internal Server Error");
exit;
Example #2
0
<?php

/**
 *	@ download and clear log files
 **********************************/
/* required functions */
require_once '../../functions/functions.php';
/* verify that user is admin */
checkAdmin();
/* clear logs */
if (!clearLogs()) {
    print '<div class="alert alert alert-danger alert-absolute">' . _('Error clearing logs') . '!</div>';
} else {
    print '<div class="alert alert-success alert-absolute">' . _('Logs cleared successfully') . '!</div>';
}