selectWithParameter( "FileName", "plugins", array( 'id' => $id ), "Id=:id" ); $name = $sth -> fetch(); if ( is_dir( "$name[FileName]" ) ) { // removing plugin directory from the code base if ( Plugincache::rrmdir( "$name[FileName]" ) ) { $db -> delete( 'plugins', array( 'id' => $id ), "Id=:id" ); //if result successfull redirect and show success message header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=2" ); throw new SystemExit(); } else { // if result unsuccessfull redirect and show error message header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=0" ); throw new SystemExit(); } } } else { // if result unsuccessfull redirect and show error message header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=0" ); throw new SystemExit(); } } }