4
0

settings.php 187 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186
  1. <?php
  2. // Include functions if not already included
  3. require_once('functions.php');
  4. // Upgrade environment
  5. upgradeCheck();
  6. // Lazyload settings
  7. $databaseConfig = configLazy('config/config.php');
  8. // Load USER
  9. require_once("user.php");
  10. $USER = new User("registration_callback");
  11. $group = $USER->role;
  12. // Create Database Connection
  13. $file_db = new PDO('sqlite:'.DATABASE_LOCATION.'users.db');
  14. $file_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  15. // Some PHP config stuff
  16. ini_set("display_errors", 1);
  17. ini_set("error_reporting", E_ALL | E_STRICT);
  18. // Confirm Access
  19. qualifyUser('admin', true);
  20. // Load User List
  21. $gotUsers = $file_db->query('SELECT * FROM users');
  22. // Load Invite List
  23. $gotInvites = $file_db->query('SELECT * FROM invites');
  24. // Load Colours/Appearance
  25. foreach(loadAppearance() as $key => $value) {
  26. $$key = $value;
  27. }
  28. // Slimbar
  29. if(SLIMBAR == "true") {
  30. $slimBar = "30";
  31. $userSize = "25";
  32. } else {
  33. $slimBar = "56";
  34. $userSize = "40";
  35. }
  36. //Theme Info
  37. $themeName = (!empty(INSTALLEDTHEME) ? explode("-", INSTALLEDTHEME)[0] : null);
  38. $themeVersion = (!empty(INSTALLEDTHEME) ? explode("-", INSTALLEDTHEME)[1] : null);
  39. ?>
  40. <!DOCTYPE html>
  41. <html lang="en" class="no-js">
  42. <head>
  43. <meta charset="UTF-8">
  44. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  45. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  46. <meta name="msapplication-tap-highlight" content="no" />
  47. <title>Settings</title>
  48. <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css?v=<?php echo INSTALLEDVERSION; ?>">
  49. <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
  50. <link rel="stylesheet" href="bower_components/mdi/css/materialdesignicons.min.css">
  51. <link rel="stylesheet" href="bower_components/metisMenu/dist/metisMenu.min.css">
  52. <link rel="stylesheet" href="bower_components/Waves/dist/waves.min.css">
  53. <link rel="stylesheet" href="bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css">
  54. <link rel="stylesheet" href="js/selects/cs-select.css">
  55. <link rel="stylesheet" href="js/selects/cs-skin-elastic.css">
  56. <link rel="stylesheet" href="bower_components/iconpick/dist/css/fontawesome-iconpicker.min.css">
  57. <link rel="stylesheet" href="bower_components/google-material-color/dist/palette.css">
  58. <link rel="stylesheet" href="bower_components/sweetalert/dist/sweetalert.css">
  59. <link rel="stylesheet" href="bower_components/smoke/dist/css/smoke.min.css">
  60. <link rel="stylesheet" href="bower_components/animate.css/animate.min.css">
  61. <link rel="stylesheet" href="bower_components/DataTables/media/css/jquery.dataTables.css">
  62. <link rel="stylesheet" href="bower_components/datatables-tabletools/css/dataTables.tableTools.css">
  63. <link rel="stylesheet" href="bower_components/numbered/jquery.numberedtextarea.css">
  64. <link rel="stylesheet" href="css/style.css?v=<?php echo INSTALLEDVERSION; ?>">
  65. <link rel="stylesheet" href="bower_components/summernote/dist/summernote.css">
  66. <link rel="stylesheet" href="css/jquery.filer.css">
  67. <link rel="stylesheet" href="css/jquery.filer-dragdropbox-theme.css">
  68. <link rel="stylesheet" href="bower_components/morris.js/morris.css">
  69. <link rel="stylesheet" href="css/settings.css?v=<?php echo INSTALLEDVERSION; ?>">
  70. <!--[if lt IE 9]>
  71. <script src="bower_components/html5shiv/dist/html5shiv.min.js"></script>
  72. <script src="bower_components/respondJs/dest/respond.min.js"></script>
  73. <![endif]-->
  74. <!--Scripts-->
  75. <script src="js/menu/modernizr.custom.js"></script>
  76. <script src="js/sha1.js"></script>
  77. <script src="js/user.js"></script>
  78. <script src="bower_components/jquery/dist/jquery.min.js"></script>
  79. <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
  80. <script src="bower_components/metisMenu/dist/metisMenu.min.js"></script>
  81. <script src="bower_components/Waves/dist/waves.min.js"></script>
  82. <script src="bower_components/moment/min/moment.min.js"></script>
  83. <script src="bower_components/jquery.nicescroll/jquery.nicescroll.min.js?v=<?php echo INSTALLEDVERSION; ?>"></script>
  84. <script src="bower_components/slimScroll/jquery.slimscroll.min.js"></script>
  85. <script src="bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js"></script>
  86. <script src="bower_components/cta/dist/cta.min.js"></script>
  87. <!--Menu-->
  88. <script src="js/menu/classie.js"></script>
  89. <script src="bower_components/iconpick/dist/js/fontawesome-iconpicker.js"></script>
  90. <!--Selects-->
  91. <script src="js/selects/selectFx.js"></script>
  92. <script src="js/jscolor.js"></script>
  93. <script src="bower_components/sweetalert/dist/sweetalert.min.js"></script>
  94. <script src="bower_components/smoke/dist/js/smoke.min.js"></script>
  95. <script src="bower_components/numbered/jquery.numberedtextarea.js"></script>
  96. <!--Other-->
  97. <script src="js/ajax.js?v=<?php echo INSTALLEDVERSION; ?>"></script>
  98. <script src="bower_components/raphael/raphael-min.js"></script>
  99. <script src="bower_components/morris.js/morris.min.js"></script>
  100. <!--Notification-->
  101. <script src="js/notifications/notificationFx.js"></script>
  102. <script src="js/jqueri_ui_custom/jquery-ui.min.js"></script>
  103. <script src="js/jquery.filer.min.js" type="text/javascript"></script>
  104. <script src="js/custom.js?v=<?php echo INSTALLEDVERSION; ?>" type="text/javascript"></script>
  105. <script src="js/jquery.mousewheel.min.js" type="text/javascript"></script>
  106. <!--Data Tables-->
  107. <script src="bower_components/DataTables/media/js/jquery.dataTables.js"></script>
  108. <script src="bower_components/datatables.net-responsive/js/dataTables.responsive.js"></script>
  109. <script src="bower_components/datatables-tabletools/js/dataTables.tableTools.js"></script>
  110. <!--Summernote-->
  111. <script src="bower_components/summernote/dist/summernote.min.js"></script>
  112. <!--Other-->
  113. <script src="js/lazyload.min.js"></script>
  114. <script>
  115. function addTab() {
  116. var idNumber = Math.round(Math.random() * 999999999) + 1000000000;
  117. var $element = $('#tab-new').clone();
  118. $element.css('display','block');
  119. $element.attr('id', $element.attr('id').replace('new',idNumber));
  120. $element.find('[value=new]').attr('value', idNumber).val(idNumber);
  121. $element.find('[id][name]').each(function () {
  122. this.id = this.id.replace('new',idNumber);
  123. this.name = this.name.replace('new',idNumber);
  124. });
  125. $element.find('[for]').each(function () {
  126. $(this).attr('for',$(this).attr('for').replace('new',idNumber));
  127. });
  128. $element.appendTo('#submitTabs ul');
  129. $element.find('.iconpickeradd').iconpicker({placement: 'right', hideOnSelect: false, collision: true});
  130. $(".iconpicker-items").niceScroll({
  131. railpadding: {top:0,right:0,left:0,bottom:0},
  132. scrollspeed: 30,
  133. mousescrollstep: 60,
  134. grabcursorenabled: false
  135. });
  136. $('.tab-box').scrollTop($('.tab-box')[0].scrollHeight);
  137. }
  138. function submitTabs(form) {
  139. var formData = {};
  140. var ids = [];
  141. $.each($(form).serializeArray(), function(i,v) {
  142. var regmatch = /(\w+)\[((?:new-)?\d+)\]/i.exec(v.name);
  143. if (regmatch) {
  144. if (ids.indexOf(regmatch[2]) == -1) {
  145. ids.push(regmatch[2]);
  146. if (typeof formData['order'] !== 'object') { formData['order'] = {}; }
  147. formData['order'][regmatch[2]] = ids.length;
  148. }
  149. if (typeof formData[regmatch[1]] !== 'object') { formData[regmatch[1]] = {}; }
  150. formData[regmatch[1]][regmatch[2]] = v.value;
  151. } else {
  152. console.log(regmatch);
  153. }
  154. });
  155. console.log(formData);
  156. ajax_request('POST', 'submit-tabs', formData);
  157. return false;
  158. }
  159. </script>
  160. <style>
  161. body{
  162. background: #273238;
  163. }
  164. .tabs-with-bg .dropdown-menu a:hover {
  165. color: black !important;
  166. }
  167. .shadow {
  168. -webkit-filter: drop-shadow(0px 0px 0px black);
  169. filter: drop-shadow(0px 0px 0px black);
  170. }
  171. .faded {
  172. opacity: .5;
  173. }
  174. .save-btn-form {
  175. position: absolute;
  176. top: 15px;
  177. right: 60px;
  178. }
  179. @media screen and (min-width: 737px){
  180. .save-btn-form {
  181. position: relative;
  182. top: 15px;
  183. right: 10px;
  184. float: right;
  185. }
  186. }
  187. .darkBold {
  188. color: black;
  189. font-weight: 500;
  190. }
  191. @-webkit-keyframes fadeIn {
  192. from { opacity: 0; }
  193. to { opacity: 1; }
  194. }
  195. @keyframes fadeIn {
  196. from { opacity: 0; }
  197. to { opacity: 1; }
  198. }
  199. button.settingsMenu:hover {
  200. width: 250px !important;
  201. z-index: 10000;
  202. opacity: 1 !important;
  203. }
  204. button.settingsMenu:hover p{
  205. display: block !important;
  206. -webkit-animation: fadeIn 1s;
  207. animation: fadeIn 1s;
  208. opacity: 1 !important;
  209. }
  210. button.settingsMenuActive {
  211. margin-left: 0px !important;
  212. opacity: 1 !important;
  213. }
  214. button.settingsMenuInactive {
  215. opacity: .5;
  216. }
  217. .loop-animation {
  218. animation-iteration-count: infinite;
  219. -webkit-animation-iteration-count: infinite;
  220. -moz-animation-iteration-count: infinite;
  221. -o-animation-iteration-count: infinite;
  222. }
  223. @media screen and (max-width:737px){
  224. .email-body{width: 100%; overflow: auto;}
  225. .email-content, .email-new {
  226. -webkit-overflow-scrolling: touch;
  227. -webkit-transform: translateZ(0);
  228. overflow: scroll;
  229. position: fixed;
  230. height:100% !important;
  231. margin-top:0;
  232. }.email-content .email-header, .email-new .email-header{
  233. padding: 10px 30px;
  234. z-index: 1000;
  235. }
  236. }@media screen and (min-width:737px){
  237. .email-body{width: 100%}
  238. .email-content .close-button, .email-content .email-actions, .email-new .close-button, .email-new .email-actions {
  239. position: relative;
  240. top: 15px;
  241. right: 0px;
  242. float: right;
  243. }.email-inner-section {
  244. margin-top: 50px;
  245. }.email-content, .email-new {
  246. overflow: auto;
  247. margin-top: 0;
  248. height: 100%;
  249. position: fixed;
  250. max-width: 100%;
  251. width: calc(100% - 50px) !important;
  252. right: calc(-100% - 50px);
  253. }.email-content .email-header, .email-new .email-header{
  254. position: fixed;
  255. padding: 10px 30px;
  256. width: calc(100% - 50px) !important;
  257. z-index: 1000;
  258. }
  259. }ul.inbox-nav.nav {
  260. background: white;
  261. padding: 5px;
  262. border-radius: 5px;
  263. }.profile-usermenu ul li.active a {
  264. border-left: 3px solid <?=$activetabBG;?> !important;
  265. padding-left: 12px;
  266. }.profile-usermenu ul li a:hover {
  267. background: <?=$hoverbg;?> !important;
  268. color: <?=$hovertext;?> !important;
  269. cursor: pointer;
  270. }input.form-control.material.icp-auto.iconpicker-element.iconpicker-input {
  271. display: none;
  272. }input.form-control.iconpicker-search {
  273. color: black;
  274. }.key {
  275. font-family:Tahoma, sans-serif;
  276. border-style:solid;
  277. border-color:#D5D6AD #C1C1A8 #CDCBA5 #E7E5C5;
  278. border-width:2px 3px 8px 3px;
  279. background:#D6D4B4;
  280. display:inline-block;
  281. border-radius:5px;
  282. margin:3px;
  283. text-align:center;
  284. }.form-control.material {
  285. background-image: -webkit-gradient(linear, left top, left bottom, from(<?=$topbartext;?>), to(<?=$topbartext;?>)), -webkit-gradient(linear, left top, left bottom, from(#d2d2d2), to(#d2d2d2));
  286. background-image: -webkit-linear-gradient(<?=$topbartext;?>, <?=$topbartext;?>), -webkit-linear-gradient(#d2d2d2, #d2d2d2);
  287. background-image: linear-gradient(<?=$topbartext;?>, <?=$topbartext;?>), linear-gradient(#d2d2d2, #d2d2d2);
  288. }.key span {
  289. background:#ECEECA;
  290. color:#5D5E4F;
  291. display:block;
  292. font-size:12px;
  293. padding:0 2px;
  294. border-radius:3px;
  295. width:14px;
  296. height:18px;
  297. line-height:18px;
  298. text-align:center;
  299. font-weight:bold;
  300. letter-spacing:1px;
  301. text-transform:uppercase;
  302. }.key.wide span {
  303. width:auto;
  304. padding:0 12px;
  305. }.dragging{
  306. border: 2px solid;
  307. }.todo .action-btns a span {
  308. color: #76828e !important;
  309. }.todo li:nth-child(even) {
  310. background: #FFFFFF !important;
  311. }.themeImage {
  312. position: fixed;
  313. left: 160px;
  314. top: 0px;
  315. height: 400px;
  316. }.chooseTheme a span {
  317. position:absolute; display:none; z-index:99;
  318. }.chooseTheme a:hover span {
  319. display:block;
  320. }ul.nav.nav-tabs.apps {
  321. border: solid;
  322. border-top: 0;
  323. border-left: 0;
  324. border-right: 0;
  325. border-radius: 0;
  326. }li.apps.active {
  327. border: solid;
  328. border-bottom: 0;
  329. border-radius: 5px;
  330. top: 3px;
  331. }<?php customCSS(); ?>
  332. </style>
  333. </head>
  334. <body id="body-settings" class="scroller-body group-<?php echo $group;?>" style="padding: 0; overflow: hidden">
  335. <div id="main-wrapper" class="main-wrapper">
  336. <!--Content-->
  337. <div id="content" style="margin:0 10px; overflow:hidden">
  338. <!-- Update -->
  339. <div id="updateStatus" class="row" style="display: none;z-index: 10000;position: relative;">
  340. <div class="col-lg-2">
  341. <div class="content-box box-shadow animated rubberBand">
  342. <div class="table-responsive">
  343. <table class="table table-striped progress-widget zero-m">
  344. <thead class="yellow-bg"><tr><th>Updating</th></tr></thead>
  345. <tbody >
  346. <tr>
  347. <td>
  348. <div class="progress">
  349. <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%">
  350. </div>
  351. </div>
  352. </td>
  353. </tr>
  354. </tbody>
  355. </table>
  356. </div>
  357. </div>
  358. </div>
  359. </div>
  360. <!-- Check Frame Modal -->
  361. <div class="modal fade checkFrame" tabindex="-1" role="dialog">
  362. <div class="modal-dialog modal-lg" role="document">
  363. <div class="modal-content">
  364. <div class="modal-header">
  365. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  366. <h4 class="modal-title">Check iFrame Compatability</h4>
  367. </div>
  368. <form id="urlTestForm" onsubmit="return false;">
  369. <div class="modal-body">
  370. <?php echo translate("TEST_URL"); ?>
  371. <input type="text" class="form-control material" name="url-test" placeholder="<?php echo translate("URL"); ?>" autocorrect="off" autocapitalize="off" value="">
  372. </div>
  373. <div class="modal-footer">
  374. <button type="button" class="btn btn-default waves" data-dismiss="modal">Close</button>
  375. <button id="urlTestForm_submit" class="btn btn-primary waves" data-dismiss="modal">Check Frame URL</button>
  376. </div>
  377. </form>
  378. </div>
  379. </div>
  380. </div>
  381. <br/>
  382. <div id="versionCheck"></div>
  383. <div class="row">
  384. <?php
  385. if($userDevice !== "phone"){
  386. echo '<div class="col-xs-1" style="width: 60px">';
  387. echo '
  388. <button id="apply" type="submit" style="display:none;border-radius: 0px !important; -webkit-border-radius: 20px !important;margin-bottom: -20px;margin-left: 5px;z-index:10000;" class="btn btn-success btn-icon waves waves-circle waves-effect waves-float settingsMenu animated tada">
  389. <i class="fa fa-retweet fa-fw pull-left" style="padding-left: 12px;"></i>
  390. <p class="" style="text-align: center;direction: rtl;display:none;"><strong>'.$language->translate("APPLY_CHANGES").'</strong></p>
  391. </button>
  392. ';
  393. }else{
  394. echo '<div class="col-sm-2">';
  395. echo '<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">'.$language->translate("APPLY_CHANGES").'</button>';
  396. }
  397. $buildMenu = array(
  398. array(
  399. 'id' => 'open-tabs',
  400. 'box' => 'tab-box',
  401. 'name' => 'Edit Tabs',
  402. 'icon_1' => 'view-list',
  403. 'icon_2' => 'th-list',
  404. 'color' => 'red-orange',
  405. 'color2' => 'palette-Red-A700 bg',
  406. 'padding' => '2',
  407. ),
  408. array(
  409. 'id' => 'open-colors',
  410. 'box' => 'color-box',
  411. 'name' => 'Edit Colors',
  412. 'icon_1' => 'format-paint',
  413. 'icon_2' => 'paint-brush',
  414. 'color' => 'red',
  415. 'color2' => 'palette-Indigo-A700 bg',
  416. 'padding' => '2',
  417. ),
  418. array(
  419. 'id' => 'open-users',
  420. 'box' => 'users-box',
  421. 'name' => 'Manage Users',
  422. 'icon_1' => 'account-multiple',
  423. 'icon_2' => 'user',
  424. 'color' => 'green',
  425. 'color2' => 'palette-Blue-Grey-700 bg',
  426. 'padding' => '2',
  427. ),
  428. array(
  429. 'id' => 'open-email',
  430. 'box' => 'email-box',
  431. 'name' => 'Email Users',
  432. 'icon_1' => 'email',
  433. 'icon_2' => 'envelope',
  434. 'color' => 'yellow',
  435. 'color2' => 'palette-Pink-A700 bg',
  436. 'padding' => '2',
  437. ),
  438. array(
  439. 'id' => 'open-logs',
  440. 'box' => 'logs-box',
  441. 'name' => 'View Logs',
  442. 'icon_1' => 'file-document-box',
  443. 'icon_2' => 'list-alt',
  444. 'color' => 'blue',
  445. 'color2' => 'palette-Teal-A700 bg',
  446. 'padding' => '2',
  447. ),
  448. array(
  449. 'id' => 'open-homepage',
  450. 'box' => 'homepage-box',
  451. 'name' => 'Edit Homepage',
  452. 'icon_1' => 'television-guide',
  453. 'icon_2' => 'home',
  454. 'color' => 'yellow',
  455. 'color2' => 'palette-Deep-Orange-A400 bg',
  456. 'padding' => '2',
  457. ),
  458. array(
  459. 'id' => 'open-invites',
  460. 'box' => 'invites-box',
  461. 'name' => 'Plex Invites',
  462. 'icon_1' => 'account-multiple-plus',
  463. 'icon_2' => 'user-plus',
  464. 'color' => 'light-blue',
  465. 'color2' => 'palette-Amber-A700 bg',
  466. 'padding' => '2',
  467. ),
  468. array(
  469. 'id' => 'open-advanced',
  470. 'box' => 'advanced-box',
  471. 'name' => 'Advanced',
  472. 'icon_1' => 'settings',
  473. 'icon_2' => 'cog',
  474. 'color' => 'gray',
  475. 'color2' => 'palette-Grey-600 bg',
  476. 'padding' => '2',
  477. ),array(
  478. 'id' => 'open-info',
  479. 'box' => 'info-box',
  480. 'name' => 'About',
  481. 'icon_1' => 'information',
  482. 'icon_2' => 'info-circle',
  483. 'color' => 'orange',
  484. 'color2' => 'palette-Light-Blue-A700 bg',
  485. 'padding' => '2',
  486. ),array(
  487. 'id' => 'open-donate',
  488. 'box' => 'donate-box',
  489. 'name' => 'Donate',
  490. 'icon_1' => 'cash-usd',
  491. 'icon_2' => 'money',
  492. 'color' => 'red',
  493. 'color2' => 'palette-Green-A700 bg',
  494. 'padding' => '2',
  495. ),
  496. );
  497. if($userDevice !== "phone"){ echo "<br><br><br>".buildMenu($buildMenu); }else{ echo buildMenuPhone($buildMenu); }?>
  498. </div>
  499. <?php if($userDevice !== "phone"){?>
  500. <div class="col-lg-10" style="position: absolute;top: 50%;left: 10%;width: 80%;">
  501. <h1 style="font-size: 50px" class="text-center">ORGANIZR <i class="fa fa-heart fa-1x red loop-animation animated pulse" aria-hidden="true"></i> YOU</h1>
  502. </div>
  503. <?php } ?>
  504. </div>
  505. <div class="email-content tab-box white-bg">
  506. <div class="email-body">
  507. <div class="email-header gray-bg">
  508. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  509. <button type="button" class="btn waves btn-labeled btn-success btn btn-sm text-uppercase waves-effect waves-float save-btn-form submitTabBtn">
  510. <span class="btn-label"><i class="fa fa-floppy-o"></i></span><?php echo translate('SAVE_TABS'); ?>
  511. </button>
  512. <h1>Edit Tabs</h1>
  513. </div>
  514. <div class="email-inner small-box">
  515. <div class="email-inner-section">
  516. <div class="small-box todo-list fade in" id="tab-tabs">
  517. <form id="submitTabs" onsubmit="submitTabs(this); return false;">
  518. <div class="sort-todo">
  519. <button id="newtab" type="button" class="btn waves btn-labeled btn-success btn-sm text-uppercase waves-effect waves-float" onclick="addTab()">
  520. <span class="btn-label"><i class="fa fa-plus"></i></span><?php echo translate("NEW_TAB");?>
  521. </button>
  522. <button id="iconHide" type="button" class="btn waves btn-labeled btn-warning btn-sm text-uppercase waves-effect waves-float">
  523. <span class="btn-label"><i class="fa fa-upload"></i></span><?php echo $language->translate("UPLOAD_ICONS");?>
  524. </button>
  525. <button id="iconAll" type="button" class="btn waves btn-labeled btn-info btn-sm text-uppercase waves-effect waves-float">
  526. <span class="btn-label"><i class="fa fa-picture-o"></i></span><?php echo $language->translate("VIEW_ICONS");?>
  527. </button>
  528. <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">
  529. <span class="btn-label"><i class="fa fa-check"></i></span><?php echo $language->translate("CHECK_FRAME");?>
  530. </button>
  531. <button id="toggleAllExtra" type="button" class="btn waves btn-labeled btn-info btn-sm text-uppercase waves-effect waves-float indigo-bg">
  532. <span class="btn-label"><i class="fa fa-toggle-off"></i></span><span class="btn-text"><?php echo $language->translate("TOGGLE_ALL");?></span>
  533. </button>
  534. </div>
  535. <input type="file" name="files[]" id="uploadIcons" multiple="multiple">
  536. <div id="viewAllIcons" style="display: none;">
  537. <h4><strong><?php echo $language->translate("ALL_ICONS");?></strong> [<?php echo $language->translate("CLICK_ICON");?>]</h4>
  538. <div class="row">
  539. <textarea id="copyTarget" class="hideCopy" style="left: -9999px; top: 0; position: absolute;"></textarea>
  540. <?php echo loadIcons();?>
  541. </div>
  542. </div>
  543. <div class="panel">
  544. <div class="panel-body todo">
  545. <ul class="list-group ui-sortable">
  546. <?php
  547. foreach($file_db->query('SELECT * FROM tabs ORDER BY `order` asc') as $key => $row) {
  548. if (!isset($row['id'])) { $row['id'] = $key + 1; }
  549. echo printTabRow($row);
  550. }
  551. ?>
  552. </ul>
  553. </div>
  554. </div>
  555. </form>
  556. <?php echo printTabRow(false); ?>
  557. </div>
  558. </div>
  559. </div>
  560. </div>
  561. </div>
  562. <div class="email-content color-box white-bg">
  563. <?php
  564. // Build Colour Settings
  565. echo buildSettings(
  566. array(
  567. 'title' => 'Appearance Settings',
  568. 'id' => 'appearance_settings',
  569. 'submitAction' => 'update-appearance',
  570. 'tabs' => array(
  571. array(
  572. 'title' => 'Colours',
  573. 'id' => 'theme_colours',
  574. 'image' => 'images/paint.png',
  575. 'fields' => array(
  576. array(
  577. array(
  578. 'type' => 'button',
  579. 'labelTranslate' => 'COLOR_TEMPLATE',
  580. 'icon' => 'css3',
  581. 'id' => 'themeSelector',
  582. 'buttonType' => 'dark',
  583. 'buttonDrop' => '
  584. <ul class="dropdown-menu gray-bg">
  585. <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>
  586. <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>
  587. <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>
  588. <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>
  589. <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>
  590. <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>
  591. <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>
  592. <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>
  593. <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>
  594. <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>
  595. </ul>
  596. ',
  597. ),
  598. array(
  599. 'type' => 'button',
  600. 'labelTranslate' => 'CHOOSE_THEME',
  601. 'icon' => 'birthday-cake',
  602. 'id' => 'layerCake',
  603. 'buttonType' => 'dark',
  604. 'buttonDrop' => '
  605. <ul class="dropdown-menu">
  606. <li class="dropdown-header">Choose a Theme Below</li>
  607. <li id="open-themes" box="themes-box" onclick"" data-toggle="tooltip" data-placement="top" title="" data-original-title="Custom Themes Created by The Community"><a onclick="" href="#">Themes</a></li>
  608. <li id="layerCakeDefault" data-toggle="tooltip" data-placement="top" title="" data-original-title="A 7 color theme based on Organizr"><a onclick="layerCake(\'Basic\',\'layerCake\');$(\'#customCSS_id\').attr(\'data-changed\', \'true\');" href="#">LAYER#CAKE Basic</a></li>
  609. <li id="layerCakeCustom" data-toggle="tooltip" data-placement="top" title="" data-original-title="A 32 color theme based on Organizr"><a onclick="layerCake(\'Advanced\',\'layerCake\');$(\'#customCSS_id\').attr(\'data-changed\', \'true\');" href="#">LAYER#CAKE Advanced</a></li>
  610. </ul>
  611. ',
  612. ),
  613. ),
  614. array(
  615. 'type' => 'header',
  616. 'labelTranslate' => 'TITLE',
  617. ),
  618. array(
  619. array(
  620. 'type' => 'text',
  621. 'format' => 'colour',
  622. 'labelTranslate' => 'TITLE',
  623. 'name' => 'title',
  624. 'id' => 'title',
  625. 'value' => $title,
  626. ),
  627. array(
  628. 'type' => 'text',
  629. 'format' => 'colour',
  630. 'class' => 'jscolor {hash:true}',
  631. 'labelTranslate' => 'TITLE_TEXT',
  632. 'name' => 'topbartext',
  633. 'id' => 'topbartext',
  634. 'value' => $topbartext,
  635. ),
  636. array(
  637. 'type' => 'text',
  638. 'format' => 'colour',
  639. 'class' => 'jscolor {hash:true}',
  640. 'labelTranslate' => 'LOADING_COLOR',
  641. 'name' => 'loading',
  642. 'id' => 'loading',
  643. 'value' => $loading,
  644. ),
  645. ),
  646. array(
  647. 'type' => 'header',
  648. 'labelTranslate' => 'NAVIGATION_BARS',
  649. ),
  650. array(
  651. array(
  652. 'type' => 'text',
  653. 'format' => 'colour',
  654. 'class' => 'jscolor {hash:true}',
  655. 'labelTranslate' => 'TOP_BAR',
  656. 'name' => 'topbar',
  657. 'id' => 'topbar',
  658. 'value' => $topbar,
  659. ),
  660. array(
  661. 'type' => 'text',
  662. 'format' => 'colour',
  663. 'class' => 'jscolor {hash:true}',
  664. 'labelTranslate' => 'BOTTOM_BAR',
  665. 'name' => 'bottombar',
  666. 'id' => 'bottombar',
  667. 'value' => $bottombar,
  668. ),
  669. array(
  670. 'type' => 'text',
  671. 'format' => 'colour',
  672. 'class' => 'jscolor {hash:true}',
  673. 'labelTranslate' => 'SIDE_BAR',
  674. 'name' => 'sidebar',
  675. 'id' => 'sidebar',
  676. 'value' => $sidebar,
  677. ),
  678. ),
  679. array(
  680. array(
  681. 'type' => 'text',
  682. 'format' => 'colour',
  683. 'class' => 'jscolor {hash:true}',
  684. 'labelTranslate' => 'HOVER_BG',
  685. 'name' => 'hoverbg',
  686. 'id' => 'hoverbg',
  687. 'value' => $hoverbg,
  688. ),
  689. array(
  690. 'type' => 'text',
  691. 'format' => 'colour',
  692. 'class' => 'jscolor {hash:true}',
  693. 'labelTranslate' => 'HOVER_TEXT',
  694. 'name' => 'hovertext',
  695. 'id' => 'hovertext',
  696. 'value' => $hovertext,
  697. ),
  698. ),
  699. array(
  700. 'type' => 'header',
  701. 'labelTranslate' => 'ACTIVE_TAB',
  702. ),
  703. array(
  704. array(
  705. 'type' => 'text',
  706. 'format' => 'colour',
  707. 'class' => 'jscolor {hash:true}',
  708. 'labelTranslate' => 'ACTIVE_TAB_BG',
  709. 'name' => 'activetabBG',
  710. 'id' => 'activetabBG',
  711. 'value' => $activetabBG,
  712. ),
  713. array(
  714. 'type' => 'text',
  715. 'format' => 'colour',
  716. 'class' => 'jscolor {hash:true}',
  717. 'labelTranslate' => 'ACTIVE_TAB_ICON',
  718. 'name' => 'activetabicon',
  719. 'id' => 'activetabicon',
  720. 'value' => $activetabicon,
  721. ),
  722. array(
  723. 'type' => 'text',
  724. 'format' => 'colour',
  725. 'class' => 'jscolor {hash:true}',
  726. 'labelTranslate' => 'ACTIVE_TAB_TEXT',
  727. 'name' => 'activetabtext',
  728. 'id' => 'activetabtext',
  729. 'value' => $activetabtext,
  730. ),
  731. ),
  732. array(
  733. 'type' => 'header',
  734. 'labelTranslate' => 'INACTIVE_TAB',
  735. ),
  736. array(
  737. array(
  738. 'type' => 'text',
  739. 'format' => 'colour',
  740. 'class' => 'jscolor {hash:true}',
  741. 'labelTranslate' => 'INACTIVE_ICON',
  742. 'name' => 'inactiveicon',
  743. 'id' => 'inactiveicon',
  744. 'value' => $inactiveicon,
  745. ),
  746. array(
  747. 'type' => 'text',
  748. 'format' => 'colour',
  749. 'class' => 'jscolor {hash:true}',
  750. 'labelTranslate' => 'INACTIVE_TEXT',
  751. 'name' => 'inactivetext',
  752. 'id' => 'inactivetext',
  753. 'value' => $inactivetext,
  754. ),
  755. ),
  756. ),
  757. ),
  758. array(
  759. 'title' => 'Custom CSS',
  760. 'id' => 'theme_css',
  761. 'image' => 'images/css.png',
  762. 'fields' => array(
  763. array(
  764. 'type' => 'header',
  765. 'label' => 'Custom CSS',
  766. ),
  767. array(
  768. 'type' => 'header',
  769. 'class' => '',
  770. 'label' => (empty(INSTALLEDTHEME)?'<span class="themeHeader">Installed Theme: No Theme Installed</span>':'<span class="themeHeader">Installed Theme: '.INSTALLEDTHEME.'</span><button id="clearTheme" type="button" class="btn waves pull-right btn-labeled btn-sm btn-danger text-uppercase waves-effect waves-float"><span class="btn-label"><i class="fa fa-trash"></i></span> Clear Theme</button>'),
  771. ),
  772. array(
  773. 'type' => 'textarea',
  774. 'name' => 'customCSS',
  775. 'value' => (file_exists('./custom.css')?file_get_contents('./custom.css'):''),
  776. 'rows' => 25,
  777. 'style' => 'background: #000; color: #FFF;',
  778. ),
  779. ),
  780. ),
  781. ),
  782. )
  783. );
  784. ?>
  785. </div>
  786. <div class="email-content homepage-box white-bg">
  787. <?php
  788. // Qualify most typical hostnames prior to form submission
  789. $urlPattern = '([hH][tT][tT][pP][sS]?):\/\/([\w\.\-]{1,250})(?::(\d{1,5}))?((?:\/[^?.\s]+))?';
  790. // Once configurable user groups is added change to select-multi to allow specific group selection
  791. $userSelectType = 'select';
  792. $userTypes = array(
  793. 'None' => 'false',
  794. 'User' => 'user|admin',
  795. 'Admin' => 'admin',
  796. );
  797. $branchTypes = array(
  798. 'Master' => 'master',
  799. 'Develop' => 'develop',
  800. 'Pre-Develop' => 'cero-dev',
  801. );
  802. $refreshSeconds = array(
  803. '1 sec' => '1000',
  804. '5 secs' => '5000',
  805. '10 secs' => '10000',
  806. '15 secs' => '15000',
  807. '30 secs' => '30000',
  808. '1 min' => '60000',
  809. '1.5 mins' => '90000',
  810. '2 mins' => '120000',
  811. '5 mins' => '300000',
  812. '10 mins' => '600000',
  813. '15 mins' => '900000',
  814. '30 mins' => '1800000',
  815. '45 mins' => '2700000',
  816. '1 hour' => '3600000',
  817. );
  818. // Build Homepage Settings
  819. echo buildSettings(
  820. array(
  821. 'title' => 'Homepage Settings',
  822. 'id' => 'homepage_settings',
  823. 'onready' => '',
  824. 'tabs' => array(
  825. array(
  826. 'title' => 'General',
  827. 'id' => 'home_general',
  828. 'image' => 'images/gear.png',
  829. 'fields' => array(
  830. array(
  831. 'type' => $userSelectType,
  832. 'labelTranslate' => 'SHOW_HOMEPAGE',
  833. 'name' => 'homePageAuthNeeded',
  834. 'value' => HOMEPAGEAUTHNEEDED,
  835. 'options' => $userTypes,
  836. ),
  837. /*
  838. array(
  839. 'type' => 'custom',
  840. 'labelTranslate' => 'SHOW_HOMEPAGE',
  841. 'html' => 'homePageAuthNeeded',
  842. 'name' => 'homePagelayout',
  843. 'value' => '',
  844. ),
  845. */
  846. ),
  847. ),
  848. array(
  849. 'title' => 'Plex',
  850. 'id' => 'plex',
  851. 'image' => 'images/plex.png',
  852. 'fields' => array(
  853. array(
  854. 'type' => $userSelectType,
  855. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  856. 'name' => 'plexHomeAuth',
  857. 'value' => PLEXHOMEAUTH,
  858. 'options' => $userTypes,
  859. ),
  860. array(
  861. 'type' => 'text',
  862. 'placeholder' => 'http://hostname:32400',
  863. 'labelTranslate' => 'PLEX_URL',
  864. 'assist' => 'http://hostname:32400',
  865. 'name' => 'plexURL',
  866. 'pattern' => $urlPattern,
  867. 'value' => PLEXURL,
  868. ),
  869. array(
  870. array(
  871. 'type' => 'text',
  872. 'placeholder' => randString(20),
  873. 'labelTranslate' => 'PLEX_TOKEN',
  874. 'name' => 'plexToken',
  875. 'pattern' => '[a-zA-Z0-9]{20}',
  876. 'value' => PLEXTOKEN,
  877. ),
  878. array(
  879. 'type' => 'custom',
  880. '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>',
  881. ),
  882. ),
  883. array(
  884. array(
  885. 'type' => 'text',
  886. 'placeholder' => "",
  887. 'labelTranslate' => 'RECENT_ITEMS_LIMIT',
  888. 'name' => 'plexRecentItems',
  889. 'pattern' => '[0-9]+',
  890. 'value' => PLEXRECENTITEMS,
  891. ),
  892. array(
  893. 'type' => $userSelectType,
  894. 'labelTranslate' => 'RECENT_REFRESH',
  895. 'name' => 'recentRefresh',
  896. 'value' => RECENTREFRESH,
  897. 'options' => $refreshSeconds,
  898. ),
  899. ),
  900. array(
  901. 'type' => 'text',
  902. 'placeholder' => "Name of Plex Tab i.e. Plex",
  903. 'labelTranslate' => 'PLEX_TAB_NAME',
  904. 'name' => 'plexTabName',
  905. 'value' => PLEXTABNAME,
  906. ),
  907. array(
  908. 'type' => 'text',
  909. 'placeholder' => "URL For Plex Links",
  910. 'labelTranslate' => 'PLEX_TAB_URL',
  911. 'name' => 'plexTabURL',
  912. 'value' => PLEXTABURL,
  913. ),
  914. array(
  915. array(
  916. 'type' => 'checkbox',
  917. 'labelTranslate' => 'ALLOW_SEARCH',
  918. 'name' => 'plexSearch',
  919. 'value' => PLEXSEARCH,
  920. ),
  921. array(
  922. 'type' => $userSelectType,
  923. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  924. 'name' => 'plexHomeAuth',
  925. 'value' => PLEXSEARCHAUTH,
  926. 'options' => $userTypes,
  927. ),
  928. ),
  929. array(
  930. array(
  931. 'type' => 'checkbox',
  932. 'labelTranslate' => 'RECENT_MOVIES',
  933. 'name' => 'plexRecentMovie',
  934. 'value' => PLEXRECENTMOVIE,
  935. ),
  936. array(
  937. 'type' => $userSelectType,
  938. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  939. 'name' => 'plexRecentMovieAuth',
  940. 'value' => PLEXRECENTMOVIEAUTH,
  941. 'options' => $userTypes,
  942. ),
  943. ),
  944. array(
  945. array(
  946. 'type' => 'checkbox',
  947. 'labelTranslate' => 'RECENT_TV',
  948. 'name' => 'plexRecentTV',
  949. 'value' => PLEXRECENTTV,
  950. ),
  951. array(
  952. 'type' => $userSelectType,
  953. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  954. 'name' => 'plexRecentTVAuth',
  955. 'value' => PLEXRECENTTVAUTH,
  956. 'options' => $userTypes,
  957. ),
  958. ),
  959. array(
  960. array(
  961. 'type' => 'checkbox',
  962. 'labelTranslate' => 'RECENT_MUSIC',
  963. 'name' => 'plexRecentMusic',
  964. 'value' => PLEXRECENTMUSIC,
  965. ),
  966. array(
  967. 'type' => $userSelectType,
  968. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  969. 'name' => 'plexRecentMusicAuth',
  970. 'value' => PLEXRECENTMUSICAUTH,
  971. 'options' => $userTypes,
  972. ),
  973. ),
  974. array(
  975. array(
  976. 'type' => 'checkbox',
  977. 'labelTranslate' => 'PLAYLISTS',
  978. 'name' => 'plexPlaylists',
  979. 'value' => PLEXPLAYLISTS,
  980. ),
  981. array(
  982. 'type' => $userSelectType,
  983. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  984. 'name' => 'plexPlaylistsAuth',
  985. 'value' => PLEXPLAYLISTSAUTH,
  986. 'options' => $userTypes,
  987. ),
  988. ),
  989. array(
  990. array(
  991. 'type' => 'checkbox',
  992. 'labelTranslate' => 'PLAYING_NOW',
  993. 'name' => 'plexPlayingNow',
  994. 'value' => PLEXPLAYINGNOW,
  995. ),
  996. array(
  997. 'type' => $userSelectType,
  998. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  999. 'name' => 'plexPlayingNowAuth',
  1000. 'value' => PLEXPLAYINGNOWAUTH,
  1001. 'options' => $userTypes,
  1002. ),
  1003. ),
  1004. array(
  1005. array(
  1006. 'type' => 'checkbox',
  1007. 'labelTranslate' => 'SHOW_NAMES',
  1008. 'name' => 'plexShowNames',
  1009. 'value' => PLEXSHOWNAMES,
  1010. ),
  1011. ),
  1012. ),
  1013. ),
  1014. array(
  1015. 'title' => 'Emby',
  1016. 'id' => 'emby',
  1017. 'image' => 'images/emby.png',
  1018. 'fields' => array(
  1019. array(
  1020. 'type' => $userSelectType,
  1021. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1022. 'name' => 'embyHomeAuth',
  1023. 'value' => EMBYHOMEAUTH,
  1024. 'options' => $userTypes,
  1025. ),
  1026. array(
  1027. 'type' => 'text',
  1028. 'placeholder' => 'http://hostname:8096/emby',
  1029. 'labelTranslate' => 'EMBY_URL',
  1030. 'assist' => 'http://hostname:8096 | https://hostname/emby | http://hostname:8096/emby',
  1031. 'name' => 'embyURL',
  1032. 'pattern' => $urlPattern,
  1033. 'value' => EMBYURL,
  1034. ),
  1035. array(
  1036. 'type' => 'text',
  1037. 'placeholder' => randString(32),
  1038. 'labelTranslate' => 'EMBY_TOKEN',
  1039. 'name' => 'embyToken',
  1040. 'pattern' => '[a-zA-Z0-9]{32}',
  1041. 'value' => EMBYTOKEN,
  1042. ),
  1043. array(
  1044. array(
  1045. 'type' => 'text',
  1046. 'placeholder' => "",
  1047. 'labelTranslate' => 'RECENT_ITEMS_LIMIT',
  1048. 'name' => 'embyRecentItems',
  1049. 'pattern' => '[0-9]+',
  1050. 'value' => EMBYRECENTITEMS,
  1051. ),
  1052. array(
  1053. 'type' => $userSelectType,
  1054. 'labelTranslate' => 'RECENT_REFRESH',
  1055. 'name' => 'recentRefresh',
  1056. 'value' => RECENTREFRESH,
  1057. 'options' => $refreshSeconds,
  1058. ),
  1059. ),
  1060. array(
  1061. array(
  1062. 'type' => 'checkbox',
  1063. 'labelTranslate' => 'RECENT_MOVIES',
  1064. 'name' => 'embyRecentMovie',
  1065. 'value' => EMBYRECENTMOVIE,
  1066. ),
  1067. array(
  1068. 'type' => $userSelectType,
  1069. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1070. 'name' => 'embyRecentMovieAuth',
  1071. 'value' => EMBYRECENTMOVIEAUTH,
  1072. 'options' => $userTypes,
  1073. ),
  1074. ),
  1075. array(
  1076. array(
  1077. 'type' => 'checkbox',
  1078. 'labelTranslate' => 'RECENT_TV',
  1079. 'name' => 'embyRecentTV',
  1080. 'value' => EMBYRECENTTV,
  1081. ),
  1082. array(
  1083. 'type' => $userSelectType,
  1084. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1085. 'name' => 'embyRecentTVAuth',
  1086. 'value' => EMBYRECENTTVAUTH,
  1087. 'options' => $userTypes,
  1088. ),
  1089. ),
  1090. array(
  1091. array(
  1092. 'type' => 'checkbox',
  1093. 'labelTranslate' => 'RECENT_MUSIC',
  1094. 'name' => 'embyRecentMusic',
  1095. 'value' => EMBYRECENTMUSIC,
  1096. ),
  1097. array(
  1098. 'type' => $userSelectType,
  1099. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1100. 'name' => 'embyRecentMusicAuth',
  1101. 'value' => EMBYRECENTMUSICAUTH,
  1102. 'options' => $userTypes,
  1103. ),
  1104. ),
  1105. array(
  1106. array(
  1107. 'type' => 'checkbox',
  1108. 'labelTranslate' => 'PLAYING_NOW',
  1109. 'name' => 'embyPlayingNow',
  1110. 'value' => EMBYPLAYINGNOW,
  1111. ),
  1112. array(
  1113. 'type' => $userSelectType,
  1114. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1115. 'name' => 'embyPlayingNowAuth',
  1116. 'value' => EMBYPLAYINGNOWAUTH,
  1117. 'options' => $userTypes,
  1118. ),
  1119. ),
  1120. array(
  1121. array(
  1122. 'type' => 'checkbox',
  1123. 'labelTranslate' => 'SHOW_NAMES',
  1124. 'name' => 'embyShowNames',
  1125. 'value' => EMBYSHOWNAMES,
  1126. ),
  1127. ),
  1128. ),
  1129. ),
  1130. array(
  1131. 'title' => 'Sonarr',
  1132. 'id' => 'sonarr',
  1133. 'image' => 'images/sonarr.png',
  1134. 'fields' => array(
  1135. array(
  1136. 'type' => $userSelectType,
  1137. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1138. 'name' => 'sonarrHomeAuth',
  1139. 'value' => SONARRHOMEAUTH,
  1140. 'options' => $userTypes,
  1141. ),
  1142. array(
  1143. 'type' => 'text',
  1144. 'placeholder' => 'http://hostname:8989',
  1145. 'labelTranslate' => 'SONARR_URL',
  1146. 'assist' => 'http://hostname:8989 | hostname/sonarr | http://hostname:8989/sonarr',
  1147. 'name' => 'sonarrURL',
  1148. 'pattern' => $urlPattern,
  1149. 'value' => SONARRURL,
  1150. ),
  1151. array(
  1152. 'type' => 'text',
  1153. 'placeholder' => randString(32),
  1154. 'labelTranslate' => 'SONARR_KEY',
  1155. 'name' => 'sonarrKey',
  1156. 'pattern' => '[a-zA-Z0-9]{32}',
  1157. 'value' => SONARRKEY,
  1158. ),
  1159. ),
  1160. ),
  1161. array(
  1162. 'title' => 'Radarr',
  1163. 'id' => 'radarr',
  1164. 'image' => 'images/radarr.png',
  1165. 'fields' => array(
  1166. array(
  1167. 'type' => $userSelectType,
  1168. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1169. 'name' => 'radarrHomeAuth',
  1170. 'value' => RADARRHOMEAUTH,
  1171. 'options' => $userTypes,
  1172. ),
  1173. array(
  1174. 'type' => 'text',
  1175. 'placeholder' => 'http://hostname:7878',
  1176. 'labelTranslate' => 'RADARR_URL',
  1177. 'assist' => 'http://hostname:7878 | hostname/radarr | http://hostname:7878/radarr',
  1178. 'name' => 'radarrURL',
  1179. 'pattern' => $urlPattern,
  1180. 'value' => RADARRURL,
  1181. ),
  1182. array(
  1183. 'type' => 'text',
  1184. 'placeholder' => randString(32),
  1185. 'labelTranslate' => 'RADARR_KEY',
  1186. 'name' => 'radarrKey',
  1187. 'pattern' => '[a-zA-Z0-9]{32}',
  1188. 'value' => RADARRKEY,
  1189. ),
  1190. ),
  1191. ),
  1192. array(
  1193. 'title' => 'CouchPotato',
  1194. 'id' => 'couchpotato',
  1195. 'image' => 'images/couchpotato.png',
  1196. 'fields' => array(
  1197. array(
  1198. 'type' => $userSelectType,
  1199. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1200. 'name' => 'couchHomeAuth',
  1201. 'value' => COUCHHOMEAUTH,
  1202. 'options' => $userTypes,
  1203. ),
  1204. array(
  1205. 'type' => 'text',
  1206. 'placeholder' => 'http://hostname:8181',
  1207. 'labelTranslate' => 'COUCH_URL',
  1208. 'assist' => 'http://hostname:8181',
  1209. 'name' => 'couchURL',
  1210. 'pattern' => $urlPattern,
  1211. 'value' => COUCHURL,
  1212. ),
  1213. array(
  1214. 'type' => 'text',
  1215. 'placeholder' => randString(32),
  1216. 'labelTranslate' => 'COUCH_KEY',
  1217. 'name' => 'couchAPI',
  1218. 'value' => COUCHAPI,
  1219. ),
  1220. ),
  1221. ),
  1222. array(
  1223. 'title' => 'Sickbeard/Sickrage',
  1224. 'id' => 'sick',
  1225. 'image' => 'images/sickrage.png',
  1226. 'fields' => array(
  1227. array(
  1228. 'type' => $userSelectType,
  1229. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1230. 'name' => 'sickrageHomeAuth',
  1231. 'value' => SICKRAGEHOMEAUTH,
  1232. 'options' => $userTypes,
  1233. ),
  1234. array(
  1235. 'type' => 'text',
  1236. 'placeholder' => 'http://hostname:8081/sick',
  1237. 'labelTranslate' => 'SICK_URL',
  1238. 'assist' => 'http://hostname:8081 | hostname/sick | http://hostname:8081/sick',
  1239. 'name' => 'sickrageURL',
  1240. 'pattern' => $urlPattern,
  1241. 'value' => SICKRAGEURL,
  1242. ),
  1243. array(
  1244. 'type' => 'text',
  1245. 'placeholder' => randString(32),
  1246. 'labelTranslate' => 'SICK_KEY',
  1247. 'name' => 'sickrageKey',
  1248. 'value' => SICKRAGEKEY,
  1249. ),
  1250. ),
  1251. ),
  1252. array(
  1253. 'title' => 'Headphones',
  1254. 'id' => 'headphones',
  1255. 'image' => 'images/headphones.png',
  1256. 'fields' => array(
  1257. array(
  1258. 'type' => $userSelectType,
  1259. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1260. 'name' => 'headphonesHomeAuth',
  1261. 'value' => HEADPHONESHOMEAUTH,
  1262. 'options' => $userTypes,
  1263. ),
  1264. array(
  1265. 'type' => 'text',
  1266. 'placeholder' => 'http://hostname:8181',
  1267. 'labelTranslate' => 'HEADPHONES_URL',
  1268. 'assist' => 'http://hostname:8181',
  1269. 'name' => 'headphonesURL',
  1270. 'pattern' => $urlPattern,
  1271. 'value' => HEADPHONESURL,
  1272. ),
  1273. array(
  1274. 'type' => 'text',
  1275. 'placeholder' => randString(32),
  1276. 'labelTranslate' => 'HEADPHONES_KEY',
  1277. 'name' => 'headphonesKey',
  1278. 'value' => HEADPHONESKEY,
  1279. ),
  1280. ),
  1281. ),
  1282. array(
  1283. 'title' => 'Sabnzbd',
  1284. 'id' => 'sabnzbd',
  1285. 'image' => 'images/sabnzbd.png',
  1286. 'fields' => array(
  1287. array(
  1288. 'type' => $userSelectType,
  1289. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1290. 'name' => 'sabnzbdHomeAuth',
  1291. 'value' => SABNZBDHOMEAUTH,
  1292. 'options' => $userTypes,
  1293. ),
  1294. array(
  1295. 'type' => 'text',
  1296. 'placeholder' => 'http://hostname:8080/sabnzbd',
  1297. 'labelTranslate' => 'SABNZBD_URL',
  1298. 'assist' => 'http://hostname:8080 | http://hostname/sabnzbd | http://hostname:8080/sabnzbd',
  1299. 'name' => 'sabnzbdURL',
  1300. 'pattern' => $urlPattern,
  1301. 'value' => SABNZBDURL,
  1302. ),
  1303. array(
  1304. 'type' => 'text',
  1305. 'placeholder' => randString(32),
  1306. 'labelTranslate' => 'SABNZBD_KEY',
  1307. 'name' => 'sabnzbdKey',
  1308. 'value' => SABNZBDKEY,
  1309. ),
  1310. array(
  1311. 'type' => $userSelectType,
  1312. 'labelTranslate' => 'DOWNLOAD_REFRESH',
  1313. 'name' => 'downloadRefresh',
  1314. 'value' => DOWNLOADREFRESH,
  1315. 'options' => $refreshSeconds,
  1316. ),
  1317. array(
  1318. 'type' => $userSelectType,
  1319. 'labelTranslate' => 'HISTORY_REFRESH',
  1320. 'name' => 'historyRefresh',
  1321. 'value' => HISTORYREFRESH,
  1322. 'options' => $refreshSeconds,
  1323. ),
  1324. ),
  1325. ),
  1326. array(
  1327. 'title' => 'nzbGET',
  1328. 'id' => 'nzbget',
  1329. 'image' => 'images/nzbget.png',
  1330. 'fields' => array(
  1331. array(
  1332. 'type' => $userSelectType,
  1333. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1334. 'name' => 'nzbgetHomeAuth',
  1335. 'value' => NZBGETHOMEAUTH,
  1336. 'options' => $userTypes,
  1337. ),
  1338. array(
  1339. 'type' => 'text',
  1340. 'placeholder' => 'http://hostname:6789',
  1341. 'labelTranslate' => 'NZBGET_URL',
  1342. 'assist' => 'http://hostname:6789',
  1343. 'name' => 'nzbgetURL',
  1344. 'pattern' => $urlPattern,
  1345. 'value' => NZBGETURL,
  1346. ),
  1347. array(
  1348. 'type' => 'text',
  1349. 'labelTranslate' => 'USERNAME',
  1350. 'name' => 'nzbgetUsername',
  1351. 'value' => NZBGETUSERNAME,
  1352. ),
  1353. array(
  1354. 'type' => 'password',
  1355. 'labelTranslate' => 'PASSWORD',
  1356. 'name' => 'nzbgetPassword',
  1357. 'value' => (empty(NZBGETPASSWORD)?'':randString(20)),
  1358. ),
  1359. array(
  1360. 'type' => $userSelectType,
  1361. 'labelTranslate' => 'DOWNLOAD_REFRESH',
  1362. 'name' => 'downloadRefresh',
  1363. 'value' => DOWNLOADREFRESH,
  1364. 'options' => $refreshSeconds,
  1365. ),
  1366. array(
  1367. 'type' => $userSelectType,
  1368. 'labelTranslate' => 'HISTORY_REFRESH',
  1369. 'name' => 'historyRefresh',
  1370. 'value' => HISTORYREFRESH,
  1371. 'options' => $refreshSeconds,
  1372. ),
  1373. ),
  1374. ),
  1375. array(
  1376. 'title' => 'Calendar',
  1377. 'id' => 'calendar',
  1378. 'image' => 'images/calendar.png',
  1379. 'fields' => array(
  1380. array(
  1381. 'type' => 'select',
  1382. 'labelTranslate' => 'CALENDAR_START_DAY',
  1383. 'name' => 'calendarStart',
  1384. 'value' => CALENDARSTART,
  1385. 'options' => array(
  1386. explode('|', translate('DAYS'))[0] => '0',
  1387. explode('|', translate('DAYS'))[1] => '1',
  1388. explode('|', translate('DAYS'))[2] => '2',
  1389. explode('|', translate('DAYS'))[3] => '3',
  1390. explode('|', translate('DAYS'))[4] => '4',
  1391. explode('|', translate('DAYS'))[5] => '5',
  1392. explode('|', translate('DAYS'))[6] => '6',
  1393. ),
  1394. ),
  1395. array(
  1396. 'type' => 'select',
  1397. 'labelTranslate' => 'DEFAULT',
  1398. 'name' => 'calendarView',
  1399. 'value' => CALENDARVIEW,
  1400. 'options' => array(
  1401. translate('MONTH') => 'month',
  1402. translate('DAY') => 'basicDay',
  1403. translate('WEEK') => 'basicWeek',
  1404. ),
  1405. ),
  1406. array(
  1407. 'type' => 'select',
  1408. 'labelTranslate' => 'CALTIMEFORMAT',
  1409. 'name' => 'calTimeFormat',
  1410. 'value' => CALTIMEFORMAT,
  1411. 'options' => array(
  1412. '6p' => 'h(:mm)t',
  1413. '6:00p' => 'h:mmt',
  1414. '6:00' => 'h:mm',
  1415. '18' => 'H(:mm)',
  1416. '18:00' => 'H:mm',
  1417. ),
  1418. ),
  1419. array(
  1420. 'type' => 'number',
  1421. 'placeholder' => '10',
  1422. 'labelTranslate' => 'CALENDAR_START_DATE',
  1423. 'name' => 'calendarStartDay',
  1424. 'pattern' => '[1-9][0-9]+',
  1425. 'value' => CALENDARSTARTDAY,
  1426. ),
  1427. array(
  1428. 'type' => 'number',
  1429. 'placeholder' => '10',
  1430. 'labelTranslate' => 'CALENDAR_END_DATE',
  1431. 'name' => 'calendarEndDay',
  1432. 'pattern' => '[1-9][0-9]+',
  1433. 'value' => CALENDARENDDAY,
  1434. ),
  1435. array(
  1436. 'type' => $userSelectType,
  1437. 'labelTranslate' => 'CALENDAR_REFRESH',
  1438. 'name' => 'calendarRefresh',
  1439. 'value' => CALENDARREFRESH,
  1440. 'options' => $refreshSeconds,
  1441. ),
  1442. ),
  1443. ),
  1444. array(
  1445. 'title' => 'Notice',
  1446. 'id' => 'notice',
  1447. 'image' => 'images/pin.png',
  1448. 'fields' => array(
  1449. array(
  1450. 'type' => $userSelectType,
  1451. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1452. 'name' => 'homepageNoticeAuth',
  1453. 'value' => HOMEPAGENOTICEAUTH,
  1454. 'options' => $userTypes,
  1455. ),
  1456. array(
  1457. 'type' => $userSelectType,
  1458. 'labelTranslate' => 'NOTICE_LAYOUT',
  1459. 'name' => 'homepageNoticeLayout',
  1460. 'value' => HOMEPAGENOTICELAYOUT,
  1461. 'options' => array(
  1462. 'Elegant' => 'elegant',
  1463. 'Basic' => 'basic',
  1464. 'Jumbotron' => 'jumbotron',
  1465. ),
  1466. ),
  1467. array(
  1468. 'type' => $userSelectType,
  1469. 'labelTranslate' => 'NOTICE_COLOR',
  1470. 'name' => 'homepageNoticeType',
  1471. 'value' => HOMEPAGENOTICETYPE,
  1472. 'options' => array(
  1473. 'Green' => 'success',
  1474. 'Blue' => 'primary',
  1475. 'Gray' => 'gray',
  1476. 'Red' => 'danger',
  1477. 'Yellow' => 'warning',
  1478. 'Light Blue' => 'info',
  1479. ),
  1480. ),
  1481. array(
  1482. 'type' => 'text',
  1483. 'labelTranslate' => 'NOTICE_TITLE',
  1484. 'name' => 'homepageNoticeTitle',
  1485. 'value' => HOMEPAGENOTICETITLE,
  1486. ),
  1487. /*array(
  1488. 'type' => 'textarea',
  1489. 'labelTranslate' => 'NOTICE_MESSAGE',
  1490. 'name' => 'homepageNoticeMessage',
  1491. 'value' => HOMEPAGENOTICEMESSAGE,
  1492. 'rows' => 5,
  1493. 'class' => 'material no-code',
  1494. ),*/
  1495. array(
  1496. 'type' => 'custom',
  1497. 'labelTranslate' => 'NOTICE_MESSAGE',
  1498. 'html' => '<div class="summernote" name="homepageNoticeMessage">'.HOMEPAGENOTICEMESSAGE.'</div>',
  1499. ),
  1500. array(
  1501. 'type' => 'custom',
  1502. 'html' => '<h2>Not Logged In/Guest Notice</h2>',
  1503. ),
  1504. array(
  1505. 'type' => $userSelectType,
  1506. 'labelTranslate' => 'NOTICE_LAYOUT',
  1507. 'name' => 'homepageNoticeLayoutGuest',
  1508. 'value' => HOMEPAGENOTICELAYOUTGUEST,
  1509. 'options' => array(
  1510. 'Elegant' => 'elegant',
  1511. 'Basic' => 'basic',
  1512. 'Jumbotron' => 'jumbotron',
  1513. ),
  1514. ),
  1515. array(
  1516. 'type' => $userSelectType,
  1517. 'labelTranslate' => 'NOTICE_COLOR',
  1518. 'name' => 'homepageNoticeTypeGuest',
  1519. 'value' => HOMEPAGENOTICETYPEGUEST,
  1520. 'options' => array(
  1521. 'Green' => 'success',
  1522. 'Blue' => 'primary',
  1523. 'Gray' => 'gray',
  1524. 'Red' => 'danger',
  1525. 'Yellow' => 'warning',
  1526. 'Light Blue' => 'info',
  1527. ),
  1528. ),
  1529. array(
  1530. 'type' => 'text',
  1531. 'labelTranslate' => 'NOTICE_TITLE',
  1532. 'name' => 'homepageNoticeTitleGuest',
  1533. 'value' => HOMEPAGENOTICETITLEGUEST,
  1534. ),
  1535. array(
  1536. 'type' => 'custom',
  1537. 'labelTranslate' => 'NOTICE_MESSAGE',
  1538. 'html' => '<div class="summernote" name="homepageNoticeMessageGuest">'.HOMEPAGENOTICEMESSAGEGUEST.'</div>',
  1539. ),
  1540. ),
  1541. ),
  1542. array(
  1543. 'title' => 'Ombi',
  1544. 'id' => 'ombiSettings',
  1545. 'image' => 'images/ombi.png',
  1546. 'fields' => array(
  1547. array(
  1548. 'type' => $userSelectType,
  1549. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1550. 'name' => 'ombiAuth',
  1551. 'value' => OMBIAUTH,
  1552. 'options' => $userTypes,
  1553. ),
  1554. array(
  1555. 'type' => 'text',
  1556. 'placeholder' => 'http://hostname:5000',
  1557. 'labelTranslate' => 'OMBI_URL',
  1558. 'assist' => 'http://hostname:5000 | http://hostname/ombi | http://hostname:5000/ombi',
  1559. 'name' => 'ombiURL',
  1560. 'pattern' => $urlPattern,
  1561. 'value' => OMBIURL,
  1562. ),
  1563. array(
  1564. 'type' => 'text',
  1565. 'placeholder' => randString(32),
  1566. 'labelTranslate' => 'OMBI_KEY',
  1567. 'name' => 'ombiKey',
  1568. 'value' => OMBIKEY,
  1569. ),
  1570. array(
  1571. 'type' => $userSelectType,
  1572. 'labelTranslate' => 'REQUEST_REFRESH',
  1573. 'name' => 'requestRefresh',
  1574. 'value' => REQUESTREFRESH,
  1575. 'options' => $refreshSeconds,
  1576. ),
  1577. array(
  1578. 'type' => 'checkbox',
  1579. 'labelTranslate' => 'REQUESTED_ONLY',
  1580. 'name' => 'requestedUserOnly',
  1581. 'value' => REQUESTEDUSERONLY,
  1582. ),
  1583. array(
  1584. 'type' => 'custom',
  1585. 'html' => '<h2>Requires Ombi V3.0.2165 & Above</h2>',
  1586. ),
  1587. ),
  1588. ),
  1589. array(
  1590. 'title' => 'Speed Test',
  1591. 'id' => 'speedTestSettings',
  1592. 'image' => 'images/settings/full-color/png/64px/speedometer.png',
  1593. 'fields' => array(
  1594. array(
  1595. 'type' => $userSelectType,
  1596. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1597. 'name' => 'speedtestAuth',
  1598. 'value' => SPEEDTESTAUTH,
  1599. 'options' => $userTypes,
  1600. ),
  1601. array(
  1602. 'type' => 'checkbox',
  1603. 'labelTranslate' => 'SPEED_TEST',
  1604. 'name' => 'speedTest',
  1605. 'value' => SPEEDTEST,
  1606. ),
  1607. array(
  1608. 'type' => 'custom',
  1609. 'html' => '<button id="open-speedtest" box="speed-box" 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-star"></i></span> History</button>',
  1610. 'name' => 'speed_test_history',
  1611. 'value' => '',
  1612. ),
  1613. ),
  1614. ),
  1615. array(
  1616. 'title' => 'Custom HTML 1',
  1617. 'id' => 'customhtml1',
  1618. 'image' => 'images/html.png',
  1619. 'fields' => array(
  1620. array(
  1621. 'type' => $userSelectType,
  1622. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  1623. 'name' => 'homepageCustomHTML1Auth',
  1624. 'value' => HOMEPAGECUSTOMHTML1AUTH,
  1625. 'options' => $userTypes,
  1626. ),
  1627. array(
  1628. 'type' => 'textarea',
  1629. 'labelTranslate' => 'CUSTOMHTML',
  1630. 'name' => 'homepageCustomHTML1',
  1631. 'value' => HOMEPAGECUSTOMHTML1,
  1632. 'rows' => 15,
  1633. 'style' => 'background: #000; color: #FFF;',
  1634. ),
  1635. ),
  1636. ),
  1637. array(
  1638. 'title' => 'Homepage Arrangement',
  1639. 'id' => 'homepageArrangement',
  1640. 'image' => 'images/settings/full-color/png/64px/news.png',
  1641. 'fields' => array(
  1642. array(
  1643. 'type' => 'custom',
  1644. 'html' => buildHomepageSettings(),
  1645. ),
  1646. ),
  1647. ),
  1648. ),
  1649. )
  1650. );
  1651. ?>
  1652. </div>
  1653. <div class="email-content advanced-box white-bg">
  1654. <?php
  1655. $backendOptions = array();
  1656. foreach (array_filter(get_defined_functions()['user'],function($v) { return strpos($v, 'plugin_auth_') === 0; }) as $value) {
  1657. $name = str_replace('plugin_auth_','',$value);
  1658. if (strpos($name, 'disabled') === false) {
  1659. $backendOptions[ucwords(str_replace('_',' ',$name))] = $name;
  1660. } else {
  1661. $backendOptions[$value()] = array(
  1662. 'value' => randString(),
  1663. 'disabled' => true,
  1664. );
  1665. }
  1666. }
  1667. ksort($backendOptions);
  1668. echo buildSettings(
  1669. array(
  1670. 'title' => 'Advanced Settings',
  1671. 'id' => 'advanced_settings',
  1672. 'onready' => '$(\'#authType_id\').trigger(\'change\')',
  1673. 'tabs' => array(
  1674. array(
  1675. 'title' => 'Backend Authentication',
  1676. 'id' => 'be_auth',
  1677. 'image' => 'images/security.png',
  1678. 'fields' => array(
  1679. array(
  1680. 'type' => 'select',
  1681. 'labelTranslate' => 'AUTHTYPE',
  1682. 'name' => 'authType',
  1683. 'value' => AUTHTYPE,
  1684. '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.\') } ',
  1685. 'options' => array(
  1686. 'Organizr' => 'internal',
  1687. (AUTHBACKEND) ? 'Organizr & '.ucwords(AUTHBACKEND) : 'Organizr & Backend' => 'both',
  1688. (AUTHBACKEND) ? ucwords(AUTHBACKEND)." Only" : "Backend Only" => 'external',
  1689. ),
  1690. ),
  1691. array(
  1692. 'type' => 'select',
  1693. 'labelTranslate' => 'AUTHBACKEND',
  1694. 'name' => 'authBackend',
  1695. 'onchange' => '$(\'.be-auth\').each(function() { $(this).parent().hide(); }); $(\'.be-auth-\'+this.value).each(function() { $(this).parent().show(); });',
  1696. 'value' => AUTHBACKEND,
  1697. 'options' => $backendOptions,
  1698. ),
  1699. array(
  1700. 'type' => 'select',
  1701. 'labelTranslate' => 'AUTHBACKENDCREATE',
  1702. 'name' => 'authBackendCreate',
  1703. 'value' => AUTHBACKENDCREATE,
  1704. 'options' => array(
  1705. translate('YES_CREATE') => 'true',
  1706. translate('NO_CREATE') => 'false',
  1707. ),
  1708. ),
  1709. array(
  1710. 'type' => 'text',
  1711. 'placeholder' => 'http://hostname:8181',
  1712. 'labelTranslate' => 'AUTHBACKENDHOST',
  1713. 'assist' => 'http(s)://hostname:8181 | Ldap(s)://localhost:389 | ftp(s)://localhost:21',
  1714. 'name' => 'authBackendHost',
  1715. 'class' => 'be-auth be-auth-ftp be-auth-ldap',
  1716. 'pattern' => '((?:[hH][tT][tT][pP]|[lL][dD][aA][pP]|[fF][tT][pP])[sS]?):\/\/([\w\.]{1,250})(?::(\d{1,5}))?((?:\/[^?.\s]+))?',
  1717. 'value' => AUTHBACKENDHOST,
  1718. ),
  1719. array(
  1720. 'type' => 'text',
  1721. 'placeholder' => 'domain',
  1722. 'labelTranslate' => 'AUTHBACKENDDOMAIN',
  1723. 'name' => 'authBackendDomain',
  1724. 'class' => 'be-auth be-auth-ldap',
  1725. 'value' => AUTHBACKENDDOMAIN,
  1726. ),
  1727. array(
  1728. 'type' => 'text',
  1729. 'placeholder' => 'domain & format',
  1730. 'labelTranslate' => 'AUTHBACKENDDOMAINFORMAT',
  1731. 'name' => 'authBackendDomainFormat',
  1732. 'class' => 'be-auth be-auth-ldap',
  1733. 'value' => AUTHBACKENDDOMAINFORMAT,
  1734. ),
  1735. array(
  1736. 'type' => 'text',
  1737. 'placeholder' => 'http://hostname:8096/emby',
  1738. 'labelTranslate' => 'EMBY_URL',
  1739. 'assist' => 'http://hostname:8096 | https://hostname/emby | http://hostname:8096/emby',
  1740. 'class' => 'be-auth be-auth-emby_local be-auth-emby_all be-auth-emby_connect',
  1741. 'name' => 'embyURL',
  1742. 'pattern' => $urlPattern,
  1743. 'value' => EMBYURL,
  1744. ),
  1745. array(
  1746. 'type' => 'text',
  1747. 'placeholder' => randString(32),
  1748. 'labelTranslate' => 'EMBY_TOKEN',
  1749. 'name' => 'embyToken',
  1750. 'class' => 'be-auth be-auth-emby_all be-auth-emby_connect',
  1751. 'pattern' => '[a-zA-Z0-9]{32}',
  1752. 'value' => EMBYTOKEN,
  1753. ),
  1754. array(
  1755. 'type' => 'text',
  1756. 'labelTranslate' => 'PLEX_USERNAME',
  1757. 'name' => 'plexUsername',
  1758. 'class' => 'be-auth be-auth-plex',
  1759. 'value' => PLEXUSERNAME,
  1760. ),
  1761. array(
  1762. 'type' => 'password',
  1763. 'labelTranslate' => 'PLEX_PASSWORD',
  1764. 'name' => 'plexPassword',
  1765. 'class' => 'be-auth be-auth-plex',
  1766. 'value' => (empty(PLEXPASSWORD)?'':randString(20)),
  1767. ),
  1768. array(
  1769. 'type' => 'text',
  1770. 'labelTranslate' => 'ORGANIZR_API_KEY',
  1771. 'name' => 'organizrAPI',
  1772. 'value' => ORGANIZRAPI,
  1773. ),
  1774. array(
  1775. 'type' => 'button',
  1776. 'id' => 'generateAPI',
  1777. 'labelTranslate' => 'GENERATE_API_KEY',
  1778. 'icon' => 'key',
  1779. 'onclick' => 'var code = generateCode(); $(\'#organizrAPI_id\').val(code); $(\'#organizrAPI_id\').attr(\'data-changed\', \'true\');',
  1780. ),
  1781. ),
  1782. ),
  1783. array(
  1784. 'title' => 'Super Advanced',
  1785. 'id' => 'super_advanced',
  1786. 'image' => 'images/gear.png',
  1787. 'fields' => array(
  1788. array(
  1789. 'type' => 'text',
  1790. 'placeholder' => '/home/www-data/',
  1791. 'labelTranslate' => 'DATABASE_PATH',
  1792. 'name' => 'database_Location',
  1793. 'value' => DATABASE_LOCATION,
  1794. ),
  1795. array(
  1796. 'type' => 'select',
  1797. 'labelTranslate' => 'SET_TIMEZONE',
  1798. 'name' => 'timezone',
  1799. 'value' => TIMEZONE,
  1800. 'options' => timezoneOptions(),
  1801. ),
  1802. array(
  1803. 'type' => 'text',
  1804. 'labelTranslate' => 'REGISTER_PASSWORD',
  1805. 'name' => 'registerPassword',
  1806. 'value' => REGISTERPASSWORD,
  1807. ),
  1808. array(
  1809. 'type' => 'text',
  1810. 'labelTranslate' => 'COOKIE_DOMAIN',
  1811. 'name' => 'domain',
  1812. 'value' => DOMAIN,
  1813. ),
  1814. array(
  1815. 'type' => 'password',
  1816. 'labelTranslate' => 'COOKIE_PASSWORD',
  1817. 'name' => 'cookiePassword',
  1818. 'value' => (empty(COOKIEPASSWORD)?'':randString(20)),
  1819. ),
  1820. array(
  1821. 'type' => 'text',
  1822. 'labelTranslate' => 'IPINFO_TOKEN',
  1823. 'name' => 'ipInfoToken',
  1824. 'value' => IPINFOTOKEN,
  1825. ),
  1826. array(
  1827. 'type' => 'select',
  1828. 'labelTranslate' => 'GIT_BRANCH',
  1829. 'placeholder' => 'Default: \'master\' - Development: \'develop\' OR \'cero-dev\'',
  1830. 'id' => 'git_branch_id',
  1831. 'name' => 'git_branch',
  1832. 'value' => GIT_BRANCH,
  1833. 'options' => $branchTypes,
  1834. ),
  1835. array(
  1836. array(
  1837. 'type' => 'checkbox',
  1838. 'labelTranslate' => 'GIT_CHECK',
  1839. 'name' => 'git_check',
  1840. 'value' => GIT_CHECK,
  1841. ),
  1842. array(
  1843. 'type' => 'button',
  1844. 'id' => 'gitForceInstall',
  1845. 'style' => (extension_loaded("ZIP")) ? "" : "display : none",
  1846. 'labelTranslate' => 'GIT_FORCE',
  1847. 'icon' => 'gear',
  1848. '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\'); } }',
  1849. ),
  1850. ),
  1851. ),
  1852. ),
  1853. array(
  1854. 'title' => 'Mail Settings',
  1855. 'id' => 'mail_settings',
  1856. 'image' => 'images/mail.png',
  1857. 'fields' => array(
  1858. array(
  1859. 'type' => 'text',
  1860. 'placeholder' => 'mail.provider.com',
  1861. 'labelTranslate' => 'SMTP_HOST',
  1862. 'name' => 'smtpHost',
  1863. 'pattern' => '([\w\.\-]{1,250})',
  1864. 'value' => SMTPHOST,
  1865. ),
  1866. array(
  1867. 'type' => 'number',
  1868. 'placeholder' => 'port # i.e. 465',
  1869. 'labelTranslate' => 'SMTP_HOST_PORT',
  1870. 'name' => 'smtpHostPort',
  1871. 'value' => SMTPHOSTPORT,
  1872. ),
  1873. array(
  1874. 'type' => 'text',
  1875. 'labelTranslate' => 'SMTP_HOST_USERNAME',
  1876. 'name' => 'smtpHostUsername',
  1877. 'value' => SMTPHOSTUSERNAME,
  1878. ),
  1879. array(
  1880. 'type' => 'password',
  1881. 'labelTranslate' => 'SMTP_HOST_PASSWORD',
  1882. 'name' => 'smtpHostPassword',
  1883. 'value' => (empty(SMTPHOSTPASSWORD)?'':randString(20)),
  1884. ),
  1885. array(
  1886. 'type' => 'text',
  1887. 'labelTranslate' => 'SMTP_HOST_SENDER_NAME',
  1888. 'name' => 'smtpHostSenderName',
  1889. 'value' => SMTPHOSTSENDERNAME,
  1890. ),
  1891. array(
  1892. 'type' => 'text',
  1893. 'labelTranslate' => 'SMTP_HOST_SENDER_EMAIL',
  1894. 'name' => 'smtpHostSenderEmail',
  1895. 'value' => SMTPHOSTSENDEREMAIL,
  1896. ),
  1897. array(
  1898. 'type' => 'select',
  1899. 'labelTranslate' => 'SMTP_HOST_AUTH',
  1900. 'name' => 'smtpHostType',
  1901. 'value' => SMTPHOSTTYPE,
  1902. 'options' => array(
  1903. 'ssl' => 'ssl',
  1904. 'tls' => 'tls',
  1905. 'off' => 'false',
  1906. ),
  1907. ),
  1908. array(
  1909. array(
  1910. 'type' => 'button',
  1911. 'labelTranslate' => 'TEST_EMAIL',
  1912. 'id' => 'testEmail',
  1913. 'icon' => 'flask',
  1914. ),
  1915. array(
  1916. 'type' => 'checkbox',
  1917. 'labelTranslate' => 'SMTP_HOST_AUTH',
  1918. 'name' => 'smtpHostAuth',
  1919. 'value' => SMTPHOSTAUTH,
  1920. ),
  1921. array(
  1922. 'type' => 'checkbox',
  1923. 'labelTranslate' => 'ENABLE_MAIL',
  1924. 'name' => 'enableMail',
  1925. 'value' => ENABLEMAIL,
  1926. ),
  1927. ),
  1928. ),
  1929. ),
  1930. array(
  1931. 'title' => 'Advanced Visual',
  1932. 'id' => 'advanced_visual',
  1933. 'image' => 'images/paint.png',
  1934. 'fields' => array(
  1935. array(
  1936. 'type' => 'text',
  1937. 'format' => 'text',
  1938. 'labelTranslate' => 'INSTALLED_THEME',
  1939. 'name' => 'installedTheme',
  1940. 'id' => 'installedTheme',
  1941. 'class' => 'text-center',
  1942. 'placeholder' => (empty(INSTALLEDTHEME)?'No Theme Installed':INSTALLEDTHEME),
  1943. 'value' => INSTALLEDTHEME,
  1944. 'disabled' => true,
  1945. ),
  1946. array(
  1947. 'type' => 'text',
  1948. 'placeholder' => 'images/organizr.png',
  1949. 'labelTranslate' => 'LOADING_ICON_URL',
  1950. 'name' => 'loadingIcon',
  1951. 'value' => LOADINGICON,
  1952. ),
  1953. array(
  1954. 'type' => 'text',
  1955. 'placeholder' => 'images/organizr.png',
  1956. 'labelTranslate' => 'LOGO_URL_TITLE',
  1957. 'name' => 'titleLogo',
  1958. 'value' => TITLELOGO,
  1959. ),
  1960. array(
  1961. 'type' => 'select',
  1962. 'labelTranslate' => 'NOTIFICATION_TYPE',
  1963. 'name' => 'notifyEffect',
  1964. 'onchange' => 'parent.notify(\'This is an example popup!\', \'bullhorn\', \'success\', 4000, this.value.split(\'-\')[0], this.value.split(\'-\')[1]);',
  1965. 'value' => NOTIFYEFFECT,
  1966. 'options' => array(
  1967. 'Slide From Top' => 'bar-slidetop',
  1968. 'Exploader From Top' => 'bar-exploader',
  1969. 'Flip' => 'attached-flip',
  1970. 'Bouncy Flip' => 'attached-bouncyflip',
  1971. 'Growl Scale' => 'growl-scale',
  1972. 'Growl Genie' => 'growl-genie',
  1973. 'Growl Jelly' => 'growl-jelly',
  1974. 'Growl Slide' => 'growl-slide',
  1975. 'Spinning Box' => 'other-boxspinner',
  1976. 'Sliding' => 'other-thumbslider',
  1977. ),
  1978. ),
  1979. array(
  1980. array(
  1981. 'type' => 'checkbox',
  1982. 'labelTranslate' => 'ENABLE_SPLASH_SCREEN',
  1983. 'name' => 'splash',
  1984. 'value' => SPLASH,
  1985. ),
  1986. array(
  1987. 'type' => 'checkbox',
  1988. 'labelTranslate' => 'ENABLE_LOADING_SCREEN',
  1989. 'name' => 'loadingScreen',
  1990. 'value' => LOADINGSCREEN,
  1991. ),
  1992. array(
  1993. 'type' => 'checkbox',
  1994. 'labelTranslate' => 'ENABLE_SLIMBAR',
  1995. 'name' => 'slimBar',
  1996. 'value' => SLIMBAR,
  1997. ),
  1998. array(
  1999. 'type' => 'checkbox',
  2000. 'labelTranslate' => 'GRAVATAR',
  2001. 'name' => 'gravatar',
  2002. 'value' => GRAVATAR,
  2003. ),
  2004. ),
  2005. ),
  2006. ),
  2007. array(
  2008. 'title' => 'Chat Settings',
  2009. 'id' => 'chat_settings',
  2010. 'image' => 'images/settings/full-color/png/64px/chat.png',
  2011. 'fields' => array(
  2012. array(
  2013. 'type' => $userSelectType,
  2014. 'labelTranslate' => 'CHAT_AUTH',
  2015. 'name' => 'chatAuth',
  2016. 'value' => CHATAUTH,
  2017. 'options' => $userTypes,
  2018. 'disabled' => (!extension_loaded('sqlite3')) ? true : false,
  2019. ),
  2020. array(
  2021. 'type' => 'checkbox',
  2022. 'labelTranslate' => (!extension_loaded('sqlite3')) ? 'SQLITE_NOT_INSTALLED' : 'ENABLE_CHAT',
  2023. 'name' => 'chat',
  2024. 'value' => CHAT,
  2025. 'disabled' => (!extension_loaded('sqlite3')) ? true : false,
  2026. ),
  2027. array(
  2028. 'type' => 'button',
  2029. 'id' => 'deleteChat',
  2030. 'labelTranslate' => 'DELETE_CHAT_DATABASE',
  2031. 'icon' => 'trash',
  2032. 'onclick' => 'ajax_request(\'POST\', \'deleteChat\');',
  2033. 'class' => 'btn-warning',
  2034. 'disabled' => (!extension_loaded('sqlite3')) ? true : false,
  2035. ),
  2036. ),
  2037. ),
  2038. array(
  2039. 'title' => 'Weather Settings',
  2040. 'id' => 'weather_settings',
  2041. 'image' => 'images/settings/full-color/png/64px/weather.png',
  2042. 'fields' => array(
  2043. array(
  2044. 'type' => $userSelectType,
  2045. 'labelTranslate' => 'WEATHER_AUTH',
  2046. 'name' => 'weatherAuth',
  2047. 'value' => WEATHERAUTH,
  2048. 'options' => $userTypes,
  2049. ),
  2050. array(
  2051. 'type' => 'checkbox',
  2052. 'labelTranslate' => 'ENABLE_WEATHER',
  2053. 'name' => 'weather',
  2054. 'value' => WEATHER,
  2055. ),
  2056. ),
  2057. ),
  2058. array(
  2059. 'title' => 'Backup Settings',
  2060. 'id' => 'backup_settings',
  2061. 'image' => 'images/backup.png',
  2062. 'fields' => array(
  2063. array(
  2064. array(
  2065. 'type' => 'button',
  2066. 'labelTranslate' => 'BACKUP_NOW',
  2067. 'id' => 'backupNow',
  2068. 'icon' => 'database',
  2069. 'style' => (extension_loaded("ZIP")) ? "margin-bottom: 5px;" : "display : none",
  2070. ),
  2071. ),
  2072. array(
  2073. 'type' => 'textarea',
  2074. 'labelTranslate' => 'BACKUP_LIST',
  2075. 'name' => 'backupList',
  2076. 'value' => (extension_loaded("ZIP")) ? implode("\n",getBackups()) : "PLEASE ENABLE PHP ZIP",
  2077. 'rows' => 15,
  2078. 'style' => 'background: #000; color: #FFF;pointer-events: none',
  2079. ),
  2080. ),
  2081. ),
  2082. ),
  2083. )
  2084. );
  2085. ?>
  2086. </div>
  2087. <div class="email-content donate-box white-bg">
  2088. <div class="email-body">
  2089. <div class="email-header gray-bg">
  2090. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  2091. <h1>Donate To Organizr</h1>
  2092. </div>
  2093. <div class="email-inner small-box">
  2094. <div class="email-inner-section">
  2095. <div class="small-box fade in" id="donate-org">
  2096. <div class="row">
  2097. <div class="col-lg-12">
  2098. <div class="big-box">
  2099. <div class="jumbotron">
  2100. <div class="container">
  2101. <h2><strong>Hey There <em class="gray"><?php echo ucwords($USER->username);?></em>,</strong></h2>
  2102. <br/>
  2103. <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>
  2104. <br/><br/>
  2105. <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>
  2106. <br/><br/>
  2107. <p class="pull-right"><i class="fa fa-heart fa-1x red loop-animation animated pulse" aria-hidden="true"></i> CauseFX</p>
  2108. </div>
  2109. </div>
  2110. </div>
  2111. </div>
  2112. </div>
  2113. <div class="row">
  2114. <div class="col-sm-4 col-lg-4">
  2115. <div class="content-box ultra-widget blue-bg" style="cursor: pointer;" onclick="window.open('https://paypal.me/causefx', '_blank')">
  2116. <div class="w-content big-box">
  2117. <div class="w-progress">
  2118. <span class="w-amount">PayPal</span>
  2119. <br>
  2120. <span class="text-uppercase w-name">Donate with PayPal</span>
  2121. </div>
  2122. <span class="w-refresh w-p-icon">
  2123. <span class="fa-stack fa-lg">
  2124. <i class="fa fa-square fa-stack-2x"></i>
  2125. <i class="fa fa-paypal blue fa-stack-1x fa-inverse"></i>
  2126. </span>
  2127. </span>
  2128. </div>
  2129. </div>
  2130. </div>
  2131. <div class="col-sm-4 col-lg-4">
  2132. <div class="content-box ultra-widget green-bg" style="cursor: pointer;" onclick="window.open('https://cash.me/$causefx', '_blank')">
  2133. <div class="w-content big-box">
  2134. <div class="w-progress">
  2135. <span class="w-amount">Square</span>
  2136. <br>
  2137. <span class="text-uppercase w-name">Donate with Square Cash</span>
  2138. </div>
  2139. <span class="w-refresh w-p-icon">
  2140. <span class="fa-stack fa-lg">
  2141. <i class="fa fa-square fa-stack-2x"></i>
  2142. <i class="fa fa-dollar green fa-stack-1x fa-inverse"></i>
  2143. </span>
  2144. </span>
  2145. </div>
  2146. </div>
  2147. </div>
  2148. <div class="col-sm-4 col-lg-4">
  2149. <div class="content-box ultra-widget red-bg">
  2150. <div class="w-content big-box">
  2151. <div class="w-progress">
  2152. <span class="w-amount">BitCoin</span>
  2153. <small class="text-uppercase">1JLWKsSgDDKdnLjPWbnxfQmCxi8uUohzVv</small>
  2154. </div>
  2155. <span class="w-refresh w-p-icon">
  2156. <span class="fa-stack fa-lg">
  2157. <i class="fa fa-square fa-stack-2x"></i>
  2158. <i class="fa fa-btc red fa-stack-1x fa-inverse"></i>
  2159. </span>
  2160. </span>
  2161. </div>
  2162. </div>
  2163. </div>
  2164. </div>
  2165. </div>
  2166. </div>
  2167. </div>
  2168. </div>
  2169. </div>
  2170. <div class="email-content themes-box white-bg">
  2171. <div class="email-body">
  2172. <div class="email-header gray-bg">
  2173. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  2174. <h1>Themes</h1>
  2175. </div>
  2176. <div class="email-inner small-box">
  2177. <div class="email-inner-section">
  2178. <div class="small-box fade in" id="layerCakeOrg">
  2179. <div class="row">
  2180. <div class="col-lg-2">
  2181. <div class="content-box profile-sidebar box-shadow">
  2182. <img src="images/organizr-logo-h-d.png" width="100%" style="margin-top: -10px;">
  2183. <div class="profile-usermenu">
  2184. <ul class="nav" id="theme-list"></ul>
  2185. </div>
  2186. </div>
  2187. </div>
  2188. <div class="col-lg-10">
  2189. <h1 id="chooseLayer">Choose A Theme To Preview</h1>
  2190. <div class="row">
  2191. <div id="layerCakePreview" class="col-lg-10"></div>
  2192. <div id="layerCakeInfo" class="col-lg-2"></div>
  2193. </div>
  2194. </div>
  2195. </div>
  2196. </div>
  2197. </div>
  2198. </div>
  2199. </div>
  2200. </div>
  2201. <div class="email-content email-box white-bg"><!-- $('.email-box').find('.panel-body').html(); -->
  2202. <div class="email-body">
  2203. <div class="email-header gray-bg">
  2204. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  2205. <h1>E-Mail Users</h1>
  2206. </div>
  2207. <div class="email-inner small-box">
  2208. <div class="email-inner-section">
  2209. <div class="small-box fade in">
  2210. <div class="mail-header">
  2211. <p>
  2212. <button class="btn btn-success waves generateEmails">Choose Users</button>
  2213. <button id="selectAllEmail" style="display: none;" class="btn btn-success waves">Select All</button>
  2214. </p>
  2215. <div style="display: none;"class="form-group" id="emailSelect">
  2216. <select multiple="true" size="10" id="email-users" class="form-control"></select>
  2217. </div>
  2218. <div class="form-group">
  2219. <input type="text" class="form-control material" id="mailTo" placeholder="To">
  2220. </div>
  2221. <div class="form-group">
  2222. <input type="text" class="form-control material" id="subject" placeholder="Subject">
  2223. </div>
  2224. </div>
  2225. <div class="summernote"></div>
  2226. <button id="sendEmail" class="btn btn-success waves">Send</button>
  2227. </div>
  2228. </div>
  2229. </div>
  2230. </div>
  2231. </div>
  2232. <div class="email-content speed-box white-bg">
  2233. <div class="email-body">
  2234. <div class="email-header gray-bg">
  2235. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  2236. <h1>SpeedTest History</h1>
  2237. </div>
  2238. <div class="email-inner small-box">
  2239. <div class="email-inner-section">
  2240. <div class="small-box fade in" id="speedOrg">
  2241. <div class="row">
  2242. <div class="col-lg-12">
  2243. <div class="content-box">
  2244. <div class="content-title big-box i-block"></div>
  2245. <div class="clearfix"></div>
  2246. <div class="big-box">
  2247. <div id="morris-line" class="morris-container"></div>
  2248. </div>
  2249. </div>
  2250. </div>
  2251. </div>
  2252. <?php if(file_exists(DATABASE_LOCATION."speedtest.db")){ ?>
  2253. <div id="speedTestTable" class="table-responsive">
  2254. <table id="speedLogs" class="datatable display">
  2255. <thead>
  2256. <tr>
  2257. <th><?php echo $language->translate("DATE");?></th>
  2258. <th><?php echo $language->translate("IP");?></th>
  2259. <th><?php echo $language->translate("DOWNLOAD");?></th>
  2260. <th><?php echo $language->translate("UPLOAD");?></th>
  2261. <th><?php echo $language->translate("PING");?></th>
  2262. <th><?php echo $language->translate("JITTER");?></th>
  2263. </tr>
  2264. </thead>
  2265. <tbody><?php echo speedTestDisplay(speedTestData(),"table");?></tbody>
  2266. </table>
  2267. </div>
  2268. <?php } ?>
  2269. </div>
  2270. </div>
  2271. </div>
  2272. </div>
  2273. </div>
  2274. <div class="email-content info-box white-bg">
  2275. <div class="email-body">
  2276. <div class="email-header gray-bg">
  2277. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  2278. <h1>About Organizr</h1>
  2279. </div>
  2280. <div class="email-inner small-box">
  2281. <div class="email-inner-section">
  2282. <div class="small-box fade in" id="about">
  2283. <h4><img src="images/organizr-logo-h-d.png" height="50px"></h4>
  2284. <p id="version"></p>
  2285. <p id="submitFeedback">
  2286. <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>
  2287. <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>
  2288. <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>
  2289. <a href='https://discord.gg/XvbT6nz' 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>
  2290. <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>
  2291. <!--<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>-->
  2292. </p>
  2293. <div class="modal fade Help-Me-modal-lg" tabindex="-1" role="dialog">
  2294. <div class="modal-dialog modal-lg" role="document">
  2295. <div class="modal-content" style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;">
  2296. <div class="modal-header">
  2297. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  2298. <h4 class="modal-title"><?php echo $language->translate("HELP");?>!</h4>
  2299. </div>
  2300. <div class="modal-body" style="background: <?php echo $sidebar;?> !important;">
  2301. <div style="margin-bottom: 0px;" class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  2302. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  2303. <div class="panel-heading" role="tab" id="headingOne">
  2304. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
  2305. <?php echo $language->translate("ADDING_TABS");?>
  2306. </h4>
  2307. </div>
  2308. <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true">
  2309. <div class="panel-body">
  2310. <p><?php echo $language->translate("START_ADDING_TABS");?></p>
  2311. <ul>
  2312. <li><strong><?php echo $language->translate("TAB_URL");?></strong> <?php echo $language->translate("TAB_URL_ABOUT");?></li>
  2313. <li><strong><?php echo $language->translate("ICON_URL");?></strong> <?php echo $language->translate("ICON_URL_ABOUT");?></li>
  2314. <li><strong><?php echo $language->translate("DEFAULT");?></strong> <?php echo $language->translate("DEFAULT_ABOUT");?></li>
  2315. <li><strong><?php echo $language->translate("ACTIVE");?></strong> <?php echo $language->translate("ACTIVE_ABOUT");?></li>
  2316. <li><strong><?php echo $language->translate("USER");?></strong> <?php echo $language->translate("USER_ABOUT");?></li>
  2317. <li><strong><?php echo $language->translate("GUEST");?></strong> <?php echo $language->translate("GUEST_ABOUT");?></li>
  2318. <li><strong><?php echo $language->translate("NO_IFRAME");?></strong> <?php echo $language->translate("NO_IFRAME_ABOUT");?></li>
  2319. </ul>
  2320. </div>
  2321. </div>
  2322. </div>
  2323. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  2324. <div class="panel-heading" role="tab" id="headingTwo">
  2325. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
  2326. <?php echo $language->translate("QUICK_ACCESS");?>
  2327. </h4>
  2328. </div>
  2329. <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo" aria-expanded="true">
  2330. <div class="panel-body">
  2331. <p><?php echo $language->translate("QUICK_ACCESS_ABOUT");?> <mark><?php echo getServerPath(); ?>#Sonarr</mark></p>
  2332. </div>
  2333. </div>
  2334. </div>
  2335. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  2336. <div class="panel-heading" role="tab" id="headingThree">
  2337. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
  2338. <?php echo $language->translate("SIDE_BY_SIDE");?>
  2339. </h4>
  2340. </div>
  2341. <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree" aria-expanded="true">
  2342. <div class="panel-body">
  2343. <p><?php echo $language->translate("SIDE_BY_SIDE_ABOUT");?></p>
  2344. <ul>
  2345. <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS1");?></li>
  2346. <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS2");?> [<i class='mdi mdi-refresh'></i>]</li>
  2347. <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS3");?></li>
  2348. </ul>
  2349. </div>
  2350. </div>
  2351. </div>
  2352. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  2353. <div class="panel-heading" role="tab" id="headingFour">
  2354. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
  2355. <?php echo $language->translate("KEYBOARD_SHORTCUTS");?>
  2356. </h4>
  2357. </div>
  2358. <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour" aria-expanded="true">
  2359. <div class="panel-body">
  2360. <p><?php echo $language->translate("KEYBOARD_SHORTCUTS_ABOUT");?></p>
  2361. <ul>
  2362. <li><keyboard class="key"><span>S</span></keyboard> + <keyboard class="key"><span>S</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS1");?></li>
  2363. <li><keyboard class="key"><span>F</span></keyboard> + <keyboard class="key"><span>F</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS6");?></li>
  2364. <li><keyboard class="key"><span>P</span></keyboard> + <keyboard class="key"><span>P</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS7");?></li>
  2365. <li><keyboard class="key"><span>M</span></keyboard> + <keyboard class="key"><span>M</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS8");?></li>
  2366. <li><keyboard class="key wide"><span>Ctrl</span></keyboard> + <keyboard class="key wide"><span>Shift</span></keyboard> + <keyboard class="key"><span>&darr;</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS2");?></li>
  2367. <li><keyboard class="key wide"><span>Ctrl</span></keyboard> + <keyboard class="key wide"><span>Shift</span></keyboard> + <keyboard class="key"><span>&uarr;</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS3");?></li>
  2368. <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>
  2369. <li><keyboard class="key wide"><span>Esc</span></keyboard> + <keyboard class="key wide"><span>Esc</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS4");?></li>
  2370. </ul>
  2371. </div>
  2372. </div>
  2373. </div>
  2374. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  2375. <div class="panel-heading" role="tab" id="headingFive">
  2376. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
  2377. <?php echo $language->translate("TAB_NOT_LOADING");?>
  2378. </h4>
  2379. </div>
  2380. <div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive" aria-expanded="true">
  2381. <div class="panel-body">
  2382. <p><?php echo $language->translate("TAB_NOT_LOADING_ABOUT");?></p>
  2383. <?php
  2384. 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>";
  2385. 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>";
  2386. else : echo "Sorry, currently there is no other alternative for " . get_browser_name(); endif;
  2387. ?>
  2388. </div>
  2389. </div>
  2390. </div>
  2391. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  2392. <div class="panel-heading" role="tab" id="headingSix">
  2393. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="true" aria-controls="collapseSix">
  2394. <?php echo $language->translate("USER_ICONS");?>
  2395. </h4>
  2396. </div>
  2397. <div id="collapseSix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix" aria-expanded="true">
  2398. <div class="panel-body">
  2399. <p><?php echo $language->translate("USER_ICONS_ABOUT");?> <a href="http://gravatar.com" target="_blank">gravatar.com</a></p>
  2400. </div>
  2401. </div>
  2402. </div>
  2403. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  2404. <div class="panel-heading" role="tab" id="headingSeven">
  2405. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSeven" aria-expanded="true" aria-controls="collapseSeven">
  2406. <?php echo $language->translate("TRANSLATIONS");?>
  2407. </h4>
  2408. </div>
  2409. <div id="collapseSeven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSeven" aria-expanded="true">
  2410. <div class="panel-body">
  2411. <p><?php echo $language->translate("TRANSLATIONS_ABOUT");?> <a href="https://github.com/causefx/Organizr/tree/develop/lang" target="_blank">Github Develop Branch</a></p>
  2412. </div>
  2413. </div>
  2414. </div>
  2415. </div>
  2416. </div>
  2417. <div class="modal-footer">
  2418. <button type="button" class="btn special" style="background: transparent !important;color: transparent !important;">Special</button>
  2419. <button type="button" class="btn btn-default waves" data-dismiss="modal"><?php echo $language->translate("CLOSE");?></button>
  2420. </div>
  2421. </div>
  2422. </div>
  2423. </div>
  2424. <p id="whatsnew"></p>
  2425. <p id="downloadnow"></p>
  2426. <div id="deleteDiv" style="display: none;" class="panel panel-danger">
  2427. <div class="panel-heading">
  2428. <h3 class="panel-title"><?php echo $language->translate("DELETE_DATABASE");?></h3>
  2429. </div>
  2430. <div class="panel-body">
  2431. <div class="">
  2432. <p><?php echo $language->translate("DELETE_WARNING");?></p>
  2433. <form id="deletedb" method="post" onsubmit="ajax_request('POST', 'deleteDB'); return false;">
  2434. <button class="btn waves btn-labeled btn-danger pull-right text-uppercase waves-effect waves-float" type="submit">
  2435. <span class="btn-label"><i class="fa fa-trash"></i></span><?php echo $language->translate("DELETE_DATABASE");?>
  2436. </button>
  2437. </form>
  2438. </div>
  2439. </div>
  2440. </div>
  2441. <div class="timeline-container">
  2442. <div class="row">
  2443. <div class="col-lg-12">
  2444. <ul class="cbp_tmtimeline" id="versionHistory">
  2445. </ul>
  2446. <div class="btn-group-sm btn-group btn-group-justified">
  2447. <div id="loadMore" class="btn-group" role="group">
  2448. <button type="button" class="btn waves btn-primary waves-effect waves-float text-uppercase"><?php echo $language->translate("SHOW_MORE");?></button>
  2449. </div>
  2450. <div id="showLess" class="btn-group" role="group">
  2451. <button type="button" class="btn waves btn-warning waves-effect waves-float text-uppercase"><?php echo $language->translate("SHOW_LESS");?></button>
  2452. </div>
  2453. </div>
  2454. </div>
  2455. </div>
  2456. </div>
  2457. </div>
  2458. </div>
  2459. </div>
  2460. </div>
  2461. </div>
  2462. <div class="email-content users-box white-bg">
  2463. <div class="email-body">
  2464. <div class="email-header gray-bg">
  2465. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  2466. <h1>Users Management</h1>
  2467. </div>
  2468. <div class="email-inner small-box">
  2469. <div class="email-inner-section">
  2470. <div class="small-box fade in" id="useredit">
  2471. <div class="row">
  2472. <div class="col-lg-12">
  2473. <div class="small-box">
  2474. <form class="content-form form-inline" name="new user registration" id="registration" action="" method="POST">
  2475. <input type="hidden" name="op" value="register"/>
  2476. <input type="hidden" name="sha1" value=""/>
  2477. <input type="hidden" name="settings" value="true"/>
  2478. <div class="form-group">
  2479. <input type="text" class="form-control material" name="username" placeholder="<?php echo $language->translate("USERNAME");?>" autocorrect="off" autocapitalize="off" value="">
  2480. </div>
  2481. <div class="form-group">
  2482. <input type="email" class="form-control material" name="email" placeholder="<?php echo $language->translate("EMAIL");?>">
  2483. </div>
  2484. <div class="form-group">
  2485. <input type="password" class="form-control material" name="password1" placeholder="<?php echo $language->translate("PASSWORD");?>">
  2486. </div>
  2487. <div class="form-group">
  2488. <input type="password" class="form-control material" name="password2" placeholder="<?php echo $language->translate("PASSWORD_AGAIN");?>">
  2489. </div>
  2490. <button type="submit" onclick="User.processRegistration()" class="btn waves btn-labeled btn-primary btn btn-sm text-uppercase waves-effect waves-float promoteUser">
  2491. <span class="btn-label"><i class="fa fa-user-plus"></i></span><?php echo $language->translate("CREATE_USER");?>
  2492. </button>
  2493. </form>
  2494. </div>
  2495. </div>
  2496. </div>
  2497. <div class="small-box">
  2498. <form class="content-form form-inline" name="unregister" id="unregister" action="" method="POST">
  2499. <p id="inputUsername"></p>
  2500. <div class="table-responsive">
  2501. <table class="table table-striped">
  2502. <thead>
  2503. <tr>
  2504. <th>#</th>
  2505. <th><?php echo $language->translate("USERNAME");?></th>
  2506. <th><?php echo $language->translate("EMAIL");?></th>
  2507. <th><?php echo $language->translate("LOGIN_STATUS");?></th>
  2508. <th><?php echo $language->translate("LAST_SEEN");?></th>
  2509. <th><?php echo $language->translate("USER_GROUP");?></th>
  2510. <th><?php echo $language->translate("USER_ACTIONS");?></th>
  2511. </tr>
  2512. </thead>
  2513. <tbody>
  2514. <?php $countUsers = 1;
  2515. foreach($gotUsers as $row) :
  2516. if($row['role'] == "admin" && $countUsers == 1) :
  2517. $userColor = "red";
  2518. $disableAction = "disabled=\"disabled\"";
  2519. else :
  2520. $userColor = "blue";
  2521. $disableAction = "";
  2522. endif;
  2523. if($row['active'] == "true") :
  2524. $userActive = $language->translate("LOGGED_IN");
  2525. $userActiveColor = "primary";
  2526. else :
  2527. $userActive = $language->translate("LOGGED_OUT");
  2528. $userActiveColor = "danger";
  2529. endif;
  2530. $userpic = md5( strtolower( trim( $row['email'] ) ) );
  2531. if(!empty($row["last"])) :
  2532. $lastActive = date("Y-m-d H:i", intval($row["last"]));
  2533. else :
  2534. $lastActive = "";
  2535. endif;
  2536. ?>
  2537. <tr id="<?=$row['username'];?>">
  2538. <th scope="row"><?=$countUsers;?></th>
  2539. <td><?php if(GRAVATAR == "true") : ?><i class="userpic"><img src="https://www.gravatar.com/avatar/<?=$userpic;?>?s=25&d=mm" class="img-circle"></i> &nbsp; <?php endif; ?><?=$row['username'];?></td>
  2540. <td><input type="text" class="form-control material newemail" name="newemail" value="<?=$row['email'];?>">
  2541. <button style="display: none" class="btn btn-success btn-sm waves editUserEmail"><i class="fa fa-check"></i></button>
  2542. <button style="display: none" type="button" class="btn btn-danger btn-sm waves closeEditUserEmail"><i class="fa fa-close"></i></button>
  2543. </td>
  2544. <td><span class="label label-<?=$userActiveColor;?>"><?=$userActive;?></span></td>
  2545. <td><?=$lastActive;?></td>
  2546. <td><span class="userRole text-uppercase <?=$userColor;?>"><?=$row['role'];?></span></td>
  2547. <td id="<?=$row['username'];?>">
  2548. <button <?=$disableAction;?> class="btn waves btn-labeled btn-danger btn btn-sm text-uppercase waves-effect waves-float deleteUser">
  2549. <span class="btn-label"><i class="fa fa-user-times"></i></span><?php echo $language->translate("DELETE");?>
  2550. </button>
  2551. <?php if ($row['role'] == "user") : ?>
  2552. <button class="btn waves btn-labeled btn-success btn btn-sm text-uppercase waves-effect waves-float promoteUser">
  2553. <span class="btn-label"><i class="fa fa-arrow-up"></i></span><?php echo $language->translate("PROMOTE");?>
  2554. </button>
  2555. <?php endif; ?>
  2556. <?php if ($row['role'] == "admin") : ?>
  2557. <button <?=$disableAction;?> class="btn waves btn-labeled btn-warning btn btn-sm text-uppercase waves-effect waves-float demoteUser">
  2558. <span class="btn-label"><i class="fa fa-arrow-down"></i></span><?php echo $language->translate("DEMOTE");?>
  2559. </button>
  2560. <?php endif; ?>
  2561. </td>
  2562. </tr>
  2563. <?php $countUsers++; endforeach; ?>
  2564. </tbody>
  2565. </table>
  2566. </div>
  2567. </form>
  2568. </div>
  2569. </div>
  2570. </div>
  2571. </div>
  2572. </div>
  2573. </div>
  2574. <div class="email-content invites-box white-bg">
  2575. <div class="email-body">
  2576. <div class="email-header gray-bg">
  2577. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  2578. <h1>Invite Management</h1>
  2579. </div>
  2580. <div class="email-inner small-box">
  2581. <div class="email-inner-section">
  2582. <div class="small-box fade in" id="useredit">
  2583. <div class="row">
  2584. <div class="col-lg-12">
  2585. <div class="small-box">
  2586. <form class="content-form form-inline" name="inviteNewUser" id="inviteNewUser" action="" method="POST">
  2587. <input type="hidden" name="op" value="invite"/>
  2588. <input type="hidden" name="server" value="plex"/>
  2589. <div class="form-group">
  2590. <input type="text" class="form-control material" name="username" placeholder="<?php echo $language->translate("USERNAME_NAME");?>" autocorrect="off" autocapitalize="off" value="">
  2591. </div>
  2592. <div class="form-group">
  2593. <input type="email" class="form-control material" name="email" placeholder="<?php echo $language->translate("EMAIL");?>" required>
  2594. </div>
  2595. <button type="submit" class="btn waves btn-labeled btn-primary btn btn-sm text-uppercase waves-effect waves-float">
  2596. <span class="btn-label"><i class="fa fa-user-plus"></i></span><?php echo $language->translate("SEND_INVITE");?>
  2597. </button>
  2598. </form>
  2599. </div>
  2600. </div>
  2601. </div>
  2602. <div class="small-box">
  2603. <form class="content-form form-inline" name="deleteInviteForm" id="deleteInviteForm" action="" method="POST">
  2604. <p id="inputInvite"></p>
  2605. <div class="table-responsive">
  2606. <table class="table table-striped">
  2607. <thead>
  2608. <tr>
  2609. <th>#</th>
  2610. <th><?php echo $language->translate("USERNAME");?></th>
  2611. <th><?php echo $language->translate("EMAIL");?></th>
  2612. <th><?php echo $language->translate("INVITE_CODE");?></th>
  2613. <th><?php echo $language->translate("DATE_SENT");?></th>
  2614. <th><?php echo $language->translate("DATE_USED");?></th>
  2615. <th><?php echo $language->translate("USED_BY");?></th>
  2616. <th><?php echo $language->translate("IP_ADDRESS");?></th>
  2617. <th><?php echo $language->translate("VALID");?></th>
  2618. <th><?php echo $language->translate("DELETE");?></th>
  2619. </tr>
  2620. </thead>
  2621. <tbody><!-- onsubmit="return false;" -->
  2622. <?php
  2623. foreach($gotInvites as $row) :
  2624. $validColor = ($row['valid'] == "Yes" ? "primary" : "danger");
  2625. $inviteUser = ($row['username'] != "" ? $row['username'] : "N/A");
  2626. $dateInviteUsed = ($row['dateused'] != "" ? $row['dateused'] : "Not Used");
  2627. $ipUsed = ($row['ip'] != "" ? $row['ip'] : "Not Used");
  2628. $usedBy = ($row['usedby'] != "" ? $row['usedby'] : "Not Used");
  2629. ?>
  2630. <tr id="<?=$row['id'];?>">
  2631. <th scope="row"><?=$row['id'];?></th>
  2632. <td><?=$inviteUser;?></td>
  2633. <td><?=$row['email'];?></td>
  2634. <td><span style="font-size: 100%;" class="label label-<?=$validColor;?>"><?=$row['code'];?></span></td>
  2635. <td><?=$row['date'];?></td>
  2636. <td><?=$dateInviteUsed;?></td>
  2637. <td><?=$usedBy;?></td>
  2638. <td style="cursor: pointer" class="ipInfo"><?=$ipUsed;?></td>
  2639. <td><span style="font-size: 100%;" class="label label-<?=$validColor;?>"><?=$row['valid'];?></span></td>
  2640. <td id="<?=$row['id'];?>">
  2641. <button class="btn waves btn-labeled btn-danger btn btn-sm text-uppercase waves-effect waves-float deleteInvite">
  2642. <span class="btn-label"><i class="fa fa-trash"></i></span><?php echo $language->translate("DELETE");?>
  2643. </button>
  2644. </td>
  2645. </tr>
  2646. <?php endforeach; ?>
  2647. </tbody>
  2648. </table>
  2649. </div>
  2650. </form>
  2651. </div>
  2652. </div>
  2653. </div>
  2654. </div>
  2655. </div>
  2656. </div>
  2657. <div class="email-content logs-box white-bg">
  2658. <div class="email-body">
  2659. <div class="email-header gray-bg">
  2660. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  2661. <h1>Logs</h1>
  2662. </div>
  2663. <div class="email-inner small-box">
  2664. <div class="email-inner-section">
  2665. <div class="small-box" id="loginlog">
  2666. <div>
  2667. <?php if(file_exists(DATABASE_LOCATION."org.log")){ ?>
  2668. <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>
  2669. <?php } if(file_exists(FAIL_LOG)){ ?>
  2670. <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>
  2671. <?php } ?>
  2672. </div>
  2673. <?php if(file_exists(DATABASE_LOCATION."org.log")){ ?>
  2674. <div id="orgLogTable" class="table-responsive" style="display: none">
  2675. <table id="orgLogs" class="datatable display">
  2676. <thead>
  2677. <tr>
  2678. <th><?php echo $language->translate("DATE");?></th>
  2679. <th><?php echo $language->translate("STATUS");?></th>
  2680. <th><?php echo $language->translate("TYPE");?></th>
  2681. </tr>
  2682. </thead>
  2683. <tbody>
  2684. <?php readLog(); ?>
  2685. </tbody>
  2686. </table>
  2687. </div>
  2688. <?php } ?>
  2689. <div id="loginTable" class="table-responsive">
  2690. <?php if(file_exists(FAIL_LOG)){ ?>
  2691. <div id="loginStats">
  2692. <div class="ultra-widget">
  2693. <div class="w-progress">
  2694. <span id="goodCount" class="w-amount green"></span>
  2695. <span id="badCount" class="w-amount red pull-right">3</span>
  2696. <br>
  2697. <span class="text-uppercase w-name"><?php echo $language->translate("GOOD_LOGINS");?></span>
  2698. <span class="text-uppercase w-name pull-right"><?php echo $language->translate("BAD_LOGINS");?></span>
  2699. </div>
  2700. <div class="progress progress-bar-sm zero-m">
  2701. <div id="goodPercent" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%"></div>
  2702. <div id="badPercent" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"></div>
  2703. </div>
  2704. <div class="w-status clearfix">
  2705. <div id="goodTitle" class="w-status-title pull-left text-uppercase">20%</div>
  2706. <div id="badTitle" class="w-status-number pull-right text-uppercase">80%</div>
  2707. </div>
  2708. </div>
  2709. </div>
  2710. <table id="datatable" class="datatable display">
  2711. <thead>
  2712. <tr>
  2713. <th><?php echo $language->translate("DATE");?></th>
  2714. <th><?php echo $language->translate("USERNAME");?></th>
  2715. <th><?php echo $language->translate("IP_ADDRESS");?></th>
  2716. <th><?php echo $language->translate("TYPE");?></th>
  2717. </tr>
  2718. </thead>
  2719. <tbody>
  2720. <?php
  2721. $getFailLog = str_replace("\r\ndate", "date", file_get_contents(FAIL_LOG));
  2722. $gotFailLog = json_decode($getFailLog, true);
  2723. $goodLogin = 0;
  2724. $badLogin = 0;
  2725. function getColor($colorTest){
  2726. if($colorTest == "bad_auth") :
  2727. $gotColorTest = "danger";
  2728. elseif($colorTest == "good_auth") :
  2729. $gotColorTest = "primary";
  2730. endif;
  2731. echo $gotColorTest;
  2732. }
  2733. foreach (array_reverse($gotFailLog["auth"]) as $key => $val) :
  2734. if($val["auth_type"] == "bad_auth") : $badLogin++; elseif($val["auth_type"] == "good_auth") : $goodLogin++; endif;
  2735. ?>
  2736. <tr>
  2737. <td><?=$val["date"];?></td>
  2738. <td><?=$val["username"];?></td>
  2739. <td style="cursor: pointer" class="ipInfo"><?=$val["ip"];?></td>
  2740. <td><span class="label label-<?php getColor($val["auth_type"]);?>"><?=$val["auth_type"];?></span></td>
  2741. </tr>
  2742. <?php endforeach; ?>
  2743. </tbody>
  2744. </table>
  2745. <?php
  2746. $totalLogin = $goodLogin + $badLogin;
  2747. $goodPercent = round(($goodLogin / $totalLogin) * 100);
  2748. $badPercent = round(($badLogin / $totalLogin) * 100);
  2749. };
  2750. if(!file_exists(FAIL_LOG)){
  2751. echo $language->translate("NOTHING_LOG");
  2752. }
  2753. ?>
  2754. </div>
  2755. </div>
  2756. </div>
  2757. </div>
  2758. </div>
  2759. </div>
  2760. </div>
  2761. <!--End Content-->
  2762. <!-- Modal for IP -->
  2763. <div id="ipModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog">
  2764. <div class="modal-dialog modal-lg" role="document">
  2765. <div class="modal-content">
  2766. <div class="modal-header">
  2767. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  2768. <h4 class="modal-title" id="ipIp">Modal title</h4>
  2769. </div>
  2770. <div class="modal-body">
  2771. <h3>Hostname: <small id="ipHostname"></small></h3>
  2772. <h3>Location: <small id="ipLocation"></small></h3>
  2773. <h3>Org: <small id="ipOrg"></small></h3>
  2774. <h3>City: <small id="ipCity"></small></h3>
  2775. <h3>Region: <small id="ipRegion"></small></h3>
  2776. <h3>Country: <small id="ipCountry"></small></h3>
  2777. <h3>Phone: <small id="ipPhone"></small></h3>
  2778. </div>
  2779. <div class="modal-footer">
  2780. <button type="button" class="btn btn-default waves" data-dismiss="modal">Close</button>
  2781. </div>
  2782. </div>
  2783. </div>
  2784. </div>
  2785. <!-- END IP Modal -->
  2786. <!-- Modal for Plex Token -->
  2787. <div id="plexModal" class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog">
  2788. <div class="modal-dialog modal-lg" role="document">
  2789. <div class="modal-content">
  2790. <div class="modal-header">
  2791. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  2792. <h4 class="modal-title"><?php echo translate("GET_PLEX_TOKEN"); ?></h4>
  2793. </div>
  2794. <div class="modal-body">
  2795. <div style="display:none" id="plexError" class=""></div>
  2796. <input class="form-control material" placeholder="<?php echo translate("USERNAME"); ?>" type="text" name="plex_username" id="plex_username" value="<?php echo PLEXUSERNAME;?>">
  2797. <input class="form-control material" placeholder="<?php echo translate("PASSWORD"); ?>" type="password" name="plex_password" id="plex_password" value="<?php echo PLEXPASSWORD;?>">
  2798. </div>
  2799. <div class="modal-footer">
  2800. <button type="button" class="btn btn-default waves" data-dismiss="modal"><?php echo translate("CLOSE"); ?></button>
  2801. <button id="getPlexToken" type="button" class="btn btn-success waves waves-effect waves-float"><?php echo translate("GET_PLEX_TOKEN"); ?></button>
  2802. </div>
  2803. </div>
  2804. </div>
  2805. </div>
  2806. <!-- END IP Modal -->
  2807. </div>
  2808. <?php if(isset($_POST['op'])) : ?>
  2809. <script>
  2810. parent.notify("<?php echo printArray($USER->info_log); ?>","info-circle","notice","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
  2811. <?php if(!empty($USER->error_log)) : ?>
  2812. parent.notify("<?php echo printArray($USER->error_log); ?>","exclamation-circle ","error","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
  2813. <?php endif; ?>
  2814. </script>
  2815. <?php endif; ?>
  2816. <script>
  2817. lazyload();
  2818. <?php echo speedTestDisplay(speedTestData(),"graph");?>
  2819. $(".settingsMenu").click(function() {
  2820. $(".settingsMenu").removeClass("settingsMenuActive");
  2821. $(this).addClass("settingsMenuActive");
  2822. $(".settingsMenu").addClass("settingsMenuInactive");
  2823. $(this).removeClass("settingsMenuInactive");
  2824. })
  2825. $(".special").click(function() {
  2826. swal({
  2827. title: "Hmmm What is This?",
  2828. text: '<p><img src="images/settings/not-so-hidden.gif"></p>',
  2829. html: true,
  2830. confirmButtonColor: "#63A8EB"
  2831. });
  2832. console.log('hmmmmm, what the hell is this section?');
  2833. })
  2834. $(".generateEmails").click(function() {
  2835. <?php if(PLEXURL != ''){
  2836. echo 'var backend = "plex";';
  2837. }elseif(EMBYURL != ''){
  2838. echo 'var backend = "emby";';
  2839. }else{
  2840. echo 'var backend = "org";';
  2841. } ?>
  2842. $('.generateEmails').text("Loading...");
  2843. ajax_request('POST', 'get-emails', {type : backend}).done(function(data){
  2844. console.log('start');
  2845. $('#email-users').html(data);
  2846. $('#emailSelect').show();
  2847. $('.generateEmails').hide();
  2848. $('#selectAllEmail').show();
  2849. });
  2850. });
  2851. $(".submitTabBtn").click(function() {
  2852. $("#submitTabs").submit();
  2853. });
  2854. $(function() {
  2855. /*$("#email-users").niceScroll({
  2856. cursorwidth: "12px",
  2857. railpadding: {top:0,right:0,left:0,bottom:0},
  2858. scrollspeed: 30,
  2859. mousescrollstep: 60,
  2860. grabcursorenabled: false,
  2861. autohidemode: false
  2862. });*/
  2863. $('#email-users').slimScroll({
  2864. width: '100%',
  2865. railVisible: true,
  2866. alwaysVisible: true,
  2867. allowPageScroll: true
  2868. });
  2869. });
  2870. $("#email-users").on('change click', function (e) {
  2871. var selected = $("#email-users").val();
  2872. $('#mailTo').val(selected);
  2873. console.log(selected);
  2874. });
  2875. $("#sendEmail").click(function() {
  2876. var to = $('#mailTo').val();
  2877. var subject = $('#subject').val();
  2878. var message = $('.email-box').find('.panel-body').html();
  2879. console.log(to);
  2880. console.log(subject);
  2881. console.log(message);
  2882. ajax_request('POST', 'mass-email', {
  2883. emailto: to,
  2884. emailsubject: subject,
  2885. emailmessage: message
  2886. });
  2887. })
  2888. $('#selectAllEmail').click(function() {
  2889. $('#email-users option').prop('selected', true);
  2890. var selected = $("#email-users").val();
  2891. $('#mailTo').val(selected);
  2892. console.log(selected);
  2893. });
  2894. //IP INFO
  2895. $(".ipInfo").click(function(){
  2896. $.getJSON("https://ipinfo.io/"+$(this).text()+"/?token=<?php echo IPINFOTOKEN;?>", function (response) {
  2897. $('#ipModal').modal('show');
  2898. $('#ipIp').text("IP Info for: "+response.ip);
  2899. $('#ipHostname').text(response.hostname);
  2900. $('#ipLocation').text(response.loc);
  2901. $('#ipOrg').text(response.org);
  2902. $('#ipCity').text(response.city);
  2903. $('#ipRegion').text(response.region);
  2904. $('#ipCountry').text(response.country);
  2905. $('#ipPhone').text(response.phone);
  2906. console.log(response);
  2907. });
  2908. });
  2909. // Plex.tv auth token fetch
  2910. $("#openPlexModal").click(function() {
  2911. $('#plexModal').modal('show');
  2912. });
  2913. $("#getPlexToken").click(function() {
  2914. $('#plexError').show();
  2915. $('#plexError').addClass("well well-sm yellow-bg");
  2916. $('#plexError').text("Grabbing Token");
  2917. var plex_username = $("#plex_username").val().trim();
  2918. var plex_password = $("#plex_password").val().trim();
  2919. if ((plex_password !== '') && (plex_password !== '')) {
  2920. $.ajax({
  2921. type: 'POST',
  2922. headers: {
  2923. 'X-Plex-Product':'Organizr',
  2924. 'X-Plex-Version':'1.0',
  2925. 'X-Plex-Client-Identifier':'01010101-10101010'
  2926. },
  2927. url: 'https://plex.tv/users/sign_in.json',
  2928. data: {
  2929. 'user[login]': plex_username,
  2930. 'user[password]': plex_password,
  2931. force: true
  2932. },
  2933. cache: false,
  2934. async: true,
  2935. complete: function(xhr, status) {
  2936. var result = $.parseJSON(xhr.responseText);
  2937. if (xhr.status === 201) {
  2938. $('#plexError').removeClass();
  2939. $('#plexError').addClass("well well-sm green-bg");
  2940. $('#plexError').show();
  2941. $('#plexError').text(xhr.statusText);
  2942. $("#plexToken_id").val(result.user.authToken);
  2943. $("#plexToken_id").attr('data-changed', 'true');
  2944. $('#plexModal').modal('hide');
  2945. } else {
  2946. $('#plexError').removeClass();
  2947. $('#plexError').addClass("well well-sm red-bg");
  2948. $('#plexError').show();
  2949. $('#plexError').text(xhr.statusText);
  2950. }
  2951. }
  2952. });
  2953. } else {
  2954. $('#plexError').text("Enter Username and Password");
  2955. }
  2956. });
  2957. //Generate API
  2958. function generateCode() {
  2959. var code = "";
  2960. var possible = "abcdefghijklmnopqrstuvwxyz0123456789";
  2961. for (var i = 0; i < 20; i++)
  2962. code += possible.charAt(Math.floor(Math.random() * possible.length));
  2963. return code;
  2964. }
  2965. function performUpdate(){
  2966. $('#updateStatus').show();
  2967. setTimeout(function(){
  2968. $('#updateStatusBar').attr("style", "width: 1%");
  2969. setTimeout(function(){
  2970. $('#updateStatusBar').attr("style", "width: 20%");
  2971. setTimeout(function(){
  2972. $('#updateStatusBar').attr("style", "width: 35%");
  2973. setTimeout(function(){
  2974. $('#updateStatusBar').attr("style", "width: 50%");
  2975. setTimeout(function(){
  2976. $('#updateStatusBar').attr("style", "width: 65%");
  2977. setTimeout(function(){
  2978. $('#updateStatusBar').attr("style", "width: 80%");
  2979. setTimeout(function(){
  2980. $('#updateStatusBar').attr("style", "width: 95%");
  2981. setTimeout(function(){
  2982. $('#updateStatusBar').attr("style", "width: 100%");
  2983. }, 4000);
  2984. }, 3500);
  2985. }, 3000);
  2986. }, 2500);
  2987. }, 2000);
  2988. }, 1500);
  2989. }, 1000);
  2990. }, 100);
  2991. }
  2992. $(function () {
  2993. //Data Tables
  2994. $('.datatable').DataTable({
  2995. displayLength: 10,
  2996. dom: 'T<"clear">lfrtip',
  2997. responsive: true,
  2998. "order": [[ 0, 'desc' ]],
  2999. "language": {
  3000. "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);?>",
  3001. "infoEmpty": "<?php echo $language->translate('NO_ENTRIES');?>",
  3002. "infoFiltered": "<?php echo explosion($language->translate('FILTERED'), 0);?> _MAX_ <?php echo explosion($language->translate('FILTERED'), 1);?>",
  3003. "lengthMenu": "<?php echo $language->translate('SHOW');?> _MENU_ <?php echo $language->translate('ENTRIES');?>",
  3004. "search": "",
  3005. "searchPlaceholder": "<?php echo $language->translate('SEARCH');?>",
  3006. "searchClass": "<?php echo $language->translate('SEARCH');?>",
  3007. "zeroRecords": "<?php echo $language->translate('NO_MATCHING');?>",
  3008. "paginate": {
  3009. "next": "<?php echo $language->translate('NEXT');?>",
  3010. "previous": "<?php echo $language->translate('PREVIOUS');?>",
  3011. }
  3012. }
  3013. });
  3014. });
  3015. </script>
  3016. <script>
  3017. (function($) {
  3018. function startTrigger(e,data) {
  3019. var $elem = $(this);
  3020. $elem.data('mouseheld_timeout', setTimeout(function() {
  3021. $elem.trigger('mouseheld');
  3022. }, e.data));
  3023. }
  3024. function stopTrigger() {
  3025. var $elem = $(this);
  3026. clearTimeout($elem.data('mouseheld_timeout'));
  3027. }
  3028. var mouseheld = $.event.special.mouseheld = {
  3029. setup: function(data) {
  3030. var $this = $(this);
  3031. $this.bind('mousedown', +data || mouseheld.time, startTrigger);
  3032. $this.bind('mouseleave mouseup', stopTrigger);
  3033. },
  3034. teardown: function() {
  3035. var $this = $(this);
  3036. $this.unbind('mousedown', startTrigger);
  3037. $this.unbind('mouseleave mouseup', stopTrigger);
  3038. },
  3039. time: 200 // default to 750ms
  3040. };
  3041. })(jQuery);
  3042. $(function () {
  3043. $('.summernote').summernote({
  3044. height: 120,
  3045. codemirror: { // codemirror options
  3046. mode: 'text/html',
  3047. htmlMode: true,
  3048. lineNumbers: true,
  3049. theme: 'monokai'
  3050. }
  3051. });
  3052. // summernote.change
  3053. $('.summernote').on('summernote.change', function(we, contents, $editable) {
  3054. $(this).attr('data-changed', 'true');
  3055. });
  3056. //$(".todo ul").sortable();
  3057. $(".todo ul").sortable({
  3058. 'opacity': 0.9,
  3059. //'placeholder': "sort-placeholder",
  3060. //'forcePlaceholderSize': true,
  3061. });
  3062. $("#submitTabs").on('submit', function (e) {
  3063. console.log('disabled this func')
  3064. return false;
  3065. });
  3066. $('#apply').on('click touchstart', function(){
  3067. window.parent.location.reload();
  3068. });
  3069. });
  3070. </script>
  3071. <script>
  3072. $("#iconHide").click(function(){
  3073. $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).toggle();
  3074. });
  3075. $("#iconAll").click(function(){
  3076. $( "div[id^='viewAllIcons']" ).toggle();
  3077. });
  3078. $("#deleteToggle").click(function(){
  3079. $( "#deleteDiv" ).toggle();
  3080. });
  3081. $(".deleteInvite").click(function(){
  3082. var parent_id = $(this).parent().attr('id');
  3083. editUsername = $('#deleteInviteForm').find('#inputInvite');
  3084. $(editUsername).html('<input type="hidden" name="op" value="deleteinvite"/><input type="hidden" name="id"value="' + parent_id + '" />');
  3085. });
  3086. $(".deleteUser").click(function(){
  3087. var parent_id = $(this).parent().attr('id');
  3088. editUsername = $('#unregister').find('#inputUsername');
  3089. $(editUsername).html('<input type="hidden" name="op" value="unregister"/><input type="hidden" name="username"value="' + parent_id + '" />');
  3090. });
  3091. $(".newemail").click(function(){
  3092. $(".editUserEmail").hide();
  3093. $(".closeEditUserEmail").hide();
  3094. $(this).parent().find('.editUserEmail').show();
  3095. $(this).parent().find('.closeEditUserEmail').show();
  3096. });
  3097. $(".closeEditUserEmail").click(function(){
  3098. $(".editUserEmail").hide();
  3099. $(".closeEditUserEmail").hide();
  3100. });
  3101. $(".editUserEmail").click(function(){
  3102. var parent_ids = $(this).parent().parent().attr('id');
  3103. newemail = $(this).parent().parent().find('input[name=newemail]').val();
  3104. role = $(this).parent().parent().find('.userRole').text();
  3105. editUsername = $('#unregister').find('#inputUsername');
  3106. console.log('user: '+parent_ids+' email: '+newemail+' role: '+role);
  3107. $(editUsername).html('<input type="hidden" name="op" value="update"/><input type="hidden" name="email" value="'+newemail+'"/><input type="hidden" name="role" value="'+role+'"/><input type="hidden" name="username"value="' + parent_ids + '" />');
  3108. });
  3109. $(".promoteUser").click(function(){
  3110. var parent_ids = $(this).parent().attr('id');
  3111. editUsername = $('#unregister').find('#inputUsername');
  3112. $(editUsername).html('<input type="hidden" name="op" value="update"/><input type="hidden" name="role" value="admin"/><input type="hidden" name="username"value="' + parent_ids + '" />');
  3113. });
  3114. $(".demoteUser").click(function(){
  3115. var parent_idz = $(this).parent().attr('id');
  3116. editUsername = $('#unregister').find('#inputUsername');
  3117. $(editUsername).html('<input type="hidden" name="op" value="update"/><input type="hidden" name="role" value="user"/><input type="hidden" name="username"value="' + parent_idz + '" />');
  3118. });
  3119. $("#viewOrgLogs, #viewLoginLogs").click(function(){
  3120. $('#orgLogTable').toggle();
  3121. $('#loginTable').toggle();
  3122. $('#viewOrgLogs').toggle();
  3123. $('#viewLoginLogs').toggle();
  3124. });
  3125. $('#showLess').hide();
  3126. $('#loadMore').click(function () {
  3127. x= (x+5 <= size_li) ? x+5 : size_li;
  3128. $('#versionHistory li:lt('+x+')').show();
  3129. $('#showLess').show();
  3130. if(x == size_li){
  3131. $('#loadMore').hide();
  3132. }
  3133. });
  3134. $('#showLess').click(function () {
  3135. $('#versionHistory li').not(':lt(2)').hide();
  3136. $('#loadMore').show();
  3137. $('#showLess').hide();
  3138. });
  3139. $("li[class^='list-group-item']").bind('mouseheld', function(e) {
  3140. $(this).find("span[class^='fa fa-hand-paper-o']").attr("class", "fa fa-hand-grab-o");
  3141. $(this).addClass("dragging");
  3142. $(this).find("div[class^='action-btns tabIconView']").addClass("animated swing");
  3143. $(this).mouseup(function() {
  3144. $(this).find("span[class^='fa fa-hand-grab-o']").attr("class", "fa fa-hand-paper-o");
  3145. $(this).removeClass("dragging");
  3146. $(this).find("div[class^='action-btns tabIconView']").removeClass("animated swing");
  3147. });
  3148. });
  3149. function copyToClipboard(elem) {
  3150. // create hidden text element, if it doesn't already exist
  3151. var targetId = "_hiddenCopyText_";
  3152. var isInput = elem.tagName === "INPUT" || elem.tagName === "TEXTAREA";
  3153. var origSelectionStart, origSelectionEnd;
  3154. if (isInput) {
  3155. // can just use the original source element for the selection and copy
  3156. target = elem;
  3157. origSelectionStart = elem.selectionStart;
  3158. origSelectionEnd = elem.selectionEnd;
  3159. } else {
  3160. // must use a temporary form element for the selection and copy
  3161. target = document.getElementById(targetId);
  3162. if (!target) {
  3163. var target = document.createElement("textarea");
  3164. target.style.position = "absolute";
  3165. target.style.left = "-9999px";
  3166. target.style.top = "0";
  3167. target.id = targetId;
  3168. document.body.appendChild(target);
  3169. }
  3170. target.textContent = elem.textContent;
  3171. }
  3172. // select the content
  3173. var currentFocus = document.activeElement;
  3174. target.focus();
  3175. target.setSelectionRange(0, target.value.length);
  3176. // copy the selection
  3177. var succeed;
  3178. try {
  3179. succeed = document.execCommand("copy");
  3180. } catch(e) {
  3181. succeed = false;
  3182. }
  3183. // restore original focus
  3184. if (currentFocus && typeof currentFocus.focus === "function") {
  3185. //currentFocus.focus();
  3186. }
  3187. if (isInput) {
  3188. // restore prior selection
  3189. elem.setSelectionRange(origSelectionStart, origSelectionEnd);
  3190. } else {
  3191. // clear temporary content
  3192. target.textContent = "";
  3193. }
  3194. return succeed;
  3195. }
  3196. $("img[class^='allIcons']").click(function(){
  3197. $("textarea[id^='copyTarget']").val($(this).attr("src"));
  3198. copyToClipboard(document.getElementById("copyTarget"));
  3199. parent.notify("<?php echo $language->translate('ICON_COPY');?>","clipboard","success","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
  3200. $( "div[id^='viewAllIcons']" ).toggle();
  3201. });
  3202. $('body').on('click', 'b.allIcons', function() {
  3203. $("textarea[id^='copyTarget2']").val($(this).attr("title"));
  3204. copyToClipboard(document.getElementById("copyTarget2"));
  3205. parent.notify("<?php echo $language->translate('ICON_COPY');?>","clipboard","success","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
  3206. $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).hide();
  3207. });
  3208. </script>
  3209. <script>
  3210. //Backup
  3211. $('#backupNow').on('click', function () {
  3212. console.log("starting backup now");
  3213. ajax_request('POST', 'backup-now');
  3214. setTimeout(function(){
  3215. ajax_request('GET', 'get-backups').done(function(data){
  3216. $('#backupList_id').html(data);
  3217. $('#backupList_id').addClass('animated pulse');
  3218. });
  3219. console.log("ajax backup done")
  3220. }, 500);
  3221. ;
  3222. });
  3223. //TestEmail
  3224. function isUpperCase(str) {
  3225. return str === str.toUpperCase();
  3226. }
  3227. $('#smtpHostAuth_id').change(function() {
  3228. if($('#smtpHostAuth_id').attr("data-value") == "true"){
  3229. $('#smtpHostAuth_id').attr("data-value", "false");
  3230. }else{
  3231. $('#smtpHostAuth_id').attr("data-value", "true");
  3232. }
  3233. });
  3234. $('#testEmail').on('click', function () {
  3235. var password = '';
  3236. if(isUpperCase($('#smtpHostPassword_id').val())){
  3237. password = '<?php echo SMTPHOSTPASSWORD; ?>';
  3238. }else{
  3239. password = $('#smtpHostPassword_id').val();
  3240. }
  3241. console.log("starting");
  3242. ajax_request('POST', 'test-email', {
  3243. emailto: '<?php echo $USER->email;?>',
  3244. emailhost: $('#smtpHost_id').val(),
  3245. emailport: $('#smtpHostPort_id').val(),
  3246. emailusername: $('#smtpHostUsername_id').val(),
  3247. emailpassword: password,
  3248. emailsendername: $('#smtpHostSenderName_id').val(),
  3249. emailsenderemail: $('#smtpHostSenderEmail_id').val(),
  3250. emailtype: $('#smtpHostType_id').val(),
  3251. emailauth: $('#smtpHostAuth_id').attr("data-value"),
  3252. });
  3253. console.log("ajax done");
  3254. });
  3255. //Custom Themes
  3256. function changeColor(elementName, elementColor) {
  3257. var definedElement = document.getElementById(elementName);
  3258. definedElement.focus();
  3259. definedElement.value = elementColor;
  3260. definedElement.style.backgroundColor = elementColor;
  3261. $(definedElement).trigger('change');
  3262. }
  3263. $('#plexTheme').on('click touchstart', function(){
  3264. changeColor("topbartext", "#E49F0C");
  3265. changeColor("topbar", "#000000");
  3266. changeColor("bottombar", "#000000");
  3267. changeColor("sidebar", "#121212");
  3268. changeColor("hoverbg", "#FFFFFF");
  3269. changeColor("activetabBG", "#E49F0C");
  3270. changeColor("activetabicon", "#FFFFFF");
  3271. changeColor("activetabtext", "#FFFFFF");
  3272. changeColor("inactiveicon", "#949494");
  3273. changeColor("inactivetext", "#B8B8B8");
  3274. changeColor("loading", "#E49F0C");
  3275. changeColor("hovertext", "#000000");
  3276. });
  3277. $('#embyTheme').on('click touchstart', function(){
  3278. changeColor("topbartext", "#52B54B");
  3279. changeColor("topbar", "#212121");
  3280. changeColor("bottombar", "#212121");
  3281. changeColor("sidebar", "#121212");
  3282. changeColor("hoverbg", "#FFFFFF");
  3283. changeColor("activetabBG", "#52B54B");
  3284. changeColor("activetabicon", "#FFFFFF");
  3285. changeColor("activetabtext", "#FFFFFF");
  3286. changeColor("inactiveicon", "#949494");
  3287. changeColor("inactivetext", "#B8B8B8");
  3288. changeColor("loading", "#52B54B");
  3289. changeColor("hovertext", "#000000");
  3290. });
  3291. $('#bookTheme').on('click touchstart', function(){
  3292. changeColor("topbartext", "#FFFFFF");
  3293. changeColor("topbar", "#3B5998");
  3294. changeColor("bottombar", "#3B5998");
  3295. changeColor("sidebar", "#8B9DC3");
  3296. changeColor("hoverbg", "#FFFFFF");
  3297. changeColor("activetabBG", "#3B5998");
  3298. changeColor("activetabicon", "#FFFFFF");
  3299. changeColor("activetabtext", "#FFFFFF");
  3300. changeColor("inactiveicon", "#DFE3EE");
  3301. changeColor("inactivetext", "#DFE3EE");
  3302. changeColor("loading", "#FFFFFF");
  3303. changeColor("hovertext", "#000000");
  3304. });
  3305. $('#spaTheme').on('click touchstart', function(){
  3306. changeColor("topbartext", "#5B391E");
  3307. changeColor("topbar", "#66BBAE");
  3308. changeColor("bottombar", "#66BBAE");
  3309. changeColor("sidebar", "#C3EEE7");
  3310. changeColor("hoverbg", "#66BBAE");
  3311. changeColor("activetabBG", "#C6C386");
  3312. changeColor("activetabicon", "#FFFFFF");
  3313. changeColor("activetabtext", "#FFFFFF");
  3314. changeColor("inactiveicon", "#5B391E");
  3315. changeColor("inactivetext", "#5B391E");
  3316. changeColor("loading", "#5B391E");
  3317. changeColor("hovertext", "#000000");
  3318. });
  3319. $('#darklyTheme').on('click touchstart', function(){
  3320. changeColor("topbartext", "#FFFFFF");
  3321. changeColor("topbar", "#375A7F");
  3322. changeColor("bottombar", "#375A7F");
  3323. changeColor("sidebar", "#222222");
  3324. changeColor("hoverbg", "#464545");
  3325. changeColor("activetabBG", "#FFFFFF");
  3326. changeColor("activetabicon", "#464545");
  3327. changeColor("activetabtext", "#464545");
  3328. changeColor("inactiveicon", "#0CE3AC");
  3329. changeColor("inactivetext", "#0CE3AC");
  3330. changeColor("loading", "#FFFFFF");
  3331. changeColor("hovertext", "#000000");
  3332. });
  3333. $('#slateTheme').on('click touchstart', function(){
  3334. changeColor("topbartext", "#C8C8C8");
  3335. changeColor("topbar", "#272B30");
  3336. changeColor("bottombar", "#272B30");
  3337. changeColor("sidebar", "#32383E");
  3338. changeColor("hoverbg", "#58C0DE");
  3339. changeColor("activetabBG", "#3E444C");
  3340. changeColor("activetabicon", "#C8C8C8");
  3341. changeColor("activetabtext", "#FFFFFF");
  3342. changeColor("inactiveicon", "#C8C8C8");
  3343. changeColor("inactivetext", "#C8C8C8");
  3344. changeColor("loading", "#C8C8C8");
  3345. changeColor("hovertext", "#000000");
  3346. });
  3347. $('#defaultTheme').on('click touchstart', function(){
  3348. changeColor("topbartext", "#FFFFFF");
  3349. changeColor("topbar", "#eb6363");
  3350. changeColor("bottombar", "#eb6363");
  3351. changeColor("sidebar", "#000000");
  3352. changeColor("hoverbg", "#eb6363");
  3353. changeColor("activetabBG", "#eb6363");
  3354. changeColor("activetabicon", "#FFFFFF");
  3355. changeColor("activetabtext", "#FFFFFF");
  3356. changeColor("inactiveicon", "#FFFFFF");
  3357. changeColor("inactivetext", "#FFFFFF");
  3358. changeColor("loading", "#FFFFFF");
  3359. changeColor("hovertext", "#000000");
  3360. });
  3361. $('#redTheme').on('click touchstart', function(){
  3362. changeColor("topbartext", "#FFFFFF");
  3363. changeColor("topbar", "#eb6363");
  3364. changeColor("bottombar", "#eb6363");
  3365. changeColor("sidebar", "#000000");
  3366. changeColor("hoverbg", "#eb6363");
  3367. changeColor("activetabBG", "#eb6363");
  3368. changeColor("activetabicon", "#FFFFFF");
  3369. changeColor("activetabtext", "#FFFFFF");
  3370. changeColor("inactiveicon", "#FFFFFF");
  3371. changeColor("inactivetext", "#FFFFFF");
  3372. changeColor("loading", "#FFFFFF");
  3373. changeColor("hovertext", "#000000");
  3374. });
  3375. $('#monokaiTheme').on('click touchstart', function(){
  3376. changeColor("topbartext", "#66D9EF");
  3377. changeColor("topbar", "#333333");
  3378. changeColor("bottombar", "#333333");
  3379. changeColor("sidebar", "#393939");
  3380. changeColor("hoverbg", "#AD80FD");
  3381. changeColor("activetabBG", "#F92671");
  3382. changeColor("activetabicon", "#FFFFFF");
  3383. changeColor("activetabtext", "#FFFFFF");
  3384. changeColor("inactiveicon", "#66D9EF");
  3385. changeColor("inactivetext", "#66D9EF");
  3386. changeColor("loading", "#66D9EF");
  3387. changeColor("hovertext", "#000000");
  3388. });
  3389. $('#thejokerTheme').on('click touchstart', function(){
  3390. changeColor("topbartext", "#CCCCCC");
  3391. changeColor("topbar", "#000000");
  3392. changeColor("bottombar", "#000000");
  3393. changeColor("sidebar", "#121212");
  3394. changeColor("hoverbg", "#CCC6CC");
  3395. changeColor("activetabBG", "#A50CB0");
  3396. changeColor("activetabicon", "#FFFFFF");
  3397. changeColor("activetabtext", "#FFFFFF");
  3398. changeColor("inactiveicon", "#949494");
  3399. changeColor("inactivetext", "#B8B8B8");
  3400. changeColor("loading", "#CCCCCC");
  3401. changeColor("hovertext", "#000000");
  3402. });
  3403. $('#newPlexTheme').on('click touchstart', function(){
  3404. changeColor("topbartext", "#E5A00D");
  3405. changeColor("topbar", "#282A2D");
  3406. changeColor("bottombar", "#282A2D");
  3407. changeColor("sidebar", "#3F4245");
  3408. changeColor("hoverbg", "#E5A00D");
  3409. changeColor("activetabBG", "#282A2D");
  3410. changeColor("activetabicon", "#E5A00D");
  3411. changeColor("activetabtext", "#E5A00D");
  3412. changeColor("inactiveicon", "#F9F9F9");
  3413. changeColor("inactivetext", "#F9F9F9");
  3414. changeColor("loading", "#E5A00D");
  3415. changeColor("hovertext", "#E0E3E6");
  3416. });//$( "div" ).not( ".green, #blueone" )
  3417. $('textarea').not( ".no-code" ).numberedtextarea({
  3418. // font color for line numbers
  3419. color: null,
  3420. // border color
  3421. borderColor: 'null',
  3422. // CSS class to be added to the line numbers
  3423. class: null,
  3424. // if true Tab key creates indentation
  3425. allowTabChar: true,
  3426. });
  3427. //more/less
  3428. $(".toggleTabExtra").click(function () {
  3429. $(this).find('.btn-text').text(function(i, text){
  3430. return text === "More" ? "Less" : "More";
  3431. })
  3432. $(this).find('i').toggleClass('fa-chevron-down fa-chevron-up');
  3433. });
  3434. $("#toggleAllExtra").click(function () {
  3435. $( ".toggleTabExtra" ).each(function() {
  3436. $(this).click();
  3437. });
  3438. $(this).find('i').toggleClass('fa-toggle-off fa-toggle-on');
  3439. });
  3440. $(".email-header .close-button").click(function () {
  3441. $(".email-content").removeClass("email-active");
  3442. $(".settingsMenu").removeClass("settingsMenuActive");
  3443. $(".settingsMenu").removeClass("settingsMenuInactive");
  3444. $('html').removeClass("overhid");
  3445. $("#settings-list").find("li").removeClass("active");
  3446. });
  3447. $(document).mouseup(function (e)
  3448. {
  3449. var container = $(".email-content, .checkFrame, .scroller-body");
  3450. if (!container.is(e.target) && container.has(e.target).length === 0) {
  3451. $(".email-content").removeClass("email-active");
  3452. $('html').removeClass("overhid");
  3453. $("#settings-list").find("li").removeClass("active");
  3454. }
  3455. });
  3456. $( document ).on( 'keydown', function ( e ) {
  3457. if ( e.keyCode === 27 ) { // ESC
  3458. var container = $(".email-content");
  3459. if (!container.is(e.target) && container.has(e.target).length === 0) {
  3460. $(".email-content").removeClass("email-active");
  3461. $(".settingsMenu").removeClass("settingsMenuActive");
  3462. $(".settingsMenu").removeClass("settingsMenuInactive");
  3463. $('html').removeClass("overhid");
  3464. $("#settings-list").find("li").removeClass("active");
  3465. }
  3466. }
  3467. });
  3468. $("#open-info, #open-users, #open-logs, #open-advanced, #open-homepage, #open-colors, #open-tabs, #open-donate, #open-invites , #open-themes, #open-speedtest, #open-email").on("click",function (e) {
  3469. $(".email-content").removeClass("email-active");
  3470. $('html').removeClass("overhid");
  3471. if($(window).width() < 768){
  3472. $('html').addClass("overhid");
  3473. }
  3474. //Theme box
  3475. if($(this).attr("box") == "themes-box"){
  3476. getLayerCakeThemes();
  3477. }
  3478. if (typeof $(this).attr("box") !== 'undefined') {
  3479. var settingsBox = $('.'+$(this).attr("box"));
  3480. }else{
  3481. var settingsBox = $('.themes-box');
  3482. }
  3483. //console.log(settingsBox);
  3484. settingsBox.addClass("email-active");
  3485. $("#settings-list").find("li").removeClass("active");
  3486. $(this).parent().addClass("active");
  3487. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
  3488. setTimeout(function(){
  3489. var refreshMailPreloader = settingsBox.find('.refresh-preloader'),
  3490. deletedMailBox = refreshMailPreloader.fadeOut(300, function(){
  3491. refreshMailPreloader.remove();
  3492. });
  3493. },600);
  3494. e.preventDefault();
  3495. });
  3496. function checkGithub() {
  3497. $.ajax({
  3498. type: "GET",
  3499. url: "https://api.github.com/repos/causefx/Organizr/releases",
  3500. dataType: "json",
  3501. success: function(github) {
  3502. var currentVersion = "<?php echo INSTALLEDVERSION;?>";
  3503. infoTabVersion = $('#about').find('#version');
  3504. infoTabVersionHistory = $('#about').find('#versionHistory');
  3505. infoTabNew = $('#about').find('#whatsnew');
  3506. infoTabDownload = $('#about').find('#downloadnow');
  3507. $.each(github, function(i,v) {
  3508. if(i === 0){
  3509. console.log(v.tag_name);
  3510. githubVersion = v.tag_name;
  3511. githubDescription = v.body;
  3512. githubName = v.name;
  3513. }
  3514. $(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>');
  3515. size_li = $("#versionHistory li").size();
  3516. x=2;
  3517. $('#versionHistory li:lt('+x+')').show();
  3518. });
  3519. if(currentVersion < githubVersion){
  3520. console.log("You Need To Upgrade");
  3521. 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];?>");
  3522. $(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);
  3523. <?php if (extension_loaded("ZIP")){?>
  3524. $(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>");
  3525. $( "p[id^='upgrade']" ).toggle();
  3526. <?php }else{ ?>
  3527. $(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>");
  3528. $( "p[id^='upgrade']" ).toggle();
  3529. <?php } ?>
  3530. }else if(currentVersion === githubVersion){
  3531. console.log("You Are on Current Version");
  3532. }else{
  3533. console.log("something went wrong");
  3534. }
  3535. $(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);?> <strong><?php echo $language->translate("DOMAIN");?>: </strong> <?php echo substr(getServerPath(), 0, -1);?>");
  3536. }
  3537. });
  3538. }
  3539. function layerCake(type, path) {
  3540. $.ajax({
  3541. type: "GET",
  3542. url: "ajax.php?a=show-file&file=https://raw.githubusercontent.com/leram84/layer.Cake/master/"+path+"/"+type+".css",
  3543. dataType: "text",
  3544. success: function(github) {
  3545. cssTab = $("a[href^='#tab-theme_css']");
  3546. cssTab.trigger("click");
  3547. $('#customCSS_id').text(github);
  3548. $('#installedTheme').val('');
  3549. $("#installedTheme").attr('data-changed', 'true');
  3550. swal({
  3551. title: "Loaded Layer#Cake "+type,
  3552. text: '<h2>Awesome Sauce!</h2><p>Now that you have enabled Layer#Cake, edit the colors here and then hit Save at the top right.<blockquote class="blockquote-reverse"><p>Layer#Cake is powered and brought to you by:</p><footer>Hackerman - <cite title="Source Title">Leram</cite></footer></blockquote>',
  3553. html: true,
  3554. confirmButtonColor: "#63A8EB"
  3555. });
  3556. }
  3557. });
  3558. }
  3559. function getLayerCakeThemes() {
  3560. $.ajax({
  3561. type: "GET",
  3562. url: "https://api.github.com/repos/leram84/layer.Cake/contents/Themes",
  3563. dataType: "json",
  3564. success: function(github) {
  3565. themeList = $('#theme-list');
  3566. themeList.html("");
  3567. var countThemes = 0;
  3568. $.each(github, function(i,v) {
  3569. if(v.type === "file"){
  3570. i++;
  3571. countThemes = i;
  3572. file = v.name.split("-");
  3573. preview = v.name.split(".");
  3574. preview = preview[0].substring(4, preview[0].length -2).split("-");
  3575. version = file[3].split(".");
  3576. version = version[0]+'.'+version[1];
  3577. fileName = file[1];
  3578. fileOrder = file[0];
  3579. fileAuthor = file[2];
  3580. if(fileName == '<?php echo $themeName; ?>'){
  3581. if(version !== '<?php echo $themeVersion; ?>'){
  3582. //update available
  3583. info = '<p class="pull-right"><span class="label label-primary">Update Available</span></p>';
  3584. }else{
  3585. //no update available
  3586. info = '<p class="pull-right"><span class="label label-success">Installed</span></p>';
  3587. }
  3588. }else{
  3589. info = '';
  3590. }
  3591. $(themeList).append('<li><a preview="'+preview[0]+'.png" name="'+fileName+'" check="'+fileName+'-'+version+'" version="'+version+'" file="'+v.name+'" path="'+v.path+'" order="'+fileOrder+'" author="'+fileAuthor+'" id="LC-'+fileName+'">'+fileName+' v'+version+' '+info+'</a></li>');
  3592. }
  3593. });
  3594. console.log(countThemes);
  3595. }
  3596. });
  3597. }
  3598. function layerCakeTheme(path, name, author, theme) {
  3599. var settingsBox = $('.themes-box');
  3600. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
  3601. $.ajax({
  3602. type: "GET",
  3603. url: "ajax.php?a=show-file&file=https://raw.githubusercontent.com/leram84/layer.Cake/master/Themes/"+path,
  3604. dataType: "text",
  3605. success: function(github) {
  3606. $("#open-colors").trigger("click");
  3607. $("a[href^='#tab-theme_css']").trigger("click");
  3608. $('#customCSS_id').text(github);
  3609. $("#customCSS_id").attr('data-changed', 'true');
  3610. $('#installedTheme').val(theme);
  3611. $('.themeHeader').text('Installed Theme: '+theme);
  3612. $("#installedTheme").attr('data-changed', 'true');
  3613. swal({
  3614. title: "Loaded Theme: "+name,
  3615. text: '<h2>Awesome Sauce!</h2><p>Theme has been imported. <p><strong style="color: red;">Please click Save at the top right.</strong></p><blockquote class="blockquote-reverse"><p>Layer#Cake Theme by:</p><footer><cite title="Source Title">'+author+'</cite></footer></blockquote>',
  3616. html: true,
  3617. confirmButtonColor: "#63A8EB"
  3618. });
  3619. }
  3620. });
  3621. }
  3622. //layerCake Themes
  3623. $(document).on('click', "a[id*=LC-]", function(){
  3624. file = $(this).attr("file");
  3625. name = $(this).attr("name");
  3626. author = $(this).attr("author");
  3627. theme = $(this).attr("name")+'-'+$(this).attr("version");
  3628. $.ajax({
  3629. type: 'GET',
  3630. url: 'https://raw.githubusercontent.com/leram84/layer.Cake/master/Themes/Information/'+name+'.txt',
  3631. dataType: "html",
  3632. async: false,
  3633. success: function(msg){
  3634. gotinformation = msg.replace(/\r\n|\r|\n/g,"<br/>");
  3635. },
  3636. error: function(msg){
  3637. gotinformation = "There is no information for theme "+name;
  3638. }
  3639. });
  3640. information = '<div class="caption gray-bg"><h3>Theme Information</h3><p>'+gotinformation+'</p></div>';
  3641. button = '<div class="thumbnail gray-bg"><div class="caption gray-bg"><p class="pull-left">'+name+' by: '+author+'</p><p class="pull-right"><button type="button" onclick="layerCakeTheme(\''+file+'\',\''+name+'\',\''+author+'\',\''+theme+'\')" class="btn btn-success waves waves-effect waves-float">Install</button></p></div><img src="https://raw.githubusercontent.com/leram84/layer.Cake/master/Themes/Preview/'+$(this).attr("preview")+'" alt="thumbnail">'+information+'</div>';
  3642. $('#chooseLayer').hide();
  3643. themeInfo = $('#layerCakeInfo');
  3644. $('#layerCakePreview').html( ''+button+'' );
  3645. });
  3646. $("#clearTheme").click(function () {
  3647. swal({
  3648. title: "Please Choose",
  3649. text: "You can clear just the theme name saved or clear theme name and CSS",
  3650. type: "warning",
  3651. showCancelButton: true,
  3652. confirmButtonColor: "#DD6B55",
  3653. confirmButtonText: "Clear Everything!",
  3654. cancelButtonText: "Clear Name Only!",
  3655. closeOnConfirm: false,
  3656. closeOnCancel: false,
  3657. confirmButtonColor: "#63A8EB"
  3658. },
  3659. function (isConfirm) {
  3660. if (isConfirm) {
  3661. swal("Cleared!", "All Theme settings have been cleared", "success");
  3662. $('#customCSS_id').text("");
  3663. $("#customCSS_id").attr('data-changed', 'true');
  3664. $('#installedTheme').val("");
  3665. $('.themeHeader').text('Installed Theme: No Theme Installed!');
  3666. $("#installedTheme").attr('data-changed', 'true');
  3667. $('#appearance_settings_form_submit').addClass("animated tada");
  3668. } else {
  3669. swal("Cleared", "Cleared the Theme name saved, CSS still remains", "success");
  3670. $('#installedTheme').val("");
  3671. $('.themeHeader').text('Installed Theme: No Theme Installed!');
  3672. $("#installedTheme").attr('data-changed', 'true');
  3673. $('#appearance_settings_form_submit').addClass("animated tada");
  3674. }
  3675. });
  3676. });
  3677. </script>
  3678. <script>
  3679. $( document ).ready(function() {
  3680. $("#homepage-items").sortable({
  3681. placeholder: "sort-placeholder col-md-3",
  3682. forcePlaceholderSize: true,
  3683. start: function( e, ui ){
  3684. ui.item.data( "start-pos", ui.item.index()+1 );
  3685. },
  3686. change: function( e, ui ){
  3687. var seq,
  3688. startPos = ui.item.data( "start-pos" ),
  3689. $index,
  3690. correction;
  3691. correction = startPos <= ui.placeholder.index() ? 0 : 1;
  3692. ui.item.parent().find( "div.sort-homepage").each( function( idx, el ){
  3693. var $this = $( el ),
  3694. $index = $this.index();
  3695. if ( ( $index+1 >= startPos && correction === 0) || ($index+1 <= startPos && correction === 1 ) ){
  3696. $index = $index + correction;
  3697. $this.find( ".ordinal-position").text( $index);
  3698. link = $this.find( ".ordinal-position" ).attr('data-link');
  3699. $('#homepage-values [name='+link+']').val($index);
  3700. $('#homepage-values [name='+link+']').attr('data-changed', 'true');
  3701. console.log(link+' - '+$index);
  3702. }
  3703. });
  3704. seq = ui.item.parent().find( "div.sort-placeholder.col-md-3").index() + correction;
  3705. ui.item.find( ".ordinal-position" ).text( seq );
  3706. newlink = ui.item.find( ".ordinal-position" ).attr('data-link');
  3707. $('#homepage-values [name='+newlink+']').val(seq);
  3708. $('#homepage-values [name='+newlink+']').attr('data-changed', 'true');
  3709. console.log(newlink+' - '+seq);
  3710. }
  3711. });
  3712. $(".iconpickeradd").on("click", function() {
  3713. console.log('icon picker start add');
  3714. $(this).iconpicker({placement: 'right', hideOnSelect: false, collision: true});
  3715. $(".iconpicker-items").niceScroll({
  3716. railpadding: {top:0,right:0,left:0,bottom:0},
  3717. scrollspeed: 30,
  3718. mousescrollstep: 60,
  3719. grabcursorenabled: false
  3720. });
  3721. $(this).focus();
  3722. });
  3723. //AJAX Submit for URL Check
  3724. $('#urlTestForm_submit').on('click', function () {
  3725. ajax_request('POST', 'check-url', {
  3726. checkurl: $('#urlTestForm [name=url-test]').val(),
  3727. });
  3728. });
  3729. //Hide Icon box on load
  3730. $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).hide();
  3731. //Set Some Scrollbars
  3732. $(".note-editable panel-body").niceScroll({
  3733. railpadding: {top:0,right:0,left:0,bottom:0},
  3734. grabcursorenabled: false
  3735. });
  3736. $(".scroller-body").niceScroll({
  3737. railpadding: {top:0,right:0,left:0,bottom:0},
  3738. grabcursorenabled: false
  3739. });
  3740. $(".email-content").niceScroll({
  3741. railpadding: {top:0,right:0,left:0,bottom:0},
  3742. railoffset: {top:75,right:0,left:0,bottom:75},
  3743. grabcursorenabled: false,
  3744. zindex: 1101
  3745. });
  3746. $("textarea").niceScroll({
  3747. railpadding: {top:0,right:0,left:0,bottom:0},
  3748. grabcursorenabled: false
  3749. });
  3750. //Stop Div behind From Scrolling
  3751. $( '.email-content' ).on( 'mousewheel', function ( e ) {
  3752. e.preventDefault();
  3753. }, false);
  3754. //Set Hide Function
  3755. if (0) {
  3756. var authTypeFunc = function() {
  3757. // Hide Everything
  3758. $('#host-selected, #host-other, #host-plex, #host-emby, #host-ldap').hide();
  3759. // Qualify Auth Type
  3760. if($('#authType').val() !== "internal"){
  3761. $( '#host-selected' ).show();
  3762. // Qualify aithBackend
  3763. if($('#authBackend').val() === "plex"){
  3764. $('#host-selected, #host-plex').show();
  3765. }else if($('#authBackend').val().indexOf("emby")>=0){
  3766. $('#host-selected, #host-other, #host-emby').show();
  3767. }else if($('#authBackend').val() === "ldap"){
  3768. $('#host-selected, #host-other, #host-ldap').show();
  3769. }else {
  3770. $('#host-selected, #host-other').show();
  3771. }
  3772. }
  3773. }
  3774. //Hide Settings on selection
  3775. $('#authType, #authBackend').on('change', authTypeFunc);
  3776. //Hide Settings on Load
  3777. authTypeFunc();
  3778. } else { console.log() }
  3779. //Simulate Edit Tabs Click
  3780. //$("#open-tabs").trigger("click");
  3781. //Append Delete log to User Logs and Org Logs
  3782. $("#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>');
  3783. $("#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>')
  3784. $("a[id^='ToolTables_datatable_0'] span").html('<?php echo $language->translate("PRINT");?>')
  3785. //Enable Tooltips
  3786. $('[data-toggle="tooltip"]').tooltip();
  3787. //AJAX call to github to get version info
  3788. <?php if (GIT_CHECK == "true") { echo 'checkGithub()'; } ?>
  3789. //Edit Info tab with Github info
  3790. <?php if(file_exists(FAIL_LOG)) : ?>
  3791. goodCount = $('#loginStats').find('#goodCount');
  3792. goodPercent = $('#loginStats').find('#goodPercent');
  3793. goodTitle = $('#loginStats').find('#goodTitle');
  3794. badCount = $('#loginStats').find('#badCount');
  3795. badPercent = $('#loginStats').find('#badPercent');
  3796. badTitle = $('#loginStats').find('#badTitle');
  3797. $(goodCount).html("<?php echo $goodLogin;?>");
  3798. $(goodTitle).html("<?php echo $goodPercent;?>%");
  3799. $(goodPercent).attr('aria-valuenow', "<?php echo $goodPercent;?>");
  3800. $(goodPercent).attr('style', "width: <?php echo $goodPercent;?>%");
  3801. $(badCount).html("<?php echo $badLogin;?>");
  3802. $(badTitle).html("<?php echo $badPercent;?>%");
  3803. $(badPercent).attr('aria-valuenow', "<?php echo $badPercent;?>");
  3804. $(badPercent).attr('style', "width: <?php echo $badPercent;?>%");
  3805. <?php endif; ?>
  3806. });
  3807. </script>
  3808. </body>
  3809. </html>