read())) { $full_path = $d->path.'/'.$entry; $is_dir = is_dir($full_path) && $entry != '.' && $entry != '..' && $entry != 'admin' && $entry != 'smarty' && $entry != 'templates'; if( $is_dir ) { removeDir( $full_path ); @rmdir( $full_path ); } else if(is_file( $full_path )) { @unlink($full_path); } } $d->close(); } if(!inSession()) { include('login.php'); exit; } else if(!inPermission('uninstall')) { $tabName = 'Uninstall'; include('nopermit.php'); exit; } $_REQUEST['installed'] = 1; if(isset($_GET['action']))// && isset($_GET['type'])) { if($_GET['action'] == '1') { removeTables(getTables()); /* if($_GET['type'] == '0') { removeTables(getTables()); } else if($_GET['type'] == '1') { removeTables($_REQUEST['tables']); removeDir("../"); } */ } } $_REQUEST['tables'] = getTables(); if(sizeof($_REQUEST['tables']) == 0) { if(isset($_GET['action'])) $_REQUEST['installed'] = 2; else $_REQUEST['installed'] = 3; } $smarty->assign('_REQUEST', $_REQUEST); $smarty->display('uninstall.tpl'); ?>