<?php
session_start();
require_once("common_msg.inc");
require_once('../func-select.php');
$db = db_connect();
$what = isset($_GET['what']) ? $_GET['what'] : '';
switch($what){
case 'web_education':
$sql = "delete from web_education where id='$id'";
mysql_query($sql,$db);
header("Location: apply_online_education.php?applicant_id=$applicant_id");
break;
case 'web_employment':
$sql = "delete from web_employment where id='$id'";
mysql_query($sql,$db);
header("Location: apply_online_employment.php?applicant_id=$applicant_id");
break;
case 'web_training':
$sql = "delete from web_training where training_id='$id'";
mysql_query($sql,$db);
header("Location: apply_online_training.php?applicant_id=$applicant_id");
break;
case 'removefile':
$document = getdata_one("*","web_doc_library","id",$id);
unlink('uploads/documents/'.$document['applicant_id'].'/'.$document['doc_file']);
$sql = "update web_doc_library set doc_file='' where id='$id'";
mysql_query($sql,$db);
break;
}