settings.php 123 KB

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