settings.php 123 KB

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