KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

header.php 16KB

6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432
  1. <?php
  2. $SHOW_NOTE = FALSE;
  3. $ROOT = "";
  4. if (file_exists("/home/falktx/.jackdrc") || file_exists("/home/daeavelwyn/public_html/kxstudio/"))
  5. {
  6. $ROOT = "/kxstudio";
  7. $SHOW_NOTE = FALSE;
  8. }
  9. if (false && $PAGE_TYPE != "PASTE" && $PAGE_TYPE != "DONATIONS" && $PAGE_TYPE != "NAMESPACE") {
  10. require "donate/config.php";
  11. require "donate/connect.php";
  12. $cur_amount = 0.0;
  13. $cur_percent = 0.0;
  14. if ($db_link) {
  15. $sql_donations = mysqli_query($db_link, "SELECT * FROM donations WHERE MONTH(dt) = MONTH(NOW()) AND YEAR(dt) = YEAR(NOW())");
  16. if (mysqli_num_rows($sql_donations)) {
  17. while ($sql_row = mysqli_fetch_assoc($sql_donations)) {
  18. $cur_amount += $sql_row["amount"];
  19. }
  20. }
  21. $cur_percent = $cur_amount / 500.0 * 100.0;
  22. $cur_amount = intval($cur_amount);
  23. if ($cur_percent > 100.0) {
  24. $cur_percent = 100.0;
  25. }
  26. }
  27. }
  28. function isMobile() {
  29. return preg_match("/(android|avantgo|blackberry|bolt|boost|cricket|docomo|fone|hiptop|mini|mobi|palm|phone|pie|tablet|up\.browser|up\.link|webos|wos)/i",
  30. $_SERVER["HTTP_USER_AGENT"]);
  31. }
  32. ?>
  33. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  34. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
  35. <head>
  36. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  37. <!--[if lt IE 7]>
  38. <meta http-equiv="imagetoolbar" content="no" />
  39. <![endif]-->
  40. <title><?php echo $PAGE_TITLE; ?></title>
  41. <meta name="theme-color" content="#111111">
  42. <meta name="viewport" content="width=device-width">
  43. <link rel="copyright" href="https://creativecommons.org/publicdomain/zero/1.0/" />
  44. <link rel="stylesheet" href="<?php echo $ROOT; ?>/css/style.fluid.css" type="text/css" media="screen" />
  45. <link rel="stylesheet" href="<?php echo $ROOT; ?>/css/style.css" type="text/css" media="screen" />
  46. <link rel="icon" type="image/png" href="<?php echo $ROOT; ?>/images/ico_kxstudio.png" />
  47. <link rel="shortcut icon" href="<?php echo $ROOT; ?>/favicon.ico" />
  48. <?php if ($PAGE_TYPE == "BOARD") { ?>
  49. <!-- Special Board CSS -->
  50. <style type="text/css">
  51. #board-colors {
  52. display: flex;
  53. flex-direction: row;
  54. margin-bottom: 20px;
  55. }
  56. #board-colors p,
  57. #board-colors ul {
  58. line-height: unset;
  59. margin: 0;
  60. padding: 0;
  61. }
  62. #board-colors p,
  63. #board-colors span {
  64. margin: auto;
  65. }
  66. #board-colors p {
  67. margin-left: 8px;
  68. }
  69. #board-colors ul {
  70. display: inline-flex;
  71. flex-wrap: wrap;
  72. flex: 1;
  73. list-style: none inside;
  74. margin-right: 8px;
  75. overflow: hidden;
  76. }
  77. #board-colors li {
  78. display: inline-flex;
  79. margin: 0px 4px;
  80. }
  81. .board-color > div {
  82. display: inline-block;
  83. width: 16px;
  84. height: 16px;
  85. margin: 4px;
  86. }
  87. @media only screen and (max-width: 1000px) {
  88. #board-colors p {
  89. display: none;
  90. }
  91. }
  92. @media only screen and (min-width: 1200px) {
  93. .omega {
  94. position: relative;
  95. }
  96. #board-colors {
  97. position: absolute;
  98. top: 0px;
  99. right: 0px;
  100. margin-bottom: 0px;
  101. }
  102. }
  103. </style>
  104. <?php } else if ($PAGE_TYPE == "DEVELOPMENT") { ?>
  105. <!-- Special Development CSS -->
  106. <style type="text/css">
  107. h3 > a {
  108. color: #F0F0F0 !important;
  109. }
  110. .changeset p {
  111. margin: 0.25em 15px !important;
  112. font-weight: lighter;
  113. }
  114. .changeset a {
  115. font-weight: normal;
  116. }
  117. .changeset b {
  118. font-weight: bold;
  119. }
  120. .changeset b > a {
  121. color: #F0F0F0 !important;
  122. }
  123. .changeset pre {
  124. font-size: 1.4em !important;
  125. background-color: unset;
  126. border: none;
  127. margin: 0.5em 1em;
  128. }
  129. </style>
  130. <?php } else if ($PAGE_TYPE == "DONATIONS") { ?>
  131. <style type="text/css">
  132. html > body .liberapay-btn {
  133. background-color: #f6c915;
  134. border-radius: 4px;
  135. color: #1a171b;
  136. display: inline-block;
  137. font-family: Helvetica Neue, Helvetica, sans-serif;
  138. font-size: 14px;
  139. font-weight: 700;
  140. line-height: 22px;
  141. padding: 5px 7px 3px;
  142. position: relative;
  143. text-decoration: none;
  144. }
  145. html > body .liberapay-btn:hover {
  146. background-color: #fbce1a;
  147. color: #444;
  148. }
  149. .liberapay-btn > svg {
  150. position: absolute;
  151. left: 7px;
  152. top: 7px;
  153. }
  154. .liberapay-btn > span {
  155. margin-left: 19px;
  156. }
  157. </style>
  158. <?php } else if ($PAGE_TYPE == "PASTE") { ?>
  159. <link rel="stylesheet" href="<?php echo $ROOT; ?>/paste/kxstudio.css" type="text/css" media="screen" />
  160. <!-- Special Paste CSS -->
  161. <style type="text/css">
  162. html, body {
  163. color: white;
  164. }
  165. .paste_textarea_border {
  166. height: 300px;
  167. border: 1px solid gray;
  168. }
  169. <?php if ($show_paste) { ?>
  170. div .paste_canvas_area {
  171. font-family: monospace;
  172. }
  173. <?php } ?>
  174. <?php if ($show_numbers) { ?>
  175. div .paste_canvas_area {
  176. padding-left: 10px;
  177. }
  178. <?php } ?>
  179. textarea {
  180. width: 100%;
  181. height: 100%;
  182. margin: 0;
  183. padding: 0;
  184. border-width: 0;
  185. resize: none;
  186. }
  187. </style>
  188. <?php } else if ($PAGE_TYPE == "REPOSITORY_PACKAGES") { ?>
  189. <!-- Special Repository Packages CSS -->
  190. <style type="text/css">
  191. .repository-package-list {
  192. display: flex;
  193. flex-direction: row;
  194. flex-wrap: wrap;
  195. }
  196. .repository-package {
  197. display: flex;
  198. flex-direction: row;
  199. margin: 15px;
  200. width: 485px;
  201. line-height: 1.25em;
  202. /* max-width: calc(92% / 3 - 32px); */
  203. }
  204. .repository-package > div:first-child {
  205. padding-top: calc(0.5em + 0.5px);
  206. }
  207. @media only screen and (max-width: 540px) {
  208. .repository-package {
  209. flex-direction: column;
  210. width: 100%;
  211. }
  212. .repository-package > div:first-child {
  213. padding-top: 0;
  214. text-align: center;
  215. }
  216. .repository-package table {
  217. width: 100%;
  218. margin-left: 10%;
  219. }
  220. .repository-package tr > td:first-child {
  221. width: 100px;
  222. }
  223. .img_clickable {
  224. margin-bottom: 5px;
  225. }
  226. }
  227. @media only screen and (max-width: 380px) {
  228. .repository-package table {
  229. margin-left: 5%;
  230. }
  231. }
  232. tr {
  233. vertical-align: top;
  234. }
  235. tr > td:first-child {
  236. font-weight: lighter;
  237. white-space: nowrap;
  238. }
  239. tbody > tr:first-child > td:last-child {
  240. font-weight: bold;
  241. }
  242. .img_clickable:hover {
  243. cursor: pointer;
  244. }
  245. .img_clickable:active > .img_clickable_overlay {
  246. display: block;
  247. }
  248. .img_clickable_overlay {
  249. position: fixed;
  250. top: 0px;
  251. left: 0px;
  252. width: 100%;
  253. min-height: 100%;
  254. background-color: black;
  255. background-color: rgba(11, 11, 11, 0.75);
  256. z-index: 1;
  257. display: none;
  258. }
  259. .img_clickable_overlay:active {
  260. display: none !important;
  261. }
  262. .img_clickable_overlay:hover {
  263. cursor: initial;
  264. display: block;
  265. }
  266. .img_clickable_overlay > img {
  267. /*
  268. display: block;
  269. margin: 0 auto;
  270. */
  271. margin: auto;
  272. position: absolute;
  273. top: 0;
  274. bottom: 0;
  275. left: 0;
  276. right: 0;
  277. max-width: 100%;
  278. max-height: 100%;
  279. }
  280. </style>
  281. <?php } ?>
  282. </head>
  283. <body class="mediawiki ltr ns-0 ns-subject skin-bentofluid">
  284. <!-- Top link -->
  285. <a name="Top" id="Top"></a>
  286. <!-- Start: Header -->
  287. <div id="header">
  288. <div id="header-content">
  289. <a id="header-logo" href="<?php echo $ROOT; ?>/">
  290. <img src="<?php echo $ROOT; ?>/images/header-logo_mod.png" width="46" height="26" alt="Header Logo"/>
  291. </a>
  292. <a id="header-home" href="<?php echo $ROOT; ?>/">Home</a>
  293. <ul id="global-navigation">
  294. <li id="item-news"><a href="<?php echo $ROOT; ?>/News">News</a></li>
  295. <li id="item-soft" class="item-menu<?php if ($PAGE_SOURCE_1[0] == "/Applications" || $PAGE_SOURCE_1[0] == "/Plugins") { ?> selected<?php } ?>">
  296. <?php if (isMobile()) { ?>
  297. <span>Software &#9660;</span>
  298. <?php } else { ?>
  299. <a href="<?php echo $ROOT; ?>/Applications">Software &#9660;</a>
  300. <?php } ?>
  301. <div class="item-menu-children">
  302. <p><a href="<?php echo $ROOT; ?>/Applications"><img src="<?php echo $ROOT; ?>/images/ico_cadence.png" alt=""/> &nbsp; Applications</a></p>
  303. <p><a href="<?php echo $ROOT; ?>/Plugins"><img src="<?php echo $ROOT; ?>/images/ico_distrho.png" alt=""/> &nbsp; Plugins</a></p>
  304. </div>
  305. </li>
  306. <li id="item-repos" class="item-menu<?php if ($PAGE_SOURCE_1[0] == "/Repositories") { ?> selected<?php } ?>">
  307. <?php if (isMobile()) { ?>
  308. <span>Repositories &#9660;</span>
  309. <?php } else { ?>
  310. <a href="<?php echo $ROOT; ?>/Repositories">Repositories &#9660;</a>
  311. <?php } ?>
  312. <div class="item-menu-children">
  313. <p><a href="<?php echo $ROOT; ?>/Repositories">About / How-to</a></p>
  314. <p><a href="<?php echo $ROOT; ?>/Repositories:Applications">Applications (in Repo)</a></p>
  315. <p><a href="<?php echo $ROOT; ?>/Repositories:Plugins">Plugins (in Repo)</a></p>
  316. <p><a href="<?php echo $ROOT; ?>/Repositories:FAQ">FAQ</a></p>
  317. <p><a href="<?php echo $ROOT; ?>/Repositories:Extras">Extras</a></p>
  318. </div>
  319. </li>
  320. <li id="item-board" class="<?php if ($PAGE_SOURCE_1[0] == "/Board") { ?>selected<?php } ?>">
  321. <a href="<?php echo $ROOT; ?>/Board">Board</a>
  322. </li>
  323. <li id="item-development" class="<?php if ($PAGE_SOURCE_1[0] == "/Development") { ?>selected<?php } ?>">
  324. <a href="<?php echo $ROOT; ?>/Development">Development</a>
  325. </li>
  326. <li id="item-documentation" class="<?php if ($PAGE_SOURCE_1[0] == "/Documentation") { ?>selected<?php } ?>">
  327. <a href="<?php echo $ROOT; ?>/Documentation">Documentation</a>
  328. </li>
  329. <li id="item-downloads" class="<?php if ($PAGE_SOURCE_1[0] == "/Downloads") { ?>selected<?php } ?>">
  330. <a href="<?php echo $ROOT; ?>/Downloads">Downloads</a>
  331. </li>
  332. <li id="item-donate" class="<?php if ($PAGE_SOURCE_1[0] == "/Donations") { ?>selected<?php } ?>">
  333. <a href="<?php echo $ROOT; ?>/Donations">Donations</a>
  334. </li>
  335. </ul>
  336. </div>
  337. </div>
  338. <!-- End: Header -->
  339. <?php if (false && $PAGE_TYPE != "DONATIONS" && $db_link) { ?>
  340. <div id="donations_container" style="position:absolute; top:40px; right:5%; width: 250px; height: 10px; font-size: 0.8em;">
  341. <div id="donations_bar"><div style="width:<?php print_r($cur_percent); ?>%"></div></div>
  342. </div>
  343. <div style="position:absolute; top:44px; right:5%; width: 270px; height: 10px; font-size: 0.8em; text-align: center;">
  344. This month donations: <?php print_r($cur_amount); ?> / 500 &euro;
  345. </div>
  346. <?php } ?>
  347. <div id="subheader" class="container_16">
  348. <div id="breadcrump" class="grid_12 alpha">
  349. <a href="<?php echo $ROOT; ?>/" title="Home"><img src="<?php echo $ROOT; ?>/images/home_grey.png" width="16" height="16" alt="Home" /> KXStudio </a>
  350. <?php for ($i = 0; $i < count($PAGE_SOURCE_1); $i++) { ?>
  351. &gt; <a href="<?php echo $ROOT . $PAGE_SOURCE_1[$i]; ?>"><?php echo $PAGE_SOURCE_2[$i]; ?></a>
  352. <?php } ?>
  353. </div>
  354. </div>
  355. <!-- Start: Main Content Area -->
  356. <div id="content" class="container_16 content-wrapper">
  357. <div id="some-content" class="box box-shadow grid_77 clearfix">
  358. <!-- Start: Box header -->
  359. <div class="box-header header-tabs">
  360. <ul>
  361. <li><a href="#Top">Top</a></li>
  362. <?php /* */ if ($PAGE_TYPE == "APPLICATION") { ?>
  363. <li><a href="#Interface">Interface</a></li>
  364. <li><a href="#Usage">Usage</a></li>
  365. <li><a href="#Download">Download</a></li>
  366. <?php } else if ($PAGE_TYPE == "APPLICATION_NU") { ?>
  367. <li><a href="#Interface">Interface</a></li>
  368. <li><a href="#Download">Download</a></li>
  369. <?php } else if ($PAGE_TYPE == "DOWNLOADS") { ?>
  370. <li><a href="#Binaries">Binaries</a></li>
  371. <li><a href="#SourceCode">Source Code</a></li>
  372. <li><a href="#Artwork">Artwork</a></li>
  373. <?php } else if ($PAGE_TYPE == "PASTE") { ?>
  374. <li><a href="<?php echo $ROOT; ?>/Paste" title="Create new paste">New Paste</a></li>
  375. <?php if ($show_paste && ! $is_error) { ?>
  376. <li><a href="<?php echo $ROOT; ?>/Paste/raw/<?php echo $paste_id; ?>" target="blank" title="View RAW">View RAW</a></li>
  377. <li><a href="<?php echo $ROOT; ?>/Paste/download.php?id=<?php echo $paste_id; ?>" title="Download">Download</a></li>
  378. <?php } ?>
  379. <?php } ?>
  380. </ul>
  381. </div>
  382. <div id="contentSub"></div>
  383. <!-- End: Box header -->
  384. <div class="alpha omega paste_canvas_area">
  385. <?php /* */ if ($PAGE_TYPE == "HOME") { ?>
  386. <h1><span class="mw-headline"> About KXStudio </span></h1>
  387. <?php } else if ($PAGE_TYPE == "NEWS") { ?>
  388. <div style="float: right; padding-right: 16px;">
  389. <a href="/News/?action=feed"><img src="images/rss.png" alt="RSS"/></a>
  390. </div>
  391. <h1 style="margin-top: 0px"><span class="mw-headline"> KXStudio&nbsp;: News </span></h1>
  392. <?php } else if ($PAGE_TYPE != "PASTE") { ?>
  393. <h1><span class="mw-headline"> <?php
  394. for ($i = 0; $i < count($PAGE_SOURCE_2); $i++)
  395. {
  396. if ($i == 0)
  397. {
  398. if ($PAGE_TYPE == "NONKXSTUDIO")
  399. {
  400. echo $PAGE_SOURCE_2[$i];
  401. continue;
  402. }
  403. echo "KXStudio";
  404. }
  405. echo "&nbsp;: " . $PAGE_SOURCE_2[$i];
  406. }
  407. ?> </span></h1>
  408. <?php } ?>
  409. <?php if ($PAGE_TYPE != "PASTE" && $SHOW_NOTE) { ?>
  410. <p style="color:#fa3a3a;">
  411. NOTE: The KXStudio project is currently on a break, regular development is expected to return later in 2019.
  412. Thanks for understanding.
  413. </p>
  414. <?php } ?>
  415. <!-- - - - - - - - Begin Content Area - - - - - - - -->