settings.php 123 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738
  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. // Create Database Connection
  12. $file_db = new PDO('sqlite:'.DATABASE_LOCATION.'users.db');
  13. $file_db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  14. // Some PHP config stuff
  15. ini_set("display_errors", 1);
  16. ini_set("error_reporting", E_ALL | E_STRICT);
  17. // Confirm Access
  18. qualifyUser('admin', true);
  19. // Load User List
  20. $gotUsers = $file_db->query('SELECT * FROM users');
  21. // Load Colours/Appearance
  22. foreach(loadAppearance() as $key => $value) {
  23. $$key = $value;
  24. }
  25. // Slimbar
  26. if(SLIMBAR == "true") {
  27. $slimBar = "30";
  28. $userSize = "25";
  29. } else {
  30. $slimBar = "56";
  31. $userSize = "40";
  32. }
  33. ?>
  34. <!DOCTYPE html>
  35. <html lang="en" class="no-js">
  36. <head>
  37. <meta charset="UTF-8">
  38. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  39. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  40. <meta name="msapplication-tap-highlight" content="no" />
  41. <title>Settings</title>
  42. <link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
  43. <link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
  44. <link rel="stylesheet" href="bower_components/mdi/css/materialdesignicons.min.css">
  45. <link rel="stylesheet" href="bower_components/metisMenu/dist/metisMenu.min.css">
  46. <link rel="stylesheet" href="bower_components/Waves/dist/waves.min.css">
  47. <link rel="stylesheet" href="bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.css">
  48. <link rel="stylesheet" href="js/selects/cs-select.css">
  49. <link rel="stylesheet" href="js/selects/cs-skin-elastic.css">
  50. <link href="bower_components/iconpick/dist/css/fontawesome-iconpicker.min.css" rel="stylesheet">
  51. <link rel="stylesheet" href="bower_components/google-material-color/dist/palette.css">
  52. <link rel="stylesheet" href="bower_components/sweetalert/dist/sweetalert.css">
  53. <link rel="stylesheet" href="bower_components/smoke/dist/css/smoke.min.css">
  54. <script src="js/menu/modernizr.custom.js"></script>
  55. <script type="text/javascript" src="js/sha1.js"></script>
  56. <script type="text/javascript" src="js/user.js"></script>
  57. <link rel="stylesheet" href="bower_components/animate.css/animate.min.css">
  58. <link rel="stylesheet" href="bower_components/DataTables/media/css/jquery.dataTables.css">
  59. <link rel="stylesheet" href="bower_components/datatables-tabletools/css/dataTables.tableTools.css">
  60. <link rel="stylesheet" href="bower_components/numbered/jquery.numberedtextarea.css">
  61. <link rel="stylesheet" href="css/style.css?v=<?php echo INSTALLEDVERSION; ?>">
  62. <link rel="stylesheet" href="css/settings.css?v=<?php echo INSTALLEDVERSION; ?>">
  63. <link href="css/jquery.filer.css" rel="stylesheet">
  64. <link href="css/jquery.filer-dragdropbox-theme.css" rel="stylesheet">
  65. <!--[if lt IE 9]>
  66. <script src="bower_components/html5shiv/dist/html5shiv.min.js"></script>
  67. <script src="bower_components/respondJs/dest/respond.min.js"></script>
  68. <![endif]-->
  69. <!--Scripts-->
  70. <script src="bower_components/jquery/dist/jquery.min.js"></script>
  71. <script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
  72. <script src="bower_components/metisMenu/dist/metisMenu.min.js"></script>
  73. <script src="bower_components/Waves/dist/waves.min.js"></script>
  74. <script src="bower_components/moment/min/moment.min.js"></script>
  75. <script src="bower_components/jquery.nicescroll/jquery.nicescroll.min.js"></script>
  76. <script src="bower_components/slimScroll/jquery.slimscroll.min.js"></script>
  77. <script src="bower_components/malihu-custom-scrollbar-plugin/jquery.mCustomScrollbar.js"></script>
  78. <script src="bower_components/cta/dist/cta.min.js"></script>
  79. <!--Menu-->
  80. <script src="js/menu/classie.js"></script>
  81. <script src="bower_components/iconpick/dist/js/fontawesome-iconpicker.js"></script>
  82. <!--Selects-->
  83. <script src="js/selects/selectFx.js"></script>
  84. <script src="js/jscolor.js"></script>
  85. <script src="bower_components/sweetalert/dist/sweetalert.min.js"></script>
  86. <script src="bower_components/smoke/dist/js/smoke.min.js"></script>
  87. <script src="bower_components/numbered/jquery.numberedtextarea.js"></script>
  88. <!--Other-->
  89. <script src="js/ajax.js?v=<?php echo INSTALLEDVERSION; ?>"></script>
  90. <!--Notification-->
  91. <script src="js/notifications/notificationFx.js"></script>
  92. <script src="js/jqueri_ui_custom/jquery-ui.min.js"></script>
  93. <script src="js/jquery.filer.min.js" type="text/javascript"></script>
  94. <script src="js/custom.js?v=<?php echo INSTALLEDVERSION; ?>" type="text/javascript"></script>
  95. <script src="js/jquery.mousewheel.min.js" type="text/javascript"></script>
  96. <!--Data Tables-->
  97. <script src="bower_components/DataTables/media/js/jquery.dataTables.js"></script>
  98. <script src="bower_components/datatables.net-responsive/js/dataTables.responsive.js"></script>
  99. <script src="bower_components/datatables-tabletools/js/dataTables.tableTools.js"></script>
  100. <!--Other-->
  101. <script>
  102. function addTab() {
  103. var idNumber = Math.round(Math.random() * 999999999) + 1000000000;
  104. var $element = $('#tab-new').clone();
  105. $element.css('display','block');
  106. $element.attr('id', $element.attr('id').replace('new',idNumber));
  107. $element.find('[value=new]').attr('value', idNumber).val(idNumber);
  108. $element.find('[id][name]').each(function () {
  109. this.id = this.id.replace('new',idNumber);
  110. this.name = this.name.replace('new',idNumber);
  111. });
  112. $element.find('[for]').each(function () {
  113. $(this).attr('for',$(this).attr('for').replace('new',idNumber));
  114. });
  115. $element.appendTo('#submitTabs ul');
  116. $element.find('.icp-auto-pend').iconpicker({placement: 'left', hideOnSelect: false, collision: true}).hide();
  117. }
  118. function submitTabs(form) {
  119. var formData = {};
  120. var ids = [];
  121. $.each($(form).serializeArray(), function(i,v) {
  122. var regmatch = /(\w+)\[((?:new-)?\d+)\]/i.exec(v.name);
  123. if (regmatch) {
  124. if (ids.indexOf(regmatch[2]) == -1) {
  125. ids.push(regmatch[2]);
  126. if (typeof formData['order'] !== 'object') { formData['order'] = {}; }
  127. formData['order'][regmatch[2]] = ids.length;
  128. }
  129. if (typeof formData[regmatch[1]] !== 'object') { formData[regmatch[1]] = {}; }
  130. formData[regmatch[1]][regmatch[2]] = v.value;
  131. } else {
  132. console.log(regmatch);
  133. }
  134. });
  135. console.log(formData);
  136. ajax_request('POST', 'submit-tabs', formData);
  137. return false;
  138. }
  139. </script>
  140. <style>
  141. @media screen and (max-width:737px){
  142. .email-body{width: 100%; overflow: auto;}
  143. .email-content, .email-new {
  144. -webkit-overflow-scrolling: touch;
  145. -webkit-transform: translateZ(0);
  146. overflow: scroll;
  147. position: fixed;
  148. height:100% !important;
  149. margin-top:0;
  150. }.email-content .email-header, .email-new .email-header{
  151. padding: 10px 30px;
  152. z-index: 1000;
  153. }
  154. }@media screen and (min-width:737px){
  155. .email-body{width: 100%}
  156. .email-content .close-button, .email-content .email-actions, .email-new .close-button, .email-new .email-actions {
  157. position: relative;
  158. top: 15px;
  159. right: 0px;
  160. float: right;
  161. }.email-inner-section {
  162. margin-top: 50px;
  163. }.email-content, .email-new {
  164. overflow: auto;
  165. margin-top: 0;
  166. height: 100%;
  167. position: fixed;
  168. max-width: 100%;
  169. width: 84%;
  170. right: -84%;
  171. }.email-content .email-header, .email-new .email-header{
  172. position: fixed;
  173. padding: 10px 30px;
  174. width: 84%;
  175. z-index: 1000;
  176. }
  177. }ul.inbox-nav.nav {
  178. background: white;
  179. padding: 5px;
  180. border-radius: 5px;
  181. }.profile-usermenu ul li.active a {
  182. border-left: 3px solid <?=$activetabBG;?> !important;
  183. padding-left: 12px;
  184. }.profile-usermenu ul li a:hover {
  185. background: <?=$hoverbg;?> !important;
  186. color: <?=$hovertext;?> !important;
  187. cursor: pointer;
  188. }input.form-control.material.icp-auto.iconpicker-element.iconpicker-input {
  189. display: none;
  190. }input.form-control.iconpicker-search {
  191. color: black;
  192. }.key {
  193. font-family:Tahoma, sans-serif;
  194. border-style:solid;
  195. border-color:#D5D6AD #C1C1A8 #CDCBA5 #E7E5C5;
  196. border-width:2px 3px 8px 3px;
  197. background:#D6D4B4;
  198. display:inline-block;
  199. border-radius:5px;
  200. margin:3px;
  201. text-align:center;
  202. }.form-control.material {
  203. background-image: -webkit-gradient(linear, left top, left bottom, from(<?=$topbartext;?>), to(<?=$topbartext;?>)), -webkit-gradient(linear, left top, left bottom, from(#d2d2d2), to(#d2d2d2));
  204. background-image: -webkit-linear-gradient(<?=$topbartext;?>, <?=$topbartext;?>), -webkit-linear-gradient(#d2d2d2, #d2d2d2);
  205. background-image: linear-gradient(<?=$topbartext;?>, <?=$topbartext;?>), linear-gradient(#d2d2d2, #d2d2d2);
  206. }.key span {
  207. background:#ECEECA;
  208. color:#5D5E4F;
  209. display:block;
  210. font-size:12px;
  211. padding:0 2px;
  212. border-radius:3px;
  213. width:14px;
  214. height:18px;
  215. line-height:18px;
  216. text-align:center;
  217. font-weight:bold;
  218. letter-spacing:1px;
  219. text-transform:uppercase;
  220. }.key.wide span {
  221. width:auto;
  222. padding:0 12px;
  223. }.dragging{
  224. border: 2px solid;
  225. }.todo .action-btns a span {
  226. color: #76828e !important;
  227. }.todo li:nth-child(even) {
  228. background: #FFFFFF !important;
  229. }.themeImage {
  230. position: fixed;
  231. left: 160px;
  232. top: 0px;
  233. height: 400px;
  234. }.chooseTheme a span {
  235. position:absolute; display:none; z-index:99;
  236. }.chooseTheme a:hover span {
  237. display:block;
  238. }ul.nav.nav-tabs.apps {
  239. border: solid;
  240. border-top: 0;
  241. border-left: 0;
  242. border-right: 0;
  243. border-radius: 0;
  244. }li.apps.active {
  245. border: solid;
  246. border-bottom: 0;
  247. border-radius: 5px;
  248. top: 3px;
  249. }<?php if(CUSTOMCSS == "true") :
  250. $template_file = "custom.css";
  251. $file_handle = fopen($template_file, "rb");
  252. echo fread($file_handle, filesize($template_file));
  253. fclose($file_handle);
  254. echo "\n";
  255. endif; ?>
  256. </style>
  257. </head>
  258. <body class="scroller-body" style="padding: 0; background: #273238; overflow: hidden">
  259. <div id="main-wrapper" class="main-wrapper">
  260. <!--Content-->
  261. <div id="content" style="margin:0 10px; overflow:hidden">
  262. <br/>
  263. <div id="versionCheck"></div>
  264. <div class="row">
  265. <div class="col-lg-2">
  266. <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">
  267. <?php echo $language->translate("APPLY_CHANGES");?>
  268. </button>
  269. <div class="content-box profile-sidebar box-shadow">
  270. <img src="images/organizr-logo-h-d.png" width="100%" style="margin-top: -10px;">
  271. <div class="profile-usermenu">
  272. <ul class="nav" id="settings-list">
  273. <li class=""><a id="open-tabs"><i class="fa fa-list red-orange"></i>Edit Tabs</a></li>
  274. <li class=""><a id="open-colors"><i class="fa fa-paint-brush green"></i>Edit Colors</a></li>
  275. <li><a id="open-users"><i class="fa fa-user red"></i>Manage Users</a></li>
  276. <li><a id="open-logs"><i class="fa fa-file-text-o blue"></i>View Logs</a></li>
  277. <li><a id="open-homepage"><i class=" fa fa-home yellow"></i>Edit Homepage</a></li>
  278. <li><a id="open-advanced"><i class=" fa fa-cog light-blue"></i>Advanced</a></li>
  279. <li><a id="open-info"><i class=" fa fa-info orange"></i>&nbsp; About</a></li>
  280. </ul>
  281. </div>
  282. </div>
  283. </div>
  284. <div class="col-lg-10">
  285. </div>
  286. </div>
  287. <div class="email-content tab-box white-bg">
  288. <div class="email-body">
  289. <div class="email-header gray-bg">
  290. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  291. <h1>Edit Tabs</h1>
  292. </div>
  293. <div class="email-inner small-box">
  294. <div class="email-inner-section">
  295. <div class="small-box todo-list fade in" id="tab-tabs">
  296. <form id="submitTabs" onsubmit="submitTabs(this); return false;">
  297. <div class="sort-todo">
  298. <button id="newtab" type="button" class="btn waves btn-labeled btn-success btn-sm text-uppercase waves-effect waves-float" onclick="addTab()">
  299. <span class="btn-label"><i class="fa fa-picture-o"></i></span><?php echo translate("NEW_TAB");?>
  300. </button>
  301. <button id="iconHide" type="button" class="btn waves btn-labeled btn-warning btn-sm text-uppercase waves-effect waves-float">
  302. <span class="btn-label"><i class="fa fa-upload"></i></span><?php echo $language->translate("UPLOAD_ICONS");?>
  303. </button>
  304. <button id="iconAll" type="button" class="btn waves btn-labeled btn-info btn-sm text-uppercase waves-effect waves-float">
  305. <span class="btn-label"><i class="fa fa-picture-o"></i></span><?php echo $language->translate("VIEW_ICONS");?>
  306. </button>
  307. <button type="submit" class="btn waves btn-labeled btn-success btn btn-sm pull-right text-uppercase waves-effect waves-float">
  308. <span class="btn-label"><i class="fa fa-floppy-o"></i></span><?php echo translate('SAVE_TABS'); ?>
  309. </button>
  310. </div>
  311. <input type="file" name="files[]" id="uploadIcons" multiple="multiple">
  312. <div id="viewAllIcons" style="display: none;">
  313. <h4><strong><?php echo $language->translate("ALL_ICONS");?></strong> [<?php echo $language->translate("CLICK_ICON");?>]</h4>
  314. <div class="row">
  315. <textarea id="copyTarget" class="hideCopy" style="left: -9999px; top: 0; position: absolute;"></textarea>
  316. <?php
  317. $dirname = "images/";
  318. $images = scandir($dirname);
  319. $ignore = Array(".", "..", "favicon/", "favicon", "._.DS_Store", ".DS_Store", "confused.png", "sowwy.png", "sort-btns", "loading.png", "titlelogo.png", "default.svg", "login.png", "themes", "nadaplaying.jpg", "organizr-logo-h-d.png", "organizr-logo-h.png");
  320. foreach($images as $curimg){
  321. if(!in_array($curimg, $ignore)) { ?>
  322. <div class="col-xs-2" style="width: 75px; height: 75px; padding-right: 0px;">
  323. <a data-toggle="tooltip" data-placement="bottom" title="<?=$dirname.$curimg;?>" class="thumbnail" style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);">
  324. <img style="width: 50px; height: 50px;" src="<?=$dirname.$curimg;?>" alt="thumbnail" class="allIcons">
  325. </a>
  326. </div>
  327. <?php
  328. }
  329. }
  330. ?>
  331. </div>
  332. </div>
  333. <div class="panel">
  334. <div class="panel-body todo">
  335. <ul class="list-group ui-sortable">
  336. <?php
  337. foreach($file_db->query('SELECT * FROM tabs ORDER BY `order` asc') as $key => $row) {
  338. if (!isset($row['id'])) { $row['id'] = $key + 1; }
  339. echo printTabRow($row);
  340. }
  341. ?>
  342. </ul>
  343. </div>
  344. </div>
  345. </form>
  346. <?php echo printTabRow(false); ?>
  347. </div>
  348. </div>
  349. </div>
  350. </div>
  351. </div>
  352. <div class="email-content color-box white-bg">
  353. <?php
  354. // Build Colour Settings
  355. echo buildSettings(
  356. array(
  357. 'title' => 'Appearance Settings',
  358. 'id' => 'appearance_settings',
  359. 'submitAction' => 'update-appearance',
  360. 'tabs' => array(
  361. array(
  362. 'title' => 'Colours',
  363. 'id' => 'theme_colours',
  364. 'image' => 'images/paint.png',
  365. 'fields' => array(
  366. array(
  367. array(
  368. 'type' => 'button',
  369. 'labelTranslate' => 'CHOOSE_THEME',
  370. 'icon' => 'css3',
  371. 'id' => 'themeSelector',
  372. 'buttonType' => 'dark',
  373. 'buttonDrop' => '
  374. <ul class="dropdown-menu gray-bg">
  375. <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>
  376. <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>
  377. <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>
  378. <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>
  379. <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>
  380. <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>
  381. <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>
  382. <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>
  383. <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>
  384. <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>
  385. </ul>
  386. ',
  387. ),
  388. ),
  389. array(
  390. 'type' => 'header',
  391. 'labelTranslate' => 'TITLE',
  392. ),
  393. array(
  394. array(
  395. 'type' => 'text',
  396. 'format' => 'colour',
  397. 'labelTranslate' => 'TITLE',
  398. 'name' => 'title',
  399. 'id' => 'title',
  400. 'value' => $title,
  401. ),
  402. array(
  403. 'type' => 'text',
  404. 'format' => 'colour',
  405. 'class' => 'jscolor {hash:true}',
  406. 'labelTranslate' => 'TITLE_TEXT',
  407. 'name' => 'topbartext',
  408. 'id' => 'topbartext',
  409. 'value' => $topbartext,
  410. ),
  411. array(
  412. 'type' => 'text',
  413. 'format' => 'colour',
  414. 'class' => 'jscolor {hash:true}',
  415. 'labelTranslate' => 'LOADING_COLOR',
  416. 'name' => 'loading',
  417. 'id' => 'loading',
  418. 'value' => $loading,
  419. ),
  420. ),
  421. array(
  422. 'type' => 'header',
  423. 'labelTranslate' => 'NAVIGATION_BARS',
  424. ),
  425. array(
  426. array(
  427. 'type' => 'text',
  428. 'format' => 'colour',
  429. 'class' => 'jscolor {hash:true}',
  430. 'labelTranslate' => 'TOP_BAR',
  431. 'name' => 'topbar',
  432. 'id' => 'topbar',
  433. 'value' => $topbar,
  434. ),
  435. array(
  436. 'type' => 'text',
  437. 'format' => 'colour',
  438. 'class' => 'jscolor {hash:true}',
  439. 'labelTranslate' => 'BOTTOM_BAR',
  440. 'name' => 'bottombar',
  441. 'id' => 'bottombar',
  442. 'value' => $bottombar,
  443. ),
  444. array(
  445. 'type' => 'text',
  446. 'format' => 'colour',
  447. 'class' => 'jscolor {hash:true}',
  448. 'labelTranslate' => 'SIDE_BAR',
  449. 'name' => 'sidebar',
  450. 'id' => 'sidebar',
  451. 'value' => $sidebar,
  452. ),
  453. ),
  454. array(
  455. array(
  456. 'type' => 'text',
  457. 'format' => 'colour',
  458. 'class' => 'jscolor {hash:true}',
  459. 'labelTranslate' => 'HOVER_BG',
  460. 'name' => 'hoverbg',
  461. 'id' => 'hoverbg',
  462. 'value' => $hoverbg,
  463. ),
  464. array(
  465. 'type' => 'text',
  466. 'format' => 'colour',
  467. 'class' => 'jscolor {hash:true}',
  468. 'labelTranslate' => 'HOVER_TEXT',
  469. 'name' => 'hovertext',
  470. 'id' => 'hovertext',
  471. 'value' => $hovertext,
  472. ),
  473. ),
  474. array(
  475. 'type' => 'header',
  476. 'labelTranslate' => 'ACTIVE_TAB',
  477. ),
  478. array(
  479. array(
  480. 'type' => 'text',
  481. 'format' => 'colour',
  482. 'class' => 'jscolor {hash:true}',
  483. 'labelTranslate' => 'ACTIVE_TAB_BG',
  484. 'name' => 'activetabBG',
  485. 'id' => 'activetabBG',
  486. 'value' => $activetabBG,
  487. ),
  488. array(
  489. 'type' => 'text',
  490. 'format' => 'colour',
  491. 'class' => 'jscolor {hash:true}',
  492. 'labelTranslate' => 'ACTIVE_TAB_ICON',
  493. 'name' => 'activetabicon',
  494. 'id' => 'activetabicon',
  495. 'value' => $activetabicon,
  496. ),
  497. array(
  498. 'type' => 'text',
  499. 'format' => 'colour',
  500. 'class' => 'jscolor {hash:true}',
  501. 'labelTranslate' => 'ACTIVE_TAB_TEXT',
  502. 'name' => 'activetabtext',
  503. 'id' => 'activetabtext',
  504. 'value' => $activetabtext,
  505. ),
  506. ),
  507. array(
  508. 'type' => 'header',
  509. 'labelTranslate' => 'INACTIVE_TAB',
  510. ),
  511. array(
  512. array(
  513. 'type' => 'text',
  514. 'format' => 'colour',
  515. 'class' => 'jscolor {hash:true}',
  516. 'labelTranslate' => 'INACTIVE_ICON',
  517. 'name' => 'inactiveicon',
  518. 'id' => 'inactiveicon',
  519. 'value' => $inactiveicon,
  520. ),
  521. array(
  522. 'type' => 'text',
  523. 'format' => 'colour',
  524. 'class' => 'jscolor {hash:true}',
  525. 'labelTranslate' => 'INACTIVE_TEXT',
  526. 'name' => 'inactivetext',
  527. 'id' => 'inactivetext',
  528. 'value' => $inactivetext,
  529. ),
  530. ),
  531. ),
  532. ),
  533. array(
  534. 'title' => 'Custom CSS',
  535. 'id' => 'theme_css',
  536. 'image' => 'images/gear.png',
  537. 'fields' => array(
  538. array(
  539. 'type' => 'header',
  540. 'label' => 'Custom CSS',
  541. ),
  542. array(
  543. 'type' => 'textarea',
  544. 'name' => 'customCSS',
  545. 'value' => (file_exists('./custom.css')?file_get_contents('./custom.css'):''),
  546. 'rows' => 25,
  547. 'style' => 'background: #000; color: #FFF;',
  548. ),
  549. ),
  550. ),
  551. ),
  552. )
  553. );
  554. ?>
  555. </div>
  556. <div class="email-content homepage-box white-bg">
  557. <?php
  558. // Qualify most typical hostnames prior to form submission
  559. $urlPattern = '([hH][tT][tT][pP][sS]?):\/\/([\w\.\-]{1,250})(?::(\d{1,5}))?((?:\/[^?.\s]+))?';
  560. // Once configurable user groups is added change to select-multi to allow specific group selection
  561. $userSelectType = 'select';
  562. $userTypes = array(
  563. 'None' => 'false',
  564. 'User' => 'user|admin',
  565. 'Admin' => 'admin',
  566. );
  567. // Build Homepage Settings
  568. echo buildSettings(
  569. array(
  570. 'title' => 'Homepage Settings',
  571. 'id' => 'homepage_settings',
  572. 'onready' => '',
  573. 'tabs' => array(
  574. array(
  575. 'title' => 'General',
  576. 'id' => 'home_general',
  577. 'image' => 'images/gear.png',
  578. 'fields' => array(
  579. array(
  580. 'type' => $userSelectType,
  581. 'labelTranslate' => 'SHOW_HOMEPAGE',
  582. 'name' => 'homePageAuthNeeded',
  583. 'value' => HOMEPAGEAUTHNEEDED,
  584. 'options' => $userTypes,
  585. ),
  586. /*
  587. array(
  588. 'type' => 'custom',
  589. 'labelTranslate' => 'SHOW_HOMEPAGE',
  590. 'html' => 'homePageAuthNeeded',
  591. 'name' => 'homePagelayout',
  592. 'value' => '',
  593. ),
  594. */
  595. ),
  596. ),
  597. array(
  598. 'title' => 'Plex',
  599. 'id' => 'plex',
  600. 'image' => 'images/plex.png',
  601. 'fields' => array(
  602. array(
  603. 'type' => $userSelectType,
  604. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  605. 'name' => 'plexHomeAuth',
  606. 'value' => PLEXHOMEAUTH,
  607. 'options' => $userTypes,
  608. ),
  609. array(
  610. 'type' => 'text',
  611. 'placeholder' => 'http://hostname:32400',
  612. 'labelTranslate' => 'PLEX_URL',
  613. 'assist' => 'http://hostname:32400',
  614. 'name' => 'plexURL',
  615. 'pattern' => $urlPattern,
  616. 'value' => PLEXURL,
  617. ),
  618. array(
  619. 'type' => 'text',
  620. 'placeholder' => randString(20),
  621. 'labelTranslate' => 'PLEX_TOKEN',
  622. 'name' => 'plexToken',
  623. 'pattern' => '[a-zA-Z0-9]{20}',
  624. 'value' => PLEXTOKEN,
  625. ),
  626. array(
  627. 'type' => 'custom',
  628. 'html' => '<a href="https://support.plex.tv/hc/en-us/articles/204059436-Finding-an-authentication-token-X-Plex-Token">Plex Token Wiki Article</a>',
  629. ),
  630. array(
  631. array(
  632. 'type' => 'checkbox',
  633. 'labelTranslate' => 'RECENT_MOVIES',
  634. 'name' => 'plexRecentMovie',
  635. 'value' => PLEXRECENTMOVIE,
  636. ),
  637. array(
  638. 'type' => 'checkbox',
  639. 'labelTranslate' => 'RECENT_TV',
  640. 'name' => 'plexRecentTV',
  641. 'value' => PLEXRECENTTV,
  642. ),
  643. array(
  644. 'type' => 'checkbox',
  645. 'labelTranslate' => 'RECENT_MUSIC',
  646. 'name' => 'plexRecentMusic',
  647. 'value' => PLEXRECENTMUSIC,
  648. ),
  649. array(
  650. 'type' => 'checkbox',
  651. 'labelTranslate' => 'PLAYING_NOW',
  652. 'name' => 'plexPlayingNow',
  653. 'value' => PLEXPLAYINGNOW,
  654. ),
  655. ),
  656. ),
  657. ),
  658. array(
  659. 'title' => 'Emby',
  660. 'id' => 'emby',
  661. 'image' => 'images/emby.png',
  662. 'fields' => array(
  663. array(
  664. 'type' => $userSelectType,
  665. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  666. 'name' => 'embyHomeAuth',
  667. 'value' => EMBYHOMEAUTH,
  668. 'options' => $userTypes,
  669. ),
  670. array(
  671. 'type' => 'text',
  672. 'placeholder' => 'http://hostname:8096/emby',
  673. 'labelTranslate' => 'EMBY_URL',
  674. 'assist' => 'http://hostname:8096 | https://hostname/emby | http://hostname:8096/emby',
  675. 'name' => 'embyURL',
  676. 'pattern' => $urlPattern,
  677. 'value' => EMBYURL,
  678. ),
  679. array(
  680. 'type' => 'text',
  681. 'placeholder' => randString(32),
  682. 'labelTranslate' => 'EMBY_TOKEN',
  683. 'name' => 'embyToken',
  684. 'pattern' => '[a-zA-Z0-9]{32}',
  685. 'value' => EMBYTOKEN,
  686. ),
  687. array(
  688. array(
  689. 'type' => 'checkbox',
  690. 'labelTranslate' => 'RECENT_MOVIES',
  691. 'name' => 'embyRecentMovie',
  692. 'value' => EMBYRECENTMOVIE,
  693. ),
  694. array(
  695. 'type' => 'checkbox',
  696. 'labelTranslate' => 'RECENT_TV',
  697. 'name' => 'embyRecentTV',
  698. 'value' => EMBYRECENTTV,
  699. ),
  700. array(
  701. 'type' => 'checkbox',
  702. 'labelTranslate' => 'RECENT_MUSIC',
  703. 'name' => 'embyRecentMusic',
  704. 'value' => EMBYRECENTMUSIC,
  705. ),
  706. array(
  707. 'type' => 'checkbox',
  708. 'labelTranslate' => 'PLAYING_NOW',
  709. 'name' => 'embyPlayingNow',
  710. 'value' => EMBYPLAYINGNOW,
  711. ),
  712. ),
  713. ),
  714. ),
  715. array(
  716. 'title' => 'Sonarr',
  717. 'id' => 'sonarr',
  718. 'image' => 'images/sonarr.png',
  719. 'fields' => array(
  720. array(
  721. 'type' => $userSelectType,
  722. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  723. 'name' => 'sonarrHomeAuth',
  724. 'value' => SONARRHOMEAUTH,
  725. 'options' => $userTypes,
  726. ),
  727. array(
  728. 'type' => 'text',
  729. 'placeholder' => 'http://hostname:8989',
  730. 'labelTranslate' => 'SONARR_URL',
  731. 'assist' => 'http://hostname:8989 | hostname/sonarr | http://hostname:8989/sonarr',
  732. 'name' => 'sonarrURL',
  733. 'pattern' => $urlPattern,
  734. 'value' => SONARRURL,
  735. ),
  736. array(
  737. 'type' => 'text',
  738. 'placeholder' => randString(32),
  739. 'labelTranslate' => 'SONARR_KEY',
  740. 'name' => 'sonarrKey',
  741. 'pattern' => '[a-zA-Z0-9]{32}',
  742. 'value' => SONARRKEY,
  743. ),
  744. ),
  745. ),
  746. array(
  747. 'title' => 'Radarr',
  748. 'id' => 'radarr',
  749. 'image' => 'images/radarr.png',
  750. 'fields' => array(
  751. array(
  752. 'type' => $userSelectType,
  753. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  754. 'name' => 'radarrHomeAuth',
  755. 'value' => RADARRHOMEAUTH,
  756. 'options' => $userTypes,
  757. ),
  758. array(
  759. 'type' => 'text',
  760. 'placeholder' => 'http://hostname:7878',
  761. 'labelTranslate' => 'RADARR_URL',
  762. 'assist' => 'http://hostname:7878 | hostname/radarr | http://hostname:7878/radarr',
  763. 'name' => 'radarrURL',
  764. 'pattern' => $urlPattern,
  765. 'value' => RADARRURL,
  766. ),
  767. array(
  768. 'type' => 'text',
  769. 'placeholder' => randString(32),
  770. 'labelTranslate' => 'RADARR_KEY',
  771. 'name' => 'radarrKey',
  772. 'pattern' => '[a-zA-Z0-9]{32}',
  773. 'value' => RADARRKEY,
  774. ),
  775. ),
  776. ),
  777. array(
  778. 'title' => 'Sickbeard/Sickrage',
  779. 'id' => 'sick',
  780. 'image' => 'images/sickrage.png',
  781. 'fields' => array(
  782. array(
  783. 'type' => $userSelectType,
  784. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  785. 'name' => 'sickrageHomeAuth',
  786. 'value' => SICKRAGEHOMEAUTH,
  787. 'options' => $userTypes,
  788. ),
  789. array(
  790. 'type' => 'text',
  791. 'placeholder' => 'http://hostname:8081/sick',
  792. 'labelTranslate' => 'SICK_URL',
  793. 'assist' => 'http://hostname:8081 | hostname/sick | http://hostname:8081/sick',
  794. 'name' => 'sickrageURL',
  795. 'pattern' => $urlPattern,
  796. 'value' => SICKRAGEURL,
  797. ),
  798. array(
  799. 'type' => 'text',
  800. 'placeholder' => randString(32),
  801. 'labelTranslate' => 'SICK_KEY',
  802. 'name' => 'sickrageKey',
  803. 'value' => SICKRAGEKEY,
  804. ),
  805. ),
  806. ),
  807. array(
  808. 'title' => 'Headphones',
  809. 'id' => 'headphones',
  810. 'image' => 'images/headphones.png',
  811. 'fields' => array(
  812. array(
  813. 'type' => $userSelectType,
  814. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  815. 'name' => 'headphonesHomeAuth',
  816. 'value' => HEADPHONESHOMEAUTH,
  817. 'options' => $userTypes,
  818. ),
  819. array(
  820. 'type' => 'text',
  821. 'placeholder' => 'http://hostname:8181',
  822. 'labelTranslate' => 'HEADPHONES_URL',
  823. 'assist' => 'http://hostname:8181',
  824. 'name' => 'headphonesURL',
  825. 'pattern' => $urlPattern,
  826. 'value' => HEADPHONESURL,
  827. ),
  828. array(
  829. 'type' => 'text',
  830. 'placeholder' => randString(32),
  831. 'labelTranslate' => 'HEADPHONES_KEY',
  832. 'name' => 'headphonesKey',
  833. 'value' => HEADPHONESKEY,
  834. ),
  835. ),
  836. ),
  837. array(
  838. 'title' => 'Sabnzbd',
  839. 'id' => 'sabnzbd',
  840. 'image' => 'images/sabnzbd.png',
  841. 'fields' => array(
  842. array(
  843. 'type' => $userSelectType,
  844. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  845. 'name' => 'sabnzbdHomeAuth',
  846. 'value' => SABNZBDHOMEAUTH,
  847. 'options' => $userTypes,
  848. ),
  849. array(
  850. 'type' => 'text',
  851. 'placeholder' => 'http://hostname:8080/sabnzbd',
  852. 'labelTranslate' => 'SABNZBD_URL',
  853. 'assist' => 'http://hostname:8080 | http://hostname/sabnzbd | http://hostname:8080/sabnzbd',
  854. 'name' => 'sabnzbdURL',
  855. 'pattern' => $urlPattern,
  856. 'value' => SABNZBDURL,
  857. ),
  858. array(
  859. 'type' => 'text',
  860. 'placeholder' => randString(32),
  861. 'labelTranslate' => 'SABNZBD_KEY',
  862. 'name' => 'sabnzbdKey',
  863. 'value' => SABNZBDKEY,
  864. ),
  865. ),
  866. ),
  867. array(
  868. 'title' => 'nzbGET',
  869. 'id' => 'nzbget',
  870. 'image' => 'images/nzbget.png',
  871. 'fields' => array(
  872. array(
  873. 'type' => $userSelectType,
  874. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  875. 'name' => 'nzbgetHomeAuth',
  876. 'value' => NZBGETHOMEAUTH,
  877. 'options' => $userTypes,
  878. ),
  879. array(
  880. 'type' => 'text',
  881. 'placeholder' => 'http://hostname:6789',
  882. 'labelTranslate' => 'NZBGET_URL',
  883. 'assist' => 'http://hostname:6789',
  884. 'name' => 'nzbgetURL',
  885. 'pattern' => $urlPattern,
  886. 'value' => NZBGETURL,
  887. ),
  888. array(
  889. 'type' => 'text',
  890. 'labelTranslate' => 'USERNAME',
  891. 'name' => 'nzbgetUsername',
  892. 'value' => NZBGETUSERNAME,
  893. ),
  894. array(
  895. 'type' => 'password',
  896. 'labelTranslate' => 'PASSWORD',
  897. 'name' => 'nzbgetPassword',
  898. 'value' => (empty(NZBGETPASSWORD)?'':randString(20)),
  899. ),
  900. ),
  901. ),
  902. array(
  903. 'title' => 'Calendar',
  904. 'id' => 'calendar',
  905. 'image' => 'images/calendar.png',
  906. 'fields' => array(
  907. array(
  908. 'type' => 'select',
  909. 'labelTranslate' => 'CALENDAR_START_DAY',
  910. 'name' => 'calendarStart',
  911. 'value' => CALENDARSTART,
  912. 'options' => array(
  913. explode('|', translate('DAYS'))[0] => '0',
  914. explode('|', translate('DAYS'))[1] => '1',
  915. explode('|', translate('DAYS'))[2] => '2',
  916. explode('|', translate('DAYS'))[3] => '3',
  917. explode('|', translate('DAYS'))[4] => '4',
  918. explode('|', translate('DAYS'))[5] => '5',
  919. explode('|', translate('DAYS'))[6] => '6',
  920. ),
  921. ),
  922. array(
  923. 'type' => 'select',
  924. 'labelTranslate' => 'DEFAULT',
  925. 'name' => 'calendarView',
  926. 'value' => CALENDARVIEW,
  927. 'options' => array(
  928. translate('MONTH') => 'month',
  929. translate('DAY') => 'basicDay',
  930. translate('WEEK') => 'basicWeek',
  931. ),
  932. ),
  933. array(
  934. 'type' => 'select',
  935. 'labelTranslate' => 'CALTIMEFORMAT',
  936. 'name' => 'calTimeFormat',
  937. 'value' => CALTIMEFORMAT,
  938. 'options' => array(
  939. '6p' => 'h(:mm)t',
  940. '6:00p' => 'h:mmt',
  941. '6:00' => 'h:mm',
  942. '18' => 'H(:mm)',
  943. '18:00' => 'H:mm',
  944. ),
  945. ),
  946. array(
  947. 'type' => 'number',
  948. 'placeholder' => '10',
  949. 'labelTranslate' => 'CALENDAR_START_DATE',
  950. 'name' => 'calendarStartDay',
  951. 'pattern' => '[1-9][0-9]+',
  952. 'value' => CALENDARSTARTDAY,
  953. ),
  954. array(
  955. 'type' => 'number',
  956. 'placeholder' => '10',
  957. 'labelTranslate' => 'CALENDAR_END_DATE',
  958. 'name' => 'calendarEndDay',
  959. 'pattern' => '[1-9][0-9]+',
  960. 'value' => CALENDARENDDAY,
  961. ),
  962. ),
  963. ),
  964. array(
  965. 'title' => 'Custom HTML 1',
  966. 'id' => 'customhtml1',
  967. 'image' => 'images/gear.png',
  968. 'fields' => array(
  969. array(
  970. 'type' => $userSelectType,
  971. 'labelTranslate' => 'SHOW_ON_HOMEPAGE',
  972. 'name' => 'homepageCustomHTML1Auth',
  973. 'value' => HOMEPAGECUSTOMHTML1AUTH,
  974. 'options' => $userTypes,
  975. ),
  976. array(
  977. 'type' => 'textarea',
  978. 'labelTranslate' => 'CUSTOMHTML',
  979. 'name' => 'homepageCustomHTML1',
  980. 'value' => HOMEPAGECUSTOMHTML1,
  981. 'rows' => 10,
  982. 'style' => 'background: #000; color: #FFF;',
  983. ),
  984. ),
  985. ),
  986. ),
  987. )
  988. );
  989. ?>
  990. </div>
  991. <div class="email-content advanced-box white-bg">
  992. <?php
  993. $backendOptions = array();
  994. foreach (array_filter(get_defined_functions()['user'],function($v) { return strpos($v, 'plugin_auth_') === 0; }) as $value) {
  995. $name = str_replace('plugin_auth_','',$value);
  996. if (strpos($name, 'disabled') === false) {
  997. $backendOptions[ucwords(str_replace('_',' ',$name))] = $name;
  998. } else {
  999. $backendOptions[$value()] = array(
  1000. 'value' => randString(),
  1001. 'disabled' => true,
  1002. );
  1003. }
  1004. }
  1005. ksort($backendOptions);
  1006. echo buildSettings(
  1007. array(
  1008. 'title' => 'Advanced Settings',
  1009. 'id' => 'advanced_settings',
  1010. 'onready' => '$(\'#authType_id\').trigger(\'change\')',
  1011. 'tabs' => array(
  1012. array(
  1013. 'title' => 'Backend Authentication',
  1014. 'id' => 'be_auth',
  1015. 'image' => 'images/security.png',
  1016. 'fields' => array(
  1017. array(
  1018. 'type' => 'select',
  1019. 'labelTranslate' => 'AUTHTYPE',
  1020. 'name' => 'authType',
  1021. 'value' => AUTHTYPE,
  1022. 'onchange' => 'if (this.value == \'internal\') { $(\'.be-auth, #authBackend_id, #authBackendCreate_id\').parent().hide(); } else { $(\'#authBackend_id, #authBackendCreate_id\').trigger(\'change\').parent().show(); }',
  1023. 'options' => array(
  1024. 'Organizr' => 'internal',
  1025. 'Organizr & Backend' => 'both',
  1026. // 'Backend' => 'external',
  1027. ),
  1028. ),
  1029. array(
  1030. 'type' => 'select',
  1031. 'labelTranslate' => 'AUTHBACKEND',
  1032. 'name' => 'authBackend',
  1033. 'onchange' => '$(\'.be-auth\').each(function() { $(this).parent().hide(); }); $(\'.be-auth-\'+this.value).each(function() { $(this).parent().show(); });',
  1034. 'value' => AUTHBACKEND,
  1035. 'options' => $backendOptions,
  1036. ),
  1037. array(
  1038. 'type' => 'select',
  1039. 'labelTranslate' => 'AUTHBACKENDCREATE',
  1040. 'name' => 'authBackendCreate',
  1041. 'value' => AUTHBACKENDCREATE,
  1042. 'options' => array(
  1043. translate('YES_CREATE') => 'true',
  1044. translate('NO_CREATE') => 'false',
  1045. ),
  1046. ),
  1047. array(
  1048. 'type' => 'text',
  1049. 'placeholder' => 'http://hostname:8181',
  1050. 'labelTranslate' => 'AUTHBACKENDHOST',
  1051. 'assist' => 'http(s)://hostname:8181 | Ldap(s)://localhost:389 | ftp(s)://localhost:21',
  1052. 'name' => 'authBackendHost',
  1053. 'class' => 'be-auth be-auth-ftp be-auth-ldap',
  1054. 'pattern' => '((?:[hH][tT][tT][pP]|[lL][dD][aA][pP]|[fF][tT][pP])[sS]?):\/\/([\w\.]{1,250})(?::(\d{1,5}))?((?:\/[^?.\s]+))?',
  1055. 'value' => AUTHBACKENDHOST,
  1056. ),
  1057. array(
  1058. 'type' => 'text',
  1059. 'placeholder' => 'domain',
  1060. 'labelTranslate' => 'AUTHBACKENDDOMAIN',
  1061. 'name' => 'authBackendDomain',
  1062. 'class' => 'be-auth be-auth-ldap',
  1063. 'value' => AUTHBACKENDDOMAIN,
  1064. ),
  1065. array(
  1066. 'type' => 'text',
  1067. 'placeholder' => 'http://hostname:8096/emby',
  1068. 'labelTranslate' => 'EMBY_URL',
  1069. 'assist' => 'http://hostname:8096 | https://hostname/emby | http://hostname:8096/emby',
  1070. 'class' => 'be-auth be-auth-emby_local be-auth-emby_all be-auth-emby_connect',
  1071. 'name' => 'embyURL',
  1072. 'pattern' => $urlPattern,
  1073. 'value' => EMBYURL,
  1074. ),
  1075. array(
  1076. 'type' => 'text',
  1077. 'placeholder' => randString(32),
  1078. 'labelTranslate' => 'EMBY_TOKEN',
  1079. 'name' => 'plexToken',
  1080. 'class' => 'be-auth be-auth-emby_all be-auth-emby_connect',
  1081. 'pattern' => '[a-zA-Z0-9]{32}',
  1082. 'value' => EMBYTOKEN,
  1083. ),
  1084. array(
  1085. 'type' => 'text',
  1086. 'labelTranslate' => 'PLEX_USERNAME',
  1087. 'name' => 'plexUsername',
  1088. 'class' => 'be-auth be-auth-plex',
  1089. 'value' => PLEXUSERNAME,
  1090. ),
  1091. array(
  1092. 'type' => 'password',
  1093. 'labelTranslate' => 'PLEX_PASSWORD',
  1094. 'name' => 'plexPassword',
  1095. 'class' => 'be-auth be-auth-plex',
  1096. 'value' => (empty(PLEXPASSWORD)?'':randString(20)),
  1097. ),
  1098. ),
  1099. ),
  1100. array(
  1101. 'title' => 'Super Advanced',
  1102. 'id' => 'super_advanced',
  1103. 'image' => 'images/gear.png',
  1104. 'fields' => array(
  1105. array(
  1106. 'type' => 'text',
  1107. 'placeholder' => '/home/www-data/',
  1108. 'labelTranslate' => 'DATABASE_PATH',
  1109. 'name' => 'database_Location',
  1110. 'value' => DATABASE_LOCATION,
  1111. ),
  1112. array(
  1113. 'type' => 'select',
  1114. 'labelTranslate' => 'SET_TIMEZONE',
  1115. 'name' => 'timezone',
  1116. 'value' => TIMEZONE,
  1117. 'options' => timezoneOptions(),
  1118. ),
  1119. array(
  1120. 'type' => 'text',
  1121. 'labelTranslate' => 'REGISTER_PASSWORD',
  1122. 'name' => 'registerPassword',
  1123. 'value' => REGISTERPASSWORD,
  1124. ),
  1125. array(
  1126. 'type' => 'text',
  1127. 'labelTranslate' => 'COOKIE_DOMAIN',
  1128. 'name' => 'domain',
  1129. 'value' => DOMAIN,
  1130. ),
  1131. array(
  1132. 'type' => 'password',
  1133. 'labelTranslate' => 'COOKIE_PASSWORD',
  1134. 'name' => 'cookiePassword',
  1135. 'value' => (empty(COOKIEPASSWORD)?'':randString(20)),
  1136. ),
  1137. array(
  1138. 'type' => 'text',
  1139. 'labelTranslate' => 'GIT_BRANCH',
  1140. 'placeholder' => 'Default: \'master\' - Development: \'develop\' OR \'cero-dev\'',
  1141. 'id' => 'git_branch_id',
  1142. 'name' => 'git_branch',
  1143. 'value' => GIT_BRANCH,
  1144. ),
  1145. array(
  1146. array(
  1147. 'type' => 'checkbox',
  1148. 'labelTranslate' => 'GIT_CHECK',
  1149. 'name' => 'git_check',
  1150. 'value' => GIT_CHECK,
  1151. ),
  1152. array(
  1153. 'type' => 'button',
  1154. 'id' => 'gitForceInstall',
  1155. 'labelTranslate' => 'GIT_FORCE',
  1156. 'icon' => 'gear',
  1157. 'onclick' => 'if ($(\'#git_branch_id[data-changed]\').length) { alert(\'Branch was altered, save settings first!\') } else { if (confirm(\''.translate('GIT_FORCE_CONFIRM').'\')) { ajax_request(\'POST\', \'forceBranchInstall\'); } }',
  1158. ),
  1159. ),
  1160. array(
  1161. 'type' => 'checkbox',
  1162. 'labelTranslate' => 'MULTIPLE_LOGINS',
  1163. 'name' => 'multipleLogin',
  1164. 'value' => MULTIPLELOGIN,
  1165. ),
  1166. ),
  1167. ),
  1168. array(
  1169. 'title' => 'Mail Settings',
  1170. 'id' => 'mail_settings',
  1171. 'image' => 'images/mail.png',
  1172. 'fields' => array(
  1173. array(
  1174. 'type' => 'text',
  1175. 'placeholder' => 'mail.provider.com',
  1176. 'labelTranslate' => 'SMTP_HOST',
  1177. 'name' => 'smtpHost',
  1178. 'pattern' => '([\w\.\-]{1,250})',
  1179. 'value' => SMTPHOST,
  1180. ),
  1181. array(
  1182. 'type' => 'number',
  1183. 'placeholder' => '465',
  1184. 'labelTranslate' => 'SMTP_HOST_PORT',
  1185. 'name' => 'smtpHostPort',
  1186. 'value' => SMTPHOSTPORT,
  1187. ),
  1188. array(
  1189. 'type' => 'text',
  1190. 'labelTranslate' => 'SMTP_HOST_USERNAME',
  1191. 'name' => 'smtpHostUsername',
  1192. 'value' => SMTPHOSTUSERNAME,
  1193. ),
  1194. array(
  1195. 'type' => 'password',
  1196. 'labelTranslate' => 'SMTP_HOST_PASSWORD',
  1197. 'name' => 'smtpHostPassword',
  1198. 'value' => (empty(SMTPHOSTPASSWORD)?'':randString(20)),
  1199. ),
  1200. array(
  1201. 'type' => 'text',
  1202. 'labelTranslate' => 'SMTP_HOST_SENDER_NAME',
  1203. 'name' => 'smtpHostSenderName',
  1204. 'value' => SMTPHOSTSENDERNAME,
  1205. ),
  1206. array(
  1207. 'type' => 'text',
  1208. 'labelTranslate' => 'SMTP_HOST_SENDER_EMAIL',
  1209. 'name' => 'smtpHostSenderEmail',
  1210. 'value' => SMTPHOSTSENDEREMAIL,
  1211. ),
  1212. array(
  1213. array(
  1214. 'type' => 'checkbox',
  1215. 'labelTranslate' => 'SMTP_HOST_AUTH',
  1216. 'name' => 'smtpHostAuth',
  1217. 'value' => SMTPHOSTAUTH,
  1218. ),
  1219. array(
  1220. 'type' => 'checkbox',
  1221. 'labelTranslate' => 'ENABLE_MAIL',
  1222. 'name' => 'enableMail',
  1223. 'value' => ENABLEMAIL,
  1224. ),
  1225. ),
  1226. ),
  1227. ),
  1228. array(
  1229. 'title' => 'Advanced Visual',
  1230. 'id' => 'advanced_visual',
  1231. 'image' => 'images/paint.png',
  1232. 'fields' => array(
  1233. array(
  1234. 'type' => 'text',
  1235. 'placeholder' => 'images/organizr.png',
  1236. 'labelTranslate' => 'LOADING_ICON_URL',
  1237. 'name' => 'loadingIcon',
  1238. 'value' => LOADINGICON,
  1239. ),
  1240. array(
  1241. 'type' => 'text',
  1242. 'placeholder' => 'images/organizr.png',
  1243. 'labelTranslate' => 'LOGO_URL_TITLE',
  1244. 'name' => 'titleLogo',
  1245. 'value' => TITLELOGO,
  1246. ),
  1247. array(
  1248. 'type' => 'select',
  1249. 'labelTranslate' => 'NOTIFICATION_TYPE',
  1250. 'name' => 'notifyEffect',
  1251. 'onchange' => 'parent.notify(\'This is an example popup!\', \'bullhorn\', \'success\', 4000, this.value.split(\'-\')[0], this.value.split(\'-\')[1]);',
  1252. 'value' => NOTIFYEFFECT,
  1253. 'options' => array(
  1254. 'Slide From Top' => 'bar-slidetop',
  1255. 'Exploader From Top' => 'bar-exploader',
  1256. 'Flip' => 'attached-flip',
  1257. 'Bouncy Flip' => 'attached-bouncyflip',
  1258. 'Growl Scale' => 'growl-scale',
  1259. 'Growl Genie' => 'growl-genie',
  1260. 'Growl Jelly' => 'growl-jelly',
  1261. 'Growl Slide' => 'growl-slide',
  1262. 'Spinning Box' => 'other-boxspinner',
  1263. 'Sliding' => 'other-thumbslider',
  1264. ),
  1265. ),
  1266. array(
  1267. array(
  1268. 'type' => 'checkbox',
  1269. 'labelTranslate' => 'ENABLE_LOADING_SCREEN',
  1270. 'name' => 'loadingScreen',
  1271. 'value' => LOADINGSCREEN,
  1272. ),
  1273. array(
  1274. 'type' => 'checkbox',
  1275. 'labelTranslate' => 'ENABLE_SLIMBAR',
  1276. 'name' => 'slimBar',
  1277. 'value' => SLIMBAR,
  1278. ),
  1279. array(
  1280. 'type' => 'checkbox',
  1281. 'labelTranslate' => 'GRAVATAR',
  1282. 'name' => 'gravatar',
  1283. 'value' => GRAVATAR,
  1284. ),
  1285. ),
  1286. ),
  1287. ),
  1288. ),
  1289. )
  1290. );
  1291. ?>
  1292. </div>
  1293. <div class="email-content info-box white-bg">
  1294. <div class="email-body">
  1295. <div class="email-header gray-bg">
  1296. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  1297. <h1>About Organizr</h1>
  1298. </div>
  1299. <div class="email-inner small-box">
  1300. <div class="email-inner-section">
  1301. <div class="small-box fade in" id="about">
  1302. <h4><img src="images/organizr-logo-h-d.png" height="50px"></h4>
  1303. <p id="version"></p>
  1304. <p id="submitFeedback">
  1305. <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>
  1306. <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>
  1307. <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>
  1308. <a href='https://gitter.im/Organizrr/Lobby' target='_blank' type='button' class='btn waves btn-labeled btn-dark btn text-uppercase waves-effect waves-float'><span class='btn-label'><i class='fa fa-comments-o'></i></span><?php echo $language->translate("CHAT_WITH_US");?></a>
  1309. <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>
  1310. <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>
  1311. </p>
  1312. <div class="modal fade Help-Me-modal-lg" tabindex="-1" role="dialog">
  1313. <div class="modal-dialog modal-lg" role="document">
  1314. <div class="modal-content" style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;">
  1315. <div class="modal-header">
  1316. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  1317. <h4 class="modal-title"><?php echo $language->translate("HELP");?>!</h4>
  1318. </div>
  1319. <div class="modal-body" style="background: <?php echo $sidebar;?> !important;">
  1320. <div style="margin-bottom: 0px;" class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
  1321. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  1322. <div class="panel-heading" role="tab" id="headingOne">
  1323. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
  1324. <?php echo $language->translate("ADDING_TABS");?>
  1325. </h4>
  1326. </div>
  1327. <div id="collapseOne" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingOne" aria-expanded="true">
  1328. <div class="panel-body">
  1329. <p><?php echo $language->translate("START_ADDING_TABS");?></p>
  1330. <ul>
  1331. <li><strong><?php echo $language->translate("TAB_URL");?></strong> <?php echo $language->translate("TAB_URL_ABOUT");?></li>
  1332. <li><strong><?php echo $language->translate("ICON_URL");?></strong> <?php echo $language->translate("ICON_URL_ABOUT");?></li>
  1333. <li><strong><?php echo $language->translate("DEFAULT");?></strong> <?php echo $language->translate("DEFAULT_ABOUT");?></li>
  1334. <li><strong><?php echo $language->translate("ACTIVE");?></strong> <?php echo $language->translate("ACTIVE_ABOUT");?></li>
  1335. <li><strong><?php echo $language->translate("USER");?></strong> <?php echo $language->translate("USER_ABOUT");?></li>
  1336. <li><strong><?php echo $language->translate("GUEST");?></strong> <?php echo $language->translate("GUEST_ABOUT");?></li>
  1337. <li><strong><?php echo $language->translate("NO_IFRAME");?></strong> <?php echo $language->translate("NO_IFRAME_ABOUT");?></li>
  1338. </ul>
  1339. </div>
  1340. </div>
  1341. </div>
  1342. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  1343. <div class="panel-heading" role="tab" id="headingTwo">
  1344. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="true" aria-controls="collapseTwo">
  1345. <?php echo $language->translate("QUICK_ACCESS");?>
  1346. </h4>
  1347. </div>
  1348. <div id="collapseTwo" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingTwo" aria-expanded="true">
  1349. <div class="panel-body">
  1350. <p><?php echo $language->translate("QUICK_ACCESS_ABOUT");?> <mark><?php echo getServerPath(); ?>#Sonarr</mark></p>
  1351. </div>
  1352. </div>
  1353. </div>
  1354. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  1355. <div class="panel-heading" role="tab" id="headingThree">
  1356. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="true" aria-controls="collapseThree">
  1357. <?php echo $language->translate("SIDE_BY_SIDE");?>
  1358. </h4>
  1359. </div>
  1360. <div id="collapseThree" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingThree" aria-expanded="true">
  1361. <div class="panel-body">
  1362. <p><?php echo $language->translate("SIDE_BY_SIDE_ABOUT");?></p>
  1363. <ul>
  1364. <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS1");?></li>
  1365. <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS2");?> [<i class='mdi mdi-refresh'></i>]</li>
  1366. <li><?php echo $language->translate("SIDE_BY_SIDE_INSTRUCTIONS3");?></li>
  1367. </ul>
  1368. </div>
  1369. </div>
  1370. </div>
  1371. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  1372. <div class="panel-heading" role="tab" id="headingFour">
  1373. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFour" aria-expanded="true" aria-controls="collapseFour">
  1374. <?php echo $language->translate("KEYBOARD_SHORTCUTS");?>
  1375. </h4>
  1376. </div>
  1377. <div id="collapseFour" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFour" aria-expanded="true">
  1378. <div class="panel-body">
  1379. <p><?php echo $language->translate("KEYBOARD_SHORTCUTS_ABOUT");?></p>
  1380. <ul>
  1381. <li><keyboard class="key"><span>S</span></keyboard> + <keyboard class="key"><span>S</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS1");?></li>
  1382. <li><keyboard class="key"><span>F</span></keyboard> + <keyboard class="key"><span>F</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS6");?></li>
  1383. <li><keyboard class="key"><span>P</span></keyboard> + <keyboard class="key"><span>P</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS7");?></li>
  1384. <li><keyboard class="key"><span>M</span></keyboard> + <keyboard class="key"><span>M</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS8");?></li>
  1385. <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>
  1386. <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>
  1387. <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>
  1388. <li><keyboard class="key wide"><span>Esc</span></keyboard> + <keyboard class="key wide"><span>Esc</span></keyboard> <?php echo $language->translate("KEYBOARD_INSTRUCTIONS4");?></li>
  1389. </ul>
  1390. </div>
  1391. </div>
  1392. </div>
  1393. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  1394. <div class="panel-heading" role="tab" id="headingFive">
  1395. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseFive" aria-expanded="true" aria-controls="collapseFive">
  1396. <?php echo $language->translate("TAB_NOT_LOADING");?>
  1397. </h4>
  1398. </div>
  1399. <div id="collapseFive" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingFive" aria-expanded="true">
  1400. <div class="panel-body">
  1401. <p><?php echo $language->translate("TAB_NOT_LOADING_ABOUT");?></p>
  1402. <?php
  1403. 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>";
  1404. 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>";
  1405. else : echo "Sorry, currently there is no other alternative for " . get_browser_name(); endif;
  1406. ?>
  1407. </div>
  1408. </div>
  1409. </div>
  1410. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  1411. <div class="panel-heading" role="tab" id="headingSix">
  1412. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSix" aria-expanded="true" aria-controls="collapseSix">
  1413. <?php echo $language->translate("USER_ICONS");?>
  1414. </h4>
  1415. </div>
  1416. <div id="collapseSix" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSix" aria-expanded="true">
  1417. <div class="panel-body">
  1418. <p><?php echo $language->translate("USER_ICONS_ABOUT");?> <a href="http://gravatar.com" target="_blank">gravatar.com</a></p>
  1419. </div>
  1420. </div>
  1421. </div>
  1422. <div style="color: <?php echo $topbartext;?> !important; background: <?php echo $topbar;?> !important;" class="panel panel-default">
  1423. <div class="panel-heading" role="tab" id="headingSeven">
  1424. <h4 class="panel-title" style="text-decoration: none;" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseSeven" aria-expanded="true" aria-controls="collapseSeven">
  1425. <?php echo $language->translate("TRANSLATIONS");?>
  1426. </h4>
  1427. </div>
  1428. <div id="collapseSeven" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingSeven" aria-expanded="true">
  1429. <div class="panel-body">
  1430. <p><?php echo $language->translate("TRANSLATIONS_ABOUT");?> <a href="https://github.com/causefx/Organizr/tree/develop/lang" target="_blank">Github Develop Branch</a></p>
  1431. </div>
  1432. </div>
  1433. </div>
  1434. </div>
  1435. </div>
  1436. <div class="modal-footer">
  1437. <button type="button" class="btn btn-default waves" data-dismiss="modal"><?php echo $language->translate("CLOSE");?></button>
  1438. </div>
  1439. </div>
  1440. </div>
  1441. </div>
  1442. <p id="whatsnew"></p>
  1443. <p id="downloadnow"></p>
  1444. <div id="deleteDiv" style="display: none;" class="panel panel-danger">
  1445. <div class="panel-heading">
  1446. <h3 class="panel-title"><?php echo $language->translate("DELETE_DATABASE");?></h3>
  1447. </div>
  1448. <div class="panel-body">
  1449. <div class="">
  1450. <p><?php echo $language->translate("DELETE_WARNING");?></p>
  1451. <form id="deletedb" method="post" onsubmit="ajax_request('POST', 'deleteDB'); return false;">
  1452. <button class="btn waves btn-labeled btn-danger pull-right text-uppercase waves-effect waves-float" type="submit">
  1453. <span class="btn-label"><i class="fa fa-trash"></i></span><?php echo $language->translate("DELETE_DATABASE");?>
  1454. </button>
  1455. </form>
  1456. </div>
  1457. </div>
  1458. </div>
  1459. <div class="timeline-container">
  1460. <div class="row">
  1461. <div class="col-lg-12">
  1462. <ul class="cbp_tmtimeline" id="versionHistory">
  1463. </ul>
  1464. <div class="btn-group-sm btn-group btn-group-justified">
  1465. <div id="loadMore" class="btn-group" role="group">
  1466. <button type="button" class="btn waves btn-primary waves-effect waves-float text-uppercase"><?php echo $language->translate("SHOW_MORE");?></button>
  1467. </div>
  1468. <div id="showLess" class="btn-group" role="group">
  1469. <button type="button" class="btn waves btn-warning waves-effect waves-float text-uppercase"><?php echo $language->translate("SHOW_LESS");?></button>
  1470. </div>
  1471. </div>
  1472. </div>
  1473. </div>
  1474. </div>
  1475. </div>
  1476. </div>
  1477. </div>
  1478. </div>
  1479. </div>
  1480. <div class="email-content users-box white-bg">
  1481. <div class="email-body">
  1482. <div class="email-header gray-bg">
  1483. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  1484. <h1>Users Management</h1>
  1485. </div>
  1486. <div class="email-inner small-box">
  1487. <div class="email-inner-section">
  1488. <div class="small-box fade in" id="useredit">
  1489. <div class="row">
  1490. <div class="col-lg-12">
  1491. <div class="small-box">
  1492. <form class="content-form form-inline" name="new user registration" id="registration" action="" method="POST">
  1493. <input type="hidden" name="op" value="register"/>
  1494. <input type="hidden" name="sha1" value=""/>
  1495. <input type="hidden" name="settings" value="true"/>
  1496. <div class="form-group">
  1497. <input type="text" class="form-control material" name="username" placeholder="<?php echo $language->translate("USERNAME");?>" autocorrect="off" autocapitalize="off" value="">
  1498. </div>
  1499. <div class="form-group">
  1500. <input type="email" class="form-control material" name="email" placeholder="<?php echo $language->translate("EMAIL");?>">
  1501. </div>
  1502. <div class="form-group">
  1503. <input type="password" class="form-control material" name="password1" placeholder="<?php echo $language->translate("PASSWORD");?>">
  1504. </div>
  1505. <div class="form-group">
  1506. <input type="password" class="form-control material" name="password2" placeholder="<?php echo $language->translate("PASSWORD_AGAIN");?>">
  1507. </div>
  1508. <button type="submit" onclick="User.processRegistration()" class="btn waves btn-labeled btn-primary btn btn-sm text-uppercase waves-effect waves-float promoteUser">
  1509. <span class="btn-label"><i class="fa fa-user-plus"></i></span><?php echo $language->translate("CREATE_USER");?>
  1510. </button>
  1511. </form>
  1512. </div>
  1513. </div>
  1514. </div>
  1515. <div class="small-box">
  1516. <form class="content-form form-inline" name="unregister" id="unregister" action="" method="POST">
  1517. <p id="inputUsername"></p>
  1518. <div class="table-responsive">
  1519. <table class="table table-striped">
  1520. <thead>
  1521. <tr>
  1522. <th>#</th>
  1523. <th><?php echo $language->translate("USERNAME");?></th>
  1524. <th><?php echo $language->translate("EMAIL");?></th>
  1525. <th><?php echo $language->translate("LOGIN_STATUS");?></th>
  1526. <th><?php echo $language->translate("LAST_SEEN");?></th>
  1527. <th><?php echo $language->translate("USER_GROUP");?></th>
  1528. <th><?php echo $language->translate("USER_ACTIONS");?></th>
  1529. </tr>
  1530. </thead>
  1531. <tbody>
  1532. <?php $countUsers = 1;
  1533. foreach($gotUsers as $row) :
  1534. if($row['role'] == "admin" && $countUsers == 1) :
  1535. $userColor = "red";
  1536. $disableAction = "disabled=\"disabled\"";
  1537. else :
  1538. $userColor = "blue";
  1539. $disableAction = "";
  1540. endif;
  1541. if($row['active'] == "true") :
  1542. $userActive = $language->translate("LOGGED_IN");
  1543. $userActiveColor = "primary";
  1544. else :
  1545. $userActive = $language->translate("LOGGED_OUT");
  1546. $userActiveColor = "danger";
  1547. endif;
  1548. $userpic = md5( strtolower( trim( $row['email'] ) ) );
  1549. if(!empty($row["last"])) :
  1550. $lastActive = date("Y-m-d H:i", intval($row["last"]));
  1551. else :
  1552. $lastActive = "";
  1553. endif;
  1554. ?>
  1555. <tr id="<?=$row['username'];?>">
  1556. <th scope="row"><?=$countUsers;?></th>
  1557. <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>
  1558. <td><?=$row['email'];?></td>
  1559. <td><span class="label label-<?=$userActiveColor;?>"><?=$userActive;?></span></td>
  1560. <td><?=$lastActive;?></td>
  1561. <td><span class="text-uppercase <?=$userColor;?>"><?=$row['role'];?></span></td>
  1562. <td id="<?=$row['username'];?>">
  1563. <button <?=$disableAction;?> class="btn waves btn-labeled btn-danger btn btn-sm text-uppercase waves-effect waves-float deleteUser">
  1564. <span class="btn-label"><i class="fa fa-user-times"></i></span><?php echo $language->translate("DELETE");?>
  1565. </button>
  1566. <?php if ($row['role'] == "user") : ?>
  1567. <button class="btn waves btn-labeled btn-success btn btn-sm text-uppercase waves-effect waves-float promoteUser">
  1568. <span class="btn-label"><i class="fa fa-arrow-up"></i></span><?php echo $language->translate("PROMOTE");?>
  1569. </button>
  1570. <?php endif; ?>
  1571. <?php if ($row['role'] == "admin") : ?>
  1572. <button <?=$disableAction;?> class="btn waves btn-labeled btn-warning btn btn-sm text-uppercase waves-effect waves-float demoteUser">
  1573. <span class="btn-label"><i class="fa fa-arrow-down"></i></span><?php echo $language->translate("DEMOTE");?>
  1574. </button>
  1575. <?php endif; ?>
  1576. </td>
  1577. </tr>
  1578. <?php $countUsers++; endforeach; ?>
  1579. </tbody>
  1580. </table>
  1581. </div>
  1582. </form>
  1583. </div>
  1584. </div>
  1585. </div>
  1586. </div>
  1587. </div>
  1588. </div>
  1589. <div class="email-content logs-box white-bg">
  1590. <div class="email-body">
  1591. <div class="email-header gray-bg">
  1592. <button type="button" class="btn btn-danger btn-sm waves close-button"><i class="fa fa-close"></i></button>
  1593. <h1>Logs</h1>
  1594. </div>
  1595. <div class="email-inner small-box">
  1596. <div class="email-inner-section">
  1597. <div class="small-box" id="loginlog">
  1598. <div class="table-responsive">
  1599. <?php if(file_exists(FAIL_LOG)) : ?>
  1600. <div id="loginStats">
  1601. <div class="content-box ultra-widget">
  1602. <div class="w-progress">
  1603. <span id="goodCount" class="w-amount green"></span>
  1604. <span id="badCount" class="w-amount red pull-right">3</span>
  1605. <br>
  1606. <span class="text-uppercase w-name"><?php echo $language->translate("GOOD_LOGINS");?></span>
  1607. <span class="text-uppercase w-name pull-right"><?php echo $language->translate("BAD_LOGINS");?></span>
  1608. </div>
  1609. <div class="progress progress-bar-sm zero-m">
  1610. <div id="goodPercent" class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%"></div>
  1611. <div id="badPercent" class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%"></div>
  1612. </div>
  1613. <div class="w-status clearfix">
  1614. <div id="goodTitle" class="w-status-title pull-left text-uppercase">20%</div>
  1615. <div id="badTitle" class="w-status-number pull-right text-uppercase">80%</div>
  1616. </div>
  1617. </div>
  1618. </div>
  1619. <table id="datatable" class="display">
  1620. <thead>
  1621. <tr>
  1622. <th><?php echo $language->translate("DATE");?></th>
  1623. <th><?php echo $language->translate("USERNAME");?></th>
  1624. <th><?php echo $language->translate("IP_ADDRESS");?></th>
  1625. <th><?php echo $language->translate("TYPE");?></th>
  1626. </tr>
  1627. </thead>
  1628. <tbody>
  1629. <?php
  1630. $getFailLog = str_replace("\r\ndate", "date", file_get_contents(FAIL_LOG));
  1631. $gotFailLog = json_decode($getFailLog, true);
  1632. $goodLogin = 0;
  1633. $badLogin = 0;
  1634. function getColor($colorTest){
  1635. if($colorTest == "bad_auth") :
  1636. $gotColorTest = "danger";
  1637. elseif($colorTest == "good_auth") :
  1638. $gotColorTest = "primary";
  1639. endif;
  1640. echo $gotColorTest;
  1641. }
  1642. foreach (array_reverse($gotFailLog["auth"]) as $key => $val) :
  1643. if($val["auth_type"] == "bad_auth") : $badLogin++; elseif($val["auth_type"] == "good_auth") : $goodLogin++; endif;
  1644. ?>
  1645. <tr>
  1646. <td><?=$val["date"];?></td>
  1647. <td><?=$val["username"];?></td>
  1648. <td><?=$val["ip"];?></td>
  1649. <td><span class="label label-<?php getColor($val["auth_type"]);?>"><?=$val["auth_type"];?></span></td>
  1650. </tr>
  1651. <?php endforeach; ?>
  1652. </tbody>
  1653. </table>
  1654. <?php
  1655. $totalLogin = $goodLogin + $badLogin;
  1656. $goodPercent = round(($goodLogin / $totalLogin) * 100);
  1657. $badPercent = round(($badLogin / $totalLogin) * 100);
  1658. endif;
  1659. if(!file_exists(FAIL_LOG)) :
  1660. echo $language->translate("NOTHING_LOG");
  1661. endif;
  1662. ?>
  1663. </div>
  1664. </div>
  1665. </div>
  1666. </div>
  1667. </div>
  1668. </div>
  1669. </div>
  1670. <!--End Content-->
  1671. </div>
  1672. <script>
  1673. $(function () {
  1674. //Data Tables
  1675. $('#datatable').DataTable({
  1676. displayLength: 10,
  1677. dom: 'T<"clear">lfrtip',
  1678. responsive: true,
  1679. "order": [[ 0, 'desc' ]],
  1680. "language": {
  1681. "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);?>",
  1682. "infoEmpty": "<?php echo $language->translate('NO_ENTRIES');?>",
  1683. "infoFiltered": "<?php echo explosion($language->translate('FILTERED'), 0);?> _MAX_ <?php echo explosion($language->translate('FILTERED'), 1);?>",
  1684. "lengthMenu": "<?php echo $language->translate('SHOW');?> _MENU_ <?php echo $language->translate('ENTRIES');?>",
  1685. "search": "",
  1686. "searchPlaceholder": "<?php echo $language->translate('SEARCH');?>",
  1687. "searchClass": "<?php echo $language->translate('SEARCH');?>",
  1688. "zeroRecords": "<?php echo $language->translate('NO_MATCHING');?>",
  1689. "paginate": {
  1690. "next": "<?php echo $language->translate('NEXT');?>",
  1691. "previous": "<?php echo $language->translate('PREVIOUS');?>",
  1692. }
  1693. }
  1694. });
  1695. });
  1696. </script>
  1697. <script>
  1698. (function($) {
  1699. function startTrigger(e,data) {
  1700. var $elem = $(this);
  1701. $elem.data('mouseheld_timeout', setTimeout(function() {
  1702. $elem.trigger('mouseheld');
  1703. }, e.data));
  1704. }
  1705. function stopTrigger() {
  1706. var $elem = $(this);
  1707. clearTimeout($elem.data('mouseheld_timeout'));
  1708. }
  1709. var mouseheld = $.event.special.mouseheld = {
  1710. setup: function(data) {
  1711. var $this = $(this);
  1712. $this.bind('mousedown', +data || mouseheld.time, startTrigger);
  1713. $this.bind('mouseleave mouseup', stopTrigger);
  1714. },
  1715. teardown: function() {
  1716. var $this = $(this);
  1717. $this.unbind('mousedown', startTrigger);
  1718. $this.unbind('mouseleave mouseup', stopTrigger);
  1719. },
  1720. time: 200 // default to 750ms
  1721. };
  1722. })(jQuery);
  1723. $(function () {
  1724. //$(".todo ul").sortable();
  1725. $(".todo ul").sortable({
  1726. 'opacity': 0.9,
  1727. });
  1728. $("#add_tab").on('submit', function (e) {
  1729. e.preventDefault();
  1730. var $toDo = $(this).find('.name-of-todo');
  1731. toDo_name = $toDo.val();
  1732. if (toDo_name.length >= 3) {
  1733. var newid = $('.list-group-item').length + 1;
  1734. $(".todo ul").append(
  1735. '<li id="item-' + newid + '" class="list-group-item animated zoomInDown" style="position: relative; left: 0px; top: 0px;"><tab class="content-form form-inline"> <div class="form-group"><div class="action-btns" style="width:calc(100%)"><a class="" style="margin-left: 0px"><span style="font: normal normal normal 30px/1 FontAwesome;" class="fa fa-hand-paper-o"></span></a></div></div> <div class="form-group"><input style="width: 100%;" type="text" class="form-control material input-sm" name="name-' + newid + '" id="name[' + newid + ']" placeholder="<?php echo $language->translate("NEW_TAB_NAME");?>" value="' + toDo_name + '"></div> <div class="form-group"><input style="width: 100%;" type="text" class="form-control material input-sm" name="url-' + newid + '" id="url[' + newid + ']" placeholder="<?php echo $language->translate("TAB_URL");?>"></div> <div style="margin-right: 5px;" class="form-group"><div class="input-group"><input style="width: 100%;" name="icon-' + newid + '" data-placement="bottomRight" class="form-control material icp-auto" value="fa-diamond" type="text" /><span class="input-group-addon"></span></div> - <?php echo $language->translate("OR");?> -</div> <div class="form-group"><input style="width: 100%;" type="text" class="form-control material input-sm" id="iconurl-' + newid + '" name="iconurl-' + newid + '" placeholder="<?php echo $language->translate("ICON_URL");?>" value=""></div> <div class="form-group"> <div class="radio radio-danger"> <input type="radio" name="default" id="default[' + newid + ']" name="default"> <label for="default[' + newid + ']"><?php echo $language->translate("DEFAULT");?></label></div></div> <div class="form-group"><div class=""><input id="" class="switcher switcher-success" value="false" name="active-' + newid + '" type="hidden"><input name="active-' + newid + '" id="active[' + newid + ']" class="switcher switcher-success" type="checkbox" checked=""><label for="active[' + newid + ']"></label></div> <?php echo $language->translate("ACTIVE");?></div> <div class="form-group"><div class=""><input id="" class="switcher switcher-primary" value="false" name="user-' + newid + '" type="hidden"><input id="user[' + newid + ']" name="user-' + newid + '" class="switcher switcher-primary" type="checkbox" checked=""><label for="user[' + newid + ']"></label></div> <?php echo $language->translate("USER");?></div> <div class="form-group"><div class=""><input id="" class="switcher switcher-primary" value="false" name="guest-' + newid + '" type="hidden"><input name="guest-' + newid + '" id="guest[' + newid + ']" class="switcher switcher-warning" type="checkbox" checked=""><label for="guest[' + newid + ']"></label></div> <?php echo $language->translate("GUEST");?></div> <div class="form-group"><div class=""><input id="" class="switcher switcher-primary" value="false" name="window-' + newid + '" type="hidden"><input name="window-' + newid + '" id="window[' + newid + ']" class="switcher switcher-danger" type="checkbox"><label for="window[' + newid + ']"></label></div> <?php echo $language->translate("NO_IFRAME");?></div><div class="pull-right action-btns" style="padding-top: 8px;"><a class="trash"><span class="fa fa-trash"></span></a></div></tab></li>'
  1736. );
  1737. $('.icp-auto').iconpicker({placement: 'left', hideOnSelect: false, collision: true});
  1738. var eventObject = {
  1739. title: $.trim($("#" + newid).text()),
  1740. className: $("#" + newid).attr("data-bg"),
  1741. stick: true
  1742. };
  1743. $("#" + newid).data('eventObject', eventObject);
  1744. $toDo.val('').focus();
  1745. } else {
  1746. $toDo.focus();
  1747. }
  1748. });
  1749. count();
  1750. $(".list-group-item").addClass("list-item");
  1751. //Remove one completed item
  1752. $(document).on('click', '.trash', function (e) {
  1753. var listItemRemove = $(this).closest(".list-group-item");
  1754. var animation = "zoomOutRight";
  1755. var container = $(this).closest(".list-group-item");
  1756. //container.attr('class', 'list-group-item gray-bg animation-container');
  1757. container.addClass('animated ' + animation);
  1758. setTimeout(function() {
  1759. var clearedCompItem = listItemRemove.remove();
  1760. console.log("removed");
  1761. e.preventDefault();
  1762. count();
  1763. }, 800);
  1764. });
  1765. //Count items
  1766. function count() {
  1767. var active = $('.list-group-item').length;
  1768. $('.total-tabs span').text(active);
  1769. };
  1770. $("#submitTabs").on('submit', function (e) {
  1771. console.log('disabled this func')
  1772. return false;
  1773. console.log("submitted");
  1774. $("div.radio").each(function(i) {
  1775. $(this).find('input').attr('name', 'default-' + i);
  1776. console.log(i);
  1777. });
  1778. $('form input[type="radio"]').not(':checked').each(function() {
  1779. $(this).prop('checked', true);
  1780. $(this).prop('value', "false");
  1781. console.log("found unchecked");
  1782. });
  1783. });
  1784. $('#apply').on('click touchstart', function(){
  1785. window.parent.location.reload();
  1786. });
  1787. });
  1788. </script>
  1789. <script>
  1790. function rememberTabSelection(tabPaneSelector, useHash) {
  1791. var key = 'selectedTabFor' + tabPaneSelector;
  1792. if(get(key))
  1793. $(tabPaneSelector).find('a[href=' + get(key) + ']').tab('show');
  1794. $(tabPaneSelector).on("click", 'a[data-toggle]', function(event) {
  1795. set(key, this.getAttribute('href'));
  1796. });
  1797. function get(key) {
  1798. return useHash ? location.hash: localStorage.getItem(key);
  1799. }
  1800. function set(key, value){
  1801. if(useHash)
  1802. location.hash = value;
  1803. else
  1804. localStorage.setItem(key, value);
  1805. }
  1806. }
  1807. $("#notifyTest").click(function(){
  1808. var notifySplit = $("#notifyValue").val().split("-");
  1809. console.log(notifySplit[0]);
  1810. parent.notify("<?php echo $language->translate('TEST_MESSAGE');?>","flask","notice","5000", notifySplit[0], notifySplit[1]);
  1811. });
  1812. $("#iconHide").click(function(){
  1813. $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).toggle();
  1814. });
  1815. $("#iconAll").click(function(){
  1816. $( "div[id^='viewAllIcons']" ).toggle();
  1817. });
  1818. $("#deleteToggle").click(function(){
  1819. $( "#deleteDiv" ).toggle();
  1820. });
  1821. $(".deleteUser").click(function(){
  1822. var parent_id = $(this).parent().attr('id');
  1823. editUsername = $('#unregister').find('#inputUsername');
  1824. $(editUsername).html('<input type="hidden" name="op" value="unregister"/><input type="hidden" name="username"value="' + parent_id + '" />');
  1825. });
  1826. $(".promoteUser").click(function(){
  1827. var parent_ids = $(this).parent().attr('id');
  1828. editUsername = $('#unregister').find('#inputUsername');
  1829. $(editUsername).html('<input type="hidden" name="op" value="update"/><input type="hidden" name="role" value="admin"/><input type="hidden" name="username"value="' + parent_ids + '" />');
  1830. });
  1831. $(".demoteUser").click(function(){
  1832. var parent_idz = $(this).parent().attr('id');
  1833. editUsername = $('#unregister').find('#inputUsername');
  1834. $(editUsername).html('<input type="hidden" name="op" value="update"/><input type="hidden" name="role" value="user"/><input type="hidden" name="username"value="' + parent_idz + '" />');
  1835. });
  1836. $('#showLess').hide();
  1837. $('#loadMore').click(function () {
  1838. x= (x+5 <= size_li) ? x+5 : size_li;
  1839. $('#versionHistory li:lt('+x+')').show();
  1840. $('#showLess').show();
  1841. if(x == size_li){
  1842. $('#loadMore').hide();
  1843. }
  1844. });
  1845. $('#showLess').click(function () {
  1846. $('#versionHistory li').not(':lt(2)').hide();
  1847. $('#loadMore').show();
  1848. $('#showLess').hide();
  1849. });
  1850. $('.icp-auto').iconpicker({placement: 'left', hideOnSelect: false, collision: true});
  1851. $("li[class^='list-group-item']").bind('mouseheld', function(e) {
  1852. $(this).find("span[class^='fa fa-hand-paper-o']").attr("class", "fa fa-hand-grab-o");
  1853. $(this).addClass("dragging");
  1854. $(this).find("div[class^='action-btns tabIconView']").addClass("animated swing");
  1855. $(this).mouseup(function() {
  1856. $(this).find("span[class^='fa fa-hand-grab-o']").attr("class", "fa fa-hand-paper-o");
  1857. $(this).removeClass("dragging");
  1858. $(this).find("div[class^='action-btns tabIconView']").removeClass("animated swing");
  1859. });
  1860. });
  1861. function copyToClipboard(elem) {
  1862. // create hidden text element, if it doesn't already exist
  1863. var targetId = "_hiddenCopyText_";
  1864. var isInput = elem.tagName === "INPUT" || elem.tagName === "TEXTAREA";
  1865. var origSelectionStart, origSelectionEnd;
  1866. if (isInput) {
  1867. // can just use the original source element for the selection and copy
  1868. target = elem;
  1869. origSelectionStart = elem.selectionStart;
  1870. origSelectionEnd = elem.selectionEnd;
  1871. } else {
  1872. // must use a temporary form element for the selection and copy
  1873. target = document.getElementById(targetId);
  1874. if (!target) {
  1875. var target = document.createElement("textarea");
  1876. target.style.position = "absolute";
  1877. target.style.left = "-9999px";
  1878. target.style.top = "0";
  1879. target.id = targetId;
  1880. document.body.appendChild(target);
  1881. }
  1882. target.textContent = elem.textContent;
  1883. }
  1884. // select the content
  1885. var currentFocus = document.activeElement;
  1886. target.focus();
  1887. target.setSelectionRange(0, target.value.length);
  1888. // copy the selection
  1889. var succeed;
  1890. try {
  1891. succeed = document.execCommand("copy");
  1892. } catch(e) {
  1893. succeed = false;
  1894. }
  1895. // restore original focus
  1896. if (currentFocus && typeof currentFocus.focus === "function") {
  1897. //currentFocus.focus();
  1898. }
  1899. if (isInput) {
  1900. // restore prior selection
  1901. elem.setSelectionRange(origSelectionStart, origSelectionEnd);
  1902. } else {
  1903. // clear temporary content
  1904. target.textContent = "";
  1905. }
  1906. return succeed;
  1907. }
  1908. $("img[class^='allIcons']").click(function(){
  1909. $("textarea[id^='copyTarget']").val($(this).attr("src"));
  1910. copyToClipboard(document.getElementById("copyTarget"));
  1911. parent.notify("<?php echo $language->translate('ICON_COPY');?>","clipboard","success","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
  1912. $( "div[id^='viewAllIcons']" ).toggle();
  1913. });
  1914. $('body').on('click', 'b.allIcons', function() {
  1915. $("textarea[id^='copyTarget2']").val($(this).attr("title"));
  1916. copyToClipboard(document.getElementById("copyTarget2"));
  1917. parent.notify("<?php echo $language->translate('ICON_COPY');?>","clipboard","success","5000", "<?=$notifyExplode[0];?>", "<?=$notifyExplode[1];?>");
  1918. $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).hide();
  1919. });
  1920. </script>
  1921. <script>
  1922. //Custom Themes
  1923. function changeColor(elementName, elementColor) {
  1924. var definedElement = document.getElementById(elementName);
  1925. definedElement.focus();
  1926. definedElement.value = elementColor;
  1927. definedElement.style.backgroundColor = elementColor;
  1928. $(definedElement).trigger('change');
  1929. }
  1930. $('#plexTheme').on('click touchstart', function(){
  1931. changeColor("topbartext", "#E49F0C");
  1932. changeColor("topbar", "#000000");
  1933. changeColor("bottombar", "#000000");
  1934. changeColor("sidebar", "#121212");
  1935. changeColor("hoverbg", "#FFFFFF");
  1936. changeColor("activetabBG", "#E49F0C");
  1937. changeColor("activetabicon", "#FFFFFF");
  1938. changeColor("activetabtext", "#FFFFFF");
  1939. changeColor("inactiveicon", "#949494");
  1940. changeColor("inactivetext", "#B8B8B8");
  1941. changeColor("loading", "#E49F0C");
  1942. changeColor("hovertext", "#000000");
  1943. });
  1944. $('#embyTheme').on('click touchstart', function(){
  1945. changeColor("topbartext", "#52B54B");
  1946. changeColor("topbar", "#212121");
  1947. changeColor("bottombar", "#212121");
  1948. changeColor("sidebar", "#121212");
  1949. changeColor("hoverbg", "#FFFFFF");
  1950. changeColor("activetabBG", "#52B54B");
  1951. changeColor("activetabicon", "#FFFFFF");
  1952. changeColor("activetabtext", "#FFFFFF");
  1953. changeColor("inactiveicon", "#949494");
  1954. changeColor("inactivetext", "#B8B8B8");
  1955. changeColor("loading", "#52B54B");
  1956. changeColor("hovertext", "#000000");
  1957. });
  1958. $('#bookTheme').on('click touchstart', function(){
  1959. changeColor("topbartext", "#FFFFFF");
  1960. changeColor("topbar", "#3B5998");
  1961. changeColor("bottombar", "#3B5998");
  1962. changeColor("sidebar", "#8B9DC3");
  1963. changeColor("hoverbg", "#FFFFFF");
  1964. changeColor("activetabBG", "#3B5998");
  1965. changeColor("activetabicon", "#FFFFFF");
  1966. changeColor("activetabtext", "#FFFFFF");
  1967. changeColor("inactiveicon", "#DFE3EE");
  1968. changeColor("inactivetext", "#DFE3EE");
  1969. changeColor("loading", "#FFFFFF");
  1970. changeColor("hovertext", "#000000");
  1971. });
  1972. $('#spaTheme').on('click touchstart', function(){
  1973. changeColor("topbartext", "#5B391E");
  1974. changeColor("topbar", "#66BBAE");
  1975. changeColor("bottombar", "#66BBAE");
  1976. changeColor("sidebar", "#C3EEE7");
  1977. changeColor("hoverbg", "#66BBAE");
  1978. changeColor("activetabBG", "#C6C386");
  1979. changeColor("activetabicon", "#FFFFFF");
  1980. changeColor("activetabtext", "#FFFFFF");
  1981. changeColor("inactiveicon", "#5B391E");
  1982. changeColor("inactivetext", "#5B391E");
  1983. changeColor("loading", "#5B391E");
  1984. changeColor("hovertext", "#000000");
  1985. });
  1986. $('#darklyTheme').on('click touchstart', function(){
  1987. changeColor("topbartext", "#FFFFFF");
  1988. changeColor("topbar", "#375A7F");
  1989. changeColor("bottombar", "#375A7F");
  1990. changeColor("sidebar", "#222222");
  1991. changeColor("hoverbg", "#464545");
  1992. changeColor("activetabBG", "#FFFFFF");
  1993. changeColor("activetabicon", "#464545");
  1994. changeColor("activetabtext", "#464545");
  1995. changeColor("inactiveicon", "#0CE3AC");
  1996. changeColor("inactivetext", "#0CE3AC");
  1997. changeColor("loading", "#FFFFFF");
  1998. changeColor("hovertext", "#000000");
  1999. });
  2000. $('#slateTheme').on('click touchstart', function(){
  2001. changeColor("topbartext", "#C8C8C8");
  2002. changeColor("topbar", "#272B30");
  2003. changeColor("bottombar", "#272B30");
  2004. changeColor("sidebar", "#32383E");
  2005. changeColor("hoverbg", "#58C0DE");
  2006. changeColor("activetabBG", "#3E444C");
  2007. changeColor("activetabicon", "#C8C8C8");
  2008. changeColor("activetabtext", "#FFFFFF");
  2009. changeColor("inactiveicon", "#C8C8C8");
  2010. changeColor("inactivetext", "#C8C8C8");
  2011. changeColor("loading", "#C8C8C8");
  2012. changeColor("hovertext", "#000000");
  2013. });
  2014. $('#defaultTheme').on('click touchstart', function(){
  2015. changeColor("topbartext", "#FFFFFF");
  2016. changeColor("topbar", "#eb6363");
  2017. changeColor("bottombar", "#eb6363");
  2018. changeColor("sidebar", "#000000");
  2019. changeColor("hoverbg", "#eb6363");
  2020. changeColor("activetabBG", "#eb6363");
  2021. changeColor("activetabicon", "#FFFFFF");
  2022. changeColor("activetabtext", "#FFFFFF");
  2023. changeColor("inactiveicon", "#FFFFFF");
  2024. changeColor("inactivetext", "#FFFFFF");
  2025. changeColor("loading", "#FFFFFF");
  2026. changeColor("hovertext", "#000000");
  2027. });
  2028. $('#redTheme').on('click touchstart', function(){
  2029. changeColor("topbartext", "#FFFFFF");
  2030. changeColor("topbar", "#eb6363");
  2031. changeColor("bottombar", "#eb6363");
  2032. changeColor("sidebar", "#000000");
  2033. changeColor("hoverbg", "#eb6363");
  2034. changeColor("activetabBG", "#eb6363");
  2035. changeColor("activetabicon", "#FFFFFF");
  2036. changeColor("activetabtext", "#FFFFFF");
  2037. changeColor("inactiveicon", "#FFFFFF");
  2038. changeColor("inactivetext", "#FFFFFF");
  2039. changeColor("loading", "#FFFFFF");
  2040. changeColor("hovertext", "#000000");
  2041. });
  2042. $('#monokaiTheme').on('click touchstart', function(){
  2043. changeColor("topbartext", "#66D9EF");
  2044. changeColor("topbar", "#333333");
  2045. changeColor("bottombar", "#333333");
  2046. changeColor("sidebar", "#393939");
  2047. changeColor("hoverbg", "#AD80FD");
  2048. changeColor("activetabBG", "#F92671");
  2049. changeColor("activetabicon", "#FFFFFF");
  2050. changeColor("activetabtext", "#FFFFFF");
  2051. changeColor("inactiveicon", "#66D9EF");
  2052. changeColor("inactivetext", "#66D9EF");
  2053. changeColor("loading", "#66D9EF");
  2054. changeColor("hovertext", "#000000");
  2055. });
  2056. $('#thejokerTheme').on('click touchstart', function(){
  2057. changeColor("topbartext", "#CCCCCC");
  2058. changeColor("topbar", "#000000");
  2059. changeColor("bottombar", "#000000");
  2060. changeColor("sidebar", "#121212");
  2061. changeColor("hoverbg", "#CCC6CC");
  2062. changeColor("activetabBG", "#A50CB0");
  2063. changeColor("activetabicon", "#FFFFFF");
  2064. changeColor("activetabtext", "#FFFFFF");
  2065. changeColor("inactiveicon", "#949494");
  2066. changeColor("inactivetext", "#B8B8B8");
  2067. changeColor("loading", "#CCCCCC");
  2068. changeColor("hovertext", "#000000");
  2069. });
  2070. $('#newPlexTheme').on('click touchstart', function(){
  2071. changeColor("topbartext", "#E5A00D");
  2072. changeColor("topbar", "#282A2D");
  2073. changeColor("bottombar", "#282A2D");
  2074. changeColor("sidebar", "#3F4245");
  2075. changeColor("hoverbg", "#E5A00D");
  2076. changeColor("activetabBG", "#282A2D");
  2077. changeColor("activetabicon", "#E5A00D");
  2078. changeColor("activetabtext", "#E5A00D");
  2079. changeColor("inactiveicon", "#F9F9F9");
  2080. changeColor("inactivetext", "#F9F9F9");
  2081. changeColor("loading", "#E5A00D");
  2082. changeColor("hovertext", "#E0E3E6");
  2083. });
  2084. $('textarea').numberedtextarea({
  2085. // font color for line numbers
  2086. color: null,
  2087. // border color
  2088. borderColor: 'null',
  2089. // CSS class to be added to the line numbers
  2090. class: null,
  2091. // if true Tab key creates indentation
  2092. allowTabChar: true,
  2093. });
  2094. $(".email-header .close-button").click(function () {
  2095. $(".email-content").removeClass("email-active");
  2096. $('html').removeClass("overhid");
  2097. $("#settings-list").find("li").removeClass("active");
  2098. });
  2099. $(document).mouseup(function (e)
  2100. {
  2101. var container = $(".email-content");
  2102. if (!container.is(e.target) && container.has(e.target).length === 0) {
  2103. $(".email-content").removeClass("email-active");
  2104. $('html').removeClass("overhid");
  2105. $("#settings-list").find("li").removeClass("active");
  2106. }
  2107. });
  2108. $( document ).on( 'keydown', function ( e ) {
  2109. if ( e.keyCode === 27 ) { // ESC
  2110. var container = $(".email-content");
  2111. if (!container.is(e.target) && container.has(e.target).length === 0) {
  2112. $(".email-content").removeClass("email-active");
  2113. $('html').removeClass("overhid");
  2114. $("#settings-list").find("li").removeClass("active");
  2115. }
  2116. }
  2117. });
  2118. $("#open-tabs").on("click",function (e) {
  2119. $(".email-content").removeClass("email-active");
  2120. $('html').removeClass("overhid");
  2121. if($(window).width() < 768){
  2122. $('html').addClass("overhid");
  2123. }
  2124. var settingsBox = $('.tab-box');
  2125. settingsBox.addClass("email-active");
  2126. $(this).parent().addClass("active");
  2127. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
  2128. setTimeout(function(){
  2129. var refreshMailPreloader = settingsBox.find('.refresh-preloader'),
  2130. deletedMailBox = refreshMailPreloader.fadeOut(300, function(){
  2131. refreshMailPreloader.remove();
  2132. });
  2133. },600);
  2134. e.preventDefault();
  2135. });
  2136. $("#open-colors").on("click",function (e) {
  2137. $(".email-content").removeClass("email-active");
  2138. $('html').removeClass("overhid");
  2139. if($(window).width() < 768){
  2140. $('html').addClass("overhid");
  2141. }
  2142. var settingsBox = $('.color-box');
  2143. settingsBox.addClass("email-active");
  2144. $(this).parent().addClass("active");
  2145. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
  2146. setTimeout(function(){
  2147. var refreshMailPreloader = settingsBox.find('.refresh-preloader'),
  2148. deletedMailBox = refreshMailPreloader.fadeOut(300, function(){
  2149. refreshMailPreloader.remove();
  2150. });
  2151. },600);
  2152. e.preventDefault();
  2153. });
  2154. $("#open-homepage").on("click",function (e) {
  2155. $(".email-content").removeClass("email-active");
  2156. $('html').removeClass("overhid");
  2157. if($(window).width() < 768){
  2158. $('html').addClass("overhid");
  2159. }
  2160. var settingsBox = $('.homepage-box');
  2161. settingsBox.addClass("email-active");
  2162. $(this).parent().addClass("active");
  2163. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
  2164. setTimeout(function(){
  2165. var refreshMailPreloader = settingsBox.find('.refresh-preloader'),
  2166. deletedMailBox = refreshMailPreloader.fadeOut(300, function(){
  2167. refreshMailPreloader.remove();
  2168. });
  2169. },600);
  2170. e.preventDefault();
  2171. });
  2172. $("#open-advanced").on("click",function (e) {
  2173. $(".email-content").removeClass("email-active");
  2174. $('html').removeClass("overhid");
  2175. if($(window).width() < 768){
  2176. $('html').addClass("overhid");
  2177. }
  2178. var settingsBox = $('.advanced-box');
  2179. settingsBox.addClass("email-active");
  2180. $(this).parent().addClass("active");
  2181. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
  2182. setTimeout(function(){
  2183. var refreshMailPreloader = settingsBox.find('.refresh-preloader'),
  2184. deletedMailBox = refreshMailPreloader.fadeOut(300, function(){
  2185. refreshMailPreloader.remove();
  2186. });
  2187. },600);
  2188. e.preventDefault();
  2189. });
  2190. $("#open-info").on("click",function (e) {
  2191. $(".email-content").removeClass("email-active");
  2192. $('html').removeClass("overhid");
  2193. if($(window).width() < 768){
  2194. $('html').addClass("overhid");
  2195. }
  2196. var settingsBox = $('.info-box');
  2197. settingsBox.addClass("email-active");
  2198. $(this).parent().addClass("active");
  2199. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
  2200. setTimeout(function(){
  2201. var refreshMailPreloader = settingsBox.find('.refresh-preloader'),
  2202. deletedMailBox = refreshMailPreloader.fadeOut(300, function(){
  2203. refreshMailPreloader.remove();
  2204. });
  2205. },600);
  2206. e.preventDefault();
  2207. });
  2208. $("#open-users").on("click",function (e) {
  2209. $(".email-content").removeClass("email-active");
  2210. $('html').removeClass("overhid");
  2211. if($(window).width() < 768){
  2212. $('html').addClass("overhid");
  2213. }
  2214. var settingsBox = $('.users-box');
  2215. settingsBox.addClass("email-active");
  2216. $(this).parent().addClass("active");
  2217. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
  2218. setTimeout(function(){
  2219. var refreshMailPreloader = settingsBox.find('.refresh-preloader'),
  2220. deletedMailBox = refreshMailPreloader.fadeOut(300, function(){
  2221. refreshMailPreloader.remove();
  2222. });
  2223. },600);
  2224. e.preventDefault();
  2225. });
  2226. $("#open-logs").on("click",function (e) {
  2227. $(".email-content").removeClass("email-active");
  2228. $('html').removeClass("overhid");
  2229. if($(window).width() < 768){
  2230. $('html').addClass("overhid");
  2231. }
  2232. var settingsBox = $('.logs-box');
  2233. settingsBox.addClass("email-active");
  2234. $(this).parent().addClass("active");
  2235. $("<div class='refresh-preloader'><div class='la-timer la-dark'><div></div></div></div>").appendTo(settingsBox).show();
  2236. setTimeout(function(){
  2237. var refreshMailPreloader = settingsBox.find('.refresh-preloader'),
  2238. deletedMailBox = refreshMailPreloader.fadeOut(300, function(){
  2239. refreshMailPreloader.remove();
  2240. });
  2241. },600);
  2242. e.preventDefault();
  2243. });
  2244. function checkGithub() {
  2245. $.ajax({
  2246. type: "GET",
  2247. url: "https://api.github.com/repos/causefx/Organizr/releases",
  2248. dataType: "json",
  2249. success: function(github) {
  2250. var currentVersion = "<?php echo INSTALLEDVERSION;?>";
  2251. infoTabVersion = $('#about').find('#version');
  2252. infoTabVersionHistory = $('#about').find('#versionHistory');
  2253. infoTabNew = $('#about').find('#whatsnew');
  2254. infoTabDownload = $('#about').find('#downloadnow');
  2255. $.each(github, function(i,v) {
  2256. if(i === 0){
  2257. console.log(v.tag_name);
  2258. githubVersion = v.tag_name;
  2259. githubDescription = v.body;
  2260. githubName = v.name;
  2261. }
  2262. $(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>');
  2263. size_li = $("#versionHistory li").size();
  2264. x=2;
  2265. $('#versionHistory li:lt('+x+')').show();
  2266. });
  2267. if(currentVersion < githubVersion){
  2268. console.log("You Need To Upgrade");
  2269. 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];?>");
  2270. $(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);
  2271. $(infoTabDownload).html("<br/><form style=\"display:initial;\" id=\"deletedb\" method=\"post\" onsubmit=\"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>");
  2272. $( "p[id^='upgrade']" ).toggle();
  2273. }else if(currentVersion === githubVersion){
  2274. console.log("You Are on Current Version");
  2275. }else{
  2276. console.log("something went wrong");
  2277. }
  2278. $(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);?>");
  2279. }
  2280. });
  2281. }
  2282. </script>
  2283. <script>
  2284. $( document ).ready(function() {
  2285. //Hide Icon box on load
  2286. $( "div[class^='jFiler jFiler-theme-dragdropbox']" ).hide();
  2287. //Set Some Scrollbars
  2288. $(".scroller-body").niceScroll({
  2289. railpadding: {top:0,right:0,left:0,bottom:0}
  2290. });
  2291. $(".email-content").niceScroll({
  2292. railpadding: {top:0,right:0,left:0,bottom:0}
  2293. });
  2294. //Stop Div behind From Scrolling
  2295. $( '.email-content' ).on( 'mousewheel', function ( e ) {
  2296. e.preventDefault();
  2297. }, false);
  2298. //Set Hide Function
  2299. if (0) {
  2300. var authTypeFunc = function() {
  2301. // Hide Everything
  2302. $('#host-selected, #host-other, #host-plex, #host-emby, #host-ldap').hide();
  2303. // Qualify Auth Type
  2304. if($('#authType').val() !== "internal"){
  2305. $( '#host-selected' ).show();
  2306. // Qualify aithBackend
  2307. if($('#authBackend').val() === "plex"){
  2308. $('#host-selected, #host-plex').show();
  2309. }else if($('#authBackend').val().indexOf("emby")>=0){
  2310. $('#host-selected, #host-other, #host-emby').show();
  2311. }else if($('#authBackend').val() === "ldap"){
  2312. $('#host-selected, #host-other, #host-ldap').show();
  2313. }else {
  2314. $('#host-selected, #host-other').show();
  2315. }
  2316. }
  2317. }
  2318. //Hide Settings on selection
  2319. $('#authType, #authBackend').on('change', authTypeFunc);
  2320. //Hide Settings on Load
  2321. authTypeFunc();
  2322. } else { console.log() }
  2323. //Simulate Edit Tabs Click
  2324. $("#open-tabs").trigger("click");
  2325. //Append Delete log to User Logs
  2326. $("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>')
  2327. $("a[id^='ToolTables_datatable_0'] span").html('<?php echo $language->translate("PRINT");?>')
  2328. //Enable Tooltips
  2329. $('[data-toggle="tooltip"]').tooltip();
  2330. //Tab save on reload - might need to delete as we changed tab layout
  2331. //rememberTabSelection('#settingsTabs', !localStorage);
  2332. //AJAX call to github to get version info
  2333. <?php if (GIT_CHECK) { echo 'checkGithub()'; } ?>
  2334. //Edit Info tab with Github info
  2335. <?php if(file_exists(FAIL_LOG)) : ?>
  2336. goodCount = $('#loginStats').find('#goodCount');
  2337. goodPercent = $('#loginStats').find('#goodPercent');
  2338. goodTitle = $('#loginStats').find('#goodTitle');
  2339. badCount = $('#loginStats').find('#badCount');
  2340. badPercent = $('#loginStats').find('#badPercent');
  2341. badTitle = $('#loginStats').find('#badTitle');
  2342. $(goodCount).html("<?php echo $goodLogin;?>");
  2343. $(goodTitle).html("<?php echo $goodPercent;?>%");
  2344. $(goodPercent).attr('aria-valuenow', "<?php echo $goodPercent;?>");
  2345. $(goodPercent).attr('style', "width: <?php echo $goodPercent;?>%");
  2346. $(badCount).html("<?php echo $badLogin;?>");
  2347. $(badTitle).html("<?php echo $badPercent;?>%");
  2348. $(badPercent).attr('aria-valuenow', "<?php echo $badPercent;?>");
  2349. $(badPercent).attr('style', "width: <?php echo $badPercent;?>%");
  2350. <?php endif; ?>
  2351. });
  2352. </script>
  2353. </body>
  2354. </html>