| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240 |
- <?php
- // Include functions if not already included
- require_once('functions.php');
- // Upgrade environment
- upgradeCheck();
- // Lazyload settings
- $databaseConfig = configLazy('config/config.php');
- // Load USER
- require_once("user.php");
- $USER = new User("registration_callback");
- // Create Database Connection
- $file_db = new PDO('sqlite:'.DATABASE_LOCATION.'users.db');
- $file_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- // Some PHP config stuff
- ini_set("display_errors", 1);
- ini_set("error_reporting", E_ALL | E_STRICT);
- // Confirm Access
- qualifyUser('admin', true);
- // Load User List
- $gotUsers = $file_db->query('SELECT * FROM users');
- // Load Invite List
- $gotInvites = $file_db->query('SELECT * FROM invites');
- // Load Colours/Appearance
- foreach(loadAppearance() as $key => $value) {
- $$key = $value;
- }
- // Slimbar
- if(SLIMBAR == "true") {
- $slimBar = "30";
- $userSize = "25";
- } else {
- $slimBar = "56";
- $userSize = "40";
- }
- ?>
- <!DOCTYPE html>
- <html lang="en" class="no-js">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="msapplication-tap-highlight" content="no" />
- <title>Settings</title>
- <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css?v=<?php echo INSTALLEDVERSION; ?>">
- <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
- <link rel="stylesheet" href="bower_components/mdi/css/materialdesignicons.min.css">
- <link rel="stylesheet" href="bower_components/metisMenu/dist/metisMenu.min.css">
- <link rel="stylesheet" href="bower_components/Waves/dist/waves.min.css">
- <link rel="stylesheet" href="bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css">
- <link rel="stylesheet" href="js/selects/cs-select.css">
- <link rel="stylesheet" href="js/selects/cs-skin-elastic.css">
- <link href="bower_components/iconpick/dist/css/fontawesome-iconpicker.min.css" rel="stylesheet">
- <link rel="stylesheet" href="bower_components/google-material-color/dist/palette.css">
- <link rel="stylesheet" href="bower_components/sweetalert/dist/sweetalert.css">
- <link rel="stylesheet" href="bower_components/smoke/dist/css/smoke.min.css">
- <script src="js/menu/modernizr.custom.js"></script>
- <script type="text/javascript" src="js/sha1.js"></script>
- <script type="text/javascript" src="js/user.js"></script>
- <link rel="stylesheet" href="bower_components/animate.css/animate.min.css">
- <link rel="stylesheet" href="bower_components/DataTables/media/css/jquery.dataTables.css">
- <link rel="stylesheet" href="bower_components/datatables-tabletools/css/dataTables.tableTools.css">
- <link rel="stylesheet" href="bower_components/numbered/jquery.numberedtextarea.css">
- <link rel="stylesheet" href="css/style.css?v=<?php echo INSTALLEDVERSION; ?>">
- <link rel="stylesheet" href="css/settings.css?v=<?php echo INSTALLEDVERSION; ?>">
- <link rel="stylesheet" href="bower_components/summernote/dist/summernote.css">
- <link href="css/jquery.filer.css" rel="stylesheet">
- <link href="css/jquery.filer-dragdropbox-theme.css" rel="stylesheet">
- <!--[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]-->
-
- <!--Scripts-->
- <script src="bower_components/jquery/dist/jquery.min.js"></script>
- <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
- <script src="bower_components/metisMenu/dist/metisMenu.min.js"></script>
- <script src="bower_components/Waves/dist/waves.min.js"></script>
- <script src="bower_components/moment/min/moment.min.js"></script>
- <script src="bower_components/jquery.nicescroll/jquery.nicescroll.min.js"></script>
- <script src="bower_components/slimScroll/jquery.slimscroll.min.js"></script>
- <script src="bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js"></script>
- <script src="bower_components/cta/dist/cta.min.js"></script>
- <!--Menu-->
- <script src="js/menu/classie.js"></script>
- <script src="bower_components/iconpick/dist/js/fontawesome-iconpicker.js"></script>
- <!--Selects-->
- <script src="js/selects/selectFx.js"></script>
- <script src="js/jscolor.js"></script>
- <script src="bower_components/sweetalert/dist/sweetalert.min.js"></script>
- <script src="bower_components/smoke/dist/js/smoke.min.js"></script>
- <script src="bower_components/numbered/jquery.numberedtextarea.js"></script>
-
- <!--Other-->
- <script src="js/ajax.js?v=<?php echo INSTALLEDVERSION; ?>"></script>
- <!--Notification-->
- <script src="js/notifications/notificationFx.js"></script>
- <script src="js/jqueri_ui_custom/jquery-ui.min.js"></script>
- <script src="js/jquery.filer.min.js" type="text/javascript"></script>
- <script src="js/custom.js?v=<?php echo INSTALLEDVERSION; ?>" type="text/javascript"></script>
- <script src="js/jquery.mousewheel.min.js" type="text/javascript"></script>
- <!--Data Tables-->
- <script src="bower_components/DataTables/media/js/jquery.dataTables.js"></script>
- <script src="bower_components/datatables.net-responsive/js/dataTables.responsive.js"></script>
- <script src="bower_components/datatables-tabletools/js/dataTables.tableTools.js"></script>
- <!--Summernote-->
- <script src="bower_components/summernote/dist/summernote.min.js"></script>
-
- <!--Other-->
- <script>
- function addTab() {
- var idNumber = Math.round(Math.random() * 999999999) + 1000000000;
- var $element = $('#tab-new').clone();
- $element.css('display','block');
- $element.attr('id', $element.attr('id').replace('new',idNumber));
- $element.find('[value=new]').attr('value', idNumber).val(idNumber);
- $element.find('[id][name]').each(function () {
- this.id = this.id.replace('new',idNumber);
- this.name = this.name.replace('new',idNumber);
- });
- $element.find('[for]').each(function () {
- $(this).attr('for',$(this).attr('for').replace('new',idNumber));
- });
- $element.appendTo('#submitTabs ul');
- $element.find('.icp-auto-pend').iconpicker({placement: 'left', hideOnSelect: false, collision: true}).hide();
- $('.tab-box').scrollTop($('.tab-box')[0].scrollHeight);
- }
- function submitTabs(form) {
- var formData = {};
- var ids = [];
-
- $.each($(form).serializeArray(), function(i,v) {
- var regmatch = /(\w+)\[((?:new-)?\d+)\]/i.exec(v.name);
- if (regmatch) {
- if (ids.indexOf(regmatch[2]) == -1) {
- ids.push(regmatch[2]);
- if (typeof formData['order'] !== 'object') { formData['order'] = {}; }
- formData['order'][regmatch[2]] = ids.length;
- }
- if (typeof formData[regmatch[1]] !== 'object') { formData[regmatch[1]] = {}; }
- formData[regmatch[1]][regmatch[2]] = v.value;
- } else {
- console.log(regmatch);
- }
- });
- console.log(formData);
- ajax_request('POST', 'submit-tabs', formData);
-
- return false;
- }
- </script>
-
- <style>
- .loop-animation {
- animation-iteration-count: infinite;
- -webkit-animation-iteration-count: infinite;
- -moz-animation-iteration-count: infinite;
- -o-animation-iteration-count: infinite;
- }
- @media screen and (max-width:737px){
- .email-body{width: 100%; overflow: auto;}
- .email-content, .email-new {
- -webkit-overflow-scrolling: touch;
- -webkit-transform: translateZ(0);
- overflow: scroll;
- position: fixed;
- height:100% !important;
- margin-top:0;
- }.email-content .email-header, .email-new .email-header{
- padding: 10px 30px;
- z-index: 1000;
- }
- }@media screen and (min-width:737px){
- .email-body{width: 100%}
- .email-content .close-button, .email-content .email-actions, .email-new .close-button, .email-new .email-actions {
- position: relative;
- top: 15px;
- right: 0px;
- float: right;
- }.email-inner-section {
- margin-top: 50px;
- }.email-content, .email-new {
- overflow: auto;
- margin-top: 0;
- height: 100%;
- position: fixed;
- max-width: 100%;
- width: 84%;
- right: -84%;
- }.email-content .email-header, .email-new .email-header{
- position: fixed;
- padding: 10px 30px;
- width: 84%;
- z-index: 1000;
- }
- }ul.inbox-nav.nav {
- background: white;
- padding: 5px;
- border-radius: 5px;
- }.profile-usermenu ul li.active a {
- border-left: 3px solid <?=$activetabBG;?> !important;
- padding-left: 12px;
- }.profile-usermenu ul li a:hover {
- background: <?=$hoverbg;?> !important;
- color: <?=$hovertext;?> !important;
- cursor: pointer;
- }input.form-control.material.icp-auto.iconpicker-element.iconpicker-input {
- display: none;
- }input.form-control.iconpicker-search {
- color: black;
- }.key {
- font-family:Tahoma, sans-serif;
- border-style:solid;
- border-color:#D5D6AD #C1C1A8 #CDCBA5 #E7E5C5;
- border-width:2px 3px 8px 3px;
- background:#D6D4B4;
- display:inline-block;
- border-radius:5px;
- margin:3px;
- text-align:center;
- }.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);
- }.key span {
- background:#ECEECA;
- color:#5D5E4F;
- display:block;
- font-size:12px;
- padding:0 2px;
- border-radius:3px;
- width:14px;
- height:18px;
- line-height:18px;
- text-align:center;
- font-weight:bold;
- letter-spacing:1px;
- text-transform:uppercase;
- }.key.wide span {
- width:auto;
- padding:0 12px;
- }.dragging{
- border: 2px solid;
- }.todo .action-btns a span {
- color: #76828e !important;
- }.todo li:nth-child(even) {
- background: #FFFFFF !important;
- }.themeImage {
- position: fixed;
- left: 160px;
- top: 0px;
- height: 400px;
- }.chooseTheme a span {
- position:absolute; display:none; z-index:99;
- }.chooseTheme a:hover span {
- display:block;
- }ul.nav.nav-tabs.apps {
- border: solid;
- border-top: 0;
- border-left: 0;
- border-right: 0;
- border-radius: 0;
- }li.apps.active {
- border: solid;
- border-bottom: 0;
- border-radius: 5px;
- top: 3px;
- }<?php customCSS(); ?>
- </style>
- </head>
- <body class="scroller-body" style="padding: 0; background: #273238; overflow: hidden">
- <div id="main-wrapper" class="main-wrapper">
- <!--Content-->
- <div id="content" style="margin:0 10px; overflow:hidden">
- <!-- Update -->
- <div id="updateStatus" class="row" style="display: none;z-index: 10000;position: relative;">
- <div class="col-lg-2">
- <div class="content-box box-shadow animated rubberBand">
- <div class="table-responsive">
- <table class="table table-striped progress-widget zero-m">
- <thead class="yellow-bg"><tr><th>Updating</th></tr></thead>
- <tbody >
- <tr>
- <td>
- <div class="progress">
- <div id="updateStatusBar" class="progress-bar progress-bar-success progress-bar-striped active" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%">
- </div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <!-- Check Frame Modal -->
- <div class="modal fade checkFrame" tabindex="-1" role="dialog">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title">Check iFrame Compatability</h4>
- </div>
- <form id="urlTestForm" onsubmit="return false;">
- <div class="modal-body">
- Let's Check this URL
- <input type="text" class="form-control material" name="url-test" placeholder="<?php echo translate("URL"); ?>" autocorrect="off" autocapitalize="off" value="">
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default waves" data-dismiss="modal">Close</button>
- <button id="urlTestForm_submit" class="btn btn-primary waves" data-dismiss="modal">Check Frame URL</button>
- </div>
- </form>
- </div>
- </div>
- </div>
- <br/>
- <div id="versionCheck"></div>
- <div class="row">
- <div class="col-lg-2">
- <button id="apply" style="width: 100%; display: none;" class="btn waves btn-success btn-sm text-uppercase waves-effect waves-float animated tada" type="submit">
- <?php echo $language->translate("APPLY_CHANGES");?>
- </button>
- <div class="content-box profile-sidebar box-shadow">
- <img src="images/organizr-logo-h-d.png" width="100%" style="margin-top: -10px;">
- <div class="profile-usermenu">
- <ul class="nav" id="settings-list">
- <li><a id="open-tabs" box="tab-box"><i class="fa fa-list red-orange pull-right"></i>Edit Tabs</a></li>
- <li><a id="open-colors" box="color-box"><i class="fa fa-paint-brush green pull-right"></i>Edit Colors</a></li>
- <li><a id="open-users" box="users-box"><i class="fa fa-user red pull-right"></i>Manage Users</a></li>
- <li><a id="open-logs" box="logs-box"><i class="fa fa-file-text-o blue pull-right"></i>View Logs</a></li>
- <li><a id="open-homepage" box="homepage-box"><i class=" fa fa-home yellow pull-right"></i>Edit Homepage</a></li>
- <li><a id="open-advanced" box="advanced-box"><i class=" fa fa-cog light-blue pull-right"></i>Advanced</a></li>
- <?php if(!empty(PLEXURL)){?><li><a id="open-invites" box="invites-box"><i class=" fa fa-user-plus gray pull-right"></i>Plex Invites</a></li><?php }?>
- <li><a id="open-info" box="info-box"><i class=" fa fa-info-circle orange pull-right"></i>About</a></li>
- <li><a id="open-donate" box="donate-box"><i class=" fa fa-money red pull-right"></i>Donate</a></li>
- </ul>
- </div>
- </div>
- </div>
- <div class="col-lg-10">
-
- </div>
- </div>
- <div class="email-content tab-box white-bg">
- <div class="email-body">
- <div class="email-header gray-bg">
- <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
- <h1>Edit Tabs</h1>
- </div>
- <div class="email-inner small-box">
- <div class="email-inner-section">
- <div class="small-box todo-list fade in" id="tab-tabs">
- <form id="submitTabs" onsubmit="submitTabs(this); return false;">
- <div class="sort-todo">
- <button id="newtab" type="button" class="btn waves btn-labeled btn-success btn-sm text-uppercase waves-effect waves-float" onclick="addTab()">
- <span class="btn-label"><i class="fa fa-plus"></i></span><?php echo translate("NEW_TAB");?>
- </button>
- <button id="iconHide" type="button" class="btn waves btn-labeled btn-warning btn-sm text-uppercase waves-effect waves-float">
- <span class="btn-label"><i class="fa fa-upload"></i></span><?php echo $language->translate("UPLOAD_ICONS");?>
- </button>
- <button id="iconAll" type="button" class="btn waves btn-labeled btn-info btn-sm text-uppercase waves-effect waves-float">
- <span class="btn-label"><i class="fa fa-picture-o"></i></span><?php echo $language->translate("VIEW_ICONS");?>
- </button>
- <button id="checkFrame" data-toggle="modal" data-target=".checkFrame" type="button" class="btn waves btn-labeled btn-gray btn-sm text-uppercase waves-effect waves-float">
- <span class="btn-label"><i class="fa fa-check"></i></span><?php echo $language->translate("CHECK_FRAME");?>
- </button>
- <button type="submit" class="btn waves btn-labeled btn-success btn btn-sm pull-right text-uppercase waves-effect waves-float">
- <span class="btn-label"><i class="fa fa-floppy-o"></i></span><?php echo translate('SAVE_TABS'); ?>
- </button>
- </div>
- <input type="file" name="files[]" id="uploadIcons" multiple="multiple">
- <div id="viewAllIcons" style="display: none;">
- <h4><strong><?php echo $language->translate("ALL_ICONS");?></strong> [<?php echo $language->translate("CLICK_ICON");?>]</h4>
- <div class="row">
- <textarea id="copyTarget" class="hideCopy" style="left: -9999px; top: 0; position: absolute;"></textarea>
- <?php
- $dirname = "images/";
- $images = scandir($dirname);
- $ignore = Array(".", "..", "favicon", "cache", "platforms", "._.DS_Store", ".DS_Store", "confused.png", "sowwy.png", "sort-btns", "loading.png", "titlelogo.png", "default.svg", "login.png", "no-np.png", "no-list.png", "themes", "nadaplaying.jpg", "organizr-logo-h-d.png", "organizr-logo-h.png");
- foreach($images as $curimg){
- if(!in_array($curimg, $ignore)) { ?>
- <div class="col-xs-2" style="width: 75px; height: 75px; padding-right: 0px;">
- <a data-toggle="tooltip" data-placement="bottom" title="<?=$dirname.$curimg;?>" class="thumbnail" style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
- <img style="width: 50px; height: 50px;" src="<?=$dirname.$curimg;?>" alt="thumbnail" class="allIcons">
- </a>
- </div>
- <?php
- }
- }
- ?>
- </div>
- </div>
- <div class="panel">
- <div class="panel-body todo">
- <ul class="list-group ui-sortable">
- <?php
- foreach($file_db->query('SELECT * FROM tabs ORDER BY `order` asc') as $key => $row) {
- if (!isset($row['id'])) { $row['id'] = $key + 1; }
- echo printTabRow($row);
- }
- ?>
- </ul>
- </div>
- </div>
- </form>
- <?php echo printTabRow(false); ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="email-content color-box white-bg">
- <?php
- // Build Colour Settings
- echo buildSettings(
- array(
- 'title' => 'Appearance Settings',
- 'id' => 'appearance_settings',
- 'submitAction' => 'update-appearance',
- 'tabs' => array(
- array(
- 'title' => 'Colours',
- 'id' => 'theme_colours',
- 'image' => 'images/paint.png',
- 'fields' => array(
- array(
- array(
- 'type' => 'button',
- 'labelTranslate' => 'CHOOSE_THEME',
- 'icon' => 'css3',
- 'id' => 'themeSelector',
- 'buttonType' => 'dark',
- 'buttonDrop' => '
- <ul class="dropdown-menu gray-bg">
- <li class="chooseTheme" id="plexTheme" style="border: 1px #FFFFFF; border-style: groove; background: #000000; border-radius: 5px; margin: 5px;"><a style="color: #E49F0C !important;" href="#">Plex<span><img class="themeImage" src="images/themes/plex.png"></span></a></li>
- <li class="chooseTheme" id="newPlexTheme" style="border: 1px #E5A00D; border-style: groove; background: #282A2D; border-radius: 5px; margin: 5px;"><a style="color: #E5A00D !important;" href="#">New Plex<span><img class="themeImage" src="images/themes/newplex.png"></span></a></li>
- <li class="chooseTheme" id="embyTheme" style="border: 1px #FFFFFF; border-style: groove; background: #212121; border-radius: 5px; margin: 5px;"><a style="color: #52B54B !important;" href="#">Emby<span><img class="themeImage" src="images/themes/emby.png"></span></a></li>
- <li class="chooseTheme" id="bookTheme" style="border: 1px #FFFFFF; border-style: groove; background: #3B5998; border-radius: 5px; margin: 5px;"><a style="color: #FFFFFF !important;" href="#">Facebook<span><img class="themeImage" src="images/themes/facebook.png"></span></a></li>
- <li class="chooseTheme" id="spaTheme" style="border: 1px #66BBAE; border-style: groove; background: #66BBAE; border-radius: 5px; margin: 5px;"><a style="color: #5B391E !important;" href="#">Spa<span><img class="themeImage" src="images/themes/spa.png"></span></a></li>
- <li class="chooseTheme" id="darklyTheme" style="border: 1px #464545; border-style: groove; background: #375A7F; border-radius: 5px; margin: 5px;"><a style="color: #FFFFFF !important;" href="#">Darkly<span><img class="themeImage" src="images/themes/darkly.png"></span></a></li>
- <li class="chooseTheme" id="slateTheme" style="border: 1px #58C0DE; border-style: groove; background: #272B30; border-radius: 5px; margin: 5px;"><a style="color: #C8C8C8 !important;" href="#">Slate<span><img class="themeImage" src="images/themes/slate.png"></span></a></li>
- <li class="chooseTheme" id="monokaiTheme" style="border: 1px #AD80FD; border-style: groove; background: #333333; border-radius: 5px; margin: 5px;"><a style="color: #66D9EF !important;" href="#">Monokai<span><img class="themeImage" src="images/themes/monokai.png"></span></a></li>
- <li class="chooseTheme" id="thejokerTheme" style="border: 1px #CCC6CC; border-style: groove; background: #000000; border-radius: 5px; margin: 5px;"><a style="color: #CCCCCC !important;" href="#">The Joker<span><img class="themeImage" src="images/themes/joker.png"></span></a></li>
- <li class="chooseTheme" id="redTheme" style="border: 1px #eb6363; border-style: groove; background: #eb6363; border-radius: 5px; margin: 5px;"><a style="color: #FFFFFF !important;" href="#">Original Red<span><img class="themeImage" src="images/themes/original.png"></span></a></li>
- </ul>
- ',
- ),
- ),
- array(
- 'type' => 'header',
- 'labelTranslate' => 'TITLE',
- ),
- array(
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'labelTranslate' => 'TITLE',
- 'name' => 'title',
- 'id' => 'title',
- 'value' => $title,
- ),
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'TITLE_TEXT',
- 'name' => 'topbartext',
- 'id' => 'topbartext',
- 'value' => $topbartext,
- ),
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'LOADING_COLOR',
- 'name' => 'loading',
- 'id' => 'loading',
- 'value' => $loading,
- ),
- ),
- array(
- 'type' => 'header',
- 'labelTranslate' => 'NAVIGATION_BARS',
- ),
- array(
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'TOP_BAR',
- 'name' => 'topbar',
- 'id' => 'topbar',
- 'value' => $topbar,
- ),
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'BOTTOM_BAR',
- 'name' => 'bottombar',
- 'id' => 'bottombar',
- 'value' => $bottombar,
- ),
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'SIDE_BAR',
- 'name' => 'sidebar',
- 'id' => 'sidebar',
- 'value' => $sidebar,
- ),
- ),
- array(
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'HOVER_BG',
- 'name' => 'hoverbg',
- 'id' => 'hoverbg',
- 'value' => $hoverbg,
- ),
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'HOVER_TEXT',
- 'name' => 'hovertext',
- 'id' => 'hovertext',
- 'value' => $hovertext,
- ),
- ),
- array(
- 'type' => 'header',
- 'labelTranslate' => 'ACTIVE_TAB',
- ),
- array(
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'ACTIVE_TAB_BG',
- 'name' => 'activetabBG',
- 'id' => 'activetabBG',
- 'value' => $activetabBG,
- ),
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'ACTIVE_TAB_ICON',
- 'name' => 'activetabicon',
- 'id' => 'activetabicon',
- 'value' => $activetabicon,
- ),
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'ACTIVE_TAB_TEXT',
- 'name' => 'activetabtext',
- 'id' => 'activetabtext',
- 'value' => $activetabtext,
- ),
- ),
- array(
- 'type' => 'header',
- 'labelTranslate' => 'INACTIVE_TAB',
- ),
- array(
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'INACTIVE_ICON',
- 'name' => 'inactiveicon',
- 'id' => 'inactiveicon',
- 'value' => $inactiveicon,
- ),
- array(
- 'type' => 'text',
- 'format' => 'colour',
- 'class' => 'jscolor {hash:true}',
- 'labelTranslate' => 'INACTIVE_TEXT',
- 'name' => 'inactivetext',
- 'id' => 'inactivetext',
- 'value' => $inactivetext,
- ),
- ),
- ),
- ),
- array(
- 'title' => 'Custom CSS',
- 'id' => 'theme_css',
- 'image' => 'images/css.png',
- 'fields' => array(
- array(
- 'type' => 'header',
- 'label' => 'Custom CSS',
- ),
- array(
- 'type' => 'textarea',
- 'name' => 'customCSS',
- 'value' => (file_exists('./custom.css')?file_get_contents('./custom.css'):''),
- 'rows' => 25,
- 'style' => 'background: #000; color: #FFF;',
- ),
- ),
- ),
- ),
- )
- );
- ?>
- </div>
- <div class="email-content homepage-box white-bg">
- <?php
- // Qualify most typical hostnames prior to form submission
- $urlPattern = '([hH][tT][tT][pP][sS]?):\/\/([\w\.\-]{1,250})(?::(\d{1,5}))?((?:\/[^?.\s]+))?';
- // Once configurable user groups is added change to select-multi to allow specific group selection
- $userSelectType = 'select';
- $userTypes = array(
- 'None' => 'false',
- 'User' => 'user|admin',
- 'Admin' => 'admin',
- );
- $branchTypes = array(
- 'Master' => 'master',
- 'Develop' => 'develop',
- 'Pre-Develop' => 'cero-dev',
- );
- $refreshSeconds = array(
- '1 sec' => '1000',
- '5 secs' => '5000',
- '10 secs' => '10000',
- '15 secs' => '15000',
- '30 secs' => '30000',
- '60 secs' => '60000',
- '90 secs' => '90000',
- '120 secs' => '120000',
- );
- // Build Homepage Settings
- echo buildSettings(
- array(
- 'title' => 'Homepage Settings',
- 'id' => 'homepage_settings',
- 'onready' => '',
- 'tabs' => array(
- array(
- 'title' => 'General',
- 'id' => 'home_general',
- 'image' => 'images/gear.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_HOMEPAGE',
- 'name' => 'homePageAuthNeeded',
- 'value' => HOMEPAGEAUTHNEEDED,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'SPEED_TEST',
- 'name' => 'speedTest',
- 'value' => SPEEDTEST,
- ),
- /*
- array(
- 'type' => 'custom',
- 'labelTranslate' => 'SHOW_HOMEPAGE',
- 'html' => 'homePageAuthNeeded',
- 'name' => 'homePagelayout',
- 'value' => '',
- ),
- */
- ),
- ),
- array(
- 'title' => 'Plex',
- 'id' => 'plex',
- 'image' => 'images/plex.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'plexHomeAuth',
- 'value' => PLEXHOMEAUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:32400',
- 'labelTranslate' => 'PLEX_URL',
- 'assist' => 'http://hostname:32400',
- 'name' => 'plexURL',
- 'pattern' => $urlPattern,
- 'value' => PLEXURL,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => randString(20),
- 'labelTranslate' => 'PLEX_TOKEN',
- 'name' => 'plexToken',
- 'pattern' => '[a-zA-Z0-9]{20}',
- 'value' => PLEXTOKEN,
- ),
- array(
- 'type' => 'custom',
- 'html' => '<button id="openPlexModal" type="button" class="btn waves btn-labeled btn-success btn-sm text-uppercase waves-effect waves-float"> <span class="btn-label"><i class="fa fa-ticket"></i></span>'.translate("GET_PLEX_TOKEN").'</button>',
- ),
- array(
- 'type' => 'text',
- 'placeholder' => "",
- 'labelTranslate' => 'RECENT_ITEMS_LIMIT',
- 'name' => 'plexRecentItems',
- 'pattern' => '[0-9]+',
- 'value' => PLEXRECENTITEMS,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => "Name of Plex Tab i.e. Plex",
- 'labelTranslate' => 'PLEX_TAB_NAME',
- 'name' => 'plexTabName',
- 'value' => PLEXTABNAME,
- ),
- array(
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'ALLOW_SEARCH',
- 'name' => 'plexSearch',
- 'value' => PLEXSEARCH,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'RECENT_MOVIES',
- 'name' => 'plexRecentMovie',
- 'value' => PLEXRECENTMOVIE,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'RECENT_TV',
- 'name' => 'plexRecentTV',
- 'value' => PLEXRECENTTV,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'RECENT_MUSIC',
- 'name' => 'plexRecentMusic',
- 'value' => PLEXRECENTMUSIC,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'PLAYLISTS',
- 'name' => 'plexPlaylists',
- 'value' => PLEXPLAYLISTS,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'PLAYING_NOW',
- 'name' => 'plexPlayingNow',
- 'value' => PLEXPLAYINGNOW,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'SHOW_NAMES',
- 'name' => 'plexShowNames',
- 'value' => PLEXSHOWNAMES,
- ),
- ),
- ),
- ),
- array(
- 'title' => 'Emby',
- 'id' => 'emby',
- 'image' => 'images/emby.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'embyHomeAuth',
- 'value' => EMBYHOMEAUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:8096/emby',
- 'labelTranslate' => 'EMBY_URL',
- 'assist' => 'http://hostname:8096 | https://hostname/emby | http://hostname:8096/emby',
- 'name' => 'embyURL',
- 'pattern' => $urlPattern,
- 'value' => EMBYURL,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => randString(32),
- 'labelTranslate' => 'EMBY_TOKEN',
- 'name' => 'embyToken',
- 'pattern' => '[a-zA-Z0-9]{32}',
- 'value' => EMBYTOKEN,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => "",
- 'labelTranslate' => 'RECENT_ITEMS_LIMIT',
- 'name' => 'embyRecentItems',
- 'pattern' => '[0-9]+',
- 'value' => EMBYRECENTITEMS,
- ),
- array(
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'RECENT_MOVIES',
- 'name' => 'embyRecentMovie',
- 'value' => EMBYRECENTMOVIE,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'RECENT_TV',
- 'name' => 'embyRecentTV',
- 'value' => EMBYRECENTTV,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'RECENT_MUSIC',
- 'name' => 'embyRecentMusic',
- 'value' => EMBYRECENTMUSIC,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'PLAYING_NOW',
- 'name' => 'embyPlayingNow',
- 'value' => EMBYPLAYINGNOW,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'SHOW_NAMES',
- 'name' => 'embyShowNames',
- 'value' => EMBYSHOWNAMES,
- ),
- ),
- ),
- ),
- array(
- 'title' => 'Sonarr',
- 'id' => 'sonarr',
- 'image' => 'images/sonarr.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'sonarrHomeAuth',
- 'value' => SONARRHOMEAUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:8989',
- 'labelTranslate' => 'SONARR_URL',
- 'assist' => 'http://hostname:8989 | hostname/sonarr | http://hostname:8989/sonarr',
- 'name' => 'sonarrURL',
- 'pattern' => $urlPattern,
- 'value' => SONARRURL,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => randString(32),
- 'labelTranslate' => 'SONARR_KEY',
- 'name' => 'sonarrKey',
- 'pattern' => '[a-zA-Z0-9]{32}',
- 'value' => SONARRKEY,
- ),
- ),
- ),
- array(
- 'title' => 'Radarr',
- 'id' => 'radarr',
- 'image' => 'images/radarr.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'radarrHomeAuth',
- 'value' => RADARRHOMEAUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:7878',
- 'labelTranslate' => 'RADARR_URL',
- 'assist' => 'http://hostname:7878 | hostname/radarr | http://hostname:7878/radarr',
- 'name' => 'radarrURL',
- 'pattern' => $urlPattern,
- 'value' => RADARRURL,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => randString(32),
- 'labelTranslate' => 'RADARR_KEY',
- 'name' => 'radarrKey',
- 'pattern' => '[a-zA-Z0-9]{32}',
- 'value' => RADARRKEY,
- ),
- ),
- ),
- array(
- 'title' => 'Sickbeard/Sickrage',
- 'id' => 'sick',
- 'image' => 'images/sickrage.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'sickrageHomeAuth',
- 'value' => SICKRAGEHOMEAUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:8081/sick',
- 'labelTranslate' => 'SICK_URL',
- 'assist' => 'http://hostname:8081 | hostname/sick | http://hostname:8081/sick',
- 'name' => 'sickrageURL',
- 'pattern' => $urlPattern,
- 'value' => SICKRAGEURL,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => randString(32),
- 'labelTranslate' => 'SICK_KEY',
- 'name' => 'sickrageKey',
- 'value' => SICKRAGEKEY,
- ),
- ),
- ),
- array(
- 'title' => 'Headphones',
- 'id' => 'headphones',
- 'image' => 'images/headphones.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'headphonesHomeAuth',
- 'value' => HEADPHONESHOMEAUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:8181',
- 'labelTranslate' => 'HEADPHONES_URL',
- 'assist' => 'http://hostname:8181',
- 'name' => 'headphonesURL',
- 'pattern' => $urlPattern,
- 'value' => HEADPHONESURL,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => randString(32),
- 'labelTranslate' => 'HEADPHONES_KEY',
- 'name' => 'headphonesKey',
- 'value' => HEADPHONESKEY,
- ),
- ),
- ),
- array(
- 'title' => 'Sabnzbd',
- 'id' => 'sabnzbd',
- 'image' => 'images/sabnzbd.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'sabnzbdHomeAuth',
- 'value' => SABNZBDHOMEAUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:8080/sabnzbd',
- 'labelTranslate' => 'SABNZBD_URL',
- 'assist' => 'http://hostname:8080 | http://hostname/sabnzbd | http://hostname:8080/sabnzbd',
- 'name' => 'sabnzbdURL',
- 'pattern' => $urlPattern,
- 'value' => SABNZBDURL,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => randString(32),
- 'labelTranslate' => 'SABNZBD_KEY',
- 'name' => 'sabnzbdKey',
- 'value' => SABNZBDKEY,
- ),
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'DOWNLOAD_REFRESH',
- 'name' => 'downloadRefresh',
- 'value' => DOWNLOADREFRESH,
- 'options' => $refreshSeconds,
- ),
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'HISTORY_REFRESH',
- 'name' => 'historyRefresh',
- 'value' => HISTORYREFRESH,
- 'options' => $refreshSeconds,
- ),
- ),
- ),
- array(
- 'title' => 'nzbGET',
- 'id' => 'nzbget',
- 'image' => 'images/nzbget.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'nzbgetHomeAuth',
- 'value' => NZBGETHOMEAUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:6789',
- 'labelTranslate' => 'NZBGET_URL',
- 'assist' => 'http://hostname:6789',
- 'name' => 'nzbgetURL',
- 'pattern' => $urlPattern,
- 'value' => NZBGETURL,
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'USERNAME',
- 'name' => 'nzbgetUsername',
- 'value' => NZBGETUSERNAME,
- ),
- array(
- 'type' => 'password',
- 'labelTranslate' => 'PASSWORD',
- 'name' => 'nzbgetPassword',
- 'value' => (empty(NZBGETPASSWORD)?'':randString(20)),
- ),
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'DOWNLOAD_REFRESH',
- 'name' => 'downloadRefresh',
- 'value' => DOWNLOADREFRESH,
- 'options' => $refreshSeconds,
- ),
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'HISTORY_REFRESH',
- 'name' => 'historyRefresh',
- 'value' => HISTORYREFRESH,
- 'options' => $refreshSeconds,
- ),
- ),
- ),
- array(
- 'title' => 'Calendar',
- 'id' => 'calendar',
- 'image' => 'images/calendar.png',
- 'fields' => array(
- array(
- 'type' => 'select',
- 'labelTranslate' => 'CALENDAR_START_DAY',
- 'name' => 'calendarStart',
- 'value' => CALENDARSTART,
- 'options' => array(
- explode('|', translate('DAYS'))[0] => '0',
- explode('|', translate('DAYS'))[1] => '1',
- explode('|', translate('DAYS'))[2] => '2',
- explode('|', translate('DAYS'))[3] => '3',
- explode('|', translate('DAYS'))[4] => '4',
- explode('|', translate('DAYS'))[5] => '5',
- explode('|', translate('DAYS'))[6] => '6',
- ),
- ),
- array(
- 'type' => 'select',
- 'labelTranslate' => 'DEFAULT',
- 'name' => 'calendarView',
- 'value' => CALENDARVIEW,
- 'options' => array(
- translate('MONTH') => 'month',
- translate('DAY') => 'basicDay',
- translate('WEEK') => 'basicWeek',
- ),
- ),
- array(
- 'type' => 'select',
- 'labelTranslate' => 'CALTIMEFORMAT',
- 'name' => 'calTimeFormat',
- 'value' => CALTIMEFORMAT,
- 'options' => array(
- '6p' => 'h(:mm)t',
- '6:00p' => 'h:mmt',
- '6:00' => 'h:mm',
- '18' => 'H(:mm)',
- '18:00' => 'H:mm',
- ),
- ),
- array(
- 'type' => 'number',
- 'placeholder' => '10',
- 'labelTranslate' => 'CALENDAR_START_DATE',
- 'name' => 'calendarStartDay',
- 'pattern' => '[1-9][0-9]+',
- 'value' => CALENDARSTARTDAY,
- ),
- array(
- 'type' => 'number',
- 'placeholder' => '10',
- 'labelTranslate' => 'CALENDAR_END_DATE',
- 'name' => 'calendarEndDay',
- 'pattern' => '[1-9][0-9]+',
- 'value' => CALENDARENDDAY,
- ),
- ),
- ),
- array(
- 'title' => 'Notice',
- 'id' => 'notice',
- 'image' => 'images/pin.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'homepageNoticeAuth',
- 'value' => HOMEPAGENOTICEAUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'NOTICE_LAYOUT',
- 'name' => 'homepageNoticeLayout',
- 'value' => HOMEPAGENOTICELAYOUT,
- 'options' => array(
- 'Elegant' => 'elegant',
- 'Basic' => 'basic',
- 'Jumbotron' => 'jumbotron',
- ),
- ),
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'NOTICE_COLOR',
- 'name' => 'homepageNoticeType',
- 'value' => HOMEPAGENOTICETYPE,
- 'options' => array(
- 'Green' => 'success',
- 'Blue' => 'primary',
- 'Gray' => 'gray',
- 'Red' => 'danger',
- 'Yellow' => 'warning',
- 'Light Blue' => 'info',
- ),
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'NOTICE_TITLE',
- 'name' => 'homepageNoticeTitle',
- 'value' => HOMEPAGENOTICETITLE,
- ),
- /*array(
- 'type' => 'textarea',
- 'labelTranslate' => 'NOTICE_MESSAGE',
- 'name' => 'homepageNoticeMessage',
- 'value' => HOMEPAGENOTICEMESSAGE,
- 'rows' => 5,
- 'class' => 'material no-code',
- ),*/
- array(
- 'type' => 'custom',
- 'labelTranslate' => 'NOTICE_MESSAGE',
- 'html' => '<div class="summernote" name="homepageNoticeMessage">'.HOMEPAGENOTICEMESSAGE.'</div>',
- ),
- ),
- ),
- array(
- 'title' => 'Custom HTML 1',
- 'id' => 'customhtml1',
- 'image' => 'images/html.png',
- 'fields' => array(
- array(
- 'type' => $userSelectType,
- 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
- 'name' => 'homepageCustomHTML1Auth',
- 'value' => HOMEPAGECUSTOMHTML1AUTH,
- 'options' => $userTypes,
- ),
- array(
- 'type' => 'textarea',
- 'labelTranslate' => 'CUSTOMHTML',
- 'name' => 'homepageCustomHTML1',
- 'value' => HOMEPAGECUSTOMHTML1,
- 'rows' => 15,
- 'style' => 'background: #000; color: #FFF;',
- ),
- ),
- ),
- ),
- )
- );
- ?>
- </div>
- <div class="email-content advanced-box white-bg">
- <?php
- $backendOptions = array();
- foreach (array_filter(get_defined_functions()['user'],function($v) { return strpos($v, 'plugin_auth_') === 0; }) as $value) {
- $name = str_replace('plugin_auth_','',$value);
- if (strpos($name, 'disabled') === false) {
- $backendOptions[ucwords(str_replace('_',' ',$name))] = $name;
- } else {
- $backendOptions[$value()] = array(
- 'value' => randString(),
- 'disabled' => true,
- );
- }
- }
- ksort($backendOptions);
- echo buildSettings(
- array(
- 'title' => 'Advanced Settings',
- 'id' => 'advanced_settings',
- 'onready' => '$(\'#authType_id\').trigger(\'change\')',
- 'tabs' => array(
- array(
- 'title' => 'Backend Authentication',
- 'id' => 'be_auth',
- 'image' => 'images/security.png',
- 'fields' => array(
- array(
- 'type' => 'select',
- 'labelTranslate' => 'AUTHTYPE',
- 'name' => 'authType',
- 'value' => AUTHTYPE,
- 'onchange' => 'if (this.value == \'internal\') { $(\'.be-auth, #authBackend_id, #authBackendCreate_id\').parent().hide(); } else { $(\'#authBackend_id, #authBackendCreate_id\').trigger(\'change\').parent().show(); }if (this.value == \'external\') { alert(\'ATTENTION! Before using this option, Make sure that the ADMIN account that you setup matches at least one username on your external backend. Otherwide you will lose Admin functionality. If something messes up, edit config/config.php and change authType to either internal or both.\') } ',
- 'options' => array(
- 'Organizr' => 'internal',
- (AUTHBACKEND) ? 'Organizr & '.ucwords(AUTHBACKEND) : 'Organizr & Backend' => 'both',
- (AUTHBACKEND) ? ucwords(AUTHBACKEND)." Only" : "Backend Only" => 'external',
- ),
- ),
- array(
- 'type' => 'select',
- 'labelTranslate' => 'AUTHBACKEND',
- 'name' => 'authBackend',
- 'onchange' => '$(\'.be-auth\').each(function() { $(this).parent().hide(); }); $(\'.be-auth-\'+this.value).each(function() { $(this).parent().show(); });',
- 'value' => AUTHBACKEND,
- 'options' => $backendOptions,
- ),
- array(
- 'type' => 'select',
- 'labelTranslate' => 'AUTHBACKENDCREATE',
- 'name' => 'authBackendCreate',
- 'value' => AUTHBACKENDCREATE,
- 'options' => array(
- translate('YES_CREATE') => 'true',
- translate('NO_CREATE') => 'false',
- ),
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:8181',
- 'labelTranslate' => 'AUTHBACKENDHOST',
- 'assist' => 'http(s)://hostname:8181 | Ldap(s)://localhost:389 | ftp(s)://localhost:21',
- 'name' => 'authBackendHost',
- 'class' => 'be-auth be-auth-ftp be-auth-ldap',
- 'pattern' => '((?:[hH][tT][tT][pP]|[lL][dD][aA][pP]|[fF][tT][pP])[sS]?):\/\/([\w\.]{1,250})(?::(\d{1,5}))?((?:\/[^?.\s]+))?',
- 'value' => AUTHBACKENDHOST,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'domain',
- 'labelTranslate' => 'AUTHBACKENDDOMAIN',
- 'name' => 'authBackendDomain',
- 'class' => 'be-auth be-auth-ldap',
- 'value' => AUTHBACKENDDOMAIN,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'http://hostname:8096/emby',
- 'labelTranslate' => 'EMBY_URL',
- 'assist' => 'http://hostname:8096 | https://hostname/emby | http://hostname:8096/emby',
- 'class' => 'be-auth be-auth-emby_local be-auth-emby_all be-auth-emby_connect',
- 'name' => 'embyURL',
- 'pattern' => $urlPattern,
- 'value' => EMBYURL,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => randString(32),
- 'labelTranslate' => 'EMBY_TOKEN',
- 'name' => 'embyToken',
- 'class' => 'be-auth be-auth-emby_all be-auth-emby_connect',
- 'pattern' => '[a-zA-Z0-9]{32}',
- 'value' => EMBYTOKEN,
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'PLEX_USERNAME',
- 'name' => 'plexUsername',
- 'class' => 'be-auth be-auth-plex',
- 'value' => PLEXUSERNAME,
- ),
- array(
- 'type' => 'password',
- 'labelTranslate' => 'PLEX_PASSWORD',
- 'name' => 'plexPassword',
- 'class' => 'be-auth be-auth-plex',
- 'value' => (empty(PLEXPASSWORD)?'':randString(20)),
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'ORGANIZR_API_KEY',
- 'name' => 'organizrAPI',
- 'value' => ORGANIZRAPI,
- ),
- array(
- 'type' => 'button',
- 'id' => 'generateAPI',
- 'labelTranslate' => 'GENERATE_API_KEY',
- 'icon' => 'key',
- 'onclick' => 'var code = generateCode(); $(\'#organizrAPI_id\').val(code); $(\'#organizrAPI_id\').attr(\'data-changed\', \'true\');',
- ),
- ),
- ),
- array(
- 'title' => 'Super Advanced',
- 'id' => 'super_advanced',
- 'image' => 'images/gear.png',
- 'fields' => array(
- array(
- 'type' => 'text',
- 'placeholder' => '/home/www-data/',
- 'labelTranslate' => 'DATABASE_PATH',
- 'name' => 'database_Location',
- 'value' => DATABASE_LOCATION,
- ),
- array(
- 'type' => 'select',
- 'labelTranslate' => 'SET_TIMEZONE',
- 'name' => 'timezone',
- 'value' => TIMEZONE,
- 'options' => timezoneOptions(),
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'REGISTER_PASSWORD',
- 'name' => 'registerPassword',
- 'value' => REGISTERPASSWORD,
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'COOKIE_DOMAIN',
- 'name' => 'domain',
- 'value' => DOMAIN,
- ),
- array(
- 'type' => 'password',
- 'labelTranslate' => 'COOKIE_PASSWORD',
- 'name' => 'cookiePassword',
- 'value' => (empty(COOKIEPASSWORD)?'':randString(20)),
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'IPINFO_TOKEN',
- 'name' => 'ipInfoToken',
- 'value' => IPINFOTOKEN,
- ),
- array(
- 'type' => 'select',
- 'labelTranslate' => 'GIT_BRANCH',
- 'placeholder' => 'Default: \'master\' - Development: \'develop\' OR \'cero-dev\'',
- 'id' => 'git_branch_id',
- 'name' => 'git_branch',
- 'value' => GIT_BRANCH,
- 'options' => $branchTypes,
- ),
- array(
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'GIT_CHECK',
- 'name' => 'git_check',
- 'value' => GIT_CHECK,
- ),
- array(
- 'type' => 'button',
- 'id' => 'gitForceInstall',
- 'style' => (extension_loaded("ZIP")) ? "" : "display : none",
- 'labelTranslate' => 'GIT_FORCE',
- 'icon' => 'gear',
- 'onclick' => 'if ($(\'#git_branch_id[data-changed]\').length) { alert(\'Branch was altered, save settings first!\') } else { if (confirm(\''.translate('GIT_FORCE_CONFIRM').'\')) { performUpdate(); ajax_request(\'POST\', \'forceBranchInstall\'); } }',
- ),
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'MULTIPLE_LOGINS',
- 'name' => 'multipleLogin',
- 'value' => MULTIPLELOGIN,
- ),
- ),
- ),
- array(
- 'title' => 'Mail Settings',
- 'id' => 'mail_settings',
- 'image' => 'images/mail.png',
- 'fields' => array(
- array(
- 'type' => 'text',
- 'placeholder' => 'mail.provider.com',
- 'labelTranslate' => 'SMTP_HOST',
- 'name' => 'smtpHost',
- 'pattern' => '([\w\.\-]{1,250})',
- 'value' => SMTPHOST,
- ),
- array(
- 'type' => 'number',
- 'placeholder' => '465',
- 'labelTranslate' => 'SMTP_HOST_PORT',
- 'name' => 'smtpHostPort',
- 'value' => SMTPHOSTPORT,
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'SMTP_HOST_USERNAME',
- 'name' => 'smtpHostUsername',
- 'value' => SMTPHOSTUSERNAME,
- ),
- array(
- 'type' => 'password',
- 'labelTranslate' => 'SMTP_HOST_PASSWORD',
- 'name' => 'smtpHostPassword',
- 'value' => (empty(SMTPHOSTPASSWORD)?'':randString(20)),
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'SMTP_HOST_SENDER_NAME',
- 'name' => 'smtpHostSenderName',
- 'value' => SMTPHOSTSENDERNAME,
- ),
- array(
- 'type' => 'text',
- 'labelTranslate' => 'SMTP_HOST_SENDER_EMAIL',
- 'name' => 'smtpHostSenderEmail',
- 'value' => SMTPHOSTSENDEREMAIL,
- ),
- array(
- 'type' => 'select',
- 'labelTranslate' => 'SMTP_HOST_AUTH',
- 'name' => 'smtpHostType',
- 'value' => SMTPHOSTTYPE,
- 'options' => array(
- 'ssl' => 'ssl',
- 'tls' => 'tls',
- ),
- ),
- array(
- array(
- 'type' => 'button',
- 'labelTranslate' => 'TEST_EMAIL',
- 'id' => 'testEmail',
- 'icon' => 'flask',
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'SMTP_HOST_AUTH',
- 'name' => 'smtpHostAuth',
- 'value' => SMTPHOSTAUTH,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'ENABLE_MAIL',
- 'name' => 'enableMail',
- 'value' => ENABLEMAIL,
- ),
- ),
- ),
- ),
- array(
- 'title' => 'Advanced Visual',
- 'id' => 'advanced_visual',
- 'image' => 'images/paint.png',
- 'fields' => array(
- array(
- 'type' => 'text',
- 'placeholder' => 'images/organizr.png',
- 'labelTranslate' => 'LOADING_ICON_URL',
- 'name' => 'loadingIcon',
- 'value' => LOADINGICON,
- ),
- array(
- 'type' => 'text',
- 'placeholder' => 'images/organizr.png',
- 'labelTranslate' => 'LOGO_URL_TITLE',
- 'name' => 'titleLogo',
- 'value' => TITLELOGO,
- ),
- array(
- 'type' => 'select',
- 'labelTranslate' => 'NOTIFICATION_TYPE',
- 'name' => 'notifyEffect',
- 'onchange' => 'parent.notify(\'This is an example popup!\', \'bullhorn\', \'success\', 4000, this.value.split(\'-\')[0], this.value.split(\'-\')[1]);',
- 'value' => NOTIFYEFFECT,
- 'options' => array(
- 'Slide From Top' => 'bar-slidetop',
- 'Exploader From Top' => 'bar-exploader',
- 'Flip' => 'attached-flip',
- 'Bouncy Flip' => 'attached-bouncyflip',
- 'Growl Scale' => 'growl-scale',
- 'Growl Genie' => 'growl-genie',
- 'Growl Jelly' => 'growl-jelly',
- 'Growl Slide' => 'growl-slide',
- 'Spinning Box' => 'other-boxspinner',
- 'Sliding' => 'other-thumbslider',
- ),
- ),
- array(
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'ENABLE_LOADING_SCREEN',
- 'name' => 'loadingScreen',
- 'value' => LOADINGSCREEN,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'ENABLE_SLIMBAR',
- 'name' => 'slimBar',
- 'value' => SLIMBAR,
- ),
- array(
- 'type' => 'checkbox',
- 'labelTranslate' => 'GRAVATAR',
- 'name' => 'gravatar',
- 'value' => GRAVATAR,
- ),
- ),
- ),
- ),
- ),
- )
- );
- ?>
- </div>
- <div class="email-content donate-box white-bg">
- <div class="email-body">
- <div class="email-header gray-bg">
- <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
- <h1>Donate To Organizr</h1>
- </div>
- <div class="email-inner small-box">
- <div class="email-inner-section">
- <div class="small-box fade in" id="donate-org">
- <div class="row">
- <div class="col-lg-12">
- <div class="big-box">
- <div class="jumbotron">
- <div class="container">
- <h2><strong>Hey There <em class="gray"><?php echo ucwords($USER->username);?></em>,</strong></h2>
- <br/>
- <small>I had always said that I wouldn't take any donations for my work but some situations have changed in my life. By no means does anyone need to donate but if you choose to help out and show appreciation I would surely appreciate that very much. I do all of this for everyone and because I'm happy when i do it :)</small>
- <br/><br/>
- <small>I just want to take this time to thank you for even visiting this section of Organizr. Just by you clicking into this area makes me happy. Even the fact that you are still reading this makes me happy. I bet now you are wondering, why am I even still reading this... LOL, don't worry, I'm kinda laughing as I am typing this. Anywho, thank you for reading along and I hope you enjoy the rest of your day.</small>
- <br/><br/>
- <p class="pull-right"><i class="fa fa-heart fa-1x red loop-animation animated pulse" aria-hidden="true"></i> CauseFX</p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-4 col-lg-4">
- <div class="content-box ultra-widget blue-bg" style="cursor: pointer;" onclick="window.open('https://paypal.me/causefx', '_blank')">
- <div class="w-content big-box">
- <div class="w-progress">
- <span class="w-amount">PayPal</span>
- <br>
- <span class="text-uppercase w-name">Donate with PayPal</span>
- </div>
- <span class="w-refresh w-p-icon">
- <span class="fa-stack fa-lg">
- <i class="fa fa-square fa-stack-2x"></i>
- <i class="fa fa-paypal blue fa-stack-1x fa-inverse"></i>
- </span>
- </span>
- </div>
- </div>
- </div>
- <div class="col-sm-4 col-lg-4">
- <div class="content-box ultra-widget green-bg" style="cursor: pointer;" onclick="window.open('https://cash.me/$causefx', '_blank')">
- <div class="w-content big-box">
- <div class="w-progress">
- <span class="w-amount">Square</span>
- <br>
- <span class="text-uppercase w-name">Donate with Square Cash</span>
- </div>
- <span class="w-refresh w-p-icon">
- <span class="fa-stack fa-lg">
- <i class="fa fa-square fa-stack-2x"></i>
- <i class="fa fa-dollar green fa-stack-1x fa-inverse"></i>
- </span>
- </span>
- </div>
- </div>
- </div>
- <div class="col-sm-4 col-lg-4">
- <div class="content-box ultra-widget red-bg">
- <div class="w-content big-box">
- <div class="w-progress">
- <span class="w-amount">BitCoin</span>
- <small class="text-uppercase">1NDy1Su6izmwkcFZaZuMWDYrFFUNv3FQCN</small>
- </div>
- <span class="w-refresh w-p-icon">
- <span class="fa-stack fa-lg">
- <i class="fa fa-square fa-stack-2x"></i>
- <i class="fa fa-btc red fa-stack-1x fa-inverse"></i>
- </span>
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="email-content info-box white-bg">
- <div class="email-body">
- <div class="email-header gray-bg">
- <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
- <h1>About Organizr</h1>
- </div>
- <div class="email-inner small-box">
- <div class="email-inner-section">
- <div class="small-box fade in" id="about">
- <h4><img src="images/organizr-logo-h-d.png" height="50px"></h4>
- <p id="version"></p>
- <p id="submitFeedback">
- <a href='https://reddit.com/r/organizr' target='_blank' type='button' style="background: #AD80FD" class='btn waves btn-labeled btn-success btn text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-reddit'></i></span>SUBREDDIT</a>
- <a href='https://github.com/causefx/Organizr/issues/new' target='_blank' type='button' class='btn waves btn-labeled btn-success btn text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-github-alt'></i></span><?php echo $language->translate("SUBMIT_ISSUE");?></a>
- <a href='https://github.com/causefx/Organizr' target='_blank' type='button' class='btn waves btn-labeled btn-primary btn text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-github'></i></span><?php echo $language->translate("VIEW_ON_GITHUB");?></a>
- <a href='https://gitter.im/Organizrr/Lobby' target='_blank' type='button' class='btn waves btn-labeled btn-dark btn text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-comments-o'></i></span><?php echo $language->translate("CHAT_WITH_US");?></a>
- <button type="button" class="class='btn waves btn-labeled btn-warning btn text-uppercase waves-effect waves-float" data-toggle="modal" data-target=".Help-Me-modal-lg"><span class='btn-label'><i class='fa fa-life-ring'></i></span><?php echo $language->translate("HELP");?></button>
- <button id="deleteToggle" type="button" class="class='btn waves btn-labeled btn-danger btn text-uppercase waves-effect waves-float" ><span class='btn-label'><i class='fa fa-trash'></i></span><?php echo $language->translate("DELETE_DATABASE");?></button>
- </p>
- <div class="modal fade Help-Me-modal-lg" tabindex="-1" role="dialog">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content" style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title"><?php echo $language->translate("HELP");?>!</h4>
- </div>
- <div class="modal-body" style="background: <?php echo $sidebar;?> !important;">
- <div style="margin-bottom: 0px;" class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
- <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
- <div class="panel-heading" role="tab" id="headingOne">
- <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
- <?php echo $language->translate("ADDING_TABS");?>
- </h4>
- </div>
- <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true">
- <div class="panel-body">
- <p><?php echo $language->translate("START_ADDING_TABS");?></p>
- <ul>
- <li><strong><?php echo $language->translate("TAB_URL");?></strong> <?php echo $language->translate("TAB_URL_ABOUT");?></li>
- <li><strong><?php echo $language->translate("ICON_URL");?></strong> <?php echo $language->translate("ICON_URL_ABOUT");?></li>
- <li><strong><?php echo $language->translate("DEFAULT");?></strong> <?php echo $language->translate("DEFAULT_ABOUT");?></li>
- <li><strong><?php echo $language->translate("ACTIVE");?></strong> <?php echo $language->translate("ACTIVE_ABOUT");?></li>
- <li><strong><?php echo $language->translate("USER");?></strong> <?php echo $language->translate("USER_ABOUT");?></li>
- <li><strong><?php echo $language->translate("GUEST");?></strong> <?php echo $language->translate("GUEST_ABOUT");?></li>
- <li><strong><?php echo $language->translate("NO_IFRAME");?></strong> <?php echo $language->translate("NO_IFRAME_ABOUT");?></li>
- </ul>
- </div>
- </div>
- </div>
- <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
- <div class="panel-heading" role="tab" id="headingTwo">
- <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
- <?php echo $language->translate("QUICK_ACCESS");?>
- </h4>
- </div>
- <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo" aria-expanded="true">
- <div class="panel-body">
- <p><?php echo $language->translate("QUICK_ACCESS_ABOUT");?> <mark><?php echo getServerPath(); ?>#Sonarr</mark></p>
- </div>
- </div>
- </div>
- <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
- <div class="panel-heading" role="tab" id="headingThree">
- <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
- <?php echo $language->translate("SIDE_BY_SIDE");?>
- </h4>
- </div>
- <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree" aria-expanded="true">
- <div class="panel-body">
- <p><?php echo $language->translate("SIDE_BY_SIDE_ABOUT");?></p>
- <ul>
- <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS1");?></li>
- <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS2");?> [<i class='mdi mdi-refresh'></i>]</li>
- <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS3");?></li>
- </ul>
- </div>
- </div>
- </div>
- <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
- <div class="panel-heading" role="tab" id="headingFour">
- <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
- <?php echo $language->translate("KEYBOARD_SHORTCUTS");?>
- </h4>
- </div>
- <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour" aria-expanded="true">
- <div class="panel-body">
- <p><?php echo $language->translate("KEYBOARD_SHORTCUTS_ABOUT");?></p>
- <ul>
- <li><keyboard class="key"><span>S</span></keyboard> + <keyboard class="key"><span>S</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS1");?></li>
- <li><keyboard class="key"><span>F</span></keyboard> + <keyboard class="key"><span>F</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS6");?></li>
- <li><keyboard class="key"><span>P</span></keyboard> + <keyboard class="key"><span>P</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS7");?></li>
- <li><keyboard class="key"><span>M</span></keyboard> + <keyboard class="key"><span>M</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS8");?></li>
- <li><keyboard class="key wide"><span>Ctrl</span></keyboard> + <keyboard class="key wide"><span>Shift</span></keyboard> + <keyboard class="key"><span>↓</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS2");?></li>
- <li><keyboard class="key wide"><span>Ctrl</span></keyboard> + <keyboard class="key wide"><span>Shift</span></keyboard> + <keyboard class="key"><span>↑</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS3");?></li>
- <li><keyboard class="key wide"><span>Ctrl</span></keyboard> + <keyboard class="key wide"><span>Shift</span></keyboard> + <keyboard class="key"><span>1</span></keyboard> - <keyboard class="key"><span>9</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS5");?></li>
- <li><keyboard class="key wide"><span>Esc</span></keyboard> + <keyboard class="key wide"><span>Esc</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS4");?></li>
- </ul>
- </div>
- </div>
- </div>
- <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
- <div class="panel-heading" role="tab" id="headingFive">
- <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
- <?php echo $language->translate("TAB_NOT_LOADING");?>
- </h4>
- </div>
- <div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive" aria-expanded="true">
- <div class="panel-body">
- <p><?php echo $language->translate("TAB_NOT_LOADING_ABOUT");?></p>
- <?php
- if(get_browser_name() == "Chrome") : echo get_browser_name() . ": <a href='https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe' target='_blank'><strong>Ignore X-Frame headers</strong> by Guillaume Ryder</a>";
- elseif(get_browser_name() == "Firefox") : echo get_browser_name() . ": <a href='https://addons.mozilla.org/en-us/firefox/addon/ignore-x-frame-options/' target='_blank'><strong>Ignore X-Frame headers</strong> by rjhoukema</a>";
- else : echo "Sorry, currently there is no other alternative for " . get_browser_name(); endif;
- ?>
- </div>
- </div>
- </div>
- <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
- <div class="panel-heading" role="tab" id="headingSix">
- <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="true" aria-controls="collapseSix">
- <?php echo $language->translate("USER_ICONS");?>
- </h4>
- </div>
- <div id="collapseSix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix" aria-expanded="true">
- <div class="panel-body">
- <p><?php echo $language->translate("USER_ICONS_ABOUT");?> <a href="http://gravatar.com" target="_blank">gravatar.com</a></p>
- </div>
- </div>
- </div>
- <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
- <div class="panel-heading" role="tab" id="headingSeven">
- <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSeven" aria-expanded="true" aria-controls="collapseSeven">
- <?php echo $language->translate("TRANSLATIONS");?>
- </h4>
- </div>
- <div id="collapseSeven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSeven" aria-expanded="true">
- <div class="panel-body">
- <p><?php echo $language->translate("TRANSLATIONS_ABOUT");?> <a href="https://github.com/causefx/Organizr/tree/develop/lang" target="_blank">Github Develop Branch</a></p>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default waves" data-dismiss="modal"><?php echo $language->translate("CLOSE");?></button>
- </div>
- </div>
- </div>
- </div>
- <p id="whatsnew"></p>
- <p id="downloadnow"></p>
- <div id="deleteDiv" style="display: none;" class="panel panel-danger">
- <div class="panel-heading">
- <h3 class="panel-title"><?php echo $language->translate("DELETE_DATABASE");?></h3>
- </div>
- <div class="panel-body">
- <div class="">
- <p><?php echo $language->translate("DELETE_WARNING");?></p>
- <form id="deletedb" method="post" onsubmit="ajax_request('POST', 'deleteDB'); return false;">
- <button class="btn waves btn-labeled btn-danger pull-right text-uppercase waves-effect waves-float" type="submit">
- <span class="btn-label"><i class="fa fa-trash"></i></span><?php echo $language->translate("DELETE_DATABASE");?>
- </button>
- </form>
- </div>
- </div>
- </div>
- <div class="timeline-container">
- <div class="row">
- <div class="col-lg-12">
- <ul class="cbp_tmtimeline" id="versionHistory">
- </ul>
- <div class="btn-group-sm btn-group btn-group-justified">
- <div id="loadMore" class="btn-group" role="group">
- <button type="button" class="btn waves btn-primary waves-effect waves-float text-uppercase"><?php echo $language->translate("SHOW_MORE");?></button>
- </div>
- <div id="showLess" class="btn-group" role="group">
- <button type="button" class="btn waves btn-warning waves-effect waves-float text-uppercase"><?php echo $language->translate("SHOW_LESS");?></button>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="email-content users-box white-bg">
- <div class="email-body">
- <div class="email-header gray-bg">
- <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
- <h1>Users Management</h1>
- </div>
- <div class="email-inner small-box">
- <div class="email-inner-section">
- <div class="small-box fade in" id="useredit">
- <div class="row">
- <div class="col-lg-12">
- <div class="small-box">
- <form class="content-form form-inline" name="new user registration" id="registration" action="" method="POST">
- <input type="hidden" name="op" value="register"/>
- <input type="hidden" name="sha1" value=""/>
- <input type="hidden" name="settings" value="true"/>
- <div class="form-group">
- <input type="text" class="form-control material" name="username" placeholder="<?php echo $language->translate("USERNAME");?>" autocorrect="off" autocapitalize="off" value="">
- </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");?>">
- </div>
- <div class="form-group">
- <input type="password" class="form-control material" name="password2" placeholder="<?php echo $language->translate("PASSWORD_AGAIN");?>">
- </div>
- <button type="submit" onclick="User.processRegistration()" class="btn waves btn-labeled btn-primary btn btn-sm text-uppercase waves-effect waves-float promoteUser">
- <span class="btn-label"><i class="fa fa-user-plus"></i></span><?php echo $language->translate("CREATE_USER");?>
- </button>
- </form>
- </div>
- </div>
- </div>
- <div class="small-box">
- <form class="content-form form-inline" name="unregister" id="unregister" action="" method="POST">
-
- <p id="inputUsername"></p>
- <div class="table-responsive">
- <table class="table table-striped">
- <thead>
- <tr>
- <th>#</th>
- <th><?php echo $language->translate("USERNAME");?></th>
- <th><?php echo $language->translate("EMAIL");?></th>
- <th><?php echo $language->translate("LOGIN_STATUS");?></th>
- <th><?php echo $language->translate("LAST_SEEN");?></th>
- <th><?php echo $language->translate("USER_GROUP");?></th>
- <th><?php echo $language->translate("USER_ACTIONS");?></th>
- </tr>
- </thead>
- <tbody>
- <?php $countUsers = 1;
- foreach($gotUsers as $row) :
- if($row['role'] == "admin" && $countUsers == 1) :
- $userColor = "red";
- $disableAction = "disabled=\"disabled\"";
- else :
- $userColor = "blue";
- $disableAction = "";
- endif;
- if($row['active'] == "true") :
- $userActive = $language->translate("LOGGED_IN");
- $userActiveColor = "primary";
- else :
- $userActive = $language->translate("LOGGED_OUT");
- $userActiveColor = "danger";
- endif;
- $userpic = md5( strtolower( trim( $row['email'] ) ) );
- if(!empty($row["last"])) :
- $lastActive = date("Y-m-d H:i", intval($row["last"]));
- else :
- $lastActive = "";
- endif;
- ?>
- <tr id="<?=$row['username'];?>">
- <th scope="row"><?=$countUsers;?></th>
- <td><?php if(GRAVATAR == "true") : ?><i class="userpic"><img src="https://www.gravatar.com/avatar/<?=$userpic;?>?s=25&d=mm" class="img-circle"></i> <?php endif; ?><?=$row['username'];?></td>
- <td><?=$row['email'];?></td>
- <td><span class="label label-<?=$userActiveColor;?>"><?=$userActive;?></span></td>
- <td><?=$lastActive;?></td>
- <td><span class="text-uppercase <?=$userColor;?>"><?=$row['role'];?></span></td>
- <td id="<?=$row['username'];?>">
- <button <?=$disableAction;?> class="btn waves btn-labeled btn-danger btn btn-sm text-uppercase waves-effect waves-float deleteUser">
- <span class="btn-label"><i class="fa fa-user-times"></i></span><?php echo $language->translate("DELETE");?>
- </button>
- <?php if ($row['role'] == "user") : ?>
- <button class="btn waves btn-labeled btn-success btn btn-sm text-uppercase waves-effect waves-float promoteUser">
- <span class="btn-label"><i class="fa fa-arrow-up"></i></span><?php echo $language->translate("PROMOTE");?>
- </button>
- <?php endif; ?>
- <?php if ($row['role'] == "admin") : ?>
- <button <?=$disableAction;?> class="btn waves btn-labeled btn-warning btn btn-sm text-uppercase waves-effect waves-float demoteUser">
- <span class="btn-label"><i class="fa fa-arrow-down"></i></span><?php echo $language->translate("DEMOTE");?>
- </button>
- <?php endif; ?>
- </td>
- </tr>
- <?php $countUsers++; endforeach; ?>
- </tbody>
- </table>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="email-content invites-box white-bg">
- <div class="email-body">
- <div class="email-header gray-bg">
- <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
- <h1>Invite Management</h1>
- </div>
- <div class="email-inner small-box">
- <div class="email-inner-section">
- <div class="small-box fade in" id="useredit">
- <div class="row">
- <div class="col-lg-12">
- <div class="small-box">
- <form class="content-form form-inline" name="inviteNewUser" id="inviteNewUser" action="" method="POST">
- <input type="hidden" name="op" value="invite"/>
- <input type="hidden" name="server" value="plex"/>
- <div class="form-group">
- <input type="text" class="form-control material" name="username" placeholder="<?php echo $language->translate("USERNAME_NAME");?>" autocorrect="off" autocapitalize="off" value="">
- </div>
- <div class="form-group">
- <input type="email" class="form-control material" name="email" placeholder="<?php echo $language->translate("EMAIL");?>" required>
- </div>
- <button type="submit" class="btn waves btn-labeled btn-primary btn btn-sm text-uppercase waves-effect waves-float">
- <span class="btn-label"><i class="fa fa-user-plus"></i></span><?php echo $language->translate("SEND_INVITE");?>
- </button>
- </form>
- </div>
- </div>
- </div>
- <div class="small-box">
-
- <form class="content-form form-inline" name="deleteInviteForm" id="deleteInviteForm" action="" method="POST">
-
- <p id="inputInvite"></p>
- <div class="table-responsive">
- <table class="table table-striped">
- <thead>
- <tr>
- <th>#</th>
- <th><?php echo $language->translate("USERNAME");?></th>
- <th><?php echo $language->translate("EMAIL");?></th>
- <th><?php echo $language->translate("INVITE_CODE");?></th>
- <th><?php echo $language->translate("DATE_SENT");?></th>
- <th><?php echo $language->translate("DATE_USED");?></th>
- <th><?php echo $language->translate("USED_BY");?></th>
- <th><?php echo $language->translate("IP_ADDRESS");?></th>
- <th><?php echo $language->translate("VALID");?></th>
- <th><?php echo $language->translate("DELETE");?></th>
- </tr>
- </thead>
- <tbody><!-- onsubmit="return false;" -->
-
- <?php
- foreach($gotInvites as $row) :
- $validColor = ($row['valid'] == "Yes" ? "primary" : "danger");
- $inviteUser = ($row['username'] != "" ? $row['username'] : "N/A");
- $dateInviteUsed = ($row['dateused'] != "" ? $row['dateused'] : "Not Used");
- $ipUsed = ($row['ip'] != "" ? $row['ip'] : "Not Used");
- $usedBy = ($row['usedby'] != "" ? $row['usedby'] : "Not Used");
-
- ?>
- <tr id="<?=$row['id'];?>">
- <th scope="row"><?=$row['id'];?></th>
- <td><?=$inviteUser;?></td>
- <td><?=$row['email'];?></td>
- <td><span style="font-size: 100%;" class="label label-<?=$validColor;?>"><?=$row['code'];?></span></td>
- <td><?=$row['date'];?></td>
- <td><?=$dateInviteUsed;?></td>
- <td><?=$usedBy;?></td>
- <td style="cursor: pointer" class="ipInfo"><?=$ipUsed;?></td>
- <td><span style="font-size: 100%;" class="label label-<?=$validColor;?>"><?=$row['valid'];?></span></td>
- <td id="<?=$row['id'];?>">
- <button class="btn waves btn-labeled btn-danger btn btn-sm text-uppercase waves-effect waves-float deleteInvite">
- <span class="btn-label"><i class="fa fa-trash"></i></span><?php echo $language->translate("DELETE");?>
- </button>
- </td>
- </tr>
- <?php endforeach; ?>
-
- </tbody>
- </table>
- </div>
-
- </form>
-
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="email-content logs-box white-bg">
- <div class="email-body">
- <div class="email-header gray-bg">
- <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
- <h1>Logs</h1>
- </div>
- <div class="email-inner small-box">
- <div class="email-inner-section">
- <div class="small-box" id="loginlog">
- <div>
- <?php if(file_exists("org.log")){ ?>
- <button id="viewOrgLogs" class="btn waves btn-labeled gray-bg text-uppercase waves-effect waves-float" type="button"><span class="btn-label"><i class="fa fa-terminal"></i></span>Organizr Log </button>
- <?php } if(file_exists(FAIL_LOG)){ ?>
- <button id="viewLoginLogs" class="btn waves btn-labeled grayish-blue-bg text-uppercase waves-effect waves-float" type="button" style="display: none"><span class="btn-label"><i class="fa fa-user"></i></span>Login Log </button>
- <?php } ?>
- </div>
-
- <?php if(file_exists("org.log")){ ?>
- <div id="orgLogTable" class="table-responsive" style="display: none">
- <table id="orgLogs" class="display">
- <thead>
- <tr>
- <th><?php echo $language->translate("DATE");?></th>
- <th><?php echo $language->translate("STATUS");?></th>
- <th><?php echo $language->translate("TYPE");?></th>
- </tr>
- </thead>
- <tbody>
- <?php readLog(); ?>
- </tbody>
- </table>
- </div>
- <?php } ?>
- <div id="loginTable" class="table-responsive">
- <?php if(file_exists(FAIL_LOG)){ ?>
- <div id="loginStats">
- <div class="ultra-widget">
- <div class="w-progress">
- <span id="goodCount" class="w-amount green"></span>
- <span id="badCount" class="w-amount red pull-right">3</span>
- <br>
- <span class="text-uppercase w-name"><?php echo $language->translate("GOOD_LOGINS");?></span>
- <span class="text-uppercase w-name pull-right"><?php echo $language->translate("BAD_LOGINS");?></span>
- </div>
- <div class="progress progress-bar-sm zero-m">
- <div id="goodPercent" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%"></div>
- <div id="badPercent" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"></div>
- </div>
- <div class="w-status clearfix">
- <div id="goodTitle" class="w-status-title pull-left text-uppercase">20%</div>
- <div id="badTitle" class="w-status-number pull-right text-uppercase">80%</div>
- </div>
- </div>
- </div>
- <table id="datatable" class="display">
- <thead>
- <tr>
- <th><?php echo $language->translate("DATE");?></th>
- <th><?php echo $language->translate("USERNAME");?></th>
- <th><?php echo $language->translate("IP_ADDRESS");?></th>
- <th><?php echo $language->translate("TYPE");?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- $getFailLog = str_replace("\r\ndate", "date", file_get_contents(FAIL_LOG));
- $gotFailLog = json_decode($getFailLog, true);
- $goodLogin = 0;
- $badLogin = 0;
- function getColor($colorTest){
- if($colorTest == "bad_auth") :
- $gotColorTest = "danger";
- elseif($colorTest == "good_auth") :
- $gotColorTest = "primary";
- endif;
- echo $gotColorTest;
- }
- foreach (array_reverse($gotFailLog["auth"]) as $key => $val) :
- if($val["auth_type"] == "bad_auth") : $badLogin++; elseif($val["auth_type"] == "good_auth") : $goodLogin++; endif;
- ?>
- <tr>
- <td><?=$val["date"];?></td>
- <td><?=$val["username"];?></td>
- <td style="cursor: pointer" class="ipInfo"><?=$val["ip"];?></td>
- <td><span class="label label-<?php getColor($val["auth_type"]);?>"><?=$val["auth_type"];?></span></td>
- </tr>
- <?php endforeach; ?>
- </tbody>
- </table>
- <?php
- $totalLogin = $goodLogin + $badLogin;
- $goodPercent = round(($goodLogin / $totalLogin) * 100);
- $badPercent = round(($badLogin / $totalLogin) * 100);
- };
- if(!file_exists(FAIL_LOG)){
- echo $language->translate("NOTHING_LOG");
- }
- ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!--End Content-->
- <!-- Modal for IP -->
- <div id="ipModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title" id="ipIp">Modal title</h4>
- </div>
- <div class="modal-body">
- <h3>Hostname: <small id="ipHostname"></small></h3>
- <h3>Location: <small id="ipLocation"></small></h3>
- <h3>Org: <small id="ipOrg"></small></h3>
- <h3>City: <small id="ipCity"></small></h3>
- <h3>Region: <small id="ipRegion"></small></h3>
- <h3>Country: <small id="ipCountry"></small></h3>
- <h3>Phone: <small id="ipPhone"></small></h3>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default waves" data-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div>
- <!-- END IP Modal -->
- <!-- Modal for Plex Token -->
- <div id="plexModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog">
- <div class="modal-dialog modal-lg" role="document">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
- <h4 class="modal-title"><?php echo translate("GET_PLEX_TOKEN"); ?></h4>
- </div>
- <div class="modal-body">
- <div style="display:none" id="plexError" class=""></div>
- <input class="form-control material" placeholder="<?php echo translate("USERNAME"); ?>" type="text" name="plex_username" id="plex_username" value="<?php echo PLEXUSERNAME;?>">
- <input class="form-control material" placeholder="<?php echo translate("PASSWORD"); ?>" type="password" name="plex_password" id="plex_password" value="<?php echo PLEXPASSWORD;?>">
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default waves" data-dismiss="modal"><?php echo translate("CLOSE"); ?></button>
- <button id="getPlexToken" type="button" class="btn btn-success waves waves-effect waves-float"><?php echo translate("GET_PLEX_TOKEN"); ?></button>
- </div>
- </div>
- </div>
- </div>
- <!-- END IP Modal -->
- </div>
- <?php if(isset($_POST['op'])) : ?>
- <script>
-
- parent.notify("<?php echo printArray($USER->info_log); ?>","info-circle","notice","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
-
- <?php if(!empty($USER->error_log)) : ?>
-
- parent.notify("<?php echo printArray($USER->error_log); ?>","exclamation-circle ","error","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
-
- <?php endif; ?>
-
- </script>
- <?php endif; ?>
- <script>
- //IP INFO
- $(".ipInfo").click(function(){
- $.getJSON("https://ipinfo.io/"+$(this).text()+"/?token=<?php echo IPINFOTOKEN;?>", function (response) {
- $('#ipModal').modal('show');
- $('#ipIp').text("IP Info for: "+response.ip);
- $('#ipHostname').text(response.hostname);
- $('#ipLocation').text(response.loc);
- $('#ipOrg').text(response.org);
- $('#ipCity').text(response.city);
- $('#ipRegion').text(response.region);
- $('#ipCountry').text(response.country);
- $('#ipPhone').text(response.phone);
- console.log(response);
- });
- });
- // Plex.tv auth token fetch
- $("#openPlexModal").click(function() {
- $('#plexModal').modal('show');
- });
- $("#getPlexToken").click(function() {
- $('#plexError').show();
- $('#plexError').addClass("well well-sm yellow-bg");
- $('#plexError').text("Grabbing Token");
- var plex_username = $("#plex_username").val().trim();
- var plex_password = $("#plex_password").val().trim();
- if ((plex_password !== '') && (plex_password !== '')) {
- $.ajax({
- type: 'POST',
- headers: {
- 'X-Plex-Product':'Organizr',
- 'X-Plex-Version':'1.0',
- 'X-Plex-Client-Identifier':'01010101-10101010'
- },
- url: 'https://plex.tv/users/sign_in.json',
- data: {
- 'user[login]': plex_username,
- 'user[password]': plex_password,
- force: true
- },
- cache: false,
- async: true,
- complete: function(xhr, status) {
- var result = $.parseJSON(xhr.responseText);
- if (xhr.status === 201) {
- $('#plexError').removeClass();
- $('#plexError').addClass("well well-sm green-bg");
- $('#plexError').show();
- $('#plexError').text(xhr.statusText);
- $("#plexToken_id").val(result.user.authToken);
- $("#plexToken_id").attr('data-changed', 'true');
- $('#plexModal').modal('hide');
- } else {
- $('#plexError').removeClass();
- $('#plexError').addClass("well well-sm red-bg");
- $('#plexError').show();
- $('#plexError').text(xhr.statusText);
- }
- }
- });
- } else {
- $('#plexError').text("Enter Username and Password");
- }
- });
- //Generate API
- function generateCode() {
- var code = "";
- var possible = "abcdefghijklmnopqrstuvwxyz0123456789";
- for (var i = 0; i < 20; i++)
- code += possible.charAt(Math.floor(Math.random() * possible.length));
- return code;
- }
- function performUpdate(){
- $('#updateStatus').show();
- setTimeout(function(){
- $('#updateStatusBar').attr("style", "width: 1%");
- setTimeout(function(){
- $('#updateStatusBar').attr("style", "width: 20%");
- setTimeout(function(){
- $('#updateStatusBar').attr("style", "width: 35%");
- setTimeout(function(){
- $('#updateStatusBar').attr("style", "width: 50%");
- setTimeout(function(){
- $('#updateStatusBar').attr("style", "width: 65%");
- setTimeout(function(){
- $('#updateStatusBar').attr("style", "width: 80%");
- setTimeout(function(){
- $('#updateStatusBar').attr("style", "width: 95%");
- setTimeout(function(){
- $('#updateStatusBar').attr("style", "width: 100%");
- }, 4000);
- }, 3500);
- }, 3000);
- }, 2500);
- }, 2000);
- }, 1500);
- }, 1000);
- }, 100);
- }
- $(function () {
- //Data Tables
- $('#datatable').DataTable({
- displayLength: 10,
- dom: 'T<"clear">lfrtip',
- responsive: true,
- "order": [[ 0, 'desc' ]],
- "language": {
- "info": "<?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 0);?> _START_ <?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 1);?> _END_ <?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 2);?> _TOTAL_ <?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 3);?>",
- "infoEmpty": "<?php echo $language->translate('NO_ENTRIES');?>",
- "infoFiltered": "<?php echo explosion($language->translate('FILTERED'), 0);?> _MAX_ <?php echo explosion($language->translate('FILTERED'), 1);?>",
- "lengthMenu": "<?php echo $language->translate('SHOW');?> _MENU_ <?php echo $language->translate('ENTRIES');?>",
- "search": "",
- "searchPlaceholder": "<?php echo $language->translate('SEARCH');?>",
- "searchClass": "<?php echo $language->translate('SEARCH');?>",
- "zeroRecords": "<?php echo $language->translate('NO_MATCHING');?>",
- "paginate": {
- "next": "<?php echo $language->translate('NEXT');?>",
- "previous": "<?php echo $language->translate('PREVIOUS');?>",
- }
- }
- });
- });
-
- $(function () {
- //Data Tables
- $('#orgLogs').DataTable({
- displayLength: 10,
- dom: 'T<"clear">lfrtip',
- responsive: true,
- "order": [[ 0, 'desc' ]],
- "language": {
- "info": "<?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 0);?> _START_ <?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 1);?> _END_ <?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 2);?> _TOTAL_ <?php echo explosion($language->translate('SHOW_ENTRY_CURRENT'), 3);?>",
- "infoEmpty": "<?php echo $language->translate('NO_ENTRIES');?>",
- "infoFiltered": "<?php echo explosion($language->translate('FILTERED'), 0);?> _MAX_ <?php echo explosion($language->translate('FILTERED'), 1);?>",
- "lengthMenu": "<?php echo $language->translate('SHOW');?> _MENU_ <?php echo $language->translate('ENTRIES');?>",
- "search": "",
- "searchPlaceholder": "<?php echo $language->translate('SEARCH');?>",
- "searchClass": "<?php echo $language->translate('SEARCH');?>",
- "zeroRecords": "<?php echo $language->translate('NO_MATCHING');?>",
- "paginate": {
- "next": "<?php echo $language->translate('NEXT');?>",
- "previous": "<?php echo $language->translate('PREVIOUS');?>",
- }
- }
- });
- });
- </script>
- <script>
- (function($) {
- function startTrigger(e,data) {
- var $elem = $(this);
- $elem.data('mouseheld_timeout', setTimeout(function() {
- $elem.trigger('mouseheld');
- }, e.data));
- }
- function stopTrigger() {
- var $elem = $(this);
- clearTimeout($elem.data('mouseheld_timeout'));
- }
- var mouseheld = $.event.special.mouseheld = {
- setup: function(data) {
- var $this = $(this);
- $this.bind('mousedown', +data || mouseheld.time, startTrigger);
- $this.bind('mouseleave mouseup', stopTrigger);
- },
- teardown: function() {
- var $this = $(this);
- $this.unbind('mousedown', startTrigger);
- $this.unbind('mouseleave mouseup', stopTrigger);
- },
- time: 200 // default to 750ms
- };
- })(jQuery);
- $(function () {
-
- $('.summernote').summernote({
- height: 120,
- codemirror: { // codemirror options
- mode: 'text/html',
- htmlMode: true,
- lineNumbers: true,
- theme: 'monokai'
- }
- });
- // summernote.change
- $('.summernote').on('summernote.change', function(we, contents, $editable) {
- $(this).attr('data-changed', 'true');
- });
- //$(".todo ul").sortable();
- $(".todo ul").sortable({
- 'opacity': 0.9,
- });
- $("#submitTabs").on('submit', function (e) {
- console.log('disabled this func')
- return false;
- });
- $('#apply').on('click touchstart', function(){
- window.parent.location.reload();
- });
- });
- </script>
- <script>
- $("#iconHide").click(function(){
- $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).toggle();
- });
- $("#iconAll").click(function(){
- $( "div[id^='viewAllIcons']" ).toggle();
- });
- $("#deleteToggle").click(function(){
- $( "#deleteDiv" ).toggle();
- });
- $(".deleteInvite").click(function(){
- var parent_id = $(this).parent().attr('id');
- editUsername = $('#deleteInviteForm').find('#inputInvite');
- $(editUsername).html('<input type="hidden" name="op" value="deleteinvite"/><input type="hidden" name="id"value="' + parent_id + '" />');
- });
- $(".deleteUser").click(function(){
- var parent_id = $(this).parent().attr('id');
- editUsername = $('#unregister').find('#inputUsername');
- $(editUsername).html('<input type="hidden" name="op" value="unregister"/><input type="hidden" name="username"value="' + parent_id + '" />');
- });
- $(".promoteUser").click(function(){
- var parent_ids = $(this).parent().attr('id');
- editUsername = $('#unregister').find('#inputUsername');
- $(editUsername).html('<input type="hidden" name="op" value="update"/><input type="hidden" name="role" value="admin"/><input type="hidden" name="username"value="' + parent_ids + '" />');
- });
- $(".demoteUser").click(function(){
- var parent_idz = $(this).parent().attr('id');
- editUsername = $('#unregister').find('#inputUsername');
- $(editUsername).html('<input type="hidden" name="op" value="update"/><input type="hidden" name="role" value="user"/><input type="hidden" name="username"value="' + parent_idz + '" />');
- });
- $("#viewOrgLogs, #viewLoginLogs").click(function(){
- $('#orgLogTable').toggle();
- $('#loginTable').toggle();
- $('#viewOrgLogs').toggle();
- $('#viewLoginLogs').toggle();
- });
- $('#showLess').hide();
- $('#loadMore').click(function () {
- x= (x+5 <= size_li) ? x+5 : size_li;
- $('#versionHistory li:lt('+x+')').show();
- $('#showLess').show();
- if(x == size_li){
- $('#loadMore').hide();
- }
- });
- $('#showLess').click(function () {
- $('#versionHistory li').not(':lt(2)').hide();
- $('#loadMore').show();
- $('#showLess').hide();
- });
- $('.icp-auto').iconpicker({placement: 'left', hideOnSelect: false, collision: true});
- $("li[class^='list-group-item']").bind('mouseheld', function(e) {
- $(this).find("span[class^='fa fa-hand-paper-o']").attr("class", "fa fa-hand-grab-o");
- $(this).addClass("dragging");
- $(this).find("div[class^='action-btns tabIconView']").addClass("animated swing");
- $(this).mouseup(function() {
- $(this).find("span[class^='fa fa-hand-grab-o']").attr("class", "fa fa-hand-paper-o");
- $(this).removeClass("dragging");
- $(this).find("div[class^='action-btns tabIconView']").removeClass("animated swing");
- });
- });
- function copyToClipboard(elem) {
- // create hidden text element, if it doesn't already exist
- var targetId = "_hiddenCopyText_";
- var isInput = elem.tagName === "INPUT" || elem.tagName === "TEXTAREA";
- var origSelectionStart, origSelectionEnd;
- if (isInput) {
- // can just use the original source element for the selection and copy
- target = elem;
- origSelectionStart = elem.selectionStart;
- origSelectionEnd = elem.selectionEnd;
- } else {
- // must use a temporary form element for the selection and copy
- target = document.getElementById(targetId);
- if (!target) {
- var target = document.createElement("textarea");
- target.style.position = "absolute";
- target.style.left = "-9999px";
- target.style.top = "0";
- target.id = targetId;
- document.body.appendChild(target);
- }
- target.textContent = elem.textContent;
- }
- // select the content
- var currentFocus = document.activeElement;
- target.focus();
- target.setSelectionRange(0, target.value.length);
- // copy the selection
- var succeed;
- try {
- succeed = document.execCommand("copy");
- } catch(e) {
- succeed = false;
- }
- // restore original focus
- if (currentFocus && typeof currentFocus.focus === "function") {
- //currentFocus.focus();
- }
- if (isInput) {
- // restore prior selection
- elem.setSelectionRange(origSelectionStart, origSelectionEnd);
- } else {
- // clear temporary content
- target.textContent = "";
- }
- return succeed;
- }
- $("img[class^='allIcons']").click(function(){
- $("textarea[id^='copyTarget']").val($(this).attr("src"));
- copyToClipboard(document.getElementById("copyTarget"));
- parent.notify("<?php echo $language->translate('ICON_COPY');?>","clipboard","success","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
- $( "div[id^='viewAllIcons']" ).toggle();
- });
- $('body').on('click', 'b.allIcons', function() {
- $("textarea[id^='copyTarget2']").val($(this).attr("title"));
- copyToClipboard(document.getElementById("copyTarget2"));
- parent.notify("<?php echo $language->translate('ICON_COPY');?>","clipboard","success","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
- $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).hide();
- });
- </script>
- <script>
- //TestEmail
- function isUpperCase(str) {
- return str === str.toUpperCase();
- }
- $('#smtpHostAuth_id').change(function() {
- if($('#smtpHostAuth_id').attr("data-value") == "true"){
- $('#smtpHostAuth_id').attr("data-value", "false");
- }else{
- $('#smtpHostAuth_id').attr("data-value", "true");
- }
- });
- $('#testEmail').on('click', function () {
- var password = '';
- if(isUpperCase($('#smtpHostPassword_id').val())){
- password = '<?php echo SMTPHOSTPASSWORD; ?>';
- }else{
- password = $('#smtpHostPassword_id').val();
- }
- console.log("starting");
- ajax_request('POST', 'test-email', {
- emailto: '<?php echo $USER->email;?>',
- emailhost: $('#smtpHost_id').val(),
- emailport: $('#smtpHostPort_id').val(),
- emailusername: $('#smtpHostUsername_id').val(),
- emailpassword: password,
- emailsendername: $('#smtpHostSenderName_id').val(),
- emailsenderemail: $('#smtpHostSenderEmail_id').val(),
- emailtype: $('#smtpHostType_id').val(),
- emailauth: $('#smtpHostAuth_id').attr("data-value"),
- });
- console.log("ajax done");
- });
- //Custom Themes
- function changeColor(elementName, elementColor) {
- var definedElement = document.getElementById(elementName);
- definedElement.focus();
- definedElement.value = elementColor;
- definedElement.style.backgroundColor = elementColor;
- $(definedElement).trigger('change');
- }
- $('#plexTheme').on('click touchstart', function(){
- changeColor("topbartext", "#E49F0C");
- changeColor("topbar", "#000000");
- changeColor("bottombar", "#000000");
- changeColor("sidebar", "#121212");
- changeColor("hoverbg", "#FFFFFF");
- changeColor("activetabBG", "#E49F0C");
- changeColor("activetabicon", "#FFFFFF");
- changeColor("activetabtext", "#FFFFFF");
- changeColor("inactiveicon", "#949494");
- changeColor("inactivetext", "#B8B8B8");
- changeColor("loading", "#E49F0C");
- changeColor("hovertext", "#000000");
- });
- $('#embyTheme').on('click touchstart', function(){
- changeColor("topbartext", "#52B54B");
- changeColor("topbar", "#212121");
- changeColor("bottombar", "#212121");
- changeColor("sidebar", "#121212");
- changeColor("hoverbg", "#FFFFFF");
- changeColor("activetabBG", "#52B54B");
- changeColor("activetabicon", "#FFFFFF");
- changeColor("activetabtext", "#FFFFFF");
- changeColor("inactiveicon", "#949494");
- changeColor("inactivetext", "#B8B8B8");
- changeColor("loading", "#52B54B");
- changeColor("hovertext", "#000000");
- });
- $('#bookTheme').on('click touchstart', function(){
- changeColor("topbartext", "#FFFFFF");
- changeColor("topbar", "#3B5998");
- changeColor("bottombar", "#3B5998");
- changeColor("sidebar", "#8B9DC3");
- changeColor("hoverbg", "#FFFFFF");
- changeColor("activetabBG", "#3B5998");
- changeColor("activetabicon", "#FFFFFF");
- changeColor("activetabtext", "#FFFFFF");
- changeColor("inactiveicon", "#DFE3EE");
- changeColor("inactivetext", "#DFE3EE");
- changeColor("loading", "#FFFFFF");
- changeColor("hovertext", "#000000");
- });
- $('#spaTheme').on('click touchstart', function(){
- changeColor("topbartext", "#5B391E");
- changeColor("topbar", "#66BBAE");
- changeColor("bottombar", "#66BBAE");
- changeColor("sidebar", "#C3EEE7");
- changeColor("hoverbg", "#66BBAE");
- changeColor("activetabBG", "#C6C386");
- changeColor("activetabicon", "#FFFFFF");
- changeColor("activetabtext", "#FFFFFF");
- changeColor("inactiveicon", "#5B391E");
- changeColor("inactivetext", "#5B391E");
- changeColor("loading", "#5B391E");
- changeColor("hovertext", "#000000");
- });
- $('#darklyTheme').on('click touchstart', function(){
- changeColor("topbartext", "#FFFFFF");
- changeColor("topbar", "#375A7F");
- changeColor("bottombar", "#375A7F");
- changeColor("sidebar", "#222222");
- changeColor("hoverbg", "#464545");
- changeColor("activetabBG", "#FFFFFF");
- changeColor("activetabicon", "#464545");
- changeColor("activetabtext", "#464545");
- changeColor("inactiveicon", "#0CE3AC");
- changeColor("inactivetext", "#0CE3AC");
- changeColor("loading", "#FFFFFF");
- changeColor("hovertext", "#000000");
- });
- $('#slateTheme').on('click touchstart', function(){
- changeColor("topbartext", "#C8C8C8");
- changeColor("topbar", "#272B30");
- changeColor("bottombar", "#272B30");
- changeColor("sidebar", "#32383E");
- changeColor("hoverbg", "#58C0DE");
- changeColor("activetabBG", "#3E444C");
- changeColor("activetabicon", "#C8C8C8");
- changeColor("activetabtext", "#FFFFFF");
- changeColor("inactiveicon", "#C8C8C8");
- changeColor("inactivetext", "#C8C8C8");
- changeColor("loading", "#C8C8C8");
- changeColor("hovertext", "#000000");
- });
- $('#defaultTheme').on('click touchstart', function(){
- changeColor("topbartext", "#FFFFFF");
- changeColor("topbar", "#eb6363");
- changeColor("bottombar", "#eb6363");
- changeColor("sidebar", "#000000");
- changeColor("hoverbg", "#eb6363");
- changeColor("activetabBG", "#eb6363");
- changeColor("activetabicon", "#FFFFFF");
- changeColor("activetabtext", "#FFFFFF");
- changeColor("inactiveicon", "#FFFFFF");
- changeColor("inactivetext", "#FFFFFF");
- changeColor("loading", "#FFFFFF");
- changeColor("hovertext", "#000000");
- });
- $('#redTheme').on('click touchstart', function(){
- changeColor("topbartext", "#FFFFFF");
- changeColor("topbar", "#eb6363");
- changeColor("bottombar", "#eb6363");
- changeColor("sidebar", "#000000");
- changeColor("hoverbg", "#eb6363");
- changeColor("activetabBG", "#eb6363");
- changeColor("activetabicon", "#FFFFFF");
- changeColor("activetabtext", "#FFFFFF");
- changeColor("inactiveicon", "#FFFFFF");
- changeColor("inactivetext", "#FFFFFF");
- changeColor("loading", "#FFFFFF");
- changeColor("hovertext", "#000000");
- });
- $('#monokaiTheme').on('click touchstart', function(){
- changeColor("topbartext", "#66D9EF");
- changeColor("topbar", "#333333");
- changeColor("bottombar", "#333333");
- changeColor("sidebar", "#393939");
- changeColor("hoverbg", "#AD80FD");
- changeColor("activetabBG", "#F92671");
- changeColor("activetabicon", "#FFFFFF");
- changeColor("activetabtext", "#FFFFFF");
- changeColor("inactiveicon", "#66D9EF");
- changeColor("inactivetext", "#66D9EF");
- changeColor("loading", "#66D9EF");
- changeColor("hovertext", "#000000");
- });
- $('#thejokerTheme').on('click touchstart', function(){
- changeColor("topbartext", "#CCCCCC");
- changeColor("topbar", "#000000");
- changeColor("bottombar", "#000000");
- changeColor("sidebar", "#121212");
- changeColor("hoverbg", "#CCC6CC");
- changeColor("activetabBG", "#A50CB0");
- changeColor("activetabicon", "#FFFFFF");
- changeColor("activetabtext", "#FFFFFF");
- changeColor("inactiveicon", "#949494");
- changeColor("inactivetext", "#B8B8B8");
- changeColor("loading", "#CCCCCC");
- changeColor("hovertext", "#000000");
- });
- $('#newPlexTheme').on('click touchstart', function(){
- changeColor("topbartext", "#E5A00D");
- changeColor("topbar", "#282A2D");
- changeColor("bottombar", "#282A2D");
- changeColor("sidebar", "#3F4245");
- changeColor("hoverbg", "#E5A00D");
- changeColor("activetabBG", "#282A2D");
- changeColor("activetabicon", "#E5A00D");
- changeColor("activetabtext", "#E5A00D");
- changeColor("inactiveicon", "#F9F9F9");
- changeColor("inactivetext", "#F9F9F9");
- changeColor("loading", "#E5A00D");
- changeColor("hovertext", "#E0E3E6");
- });//$( "div" ).not( ".green, #blueone" )
- $('textarea').not( ".no-code" ).numberedtextarea({
- // font color for line numbers
- color: null,
- // border color
- borderColor: 'null',
- // CSS class to be added to the line numbers
- class: null,
- // if true Tab key creates indentation
- allowTabChar: true,
- });
- $(".email-header .close-button").click(function () {
- $(".email-content").removeClass("email-active");
- $('html').removeClass("overhid");
- $("#settings-list").find("li").removeClass("active");
- });
- $(document).mouseup(function (e)
- {
- var container = $(".email-content, .checkFrame, .scroller-body");
- if (!container.is(e.target) && container.has(e.target).length === 0) {
- $(".email-content").removeClass("email-active");
- $('html').removeClass("overhid");
- $("#settings-list").find("li").removeClass("active");
- }
- });
- $( document ).on( 'keydown', function ( e ) {
- if ( e.keyCode === 27 ) { // ESC
- var container = $(".email-content");
- if (!container.is(e.target) && container.has(e.target).length === 0) {
- $(".email-content").removeClass("email-active");
- $('html').removeClass("overhid");
- $("#settings-list").find("li").removeClass("active");
- }
- }
- });
-
-
- $("#open-info, #open-users, #open-logs, #open-advanced, #open-homepage, #open-colors, #open-tabs, #open-donate, #open-invites ").on("click",function (e) {
- $(".email-content").removeClass("email-active");
- $('html').removeClass("overhid");
- if($(window).width() < 768){
- $('html').addClass("overhid");
- }
- var settingsBox = $('.'+$(this).attr("box"));
- console.log($(this).attr("box"))
- settingsBox.addClass("email-active");
- $("#settings-list").find("li").removeClass("active");
- $(this).parent().addClass("active");
- $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
- setTimeout(function(){
- var refreshMailPreloader = settingsBox.find('.refresh-preloader'),
- deletedMailBox = refreshMailPreloader.fadeOut(300, function(){
- refreshMailPreloader.remove();
- });
- },600);
- e.preventDefault();
- });
-
-
-
- function checkGithub() {
- $.ajax({
- type: "GET",
- url: "https://api.github.com/repos/causefx/Organizr/releases",
- dataType: "json",
- success: function(github) {
- var currentVersion = "<?php echo INSTALLEDVERSION;?>";
- infoTabVersion = $('#about').find('#version');
- infoTabVersionHistory = $('#about').find('#versionHistory');
- infoTabNew = $('#about').find('#whatsnew');
- infoTabDownload = $('#about').find('#downloadnow');
- $.each(github, function(i,v) {
- if(i === 0){
- console.log(v.tag_name);
- githubVersion = v.tag_name;
- githubDescription = v.body;
- githubName = v.name;
- }
- $(infoTabVersionHistory).append('<li style="display: none"><time class="cbp_tmtime" datetime="' + v.published_at + '"><span>' + v.published_at.substring(0,10) + '</span> <span>' + v.tag_name + '</span></time><div class="cbp_tmicon animated jello"><i class="fa fa-github-alt"></i></div><div class="cbp_tmlabel"><h2 class="text-uppercase">' + v.name + '</h2><p>' + v.body + '</p></div></li>');
- size_li = $("#versionHistory li").size();
- x=2;
- $('#versionHistory li:lt('+x+')').show();
- });
- if(currentVersion < githubVersion){
- console.log("You Need To Upgrade");
- parent.notify("<strong><?php echo $language->translate("NEW_VERSION");?></strong> <?php echo $language->translate("CLICK_INFO");?>","arrow-circle-o-down","warning","50000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
- $(infoTabNew).html("<br/><h4><strong><?php echo $language->translate("WHATS_NEW");?> " + githubVersion + "</strong></h4><strong><?php echo $language->translate("TITLE");?>: </strong>" + githubName + " <br/><strong><?php echo $language->translate("CHANGES");?>: </strong>" + githubDescription);
- <?php if (extension_loaded("ZIP")){?>
- $(infoTabDownload).html("<br/><form style=\"display:initial;\" id=\"upgradeOrg\" method=\"post\" onsubmit=\"performUpdate(); ajax_request(\'POST\', \'upgradeInstall\'); return false;\"><input type=\"hidden\" name=\"action\" value=\"upgrade\" /><button class=\"btn waves btn-labeled btn-success text-uppercase waves-effect waves-float\" type=\"submit\"><span class=\"btn-label\"><i class=\"fa fa-refresh\"></i></span><?php echo $language->translate("AUTO_UPGRADE");?></button></form> <a href='https://github.com/causefx/Organizr/archive/master.zip' target='_blank' type='button' class='btn waves btn-labeled btn-success text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-download'></i></span>Organizr v." + githubVersion + "</a>");
- $( "p[id^='upgrade']" ).toggle();
- <?php }else{ ?>
- $(infoTabDownload).html("<br/><a href='https://github.com/causefx/Organizr/archive/master.zip' target='_blank' type='button' class='btn waves btn-labeled btn-success text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-download'></i></span>Organizr v." + githubVersion + "</a>");
- $( "p[id^='upgrade']" ).toggle();
- <?php } ?>
- }else if(currentVersion === githubVersion){
- console.log("You Are on Current Version");
- }else{
- console.log("something went wrong");
- }
- $(infoTabVersion).html("<strong><?php echo $language->translate("INSTALLED_VERSION");?>: </strong>" + currentVersion + " <strong><?php echo $language->translate("CURRENT_VERSION");?>: </strong>" + githubVersion + " <strong><?php echo $language->translate("DATABASE_PATH");?>: </strong> <?php echo htmlentities(DATABASE_LOCATION);?>");
- }
- });
- }
- </script>
- <script>
- $( document ).ready(function() {
- //AJAX Submit for URL Check
- $('#urlTestForm_submit').on('click', function () {
- ajax_request('POST', 'check-url', {
- checkurl: $('#urlTestForm [name=url-test]').val(),
- });
- });
- //Hide Icon box on load
- $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).hide();
- //Set Some Scrollbars
- $(".note-editable panel-body").niceScroll({
- railpadding: {top:0,right:0,left:0,bottom:0}
- });
- $(".scroller-body").niceScroll({
- railpadding: {top:0,right:0,left:0,bottom:0}
- });
- $(".email-content").niceScroll({
- railpadding: {top:0,right:0,left:0,bottom:0}
- });
- $("textarea").niceScroll({
- railpadding: {top:0,right:0,left:0,bottom:0}
- });
- $(".iconpicker-items").niceScroll({
- railpadding: {top:0,right:0,left:0,bottom:0}
- });
- //Stop Div behind From Scrolling
- $( '.email-content' ).on( 'mousewheel', function ( e ) {
- e.preventDefault();
- }, false);
- //Set Hide Function
- if (0) {
- var authTypeFunc = function() {
- // Hide Everything
- $('#host-selected, #host-other, #host-plex, #host-emby, #host-ldap').hide();
- // Qualify Auth Type
- if($('#authType').val() !== "internal"){
- $( '#host-selected' ).show();
- // Qualify aithBackend
- if($('#authBackend').val() === "plex"){
- $('#host-selected, #host-plex').show();
- }else if($('#authBackend').val().indexOf("emby")>=0){
- $('#host-selected, #host-other, #host-emby').show();
- }else if($('#authBackend').val() === "ldap"){
- $('#host-selected, #host-other, #host-ldap').show();
- }else {
- $('#host-selected, #host-other').show();
- }
- }
- }
- //Hide Settings on selection
- $('#authType, #authBackend').on('change', authTypeFunc);
- //Hide Settings on Load
- authTypeFunc();
- } else { console.log() }
- //Simulate Edit Tabs Click
- //$("#open-tabs").trigger("click");
- //Append Delete log to User Logs and Org Logs
- $("#datatable_wrapper > div[class^='DTTT_container']").append('<form style="display: inline; margin-left: 3px;" id="deletelog" method="post" onsubmit="ajax_request(\'POST\', \'deleteLog\'); return false;"><input type="hidden" name="action" value="deleteLog" /><button class="btn waves btn-labeled btn-danger text-uppercase waves-effect waves-float" type="submit"><span class="btn-label"><i class="fa fa-trash"></i></span><?php echo $language->translate("PURGE_LOG");?> </button></form>');
- $("#orgLogs_wrapper > div[class^='DTTT_container']").append('<form style="display: inline; margin-left: 3px;" id="deleteOrglog" method="post" onsubmit="ajax_request(\'POST\', \'deleteOrgLog\'); return false;"><input type="hidden" name="action" value="deleteOrgLog" /><button class="btn waves btn-labeled btn-danger text-uppercase waves-effect waves-float" type="submit"><span class="btn-label"><i class="fa fa-trash"></i></span><?php echo $language->translate("PURGE_LOG");?> </button></form>')
- $("a[id^='ToolTables_datatable_0'] span").html('<?php echo $language->translate("PRINT");?>')
- //Enable Tooltips
- $('[data-toggle="tooltip"]').tooltip();
- //AJAX call to github to get version info
- <?php if (GIT_CHECK == "true") { echo 'checkGithub()'; } ?>
- //Edit Info tab with Github info
- <?php if(file_exists(FAIL_LOG)) : ?>
- goodCount = $('#loginStats').find('#goodCount');
- goodPercent = $('#loginStats').find('#goodPercent');
- goodTitle = $('#loginStats').find('#goodTitle');
- badCount = $('#loginStats').find('#badCount');
- badPercent = $('#loginStats').find('#badPercent');
- badTitle = $('#loginStats').find('#badTitle');
- $(goodCount).html("<?php echo $goodLogin;?>");
- $(goodTitle).html("<?php echo $goodPercent;?>%");
- $(goodPercent).attr('aria-valuenow', "<?php echo $goodPercent;?>");
- $(goodPercent).attr('style', "width: <?php echo $goodPercent;?>%");
- $(badCount).html("<?php echo $badLogin;?>");
- $(badTitle).html("<?php echo $badPercent;?>%");
- $(badPercent).attr('aria-valuenow', "<?php echo $badPercent;?>");
- $(badPercent).attr('style', "width: <?php echo $badPercent;?>%");
- <?php endif; ?>
- });
- </script>
- </body>
- </html>
|