Initial commit

This commit is contained in:
NightBits
2018-12-19 20:44:16 +01:00
parent b680b82039
commit 878eda33b8
92 changed files with 5819 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
RewriteEngine on
# disable directory browsing
Options All -Indexes
<FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$">
Order Allow,Deny
Deny from all
</FilesMatch>
# turn off magic_quotes_gpc for PHP enabled servers
<ifmodule mod_php4.c>
php_flag magic_quotes_gpc off
</ifmodule>

View File

@@ -0,0 +1 @@
deny from all

View File

@@ -0,0 +1 @@
deny from all

View File

@@ -0,0 +1,16 @@
<?php
$defaultController = 'chooser';
$defaultAction = 'start';
$language = 'english';
$controllerParameter = 'c';
$actionParameter = 'a';
$development = true;
$logErrors = true;
$urlParameters = true;
$sessionDatabase = false;
$libraries = array();
$helpers = array();
?>

View File

@@ -0,0 +1,11 @@
<?php
$applicationName = 'applicationChooser';
$websiteTitle = 'Choose your website';
$webmasterEmail = 'info@SuperSmash.nl';
// Include the database configuration file
include_once ('databaseconfiguration.php');
// Include the SuperSmash framework configuration file
include_once ('SuperSmashconfiguration.php');
?>

View File

@@ -0,0 +1,10 @@
<?php
$database = array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'framework',
'username' => 'root',
'password' => '',
'port' => '3306'
);
?>

View File

@@ -0,0 +1,34 @@
<?php
class Chooser extends system\SuperSmash\Controller
{
// Create the constructor
function __construct()
{
parent::__construct();
}
function _beforeAction()
{
}
function start()
{
// Load the chooser Model
$this->load->model('chooser');
// Load the data for the chooser model
$data = array_merge($this->ChooserModel->denyList());
$data += $this->ChooserModel->chooser();
// Load the view and add the data
$this->load->view('chooser', $data);
}
function _afterAction()
{
}
}
?>

View File

@@ -0,0 +1,26 @@
<?php
class ChooserModel extends system\SuperSmash\Model
{
// Create the constructor
public function __construct()
{
parent::__construct();
}
public function chooser()
{
return array('chooserMessage' =>
'This portal contains several websites <br />
Please click on the website that you would like to visit <br /><br />
');
}
public function denyList()
{
return array('denyList' =>
'.htaccess');
}
}
?>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@@ -0,0 +1,93 @@
body
{
margin:0 auto;
}
h1 {
font-family: SuperSmash, serif;
text-transform: uppercase;
letter-spacing: 1px;
padding:10px;
}
#container
{
width:600px;
margin: 0 auto;
background: gray;
border: 1px solid #999;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
}
.button{
font-size:16px;
font-family:Arial,sans-serif;
height:100px;
width:100px;
border-width:0px;
cursor:pointer;
}
#header
{
width: auto;
height:100px;
text-align: center;
color : #F0C74D;
}
#content
{
width:600px;
padding: 20px 10px 20px 10px;
margin:0 auto;
text-align: center;
}
#footer
{
width:600px;
margin: 0 auto;
background: white;
border: 1px solid #999;
border-top-left-radius: 15px;
border-top-right-radius: 15px;
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
text-align: center;
}
#dynamic{
text-align: center;
}
#html5{
position:fixed;
top:20px;
right:5px;
}
#twitter{
position:fixed;
top:60px;
right:5px;
}
#w3c{
position:fixed;
top:100px;
right:5px;
}
pre
{
font-size: 12px;
padding-top: 10px;
background: #f0f0f0;
border: 1px solid #999;
width:400px;
margin: 0 auto;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html>
<head>
<title><?php echo configuration('websiteTitle');?></title>
<link href="<?php echo $websitePath . $viewPath;?>/images/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="<?php echo $websitePath . $viewPath;?>/css/style.css"/>
</head>
<body style="background:transparent url(<?php echo $websitePath . $viewPath;?>/images/background.png) scroll; background-color:#0a0a0a; text-align:center; margin:0px; padding:0px;">
<div id="header"></div>
<div id="container">
<div id="content">
<div id="dynamic"><?php echo $chooserMessage; ?></div>
<?php
foreach ($applications as &$application){
$application = str_replace(" ", "&nbsp", $application);
// Check if there is an application in the denyList
if (strlen(strstr($denyList,$application))>0)
{
continue;
}
echo " <form action=\"$websiteURL/index.php\" method=\"POST\">";
if (file_exists(ROOT . "/applications/$application/portal.png")){
echo "<button class=\"button\" name=\"changepage\" type=\"submit\" style=\"background-color:transparent; background-image:url($websiteURL/applications/" . "$application" . "/portal.png)\" value=\"$application\" title=\"$application\"></button>";
} else {
echo "<button class=\"button\" name=\"changepage\" type=\"submit\" style=\"background-color:transparent; background-image:url($websitePath/portal.png)\" value=\"$application\" title=\"$application\"></button>";
}
echo " <br />$application
</form>
<br />";
};
?>
</div>
</div> <br /><br />
<div id="footer">
<small>
Page rendered in {elapsed} seconds, using {usage}<br />
</small>
</div>
</body>
</html>