Your IP : 10.3.227.210


Current Path : /home/bolconlineco/public_html/admin/
Upload File :
Current File : /home/bolconlineco/public_html/admin/delete_assignment.php

<?php
ob_start();
include('../includes/connection/func.inc.php');  
	
	   $id = sql_strip($_GET['topicId']);
	   $cat_id=sql_strip($_GET['courseId']);
	   $topicass=sql_strip($_GET['topicass']);
	   $catId=sql_strip($_GET['catId']);
	   $sql="select path from topicassignment where  tAId='$topicass'";
	   
	   $result=mysql_query($sql) or die(mysql_error());
	   
	    if(mysql_num_rows($result) > 0)
		 {
			 
			$resultSet=mysql_fetch_array($result);
			if(file_exists('../Assignment/'.$resultSet['path']))
			 {
				if(unlink('../Assignment/'.$resultSet['path']))
				 {
						$sq="delete from topicassignment where topicId='$id' and courseId='$cat_id' and tAId='$topicass'";
						 $result=mysql_query($sq) or die(mysql_error());
						 $msg="Deleted Successfully";
						 header("location:topicass.php?catId=$catId&courseId=$cat_id&topicId=$id &msg=$msg");
						 exit();
				 }
			 }
			 else
			 {
						 $sq="delete from topicassignment where topicId='$id' and courseId='$cat_id' and tAId='$topicass'";
						 $result=mysql_query($sq) or die(mysql_error());
						 $msg="Deleted Successfully";
						 header("location:topicass.php?catId=$catId&courseId=$cat_id&topicId=$id &msg=$msg");
						 exit(); 
			 }
		
	  
    	  
	  
	 	
	}

?>