-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexec.excluirpontos.php
More file actions
39 lines (32 loc) · 938 Bytes
/
exec.excluirpontos.php
File metadata and controls
39 lines (32 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php session_start();
$tokenUsuario = md5('seg'.$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT']);
if ($_SESSION['donoDaSessao'] != $tokenUsuario)
{
header('Location: index.php');
}
error_reporting(E_ALL);
ini_set('display_errors','1');
//print_r($_REQUEST);
//exit;
require_once('classes/experimento.class.php');
require_once('classes/conexao.class.php');
$conexao = new Conexao;
$conn = $conexao->Conectar();
$Experimento = new Experimento();
$Experimento->conn = $conn;
$idexperimento = $_REQUEST['id'];
$idponto = $_REQUEST['idponto'];
$idstatus = $_REQUEST['idstatus'];
if (($idponto != 'undefined') && (!empty($idponto)))
{
$Experimento->excluirPonto($idexperimento,$idponto,$idstatus);
}
else
{
$lista = $_REQUEST['table_records'];
foreach($lista as $idponto){
$Experimento->excluirPonto($idexperimento,$idponto,$idstatus);
}
}
header("Location: cadexperimento.php?op=A&MSGCODIGO=19&pag=2&id=$idexperimento");
?>