<?php

class Lib_Permission
{
	
    public function Info()
    {			
		$adminSession = new Zend_Session_Namespace('admin');
		if( $adminSession->admin_auth == true ){ return true; }
		else return false;
	}	
	
    public function LoginInfo()
    {			
		$adminSession = new Zend_Session_Namespace('admin');
		$Admin = new Admin();
		$select = $Admin->select();
		$select->where('admin_id = ?', $adminSession->admin_id);	
		$row = $Admin->fetchRow($select);
		
		return $row['admin_firstname'].' '.$row['admin_secondname'];
	}	
	
    public function LoginInfoId($id)
    {			
		$Admin = new Admin();
		$select = $Admin->select();
		$select->where('admin_id = ?', $id);	
		$row = $Admin->fetchRow($select);
		
		return $row['admin_firstname'].' '.$row['admin_secondname'];
	}	
	
}

