<?php try { if (sizeof($_POST) > 0) { require_once './inc/Config.php'; require_once './inc/autoloader.php'; $gitHub = new GitHubFacade($_POST['username'], $_POST['password'], $_POST['repo']); if ($gitHub->login()) { $pluginDAO = PluginDAO::getInstance($gitHub); $pluginDAO->addVersions($_POST['username'], $_POST['repo'], $gitHub->getRepoTags($_POST['hash'])); header("Location: /{$_POST['username']}/{$_POST['repo']}"); } } } catch (Exception $e) { define('ERROR_MESSAGE', $e->getMessage()); } ?> <!DOCTYPE html> <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6 jquery"> <![endif]--> <!--[if IE 7 ]> <html lang="en" class="no-js ie7 jquery"> <![endif]--> <!--[if IE 8 ]> <html lang="en" class="no-js ie8 jquery"> <![endif]--> <!--[if IE 9 ]> <html lang="en" class="no-js ie9 jquery"> <![endif]--> <!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js jquery"> <!--<![endif]--> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>jQuery: The Write Less, Do More, JavaScript Library</title>