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
6 years ago
6 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <?php
  2. $SHOW_NOTE = TRUE;
  3. $ROOT = FALSE;
  4. if (file_exists("/home/falktx/.jackdrc") || file_exists("/home/daeavelwyn/public_html/kxstudio/"))
  5. {
  6. $ROOT = "/kxstudio";
  7. $SHOW_NOTE = TRUE;
  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="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway:200,700,800,400" type="text/css" media="screen" />
  41. <link rel="icon" type="image/png" href="<?php echo $ROOT; ?>/images/ico_kxstudio.png" />
  42. <link rel="shortcut icon" href="<?php echo $ROOT; ?>/favicon.ico" />
  43. <?php if ($PAGE_TYPE == "HOME") { ?>
  44. <script type="text/javascript" src="includes/jquery-1.4.2.min.js"></script>
  45. <script type="text/javascript" src="includes/responsiveslides.min.js"></script>
  46. <?php } ?>
  47. <script type="text/javascript">
  48. <?php if ($PAGE_TYPE == "HOME") { ?>
  49. $(window).load(function(){
  50. $(".rslides").responsiveSlides({
  51. auto: true,
  52. nav: true,
  53. pager: false,
  54. speed: 1000,
  55. timeout: 7500,
  56. namespace: "large-btns"
  57. });
  58. });
  59. <?php } ?>
  60. function closeAllMenus(){
  61. var objSoftwareMenu = document.getElementById("div_menuSoftware");
  62. var objRepositoriesMenu = document.getElementById("div_menuRepositories");
  63. var objCommunityMenu = document.getElementById("div_menuCommunity");
  64. if (objSoftwareMenu.style.visibility == "visible")
  65. objSoftwareMenu.style.visibility = "hidden";
  66. if (objRepositoriesMenu.style.visibility == "visible")
  67. objRepositoriesMenu.style.visibility = "hidden";
  68. if (objCommunityMenu.style.visibility == "visible")
  69. objCommunityMenu.style.visibility = "hidden";
  70. };
  71. function menuItemClicked(event, menu, itemName){
  72. event.stopPropagation();
  73. closeAllMenus();
  74. //if (menu.style.visibility != "visible")
  75. {
  76. var leftPos = document.getElementById(itemName).getBoundingClientRect().left - 1;
  77. menu.style.left = "" + leftPos + "px";
  78. menu.style.visibility = "visible";
  79. }
  80. //else
  81. //{
  82. // menu.style.visibility = "hidden";
  83. //}
  84. return false;
  85. };
  86. function bodyClicked(){
  87. closeAllMenus();
  88. return true;
  89. };
  90. function itemSoftwareClicked(event) { return menuItemClicked(event, document.getElementById("div_menuSoftware"), "item-soft"); };
  91. function itemRepositoriesClicked(event){ return menuItemClicked(event, document.getElementById("div_menuRepositories"), "item-repos"); };
  92. function itemCommunityClicked(event) { return menuItemClicked(event, document.getElementById("div_menuCommunity"), "item-community"); };
  93. </script>
  94. <?php if (false && $PAGE_TYPE == "DONATIONS") { ?>
  95. <script type="text/javascript">
  96. /* <![CDATA[ */
  97. (function() {
  98. var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
  99. s.type = 'text/javascript';
  100. s.async = true;
  101. s.src = 'https://api.flattr.com/js/0.6/load.js?mode=auto';
  102. t.parentNode.insertBefore(s, t);
  103. })();
  104. /* ]]> */
  105. </script>
  106. <style type="text/css">
  107. html > body .liberapay-btn {
  108. background-color: #f6c915;
  109. border-radius: 4px;
  110. color: #1a171b;
  111. display: inline-block;
  112. font-family: Helvetica Neue, Helvetica, sans-serif;
  113. font-size: 14px;
  114. font-weight: 700;
  115. line-height: 22px;
  116. padding: 5px 7px 3px;
  117. position: relative;
  118. text-decoration: none;
  119. }
  120. html > body .liberapay-btn:hover {
  121. background-color: #fbce1a;
  122. color: #444;
  123. }
  124. .liberapay-btn > svg {
  125. position: absolute;
  126. left: 7px;
  127. top: 7px;
  128. }
  129. .liberapay-btn > span {
  130. margin-left: 19px;
  131. }
  132. </style>
  133. <?php } else if ($PAGE_TYPE == "PASTE") { ?>
  134. <link rel="stylesheet" href="<?php echo $ROOT; ?>/paste/kxstudio.css" type="text/css" media="screen" />
  135. <!-- Special Paste CSS -->
  136. <style type="text/css">
  137. html, body {
  138. color: white;
  139. }
  140. .paste_textarea_border {
  141. height: 300px;
  142. border: 1px solid gray;
  143. }
  144. <?php if ($show_paste) { ?>
  145. div .paste_canvas_area {
  146. font-family: monospace;
  147. }
  148. <?php } ?>
  149. <?php if ($show_numbers) { ?>
  150. div .paste_canvas_area {
  151. padding-left: 10px;
  152. }
  153. <?php } ?>
  154. textarea {
  155. width: 100%;
  156. height: 100%;
  157. margin: 0;
  158. padding: 0;
  159. border-width: 0;
  160. resize: none;
  161. }
  162. </style>
  163. <?php } ?>
  164. </head>
  165. <body class="mediawiki ltr ns-0 ns-subject skin-bentofluid" onClick="return bodyClicked();">
  166. <!-- Software sub menu -->
  167. <div id="div_menuSoftware" class="div_menuDropdown">
  168. <p><a href="<?php echo $ROOT; ?>/Applications"><img src="<?php echo $ROOT; ?>/images/ico_cadence.png" alt=""/> &nbsp; Applications</a></p>
  169. <p><a href="<?php echo $ROOT; ?>/Plugins"><img src="<?php echo $ROOT; ?>/images/ico_distrho.png" alt=""/> &nbsp; Plugins</a></p>
  170. </div>
  171. <!-- Repositories sub menu -->
  172. <div id="div_menuRepositories" class="div_menuDropdown">
  173. <p><a href="<?php echo $ROOT; ?>/Repositories">About</a></p>
  174. <p><a href="<?php echo $ROOT; ?>/Repositories:Applications">Applications (in Repo)</a></p>
  175. <p><a href="<?php echo $ROOT; ?>/Repositories:Plugins">Plugins (in Repo)</a></p>
  176. </div>
  177. <!-- Community sub menu -->
  178. <div id="div_menuCommunity" class="div_menuDropdown">
  179. <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>
  180. <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>
  181. <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>
  182. <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>
  183. </div>
  184. <!-- Top link -->
  185. <a name="Top" id="Top"></a>
  186. <!-- Start: Header -->
  187. <div id="header">
  188. <div id="header-content" class="container_12">
  189. <a id="header-logo" href="<?php echo $ROOT; ?>/">
  190. <img src="<?php echo $ROOT; ?>/images/header-logo_mod.png" width="46" height="26" alt="Header Logo"/>
  191. </a>
  192. <a id="header-home" href="<?php echo $ROOT; ?>/" style="font-size:1.2em">Home</a>
  193. <ul id="global-navigation">
  194. <li id="item-news"><a href="<?php echo $ROOT; ?>/News">News</a></li>
  195. <li id="item-soft"><a href="<?php echo $ROOT; ?>/Applications" onClick="return itemSoftwareClicked(event);">Software &#9660;</a></li>
  196. <li id="item-repos"><a href="<?php echo $ROOT; ?>/Repositories" onClick="return itemRepositoriesClicked(event);">Repositories &#9660;</a></li>
  197. <li id="item-community"><a href="<?php echo $ROOT; ?>/Documentation" onClick="return itemCommunityClicked(event);">Community &#9660;</a></li>
  198. <li id="item-documentation"><a href="<?php echo $ROOT; ?>/Documentation">Documentation</a></li>
  199. <li id="item-donate"><a href="<?php echo $ROOT; ?>/Donations">Donations</a></li>
  200. <li id="item-downloads"><a href="<?php echo $ROOT; ?>/Downloads">Downloads</a></li>
  201. <li id="item-paste"><a href="<?php echo $ROOT; ?>/Paste">Paste</a></li>
  202. </ul>
  203. </div>
  204. </div>
  205. <!-- End: Header -->
  206. <?php if ($PAGE_TYPE == "HOME") { ?>
  207. <div id="rslides_container">
  208. <ul class="rslides" id="slider1">
  209. <li><a href="<?php echo $ROOT; ?>/Repositories:Applications"><img src="<?php echo $ROOT; ?>/images/slider-applications.jpg" alt=""/></a></li>
  210. <li><a href="<?php echo $ROOT; ?>/Plugins"><img src="<?php echo $ROOT; ?>/images/slider-plugins.jpg" alt=""/></a></li>
  211. </ul>
  212. </div>
  213. <?php } else { ?>
  214. <?php if (false && $PAGE_TYPE != "DONATIONS" && $db_link) { ?>
  215. <div id="donations_container" style="position:absolute; top:40px; right:5%; width: 250px; height: 10px; font-size: 0.8em;">
  216. <div id="donations_bar"><div style="width:<?php print_r($cur_percent); ?>%"></div></div>
  217. </div>
  218. <div style="position:absolute; top:44px; right:5%; width: 270px; height: 10px; font-size: 0.8em; text-align: center;">
  219. This month donations: <?php print_r($cur_amount); ?> / 500 &euro;
  220. </div>
  221. <?php } ?>
  222. <div id="subheader" class="container_16">
  223. <div id="breadcrump" class="grid_12 alpha">
  224. <a href="<?php echo $ROOT; ?>/" title="Home"><img src="<?php echo $ROOT; ?>/images/home_grey.png" width="16" height="16" alt="Home" /> KXStudio </a>
  225. <?php for ($i = 0; $i < count($PAGE_SOURCE_1); $i++) { ?>
  226. &gt; <a href="<?php echo $ROOT . $PAGE_SOURCE_1[$i]; ?>"><?php echo $PAGE_SOURCE_2[$i]; ?></a>
  227. <?php } ?>
  228. </div>
  229. </div>
  230. <?php } ?>
  231. <!-- Start: Main Content Area -->
  232. <div id="content" class="container_16 content-wrapper">
  233. <div id="some-content" class="box box-shadow grid_77 clearfix">
  234. <!-- Start: Box header -->
  235. <div class="box-header header-tabs">
  236. <ul>
  237. <li><a href="#Top">Top</a></li>
  238. <?php if ($PAGE_TYPE == "APPLICATION") { ?>
  239. <li><a href="#Interface">Interface</a></li>
  240. <li><a href="#Usage">Usage</a></li>
  241. <li><a href="#Download">Download</a></li>
  242. <?php } else if ($PAGE_TYPE == "APPLICATION_NU") { ?>
  243. <li><a href="#Interface">Interface</a></li>
  244. <li><a href="#Download">Download</a></li>
  245. <?php } else if ($PAGE_TYPE == "DOWNLOADS") { ?>
  246. <li><a href="#Binaries">Binaries</a></li>
  247. <li><a href="#SourceCode">Source Code</a></li>
  248. <li><a href="#Artwork">Artwork</a></li>
  249. <?php } else if ($PAGE_TYPE == "PASTE") { ?>
  250. <li><a href="<?php echo $ROOT; ?>/Paste" title="Create new paste">New Paste</a></li>
  251. <?php if ($show_paste && ! $is_error) { ?>
  252. <li><a href="<?php echo $ROOT; ?>/Paste/raw/<?php echo $paste_id; ?>" target="blank" title="View RAW">View RAW</a></li>
  253. <li><a href="<?php echo $ROOT; ?>/Paste/download.php?id=<?php echo $paste_id; ?>" title="Download">Download</a></li>
  254. <?php } ?>
  255. <?php } ?>
  256. </ul>
  257. </div>
  258. <div id="contentSub"></div>
  259. <!-- End: Box header -->
  260. <div class="alpha omega paste_canvas_area">
  261. <?php if ($PAGE_TYPE == "HOME") { ?>
  262. <h1><span class="mw-headline"> About KXStudio </span></h1>
  263. <?php } else if ($PAGE_TYPE != "PASTE") { ?>
  264. <h1><span class="mw-headline"> <?php
  265. for ($i = 0; $i < count($PAGE_SOURCE_2); $i++)
  266. {
  267. if ($i == 0)
  268. {
  269. if ($PAGE_TYPE == "NONKXSTUDIO")
  270. {
  271. echo $PAGE_SOURCE_2[$i];
  272. continue;
  273. }
  274. echo "KXStudio";
  275. }
  276. echo "&nbsp;: " . $PAGE_SOURCE_2[$i];
  277. }
  278. ?> </span></h1>
  279. <?php } ?>
  280. <?php if ($PAGE_TYPE != "PASTE" && $SHOW_NOTE) { ?>
  281. <p style="color:#fa3a3a;">
  282. NOTE: The KXStudio project is currently on a break, regular development is expected to return later in 2019.
  283. Thanks for understanding.
  284. </p>
  285. <?php } ?>
  286. <!-- - - - - - - - Begin Content Area - - - - - - - -->