<?php
namespace Controllers;
// Контроллер Настроек
class Chz extends Controller {

	public function __construct() {
		parent::__construct();
		$this->model=new \Models\Chz($this->db, $this->f3, $this->sets);
	}

	// Главная страница (Входящие документы)
	function post_lmstatus() {
		$post=$this->f3->get('POST');
		foreach ($post as $key => $value) {
			$this->sets[$key]=$value;
		}
		$this->model=new \Models\Chz($this->db, $this->f3, $this->sets);
		$res=$this->model->lm_status();
		echo json_encode($res);
		exit();
	}

	function post_lminit() {
		$post=$this->f3->get('POST');
		foreach ($post as $key => $value) {
			$this->sets[$key]=$value;
		}
		$this->model=new \Models\Chz($this->db, $this->f3, $this->sets);
		$res=$this->model->lm_init();
		echo json_encode($res);
		exit();
	}
}