<?php
include("../include/startup.php"); 
session_start();
if(isset($_REQUEST['action']) && $_REQUEST['action']=='show_only_my_things'){
	$checked = $_REQUEST['checked'];
	if($checked == 1){
		mysqli_query($conn,"UPDATE admin SET show_only_my_things = 1 WHERE id = '".$_SESSION['user_id']."' ");
	}else{
		mysqli_query($conn,"UPDATE admin SET show_only_my_things = 0 WHERE id = '".$_SESSION['user_id']."' ");
	}
}else if(isset($_REQUEST['action']) && $_REQUEST['action']=='collapse_left'){

	echo $_SESSION['collapse_left'] = (isset($_REQUEST['collapse_left']) &&  $_REQUEST['collapse_left'] == '1') ? "2" : "1";
	
}
die;
?>