<?php
if (!defined('GV32_COM')) exit('GV32.COM No direct script access allowed');
class Clear
{
	function Clear()
	{
	
	}
	
	function infolist(  )
	{
		$GLOBALS['Templ'] -> caching = true;
		$GLOBALS['Templ'] -> cache_lifetime = 86400 ;   //60 *  60 * 24 
		
		$GLOBALS['Templ'] -> assign('actUrl',EMPLOYEE_WEBURL."/index.php?load=clear&act=clearall");
		$GLOBALS['Templ'] -> display('clear_tpl.html');	
	}
	
	function clearall(  )
	{

		$clearwwwval 	  = $GLOBALS['Reque'] -> reqval["clearwww"];
		$clearemployeeval = $GLOBALS['Reque'] -> reqval["clearemployee"];

		if($clearwwwval == 'web')
		{
			$GLOBALS['Templ'] -> setCacheDir(DOCUMENT_DIR.'/_tmp/www');
			$GLOBALS['Templ'] -> clearAllCache();
		}
		
		if($clearemployeeval == 'admin')
		{

			$GLOBALS['Templ'] -> setCacheDir(DOCUMENT_DIR.'/_tmp/adminsys');
			$GLOBALS['Templ'] -> clearAllCache();
		}


		$GLOBALS['Templ'] -> assign('infomessage',$GLOBALS['_LANG']['claersusse']);
		$GLOBALS['Templ'] -> assign('URL_TIME',URL_TIME);
		$GLOBALS['Templ'] -> assign('geturl',EMPLOYEE_WEBURL."/?load=clear&act=infolist");
		$GLOBALS['Templ'] -> display('suggestion_tpl.html');	
		
	}
	
		
}

$Clear = new Clear();

?>