<?
session_start();
include 'cnn.php';
@$login = $_SESSION['login'];
@$senha = $_SESSION['senha'];
if(!isset($_SESSION['login'])) { echo "<strong>Para acessar essa pagina é preciso esta logado</strong>"; }
else{
$vip=mssql_fetch_row(mssql_query("select vip from memb_info where memb___id='".$login."'"));
if($vip[0] == 0) { echo "<strong>Para acessar essa pagina &eacute; preciso ser Silver Vip</strong>"; }
else{
?>
<form name="form1" method="post" action="">
<h1>Deletar ticket</h1>
<div class="quadros">
<label>Tem certeza que deseja deletar esse ticket? </label>
<select name="id" id="id">
<? 
  $noticiaq=mssql_query("SELECT Titulo,Id FROM site_ticket WHERE id='".$id."'");
  for ($i=0;$i<mssql_num_rows($noticiaq);$i++) {
  $exiben=mssql_fetch_row($noticiaq);
  echo '<option value='.$exiben[1].'>'.$exiben[0].'</option>';
  } 
?>
</select>
<input name="prossegue" type="submit" id="prossegue" value="Sim" class="submit">
<input class="submit" onClick="javascript:window.location='javascript:history.back(-2)'" type="button" value="N&atilde;o" name="Button">
</div>
</form>
<? 
  if($_POST['prossegue']) {
  $id = $_POST['id'];
  mssql_query("DELETE site_ticket WHERE Id='".$id."'");
  echo"<script>alert('Ticket deletado.'); 
  location='index.php?go=painel/verticket'</script>";
  }
} 
}
?>