<?
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 Resposta de ticket</h1>
<div class="quadros">
<label>Tem certeza que deseja deletar esse resposta?</label>
<select name="id" id="id">
<? 
$noticiaq=mssql_query("SELECT titulo,Id FROM site_ticket_res 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='?go=painel/verticket'" type="button" value="N&atilde;o" name="Button">
</div>
</form>
  <? 
  if($_POST['prossegue']) {
  $id = $_POST['id'];
  mssql_query("DELETE site_ticket_res WHERE Id='".$id."'");
  echo"<script>alert('Resposta deleta com sucesso.'); 
  location='javascript:history.go(-2)'</script>";
  }
} 
}
?>