<?php

if (!defined('ROOT'))
    exit('Can\'t Access !');
class templatetagwap_act extends act {
    function init() {
		$this->check_pw();
    }
    function get_action() {
        front::check_type(front::get('id'));
        $tagid=front::get('id');
        echo tool::text_javascript(templatetagwap::tag($tagid));
    }
    function test_action() {
        front::check_type(front::get('id'));
        $tagid=front::get('id');
        echo templatetagwap::tag($tagid);
    }
    function visual_action() {
        if ($this->view->usergroupid != '888')
            exit('PAGE NOT FOUND!');
        $id=front::get('id');
        $tpl=str_replace('_d_','/',$id);
        $tpl=str_replace('#','',$tpl);
        $tpl=str_replace('_html','.html',$tpl);
        $content=file_get_contents(TEMPLATE.'/'.config::get('template_mobile_dir').'/'.$tpl);
        echo @front::$view->_eval(front::$view->compile($content));
        $this->render('../admin/system/tag_visual.php');
    }
}