| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669 |
- <?php
- //Set some variables
- ini_set("display_errors", 1);
- ini_set("error_reporting", E_ALL | E_STRICT);
- $data = false;
- $databaseLocation = "databaseLocation.ini.php";
- $needSetup = "Yes";
- $tabSetup = "Yes";
- $hasOptions = "No";
- $settingsicon = "No";
- $settingsActive = "";
- $action = "";
- $title = "Organizr";
- $topbar = "#eb6363";
- $topbartext = "#FFFFFF";
- $bottombar = "#eb6363";
- $sidebar = "#000000";
- $hoverbg = "#eb6363";
- $activetabBG = "#eb6363";
- $activetabicon = "#FFFFFF";
- $activetabtext = "#FFFFFF";
- $inactiveicon = "#FFFFFF";
- $inactivetext = "#FFFFFF";
- $loadingIcon = "images/organizr.png";
- $baseURL = "";
- require_once("translate.php");
- function registration_callback($username, $email, $userdir){
-
- global $data;
-
- $data = array($username, $email, $userdir);
- }
- function printArray($arrayName){
-
- foreach ( $arrayName as $item ) :
-
- echo $item . "<br/>";
-
- endforeach;
-
- }
- function write_ini_file($content, $path) {
-
- if (!$handle = fopen($path, 'w')) {
-
- return false;
-
- }
-
- $success = fwrite($handle, $content);
-
- fclose($handle);
-
- return $success;
- }
- function getTimezone(){
- $regions = array(
- 'Africa' => DateTimeZone::AFRICA,
- 'America' => DateTimeZone::AMERICA,
- 'Antarctica' => DateTimeZone::ANTARCTICA,
- 'Asia' => DateTimeZone::ASIA,
- 'Atlantic' => DateTimeZone::ATLANTIC,
- 'Europe' => DateTimeZone::EUROPE,
- 'Indian' => DateTimeZone::INDIAN,
- 'Pacific' => DateTimeZone::PACIFIC
- );
-
- $timezones = array();
- foreach ($regions as $name => $mask) {
-
- $zones = DateTimeZone::listIdentifiers($mask);
- foreach($zones as $timezone) {
- $time = new DateTime(NULL, new DateTimeZone($timezone));
- $ampm = $time->format('H') > 12 ? ' ('. $time->format('g:i a'). ')' : '';
- $timezones[$name][$timezone] = substr($timezone, strlen($name) + 1) . ' - ' . $time->format('H:i') . $ampm;
- }
-
- }
-
- print '<select name="timezone" id="timezone" class="form-control material" required>';
-
- foreach($timezones as $region => $list) {
-
- print '<optgroup label="' . $region . '">' . "\n";
-
- foreach($list as $timezone => $name) {
-
- print '<option value="' . $timezone . '">' . $name . '</option>' . "\n";
-
- }
-
- print '</optgroup>' . "\n";
-
- }
-
- print '</select>';
-
- }
-
- if(isset($_POST['action'])) :
- $action = $_POST['action'];
-
- endif;
- if($action == "createLocation") :
- $databaseData = '; <?php die("Access denied"); ?>' . "\r\n";
- foreach ($_POST as $postName => $postValue) {
-
- if($postName !== "action") :
-
- if(substr($postValue, -1) == "/") : $postValue = rtrim($postValue, "/"); endif;
-
- $postValue = str_replace("\\","/", $postValue);
-
- $databaseData .= $postName . " = \"" . $postValue . "\"\r\n";
-
- endif;
-
- }
- write_ini_file($databaseData, $databaseLocation);
- endif;
- if(!file_exists($databaseLocation)) :
- $configReady = "No";
- $userpic = "";
- else :
- $configReady = "Yes";
- require_once("user.php");
- $USER = new User("registration_callback");
- $dbfile = DATABASE_LOCATION . constant('User::DATABASE_NAME') . ".db";
- $database = new PDO("sqlite:" . $dbfile);
- $query = "SELECT * FROM users";
- foreach($database->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 = $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;
- endif;
- $userpic = md5( strtolower( trim( $USER->email ) ) );
- if(LOADINGICON !== "") : $loadingIcon = LOADINGICON; endif;
- endif;
- ?>
- <!--
- ___ ___ ___ ___ ___ ___ ___ ___
- /\ \ /\ \ /\ \ /\ \ /\__\ /\ \ /\ \ /\ \
- /::\ \ /::\ \ /::\ \ /::\ \ /:| _|_ _\:\ \ _\:\ \ /::\ \
- /:/\:\__\ /::\:\__\ /:/\:\__\ /::\:\__\ /::|/\__\ /\/::\__\ /::::\__\ /::\:\__\
- \:\/:/ / \;:::/ / \:\:\/__/ \/\::/ / \/|::/ / \::/\/__/ \::;;/__/ \;:::/ /
- \::/ / |:\/__/ \::/ / /:/ / |:/ / \:\__\ \:\__\ |:\/__/
- \/__/ \|__| \/__/ \/__/ \/__/ \/__/ \/__/ \|__|
- -->
- <!DOCTYPE html>
- <html lang="<?php echo $getLanguage; ?>" class="no-js">
- <head>
-
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="mobile-web-app-capable" content="yes" /
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="msapplication-tap-highlight" content="no" />
- <title><?=$title;?><?php if($title !== "Organizr") : echo " - Organizr"; endif; ?></title>
- <link rel="stylesheet" href="<?=$baseURL;?>bower_components/bootstrap/dist/css/bootstrap.min.css">
- <link rel="stylesheet" href="<?=$baseURL;?>bower_components/font-awesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="<?=$baseURL;?>bower_components/mdi/css/materialdesignicons.min.css">
- <link rel="stylesheet" href="<?=$baseURL;?>bower_components/metisMenu/dist/metisMenu.min.css">
- <link rel="stylesheet" href="<?=$baseURL;?>bower_components/Waves/dist/waves.min.css">
- <link rel="stylesheet" href="<?=$baseURL;?>bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css">
- <link rel="stylesheet" href="<?=$baseURL;?>js/selects/cs-select.css">
- <link rel="stylesheet" href="<?=$baseURL;?>js/selects/cs-skin-elastic.css">
- <link rel="stylesheet" href="<?=$baseURL;?>bower_components/google-material-color/dist/palette.css">
-
- <link rel="stylesheet" href="<?=$baseURL;?>bower_components/sweetalert/dist/sweetalert.css">
- <link rel="stylesheet" href="<?=$baseURL;?>bower_components/smoke/dist/css/smoke.min.css">
- <script src="<?=$baseURL;?>js/menu/modernizr.custom.js"></script>
- <script type="text/javascript" src="<?=$baseURL;?>js/sha1.js"></script>
- <script type="text/javascript" src="<?=$baseURL;?>js/user.js"></script>
- <link rel="stylesheet" href="<?=$baseURL;?>css/style.css">
- <link rel="icon" type="image/png" href="<?=$baseURL;?>images/favicon/android-chrome-192x192.png" sizes="192x192">
- <link rel="apple-touch-icon" sizes="180x180" href="<?=$baseURL;?>images/favicon/apple-touch-icon.png">
- <link rel="icon" type="image/png" href="<?=$baseURL;?>images/favicon/favicon-32x32.png" sizes="32x32">
- <link rel="icon" type="image/png" href="<?=$baseURL;?>images/favicon/favicon-16x16.png" sizes="16x16">
- <link rel="manifest" href="<?=$baseURL;?>images/favicon/manifest.json">
- <link rel="mask-icon" href="<?=$baseURL;?>images/favicon/safari-pinned-tab.svg" color="#2d89ef">
- <link rel="shortcut icon" href="<?=$baseURL;?>images/favicon/favicon.ico">
- <meta name="msapplication-config" content="<?=$baseURL;?>images/favicon/browserconfig.xml">
- <meta name="theme-color" content="#2d89ef">
- <link rel="stylesheet" type="text/css" href="css/addtohomescreen.css">
- <script src="js/addtohomescreen.js"></script>
-
- <!--[if lt IE 9]>
- <script src="bower_components/html5shiv/dist/html5shiv.min.js"></script>
- <script src="bower_components/respondJs/dest/respond.min.js"></script>
- <![endif]-->
-
- </head>
- <body style="overflow: hidden">
- <!--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: <?=$topbar;?>">
-
- <?php if (pathinfo($loadingIcon, PATHINFO_EXTENSION) !== "gif" ) :
-
- echo "<div></div><div></div><div></div>";
-
- endif; ?>
-
- <logo class="logo"><img height="192px" src="<?=$loadingIcon;?>"></logo>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
- <div id="main-wrapper" class="main-wrapper" tabindex="-1">
-
- <style>
- .bottom-bnts a {
-
- background: <?=$bottombar;?> !important;
- color: <?=$topbartext;?> !important;
-
- }.bottom-bnts {
-
- background-color: <?=$bottombar;?> !important;
-
- }.gn-menu-main {
-
-
- background-color: <?=$topbar;?>;
-
- }.gn-menu-main ul.gn-menu {
-
- background: <?=$sidebar;?>;
-
- }.gn-menu-wrapper {
-
- background: <?=$sidebar;?>;
-
- }.gn-menu i {
-
- height: 18px;
- width: 52px;
-
- }.la-timer.la-dark {
-
- color: <?=$topbartext;?>
-
- }.refresh-preloader {
-
- background: <?=$topbartext;?>;
-
- }.la-timer {
-
- width: 75px;
- height: 75px;
- padding-top: 20px;
- border-radius: 100px;
- background: <?=$sidebar;?>;
- border: 2px solid <?=$topbar;?>;
-
- }@media screen and (min-width:737px){
-
- .tab-item:hover a {
-
- color: <?=$sidebar;?> !important;
- background: <?=$hoverbg;?>;
- border-radius: 100px 0 0 100px;
-
- }
-
- }.gn-menu li.active > a {
-
- color: <?=$activetabtext;?> !important;
- background: <?=$activetabBG;?>;
- border-radius: 100px 0 0 100px;
-
- }.gn-menu li.rightActive > a {
-
- background: <?=$hoverbg;?>;
- border-radius: 100px 0 0 100px;
-
- }.active {
-
- display: block;
-
- }.hidden {
-
- display: none;
-
- }.errorz {
-
- background-image: linear-gradient(red, red), linear-gradient(#d2d2d2, #d2d2d2);
- outline: none;
- animation: input-highlight .5s forwards;
- box-shadow: none;
- padding-left: 0;
- border: 0;
- border-radius: 0;
- background-size: 0 2px,100% 1px;
- background-repeat: no-repeat;
- background-position: center bottom,center calc(100% - 1px);
- 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;?>;
-
- }.iframe {
-
- -webkit-overflow-scrolling: touch;
- }.iframe iframe{
- }#menu-toggle span {
- background: <?=$topbartext;?>;
- }logo.logo {
-
- opacity: 0.5;
- filter: alpha(opacity=50);
- }.mini-nav .split {
- width: calc(50% - 25px);
- }.splitRight {
- width: 50%;
- margin-left: 50% !important;
- position: absolute !important;
- }.split {
- width: 50%;
- position: absolute !important;
- }.mini-nav .splitRight {
- margin-left: calc(50% + 25px) !important;
- width: calc(50% - 25px);
- }.form-control.material {
- background-image: -webkit-gradient(linear, left top, left bottom, from(<?=$topbartext;?>), to(<?=$topbartext;?>)), -webkit-gradient(linear, left top, left bottom, from(#d2d2d2), to(#d2d2d2));
- background-image: -webkit-linear-gradient(<?=$topbartext;?>, <?=$topbartext;?>), -webkit-linear-gradient(#d2d2d2, #d2d2d2);
- background-image: linear-gradient(<?=$topbartext;?>, <?=$topbartext;?>), linear-gradient(#d2d2d2, #d2d2d2);
- }
- </style>
- <ul id="gn-menu" class="gn-menu-main">
-
- <li class="gn-trigger">
-
- <a id="menu-toggle" class="menu-toggle gn-icon gn-icon-menu">
-
- <div class="hamburger">
-
- <span></span>
- <span></span>
- <span></span>
-
- </div>
-
- <div class="cross">
-
- <span></span>
- <span></span>
-
- </div>
-
- </a>
-
- <nav class="gn-menu-wrapper">
-
- <div class="gn-scroller" id="gn-scroller">
-
- <ul id="tabList" class="gn-menu metismenu">
- <!--Start Tab List-->
-
- <?php if($tabSetup == "No") : $tabCount = 1; foreach($result as $row) :
-
- if($row['defaultz'] == "true") : $defaultz = "active"; else : $defaultz = ""; endif; ?>
-
- <li window="<?=$row['window'];?>" class="tab-item <?=$defaultz;?>" id="<?=$row['url'];?>x" data-title="<?=$row['name'];?>" name="<?php echo strtolower($row['name']);?>">
-
- <a class="tab-link">
-
- <?php if($row['iconurl']) : ?>
-
- <i style="font-size: 19px; padding: 0 10px; font-size: 19px;">
- <img src="<?=$row['iconurl'];?>" style="height: 30px; width: 30px; margin-top: -2px;">
- </i>
-
- <?php else : ?>
-
- <i class="fa <?=$row['icon'];?> fa-lg"></i>
-
- <?php endif; ?>
-
- <?=$row['name'];?>
-
- </a>
- </li>
-
- <?php $tabCount++; endforeach; endif;?>
-
- <?php if($configReady == "Yes") : if($USER->authenticated && $USER->role == "admin") :?>
- <li class="tab-item <?=$settingsActive;?>" id="settings.phpx" data-title="Settings" name="settings">
-
- <a class="tab-link">
-
- <?php if($settingsicon == "Yes") :
-
- echo '<i style="font-size: 19px; padding: 0 10px; font-size: 19px;">
- <img id="settings-icon" src="images/settings.png" style="height: 30px; margin-top: -2px;"></i>';
-
- else :
-
- echo '<i id="settings-icon" class="fa fa-cog"></i>';
-
- endif; ?>
-
- <?php echo $language->translate("SETTINGS");?>
-
- </a>
-
- </li>
- <?php endif; endif;?>
-
- <!--End Tab List-->
-
- </ul>
-
- </div>
- <!-- /gn-scroller -->
- <div class="bottom-bnts">
-
- <a class="fix-nav"><i class="mdi mdi-pin"></i></a>
-
- </div>
-
- </nav>
-
- </li>
- <li class="top-clock">
-
- <?php
-
- if($configReady == "Yes") :
-
- if(TITLELOGO == "") :
-
- echo "<span><span style=\"color: $topbartext\"><b>$title</b></span></span>";
-
- else :
-
- echo "<img style='max-width: 250px; max-height: 50px;' src='" . TITLELOGO . "'>";
-
- endif;
-
- else :
-
- echo "<span><span style=\"color: $topbartext\"><b>$title</b></span></span>";
-
- endif;
-
- ?>
-
- </li>
- <li class="pull-right">
-
- <ul class="nav navbar-right right-menu">
-
- <li class="dropdown notifications">
-
- <?php if($configReady == "Yes") : if(!$USER->authenticated) : ?>
-
- <a class="log-in">
-
- <?php endif; endif;?>
-
- <?php if($configReady == "Yes") : if($USER->authenticated) : ?>
-
- <a class="show-members">
-
- <?php endif; endif;?>
-
- <i class="userpic"><img src="https://www.gravatar.com/avatar/<?=$userpic;?>?s=40&d=mm" class="img-circle"></i>
-
- </a>
-
- </li>
-
- <li class="dropdown some-btn">
-
- <a class="fullscreen">
-
- <i class="mdi mdi-fullscreen"></i>
-
- </a>
- </li>
-
- <li class="dropdown some-btn">
-
- <a id="reload" class="refresh">
-
- <i class="mdi mdi-refresh"></i>
-
- </a>
-
- </li>
-
- <li style="display: none" id="splitView" class="dropdown some-btn">
-
- <a class="spltView">
-
- <i class="mdi mdi-window-close"></i>
-
- </a>
- </li>
-
- </ul>
-
- </li>
-
- </ul>
- <!--Content-->
- <div id="content" class="content" style="">
- <script>addToHomescreen();</script>
- <!--Load Framed Content-->
- <?php if($needSetup == "Yes" && $configReady == "Yes") : ?>
- <div class="table-wrapper">
- <div class="table-row">
- <div class="table-cell text-center">
- <div class="login i-block">
- <div class="content-box">
- <div class="green-bg biggest-box">
- <h1 class="zero-m text-uppercase"><?php echo $language->translate("CREATE_ADMIN");?></h1>
- </div>
- <div class="big-box text-left registration-form">
- <h4 class="text-center"><?php echo $language->translate("CREATE_ACCOUNT");?></h4>
- <form class="controlbox" name="new user registration" id="registration" action="" method="POST" data-smk-icon="glyphicon-remove-sign">
- <input type="hidden" name="op" value="register"/>
- <input type="hidden" name="sha1" value=""/>
- <div class="form-group">
- <input type="text" class="form-control material" name="username" autofocus placeholder="<?php echo $language->translate("USERNAME");?>" autocorrect="off" autocapitalize="off" minlength="3" maxlength="16" required>
- </div>
- <div class="form-group">
- <input type="email" class="form-control material" name="email" placeholder="<?php echo $language->translate("EMAIL");?>">
- </div>
- <div class="form-group">
- <input type="password" class="form-control material" name="password1" placeholder="<?php echo $language->translate("PASSWORD");?>" data-smk-strongPass="weak" required>
- </div>
- <div class="form-group">
- <input type="password" class="form-control material" name="password2" placeholder="<?php echo $language->translate("PASSWORD_AGAIN");?>">
- </div>
- <button id="registerSubmit" type="submit" class="btn green-bg btn-block btn-warning text-uppercase waves waves-effect waves-float" value="Register"><?php echo $language->translate("REGISTER");?></button>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
-
-
- <?php if($needSetup == "Yes" && $configReady == "No") : ?>
- <div class="table-wrapper">
- <div class="table-row">
- <div class="table-cell text-center">
- <div class="login i-block">
- <div class="content-box">
- <div class="green-bg biggest-box">
- <h1 class="zero-m text-uppercase"><?php echo $language->translate("DATABASE_PATH");?></h1>
- </div>
- <div class="big-box text-left">
- <h3 class="text-center"><?php echo $language->translate("SPECIFY_LOCATION");?></h3>
- <h5 class="text-left"><strong><?php echo $language->translate("CURRENT_DIRECTORY");?>: <?php echo __DIR__; ?> <br><?php echo $language->translate("PARENT_DIRECTORY");?>: <?php echo dirname(__DIR__); ?></strong></h5>
-
- <form class="controlbox" name="setupDatabase" id="setupDatabase" action="" method="POST" data-smk-icon="glyphicon-remove-sign">
-
- <input type="hidden" name="action" value="createLocation" />
- <div class="form-group">
- <input type="text" class="form-control material" name="databaseLocation" autofocus value="<?php echo dirname(__DIR__);?>" autocorrect="off" autocapitalize="off" required>
-
- <h5><?php echo $language->translate("SET_DATABASE_LOCATION");?></h5>
-
- <?php echo getTimezone();?>
-
- <h5><?php echo $language->translate("SET_TIMEZONE");?></h5>
-
- <?php
-
- if(file_exists(dirname(__DIR__) . '/users.db') || file_exists(__DIR__ . '/users.db')) :
-
- echo '<h5 class="text-center red">';
- echo $language->translate("DONT_WORRY");
- echo '</h5>';
-
- endif;?>
- </div>
- <button id="databaseLocationSubmit" type="submit" class="btn green-bg btn-block btn-sm text-uppercase waves waves-effect waves-float" value="Save Location"><?php echo $language->translate("SAVE_LOCATION");?></button>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <?php endif; ?>
-
-
- <?php if($configReady == "Yes") : if(!$USER->authenticated && $tabSetup == "Yes" && $needSetup == "No") :?>
- <div class="table-wrapper">
-
- <div class="table-row">
-
- <div class="table-cell text-center">
-
- <div class="login i-block">
-
- <div class="content-box">
-
- <div class="blue-bg biggest-box">
-
- <h1 class="zero-m text-uppercase"><?php echo $language->translate("AWESOME");?></h1>
-
- </div>
-
- <div class="big-box text-left">
-
- <h4 class="text-center"><?php echo $language->translate("TIME_TO_LOGIN");?></h4>
-
- <button type="submit" class="btn log-in btn-block btn-primary text-uppercase waves waves-effect waves-float"><?php echo $language->translate("LOGIN");?></button>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
- <?php endif; endif; ?>
- <?php if($tabSetup == "No" && $needSetup == "No") :?>
- <div id="tabEmpty" class="table-wrapper" style="display: none; background:<?=$sidebar;?>;">
-
- <div class="table-row">
-
- <div class="table-cell text-center">
-
- <div class="login i-block">
-
- <div class="content-box">
-
- <div class="biggest-box" style="background:<?=$topbar;?>;">
-
- <h1 class="zero-m text-uppercase" style="color:<?=$topbartext;?>;"><?php echo $language->translate("HOLD_UP");?></h1>
-
- </div>
-
- <div class="big-box text-left">
-
- <center><img src="images/sowwy.png" style="height: 200px;"></center>
- <h2 class="text-center"><?php echo $language->translate("LOOKS_LIKE_YOU_DONT_HAVE_ACCESS");?></h2>
-
- <?php if(!$USER->authenticated) : ?>
- <button style="background:<?=$topbar;?>;" type="submit" class="btn log-in btn-block btn-primary text-uppercase waves waves-effect waves-float"><text style="color:<?=$topbartext;?>;"><?php echo $language->translate("LOGIN");?></text></button>
- <?php endif; ?>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
- <?php endif;?>
- <!--End Load Framed Content-->
-
- </div>
- <div id="contentRight" class="content splitRight" style="">
- </div>
- <!--End Content-->
- <!--Welcome notification-->
- <div id="welcome"></div>
-
- <div id="members-sidebar" style="background: <?=$sidebar;?>;" class="members-sidebar">
-
- <h4 class="pull-left zero-m"><?php echo $language->translate("OPTIONS");?></h4>
-
- <span class="close-members-sidebar"><i class="fa fa-remove fa-lg pull-right"></i></span>
-
- <div class="clearfix"><br/></div>
-
- <?php if($configReady == "Yes") : if($USER->authenticated) : ?>
-
- <br>
-
- <div class="content-box profile-sidebar box-shadow">
-
- <img src="https://www.gravatar.com/avatar/<?=$userpic;?>?s=100&d=mm" class="img-responsive img-circle center-block" alt="user" https:="" www.gravatar.com="" avatar="">
-
- <div class="profile-usertitle">
-
- <div class="profile-usertitle-name">
-
- <?php echo strtoupper($USER->username); ?>
-
- </div>
-
- <div class="profile-usertitle-job">
-
- <?php echo strtoupper($USER->role); ?>
-
- </div>
-
- </div>
-
- <div id="buttonsDiv" class="profile-userbuttons">
-
- <button id="editInfo" type="button" class="btn btn-primary text-uppercase waves waves-effect waves-float"><?php echo $language->translate("EDIT_INFO");?></button>
-
- <button type="button" class="logout btn btn-warning waves waves-effect waves-float"><?php echo $language->translate("LOGOUT");?></button>
-
- </div>
-
- <div id="editInfoDiv" style="display: none" class="profile-usertitle">
-
- <form class="content-form form-inline" name="update" id="update" action="" method="POST">
- <input type="hidden" name="op" value="update"/>
- <input type="hidden" name="sha1" value=""/>
- <input type="hidden" name="role" value="<?php echo $USER->role; ?>"/>
- <div class="form-group">
- <input autocomplete="off" type="text" value="<?php echo $USER->email; ?>" class="form-control" name="email" placeholder="<?php echo $language->translate("EMAIL_ADDRESS");?>">
- </div>
- <div class="form-group">
- <input autocomplete="off" type="password" class="form-control" name="password1" placeholder="<?php echo $language->translate("PASSWORD");?>">
- </div>
- <div class="form-group">
- <input autocomplete="off" type="password" class="form-control" name="password2" placeholder="<?php echo $language->translate("PASSWORD_AGAIN");?>">
- </div>
- <br>
- <div class="form-group">
- <input type="button" class="btn btn-success text-uppercase waves-effect waves-float" value="<?php echo $language->translate("UPDATE");?>" onclick="User.processUpdate()"/>
-
- <button id="goBackButtons" type="button" class="btn btn-primary text-uppercase waves waves-effect waves-float"><?php echo $language->translate("GO_BACK");?></button>
- </div>
- </form>
- </div>
-
- </div>
- <?php endif; endif;?>
- </div>
- </div>
- <?php if($configReady == "Yes") : if(!$USER->authenticated && $configReady == "Yes") : ?>
- <div class="login-modal modal fade">
-
- <div style="background:<?=$sidebar;?>;" class="table-wrapper">
-
- <div class="table-row">
-
- <div class="table-cell text-center">
-
- <button style="color:<?=$topbartext;?>;" type="button" class="close" data-dismiss="modal" aria-label="Close">
-
- <span aria-hidden="true">×</span>
-
- </button>
-
- <div class="login i-block">
-
- <div class="content-box">
-
- <div style="background:<?=$topbar;?>;" class="biggest-box">
- <h1 style="color:<?=$topbartext;?>;" class="zero-m text-uppercase"><?php echo $language->translate("WELCOME");?></h1>
- </div>
-
- <div class="big-box text-left login-form">
- <?php if($USER->error!="") : ?>
- <p class="error">Error: <?php echo $USER->error; ?></p>
- <?php endif; ?>
-
- <form name="log in" id="login" action="" method="POST" data-smk-icon="glyphicon-remove-sign">
-
- <h4 class="text-center"><?php echo $language->translate("LOGIN");?></h4>
-
- <div class="form-group">
-
- <input type="hidden" name="op" value="login">
- <input type="hidden" name="sha1" value="">
- <input type="hidden" name="rememberMe" value="false"/>
- <input type="text" class="form-control material" name="username" placeholder="<?php echo $language->translate("USERNAME");?>" autocomplete="off" autocorrect="off" autocapitalize="off" value="" autofocus required>
-
- </div>
-
- <div class="form-group">
-
- <input type="password" class="form-control material" name="password1" value="" autocomplete="off" placeholder="<?php echo $language->translate("PASSWORD");?>" required>
-
- </div>
-
- <div class="form-group">
-
- <div class="i-block"> <input id="rememberMe" name="rememberMe" class="switcher switcher-success switcher-medium pull-left" value="true" type="checkbox" checked="">
-
- <label for="rememberMe" class="pull-left"></label>
-
- <label class="pull-right"> <?php echo $language->translate("REMEMBER_ME");?></label>
-
- </div>
- </div>
- <button id="loginSubmit" style="background:<?=$topbar;?>;" type="submit" class="btn btn-block btn-info text-uppercase waves" value="log in" onclick="User.processLogin()"><text style="color:<?=$topbartext;?>;"><?php echo $language->translate("LOGIN");?></text></button>
- </form>
-
- <button id="switchForgot" style="background:<?=$topbartext;?>;" class="btn btn-block btn-info text-uppercase waves"><text style="color:<?=$topbar;?>;"><?php echo $language->translate("FORGOT_PASSWORD");?></text></button>
-
- <form style="display: none;" name="forgotPassword" id="forgotPassword" action="" method="POST" data-smk-icon="glyphicon-remove-sign">
-
- <h4 class="text-center"><?php echo $language->translate("FORGOT_PASSWORD");?></h4>
-
- <div class="form-group">
-
- <input type="hidden" name="op" value="reset">
- <input type="text" class="form-control material" name="email" placeholder="<?php echo $language->translate("EMAIL");?>" autocorrect="off" autocapitalize="off" value="" autofocus required>
-
- </div>
- <button style="background:<?=$topbar;?>;" type="submit" class="btn btn-block btn-info text-uppercase waves" value="reset password"><text style="color:<?=$topbartext;?>;"><?php echo $language->translate("RESET_PASSWORD");?></text></button>
- </form>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
- <?php endif; endif;?>
- <?php if($configReady == "Yes") : if($USER->authenticated) : ?>
- <div style="background:<?=$topbar;?>;" class="logout-modal modal fade">
-
- <div class="table-wrapper" style="background: <?=$topbar;?>">
-
- <div class="table-row">
-
- <div class="table-cell text-center">
-
- <div class="login i-block">
-
- <div class="content-box">
-
- <div style="background:<?=$topbartext;?>;" class="biggest-box">
-
- <form name="log out" id="logout" action="" method="POST">
-
- <input type="hidden" name="op" value="logout">
-
- <input type="hidden" name="username"value="<?php echo $_SESSION["username"]; ?>" >
-
- <h3 style="color:<?=$topbar;?>;" class="zero-m text-uppercase"><?php echo $language->translate("DO_YOU_WANT_TO_LOGOUT");?></h3>
-
- <a style="color:<?=$topbar;?>;" id="logoutSubmit" class="i-block" data-dismiss="modal"><?php echo $language->translate("YES_WORD");?></a>
-
- <a style="color:<?=$topbar;?>;" class="i-block" data-dismiss="modal"><?php echo $language->translate("NO_WORD");?></a>
-
- </form>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
-
- </div>
- <?php endif; endif;?>
- <!--Scripts-->
- <script src="<?=$baseURL;?>bower_components/jquery/dist/jquery.min.js"></script>
- <script src="<?=$baseURL;?>bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
- <script src="<?=$baseURL;?>bower_components/metisMenu/dist/metisMenu.min.js"></script>
- <script src="<?=$baseURL;?>bower_components/Waves/dist/waves.min.js"></script>
- <script src="<?=$baseURL;?>bower_components/moment/min/moment.min.js"></script>
- <script src="<?=$baseURL;?>bower_components/jquery.nicescroll/jquery.nicescroll.min.js"></script>
- <script src="<?=$baseURL;?>bower_components/slimScroll/jquery.slimscroll.min.js"></script>
- <script src="<?=$baseURL;?>bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js"></script>
- <script src="<?=$baseURL;?>bower_components/cta/dist/cta.min.js"></script>
- <!--Menu-->
- <script src="<?=$baseURL;?>js/menu/classie.js"></script>
- <script src="<?=$baseURL;?>js/menu/gnmenu.js"></script>
- <!--Selects-->
- <script src="<?=$baseURL;?>js/selects/selectFx.js"></script>
-
- <script src="<?=$baseURL;?>bower_components/sweetalert/dist/sweetalert.min.js"></script>
- <script src="<?=$baseURL;?>bower_components/smoke/dist/js/smoke.min.js"></script>
- <!--Notification-->
- <script src="<?=$baseURL;?>js/notifications/notificationFx.js"></script>
- <!--Custom Scripts-->
- <script src="<?=$baseURL;?>js/common.js"></script>
- <script src="<?=$baseURL;?>js/mousetrap.min.js"></script>
- <script>
- var fixed = document.getElementById('gn-scroller');
-
- fixed.addEventListener('touchmove', function(e) {
- e.preventDefault();
- }, false);
-
- function setHeight() {
-
- windowHeight = $(window).innerHeight();
-
- $("div").find(".iframe").css('height', windowHeight - 56 + "px");
-
- $('#content').css('height', windowHeight - 56 + "px");
-
- };
-
- function notify(notifyString, notifyIcon, notifyType, notifyLength) {
-
- var notifyString = notifyString;
- var notifyIcon = notifyIcon;
- var notifyType = notifyType;
- var notifyLength = notifyLength;
- setTimeout(function () {
- var notification = new NotificationFx({
- message: '<span class="fa fa-' + notifyIcon + ' fa-2x"></span><p>' + notifyString + '</p>',
- layout: 'bar',
- effect: 'slidetop',
-
- ttl: notifyLength,
- type: notifyType // notice, warning, success or error
- });
- notification.show();
- }, 300);
- }
-
- $('#loginSubmit').click(function() {
-
- if ($('#login').smkValidate()) {
-
- console.log("validated");
-
- }
-
- console.log("didnt validate");
-
- });
-
- $('#registerSubmit').click(function() {
-
- if ($('#registration').smkValidate()) {
-
- console.log("validated");
-
- }
-
- console.log("didnt validate");
- User.processRegistration();
-
- });
-
- $("#editInfo").click(function(){
- $( "div[id^='editInfoDiv']" ).toggle();
- $( "div[id^='buttonsDiv']" ).toggle();
-
- });
-
- $("#goBackButtons").click(function(){
- $( "div[id^='editInfoDiv']" ).toggle();
- $( "div[id^='buttonsDiv']" ).toggle();
-
- });
-
- $("#switchForgot").click(function(){
- $( "form[id^='login']" ).toggle();
- $( "form[id^='forgotPassword']" ).toggle();
- $("#switchForgot").toggle();
-
- });
-
- //Sign in
- $(".log-in").click(function(e){
-
- var e1 = document.querySelector(".log-in"),
-
- e2 = document.querySelector(".login-modal");
-
- cta(e1, e2, {relativeToWindow: true}, function () {
-
- $('.login-modal').modal("show");
-
- });
- e.preventDefault();
-
- });
- //Logout
- $(".logout").click(function(e){
- var el1 = document.querySelector(".logout"),
- el2 = document.querySelector(".logout-modal");
- cta(el1, el2, {relativeToWindow: true}, function () {
- $('.logout-modal').modal("show");
- });
- e.preventDefault();
- });
- //Members Sidebar
- $(".show-members").click(function(e){
- var e_s1 = document.querySelector(".show-members"),
- e_s2 = document.querySelector("#members-sidebar");
- cta(e_s1, e_s2, {relativeToWindow: true}, function () {
- $('#members-sidebar').addClass('members-sidebar-open');
- });
- e.preventDefault();
- });
- $('.close-members-sidebar').click(function(){
- $('#members-sidebar').removeClass('members-sidebar-open');
- });
- $(document).ready(function(){
-
- defaultTab = $("li[class^='tab-item active']").attr("id");
-
- if (defaultTab){
-
- defaultTab = defaultTab.substr(0, defaultTab.length-1);
-
- }else{
-
- defaultTabNone = $("li[class^='tab-item']").attr("id");
-
- if (defaultTabNone){
-
- $("li[class^='tab-item']").first().attr("class", "tab-item active");
- defaultTab = defaultTabNone.substr(0, defaultTabNone.length-1);
-
- }
-
- }
- if (defaultTab){
- $("#content").html('<div class="iframe active" data-content-url="'+defaultTab+'"><iframe scrolling="auto" sandbox="allow-forms allow-same-origin allow-pointer-lock allow-scripts allow-popups allow-modals allow-top-navigation" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" frameborder="0" style="width:100%; height:100%;" src="'+defaultTab+'"></iframe></div>');
- document.getElementById('main-wrapper').focus();
-
- }
-
- if (defaultTab == null){
-
- $("div[id^='tabEmpty']").show();
- <?php if($needSetup == "No" && $configReady == "Yes") : if(!$USER->authenticated) : ?>
- $('.login-modal').modal("show");
- <?php endif; endif; ?>
-
- }
-
- if ($(location).attr('hash')){
-
- var getHash = $(location).attr('hash').substr(1).replace("%20", " ").replace("_", " ");
- var gotHash = getHash.toLowerCase();
- var getLiTab = $("li[name^='" + gotHash + "']");
-
- getLiTab.trigger("click");
- }
- setHeight();
- });
-
- $(function () {
- <?php if(!empty($USER->info_log)) : ?>
-
- setTimeout(function () {
- var notification = new NotificationFx({
- message: '<span class="fa fa-info-circle fa-2x"></span><p><?php echo printArray($USER->info_log);?></p>',
- layout: 'bar',
- effect: 'slidetop',
- type: 'notice', // notice, warning, success or error
- });
- notification.show();
- }, 1200);
- <?php endif; ?>
-
- <?php if(!empty($USER->error_log)) : ?>
- setTimeout(function () {
- var notification = new NotificationFx({
- message: '<span class="fa fa-exclamation-triangle fa-2x"></span><p><?php echo printArray($USER->error_log); ?></p>',
- layout: 'bar',
- effect: 'slidetop',
- type: 'warning', // notice, warning, success or error
- });
- notification.show();
- }, 1200);
-
- <?php endif; ?>
- });
-
- $('#reload').on('click tap', function(){
- $("i[class^='mdi mdi-refresh']").attr("class", "mdi mdi-refresh fa-spin");
- var activeFrame = $('#content').find('.active').children('iframe');
- activeFrame.attr('src', activeFrame.attr('src'));
- var refreshBox = $('#content').find('.active');
- $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(refreshBox).fadeIn(10);
- setTimeout(function(){
- var refreshPreloader = refreshBox.find('.refresh-preloader'),
- deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
- refreshPreloader.remove();
- $("i[class^='mdi mdi-refresh fa-spin']").attr("class", "mdi mdi-refresh");
- });
- },500);
- });
-
- $('#reload').on('contextmenu', function(e){
- $("i[class^='mdi mdi-refresh']").attr("class", "mdi mdi-refresh fa-spin");
- var activeFrame = $('#contentRight').find('.active').children('iframe');
- activeFrame.attr('src', activeFrame.attr('src'));
- var refreshBox = $('#contentRight').find('.active');
- $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(refreshBox).fadeIn(10);
- setTimeout(function(){
- var refreshPreloader = refreshBox.find('.refresh-preloader'),
- deletedRefreshBox = refreshPreloader.fadeOut(300, function(){
- refreshPreloader.remove();
- $("i[class^='mdi mdi-refresh fa-spin']").attr("class", "mdi mdi-refresh");
- });
- },500);
-
- return false;
- });
-
- $('#splitView').on('click tap', function(){
- $('#splitView').hide();
- $("#content").attr("class", "content");
- $("li[class^='tab-item rightActive']").attr("class", "tab-item");
- $("#contentRight").html('');
- });
-
- $("li[id^='settings.phpx']").on('click tap', function(){
- $("img[id^='settings-icon']").attr("class", "fa-spin");
- $("i[id^='settings-icon']").attr("class", "fa fa-cog fa-spin");
- setTimeout(function(){
- $("img[id^='settings-icon']").attr("class", "");
- $("i[id^='settings-icon']").attr("class", "fa fa-cog");
- },1000);
- });
- $('#logoutSubmit').on('click tap', function(){
- $( "#logout" ).submit();
- });
-
- $(window).resize(function(){
-
- setHeight();
- });
-
- $("li[class^='tab-item']").on('click vclick', function(){
-
- var thisidfull = $(this).attr("id");
-
- var thistitle = $(this).attr("data-title");
-
- var thisname = $(this).attr("name");
- var thisid = thisidfull.substr(0, thisidfull.length-1);
- var currentframe = $("#content div[data-content-url^='"+thisid+"']");
- if (currentframe.attr("class") == "iframe active") {
- console.log(thisid + " is active already");
- }else if (currentframe.attr("class") == "iframe hidden") {
- console.log(thisid + " is active already but hidden");
- $("#content div[class^='iframe active']").attr("class", "iframe hidden");
- currentframe.attr("class", "iframe active");
-
- document.title = thistitle;
-
- window.location.href = '#' + thisname;
-
- setHeight();
- $("li[class^='tab-item active']").attr("class", "tab-item");
- $(this).attr("class", "tab-item active");
- }else {
-
- if ($(this).attr("window") == "true") {
-
- window.open(thisid,'_blank');
-
- }else {
-
- console.log(thisid + " make new div");
- $("#content div[class^='iframe active']").attr("class", "iframe hidden");
- $( '<div class="iframe active" data-content-url="'+thisid+'"><iframe scrolling="auto" sandbox="allow-forms allow-same-origin allow-pointer-lock allow-scripts allow-popups allow-modals allow-top-navigation" allowfullscreen="true" webkitallowfullscreen="true" frameborder="0" style="width:100%; height:100%;" src="'+thisid+'"></iframe></div>' ).appendTo( "#content" );
-
- document.title = thistitle;
-
- window.location.href = '#' + thisname;
- setHeight();
- $("li[class^='tab-item active']").attr("class", "tab-item");
- $(this).attr("class", "tab-item active");
-
- }
- }
- });
-
- $("li[class^='tab-item']").on('contextmenu', function(e){
-
- e.stopPropagation();
-
- $('#splitView').show();
-
- $("#content").attr("class", "content split");
-
- var thisidfull = $(this).attr("id");
-
- var thistitle = $(this).attr("data-title");
-
- var thisname = $(this).attr("name");
- var thisid = thisidfull.substr(0, thisidfull.length-1);
- var currentframe = $("#contentRight div[data-content-url^='"+thisid+"']");
- if (currentframe.attr("class") == "iframe active") {
- console.log(thisid + " is active already");
- }else if (currentframe.attr("class") == "iframe hidden") {
- console.log(thisid + " is active already but hidden");
- $("#contentRight div[class^='iframe active']").attr("class", "iframe hidden");
- currentframe.attr("class", "iframe active");
-
- document.title = thistitle;
-
- window.location.href = '#' + thisname;
-
- setHeight();
- $("li[class^='tab-item rightActive']").attr("class", "tab-item");
- $(this).attr("class", "tab-item rightActive");
- }else {
-
- if ($(this).attr("window") == "true") {
-
- window.open(thisid,'_blank');
-
- }else {
-
- console.log(thisid + " make new div");
- $("#contentRight div[class^='iframe active']").attr("class", "iframe hidden");
- $( '<div class="iframe active" data-content-url="'+thisid+'"><iframe scrolling="auto" sandbox="allow-forms allow-same-origin allow-pointer-lock allow-scripts allow-popups allow-modals allow-top-navigation" allowfullscreen="true" webkitallowfullscreen="true" frameborder="0" style="width:100%; height:100%;" src="'+thisid+'"></iframe></div>' ).appendTo( "#contentRight" );
-
- document.title = thistitle;
-
- window.location.href = '#' + thisname;
- setHeight();
- $("li[class^='tab-item rightActive']").attr("class", "tab-item");
- $(this).attr("class", "tab-item rightActive");
-
- }
- }
-
- return false;
-
- });
-
- Mousetrap.bind('ctrl+shift+up', function(e) {
-
- var getCurrentTab = $("li[class^='tab-item active']");
- var previousTab = getCurrentTab.prev().attr( "class", "tab-item" );
- previousTab.trigger("click");
- return false;
-
- });
-
- Mousetrap.bind('ctrl+shift+down', function(e) {
-
- var getCurrentTab = $("li[class^='tab-item active']");
- var nextTab = getCurrentTab.next().attr( "class", "tab-item" );
- nextTab.trigger("click");
- return false;
-
- });
- Mousetrap.bind('s s', function() { $("li[id^='settings.phpx']").trigger("click"); });
-
- Mousetrap.bind('p p', function() { $("a[class^='fix-nav']").trigger("click"); });
-
- Mousetrap.bind('m m', function() { $("div[class^='hamburger']").trigger("click"); });
-
- Mousetrap.bind('r r', function() { $("a[id^='reload']").trigger("click"); });
-
- Mousetrap.bind('f f', function() { $("a[class^='fullscreen']").trigger("click"); });
-
- <?php if($tabSetup == "No") : foreach(range(1,$tabCount) as $index) : if ($index == 10) : break; endif;?>
-
- Mousetrap.bind('ctrl+shift+<?php echo $index; ?>', function() { $("ul[id^='tabList'] li:nth-child(<?php echo $index; ?>)").trigger("click"); });
- <?php endforeach; endif; ?>
-
- Mousetrap.bind('esc esc', function() {
-
- $("#content").attr("class", "content");
- $("li[class^='tab-item rightActive']").attr("class", "tab-item");
- $("#contentRight").html('');
-
- });
- </script>
- </body>
- </html>
|