settings.php 124 KB

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