query($qry_change_url); } //Querying INSERT new service INTO DB if(isset($_POST['mod_cfg_id']) AND isset($_POST['remote_server_id']) AND isset($_POST['slot_max_qty']) AND isset($_POST['price_hourly']) AND isset($_POST['price_monthly']) AND isset($_POST['price_year'])) { //Sanitize the POST values $home_cfg_id = $_POST['home_cfg_id']; $mod_cfg_id = $_POST['mod_cfg_id']; $service_name = $_POST['service_name']; $remote_server_id = $_POST['remote_server_id']; $slot_max_qty = $_POST['slot_max_qty']; $slot_min_qty = $_POST['slot_min_qty']; $price_hourly = $_POST['price_hourly']; $price_monthly = $_POST['price_monthly']; $price_year = $_POST['price_year']; $description = $_POST['description']; $img_url = $_POST['img_url']; $ftp = $_POST['ftp']; $install_method = $_POST['install_method']; $manual_url = $_POST['manual_url']; $access_rights = ""; if(isset($_POST['allow_updates']))$access_rights .= $_POST['allow_updates']; if(isset($_POST['allow_file_management']))$access_rights .= $_POST['allow_file_management']; if(isset($_POST['allow_parameter_usage']))$access_rights .= $_POST['allow_parameter_usage']; if(isset($_POST['allow_extra_params']))$access_rights .= $_POST['allow_extra_params']; if(isset($_POST['allow_ftp_usage']))$access_rights .= $_POST['allow_ftp_usage']; if(isset($_POST['allow_custom_fields']))$access_rights .= $_POST['allow_custom_fields']; $qry_add_service = "INSERT INTO OGP_DB_PREFIXbilling_services(service_id, home_cfg_id, mod_cfg_id, service_name, remote_server_id, slot_max_qty , slot_min_qty, price_hourly, price_monthly, price_year, description, img_url, ftp, install_method, manual_url, access_rights) VALUES(NULL, '".$home_cfg_id."', '".$mod_cfg_id."', '".$service_name."', '".$remote_server_id."', '".$slot_max_qty."', '".$slot_min_qty."', '".$price_hourly."', '".$price_monthly."', '".$price_year."', '".$description."', '".$img_url."', '".$ftp."', '".$install_method."', '".$manual_url."', '".$access_rights."')"; $db->query($qry_add_service); } //Querying REMOVE service FROM DB if (isset($_POST['service_id'])) { $db->query( "DELETE FROM OGP_DB_PREFIXbilling_services WHERE service_id=" . $_POST['service_id'] ); } ?>