query($query) as $data) { $needSetup = "No"; } $db = DATABASE_LOCATION . constant('User::DATABASE_NAME') . ".db"; $file_db = new PDO("sqlite:" . $db); $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"'); foreach($dbTab as $row) : if (in_array("tabs", $row)) : $tabSetup = "No"; endif; endforeach; if($tabSetup == "Yes") : $settingsActive = "active"; endif; foreach($dbOptions as $row) : if (in_array("options", $row)) : $hasOptions = "Yes"; endif; endforeach; if($tabSetup == "No") : if($USER->authenticated && $USER->role == "admin") : $result = $file_db->query('SELECT * FROM tabs WHERE active = "true"'); $getsettings = $file_db->query('SELECT * FROM tabs WHERE active = "true"'); foreach($getsettings as $row) : if(!empty($row['iconurl']) && $settingsicon == "No") : $settingsicon = "Yes"; endif; endforeach; 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; if($hasOptions == "Yes") : $resulto = $file_db->query('SELECT * FROM options'); foreach($resulto as $row) : $title = isset($row['title']) ? $row['title'] : "Organizr"; $topbartext = isset($row['topbartext']) ? $row['topbartext'] : "#66D9EF"; $topbar = isset($row['topbar']) ? $row['topbar'] : "#333333"; $bottombar = isset($row['bottombar']) ? $row['bottombar'] : "#333333"; $sidebar = isset($row['sidebar']) ? $row['sidebar'] : "#393939"; $hoverbg = isset($row['hoverbg']) ? $row['hoverbg'] : "#AD80FD"; $activetabBG = isset($row['activetabBG']) ? $row['activetabBG'] : "#F92671"; $activetabicon = isset($row['activetabicon']) ? $row['activetabicon'] : "#FFFFFF"; $activetabtext = isset($row['activetabtext']) ? $row['activetabtext'] : "#FFFFFF"; $inactiveicon = isset($row['inactiveicon']) ? $row['inactiveicon'] : "#66D9EF"; $inactivetext = isset($row['inactivetext']) ? $row['inactivetext'] : "#66D9EF"; $loading = isset($row['loading']) ? $row['loading'] : "#66D9EF"; $hovertext = isset($row['hovertext']) ? $row['hovertext'] : "#000000"; endforeach; endif; $userpic = md5( strtolower( trim( $USER->email ) ) ); if(LOADINGICON !== "") : $loadingIcon = LOADINGICON; endif; if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56"; $userSize = "40"; endif; if($USER->authenticated) : if(GRAVATAR == "true") : $showPic = ""; else: $showPic = ""; endif; else : $showPic = "" . $language->translate("LOGIN") . ""; endif; } if(!defined('SLIMBAR')) : define('SLIMBAR', 'true'); endif; if(!defined('AUTOHIDE')) : define('AUTOHIDE', 'false'); endif; if(!defined('ENABLEMAIL')) : define('ENABLEMAIL', 'false'); endif; if(!defined('CUSTOMCSS')) : define('CUSTOMCSS', 'false'); endif; if(!defined('LOADINGSCREEN')) : define('LOADINGSCREEN', 'true'); endif; if(!defined('INSTALLEDVERSION')) : define('INSTALLEDVERSION', 'Awaiting-Install...'); endif; if(!isset($notifyExplode)) : $notifyExplode = array("bar","slidetop"); endif; if(SLIMBAR == "true") : $slimBar = "30"; $userSize = "25"; else : $slimBar = "56"; $userSize = "40"; endif; if(file_exists("images/settings2.png")) : $iconRotate = "false"; $settingsIcon = "settings2.png"; else: $iconRotate = "true"; $settingsIcon = "settings.png"; endif; ?> <?=$title;?><?php if($title !== "Organizr") : echo " - Organizr"; endif; ?>
"; endif; ?>
authenticated && $tabSetup == "Yes" && $needSetup == "No") :?>

translate("OPTIONS");?>


authenticated) : ?>
user
username); ?>
role); ?>
authenticated && $configReady == "Yes") : ?> authenticated) : ?>