<?php
/*
* @package LabCMS
* @copyright (c) 2006 Alexander Levin aka Loki (loki_angel@mail.ru)
* @support http://labcms.ru
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

class lc_pm_notify_main extends ModuleTools
{
	public function __construct()
	{
		if (User::i()->isGuest()) return;
		
		$pm=Factory::create('lc_pm.main');
		$info=$pm->pm_status();
		
		$info['path']=LabCMS::i()->getModuleNodePath('lc_pm');
		
		if (LabCMS::i()->isAjax() && isset($_POST['action']) && $_POST['action']=="pm_status") {
			echo real_json_encode($info);
			exit;
		} else {
			self::_setTpl('pm_info');
			self::_assign('pm', $info);
		}
	}
}