settings.php 150 KB

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