<?php

/*-----------------------------------------------\
| 												 |
| @Author:       Andrey Brykin (Drunya)          |
| @Email:        drunyacoder@gmail.com           |
| @Site:         http://atomx.net                |
| @Version:      1.4                             |
| @Project:      CMS                             |
| @package       CMS AtomX                       |
| @subpackege    Admin Panel module  			 |
| @copyright     ©Andrey Brykin 2010-2013        |
\-----------------------------------------------*/
/*-----------------------------------------------\
| 												 |
|  any partial or not partial extension          |
|  CMS AtomX,without the consent of the          |
|  author, is illegal                            |
|------------------------------------------------|
|  Любое распространение                         |
|  CMS AtomX или ее частей,                      |
|  без согласия автора, является не законным     |
\-----------------------------------------------*/
include_once '../sys/boot.php';
include_once ROOT . '/admin/inc/adm_boot.php';
$_SESSION['message'] = __('Cache is cleared');
$Register['Cache']->clean();
$Snippets = new AtmSnippets();
$Snippets->cleanCahe();
_unlink(ROOT . '/sys/cache/templates/');
redirect('/admin');
 /**
  * Parse snippets in template
  * Examples:
  * {[snippet_name]}
  * {[!snippet_name]}
  * {[!snippet_name?param1=value1&param2=value2]}
  *
  * @param       string $page
  * @return      data with parsed snippets
  */
 public function parseSnippet($page)
 {
     $SnippetsParser = new AtmSnippets($page);
     return $SnippetsParser->parse();
 }