| | |
| | | * End Form configuration |
| | | ******************************************/ |
| | | |
| | | require_once('../../lib/config.inc.php'); |
| | | require_once('../../lib/app.inc.php'); |
| | | require_once '../../lib/config.inc.php'; |
| | | require_once '../../lib/app.inc.php'; |
| | | |
| | | //* Check permissions for module |
| | | $app->auth->check_module_permissions('dns'); |
| | |
| | | |
| | | function onBeforeDelete() { |
| | | global $app; $conf; |
| | | |
| | | if($app->tform->checkPerm($this->id,'d') == false) $app->error($app->lng('error_no_delete_permission')); |
| | | |
| | | |
| | | if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission')); |
| | | |
| | | // Delete all records that belog to this zone. |
| | | $records = $app->db->queryAllRecords("SELECT id FROM dns_slave WHERE zone = '".$app->functions->intval($this->id)."'"); |
| | | $records = $app->db->queryAllRecords("SELECT id FROM dns_slave WHERE zone = ?", $this->id); |
| | | foreach($records as $rec) { |
| | | $app->db->datalogDelete('dns_slave','id',$rec['id']); |
| | | $app->db->datalogDelete('dns_slave', 'id', $rec['id']); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | $page = new page_action; |
| | | $page->onDelete(); |
| | | |
| | | ?> |
| | | ?> |