settings.php 153 KB

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