Ejemplo n.º 1
0
function mactrack_disable()
{
    /* ================= input validation ================= */
    input_validate_input_number(get_request_var("device_id"));
    /* ==================================================== */
    $dbinfo = db_fetch_row("SELECT * FROM mactrack_devices WHERE device_id=" . $_REQUEST["device_id"]);
    /* log the trasaction to the database */
    mactrack_log_action("Device Disable '" . $dbinfo["hostname"] . "'");
    db_execute("UPDATE mactack_devices SET disabled='on' WHERE device_id=" . $_REQUEST["device_id"]);
    /* get the new html */
    $html = mactrack_format_device_row($stat);
    /* send the response back to the browser */
    print "disable!!!!" . $stat["device_id"] . "!!!!" . $html;
}
Ejemplo n.º 2
0
function mactrack_disable()
{
    /* ================= input validation ================= */
    get_filter_request_var('device_id');
    /* ==================================================== */
    $dbinfo = db_fetch_row_prepared('SELECT * FROM mactrack_devices WHERE device_id = ?', array(get_request_var('device_id')));
    /* log the trasaction to the database */
    mactrack_log_action(__('Device Disable \'%d\'', $dbinfo['hostname']));
    db_execute_prepared("UPDATE mactack_devices SET disabled='on' WHERE device_id = ?", array(get_request_var('device_id')));
    /* get the new html */
    $html = mactrack_format_device_row($stat);
    /* send the response back to the browser */
    print 'disable!!!!' . $stat['device_id'] . '!!!!' . $html;
}