<?php

  include("html_functions.php");



  ################## PAGE INITIALIZATION #########################

  $lgid=$_SESSION['lgid'];

  

  ################## START OF PAGE CONTENT #########################

  include($_SESSION['adminpath']."/dbopen.php");



  $query="DELETE FROM amateur_draft WHERE league_id=$lgid";

  if ($_GET['showq']==1) {echo "$query<br/>\n";}

  mysqli_query($db,$query);



  $query="DELETE FROM ootp_sql_draft_list WHERE league_id=$lgid";

  if ($_GET['showq']==1) {echo "$query<br/>\n";}

  mysqli_query($db,$query);



  $query="DELETE FROM ootp_sql_draft_pool WHERE league_id=$lgid";

  if ($_GET['showq']==1) {echo "$query<br/>\n";}

  mysqli_query($db,$query);



  $query="UPDATE ootp_sql_admin SET value=0 WHERE scope=$lgid AND module='Draft' AND setting='draftOn'";

  if ($_GET['showq']==1) {echo "$query<br/>\n";}

  mysqli_query($db,$query);



  mysqli_close($db);



  header("Location: ".$_SERVER['HTTP_REFERER']);



?>

