authenticated) : die("Why you trying to access this without logging in?!?!"); endif; $dbfile = constant('User::DATABASE_LOCATION') . constant('User::DATABASE_NAME') . ".db"; $file_db = new PDO("sqlite:" . $dbfile); $file_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $dbTab = $file_db->query('SELECT name FROM sqlite_master WHERE type="table" AND name="tabs"'); $dbOptions = $file_db->query('SELECT name FROM sqlite_master WHERE type="table" AND name="options"'); $tabSetup = "Yes"; $hasOptions = "No"; foreach($dbTab as $row) : if (in_array("tabs", $row)) : $tabSetup = "No"; endif; endforeach; foreach($dbOptions as $row) : if (in_array("options", $row)) : $hasOptions = "Yes"; endif; endforeach; if($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; if($tabSetup == "No") : $result = $file_db->query('SELECT * FROM tabs'); endif; if($hasOptions == "Yes") : $resulto = $file_db->query('SELECT * FROM options'); endif; $action = ""; if(isset($_POST['action'])) : $action = $_POST['action']; endif; if($action == "addTabz") : if($tabSetup == "No") : $file_db->exec("DELETE FROM tabs"); endif; if($tabSetup == "Yes") : $file_db->exec("CREATE TABLE tabs (name TEXT UNIQUE, url TEXT, defaultz TEXT, active TEXT, user TEXT, guest TEXT, icon TEXT)"); endif; $addTabName = array(); $addTabUrl = array(); $addTabIcon = array(); $addTabDefault = array(); $addTabActive = array(); $addTabUser = array(); $addTabGuest = array(); $buildArray = array(); foreach ($_POST as $key => $value) : $trueKey = explode('-', $key); if ($value == "on") : $value = "true"; endif; if($trueKey[0] == "name"): array_push($addTabName, $value); endif; if($trueKey[0] == "url"): array_push($addTabUrl, $value); endif; if($trueKey[0] == "icon"): array_push($addTabIcon, $value); endif; if($trueKey[0] == "default"): array_push($addTabDefault, $value); endif; if($trueKey[0] == "active"): array_push($addTabActive, $value); endif; if($trueKey[0] == "user"): array_push($addTabUser, $value); endif; if($trueKey[0] == "guest"): array_push($addTabGuest, $value); endif; endforeach; /* echo "NAME: "; print_r($addTabName); echo "

URL: "; print_r($addTabUrl); echo "

ICON: "; print_r($addTabIcon); echo "

DEFAULT: "; print_r($addTabDefault); echo "

ACTIVE: "; print_r($addTabActive); echo "

USER: "; print_r($addTabUser); echo "

GUEST: "; print_r($addTabGuest); */ $tabArray = 0; if(count($addTabName) > 0) : foreach(range(1,count($addTabName)) as $index) : if(!isset($addTabDefault[$tabArray])) : $tabDefault = "false"; else : $tabDefault = $addTabDefault[$tabArray]; endif; $buildArray[] = array('name' => $addTabName[$tabArray], 'url' => $addTabUrl[$tabArray], 'defaultz' => $tabDefault, 'active' => $addTabActive[$tabArray], 'user' => $addTabUser[$tabArray], 'guest' => $addTabGuest[$tabArray], 'icon' => $addTabIcon[$tabArray]); $tabArray++; endforeach; endif; $insert = "INSERT INTO tabs (name, url, defaultz, active, user, guest, icon) VALUES (:name, :url, :defaultz, :active, :user, :guest, :icon)"; $stmt = $file_db->prepare($insert); $stmt->bindParam(':name', $name); $stmt->bindParam(':url', $url); $stmt->bindParam(':defaultz', $defaultz); $stmt->bindParam(':active', $active); $stmt->bindParam(':user', $user); $stmt->bindParam(':guest', $guest); $stmt->bindParam(':icon', $icon); foreach ($buildArray as $t) : $name = $t['name']; $url = $t['url']; $defaultz = $t['defaultz']; $active = $t['active']; $user = $t['user']; $guest = $t['guest']; $icon = $t['icon']; $stmt->execute(); endforeach; endif; if($action == "addOptionz") : if($hasOptions == "Yes") : $file_db->exec("DELETE FROM options"); endif; if($hasOptions == "No") : $file_db->exec("CREATE TABLE options (title TEXT UNIQUE, topbar TEXT, bottombar TEXT, sidebar TEXT, hoverbg TEXT, topbartext TEXT, activetabBG TEXT, activetabicon TEXT, activetabtext TEXT, inactiveicon TEXT, inactivetext TEXT)"); endif; $title = $_POST['title']; $topbartext = $_POST['topbartext']; $topbar = $_POST['topbar']; $bottombar = $_POST['bottombar']; $sidebar = $_POST['sidebar']; $hoverbg = $_POST['hoverbg']; $activetabBG = $_POST['activetabBG']; $activetabicon = $_POST['activetabicon']; $activetabtext = $_POST['activetabtext']; $inactiveicon = $_POST['inactiveicon']; $inactivetext = $_POST['inactivetext']; $insert = "INSERT INTO options (title, topbartext, topbar, bottombar, sidebar, hoverbg, activetabBG, activetabicon, activetabtext, inactiveicon, inactivetext) VALUES (:title, :topbartext, :topbar, :bottombar, :sidebar, :hoverbg, :activetabBG, :activetabicon , :activetabtext , :inactiveicon, :inactivetext)"; $stmt = $file_db->prepare($insert); $stmt->bindParam(':title', $title); $stmt->bindParam(':topbartext', $topbartext); $stmt->bindParam(':topbar', $topbar); $stmt->bindParam(':bottombar', $bottombar); $stmt->bindParam(':sidebar', $sidebar); $stmt->bindParam(':hoverbg', $hoverbg); $stmt->bindParam(':activetabBG', $activetabBG); $stmt->bindParam(':activetabicon', $activetabicon); $stmt->bindParam(':activetabtext', $activetabtext); $stmt->bindParam(':inactiveicon', $inactiveicon); $stmt->bindParam(':inactivetext', $inactivetext); $stmt->execute(); endif; ?> Settings

Total Tabs
  • >
    >
    Active
    >
    User
    >
    Guest

About Organizr

Let's Bidazzle

Change the colors of the following elements:

Title

Title
Title Text

Navigation Bars

Top Bar
Bottom Bar
Side Bar
Hover BG

Active Tab

Active Tab BG
"">
Active Tab Icon
Active Tab Text

Inactive Tab

Inactive Icon
Inactive Text
authenticated) : ?> authenticated) : ?>