<?PHP

class ManagersAdmin extends Buyers
{
	function fetch()
	{

		if($this->request->method('post'))
		{
			// Действия с выбранными
			$logins = $this->request->post('check');
			if(is_array($logins))
			switch($this->request->post('action'))
			{
			    case 'delete':
			    {
			    	foreach($logins as $login)
						$this->managers->delete_manager($login);
			        break;
			    }
			}
		}

		$managers = $this->managers->get_managers();
		$managers_count = $this->managers->count_managers();
		$this->design->assign('managers', $managers);
		$this->design->assign('managers_count', $managers_count);
		return $this->body = $this->design->fetch('managers.tpl');
	}
}
