<?php
require_once(PLUGIN_DIR . 'Tools/TCSync.php');
class TCSyncView {
    public static function display(){
        if(isset($_REQUEST["type"])){
            switch($_REQUEST["type"]){
                case 0:
                    TCSync::user_sync();
                    break;
                case 1:
                    TCSync::organization_sync();
                    break;
                case 2:
                    $w3_objectcache = w3_instance('W3_ObjectCache');
                    $w3_objectcache->flush();
                    TCSync::other_sync();
                    break;
            }
        }
        Timber::render("TCSyncView.html");
    }
} 