settings.php 122 KB

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