Skip to content

Commit

Permalink
Completed Color Selection Feature
Browse files Browse the repository at this point in the history
Work done on feature - Color Selector
  • Loading branch information
causefx committed Dec 30, 2016
1 parent 94838cc commit 2486227
Show file tree
Hide file tree
Showing 6 changed files with 2,365 additions and 264 deletions.
Binary file added .gitattributes.swp
Binary file not shown.
6 changes: 3 additions & 3 deletions css/style.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

122 changes: 94 additions & 28 deletions index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

date_default_timezone_set("America/Los Angeles");
date_default_timezone_set('America/Los_Angeles');

$data = false;

Expand Down Expand Up @@ -34,10 +34,10 @@ function registration_callback($username, $email, $userdir)
$file_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

$dbTab = $file_db->query('SELECT name FROM sqlite_master WHERE type="table" AND name="tabs"');
$dbColor = $file_db->query('SELECT name FROM sqlite_master WHERE type="table" AND name="color"');
$dbOptions = $file_db->query('SELECT name FROM sqlite_master WHERE type="table" AND name="options"');

$tabSetup = "Yes";
$hasColors = "No";
$hasOptions = "No";

foreach($dbTab as $row) :

Expand All @@ -49,11 +49,11 @@ function registration_callback($username, $email, $userdir)

endforeach;

foreach($dbColor as $row) :
foreach($dbOptions as $row) :

if (in_array("color", $row)) :
if (in_array("options", $row)) :

$hasColors = "Yes";
$hasOptions = "Yes";

endif;

Expand All @@ -62,11 +62,17 @@ function registration_callback($username, $email, $userdir)
if($tabSetup == "No") :

if($USER->authenticated && $USER->role == "admin") :

$result = $file_db->query('SELECT * FROM tabs WHERE active = "true"');

elseif($USER->authenticated && $USER->role == "user") :

$result = $file_db->query('SELECT * FROM tabs WHERE active = "true" AND user = "true"');

else :

$result = $file_db->query('SELECT * FROM tabs WHERE active = "true" AND guest = "true"');

endif;

endif;
Expand All @@ -79,6 +85,42 @@ function registration_callback($username, $email, $userdir)

endif;

if($hasOptions == "Yes") :

$resulto = $file_db->query('SELECT * FROM options');

foreach($resulto as $row) :

$title = $row['title'];
$topbartext = $row['topbartext'];
$topbar = $row['topbar'];
$bottombar = $row['bottombar'];
$sidebar = $row['sidebar'];
$hoverbg = $row['hoverbg'];
$activetabBG = $row['activetabBG'];
$activetabicon = $row['activetabicon'];
$activetabtext = $row['activetabtext'];
$inactiveicon = $row['inactiveicon'];
$inactivetext = $row['inactivetext'];

endforeach;

elseif($hasOptions == "No") :

$title = "Organizr";
$topbar = "#eb6363";
$topbartext = "#FFFFFF";
$bottombar = "#eb6363";
$sidebar = "#000000";
$hoverbg = "#eb6363";
$activetabBG = "#eb6363";
$activetabicon = "#FFFFFF";
$activetabtext = "#FFFFFF";
$inactiveicon = "#FFFFFF";
$inactivetext = "#FFFFFF";

endif;

?>

<!DOCTYPE html>
Expand All @@ -92,7 +134,7 @@ function registration_callback($username, $email, $userdir)
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="msapplication-tap-highlight" content="no" />

<title>myDashboard</title>
<title><?=$title;?> - Organizr</title>

<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
Expand Down Expand Up @@ -126,15 +168,15 @@ function registration_callback($username, $email, $userdir)
</head>

<body>
<?php $color = "#eb6363"; $color2 = "black"; ?>

<!--Preloader-->
<div id="preloader" class="preloader table-wrapper">

<div class="table-row">

<div class="table-cell">

<div class="la-ball-scale-multiple la-3x" style="color: <?=$color;?>">
<div class="la-ball-scale-multiple la-3x" style="color: <?=$topbar;?>">

<div></div>
<div></div>
Expand All @@ -153,25 +195,25 @@ function registration_callback($username, $email, $userdir)
<style>
.bottom-bnts a {

background: <?=$color;?>;
color: white;
background: <?=$bottombar;?>;
color: <?=$topbartext;?>;

}.bottom-bnts {

background-color: <?=$color;?>;
background-color: <?=$bottombar;?>;

}.gn-menu-main {


background-color: <?=$color;?>;
background-color: <?=$topbar;?>;

}.gn-menu-main ul.gn-menu {

background: <?=$color2;?>;
background: <?=$sidebar;?>;

}.gn-menu-wrapper {

background: <?=$color2;?>;
background: <?=$sidebar;?>;

}.gn-menu i {

Expand All @@ -180,30 +222,30 @@ function registration_callback($username, $email, $userdir)

}.la-timer.la-dark {

color: <?=$color;?>
color: <?=$topbar;?>

}.refresh-preloader {

background: transparent;
background: red;

}.la-timer {

width: 75px;
height: 75px;
padding-top: 20px;
border-radius: 10px;
background: <?=$color2;?>;
border: 2px solid <?=$color;?>;
background: <?=$sidebar;?>;
border: 2px solid <?=$topbar;?>;

}.tab-item:hover a {

color: #fff !important;
background: <?=$color;?>;
color: <?=$sidebar;?> !important;
background: <?=$hoverbg;?>;

}.gn-menu li.active > a {

color: #fff !important;
background: <?=$color;?>;
color: <?=$activetabtext;?> !important;
background: <?=$activetabBG;?>;

}.active {

Expand All @@ -228,6 +270,30 @@ function registration_callback($username, $email, $userdir)
background-color: transparent;
box-shadow: none;

}.gn-menu li.active i.fa {

color: <?=$activetabicon;?>;

}.gn-menu li i.fa {

color: <?=$inactiveicon;?>;

}.gn-menu-main ul.gn-menu a {

color: <?=$inactivetext;?>;
}li.dropdown.some-btn .mdi {

color: <?=$topbartext;?>;

}.nav>li>a:focus, .nav>li>a:hover {

text-decoration: none;
background-color: transparent;

}div#preloader {

background-color: <?=$topbartext;?>;

}
</style>

Expand Down Expand Up @@ -295,8 +361,8 @@ function registration_callback($username, $email, $userdir)
<!-- /gn-scroller -->
<div class="bottom-bnts">

<!--<li class="tab-item profile" id="settings.phpx"><i class="mdi mdi-account"></i></li>
<a class="fix-nav" href="#"><i class="mdi mdi-pin"></i></a>-->
<!--<li class="tab-item profile" id="settings.phpx"><i class="mdi mdi-account"></i></li>-->
<a class="fix-nav" href="#"><i class="mdi mdi-pin"></i></a>
<?php if(!$USER->authenticated) : ?>
<a class="log-in" href="#"><i class="mdi mdi-login"></i></a>
<?php endif ?>
Expand All @@ -312,7 +378,7 @@ function registration_callback($username, $email, $userdir)

<li class="top-clock">

<span><span style="color:black;"><b>Organizr</b></span></span>
<span><span style="color:<?=$topbartext;?>;"><b><?=$title;?></b></span></span>

</li>

Expand Down Expand Up @@ -567,7 +633,7 @@ function registration_callback($username, $email, $userdir)
<?php if($USER->authenticated) : ?>
<div class="logout-modal modal fade">

<div class="table-wrapper" style="background: <?=$color;?>">
<div class="table-wrapper" style="background: <?=$topbar;?>">

<div class="table-row">

Expand All @@ -577,7 +643,7 @@ function registration_callback($username, $email, $userdir)

<div class="content-box">

<div class="light-blue-bg biggest-box">
<div class="gray-bg biggest-box">

<form name="log out" id="logout" action="index.php" method="POST">
<input type="hidden" name="op" value="logout">
Expand Down
Loading

0 comments on commit 2486227

Please sign in to comment.