<?php
defined('_VALID') or die(RESTRICTED_ACCESS);
include_once('class.trashmanager.php');
$trashmanagerObj = new trashmanager($configObj);
$action = $_REQUEST['action'];
$configObj->glTplObj->change_path($configObj->currentModulePath . 'html/templates/');
$configObj->glTplObj->set('configObj', $configObj);
$configObj->glTplObj->set('trashmanagerObj', $trashmanagerObj);
$configObj->glTplObj->set('settingTab', true);
$configObj->glTplObj->set('trashmanagerTab', true);

$paramMain = $configObj->AllmoduleAccess[$configObj->ModuleName];

$configObj->glTplObj->set('paramMain', $paramMain);


switch ($action) {
    case 'restore':

        if ($configObj->isAjaxSet) {
            if (isset($_REQUEST['rids'])) {
                $trashmanagerObj->restore();
                exit();
            }
        }

        break;

    case 'delete':

        if ($configObj->isAjaxSet) {
            if (isset($_REQUEST['dids'])) {
                $trashmanagerObj->delete();
                exit();
            }
        }
        break;
    default:
        $trashmanagerObj->load_trashmanager();

        break;
}
?>
