Exemple #1
0
function jsondb_data($db_name, $table_name, $mapper_key, $data = null)
{
    if ($data) {
        if ($data === 'remove') {
            return del_data($db_name, $table_name, $mapper_key);
        } else {
            return set_data($db_name, $table_name, $mapper_key, $data);
        }
    } else {
        return get_data($db_name, $table_name, $mapper_key);
    }
}
Exemple #2
0
        del_data('layer', 'layer_id', $_POST['data']['id']);
    }
    if ($_POST['data']['options']['type'] == "vtour") {
        del_data('vtour', 'vtour_id', $_POST['data']['id']);
    }
    if ($_POST['data']['options']['type'] == "pvr") {
        del_data('pvr', 'pvr_id', $_POST['data']['id']);
    }
    if ($_POST['data']['options']['type'] == "markerIcon") {
        del_data('marker_icon', 'icon_id', $_POST['data']['id']);
    }
    if ($_POST['data']['options']['type'] == "marker") {
        del_data('marker', 'marker_id', $_POST['data']['id']);
    }
    if ($_POST['data']['options']['type'] == "hotspotIcon") {
        del_data('hotspot_icon', 'icon_id', $_POST['data']['id']);
    }
    if ($_POST['data']['options']['type'] == "hotspot") {
        del_data('hotspot', 'hotspot_id', $_POST['data']['id']);
    }
}
if ($_POST['req'] == "setPreviewData") {
    session_start();
    $_SESSION['project_id'] = $_POST['data']['projectId'];
    session_write_close();
}
if ($_POST['req'] == "clearPreviewData") {
    session_start();
    unset($_SESSION['project_id']);
    session_write_close();
}