CasperSecurity

Current Path : /var/www/mvc360.ucnms.co.in/v.2.0/api/request/academic/syllabus/
Upload File :
Current File : /var/www/mvc360.ucnms.co.in/v.2.0/api/request/academic/syllabus/add_new_syllabus.php

<?php

	session_start();
	
	include '../../../../web/connection/connection.php';
	
	// add new syllabus variables
	$academic_session = $_REQUEST['academic_session'];
	$class_id = $_REQUEST['class_id'];
	$branch_id = $_REQUEST['branch_id'];
	$semester = $_REQUEST['semester'];
	$syllabus_year = $_REQUEST['syllabus_year'];
	$syllabusid = $_REQUEST ['syllabusid'];
	$subject_code = $_REQUEST['subject_code'];
	$subject_id = $_REQUEST['subject_id'];
	$subject_type = $_REQUEST['subject_type'];
	$module_name = $_REQUEST['module_name'];
	$file = $_REQUEST['file'];
	$created_on = date('Y-m-d');
	$created_by = $_SESSION['USER_ID'];
	$is_active = 'yes';
	$is_delete = $_REQUEST['is_delete'];
	
	// add new syllabus topic variables
	$syllabus_id = $_REQUEST['syllabus_id'];
	$topic = $_REQUEST['topic'];
	$topic_hour = $_REQUEST['topic_hour'];
	$is_active = $_REQUEST['is_active'];
	
	
	// inserting data into syllabus table
	
        $db_handle = new DBController();
		
		$newInsert = $db_handle->tableinsert("INSERT INTO syllabus(syllabus_id,academic_session,class_id,branch_id,semester,syllabus_year,syllabusid,subject_code,subject_id,subject_type,module_name,file,created_on,created_by,is_active,is_delete)
		VALUES('$syllabus_id','$academic_session','$class_id','$branch_id','$semester','$syllabus_year','$syllabusid','$subject_code','$subject_id','$subject_type','$module_name','$file',
		'$created_on','$created_by','$is_active','$is_delete')");
				
	if($newInsert == TRUE){
		  
		echo 'Data Inserted Successfully in table 1';
		  
		   
		//if insertion is successful in syllabus table then fetch a particular primary key needed
		$db_handle = new DBController();
		$select = $db_handle->runQuery("SELECT syllabus_id FROM syllabus  WHERE topic_name='$topic_name' ");
		foreach ($select as $v){
			$syllabus_id = $v['syllabus_id']; // unique primary key needed as a data for the nested table
		}
		
		
	// inserting data into syllabus topic
	
		$db_handle = new DBController();
		
		$newInsert2 = $db_handle->tableinsert("INSERT INTO syllabus_topic(syllabus_topic_id,syllabus_id,topic,topic_hour,is_active)
		VALUES('$syllabus_topic_id','$syllabus_id','$topic','$topic_hour','$is_active')");
				
		if($newInsert2 == TRUE){
		  
		  echo 'Data Inserted Successfully in table 2';
		  
		}else{
		  
		  echo 'Not Inserted in table 2' ;
		  
		}
		
	}else{
		  
		echo 'Not Inserted in table 1' ;
		  
		}
		
?>
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY