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

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