Initial commit
This commit is contained in:
14
system/SuperSmash/applicationchooser/.htaccess
Normal file
14
system/SuperSmash/applicationchooser/.htaccess
Normal 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>
|
1
system/SuperSmash/applicationchooser/cache/.htaccess
vendored
Normal file
1
system/SuperSmash/applicationchooser/cache/.htaccess
vendored
Normal file
@@ -0,0 +1 @@
|
||||
deny from all
|
@@ -0,0 +1 @@
|
||||
deny from all
|
@@ -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();
|
||||
?>
|
@@ -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');
|
||||
?>
|
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$database = array(
|
||||
'driver' => 'mysql',
|
||||
'host' => 'localhost',
|
||||
'database' => 'framework',
|
||||
'username' => 'root',
|
||||
'password' => '',
|
||||
'port' => '3306'
|
||||
);
|
||||
?>
|
34
system/SuperSmash/applicationchooser/controllers/chooser.php
Normal file
34
system/SuperSmash/applicationchooser/controllers/chooser.php
Normal 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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
26
system/SuperSmash/applicationchooser/models/chooser.php
Normal file
26
system/SuperSmash/applicationchooser/models/chooser.php
Normal 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');
|
||||
}
|
||||
}
|
||||
?>
|
BIN
system/SuperSmash/applicationchooser/portal.png
Normal file
BIN
system/SuperSmash/applicationchooser/portal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.8 KiB |
@@ -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 |
43
system/SuperSmash/applicationchooser/views/chooser/index.php
Normal file
43
system/SuperSmash/applicationchooser/views/chooser/index.php
Normal 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(" ", " ", $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>
|
Reference in New Issue
Block a user