settings.php 122 KB

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