<?php

session_start();

if($_REQUEST['s']=='get_device_id'){
	
	$device_id = trim($_ENV['APPLIANCE_PART']);
	
	if(file_exists('/etc/nyquist/wbcdetected')){
		$device_id = 'nq-wbc';
	}
	
	echo $device_id;
}
if($_REQUEST['s']=='check_login'){
	
	if($_SESSION['login']){
		echo 1;
	} else {
		echo 0;
	}
}