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