$LOGIN_FAIL = true; if ($member->authorizeLogin($_SESSION['btPassword']) && $member->hasAccess($consoleObj)) { $countErrors = 0; $dispError = array(); // Check if installed if (!in_array($_POST['pluginDir'], $pluginObj->getPlugins("filepath"))) { $countErrors++; $dispError[] = "The selected plugin is not installed!"; } // Start Uninstall $sql = "DROP TABLE `" . $PLUGIN_TABLE_NAME . "`"; $sql2 = "DROP TABLE `" . $dbprefix . "youtube_videos`"; if ($mysqli->query($sql) && $mysqli->query($sql2)) { // Remove Plugin from plugin table $pluginID = array_search($_POST['pluginDir'], $pluginObj->getPlugins("filepath")); $pluginObj->select($pluginID); $checkDeletePlugin = $pluginObj->delete(); // Remove Console Option $ytConnectCID = $consoleObj->findConsoleIDByName($PLUGIN_NAME); if ($ytConnectCID !== false) { $consoleObj->select($ytConnectCID); $checkDeleteConsole = $consoleObj->delete(); } else { $checkDeleteConsole = false; } if (!$checkDeletePlugin) { $countErrors++; $dispError[] = "Unable to delete plugin from database table. You will have to manually delete it. - " . $pluginID; } if (!$checkDeleteConsole) { $countErrors++;