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 14KB

6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. <?php
  2. $SHOW_NOTE = FALSE;
  3. $ROOT = FALSE;
  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. ?>
  29. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  30. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
  31. <head>
  32. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  33. <!--[if lt IE 7]>
  34. <meta http-equiv="imagetoolbar" content="no" />
  35. <![endif]-->
  36. <title><?php echo $PAGE_TITLE; ?></title>
  37. <link rel="copyright" href="http://creativecommons.org/licenses/publicdomain/" />
  38. <link rel="stylesheet" href="<?php echo $ROOT; ?>/css/style.fluid.css" type="text/css" media="screen" />
  39. <link rel="stylesheet" href="<?php echo $ROOT; ?>/css/style.css" type="text/css" media="screen" />
  40. <link rel="icon" type="image/png" href="<?php echo $ROOT; ?>/images/ico_kxstudio.png" />
  41. <link rel="shortcut icon" href="<?php echo $ROOT; ?>/favicon.ico" />
  42. <?php if ($PAGE_TYPE == "HOME") { ?>
  43. <script type="text/javascript" src="includes/jquery-1.4.2.min.js"></script>
  44. <script type="text/javascript" src="includes/responsiveslides.min.js"></script>
  45. <?php } ?>
  46. <script type="text/javascript">
  47. <?php if ($PAGE_TYPE == "HOME") { ?>
  48. $(window).load(function(){
  49. $(".rslides").responsiveSlides({
  50. auto: true,
  51. nav: true,
  52. pager: false,
  53. speed: 1000,
  54. timeout: 7500,
  55. namespace: "large-btns"
  56. });
  57. });
  58. <?php } ?>
  59. function closeAllMenus(){
  60. var objSoftwareMenu = document.getElementById("div_menuSoftware");
  61. var objRepositoriesMenu = document.getElementById("div_menuRepositories");
  62. var objCommunityMenu = document.getElementById("div_menuCommunity");
  63. if (objSoftwareMenu.style.visibility == "visible")
  64. objSoftwareMenu.style.visibility = "hidden";
  65. if (objRepositoriesMenu.style.visibility == "visible")
  66. objRepositoriesMenu.style.visibility = "hidden";
  67. if (objCommunityMenu.style.visibility == "visible")
  68. objCommunityMenu.style.visibility = "hidden";
  69. };
  70. function menuItemClicked(event, menu, itemName){
  71. event.stopPropagation();
  72. closeAllMenus();
  73. //if (menu.style.visibility != "visible")
  74. {
  75. var leftPos = document.getElementById(itemName).getBoundingClientRect().left - 1;
  76. menu.style.left = "" + leftPos + "px";
  77. menu.style.visibility = "visible";
  78. }
  79. //else
  80. //{
  81. // menu.style.visibility = "hidden";
  82. //}
  83. return false;
  84. };
  85. function bodyClicked(){
  86. closeAllMenus();
  87. return true;
  88. };
  89. function itemSoftwareClicked(event) { return menuItemClicked(event, document.getElementById("div_menuSoftware"), "item-soft"); };
  90. function itemRepositoriesClicked(event){ return menuItemClicked(event, document.getElementById("div_menuRepositories"), "item-repos"); };
  91. function itemCommunityClicked(event) { return menuItemClicked(event, document.getElementById("div_menuCommunity"), "item-community"); };
  92. </script>
  93. <?php if (false && $PAGE_TYPE == "DONATIONS") { ?>
  94. <style type="text/css">
  95. html > body .liberapay-btn {
  96. background-color: #f6c915;
  97. border-radius: 4px;
  98. color: #1a171b;
  99. display: inline-block;
  100. font-family: Helvetica Neue, Helvetica, sans-serif;
  101. font-size: 14px;
  102. font-weight: 700;
  103. line-height: 22px;
  104. padding: 5px 7px 3px;
  105. position: relative;
  106. text-decoration: none;
  107. }
  108. html > body .liberapay-btn:hover {
  109. background-color: #fbce1a;
  110. color: #444;
  111. }
  112. .liberapay-btn > svg {
  113. position: absolute;
  114. left: 7px;
  115. top: 7px;
  116. }
  117. .liberapay-btn > span {
  118. margin-left: 19px;
  119. }
  120. </style>
  121. <?php } else if ($PAGE_TYPE == "PASTE") { ?>
  122. <link rel="stylesheet" href="<?php echo $ROOT; ?>/paste/kxstudio.css" type="text/css" media="screen" />
  123. <!-- Special Paste CSS -->
  124. <style type="text/css">
  125. html, body {
  126. color: white;
  127. }
  128. .paste_textarea_border {
  129. height: 300px;
  130. border: 1px solid gray;
  131. }
  132. <?php if ($show_paste) { ?>
  133. div .paste_canvas_area {
  134. font-family: monospace;
  135. }
  136. <?php } ?>
  137. <?php if ($show_numbers) { ?>
  138. div .paste_canvas_area {
  139. padding-left: 10px;
  140. }
  141. <?php } ?>
  142. textarea {
  143. width: 100%;
  144. height: 100%;
  145. margin: 0;
  146. padding: 0;
  147. border-width: 0;
  148. resize: none;
  149. }
  150. </style>
  151. <?php } else if ($PAGE_TYPE == "REPOSITORY_PACKAGES") { ?>
  152. <!-- Special Repository Packages CSS -->
  153. <style type="text/css">
  154. .repository-package-list {
  155. display: flex;
  156. flex-direction: row;
  157. flex-wrap: wrap;
  158. }
  159. .repository-package {
  160. display: flex;
  161. flex-direction: row;
  162. margin: 15px;
  163. width: 485px;
  164. /* max-width: calc(92% / 3 - 32px); */
  165. }
  166. .repository-package > div:first-child {
  167. padding-top: calc(0.5em + 0.5px);
  168. }
  169. tr {
  170. vertical-align: top;
  171. }
  172. tr > td:first-child {
  173. font-weight: lighter;
  174. white-space: nowrap;
  175. }
  176. tbody > tr:first-child > td:last-child {
  177. font-weight: bold;
  178. }
  179. </style>
  180. <?php } ?>
  181. </head>
  182. <body class="mediawiki ltr ns-0 ns-subject skin-bentofluid" onClick="return bodyClicked();">
  183. <!-- Software sub menu -->
  184. <div id="div_menuSoftware" class="div_menuDropdown">
  185. <p><a href="<?php echo $ROOT; ?>/Applications"><img src="<?php echo $ROOT; ?>/images/ico_cadence.png" alt=""/> &nbsp; Applications</a></p>
  186. <p><a href="<?php echo $ROOT; ?>/Plugins"><img src="<?php echo $ROOT; ?>/images/ico_distrho.png" alt=""/> &nbsp; Plugins</a></p>
  187. </div>
  188. <!-- Repositories sub menu -->
  189. <div id="div_menuRepositories" class="div_menuDropdown">
  190. <p><a href="<?php echo $ROOT; ?>/Repositories">About</a></p>
  191. <p><a href="<?php echo $ROOT; ?>/Repositories:Applications">Applications (in Repo)</a></p>
  192. <p><a href="<?php echo $ROOT; ?>/Repositories:Plugins">Plugins (in Repo)</a></p>
  193. </div>
  194. <!-- Community sub menu -->
  195. <div id="div_menuCommunity" class="div_menuDropdown">
  196. <p><a href="https://discord.gg/GHuycpX" class="external" rel="nofollow" target="_blank"><img src="<?php echo $ROOT; ?>/images/ico_discord.png" alt=""/> &nbsp; Discord Server</a></p>
  197. <p><a href="http://webchat.freenode.net/?channels=#kxstudio,#opensourcemusicians" class="external" rel="nofollow" target="_blank"><img src="<?php echo $ROOT; ?>/images/ico_chat.png" alt=""/> &nbsp; IRC Channel</a></p>
  198. <p><a href="http://linuxmusicians.com/viewforum.php?f=47" class="external" rel="nofollow" target="_blank"><img src="<?php echo $ROOT; ?>/images/ico_forum.png" alt=""/> &nbsp; Web Forums</a></p>
  199. <p><a href="https://soundcloud.com/search/sounds?q=kxstudio" class="external" rel="nofollow" target="_blank"><img src="<?php echo $ROOT; ?>/images/ico_soundcloud.png" alt=""/> &nbsp; Songs</a></p>
  200. </div>
  201. <!-- Top link -->
  202. <a name="Top" id="Top"></a>
  203. <!-- Start: Header -->
  204. <div id="header">
  205. <div id="header-content" class="container_12">
  206. <a id="header-logo" href="<?php echo $ROOT; ?>/">
  207. <img src="<?php echo $ROOT; ?>/images/header-logo_mod.png" width="46" height="26" alt="Header Logo"/>
  208. </a>
  209. <a id="header-home" href="<?php echo $ROOT; ?>/" style="font-size:1.2em">Home</a>
  210. <ul id="global-navigation">
  211. <li id="item-news"><a href="<?php echo $ROOT; ?>/News">News</a></li>
  212. <li id="item-soft"><a href="<?php echo $ROOT; ?>/Applications" onClick="return itemSoftwareClicked(event);">Software &#9660;</a></li>
  213. <li id="item-repos"><a href="<?php echo $ROOT; ?>/Repositories" onClick="return itemRepositoriesClicked(event);">Repositories &#9660;</a></li>
  214. <li id="item-community"><a href="<?php echo $ROOT; ?>/Documentation" onClick="return itemCommunityClicked(event);">Community &#9660;</a></li>
  215. <li id="item-documentation"><a href="<?php echo $ROOT; ?>/Documentation">Documentation</a></li>
  216. <li id="item-donate"><a href="<?php echo $ROOT; ?>/Donations">Donations</a></li>
  217. <li id="item-downloads"><a href="<?php echo $ROOT; ?>/Downloads">Downloads</a></li>
  218. <li id="item-paste"><a href="<?php echo $ROOT; ?>/Paste">Paste</a></li>
  219. </ul>
  220. </div>
  221. </div>
  222. <!-- End: Header -->
  223. <?php if ($PAGE_TYPE == "HOME") { ?>
  224. <div id="rslides_container">
  225. <ul class="rslides" id="slider1">
  226. <li><a href="<?php echo $ROOT; ?>/Repositories:Applications"><img src="<?php echo $ROOT; ?>/images/slider-applications.jpg" alt=""/></a></li>
  227. <li><a href="<?php echo $ROOT; ?>/Plugins"><img src="<?php echo $ROOT; ?>/images/slider-plugins.jpg" alt=""/></a></li>
  228. </ul>
  229. </div>
  230. <?php } else { ?>
  231. <?php if (false && $PAGE_TYPE != "DONATIONS" && $db_link) { ?>
  232. <div id="donations_container" style="position:absolute; top:40px; right:5%; width: 250px; height: 10px; font-size: 0.8em;">
  233. <div id="donations_bar"><div style="width:<?php print_r($cur_percent); ?>%"></div></div>
  234. </div>
  235. <div style="position:absolute; top:44px; right:5%; width: 270px; height: 10px; font-size: 0.8em; text-align: center;">
  236. This month donations: <?php print_r($cur_amount); ?> / 500 &euro;
  237. </div>
  238. <?php } ?>
  239. <div id="subheader" class="container_16">
  240. <div id="breadcrump" class="grid_12 alpha">
  241. <a href="<?php echo $ROOT; ?>/" title="Home"><img src="<?php echo $ROOT; ?>/images/home_grey.png" width="16" height="16" alt="Home" /> KXStudio </a>
  242. <?php for ($i = 0; $i < count($PAGE_SOURCE_1); $i++) { ?>
  243. &gt; <a href="<?php echo $ROOT . $PAGE_SOURCE_1[$i]; ?>"><?php echo $PAGE_SOURCE_2[$i]; ?></a>
  244. <?php } ?>
  245. </div>
  246. </div>
  247. <?php } ?>
  248. <!-- Start: Main Content Area -->
  249. <div id="content" class="container_16 content-wrapper">
  250. <div id="some-content" class="box box-shadow grid_77 clearfix">
  251. <!-- Start: Box header -->
  252. <div class="box-header header-tabs">
  253. <ul>
  254. <li><a href="#Top">Top</a></li>
  255. <?php if ($PAGE_TYPE == "APPLICATION") { ?>
  256. <li><a href="#Interface">Interface</a></li>
  257. <li><a href="#Usage">Usage</a></li>
  258. <li><a href="#Download">Download</a></li>
  259. <?php } else if ($PAGE_TYPE == "APPLICATION_NU") { ?>
  260. <li><a href="#Interface">Interface</a></li>
  261. <li><a href="#Download">Download</a></li>
  262. <?php } else if ($PAGE_TYPE == "DOWNLOADS") { ?>
  263. <li><a href="#Binaries">Binaries</a></li>
  264. <li><a href="#SourceCode">Source Code</a></li>
  265. <li><a href="#Artwork">Artwork</a></li>
  266. <?php } else if ($PAGE_TYPE == "PASTE") { ?>
  267. <li><a href="<?php echo $ROOT; ?>/Paste" title="Create new paste">New Paste</a></li>
  268. <?php if ($show_paste && ! $is_error) { ?>
  269. <li><a href="<?php echo $ROOT; ?>/Paste/raw/<?php echo $paste_id; ?>" target="blank" title="View RAW">View RAW</a></li>
  270. <li><a href="<?php echo $ROOT; ?>/Paste/download.php?id=<?php echo $paste_id; ?>" title="Download">Download</a></li>
  271. <?php } ?>
  272. <?php } ?>
  273. </ul>
  274. </div>
  275. <div id="contentSub"></div>
  276. <!-- End: Box header -->
  277. <div class="alpha omega paste_canvas_area">
  278. <?php if ($PAGE_TYPE == "HOME") { ?>
  279. <h1><span class="mw-headline"> About KXStudio </span></h1>
  280. <?php } else if ($PAGE_TYPE == "NEWS") { ?>
  281. <div style="float: right; padding-right: 16px;">
  282. <a href="<?php echo $ROOT; ?>/News/?action=feed"><img src="images/rss.png" alt="RSS"/></a>
  283. </div>
  284. <h1 style="margin-top: 0px"><span class="mw-headline"> KXStudio&nbsp;: News </span></h1>
  285. <?php } else if ($PAGE_TYPE != "PASTE") { ?>
  286. <h1><span class="mw-headline"> <?php
  287. for ($i = 0; $i < count($PAGE_SOURCE_2); $i++)
  288. {
  289. if ($i == 0)
  290. {
  291. if ($PAGE_TYPE == "NONKXSTUDIO")
  292. {
  293. echo $PAGE_SOURCE_2[$i];
  294. continue;
  295. }
  296. echo "KXStudio";
  297. }
  298. echo "&nbsp;: " . $PAGE_SOURCE_2[$i];
  299. }
  300. ?> </span></h1>
  301. <?php } ?>
  302. <?php if ($PAGE_TYPE != "PASTE" && $SHOW_NOTE) { ?>
  303. <p style="color:#fa3a3a;">
  304. NOTE: The KXStudio project is currently on a break, regular development is expected to return later in 2019.
  305. Thanks for understanding.
  306. </p>
  307. <?php } ?>
  308. <!-- - - - - - - - Begin Content Area - - - - - - - -->