} if (DB_error()) { $msg = $LANG_MAPS_1['save_fail']; } else { $msg = $LANG_MAPS_1['save_success']; //Delete marker submission DB_delete($_TABLES['maps_submission'], 'mkid', $mkid); } // save complete, return to markers list echo COM_refresh($_CONF['site_admin_url'] . "/plugins/maps/markers.php?msg=" . urlencode($msg)); exit; break; /* this case is currently not used... future expansion? */ /* this case is currently not used... future expansion? */ case 'preview': $display = getMapForm($_REQUEST); break; case 'edit': // Get the marker to edit and display the form if (isset($_GET['mkid'])) { $sql = "SELECT * FROM {$_TABLES['maps_markers']} WHERE mkid = {$_REQUEST['mkid']} LIMIT 1"; $res = DB_query($sql, 0); $A = DB_fetchArray($res); $display .= getMarkerForm($A); } else { echo COM_refresh($_CONF['site_url']); } break; case 'editsubmission': // Get the marker to edit and display the form if (isset($_GET['mkid'])) {
$msg = $LANG_MAPS_1['save_fail']; } else { $msg = $LANG_MAPS_1['save_success']; } // save complete, return to map list echo COM_refresh($_CONF['site_admin_url'] . "/plugins/maps/index.php?msg={$msg}"); exit; break; case 'edit': // Get the map to edit and display the form if (is_numeric($_REQUEST['mid'])) { $sql = "SELECT * FROM {$_TABLES['maps_maps']} WHERE mid = {$_REQUEST['mid']}"; $res = DB_query($sql); $A = DB_fetchArray($res); if (is_array($A)) { foreach ($A as $i => $value) { $A[$i] = stripslashes($value); } } $display .= getMapForm($A); } else { echo COM_refresh($_CONF['site_url']); } break; case 'new': default: $display .= getMapForm(); break; } $display .= COM_siteFooter(0); echo $display;