redir_timeout; $message = ""; if ($service->delete()) { $message = "Service '".$service->name."' deleted!"; } else { $timeout = $config->redir_timeout_error; $message = "Service '".$service->name."' could not be deleted. Assure there's no probes with that!"; } $link = "admin.php"; include('message.php'); // ===================== EDIT } else if (isset($_GET['action']) && $_GET['action'] == "edit") { $timeout = $config->redir_timeout; if (isset($_GET['servicename']) && $_GET['servicename'] != "" && isset($_GET['code']) && $_GET['code'] != "" && isset($_GET['language']) && $_GET['language'] != "") { if ($service_id) { $service = new Service($config, $service_id); $service->name = $_GET['servicename']; $service->code = (get_magic_quotes_gpc() ? stripslashes($_GET['code']) : $_GET['code']); $service->result = (get_magic_quotes_gpc() ? stripslashes($_GET['result']) : $_GET['result']); $service->quality = (get_magic_quotes_gpc() ? stripslashes($_GET['quality']) : $_GET['quality']); $service->language = $_GET['language']; $service->update(); $link = "service.php?action=edit&service_id=$service_id"; $message = "Service '".$service->name."' updated!"; } else { $name = $_GET['servicename']; $code = $_GET['code']; $result = $_GET['result']; $quality = $_GET['quality']; $language = $_GET['language']; $service = new Service($config); if ($service->create($name, $language, $code, $result, $quality)) $message = "Service '".$name."' created!"; else { $timeout = $config->redir_timeout_error; $message = "Cannot create duplicated services!"; } $link = "admin.php"; } include('message.php'); } else { $service = new Service($config, $service_id); ?>
Service | name ?> |
Code | code ?> |
Expected Result | result ?> |
Language | language->name ?> |