From 052c532a4426194c72b2c3df79296ac3b559f538 Mon Sep 17 00:00:00 2001 From: Xan Manning Date: Tue, 22 Jun 2010 22:05:23 +0100 Subject: [PATCH] Spring Cleaning! --- git.php | 3 + gitstyle.css | 214 +++++++++------------------------------------------ security.php | 6 ++ 3 files changed, 44 insertions(+), 179 deletions(-) diff --git a/git.php b/git.php index 1211bf2..a09d9f7 100644 --- a/git.php +++ b/git.php @@ -52,6 +52,9 @@ if (!is_array($validargs)){ $validargs = array(); } + +system_load_checks(); + security_load_repos(); security_test_repository_arg(); security_load_names(); diff --git a/gitstyle.css b/gitstyle.css index 1a47cf4..c3abf27 100644 --- a/gitstyle.css +++ b/gitstyle.css @@ -1,179 +1,35 @@ -#gitbody -{ - margin: 10px 10px 10px 10px; - border-style: solid; - border-width: 1px; - border-color: gray; - font-family: sans-serif; - font-size: 12px; - } - -div.githead -{ - margin: 0px 0px 0px 0px; - padding: 10px 10px 10px 10px; - background-color: #d9d8d1; - font-weight: bold; - font-size: 18px; - } - -#gitbody th -{ - text-align: left; - padding: 0px 0px 0px 7px; - } - -#gitbody td -{ - padding: 0px 0px 0px 7px; - } - -div.optiontable table -{ - padding: 0px 7px 0px 7px; - border-width: 0px; - font-size: 12px; - table-layout: fixed; - padding: 5px; - line-height: 36px; - cellpadding: 5px; - border-spacing: 0px; - width: 100%; - vertical-align: middle; - } - -div.optiontable tr:hover -{ - border-width: 1px; - } - -div.optiontable .descol -{ - text-align: right; - width: 30%; - } - -div.optiontable .valcol -{ - text-align: left; - width: 70% - } - -div.optiontable img -{ - vertical-align: middle; - } - -div.imgtable table -{ - padding: 0px 0px 0px 7px; - border-width: 0px; - font-size: 1px; - table-layout: auto; - } - -div.imgtable tags -{ - color: #009900; - background-color: #FFFF00; - } - -div.imgtable branches -{ - color: #CC6600; - background-color: #99FF99; - } - -div.imgtable img -{ - border: 0px; - display: block; - } - -div.imgtable .inl img -{ - border: 0px; - display: inline; - } - -div.imgtable .inl td -{ - height: auto; - vertical-align: middle; - font-size: 2px; - line-height: 3px; - } - -div.imgtable tr -{ - height: auto; - vertical-align: middle; - font-size: 9px; -/* line-height: 15px;*/ - } - -tr:hover -{ - background-color:#cdccc6; - } - -div.gitbrowse a.blob -{ - text-decoration: none; - color: #000000; - } - -div.gitcode { - padding: 10px; - } - -div.gitspacer -{ - padding: 1px 0px 0px 0px; - background-color: #FFFFFF; - } - -div.gitfooter -{ - padding: 7px 2px 2px 2px; - background-color: #d9d8d1; - text-align: right; - } - -div.gittitle -{ - padding: 7px 7px 7px 7px; - background-color: #d9d8d1; - font-weight: bold; - } - -div.gitbrowse a.blob:hover -{ - text-decoration: underline; - } -a.gitbrowse:hover -{ - text-decoration:underline; - color:#880000; - } -a.rss_logo -{ - float:left; - padding:3px 0px; - width:35px; - line-height:10px; - margin: 2px 5px 5px 5px; - border:1px solid; - border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e; - color:#ffffff; - background-color:#ff6600; - font-weight:bold; - font-family:sans-serif; - font-size:10px; - text-align:center; - text-decoration:none; - } -a.rss_logo:hover -{ - background-color:#ee5500; - } +#gitbody { margin: 10px; border-top: dashed 1px #3B3B3B; border-bottom: dashed 1px #3B3B3B; font-family: sans-serif; font-size: 12px; padding: 10px; } +a { color: #336699; } +a:hover { color: #6699CC; } +div.githead { margin: 0px; padding: 10px; border: 1px solid #AAAAAA; background-color: #E3E3E3; font-weight: bold; font-size: 18px; color: #000000; } +div.gittitle { margin: 0px; margin-top: 20px; padding: 10px 0px 10px 0px; font-weight: bold; font-size: 16px; color: #3B3B3B; } +div.gitfooter { padding: 7px 2px 2px 2px; text-align: right; border-top: solid 5px #E3E3E3; margin-top: 25px; } +div.imgtable th { text-align: left; padding: 0px 0px 0px 9px; border: 0px; } +div.imgtable td { padding: 0px 0px 0px 9px; border: 0px; } +div.git-home > table { border: 1px solid #E3E3E3; padding: 10px; } +div.git-home > table th { text-align: left; padding: 2px 9px 2px 9px; border: 1px solid #E4E4E4; } +div.git-home > table td { padding: 2px 9px 2px 9px; border: 1px solid #E4E4E4; } +div.optiontable table { padding: 0px 7px 0px 7px; border: 0px; font-size: 12px; table-layout: fixed; padding: 5px; line-height: 36px; border-spacing: 0px; width: 100%; vertical-align: middle; } +div.optiontable tr:hover { border-width: 1px; } +div.optiontable .descol { text-align: right; width: 30%; } +div.optiontable .valcol { text-align: left; width: 70%; } +div.optiontable img { vertical-align: middle; } +div.imgtable table { padding: 10px 17px 10px 10px; border: 1px solid #E4E4E4; font-size: 1px; table-layout: auto; margin-top: 25px; } +div.imgtable tags { color: #009900; background-color: #FFFF00; } +div.imgtable branches { color: #CC6600; background-color: #99FF99; } +div.imgtable img { border: 0px; display: block; } +div.imgtable .inl img { border: 0px; display: inline; } +div.imgtable .inl td { height: auto; vertical-align: middle; font-size: 2px; line-height: 3px; } +div.imgtable tr { height: auto; vertical-align: middle; font-size: 9px; /*line-height: 15px;*/ } +div#git-help > table td { padding: 5px 5px 5px 12px; } +div#git-description > table td { padding: 5px 5px 5px 12px; } +div#git-description > table { margin-top: 15px; } +div.gitbrowse > table td { padding: 5px 5px 5px 25px; } +tr:hover { background-color: #FFFFE1; } +div.gitbrowse a.blob { text-decoration: none; } +div.gitcode { padding: 10px; } +div.gitspacer { padding: 1px 0px 0px 0px; background-color: #FFFFFF; } +div.gitbrowse a.blob:hover { text-decoration: underline; } +a.gitbrowse:hover { text-decoration: underline; color: #880000; } +a.rss_logo { float: left; padding: 3px 0px; width: 35px; line-height: 10px; margin: 2px 5px 5px 5px; border: 1px solid; border-color: #fcc7a5 #7d3302 #3e1a01 #ff954e; color: #ffffff; background-color: #ff6600; font-weight: bold; font-family: sans-serif; font-size: 10px; text-align: center; text-decoration: none; } +a.rss_logo:hover { background-color:#ee5500; } diff --git a/security.php b/security.php index fd64118..452f173 100644 --- a/security.php +++ b/security.php @@ -26,6 +26,12 @@ // | Author: Xan Manning http://knoxious.co.uk/ | // +------------------------------------------------------------------------+ +function system_load_checks() { + if(!extension_loaded('gd') || !function_exists('gd_info')) { + die('You are required to have GD installed. Please contact your administrator!'); + } + } + function security_load_repos() { global $CONFIG, $validargs, $repos;