<?php
include("../db.php");
header("Access-Control-Allow-Origin: * ");

 
 	$setting_type=$_REQUEST['setting_type'];	
	$status=$_REQUEST['status'];
	
	if($setting_type=='homework_sms_status')
	{
        $ary = array(
            "status" => $status
            );
	$sql = $db->updateAry("tbl_info", $ary, "WHERE id=1");

// 	if($db->query($sql) === TRUE) {
	    
	echo json_encode(array('status' => 1, 'msg'=>'status Changed Successfully..!'));      
// 	}

	}
	
	if($setting_type=='att_pre_status')
	{
	    $ary = array(
            "att_pre_status" => $status
            );
        $sql = $db->updateAry("tbl_info", $ary, "WHERE id=1");
// 		$sql = "UPDATE tbl_info SET att_pre_status='$status' WHERE id=1";

// 	if($db->query($sql) === TRUE) {
	    
	 	echo json_encode(array('status' => 1, 'msg'=>'status Changed Successfully..!'));      
// 	}    
	    
	}
	
	if($setting_type=='att_abs_status')
	{
    	$ary = array(
                "att_abs_status" => $status
                );
    	 $sql = $db->updateAry("tbl_info", $ary, "WHERE id=1");
    	 
// 	 	$sql = "UPDATE tbl_info SET att_abs_status='$status' WHERE id=1";

// 	if($db->query($sql) === TRUE) {
	    
	 	echo json_encode(array('status' => 1, 'msg'=>'status Changed Successfully..!'));      
// 	}
	}
	 
	if($setting_type=='st_circular_sms_status')
	{
	     	$ary = array(
                "st_circular_sms_status" => $status
                );
    	 $sql = $db->updateAry("tbl_info", $ary, "WHERE id=1");
// 	 	$sql = "UPDATE tbl_info SET st_circular_sms_status='$status' WHERE id=1";

// 	if($db->query($sql) === TRUE) {
	    
	 	echo json_encode(array('status' => 1, 'msg'=>'status Changed Successfully..!'));      
// 	}   
	 
	
	
	}
	 	   
	
if($setting_type=='result_pattern')
	{
	
    	$ary = array(
                "result_pattern" => $status
                );
    	 $sql = $db->updateAry("tbl_info", $ary, "WHERE id=1");
	 
// 	 	$sql = "UPDATE tbl_info SET result_pattern='$status' WHERE id=1";

// 	if($db->query($sql) === TRUE) {
	    
	 	echo json_encode(array('status' => 1, 'msg'=>'status Changed Successfully..!'));      
// 	}   

	}
	
	
	
	if($setting_type=='fee_month')
	{
	    $ary = array(
                "fee_month" => $status
                );
	    $sql = $db->updateAry("tbl_info", $ary, "WHERE id=1");
    	 
// 	 	$sql = "UPDATE tbl_info SET fee_month='$status' WHERE id=1";

// 	if($db->query($sql) === TRUE) {
	    
	 	echo json_encode(array('status' => 1, 'msg'=>'status Changed Successfully..!'));      
// 	}   

	}
	

?>