| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698 |
- <?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";
- $loading = "#000000";
- $hovertext = "#000000";
- $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'];
- $loading = $row['loading'];
- $hovertext = $row['hovertext'];
- 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: <?=$loading;?>;
-
- }.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: <?=$hovertext;?> !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: <?=$loading;?>;
-
- }.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>
-
- <li style="display: none;" class="tab-item" id="updatedb.phpx" data-title="Upgrade" name="upgrade">
-
- <a class="tab-link">
-
- <?php if($settingsicon == "Yes") :
-
- echo '<i style="font-size: 19px; padding: 0 10px; font-size: 19px;">
- <img id="upgrade-icon" src="images/upgrade.png" style="height: 30px; margin-top: -2px;"></i>';
-
- else :
-
- echo '<i id="upgrade-icon" class="fa fa-arrow-up"></i>';
-
- endif; ?>
-
- <?php echo $language->translate("UPGRADE");?>
-
- </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 + "']");
-
- if(gotHash === "upgrade"){ getLiTab.toggle(); console.log("got it"); }
-
- 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>
|