diff --git a/front-controller.php b/front-controller.php index 7c26de0..a73b85d 100644 --- a/front-controller.php +++ b/front-controller.php @@ -24,6 +24,7 @@ $isNewEnv = preg_match('#env\/new/?$#', $q); $isRecentlyClonedEnvs = preg_match('#recently-cloned-environments/?$#', $q); $isCapturing = preg_match('#capturing-environment#', $q); +$isFYP = preg_match('#fyp#', $q); $currentUrl = "http://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}"; @@ -48,4 +49,8 @@ $file = 'recently-cloned-environments'; } +if($isFYP) { + require_once('model-fyp.php'); +} + require_once('front-view.php'); \ No newline at end of file diff --git a/model-fyp.php b/model-fyp.php new file mode 100644 index 0000000..ac7b9cd --- /dev/null +++ b/model-fyp.php @@ -0,0 +1,52 @@ + 1, + CURLOPT_URL => $url, + CURLOPT_USERAGENT => 'JaL-User-Agent', + CURLOPT_SSL_VERIFYPEER => false)); +$contributors = json_decode(curl_exec($curl)); + +$commits = $contributors[0]->contributions + $contributors[1]->contributions + $contributors[2]->contributions; + +$url = 'https://api.github.com/repos/Precise-Pixels/cell/branches?per_page=100&page=1'; +$curl = curl_init(); +curl_setopt_array($curl, array( + CURLOPT_RETURNTRANSFER => 1, + CURLOPT_URL => $url, + CURLOPT_USERAGENT => 'JaL-User-Agent', + CURLOPT_SSL_VERIFYPEER => false)); +$branches1 = json_decode(curl_exec($curl)); + +$url = 'https://api.github.com/repos/Precise-Pixels/cell/branches?per_page=100&page=2'; +$curl = curl_init(); +curl_setopt_array($curl, array( + CURLOPT_RETURNTRANSFER => 1, + CURLOPT_URL => $url, + CURLOPT_USERAGENT => 'JaL-User-Agent', + CURLOPT_SSL_VERIFYPEER => false)); +$branches2 = json_decode(curl_exec($curl)); + +$branches = count($branches1) + count($branches2); + +$url = 'https://api.github.com/repos/Precise-Pixels/cell/pulls?state=all&per_page=100&page=1'; +$curl = curl_init(); +curl_setopt_array($curl, array( + CURLOPT_RETURNTRANSFER => 1, + CURLOPT_URL => $url, + CURLOPT_USERAGENT => 'JaL-User-Agent', + CURLOPT_SSL_VERIFYPEER => false)); +$pulls1 = json_decode(curl_exec($curl)); + +$url = 'https://api.github.com/repos/Precise-Pixels/cell/pulls?state=all&per_page=100&page=2'; +$curl = curl_init(); +curl_setopt_array($curl, array( + CURLOPT_RETURNTRANSFER => 1, + CURLOPT_URL => $url, + CURLOPT_USERAGENT => 'JaL-User-Agent', + CURLOPT_SSL_VERIFYPEER => false)); +$pulls2 = json_decode(curl_exec($curl)); + +$pulls = count($pulls1) + count($pulls2); \ No newline at end of file diff --git a/views/fyp.php b/views/fyp.php index bb25a29..b7b0b4b 100644 --- a/views/fyp.php +++ b/views/fyp.php @@ -10,8 +10,11 @@

THE PROJECT

-

Cell Industries is a Multimedia Technology and Design University of Kent final year project by Jacob Hammond, James Lee and Joseph Williams.

-

More information coming soon.

+

Cell Industries is a Multimedia Technology and Design University of Kent Final Year Project by Precise Pixels:

+

Jacob Hammond
+ James Lee
+ Joseph Williams

+

For more information, see the Progress Blog.

@@ -23,4 +26,15 @@ +
+
+

GITHUB INFO

+

URL: https://github.com/Precise-Pixels/cell

+

Language Distribution: PHP 49.5% | Javascript 29.5% | CSS 21.0%

+

Commits:

+

Branches:

+

Pull Requests:

+
+
+ \ No newline at end of file