Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

initial import, making this open source for anyone to build, setup an…

…d contribute. Really old code base :(, last updated on June 6th of 2009 -- many bugs that were fixed are not being included in this commit
  • Loading branch information...
commit 79de1ad49170de0ecdd6f7c822447e96cc7d3ae6 0 parents
Josh Perez authored
Showing with 18,865 additions and 0 deletions.
  1. +2 −0  apps/backend/config/app.yml
  2. +4 −0 apps/backend/config/cache.yml
  3. +8 −0 apps/backend/config/config.php
  4. +35 −0 apps/backend/config/factories.yml
  5. +10 −0 apps/backend/config/filters.yml
  6. +7 −0 apps/backend/config/i18n.yml
  7. +22 −0 apps/backend/config/logging.yml
  8. +15 −0 apps/backend/config/routing.yml
  9. +3 −0  apps/backend/config/security.yml
  10. +102 −0 apps/backend/config/settings.yml
  11. +16 −0 apps/backend/config/view.yml
  12. +5 −0 apps/backend/lib/myUser.class.php
  13. +13 −0 apps/backend/modules/bank/actions/actions.class.php
  14. +9 −0 apps/backend/modules/bank/config/generator.yml
  15. +18 −0 apps/backend/modules/comment/actions/actions.class.php
  16. +12 −0 apps/backend/modules/comment/config/generator.yml
  17. +13 −0 apps/backend/modules/instrument/actions/actions.class.php
  18. +17 −0 apps/backend/modules/instrument/config/generator.yml
  19. +13 −0 apps/backend/modules/tags/actions/actions.class.php
  20. +9 −0 apps/backend/modules/tags/config/generator.yml
  21. +18 −0 apps/backend/modules/user/actions/actions.class.php
  22. +12 −0 apps/backend/modules/user/config/generator.yml
  23. +30 −0 apps/backend/templates/layout.php
  24. +19 −0 apps/frontend/config/app.yml
  25. +4 −0 apps/frontend/config/cache.yml
  26. +13 −0 apps/frontend/config/config.php
  27. +35 −0 apps/frontend/config/factories.yml
  28. +13 −0 apps/frontend/config/filters.yml
  29. +7 −0 apps/frontend/config/i18n.yml
  30. +22 −0 apps/frontend/config/logging.yml
  31. +96 −0 apps/frontend/config/routing.yml
  32. +2 −0  apps/frontend/config/security.yml
  33. +102 −0 apps/frontend/config/settings.yml
  34. +17 −0 apps/frontend/config/view.yml
  35. +22 −0 apps/frontend/lib/XML2LSDJ.class.php
  36. +51 −0 apps/frontend/lib/helper/GlobalHelper.php
  37. +36 −0 apps/frontend/lib/myUser.class.php
  38. +40 −0 apps/frontend/lib/universeFilter.class.php
  39. +84 −0 apps/frontend/lib/validateLogin.class.php
  40. +87 −0 apps/frontend/modules/bank/actions/actions.class.php
  41. +10 −0 apps/frontend/modules/bank/config/security.yml
  42. +44 −0 apps/frontend/modules/bank/templates/editSuccess.php
  43. +24 −0 apps/frontend/modules/bank/templates/listSuccess.php
  44. +34 −0 apps/frontend/modules/bank/templates/showSuccess.php
  45. 0  apps/frontend/modules/default/templates/disabledSuccess.php
  46. +1 −0  apps/frontend/modules/default/templates/error404Success.php
  47. +2 −0  apps/frontend/modules/default/templates/loginSuccess.php
  48. +1 −0  apps/frontend/modules/default/templates/secureSuccess.php
  49. 0  apps/frontend/modules/default/templates/unavailableSuccess.php
  50. +93 −0 apps/frontend/modules/feed/actions/actions.class.php
  51. +3 −0  apps/frontend/modules/feed/config/view.yml
  52. +1 −0  apps/frontend/modules/feed/templates/feedSuccess.php
  53. 0  apps/frontend/modules/feed/templates/indexSuccess.php
  54. +394 −0 apps/frontend/modules/instrument/actions/actions.class.php
  55. +10 −0 apps/frontend/modules/instrument/config/security.yml
  56. +28 −0 apps/frontend/modules/instrument/templates/_FamiTracker.php
  57. +107 −0 apps/frontend/modules/instrument/templates/_LSDJ.php
  58. +15 −0 apps/frontend/modules/instrument/templates/_comments.php
  59. +19 −0 apps/frontend/modules/instrument/templates/_edit_FamiTracker.php
  60. +109 −0 apps/frontend/modules/instrument/templates/_edit_LSDJ.php
  61. 0  apps/frontend/modules/instrument/templates/_goattracker.php
  62. +7 −0 apps/frontend/modules/instrument/templates/_instrument_list.php
  63. +15 −0 apps/frontend/modules/instrument/templates/_list.php
  64. +4 −0 apps/frontend/modules/instrument/templates/_search.php
  65. +68 −0 apps/frontend/modules/instrument/templates/editSuccess.php
  66. +7 −0 apps/frontend/modules/instrument/templates/exportSuccess.php
  67. +9 −0 apps/frontend/modules/instrument/templates/importSuccess.php
  68. +12 −0 apps/frontend/modules/instrument/templates/listSuccess.php
  69. +4 −0 apps/frontend/modules/instrument/templates/popularSuccess.php
  70. +19 −0 apps/frontend/modules/instrument/templates/searchSuccess.php
  71. +90 −0 apps/frontend/modules/instrument/templates/showSuccess.php
  72. +7 −0 apps/frontend/modules/instrument/validate/update.yml
  73. +19 −0 apps/frontend/modules/instrument/validate/upload.yml
  74. BIN  apps/frontend/modules/tag/actions/.actions.class.php.swp
  75. +42 −0 apps/frontend/modules/tag/actions/actions.class.php
  76. +3 −0  apps/frontend/modules/tag/config/view.yml
  77. +3 −0  apps/frontend/modules/tag/templates/_tags.php
  78. 0  apps/frontend/modules/tag/templates/indexSuccess.php
  79. +7 −0 apps/frontend/modules/tag/templates/popularSuccess.php
  80. +4 −0 apps/frontend/modules/tag/templates/showSuccess.php
  81. +81 −0 apps/frontend/modules/user/actions/actions.class.php
  82. +10 −0 apps/frontend/modules/user/config/cache.yml
  83. +34 −0 apps/frontend/modules/user/templates/_login.php
  84. +10 −0 apps/frontend/modules/user/templates/_userHeader.php
  85. +15 −0 apps/frontend/modules/user/templates/authorSuccess.php
  86. 0  apps/frontend/modules/user/templates/indexSuccess.php
  87. +6 −0 apps/frontend/modules/user/templates/loginSuccess.php
  88. +7 −0 apps/frontend/modules/user/templates/popularAuthorSuccess.php
  89. +7 −0 apps/frontend/modules/user/templates/popularUserSuccess.php
  90. +27 −0 apps/frontend/modules/user/templates/showSuccess.php
  91. +18 −0 apps/frontend/modules/user/validate/login.yml
  92. +64 −0 apps/frontend/templates/layout.php
  93. +16 −0 batch/load_data.php
  94. +6 −0 batch/reload-symfony-project.sh
  95. +2 −0  config/generated-schema-transformed.xml
  96. +43 −0 config/propel.ini
  97. +2 −0  config/properties.ini
  98. +4 −0 config/rsync_exclude.txt
  99. +71 −0 config/schema.yml
  100. +243 −0 data/fixtures/test_data.yml
  101. +290 −0 data/lsdj2xml/lsdj2xml.c
  102. +70 −0 data/lsdj2xml/lview.h
  103. +105 −0 data/lsdj2xml/xml2lsdj.c
  104. BIN  data/psd/header.psd
  105. +200 −0 data/sql/lib.model.schema.sql
  106. +2 −0  data/sql/sqldb.map
  107. +11 −0 lib/FamiTracker.class.php
  108. +19 −0 lib/Goattracker.class.php
  109. +35 −0 lib/LSDJ_Noise.class.php
  110. +43 −0 lib/LSDJ_Pulse.class.php
  111. +60 −0 lib/LSDJ_Wave.class.php
  112. +410 −0 lib/PorterStemmer.class.php
  113. +43 −0 lib/Tag.class.php
  114. +102 −0 lib/editInstrument.php
  115. +16 −0 lib/model/Bank.php
  116. +12 −0 lib/model/BankPeer.php
  117. +12 −0 lib/model/Comment.php
  118. +12 −0 lib/model/CommentPeer.php
  119. +183 −0 lib/model/Instrument.php
  120. +12 −0 lib/model/InstrumentBank.php
  121. +30 −0 lib/model/InstrumentBankPeer.php
  122. +204 −0 lib/model/InstrumentPeer.php
  123. +12 −0 lib/model/Search.php
  124. +12 −0 lib/model/SearchPeer.php
  125. +38 −0 lib/model/Tags.php
  126. +42 −0 lib/model/TagsPeer.php
  127. +22 −0 lib/model/User.php
  128. +30 −0 lib/model/UserPeer.php
  129. +12 −0 lib/model/Ware.php
  130. +15 −0 lib/model/WarePeer.php
  131. +48 −0 lib/model/map/BankMapBuilder.php
  132. +46 −0 lib/model/map/CommentMapBuilder.php
  133. +42 −0 lib/model/map/InstrumentBankMapBuilder.php
  134. +64 −0 lib/model/map/InstrumentMapBuilder.php
  135. +44 −0 lib/model/map/SearchMapBuilder.php
  136. +46 −0 lib/model/map/TagsMapBuilder.php
  137. +50 −0 lib/model/map/UserMapBuilder.php
  138. +40 −0 lib/model/map/WareMapBuilder.php
  139. +736 −0 lib/model/om/BaseBank.php
  140. +824 −0 lib/model/om/BaseBankPeer.php
  141. +566 −0 lib/model/om/BaseComment.php
  142. +819 −0 lib/model/om/BaseCommentPeer.php
  143. +1,414 −0 lib/model/om/BaseInstrument.php
  144. +465 −0 lib/model/om/BaseInstrumentBank.php
  145. +809 −0 lib/model/om/BaseInstrumentBankPeer.php
  146. +898 −0 lib/model/om/BaseInstrumentPeer.php
  147. +456 −0 lib/model/om/BaseSearch.php
  148. +539 −0 lib/model/om/BaseSearchPeer.php
  149. +579 −0 lib/model/om/BaseTags.php
  150. +817 −0 lib/model/om/BaseTagsPeer.php
  151. +1,045 −0 lib/model/om/BaseUser.php
  152. +392 −0 lib/model/om/BaseUserPeer.php
  153. +589 −0 lib/model/om/BaseWare.php
  154. +367 −0 lib/model/om/BaseWarePeer.php
  155. +204 −0 lib/myTools.class.php
  156. +1 −0  plugins/.channels/.alias/pear.txt
  157. +1 −0  plugins/.channels/.alias/pecl.txt
  158. +1 −0  plugins/.channels/.alias/symfony.txt
  159. +1 −0  plugins/.channels/__uri.reg
  160. +1 −0  plugins/.channels/pear.php.net.reg
  161. +1 −0  plugins/.channels/pear.symfony-project.com.reg
  162. +1 −0  plugins/.channels/pecl.php.net.reg
  163. +1 −0  plugins/.depdb
  164. 0  plugins/.depdblock
  165. +1 −0  plugins/.filemap
  166. 0  plugins/.lock
  167. +2 −0  plugins/.pearrc
  168. +1 −0  plugins/.registry/.channel.pear.symfony-project.com/sffeedplugin.reg
  169. +3 −0  plugins/.registry/.channel.pear.symfony-project.com/symfony.reg
  170. +7 −0 plugins/sfFeedPlugin/LICENSE
  171. +19 −0 plugins/sfFeedPlugin/README
  172. +181 −0 plugins/sfFeedPlugin/lib/sfAtom1Feed.class.php
  173. +490 −0 plugins/sfFeedPlugin/lib/sfFeed.class.php
  174. +56 −0 plugins/sfFeedPlugin/lib/sfFeedEnclosure.class.php
  175. +144 −0 plugins/sfFeedPlugin/lib/sfFeedItem.class.php
  176. +78 −0 plugins/sfFeedPlugin/lib/sfRss201rev2Feed.class.php
  177. +47 −0 plugins/sfFeedPlugin/lib/sfRssFeed.class.php
  178. +44 −0 plugins/sfFeedPlugin/lib/sfRssUserland091Feed.class.php
  179. 0  symfony
  180. +29 −0 test/bootstrap/functional.php
  181. +17 −0 test/bootstrap/unit.php
  182. +15 −0 test/functional/frontend/bankActionsTest.php
  183. +15 −0 test/functional/frontend/feedActionsTest.php
  184. +15 −0 test/functional/frontend/instrumentActionsTest.php
  185. +15 −0 test/functional/frontend/tagActionsTest.php
  186. +15 −0 test/functional/frontend/userActionsTest.php
  187. +26 −0 web/.htaccess
  188. +10 −0 web/admin.php
  189. +10 −0 web/backend_dev.php
  190. BIN  web/bin/blank.sav
  191. BIN  web/bin/lsdj2xml
  192. +74 −0 web/css/FamiTracker.css
  193. +21 −0 web/css/LSDJ.css
  194. +423 −0 web/css/main.css
  195. 0  web/errors/error500.php
  196. 0  web/errors/unavailable.php
  197. +10 −0 web/frontend_dev.php
  198. BIN  web/images/bg.gif
  199. BIN  web/images/feed.png
  200. BIN  web/images/ft-header.png
  201. BIN  web/images/ft.gif
  202. BIN  web/images/header.png
  203. BIN  web/images/indicator.gif
  204. +10 −0 web/index.php
  205. +123 −0 web/js/FamiTracker.js
  206. +49 −0 web/js/LSDJ.js
  207. +19 −0 web/js/main.js
  208. +8 −0 web/js/swfobject.js
  209. +1 −0  web/js/turbov110.js
  210. +2 −0  web/robots.txt
  211. BIN  web/swf/player.swf
2  apps/backend/config/app.yml
@@ -0,0 +1,2 @@
+# default values
+#all:
4 apps/backend/config/cache.yml
@@ -0,0 +1,4 @@
+default:
+ enabled: off
+ with_layout: false
+ lifetime: 86400
8 apps/backend/config/config.php
@@ -0,0 +1,8 @@
+<?php
+
+// include project configuration
+include(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
+
+// symfony bootstraping
+require_once($sf_symfony_lib_dir.'/util/sfCore.class.php');
+sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir);
35 apps/backend/config/factories.yml
@@ -0,0 +1,35 @@
+cli:
+ controller:
+ class: sfConsoleController
+ request:
+ class: sfConsoleRequest
+ response:
+ class: sfConsoleResponse
+
+test:
+ storage:
+ class: sfSessionTestStorage
+
+all:
+# controller:
+# class: sfFrontWebController
+#
+# request:
+# class: sfWebRequest
+#
+# response:
+# class: sfWebResponse
+#
+# user:
+# class: myUser
+#
+ storage:
+ class: sfSessionStorage
+ param:
+ session_name: lsdjie
+#
+# view_cache:
+# class: sfFileCache
+# param:
+# automaticCleaningFactor: 0
+# cacheDir: %SF_TEMPLATE_CACHE_DIR%
10 apps/backend/config/filters.yml
@@ -0,0 +1,10 @@
+rendering: ~
+web_debug: ~
+security: ~
+
+# generally, you will want to insert your own filters here
+
+cache: ~
+common: ~
+flash: ~
+execution: ~
7 apps/backend/config/i18n.yml
@@ -0,0 +1,7 @@
+#all:
+# default_culture: en
+# source: XLIFF
+# debug: off
+# cache: on
+# untranslated_prefix: "[T]"
+# untranslated_suffix: "[/T]"
22 apps/backend/config/logging.yml
@@ -0,0 +1,22 @@
+prod:
+ enabled: off
+ level: err
+ rotate: on
+ purge: off
+
+#all:
+# enabled: on
+# level: debug
+# rotate: off
+# period: 7
+# history: 10
+# purge: on
+# loggers:
+# sf_web_debug:
+# class: sfWebDebugLogger
+# param:
+# condition: %SF_WEB_DEBUG%
+# sf_file_debug:
+# class: sfFileLogger
+# param:
+# file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log
15 apps/backend/config/routing.yml
@@ -0,0 +1,15 @@
+# default rules
+homepage:
+ url: /
+ param: { module: instrument, action: list }
+
+default_symfony:
+ url: /symfony/:action/*
+ param: { module: default }
+
+default_index:
+ url: /:module
+ param: { action: index }
+
+default:
+ url: /:module/:action/*
3  apps/backend/config/security.yml
@@ -0,0 +1,3 @@
+default:
+ is_secure: on
+ credentials: admin
102 apps/backend/config/settings.yml
@@ -0,0 +1,102 @@
+prod:
+ .settings:
+ no_script_name: off
+
+dev:
+ .settings:
+ error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?>
+ web_debug: on
+ cache: off
+ no_script_name: off
+ etag: off
+
+test:
+ .settings:
+ error_reporting: <?php echo (E_ALL | E_STRICT & ~E_NOTICE)."\n" ?>
+ cache: off
+ web_debug: off
+ no_script_name: off
+ etag: off
+
+#all:
+# .actions:
+# default_module: default # Default module and action to be called when
+# default_action: index # A routing rule doesn't set it
+#
+# error_404_module: default # To be called when a 404 error is raised
+# error_404_action: error404 # Or when the requested URL doesn't match any route
+#
+# login_module: default # To be called when a non-authenticated user
+# login_action: login # Tries to access a secure page
+#
+# secure_module: default # To be called when a user doesn't have
+# secure_action: secure # The credentials required for an action
+#
+# module_disabled_module: default # To be called when a user requests
+# module_disabled_action: disabled # A module disabled in the module.yml
+#
+# unavailable_module: default # To be called when a user requests a page
+# unavailable_action: unavailable # From an application disabled via the available setting below
+#
+# .settings:
+# available: on # Enable the whole application. Switch to off to redirect all requests to the unavailable module and action.
+#
+# # Optional features. Deactivating unused features boots performance a bit.
+# use_database: on # Enable database manager. Set to off if you don't use a database.
+# use_security: on # Enable security features (login and credentials). Set to off for public applications.
+# use_flash: on # Enable flash parameter feature. Set to off if you never use the set_flash() method in actions.
+# i18n: off # Enable interface translation. Set to off if your application should not be translated.
+# check_symfony_version: off # Enable check of symfony version for every request. Set to on to have symfony clear the cache automatically when the framework is upgraded. Set to off if you always clear the cache after an upgrade.
+# use_process_cache: on # Enable symfony optimizations based on PHP accelerators. Set to off for tests or when you have enabled a PHP accelerator in your server but don't want symfony to use it internally.
+# compressed: off # Enable PHP response compression. Set to on to compress the outgoing HTML via the PHP handler.
+# check_lock: off # Enable the application lock system triggered by the clear-cache task. Set to on to have all requests redirected to the $sf_symfony_data_dir/web/arrors/unavailable.php page during the clear-cache process.
+#
+# # Output escaping settings
+# escaping_strategy: bc # Determines how variables are made available to templates. Accepted values: bc, both, on, off. The value off deactivates escaping completely and gives a slight boost.
+# escaping_method: ESC_ENTITIES # Function or helper used for escaping. Accepted values: ESC_RAW, ESC_ENTITIES, ESC_JS, ESC_JS_NO_ENTITIES.
+#
+# # Routing settings
+# relative_url_root: # Default URL prefix. Use this when your symfony project is installed in a sub directory of the apache document root.
+# suffix: . # Default suffix for generated URLs. If set to a single dot (.), no suffix is added. Possible values: .html, .php, and so on.
+# no_script_name: off # Enable the front controller name in generated URLs
+#
+# # Validation settings, used for error generation by the Validation helper
+# validation_error_prefix: ' &darr;&nbsp;'
+# validation_error_suffix: ' &nbsp;&darr;'
+# validation_error_class: form_error
+# validation_error_id_prefix: error_for_
+#
+# # Cache settings
+# cache: off # Enable the template cache
+# etag: on # Enable etag handling
+#
+# # Logging and debugging settings
+# web_debug: off # Enable the web debug toolbar
+# error_reporting: <?php echo (E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR)."\n" ?> # Determines which events are logged. The default value is E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR = 341
+#
+# # Assets paths
+# rich_text_js_dir: js/tiny_mce
+# prototype_web_dir: /sf/prototype
+# admin_web_dir: /sf/sf_admin
+# web_debug_web_dir: /sf/sf_web_debug
+#
+# # Helpers included in all templates by default
+# standard_helpers: [Partial, Cache, Form]
+#
+# # Activated modules from plugins or from the symfony core
+# enabled_modules: [default]
+#
+# # Charset used for the response
+# charset: utf-8
+#
+# # Miscellaneous
+# strip_comments: on # Remove comments in core framework classes as defined in the core_compile.yml
+# autoloading_functions: ~ # Functions called when a class is requested and this it is not already loaded. Expects an array of callables. Used by the framework bridges.
+# timeout: 1800 # Session timeout, in seconds
+# max_forwards: 5
+# path_info_array: SERVER
+# path_info_key: PATH_INFO
+# url_format: PATH
+#
+# # ORM
+# orm: propel
16 apps/backend/config/view.yml
@@ -0,0 +1,16 @@
+default:
+ http_metas:
+ content-type: text/html
+
+ metas:
+ title: LSDJ Patch Book - Admin Panel
+ robots: index, nofollow
+ keywords: lsdj
+ language: en
+
+ stylesheets: [main]
+
+ javascripts: []
+
+ has_layout: on
+ layout: layout
5 apps/backend/lib/myUser.class.php
@@ -0,0 +1,5 @@
+<?php
+
+class myUser extends sfBasicSecurityUser
+{
+}
13 apps/backend/modules/bank/actions/actions.class.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * bank actions.
+ *
+ * @package lsdj-patches
+ * @subpackage bank
+ * @author Your name here
+ * @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
+ */
+class bankActions extends autobankActions
+{
+}
9 apps/backend/modules/bank/config/generator.yml
@@ -0,0 +1,9 @@
+generator:
+ class: sfPropelAdminGenerator
+ param:
+ model_class: Bank
+ theme: default
+ list:
+ display: [name, owner, share, updated_at]
+ object_actions:
+ _delete: ~
18 apps/backend/modules/comment/actions/actions.class.php
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * comment actions.
+ *
+ * @package lsdj-patches
+ * @subpackage comment
+ * @author Your name here
+ * @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
+ */
+class commentActions extends autocommentActions
+{
+
+public function executeEdit() {
+ $this->forward404Unless(false);
+}
+
+}
12 apps/backend/modules/comment/config/generator.yml
@@ -0,0 +1,12 @@
+generator:
+ class: sfPropelAdminGenerator
+ param:
+ model_class: Comment
+ theme: default
+ list:
+ display: [instrument, author, comment, created_at]
+ object_actions:
+ _delete: ~
+
+ edit:
+ display: []
13 apps/backend/modules/instrument/actions/actions.class.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * instrument actions.
+ *
+ * @package lsdj-patches
+ * @subpackage instrument
+ * @author Your name here
+ * @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
+ */
+class instrumentActions extends autoinstrumentActions
+{
+}
17 apps/backend/modules/instrument/config/generator.yml
@@ -0,0 +1,17 @@
+generator:
+ class: sfPropelAdminGenerator
+ param:
+ model_class: Instrument
+ theme: default
+
+ list:
+# fields:
+# id: { credentials: [subscriber] }
+ display: [name, type, owner, author, share, popularity, updated_at]
+ object_actions:
+ _edit: ~
+ _delete: ~
+ max_per_page: 50
+
+ edit:
+ display: [id, name, stripped, type, owner, description, author, author_strip, popularity, updated_at]
13 apps/backend/modules/tags/actions/actions.class.php
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * tags actions.
+ *
+ * @package lsdj-patches
+ * @subpackage tags
+ * @author Your name here
+ * @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
+ */
+class tagsActions extends autotagsActions
+{
+}
9 apps/backend/modules/tags/config/generator.yml
@@ -0,0 +1,9 @@
+generator:
+ class: sfPropelAdminGenerator
+ param:
+ model_class: Tags
+ theme: default
+ list:
+ display: [instrument, user, tag]
+ object_actions:
+ _delete: ~
18 apps/backend/modules/user/actions/actions.class.php
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * user actions.
+ *
+ * @package lsdj-patches
+ * @subpackage user
+ * @author Your name here
+ * @version SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
+ */
+class userActions extends autouserActions
+{
+
+public function executeEdit() {
+ $this->forward404Unless(false);
+}
+
+}
12 apps/backend/modules/user/config/generator.yml
@@ -0,0 +1,12 @@
+generator:
+ class: sfPropelAdminGenerator
+ param:
+ model_class: User
+ theme: default
+
+ list:
+ display: [username, realname, location, is_admin]
+ object_actions:
+ _delete: ~
+ fields:
+ realname: { name: Name }
30 apps/backend/templates/layout.php
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+
+<?php include_http_metas() ?>
+<?php include_metas() ?>
+
+<?php include_title() ?>
+
+<link rel="shortcut icon" href="/favicon.ico" />
+
+</head>
+<body>
+
+<div id="container">
+ <div id="header">
+ <ul id="navigation">
+<li><?php echo link_to('Home','../') ?></li>
+<li><?php echo link_to('Instrument','/instrument') ?></li>
+<li><?php echo link_to('Bank','/bank') ?></li>
+<li><?php echo link_to('Comment','/comment') ?></li>
+<li><?php echo link_to('Tags','/tags') ?></li>
+<li><?php echo link_to('User','/user') ?></li>
+</ul>
+</div>
+
+<?php echo $sf_data->getRaw('sf_content') ?>
+</div>
+</body>
+</html>
19 apps/frontend/config/app.yml
@@ -0,0 +1,19 @@
+all:
+ maintenance: off
+ universe: on
+ #tag: lsdj
+ pager:
+ homepage_max: 10
+ feed:
+ max: 10
+ tag:
+ cloud_max: 40
+ search:
+ tag_weight: 1
+ desc_weight: 2
+ title_weight: 5
+ results_max: 10
+ upload:
+ dir: samples
+ .settings:
+ timeout: false
4 apps/frontend/config/cache.yml
@@ -0,0 +1,4 @@
+default:
+ enabled: off
+ with_layout: false
+ lifetime: 86400
13 apps/frontend/config/config.php
@@ -0,0 +1,13 @@
+<?php
+
+// include project configuration
+include(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'config.php');
+
+// symfony bootstraping
+require_once($sf_symfony_lib_dir.'/util/sfCore.class.php');
+sfCore::bootstrap($sf_symfony_lib_dir, $sf_symfony_data_dir);
+
+sfConfig::add(array(
+ 'sf_upload_dir_name' => $sf_upload_dir_name = 'samples',
+ 'sf_upload_dir' => sfConfig::get('sf_root_dir').DIRECTORY_SEPARATOR.sfConfig::get('sf_web_dir_name').DIRECTORY_SEPARATOR.$sf_upload_dir_name,
+));
35 apps/frontend/config/factories.yml
@@ -0,0 +1,35 @@
+cli:
+ controller:
+ class: sfConsoleController
+ request:
+ class: sfConsoleRequest
+ response:
+ class: sfConsoleResponse
+
+test:
+ storage:
+ class: sfSessionTestStorage
+
+all:
+# controller:
+# class: sfFrontWebController
+#
+# request:
+# class: sfWebRequest
+#
+# response:
+# class: sfWebResponse
+#
+# user:
+# class: myUser
+#
+ storage:
+ class: sfSessionStorage
+ param:
+ session_name: lsdjie
+#
+# view_cache:
+# class: sfFileCache
+# param:
+# automaticCleaningFactor: 0
+# cacheDir: %SF_TEMPLATE_CACHE_DIR%
13 apps/frontend/config/filters.yml
@@ -0,0 +1,13 @@
+rendering: ~
+web_debug: ~
+security: ~
+
+universeFilter:
+ class: universeFilter
+ param:
+ host_exclude_regex: /^(www|2x26)/
+
+cache: ~
+common: ~
+flash: ~
+execution: ~
7 apps/frontend/config/i18n.yml
@@ -0,0 +1,7 @@
+#all:
+# default_culture: en
+# source: XLIFF
+# debug: off
+# cache: on
+# untranslated_prefix: "[T]"
+# untranslated_suffix: "[/T]"
22 apps/frontend/config/logging.yml
@@ -0,0 +1,22 @@
+prod:
+ enabled: off
+ level: err
+ rotate: on
+ purge: off
+
+all:
+ enabled: on
+ level: debug
+ rotate: on
+ period: 7
+ history: 10
+ purge: on
+# loggers:
+# sf_web_debug:
+# class: sfWebDebugLogger
+# param:
+# condition: %SF_WEB_DEBUG%
+# sf_file_debug:
+# class: sfFileLogger
+# param:
+# file: %SF_LOG_DIR%/%SF_APP%_%SF_ENVIRONMENT%.log
96 apps/frontend/config/routing.yml
@@ -0,0 +1,96 @@
+# default rules
+
+instrument:
+ url: /patch/:author/:name
+ param: { module: instrument, action: show }
+
+bank:
+ url: /bank/id/:id
+ param: { module: bank, action: show }
+
+instrumentFeed:
+ url: /patch/:authorStrip/:stripped
+ param: { module: instrument, action: show }
+
+homepage:
+ url: /
+ param: { module: instrument, action: list }
+
+feed_popular:
+ url: /feed/top
+ param: { module: feed, action: popular }
+
+search:
+ url: /search/*
+ param: { module: instrument, action: search }
+
+type:
+ url: /type/:type/:page
+ param: { module: instrument, action: type }
+
+tag:
+ url: /tag/:tag/:page
+ param: { module: tag, action: show, page: 1 }
+
+tag_add:
+ url: /tag_add
+ param: { module: tag, action: add }
+
+iLike:
+ url: /iLikeThisVeryMuch
+ param: { module: instrument, action: iLike }
+
+comment_add:
+ url: /comment_add
+ param: { module: instrument, action: postComment }
+
+popular_tags:
+ url: /tag_cloud
+ param: { module: tag, action: popular }
+
+login:
+ url: /login
+ param: { module: user, action: login }
+
+author:
+ url: /author/:author
+ param: { module: user, action: author }
+
+user:
+ url: /user/:username
+ param: { module: user, action: show }
+
+logout:
+ url: /logout
+ param: { module: user, action: logout }
+
+pagination:
+ url: /page/:page
+ param: { module: instrument, action: list, page: 1 }
+
+search_instrument:
+ url: /search/*
+ param: { module: instrument, action: search }
+
+top_authors:
+ url: /top/authors/
+ param: { module: user, action: popularAuthor }
+
+top_users:
+ url: /top/users/
+ param: { module: user, action: popularUser }
+
+popular:
+ url: /top/instruments/:page
+ param: { module: instrument, action: popular, page: 1 }
+
+default_symfony:
+ url: /symfony/:action/*
+ param: { module: default }
+
+default_index:
+ url: /:module
+ param: { action: index }
+
+default:
+ url: /:module/:action/*
2  apps/frontend/config/security.yml
@@ -0,0 +1,2 @@
+default:
+ is_secure: off
102 apps/frontend/config/settings.yml
@@ -0,0 +1,102 @@
+prod:
+ .settings:
+ no_script_name: on
+
+dev:
+ .settings:
+ error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?>
+ web_debug: on
+ cache: off
+ no_script_name: off
+ etag: off
+
+test:
+ .settings:
+ error_reporting: <?php echo (E_ALL | E_STRICT & ~E_NOTICE)."\n" ?>
+ cache: off
+ web_debug: off
+ no_script_name: off
+ etag: off
+
+all:
+# .actions:
+# default_module: default # Default module and action to be called when
+# default_action: index # A routing rule doesn't set it
+#
+# error_404_module: errors # To be called when a 404 error is raised
+# error_404_action: error404 # Or when the requested URL doesn't match any route
+#
+# login_module: default # To be called when a non-authenticated user
+# login_action: login # Tries to access a secure page
+#
+# secure_module: default # To be called when a user doesn't have
+# secure_action: secure # The credentials required for an action
+#
+# module_disabled_module: default # To be called when a user requests
+# module_disabled_action: disabled # A module disabled in the module.yml
+#
+# unavailable_module: default # To be called when a user requests a page
+# unavailable_action: unavailable # From an application disabled via the available setting below
+#
+ .settings:
+ available: on # Enable the whole application. Switch to off to redirect all requests to the unavailable module and action.
+#
+# # Optional features. Deactivating unused features boots performance a bit.
+# use_database: on # Enable database manager. Set to off if you don't use a database.
+# use_security: on # Enable security features (login and credentials). Set to off for public applications.
+# use_flash: on # Enable flash parameter feature. Set to off if you never use the set_flash() method in actions.
+# i18n: off # Enable interface translation. Set to off if your application should not be translated.
+# check_symfony_version: off # Enable check of symfony version for every request. Set to on to have symfony clear the cache automatically when the framework is upgraded. Set to off if you always clear the cache after an upgrade.
+# use_process_cache: on # Enable symfony optimizations based on PHP accelerators. Set to off for tests or when you have enabled a PHP accelerator in your server but don't want symfony to use it internally.
+# compressed: off # Enable PHP response compression. Set to on to compress the outgoing HTML via the PHP handler.
+# check_lock: off # Enable the application lock system triggered by the clear-cache task. Set to on to have all requests redirected to the $sf_symfony_data_dir/web/arrors/unavailable.php page during the clear-cache process.
+#
+# # Output escaping settings
+# escaping_strategy: bc # Determines how variables are made available to templates. Accepted values: bc, both, on, off. The value off deactivates escaping completely and gives a slight boost.
+# escaping_method: ESC_ENTITIES # Function or helper used for escaping. Accepted values: ESC_RAW, ESC_ENTITIES, ESC_JS, ESC_JS_NO_ENTITIES.
+#
+# # Routing settings
+# relative_url_root: # Default URL prefix. Use this when your symfony project is installed in a sub directory of the apache document root.
+# suffix: . # Default suffix for generated URLs. If set to a single dot (.), no suffix is added. Possible values: .html, .php, and so on.
+# no_script_name: off # Enable the front controller name in generated URLs
+#
+# # Validation settings, used for error generation by the Validation helper
+# validation_error_prefix: ' &darr;&nbsp;'
+# validation_error_suffix: ' &nbsp;&darr;'
+# validation_error_class: form_error
+# validation_error_id_prefix: error_for_
+#
+# # Cache settings
+# cache: off # Enable the template cache
+# etag: on # Enable etag handling
+#
+# # Logging and debugging settings
+# web_debug: off # Enable the web debug toolbar
+# error_reporting: <?php echo (E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR)."\n" ?> # Determines which events are logged. The default value is E_PARSE | E_COMPILE_ERROR | E_ERROR | E_CORE_ERROR | E_USER_ERROR = 341
+#
+# # Assets paths
+# rich_text_js_dir: js/tiny_mce
+# prototype_web_dir: /sf/prototype
+# admin_web_dir: /sf/sf_admin
+# web_debug_web_dir: /sf/sf_web_debug
+#
+# # Helpers included in all templates by default
+# standard_helpers: [Partial, Cache, Form]
+#
+# # Activated modules from plugins or from the symfony core
+# enabled_modules: [default]
+#
+# # Charset used for the response
+# charset: utf-8
+#
+# # Miscellaneous
+# strip_comments: on # Remove comments in core framework classes as defined in the core_compile.yml
+# autoloading_functions: ~ # Functions called when a class is requested and this it is not already loaded. Expects an array of callables. Used by the framework bridges.
+ timeout: 2246400 # Session timeout, in seconds
+# max_forwards: 5
+# path_info_array: SERVER
+# path_info_key: PATH_INFO
+# url_format: PATH
+#
+# # ORM
+# orm: propel
17 apps/frontend/config/view.yml
@@ -0,0 +1,17 @@
+default:
+ http_metas:
+ content-type: text/html
+
+ metas:
+ title: Chip Patch Book
+ robots: index, follow
+ description: Chip music patch cookbook website. Find instrument patches for various 8-bit related software.
+ keywords: lsdj, 8-bit, chipmusic, chiptune
+ language: en
+
+ stylesheets: [main]
+
+ javascripts: [main, turbov110]
+
+ has_layout: on
+ layout: layout
22 apps/frontend/lib/XML2LSDJ.class.php
@@ -0,0 +1,22 @@
+<?
+class XML2LSDJ {
+
+ public static function length($length) {
+ $length = ($length == "UNLIM") ? 255 : hexdec($length);
+ $length = (~$length & 0x7F);
+ return str_pad(dechex($length), 2, "0", STR_PAD_LEFT);
+ }
+
+ public static function hex2bin($hexstr) {
+ $strarray = explode(' ', trim($hexstr));
+
+ $outstr = '';
+
+ for($i = 0; $i < sizeof($strarray); $i++){
+ $outstr .= pack("H*", $strarray[$i]);
+ }
+
+ return $outstr;
+ }
+}
+?>
51 apps/frontend/lib/helper/GlobalHelper.php
@@ -0,0 +1,51 @@
+<?php
+
+function hexinput_tag($name, $value = null, $options = array()) { // validates double: 00-FF
+ return tag('input', array_merge(array('type' => 'text', 'name' => $name, 'id' => get_id_from_name($name, $value), 'value' => $value, 'onfocus' => 'this.title=this.value', 'onblur' => 'this.value=hex_check(this)'), _convert_options($options)));
+}
+
+function hex1input_tag($name, $value = null, $options = array()) { // validates all special ones.
+ return tag('input', array_merge(array('type' => 'text', 'name' => $name, 'id' => get_id_from_name($name, $value), 'value' => $value, 'onfocus' => 'this.title=this.value', 'onblur' => 'this.value=special_hex_check(this)'), _convert_options($options)));
+}
+
+function link_to_feed($name, $uri)
+{
+ return link_to(image_tag('feed.png', array('alt' => 'RSS', 'title' => $name, 'align' => 'absmiddle')), $uri);
+}
+
+function pager_navigation($pager, $uri)
+{
+ $navigation = '';
+
+ if ($pager->haveToPaginate())
+ {
+ $uri .= (preg_match('/\?/', $uri) ? '&' : '?').'page=';
+
+ // First and previous page
+ if ($pager->getPage() != 1)
+ {
+ $navigation .= link_to('&laquo;', '?page=1')."&nbsp;";
+ $navigation .= link_to('&lt;', $uri.$pager->getPreviousPage()) . "&nbsp;";
+
+ }
+
+ // Pages one by one
+ $links = array();
+ foreach ($pager->getLinks() as $page)
+ {
+ $links[] = link_to_unless($page == $pager->getPage(), $page, $uri.$page);
+ }
+ $navigation .= join('&nbsp;&nbsp;', $links);
+
+ // Next and last page
+ if ($pager->getPage() != $pager->getCurrentMaxLink())
+ {
+ $navigation .= "&nbsp;". link_to('&raquo;', $uri.$pager->getLastPage());
+ $navigation .= "&nbsp;". link_to('&gt;', $uri.$pager->getNextPage());
+
+ }
+
+ }
+
+ return $navigation;
+}
36 apps/frontend/lib/myUser.class.php
@@ -0,0 +1,36 @@
+<?php
+
+class myUser extends sfBasicSecurityUser
+{
+public function signIn($user)
+{
+ $this->setAttribute('subscriber_id', $user->getUsername(), 'subscriber');
+ $this->setAuthenticated(true);
+ $this->addCredential('subscriber');
+ if ($user->getIsAdmin()) $this->addCredential('admin');
+ $this->setAttribute('username', $user->getUsername(), 'subscriber');
+}
+
+public function signOut()
+{
+ $this->getAttributeHolder()->removeNamespace('subscriber');
+ $this->getAttributeHolder()->removeNamespace('admin');
+
+ $this->setAuthenticated(false);
+ $this->clearCredentials();
+}
+public function getSubscriberId()
+{
+ return $this->getAttribute('subscriber_id', '', 'subscriber');
+}
+
+public function getSubscriber()
+{
+ return UserPeer::retrieveByPk($this->getSubscriberId());
+}
+
+public function getUsername()
+{
+ return $this->getAttribute('username', '', 'subscriber');
+}
+}
40 apps/frontend/lib/universeFilter.class.php
@@ -0,0 +1,40 @@
+<?php
+
+class universeFilter extends sfFilter
+{
+ public function execute ($filterChain)
+ {
+ //set default tag
+ sfConfig::set('app_tag', "LSDJ");
+ // maintenace mode:
+ if (sfConfig::get('app_maintenance') && $this->isFirstCall()) {
+ die("The Patch Book is currently undergoing maintenance. Please check back at a later time.");
+ }
+ // execute this filter only once
+ if (sfConfig::get('app_universe') && $this->isFirstCall())
+ {
+ // is there a tag in the hostname?
+ $hostname = $this->getContext()->getRequest()->getHost();
+ if (!preg_match($this->getParameter('host_exclude_regex'), $hostname) && $pos = strpos($hostname, '.'))
+ {
+ $tag = Tag::normalize(substr($hostname, 0, $pos));
+
+ // add a permanent tag custom configuration parameter
+ if ($tag == "lsdj") $tag = "LSDJ";
+ else if ($tag == "famitracker" || $tag == "ft") $tag = "FamiTracker";
+ else if ($tag == "goattracker") $tag = "goattracker";
+
+ sfConfig::set('app_tag', $tag);
+
+ // add a custom stylesheet/javascript
+ $this->getContext()->getResponse()->addStylesheet($tag);
+ $this->getContext()->getResponse()->addJavascript($tag);
+ }
+ }
+
+ // execute next filter
+ $filterChain->execute();
+ }
+}
+
+?>
84 apps/frontend/lib/validateLogin.class.php
@@ -0,0 +1,84 @@
+<?php
+
+class validateLogin extends sfValidator
+{
+ public function initialize($context, $parameters = null)
+ {
+ // initialize parent
+ parent::initialize($context);
+
+ // set defaults
+ $this->setParameter('login_error', 'Invalid input');
+
+ $this->getParameterHolder()->add($parameters);
+
+ return true;
+ }
+
+ public function execute(&$value, &$error)
+ {
+ $password_param = $this->getParameter('password');
+ $password = $this->getContext()->getRequest()->getParameter($password_param);
+
+ $login = $value;
+
+ // anonymous is not a real user
+ if ($login == 'anonymous')
+ {
+ $error = $this->getParameter('login_error');
+ return false;
+ }
+
+ // <!-- 8bc connect
+ define('POSTURL', 'http://8bitcollective.com/forums/login.php?action=in&8bcConnect=true');
+ define('POSTVARS', "req_username={$login}&req_password={$password}&form_sent=true"); // POST VARIABLES TO BE SENT
+
+ $ch = curl_init(POSTURL);
+ curl_setopt($ch, CURLOPT_POST ,1);
+ curl_setopt($ch, CURLOPT_POSTFIELDS ,POSTVARS);
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION ,1);
+ curl_setopt($ch, CURLOPT_HEADER ,0); // DO NOT RETURN HTTP HEADERS
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER ,1); // RETURN THE CONTENTS OF THE CALL
+ $xml = curl_exec($ch);
+
+ $data = myTools::Xml2Array($xml); //var_dump($data);
+
+ if ($data['user']['authenticated'] == "true") {
+ $user = UserPeer::retrieveByPk($data['user']['username']);
+ $change = false;
+
+ if ($user == NULL) {
+ $user = new User;
+ $user->setUsername($data['user']['username']);
+ $change = true;
+ }
+
+ if ($user->getDescription() != substr($data['user']['description'],0,500)) {
+ $user->setDescription(substr($data['user']['description'],0,500));
+ $change = true;
+ }
+ if ($user->getRealname() != $data['user']['name']) {
+ $user->setRealname($data['user']['name']);
+ $change = true;
+ }
+ if ($user->getLocation() != $data['user']['location']) {
+ $user->setLocation($data['user']['location']);
+ $change = true;
+ }
+ if ($user->getAvatar() != $data['user']['avatar']) {
+ $user->setAvatar($data['user']['avatar']);
+ $change = true;
+ }
+
+ if ($change == true) $user->save();
+
+ // user sign in.
+ $this->getContext()->getUser()->signIn($user);
+ return true;
+ }
+ // -->
+
+ $error = $this->getParameter('login_error');
+ return false;
+ }
+}
87 apps/frontend/modules/bank/actions/actions.class.php
@@ -0,0 +1,87 @@
+<?php
+// auto-generated by sfPropelCrud
+// date: 2009/03/15 20:44:07
+?>
+<?php
+
+/**
+ * bank actions.
+ *
+ * @package lsdj-patches
+ * @subpackage bank
+ * @author Your name here
+ * @version SVN: $Id: actions.class.php 3335 2007-01-23 16:19:56Z fabien $
+ */
+class bankActions extends sfActions
+{
+ public function executeIndex()
+ {
+ return $this->forward('bank', 'list');
+ }
+
+ public function executeList()
+ {
+ $this->banks = BankPeer::doSelect(new Criteria());
+ }
+
+ public function executeShow()
+ {
+ $this->bank = BankPeer::retrieveByPk($this->getRequestParameter('id'));
+ $this->instruments = InstrumentPeer::getByBank($this->getRequestParameter('id'));
+ $this->forward404Unless($this->bank);
+ }
+
+ public function executeCreate()
+ {
+ $this->bank = new Bank();
+
+ $this->setTemplate('edit');
+ }
+
+ public function executeEdit()
+ {
+ $this->bank = BankPeer::retrieveByPk($this->getRequestParameter('id'));
+ $this->user = $this->getUser()->getSubscriber();
+ $this->forward404Unless($this->bank);
+ }
+
+ public function executeUpdate()
+ {
+ if (!$this->getRequestParameter('id'))
+ {
+ $bank = new Bank();
+ }
+ else
+ {
+ $bank = BankPeer::retrieveByPk($this->getRequestParameter('id'));
+ $this->forward404Unless($bank);
+ }
+
+ $bank->setId($this->getRequestParameter('id'));
+ $bank->setName($this->getRequestParameter('name'));
+ $bank->setOwner($this->getUser()->getSubscriber());
+ $bank->save();
+
+ $bank_id = $bank->getId() ? $bank->getId() : $this->getRequestParameter('id');
+ InstrumentBankPeer::Clear($bank_id);
+ foreach ($this->getRequestParameter('instruments') as $instrument):
+ $instrumentBank = new InstrumentBank();
+ $instrumentBank->setBankId($bank_id);
+ $instrumentBank->setInstrumentId($instrument);
+ if ($instrumentBank->getInstrumentId() != 0) $instrumentBank->save();
+ endforeach;
+
+ return $this->redirect('@bank?owner='.$bank->getOwner().'&id='.$bank->getId());
+ }
+
+ public function executeDelete()
+ {
+ $bank = BankPeer::retrieveByPk($this->getRequestParameter('id'));
+
+ $this->forward404Unless($bank);
+
+ $bank->delete();
+
+ return $this->redirect('bank/list');
+ }
+}
10 apps/frontend/modules/bank/config/security.yml
@@ -0,0 +1,10 @@
+edit:
+ is_secure: on
+ credentials: subscriber
+
+create:
+ is_secure: on
+ credentials: subscriber
+
+all:
+ is_secure: off
44 apps/frontend/modules/bank/templates/editSuccess.php
@@ -0,0 +1,44 @@
+<?php
+// auto-generated by sfPropelCrud
+// date: 2009/03/15 20:44:07
+?>
+<?php use_helper('Object') ?>
+
+<h1><? echo ($sf_context->getActionName() == 'create')? "Create":"Edit" ?> Bank</h1>
+
+<?php echo form_tag('bank/update') ?>
+
+<?php echo object_input_hidden_tag($bank, 'getId') ?>
+
+<table>
+<tbody>
+<tr>
+ <th>Name:</th>
+ <td><?php echo object_input_tag($bank, 'getName', array (
+ 'size' => 10,
+)) ?></td>
+</tr>
+<tr>
+ <th>Instruments:</th>
+ <td>
+ <?php echo object_select_tag('instruments','getInstruments', array (
+ 'related_class' => 'Instrument',
+ 'multiple' => 'multiple',
+)) ?>
+ </td>
+</tr>
+<tr>
+ <th>Share:</th>
+ <td><?php echo object_checkbox_tag($bank, 'getShare') ?> <a href="javascript:;" name="share" onclick="whatsShare()">What's this?</a></td>
+</tr>
+</tbody>
+</table>
+<hr />
+<?php echo submit_tag('save') ?>
+<?php if ($bank->getId()): ?>
+ &nbsp;<?php echo link_to('delete', 'bank/delete?id='.$bank->getId(), 'post=true&confirm=Are you sure?') ?>
+ &nbsp;<?php echo link_to('cancel', 'bank/show?id='.$bank->getId()) ?>
+<?php else: ?>
+ &nbsp;<?php echo link_to('cancel', 'bank') ?>
+<?php endif; ?>
+</form>
24 apps/frontend/modules/bank/templates/listSuccess.php
@@ -0,0 +1,24 @@
+<?php
+// auto-generated by sfPropelCrud
+// date: 2009/03/15 20:44:07
+?>
+<h1>Latest Banks</h1>
+<div class="home_instrument">
+<ul>
+ <li><strong>Name</strong></li>
+ <li><strong>Owner</strong></li>
+ <li><strong>Type</strong></li>
+</ul>
+</div>
+
+<?php foreach ($banks as $bank): ?>
+<div class="home_instrument">
+<ul>
+ <li><?php echo link_to($bank->getName(), '@bank?id='.$bank->getId()) ?></li>
+ <li><?php echo $bank->getOwner() ?></li>
+ <li><?php echo $bank->getSoftware() ?></li>
+</ul>
+</div>
+<?php endforeach; ?>
+
+<?php echo link_to ('create', 'bank/create') ?>
34 apps/frontend/modules/bank/templates/showSuccess.php
@@ -0,0 +1,34 @@
+<?php
+// auto-generated by sfPropelCrud
+// date: 2009/03/15 20:44:07
+
+ if ($sf_user->getSubscriber() == $bank->getOwner()) {
+ echo link_to('[Edit Bank]', 'bank/edit?id='.$bank->getId());
+ }
+?>
+<h1><?=$bank->getName()?></h1>
+<h5>Owner: <?php echo $bank->getOwner() ?></h5>
+<br />
+
+<hr />
+<? use_helper('Form'); ?>
+
+<?php echo form_tag('instrument/export') ?>
+<?php echo input_hidden_tag('bank',$bank->getId()); ?>
+<?php echo submit_tag(' Export to SAV '); ?>
+<hr />
+<br />
+
+<h2>Instruments in <?=$bank->getName()?></h2>
+<div class="home_instrument">
+<ul>
+ <li><strong>Name</strong></li>
+ <li><strong>Type</strong></li>
+ <li><strong>Author</strong></li>
+</ul>
+</div>
+<? foreach ($instruments as $instrument): ?>
+ <? echo include_partial('instrument/instrument_list', array('instrument' => $instrument)) ?>
+<? endforeach; ?>
+
+<hr />
0  apps/frontend/modules/default/templates/disabledSuccess.php
No changes.
1  apps/frontend/modules/default/templates/error404Success.php
@@ -0,0 +1 @@
+<h1>404</h1>
2  apps/frontend/modules/default/templates/loginSuccess.php
@@ -0,0 +1,2 @@
+<h1>Login Required</h1>
+<?php echo include_partial('user/login') ?>
1  apps/frontend/modules/default/templates/secureSuccess.php
@@ -0,0 +1 @@
+<h1>Secure page</h1>
0  apps/frontend/modules/default/templates/unavailableSuccess.php
No changes.
93 apps/frontend/modules/feed/actions/actions.class.php
@@ -0,0 +1,93 @@
+<?php
+
+/**
+ * feed actions.
+ *
+ * @package lsdjie
+ * @subpackage feed
+ * @author Your name here
+ * @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
+ */
+class feedActions extends sfActions
+{
+ /**
+ * Executes index action
+ *
+ */
+ public function executeIndex()
+ {
+ $this->forward('default', 'module');
+ }
+public function executeNew() {
+ // instruments
+ $c = new Criteria();
+ $c->setLimit(sfConfig::get('app_feed_max'));
+ $c->add(InstrumentPeer::SHARE, '1');
+ $c->addDescendingOrderByColumn(InstrumentPeer::UPDATED_AT);
+ $instruments = InstrumentPeer::doSelect($c);
+
+ $feed = sfFeed::newInstance('rss201rev2');
+
+ // channel
+ $feed->setTitle('New instruments on lsdjie');
+ $feed->setLink('@homepage');
+ $feed->setDescription('Latest instruments on LSDJIE.');
+
+ // items
+ $feed->setFeedItemsRouteName('@instrumentFeed');
+ $feed->setItems($instruments);
+
+ $this->feed = $feed;
+}
+
+public function executeUser() {
+ // instruments
+ $c = new Criteria();
+ $c->setLimit(sfConfig::get('app_feed_max'));
+ $USER = $this->getRequestParameter('username');
+ $c1 = $c->getNewCriterion(InstrumentPeer::OWNER, $USER);
+ $c2 = $c->getNewCriterion(InstrumentPeer::AUTHOR, $USER);
+ $c1->addOr($c2);
+ $c->add($c1);
+ $c->addAnd(InstrumentPeer::SHARE, '1');
+ $c->addDescendingOrderByColumn(InstrumentPeer::UPDATED_AT);
+ $instruments = InstrumentPeer::doSelect($c);
+
+ $feed = sfFeed::newInstance('rss201rev2');
+
+ // channel
+ $feed->setTitle($USER. '\'s Instrument Patches');
+ $feed->setLink('@homepage');
+ $feed->setDescription($USER. '\'s Latest contributions to the patch book.');
+
+ // items
+ $feed->setFeedItemsRouteName('@instrumentFeed');
+ $feed->setItems($instruments);
+
+ $this->feed = $feed;
+}
+
+public function executePopular()
+{
+ // instruments
+ $c = new Criteria();
+ $c->setLimit(sfConfig::get('app_feed_max'));
+ $c->add(InstrumentPeer::SHARE, '1');
+ $c->addDescendingOrderByColumn(InstrumentPeer::POPULARITY);
+ $instruments = InstrumentPeer::doSelect($c);
+
+ $feed = sfFeed::newInstance('rss201rev2');
+
+ // channel
+ $feed->setTitle('Popular instruments on lsdjie');
+ $feed->setLink('@homepage');
+ $feed->setDescription('Most popular instruments on LSDJIE.');
+
+ // items
+ $feed->setFeedItemsRouteName('@instrument');
+ $feed->setItems($instruments);
+
+ $this->feed = $feed;
+}
+
+}
3  apps/frontend/modules/feed/config/view.yml
@@ -0,0 +1,3 @@
+all:
+ has_layout: off
+ template: feed
1  apps/frontend/modules/feed/templates/feedSuccess.php
@@ -0,0 +1 @@
+<?php echo $feed->getFeed() ?>
0  apps/frontend/modules/feed/templates/indexSuccess.php
No changes.
394 apps/frontend/modules/instrument/actions/actions.class.php
@@ -0,0 +1,394 @@
+<?php
+// auto-generated by sfPropelCrud
+// date: 2009/01/25 05:42:40
+?>
+<?php
+
+/**
+ * instrument actions.
+ *
+ * @package lsdjie
+ * @subpackage instrument
+ * @author Josue Perez
+ * @version SVN: $Id: actions.class.php 3335 2007-01-23 16:19:56Z fabien $
+ */
+class instrumentActions extends sfActions
+{
+
+public function executeSearch ()
+{
+ if ($this->getRequestParameter('search'))
+ {
+ $this->instruments = InstrumentPeer::search($this->getRequestParameter('search'), $this->getRequestParameter('search_all', false), ($this->getRequestParameter('page', 1) - 1) * sfConfig::get('app_search_results_max'), sfConfig::get('app_search_results_max'));
+ }
+ else
+ {
+ $this->redirect('@homepage');
+ }
+}
+ public function executeIndex()
+ {
+ return $this->forward('instrument', 'list');
+ }
+public function executeList ()
+{
+ $this->getResponse()->setTitle(sfConfig::get('app_tag') . " Patch Book");
+ $this->instrument_pager = InstrumentPeer::getHomepagePager($this->getRequestParameter('page', 1));
+}
+ public function executeShow()
+ {
+ $this->instrument = InstrumentPeer::retrieveByName($this->getRequestParameter('name'),$this->getRequestParameter('author'));
+ if ($this->instrument->getSoftware() != sfConfig::get('app_tag')) $this->forward404();
+ $this->forward404Unless($this->instrument);
+ $this->getResponse()->setTitle("Patch Book - ". $this->instrument->getAuthor() . " - " . $this->instrument->getName());
+ }
+
+ public function executeCreate()
+ {
+ $this->instrument = new Instrument();
+ $this->setTemplate('edit');
+ }
+
+ public function executeEdit()
+ {
+ $this->instrument = InstrumentPeer::retrieveByPk($this->getRequestParameter('id'));
+ $this->forward404Unless($this->instrument);
+ }
+
+ public function executeUpdate()
+ {
+ if (!$this->getRequestParameter('id'))
+ {
+ $instrument = new Instrument();
+ }
+ else
+ {
+ $instrument = InstrumentPeer::retrieveByPk($this->getRequestParameter('id'));
+ $this->forward404Unless($instrument);
+ }
+
+ if ($instrument->getAuthor() == '') {
+ $_editing = false;
+ } else {
+ $_editing = true;
+ $_validUser = ($this->getUser()->getSubscriberId() == $instrument->getOwner() || $this->getUser()->getSubscriberId() == $instrument->getAuthor())? true:false;
+ }
+
+ if ($_editing == false || ($_editing == true && $_validUser == true)) {
+ $instrument->setSoftware(sfConfig::get('app_tag'));
+ $instrument->setId($this->getRequestParameter('id'));
+ $instrument->setName($this->getRequestParameter('name'));
+ $instrument->setType($this->getRequestParameter('type'));
+ $instrument->setAuthor($this->getRequestParameter('author'));
+ $instrument->setDescription($this->getRequestParameter('description'));
+
+ switch (sfConfig::get('app_tag')) {
+ case "FamiTracker":
+ $OB = editInstrument::FamiTracker($this);
+ break;
+ default:
+ $OB = editInstrument::LSDJ($this);
+ }
+
+ $instrument->setObject(serialize($OB));
+ $instrument->setOwner($this->getUser()->getSubscriber());
+ if ($instrument->getAuthor() == $instrument->getUser()) $instrument->setShare($this->getRequestParameter('share'));
+ $instrument->save();
+ }
+
+ return $this->redirect("@instrument?author=".$instrument->getAuthorStrip()."&name=".$instrument->getStripped());
+ }
+
+ public function executeDelete()
+ {
+ $instrument = InstrumentPeer::retrieveByPk($this->getRequestParameter('id'));
+
+ $this->forward404Unless($instrument);
+
+ $instrument->delete();
+
+ return $this->redirect('instrument/list');
+ }
+
+ public function executeType() {
+ $this->instrument_pager = InstrumentPeer::getByType($this->getRequestParameter('type'),$this->getRequestParameter('page'));
+ $this->forward404Unless($this->instrument_pager);
+
+ $this->setTemplate('list');
+ }
+
+public function executePostComment() {
+ $this->instrument = InstrumentPeer::retrieveByPk($this->getRequestParameter('instrument_id'));
+ $this->forward404Unless($this->instrument);
+
+ $comment = new Comment();
+ $comment->setInstrumentId($this->getRequestParameter('instrument_id'));
+ $comment->setAuthor($this->getUser()->getSubscriber());
+ $comment->setComment($this->getRequestParameter('comment'));
+ $comment->save();
+
+ return $this->redirect($this->getRequestParameter('referer'));
+}
+
+public function executePopular()
+{
+ $this->instrument_pager = InstrumentPeer::getPopularPager($this->getRequestParameter('page', 1));
+}
+
+public function handleErrorUpdate()
+{
+ $this->forward('instrument','create');
+ return sfView::SUCCESS;
+}
+
+public function handleErrorUpload()
+{
+ $this->forward('instrument','show');
+ return sfView::SUCCESS;
+}
+
+public function executeUpload() {
+ $this->instrument = InstrumentPeer::retrieveByPk($this->getRequestParameter('instrument_id'));
+ $this->forward404Unless($this->instrument);
+ $fileName = md5($this->getRequest()->getFileName('file').time()).".mp3";
+
+ $this->instrument->setSample($fileName);
+
+ $this->getRequest()->moveFile('file', sfConfig::get('sf_upload_dir').'/'.$fileName);
+ $this->instrument->save();
+
+ $this->setTemplate('show');
+ return $this->redirect($_SERVER['HTTP_REFERER']);
+}
+
+public function executeILike() {
+ $this->instrument = InstrumentPeer::retrieveByPk($this->getRequestParameter('instrument_id'));
+ $this->forward404Unless($this->instrument);
+
+ InstrumentPeer::addLike($this->instrument);
+
+ return $this->redirect($_SERVER['HTTP_REFERER']);
+}
+
+public function executeImport() {
+ if ($this->getRequest()->getMethod() != sfRequest::POST) {
+ // display the form
+ return sfView::SUCCESS;
+ } else {
+ exec("/var/www/lsdj-patches/web/bin/lsdj2xml {$_FILES['file']['tmp_name']}", $lsdj2xml);
+ $xml = implode($lsdj2xml);
+ $this->xml = myTools::Xml2Array($xml);
+ }
+}
+
+public function executeExport() {
+/* LSDJ SAV Binary Data
+
+ type envelope synth/pu2_tune length shape/sweep vib_type/automate table output/duty_cycle/pu_fine
+ Pulse/Noise:
+ 0 ffffffa8 0 0 ffffffff 0 0 3 0 0 ffffffd0 0 0 0 fffffff3 0
+
+ type volume synth/repeat x x vib_type/automate table output x play x x x x length/speed
+ Wave:
+ 1 a8 07 0 ffffffff 0 0 3 0 0 ffffffd0 0 0 0 ffffff80 0
+
+ wave filter q dist phase start_vol cutoff phase vshift end_vol cutoff phase vshift
+ Synth:
+ 0 1 5 0 0 10 ffffffff 0 0 10 ffffffff 0 0 0 0 0
+*/
+
+ $this->bank = BankPeer::retrieveByPk($this->getRequestParameter('bank'));
+
+ $this->forward404Unless($this->bank);
+
+ $aType = array("PULSE","WAVE","KIT","NOISE");
+ $aVib_type = array("HF","","SAW","","TRI","","SQR");
+ $aOutput = array("--","L-","-R","LR");
+ $aWave = array(0 => "12.5", 4 => "25", 8 => "50", "C" => "75");
+ $aVol = array("00", "20", "40", "A8");
+ $aPlay = array("ONCE","LOOP","PINGPONG","MANUAL");
+ $aWAV = array("SAW","SQR","TRI");
+ $aFilter = array("LOWP","HIGHP","BANDP","ALLP");
+ $aDist = array("CLIP","WRAP");
+ $aPhase = array("NORMAL","RESYNC","RESYN2");
+ $aFX = array(1=>"A",2=>"C",4=>"E",5=>"F",6=>"G",7=>"H",8=>"K",'a'=>"L",'b'=>"M",'c'=>"P",'d'=>"R",'e'=>"S",'f'=>"T",10=>"V",11=>"W");
+
+ $this->data = ''; // instrument data output
+ $this->softsynth = array(); // synth data ouput
+ $this->tables = array();
+
+ $this->instruments = $this->bank->getInstruments();
+
+ foreach ($this->instruments as $ins) {
+ $instrument = unserialize($ins->getObject());
+ $type = array_keys($aType, $ins->getType());
+ $pos = array();
+
+ $vib_type = ($ins->getType() == "PULSE") ? array_keys($aVib_type, $instrument->vib_type) : array(0); // bug with Noise's automate?
+ $vib_type_automate = ($instrument->automate == "ON")? $vib_type[0] * 2 : $vib_type[0];
+ $table = ($instrument->table == "ON") ? dechex(count($this->tables)+0x20) : '00';
+ $output = array_keys($aOutput, $instrument->output);
+
+ if ($ins->getType() == "PULSE") {
+ $pos[] = "0".$type[0];
+ $pos[] = $instrument->envelope;
+ $pos[] = $instrument->pu2_tune;
+ $pos[] = XML2LSDJ::length($instrument->length);
+ $pos[] = $instrument->sweep;
+ $pos[] = "0".$vib_type_automate;
+ $pos[] = $table;
+
+ $wave1 = '';
+ $wave = array_keys($aWave, $instrument->wave);
+ $wave1 = ($wave[0] != "0")? $wave[0] : '';
+ $output_wave = $wave1 . $output[0];
+ $pu_fine = (hexdec($instrument->pu_fine) * 4);
+
+ $pos[] = str_pad(dechex((hexdec($output_wave) + $pu_fine)), 2, "0", STR_PAD_LEFT);
+ $pos[] = "00 00 d0 00 00 00 f3 00 ";
+
+ } elseif ($ins->getType() == "NOISE") {
+ $pos[] = "0".$type[0];
+ $pos[] = $instrument->envelope;
+ $pos[] = "00";
+ $pos[] = XML2LSDJ::length($instrument->length);
+ $pos[] = $instrument->shape;
+ $pos[] = "0".$vib_type_automate;
+ $pos[] = $table;
+ $pos[] = "0".$output[0];
+ $pos[] = "00 00 d0 00 00 00 f3 00 ";
+
+ } elseif ($ins->getType() == "WAVE" && (count($this->softsynth) < 17)) {
+ $pos[] = "0".$type[0];
+ $pos[] = $aVol[$instrument->volume];
+
+ $synth = str_pad(dechex(count($this->softsynth)), 2, "0", STR_PAD_LEFT);
+
+ $pos[] = $synth . $instrument->repeat;
+ $pos[] = "00";
+ $pos[] = "FF";
+ $pos[] = "0".$vib_type_automate;
+ $pos[] = $table;
+ $pos[] = "0".$output[0];
+ $pos[] = "00";
+ $play = array_keys($aPlay, $instrument->play);
+ $pos[] = "0".$play[0];
+ $pos[] = "d0 00 00 00";
+ $length = $instrument->length;
+ $speed = ($instrument->speed > 0) ? ($instrument->speed - 1) : 0;
+ $pos[] = $length . $speed;
+ $pos[] = "00";
+
+ // soft synth params.
+ $this->softsynth[$synth] = '';
+
+ $wav = array_keys($aWAV, $instrument->s_wave);
+ $filter = array_keys($aFilter, $instrument->s_filter);
+ $dist = array_keys($aDist, $instrument->s_dist);
+ $phase = array_keys($aPhase, $instrument->s_phase);
+
+ $this->softsynth[$synth] .= '0'.$wav[0] .' '
+ . '0'.$filter[0] .' '
+ . '0'.$instrument->s_q .' '
+ . '0'.$dist[0] .' '
+ . '0'.$phase[0] .' '
+ . $instrument->s_start_volume .' '
+ . $instrument->s_start_cutoff .' '
+ . $instrument->s_start_phase .' '
+ . $instrument->s_start_vshift .' '
+ . $instrument->s_end_volume .' '
+ . $instrument->s_end_cutoff .' '
+ . $instrument->s_end_phase .' '
+ . $instrument->s_end_vshift .' 00 00 00';
+ }
+
+ if ($instrument->table == "ON") { // tables here.
+ foreach ($instrument->_table as $_table) { // loop through all rows
+ @$this->tables['vol'][$table] .= $_table[0] .' ';
+ @$this->tables['tsp'][$table] .= $_table[1] .' ';
+
+ $fx = array_keys($aFX, substr($_table[2], 0, 1));
+ $fx2 = array_keys($aFX, substr($_table[3], 0, 1));
+
+ @$this->tables['fx'][$table] .= str_pad($fx[0], 2, "0", STR_PAD_LEFT) .' ';
+ @$this->tables['fxval'][$table] .= substr($_table[2], 1, 2) .' ';
+ @$this->tables['fx2'][$table] .= str_pad($fx2[0], 2, "0", STR_PAD_LEFT) .' ';
+ @$this->tables['fxval2'][$table] .= substr($_table[3], 1, 2) .' ';
+ }
+ }
+
+ foreach ($pos as $item) {
+ $this->data .= $item . " ";
+ }
+ }
+
+ for ($i = count($this->instruments); $i < 64; $i++) { // default instrument filler data;
+ $this->data .= "00 a8 00 00 ff 00 00 03 00 00 d0 00 00 00 f3 00 ";
+ }
+
+ for ($i = count($this->softsynth); $i < 16; $i++) { // default synth filler data;
+ $this->softsynth[] = "00 00 00 00 00 10 FF 00 00 10 FF 00 00 00 00 00";
+ }
+
+ $this->data = strtolower($this->data); // lowercase everything, why? I have no clue...
+
+
+
+ // encode to binary
+ $this->data = XML2LSDJ::hex2bin($this->data);
+ $this->softsynth = XML2LSDJ::hex2bin(implode($this->softsynth));
+ $this->table_vol = XML2LSDJ::hex2bin(str_pad(implode($this->tables['vol']), 1536, "00 ", STR_PAD_RIGHT));
+ $this->table_tsp = XML2LSDJ::hex2bin(str_pad(implode($this->tables['tsp']), 1536, "00 ", STR_PAD_RIGHT));
+ $this->table_fx = XML2LSDJ::hex2bin(str_pad(implode($this->tables['fx']), 1536, "00 ", STR_PAD_RIGHT));
+ $this->table_fxval = XML2LSDJ::hex2bin(str_pad(implode($this->tables['fxval']), 1536, "00 ", STR_PAD_RIGHT));
+ $this->table_fx2 = XML2LSDJ::hex2bin(str_pad(implode($this->tables['fx2']), 1536, "00 ", STR_PAD_RIGHT));
+ $this->table_fxval2 = XML2LSDJ::hex2bin(str_pad(implode($this->tables['fxval2']), 1536, "00 ", STR_PAD_RIGHT));
+
+
+ // file read
+ $this->filename = "/var/www/lsdj-patches/web/bin/blank.sav";
+ $fh = fopen($this->filename, "rb");
+ $whole = fread($fh, filesize($this->filename));
+ fclose($fh);
+
+ $fh = tmpfile();
+
+ fseek($fh, 0x0000);
+ fwrite($fh, $whole);
+
+ fseek($fh, 0x3080);
+ fwrite($fh, $this->data);
+
+ fseek($fh, 0x3EB2);
+ fwrite($fh, $this->softsynth);
+
+ fseek($fh, 0x1690);
+ fwrite($fh, $this->table_vol);
+
+ fseek($fh, 0x3480);
+ fwrite($fh, $this->table_tsp);
+
+ fseek($fh, 0x3680);
+ fwrite($fh, $this->table_fx);
+
+ fseek($fh, 0x3880);
+ fwrite($fh, $this->table_fxval);
+
+ fseek($fh, 0x3A80);
+ fwrite($fh, $this->table_fx2);
+
+ fseek($fh, 0x3C80);
+ fwrite($fh, $this->table_fxval2);
+
+ $this->sav = fread($fh, 131072); // output
+
+ fclose($fh);
+
+ $this->setLayout(false);
+ $this->getResponse()->setContentType('application/octet-stream');
+ $this->getResponse()->addHttpMeta('Accept-Ranges: bytes');
+ $this->getResponse()->addHttpMeta('Content-Transfer-Encoding: binary');
+ $this->getResponse()->addHttpMeta('Content-Length: 131072');
+}
+
+}
10 apps/frontend/modules/instrument/config/security.yml
@@ -0,0 +1,10 @@
+edit:
+ is_secure: on
+ credentials: subscriber
+
+create:
+ is_secure: on
+ credentials: subscriber
+
+all:
+ is_secure: off
28 apps/frontend/modules/instrument/templates/_FamiTracker.php
@@ -0,0 +1,28 @@
+<?php $FT = unserialize($instrument->getObject());
+
+function is_checked($data) {
+ if ($data) {
+ return array("checked"=>"checked");
+ }
+}
+?>
+<div id="FamiTracker">
+
+ <div id="instrument_settings">
+ <h3>Instrument Settings</h3>
+ <?php echo checkbox_tag("volume",$FT->volume,"",is_checked($FT->volume)); ?> <a href="javascript:;" onclick="FT_Edit('volume')">Volume</a><br />