Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial import

  • Loading branch information...
commit 6406c24c034fc91e435cb876c8c1f51d3a7d724f 0 parents
@lux authored
Showing with 23,179 additions and 0 deletions.
  1. +49 −0 .htaccess
  2. +33 −0 README
  3. +3 −0  TODO
  4. 0  cache/DO NOT DELETE THIS FILE
  5. 0  cache/pages/DO NOT DELETE THIS FILE
  6. 0  cache/templates/DO NOT DELETE THIS FILE
  7. 0  cache/templates/application/DO NOT DELETE THIS FILE
  8. 0  cache/templates/session/DO NOT DELETE THIS FILE
  9. +25 −0 docs/CREDITS
  10. +81 −0 docs/INSTALL
  11. +4 −0 docs/KNOWN ISSUES
  12. +340 −0 docs/LICENSE
  13. +73 −0 docs/REQUIREMENTS
  14. +5 −0 inc/app/appdoc/boxes/access.php
  15. +58 −0 inc/app/appdoc/boxes/apigen/index.php
  16. +3 −0  inc/app/appdoc/boxes/apigen/saf/access.php
  17. +78 −0 inc/app/appdoc/boxes/apigen/saf/index.php
  18. +8 −0 inc/app/appdoc/boxes/apigen/saf/settings.php
  19. +14 −0 inc/app/appdoc/boxes/apigen/settings.php
  20. +54 −0 inc/app/appdoc/boxes/appinfo/index.php
  21. +14 −0 inc/app/appdoc/boxes/appinfo/settings.php
  22. +67 −0 inc/app/appdoc/boxes/boxviewer/index.php
  23. +20 −0 inc/app/appdoc/boxes/boxviewer/settings.php
  24. +67 −0 inc/app/appdoc/boxes/formviewer/index.php
  25. +20 −0 inc/app/appdoc/boxes/formviewer/settings.php
  26. +64 −0 inc/app/appdoc/boxes/helpdoc/add/index.php
  27. +91 −0 inc/app/appdoc/boxes/helpdoc/add/language/index.php
  28. +32 −0 inc/app/appdoc/boxes/helpdoc/delete/index.php
  29. +91 −0 inc/app/appdoc/boxes/helpdoc/edit/index.php
  30. +57 −0 inc/app/appdoc/boxes/helpdoc/index.php
  31. +4 −0 inc/app/appdoc/boxes/index/access.php
  32. +73 −0 inc/app/appdoc/boxes/index/index.php
  33. +8 −0 inc/app/appdoc/boxes/index/settings.php
  34. +85 −0 inc/app/appdoc/boxes/translation/build/index.php
  35. +38 −0 inc/app/appdoc/boxes/translation/delete/index.php
  36. +52 −0 inc/app/appdoc/boxes/translation/index.php
  37. +95 −0 inc/app/appdoc/boxes/translation/strings/index.php
  38. +17 −0 inc/app/appdoc/conf/config.ini.php
  39. +36 −0 inc/app/appdoc/conf/properties.php
  40. +19 −0 inc/app/appdoc/docs/en/001-about.html
  41. +5 −0 inc/app/appdoc/forms/access.php
  42. +93 −0 inc/app/appdoc/forms/translation/add/index.php
  43. +47 −0 inc/app/appdoc/forms/translation/add/settings.php
  44. +93 −0 inc/app/appdoc/forms/translation/edit/index.php
  45. +50 −0 inc/app/appdoc/forms/translation/edit/settings.php
  46. +55 −0 inc/app/appdoc/html/appdoc.spt
  47. +15 −0 inc/app/appdoc/html/box-list.spt
  48. +91 −0 inc/app/appdoc/html/boxviewer.spt
  49. +15 −0 inc/app/appdoc/html/form-list.spt
  50. +87 −0 inc/app/appdoc/html/formviewer.spt
  51. +54 −0 inc/app/appdoc/html/helpdoc.spt
  52. +63 −0 inc/app/appdoc/html/translation.spt
  53. +12 −0 inc/app/appdoc/html/translation_noindex.spt
  54. +52 −0 inc/app/appdoc/html/translation_strings.spt
  55. +116 −0 inc/app/appdoc/lib/functions.php
  56. BIN  inc/app/appdoc/pix/icon.gif
  57. +3 −0  inc/app/boxchooser/boxes/access.php
  58. +3 −0  inc/app/boxchooser/boxes/boxselect/access.php
  59. +99 −0 inc/app/boxchooser/boxes/boxselect/index.php
  60. +4 −0 inc/app/boxchooser/boxes/folder/access.php
  61. +63 −0 inc/app/boxchooser/boxes/folder/index.php
  62. +3 −0  inc/app/boxchooser/boxes/index/access.php
  63. +130 −0 inc/app/boxchooser/boxes/index/index.php
  64. +5 −0 inc/app/boxchooser/boxes/js/index.php
  65. +4 −0 inc/app/boxchooser/boxes/new/access.php
  66. +71 −0 inc/app/boxchooser/boxes/new/index.php
  67. +3 −0  inc/app/boxchooser/boxes/select/access.php
  68. +52 −0 inc/app/boxchooser/boxes/select/index.php
  69. +3 −0  inc/app/boxchooser/boxes/step3/access.php
  70. +63 −0 inc/app/boxchooser/boxes/step3/index.php
  71. +8 −0 inc/app/boxchooser/conf/config.ini.php
  72. +4 −0 inc/app/boxchooser/forms/access.php
  73. +4 −0 inc/app/boxchooser/forms/settings/access.php
  74. +65 −0 inc/app/boxchooser/forms/settings/index.php
  75. +6 −0 inc/app/boxchooser/forms/settings/settings.php
  76. +13 −0 inc/app/boxchooser/forms/test/index.php
  77. +10 −0 inc/app/boxchooser/forms/test/settings.php
  78. +124 −0 inc/app/boxchooser/html/boxselect.spt
  79. +116 −0 inc/app/boxchooser/html/folder.spt
  80. +116 −0 inc/app/boxchooser/html/index.spt
  81. +66 −0 inc/app/boxchooser/html/js.spt
  82. +120 −0 inc/app/boxchooser/html/new.spt
  83. +139 −0 inc/app/boxchooser/html/select.spt
  84. +127 −0 inc/app/boxchooser/html/step3.spt
  85. +139 −0 inc/app/boxchooser/lib/Widget/Boxchooser.php
  86. +172 −0 inc/app/boxchooser/lib/Widget/Filechooser.php
  87. BIN  inc/app/boxchooser/pix/folder.gif
  88. BIN  inc/app/boxchooser/pix/image.gif
  89. +5 −0 inc/app/cms/boxes/access.php
  90. +63 −0 inc/app/cms/boxes/admintools/icons/index.php
  91. +60 −0 inc/app/cms/boxes/admintools/index.php
  92. +71 −0 inc/app/cms/boxes/admintools/uninstalled/index.php
  93. +5 −0 inc/app/cms/boxes/autosave/access.php
  94. +20 −0 inc/app/cms/boxes/autosave/clear/index.php
  95. +14 −0 inc/app/cms/boxes/autosave/drafts/index.php
  96. +9 −0 inc/app/cms/boxes/autosave/index.php
  97. +19 −0 inc/app/cms/boxes/bookmarks/add/index.php
  98. +17 −0 inc/app/cms/boxes/bookmarks/button/index.php
  99. +12 −0 inc/app/cms/boxes/bookmarks/delete/index.php
  100. +15 −0 inc/app/cms/boxes/bookmarks/index.php
  101. +296 −0 inc/app/cms/boxes/browse/index.php
  102. +2 −0  inc/app/cms/boxes/buttons/access.php
  103. +33 −0 inc/app/cms/boxes/buttons/add/index.php
  104. +18 −0 inc/app/cms/boxes/buttons/delete/index.php
  105. +16 −0 inc/app/cms/boxes/buttons/edit/index.php
  106. +12 −0 inc/app/cms/boxes/buttons/home/index.php
  107. +280 −0 inc/app/cms/boxes/buttons/index.php
  108. +12 −0 inc/app/cms/boxes/buttons/logout/index.php
  109. +58 −0 inc/app/cms/boxes/cpanel/index.php
  110. +84 −0 inc/app/cms/boxes/delete/index.php
  111. +120 −0 inc/app/cms/boxes/deleted/items/index.php
  112. +23 −0 inc/app/cms/boxes/deleted/restore/index.php
  113. +282 −0 inc/app/cms/boxes/edit/index.php
  114. +28 −0 inc/app/cms/boxes/edit/save/index.php
  115. +4 −0 inc/app/cms/boxes/filesystem/access.php
  116. +204 −0 inc/app/cms/boxes/filesystem/index.php
  117. +3 −0  inc/app/cms/boxes/filesystem/rest/access.php
  118. +783 −0 inc/app/cms/boxes/filesystem/rest/index.php
  119. +3 −0  inc/app/cms/boxes/filesystem/rss/access.php
  120. +59 −0 inc/app/cms/boxes/filesystem/rss/index.php
  121. +14 −0 inc/app/cms/boxes/filesystem/settings.php
  122. +26 −0 inc/app/cms/boxes/folder/add/index.php
  123. +27 −0 inc/app/cms/boxes/folder/remove/index.php
  124. +97 −0 inc/app/cms/boxes/history/compare/index.php
  125. +149 −0 inc/app/cms/boxes/history/diff/index.php
  126. +76 −0 inc/app/cms/boxes/history/index.php
  127. +27 −0 inc/app/cms/boxes/history/restore/index.php
  128. +70 −0 inc/app/cms/boxes/history/view/index.php
  129. +4 −0 inc/app/cms/boxes/index/access.php
  130. +72 −0 inc/app/cms/boxes/index/index.php
  131. +19 −0 inc/app/cms/boxes/keywords/add/index.php
  132. +19 −0 inc/app/cms/boxes/keywords/delete/index.php
  133. +27 −0 inc/app/cms/boxes/keywords/index.php
  134. +4 −0 inc/app/cms/boxes/login/access.php
  135. +134 −0 inc/app/cms/boxes/login/index.php
  136. +40 −0 inc/app/cms/boxes/messages/attachment/index.php
  137. +14 −0 inc/app/cms/boxes/messages/category/delete/index.php
  138. +109 −0 inc/app/cms/boxes/messages/category/index.php
  139. +18 −0 inc/app/cms/boxes/messages/category/set/index.php
  140. +75 −0 inc/app/cms/boxes/messages/compose/index.php
  141. +14 −0 inc/app/cms/boxes/messages/delete/index.php
  142. +40 −0 inc/app/cms/boxes/messages/inbox/index.php
  143. +31 −0 inc/app/cms/boxes/messages/index.php
  144. +139 −0 inc/app/cms/boxes/messages/settings/index.php
  145. +90 −0 inc/app/cms/boxes/messages/view/index.php
  146. +286 −0 inc/app/cms/boxes/nav/index.php
  147. +4 −0 inc/app/cms/boxes/passrecover/access.php
  148. +92 −0 inc/app/cms/boxes/passrecover/index.php
  149. +55 −0 inc/app/cms/boxes/selector/add/index.php
  150. +36 −0 inc/app/cms/boxes/selector/remove/index.php
  151. +2 −0  inc/app/cms/boxes/services/cacheclear/access.php
  152. +8 −0 inc/app/cms/boxes/services/cacheclear/index.php
  153. +8 −0 inc/app/cms/boxes/services/cacheclear/service.php
  154. +2 −0  inc/app/cms/boxes/services/cacheunlink/access.php
  155. +11 −0 inc/app/cms/boxes/services/cacheunlink/index.php
  156. +8 −0 inc/app/cms/boxes/services/cacheunlink/service.php
  157. +2 −0  inc/app/cms/boxes/services/log/access.php
  158. +35 −0 inc/app/cms/boxes/services/log/index.php
  159. +8 −0 inc/app/cms/boxes/services/log/service.php
  160. +2 −0  inc/app/cms/boxes/services/menucache/access.php
  161. +7 −0 inc/app/cms/boxes/services/menucache/index.php
  162. +8 −0 inc/app/cms/boxes/services/menucache/service.php
  163. +3 −0  inc/app/cms/boxes/services/movechildren/access.php
  164. +34 −0 inc/app/cms/boxes/services/movechildren/index.php
  165. +8 −0 inc/app/cms/boxes/services/movechildren/service.php
  166. +85 −0 inc/app/cms/boxes/services/notice/index.php
  167. +8 −0 inc/app/cms/boxes/services/notice/service.php
  168. +2 −0  inc/app/cms/boxes/services/phonehome/access.php
  169. +11 −0 inc/app/cms/boxes/services/phonehome/index.php
  170. +8 −0 inc/app/cms/boxes/services/phonehome/service.php
  171. +3 −0  inc/app/cms/boxes/services/updatelinks/access.php
  172. +71 −0 inc/app/cms/boxes/services/updatelinks/index.php
  173. +8 −0 inc/app/cms/boxes/services/updatelinks/service.php
  174. +31 −0 inc/app/cms/boxes/sidebar/down/index.php
  175. +13 −0 inc/app/cms/boxes/sidebar/position/add/index.php
  176. +13 −0 inc/app/cms/boxes/sidebar/position/delete/index.php
  177. +31 −0 inc/app/cms/boxes/sidebar/up/index.php
  178. +3 −0  inc/app/cms/boxes/templatepreview/access.php
  179. +21 −0 inc/app/cms/boxes/templatepreview/index.php
  180. +4 −0 inc/app/cms/boxes/top/access.php
  181. +72 −0 inc/app/cms/boxes/top/index.php
  182. +21 −0 inc/app/cms/boxes/unlock/index.php
  183. +150 −0 inc/app/cms/boxes/user/preferences/index.php
  184. +30 −0 inc/app/cms/boxes/user/preferences/level/index.php
  185. +46 −0 inc/app/cms/boxes/user/vcard/index.php
  186. +22 −0 inc/app/cms/boxes/user/view/index.php
  187. +122 −0 inc/app/cms/conf/collections/sitellite_filesystem.php
  188. +97 −0 inc/app/cms/conf/collections/sitellite_form_submission.php
  189. +89 −0 inc/app/cms/conf/collections/sitellite_homepage.php
  190. +135 −0 inc/app/cms/conf/collections/sitellite_news.php
  191. +169 −0 inc/app/cms/conf/collections/sitellite_page.php
  192. +103 −0 inc/app/cms/conf/collections/sitellite_sidebar.php
  193. +21 −0 inc/app/cms/conf/collections/sitellite_translation.php
  194. +31 −0 inc/app/cms/conf/collections/sitellite_undo.php
  195. +13 −0 inc/app/cms/conf/config.ini.php
  196. +205 −0 inc/app/cms/conf/properties.php
  197. +26 −0 inc/app/cms/conf/services/add.php
  198. +20 −0 inc/app/cms/conf/services/delete.php
  199. +32 −0 inc/app/cms/conf/services/edit.php
  200. +20 −0 inc/app/cms/conf/services/error.php
  201. +20 −0 inc/app/cms/conf/services/global.php
  202. +14 −0 inc/app/cms/conf/services/login.php
  203. +14 −0 inc/app/cms/conf/services/pre-delete.php
  204. +3 −0  inc/app/cms/data/.htaccess
  205. +3 −0  inc/app/cms/data/store/.htaccess
  206. +17 −0 inc/app/cms/docs/en/000-resources.html
  207. +11 −0 inc/app/cms/docs/en/001-getting-started.html
  208. +36 −0 inc/app/cms/docs/en/002-overview.html
  209. +74 −0 inc/app/cms/docs/en/003-components.html
  210. +3 −0  inc/app/cms/docs/en/004-configuration.html
  211. +90 −0 inc/app/cms/docs/en/005-database-schema.html
  212. +12 −0 inc/app/cms/docs/en/006-administration.html
  213. +3 −0  inc/app/cms/docs/en/007-privileges.html
  214. +44 −0 inc/app/cms/docs/en/008-web-view.html
  215. +36 −0 inc/app/cms/docs/en/009-control-panel.html
  216. +52 −0 inc/app/cms/docs/en/010-browse.html
  217. +7 −0 inc/app/cms/docs/en/index.html
  218. +5 −0 inc/app/cms/forms/access.php
  219. +148 −0 inc/app/cms/forms/add/index.php
  220. +177 −0 inc/app/cms/forms/add/sitellite_filesystem/index.php
  221. +120 −0 inc/app/cms/forms/add/sitellite_filesystem/settings.php
  222. +369 −0 inc/app/cms/forms/add/sitellite_page/index.php
  223. +288 −0 inc/app/cms/forms/add/sitellite_sidebar/index.php
  224. +194 −0 inc/app/cms/forms/edit/index.php
  225. +247 −0 inc/app/cms/forms/edit/sitellite_filesystem/index.php
  226. +124 −0 inc/app/cms/forms/edit/sitellite_filesystem/settings.php
  227. +415 −0 inc/app/cms/forms/edit/sitellite_page/index.php
  228. +320 −0 inc/app/cms/forms/edit/sitellite_sidebar/index.php
  229. +88 −0 inc/app/cms/forms/editold/index.php
  230. +45 −0 inc/app/cms/forms/extras/index.php
  231. +19 −0 inc/app/cms/forms/messages/category/add/index.php
  232. +18 −0 inc/app/cms/forms/messages/category/add/settings.php
  233. +23 −0 inc/app/cms/forms/messages/category/edit/index.php
  234. +22 −0 inc/app/cms/forms/messages/category/edit/settings.php
  235. +163 −0 inc/app/cms/forms/properties/index.php
  236. +89 −0 inc/app/cms/forms/state/index.php
  237. +5 −0 inc/app/cms/html/admintools.spt
  238. +25 −0 inc/app/cms/html/autosave_drafts.spt
  239. +27 −0 inc/app/cms/html/autosave_login.spt
  240. +26 −0 inc/app/cms/html/bookmark_button.spt
  241. +9 −0 inc/app/cms/html/bookmarks.spt
  242. +100 −0 inc/app/cms/html/browse.spt
  243. +97 −0 inc/app/cms/html/buttons.spt
  244. +10 −0 inc/app/cms/html/buttons/add.spt
  245. +10 −0 inc/app/cms/html/buttons/translator.spt
  246. +44 −0 inc/app/cms/html/deleted_items.spt
  247. +42 −0 inc/app/cms/html/facets.spt
  248. +42 −0 inc/app/cms/html/facets_twocols.spt
  249. +7 −0 inc/app/cms/html/filesystem_list.spt
  250. +44 −0 inc/app/cms/html/filesystem_rss.spt
  251. +50 −0 inc/app/cms/html/history.spt
  252. +107 −0 inc/app/cms/html/keywords.spt
  253. +41 −0 inc/app/cms/html/layout/frames.spt
  254. +157 −0 inc/app/cms/html/layout/panel.spt
  255. +51 −0 inc/app/cms/html/layout/panels.spt
  256. +209 −0 inc/app/cms/html/layout/top.spt
  257. +31 −0 inc/app/cms/html/messages/footer.spt
  258. +37 −0 inc/app/cms/html/messages/inbox.spt
  259. +51 −0 inc/app/cms/html/messages/index.spt
  260. +84 −0 inc/app/cms/html/messages/settings.spt
  261. +65 −0 inc/app/cms/html/messages/view.spt
  262. +3 −0  inc/app/cms/html/page/edit-bottom.spt
  263. +7 −0 inc/app/cms/html/page/edit-middle.spt
  264. +5 −0 inc/app/cms/html/page/edit-middle2.spt
  265. +7 −0 inc/app/cms/html/page/edit-middle3.spt
  266. +259 −0 inc/app/cms/html/page/edit-top.spt
  267. +212 −0 inc/app/cms/html/page/filesystem-top.spt
  268. +244 −0 inc/app/cms/html/page/sidebar-top.spt
  269. +15 −0 inc/app/cms/html/passrecover/email.spt
  270. +17 −0 inc/app/cms/html/passrecover/emailnotfound.spt
  271. +7 −0 inc/app/cms/html/passrecover/message.spt
  272. +27 −0 inc/app/cms/html/passrecover/newpass.spt
  273. +3 −0  inc/app/cms/html/passrecover/sent.spt
  274. +3 −0  inc/app/cms/html/passrecover/updated.spt
  275. +11 −0 inc/app/cms/html/services_notice_pending.spt
  276. +11 −0 inc/app/cms/html/services_notice_rejected.spt
  277. +104 −0 inc/app/cms/html/user/view.spt
  278. +104 −0 inc/app/cms/html/user_preferences_level.spt
  279. +145 −0 inc/app/cms/html/view_compare.spt
  280. +141 −0 inc/app/cms/html/view_diff.spt
  281. +112 −0 inc/app/cms/html/view_revision.spt
  282. +178 −0 inc/app/cms/lib/AppInstaller.php
  283. +40 −0 inc/app/cms/lib/Filters.php
  284. +856 −0 inc/app/cms/lib/Module/Finder.php
  285. +257 −0 inc/app/cms/lib/Module/Module.php
  286. +41 −0 inc/app/cms/lib/Product.php
  287. +766 −0 inc/app/cms/lib/Versioning/Facets.php
  288. +1,075 −0 inc/app/cms/lib/Versioning/Rev.php
  289. +646 −0 inc/app/cms/lib/Versioning/Rex.php
  290. +119 −0 inc/app/cms/lib/Versioning/Source.php
  291. +43 −0 inc/app/cms/lib/Versioning/Source/Blank.php
  292. +285 −0 inc/app/cms/lib/Versioning/Source/Database.php
  293. +574 −0 inc/app/cms/lib/Versioning/Source/Filesystem.php
  294. +201 −0 inc/app/cms/lib/Versioning/Source/NestedSet.php
  295. +21 −0 inc/app/cms/lib/Versioning/Store.php
  296. +28 −0 inc/app/cms/lib/Versioning/Store/Blank.php
  297. +13 −0 inc/app/cms/lib/Versioning/Store/Cvs.php
  298. +625 −0 inc/app/cms/lib/Versioning/Store/Database.php
  299. +14 −0 inc/app/cms/lib/Versioning/Store/Filestore.php
  300. +595 −0 inc/app/cms/lib/Versioning/Streamer.php
Sorry, we could not display the entire diff because too many files (4,697) changed.
49 .htaccess
@@ -0,0 +1,49 @@
+####################################################################
+# Sitellite Content Server
+# http://www.sitellite.org/
+#
+# Copyright (c) 2001-2003 SIMIAN systems Inc.
+#
+# This software is released under the Simian Open License.
+# Please see the accompanying file docs/LICENSE for licensing
+# details!
+####################################################################
+
+# These directives are necessary in order to tell Apache to treat
+# the file 'index' as a PHP script. Avoiding the .php extension
+# has some benefits, as some search engines don't parse .php files.
+# Otherwise, you can simply rename this file with a .php extension
+# and it should work fine with little or no modification.
+
+# Make sure PATH_INFO is available
+<IfDefine APACHE2>
+ AcceptPathInfo On
+</IfDefine>
+
+# Let Apache know that 'index' is really a PHP script in disguise.
+<Files index>
+ ForceType application/x-httpd-php
+</Files>
+
+# Let Apache know that 'sitellite' is also a PHP script in disguise.
+<Files sitellite>
+ ForceType application/x-httpd-php
+</Files>
+
+# Make SCS the directory index handler (instead of index.html or index.php).
+DirectoryIndex index index.html index.php
+
+# Instruct Apache to treat XT templates as HTML files upon direct access.
+# Useful for previewing.
+AddType text/html .tpl
+
+# Short tags are bad.
+php_flag short_open_tag off
+
+<IfModule mod_rewrite.c>
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} -f [OR]
+ RewriteCond %{REQUEST_FILENAME} -d
+ RewriteRule .* - [L]
+ RewriteRule ^(.+)$ index?_rewrite_sticky=$1 [QSA,L]
+</IfModule>
33 README
@@ -0,0 +1,33 @@
+README
+
+Requirements
+
+Please refer to the file docs/REQUIREMENTS for a complete list of client and server
+requirements.
+
+Installation
+
+Please refer to the file docs/INSTALL for complete installation instructions.
+
+Troubleshooting
+
+For troubleshooting information, please refer to http://www.sitellite.org/
+
+Known Issues
+
+Please see the file docs/KNOWN ISSUES for a complete and current list.
+
+License
+
+The Sitellite Content Server is licensed under the GNU General Public License (GPL),
+which can be found in the file docs/LICENSE. Please read the license before using
+this software, as usage does indicate acceptance of the license terms.
+
+Documentation
+
+Documentation for the Sitellite Content Server can be found at
+http://www.sitellite.org/
+
+Documentation for the Sitellite Application Framework can be accessed by
+pointing your browser to:
+http://www.yourTestInstallation.com/index/docreader-app
3  TODO
@@ -0,0 +1,3 @@
+TO DO LIST
+
+See http://www.sitellite.org/index/roadmap for more info.
0  cache/DO NOT DELETE THIS FILE
No changes.
0  cache/pages/DO NOT DELETE THIS FILE
No changes.
0  cache/templates/DO NOT DELETE THIS FILE
No changes.
0  cache/templates/application/DO NOT DELETE THIS FILE
No changes.
0  cache/templates/session/DO NOT DELETE THIS FILE
No changes.
25 docs/CREDITS
@@ -0,0 +1,25 @@
+CREDITS
+
+Various icons used in Sitellite come from or are modifications of the icons of
+the Gnome desktop environment. The Gnome project lives at:
+http://www.gnome.org/
+
+This project also includes PHP libraries from the following sources:
+
+ The PEAR Project, http://pear.php.net/
+ BiffWriter by Christian Novak, http://www.cnovak.com/
+ FPDF by Olivier Plathey, http://www.fpdf.org/
+ Functional by Ian B Kjos, http://functional-php.sourceforge.net/
+ IXR by Incutio Ltd, http://scripts.incutio.com/xmlrpc/
+ Class.Jabber.PHP by Carlo "Gossip" Zottmann, http://phpjabber.g-blog.net/
+ Mp3 id3v1 Class by Luca, http://www.phpclasses.org/
+ Mp3 id3v2 by Daniel Martinez-Morales, http://www.phpclasses.org/
+ NuSOAP by Dietrich Ayala, http://dietrich.ganx4.com/nusoap/
+ phpApplication by nathan@0x00.org, http://0x00.org/php/phpApplication/
+ PHPlot by Afan Ottenheimer, http://www.phplot.com/
+ PHPMailer by Brent R. Matzelle, http://phpmailer.sourceforge.net/
+ phpSniff by Roger Raymond, http://phpsniff.sourceforge.net/
+ TAR File Manager by Josh Barger, http://www.phpclasses.org/
+ Textile by Dean Allen, http://www.textism.com/
+ Midi Class by Valentin Schmidt, http://www.phpclasses.org/
+ The Zend Framework, http://framework.zend.com/
81 docs/INSTALL
@@ -0,0 +1,81 @@
+SITELLITE INSTALLATION NOTES
+
+Please read all of this document so that you are comfortably familiar with the
+installation process. This document is also available online at
+http://www.sitellite.org/
+
+Requirements
+------------
+
+Please refer to the file REQUIREMENTS for a complete and current list.
+
+------------
+Installation
+
+(Note: Upgrading information is below this section)
+
+1. Extract the Sitellite tarball in the base directory of your web site.
+ On Unix, execute the following command on the shell:
+
+tar -zxvf sitellite-4.2.0-stable.tar.gz
+
+ This should create a directory called sitellite-4.2.0-stable. You will
+ have to copy all of the files and folders in this directory into the base
+ directory of your web site. If you have a pre-existing site there already,
+ which we recommend against installing on top of, please be careful you
+ aren't overwriting anything you need.
+
+ To copy these files over from the command line, do the following from in
+ the same directory you just extracted the Sitellite tarball in:
+
+cp sitellite-4.2.0-stable/.htaccess .
+cp -R sitellite-4.2.0-stable/* .
+
+2. Before you can run the web-based installer, you will need to set the
+ Unix file permissions of Sitellite. To do this, enter the following
+ commands:
+
+chmod -R 777 cache
+chmod -R 777 inc/app/cms/conf/services
+chmod -R 777 inc/app/cms/data
+chmod -R 777 inc/conf
+chmod -R 777 inc/data
+chmod -R 777 inc/html
+chmod -R 777 install
+chmod -R 777 pix
+chmod -R 777 inc/app/*/conf
+chmod -R 777 inc/app/*/data
+chmod -R 777 inc/app/*/lang
+chmod 777 inc/app/*
+
+3. Launch the web-based installer by going to the following web site URL:
+
+http://www.yourWebSite.com/install
+
+ Follow the instructions of the installer, and it will guide you through
+ the remainder of the installation process.
+
+4. In order for certain functions in Sitellite to behave correctly,
+ Sitellite's task scheduler needs to be run at certain intervals. Full
+ details for the scheduler can be found in Sitellite's bulit-in help
+ documents, which you should be able to access once you've completed
+ step 3.
+
+5. If you want to install any additional apps (see inc/app), please refer
+ to their install instructions.
+
+---------
+Upgrading
+
+If you are upgrading a site, check in the 'upgrade' directory for the
+necessary files and information.
+
+---------------
+Troubleshooting
+
+For troubleshooting information, please refer to http://www.sitellite.org/
+
+------------
+Known Issues
+
+Please see the file KNOWN ISSUES for a complete and current list.
4 docs/KNOWN ISSUES
@@ -0,0 +1,4 @@
+KNOWN ISSUES
+
+Please refer to http://www.sitellite.org/ for a list of currently known
+issues.
340 docs/LICENSE
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
73 docs/REQUIREMENTS
@@ -0,0 +1,73 @@
+REQUIREMENTS
+
+For the most current requirements, please visit http://www.sitellite.org/
+
+Server Requirements
+-------------------
+
+Apache Web Server:
+
+The Apache web server version 1.3 or greater, configured with "AllowOverride
+All" or "AllowOverride FileInfo Indexes" (will require access to httpd.conf if
+this is not set correctly) and mod_rewrite. Available from
+http://www.apache.org/
+
+PHP Language:
+
+PHP 4.3 or greater, compiled as an Apache module and CLI-mode enabled.
+Available from http://www.php.net/
+
+MySQL Database:
+
+MySQL 4.1 or greater. Available from http://www.mysql.com/
+
+Other Databases:
+
+Oracle, SQLite, and others can be used as secondary data sources
+via Sitellite's database abstraction layer. However, a MySQL database is
+required for the core web site functionality.
+
+Task Scheduler:
+
+Cron or At command-line tools, or an equivalent scheduling facility. The
+INSTALL file assumes you are using crontab. Windows users will have to use
+the Windows Task Manager, which should be accessible from the Windows Control
+Panel.
+
+Sitellite should run on any operating system supported by these packages,
+however we strongly recommend using a Unix operating system, for its
+security and stability over Windows. We test our software primarily on Linux
+and Mac OS X.
+
+Client Requirements
+-------------------
+
+There are no Sitellite-specific browser requirements for website visitors,
+only for the Sitellite administrative interface.
+
+Sitellite supports the following list of browsers:
+
+- Firefox 2.0 or greater on any operating system.
+- Safari 3.0 or greater on Mac OS X or Windows.
+- Microsoft Internet Explorer 6.0 or greater on Windows only.
+
+We plan to add support for Opera in the future as well. If you would like to
+help with this, please join us at http://www.sitellite.org/
+
+If you visit the Sitellite administrative login screen
+(www.yourWebSite.com/sitellite) with an unsupported browser, it will present an
+"Unsupported Browser" notice instead of letting you log in. From the
+"front-end" of the web site, it does not, because your web site member usage
+likely doesn't have the same restrictions.
+
+For installation, one of the following is needed:
+
+A File Transfer Protocol (FTP) client or equivalent software (Secure FTP,
+scp, etc), and an FTP account on the server on which you wish to run Sitellite.
+For FTP clients, we recommend one that is able to set file permissions on
+the server recursively. Transmit on Mac OS X and WinSCP on Windows can both
+do this and others may as well.
+
+A Telnet or Secure Shell (SSH) client, and an account on the server on which
+you wish to run Sitellite. This is the preferred method of installing
+Sitellite, but requires knowledge of using the Unix command line interface.
5 inc/app/appdoc/boxes/access.php
@@ -0,0 +1,5 @@
+sitellite_access = private
+sitellite_status = approved
+sitellite_action = on
+sitellite_goto = appdoc-app
+sitellite_template_set = admin
58 inc/app/appdoc/boxes/apigen/index.php
@@ -0,0 +1,58 @@
+<?php
+
+if (empty ($parameters['appname']) || strstr ($parameters['appname'], '..') || ! @is_dir (getcwd () . '/inc/app/' . $parameters['appname'])) {
+ header ('Location: ' . $_SERVER['HTTP_REFERER']);
+ exit;
+}
+
+$app = $parameters['appname'];
+$read = 'inc/app/' . $app . '/lib';
+$write = 'inc/app/' . $app . '/docs/api';
+$docs = 'inc/app/' . $app . '/docs';
+
+if (! @is_dir ($read)) {
+ die ('No lib folder found.');
+}
+
+if (! @is_dir ($docs)) {
+ $r = mkdir ($docs, 0777);
+ if (! $r) {
+ die ('No docs folder found. Attempt to create failed.');
+ }
+}
+
+if (! @is_dir ($write)) {
+ $r = mkdir ($write, 0777);
+ if (! $r) {
+ die ('No docs/api folder found. Attempt to create failed.');
+ }
+}
+
+if (! @is_writeable ($write)) {
+ die ('Cannot write to docs/api folder. Please change your filesystem permissions.');
+}
+
+$info = ini_parse (getcwd () . '/inc/app/' . $app . '/conf/config.ini.php', false);
+
+$fullname = $info['app_name'];
+if (! $fullname) {
+ $fullname = ucfirst ($app);
+}
+
+set_time_limit (900);
+
+page_title (intl_get ('AppDoc') . ': ' . $fullname);
+
+echo '<p><strong>' . intl_get ('Generating API documentation, please be patient.') . '</strong></p>';
+
+echo '<pre>';
+
+passthru ('./saf/lib/PEAR/PhpDocumentor/phpdoc -d ' . $read . ' -s -t ' . $write . ' -ti "' . $fullname . '" -o HTML:Smarty:Sitellite -dn ' . $app);
+
+echo '</pre>';
+
+echo template_simple ('<p><strong>{intl Finished}. <a href="{site/prefix}/index/appdoc-appinfo-action?appname={cgi/appname}">{intl Back}</a></strong></p>');
+
+set_time_limit (30);
+
+?>
3  inc/app/appdoc/boxes/apigen/saf/access.php
@@ -0,0 +1,3 @@
+sitellite_access = public
+sitellite_status = approved
+sitellite_action = on
78 inc/app/appdoc/boxes/apigen/saf/index.php
@@ -0,0 +1,78 @@
+<?php
+
+// BEGIN CLI KEEPOUT CHECKING
+if (php_sapi_name () !== 'cli') {
+ // Add these lines to the very top of any file you don't want people to
+ // be able to access directly.
+ header ('HTTP/1.1 404 Not Found');
+ echo "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
+ . "<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n"
+ . "The requested URL " . $PHP_SELF . " was not found on this server.<p>\n<hr>\n"
+ . $_SERVER['SERVER_SIGNATURE'] . "</body></html>";
+ exit;
+}
+// END CLI KEEPOUT CHECKING
+
+$app = 'saf';
+$read = 'saf/lib';
+$write = 'saf/docs/api';
+$docs = 'saf/docs';
+$fullname = 'SAF';
+
+if (! @is_dir ($read)) {
+ die ('No lib folder found.');
+}
+
+if (! @is_dir ($docs)) {
+ $r = mkdir ($docs, 0777);
+ if (! $r) {
+ die ('No docs folder found. Attempt to create failed.');
+ }
+}
+
+if (! @is_dir ($write)) {
+ $r = mkdir ($write, 0777);
+ if (! $r) {
+ die ('No docs/api folder found. Attempt to create failed.');
+ }
+}
+
+if (! @is_writeable ($write)) {
+ die ('Cannot write to docs/api folder. Please change your filesystem permissions.');
+}
+
+function appdoc_apigen_error_handler ($errno, $errstr, $errfile, $errline) {
+ switch ($errno) {
+ case FATAL:
+ echo "FATAL [$errno] $errstr\n$errfile ($errline)\n";
+ exit (1);
+ break;
+ case ERROR:
+ echo "ERROR [$errno] $errstr\n$errfile ($errline)\n";
+ break;
+ case WARNING:
+ echo "WARNING [$errno] $errstr\n$errfile ($errline)\n";
+ break;
+ default:
+ echo "UNKNOWN [$errno] $errstr\n$errfile ($errline)\n";
+ break;
+ }
+}
+set_error_handler ('appdoc_apigen_error_handler');
+
+while (ob_get_level ()) {
+ ob_end_clean ();
+}
+ob_implicit_flush (true);
+
+set_time_limit (0);
+echo "Generating API documentation, please be patient.\n\n";
+
+passthru ('./saf/lib/PEAR/PhpDocumentor/phpdoc -d ' . $read . ' -s -t ' . $write . ' -ti "' . $fullname . '" -o HTML:Smarty:SitelliteDotOrg -dn ' . $app . ' -i PEAR/,Ext/');
+
+echo "Finished.";
+set_time_limit (30);
+
+exit;
+
+?>
8 inc/app/appdoc/boxes/apigen/saf/settings.php
@@ -0,0 +1,8 @@
+; <?php /*
+
+[Meta]
+
+name = SAF Doc Generator
+description = Generates or regenerates API documentation for the SAF libraries. Uses PhpDocumentor to generate the docs.
+
+; */ ?>
14 inc/app/appdoc/boxes/apigen/settings.php
@@ -0,0 +1,14 @@
+; <?php /*
+
+[Meta]
+
+name = API Doc Generator
+description = Generates or regenerates API documentation for the specified app's libraries. Uses PhpDocumentor to generate the docs.
+
+[appname]
+
+alt = Application Name
+type = text
+rule 0 = not empty, You must enter an application name.
+
+; */ ?>
54 inc/app/appdoc/boxes/appinfo/index.php
@@ -0,0 +1,54 @@
+<?php
+
+loader_import ('saf.File.Directory');
+loader_import ('appdoc.functions');
+
+if ($parameters['appname'] == 'GLOBAL') {
+ header ('Location: ' . site_prefix () . '/index/appdoc-app');
+ exit;
+} elseif (empty ($parameters['appname']) || strstr ($parameters['appname'], '..') || ! @is_dir (getcwd () . '/inc/app/' . $parameters['appname'])) {
+ header ('Location: ' . $_SERVER['HTTP_REFERER']);
+ exit;
+}
+
+$path = getcwd () . '/inc/app/' . $parameters['appname'];
+
+$info = ini_parse (getcwd () . '/inc/app/' . $parameters['appname'] . '/conf/config.ini.php', false);
+
+$fullname = $info['app_name'];
+if (! $fullname) {
+ $fullname = ucfirst ($parameters['appname']);
+}
+
+$data = array ('boxes' => array (), 'forms' => array ());
+
+help_walker ($parameters['appname'], 'boxes', $path . '/boxes', $data['boxes']);
+help_walker ($parameters['appname'], 'forms', $path . '/forms', $data['forms']);
+
+foreach ($info as $k => $v) {
+ $data[$k] = $v;
+}
+
+if (isset ($data['author'])) {
+ $data['author'] = preg_replace ('/<([^>]+)>/', '&lt;<a href="mailto:\1?subject=' . $fullname . '">\1</a>&gt;', $data['author']);
+}
+
+if (@is_dir ($path . '/docs/en')) {
+ $data['helpdocs'] = site_prefix () . '/index/help-app?appname=' . $parameters['appname'];
+} else {
+ $data['helpdocs'] = false;
+}
+
+if (@file_exists ($path . '/docs/api/index.html')) {
+ $data['apidocs'] = site_prefix () . '/inc/app/' . $parameters['appname'] . '/docs/api';
+} else {
+ $data['apidocs'] = false;
+}
+
+// output
+
+page_title (intl_get ('AppDoc') . ': ' . $fullname);
+
+echo template_simple ('appdoc.spt', $data);
+
+?>
14 inc/app/appdoc/boxes/appinfo/settings.php
@@ -0,0 +1,14 @@
+; <?php /*
+
+[Meta]
+
+name = App Info
+description = A developer documentation browser used to describe SCS apps, boxes, and forms.
+
+[appname]
+
+alt = Application Name
+type = text
+rule 0 = not empty, You must enter an application name.
+
+; */ ?>
67 inc/app/appdoc/boxes/boxviewer/index.php
@@ -0,0 +1,67 @@
+<?php
+
+loader_import ('appdoc.functions');
+
+if (empty ($parameters['appname']) || strstr ($parameters['appname'], '..') || ! @is_dir (getcwd () . '/inc/app/' . $parameters['appname'])) {
+ header ('Location: ' . $_SERVER['HTTP_REFERER']);
+ exit;
+}
+
+if (empty ($parameters['box']) || strstr ($parameters['box'], '..') || ! @is_dir (getcwd () . '/inc/app/' . $parameters['appname'] . '/boxes/' . $parameters['box'])) {
+ header ('Location: ' . $_SERVER['HTTP_REFERER']);
+ exit;
+}
+
+$path = getcwd () . '/inc/app/' . $parameters['appname'] . '/boxes/' . $parameters['box'];
+$data = array ();
+
+$data['access'] = help_get_access ($path, getcwd () . '/inc/app/' . $parameters['appname']);
+$data['settings'] = ini_parse ($path . '/settings.php');
+$data['info'] = array_shift ($data['settings']);
+$data['params'] = $data['settings'];
+$data['description'] = $data['info']['description'];
+
+foreach ($data['params'] as $key => $value) {
+ $rules = array ();
+ foreach ($value as $k => $v) {
+ if (strpos ($k, 'rule ') === 0) {
+ $rules[] = $v;
+ }
+ }
+ if (count ($rules) == 0) {
+ $rules = false;
+ }
+ $data['params'][$key]['rules'] = $rules;
+}
+
+ob_start ();
+highlight_file ($path . '/index.php');
+$data['source'] = ob_get_contents ();
+ob_end_clean ();
+
+$info = ini_parse (getcwd () . '/inc/app/' . $parameters['appname'] . '/conf/config.ini.php', false);
+
+$fullname = $info['app_name'];
+if (! $fullname) {
+ $fullname = ucfirst ($parameters['appname']);
+}
+
+$pathinfo = explode ('/', $parameters['box']);
+
+foreach ($pathinfo as $key => $value) {
+ $pathinfo[$key] = ucfirst ($value);
+}
+
+if (! empty ($data['info']['name'])) {
+ $pathinfo[count ($pathinfo) - 1] = $data['info']['name'];
+}
+
+$name = join (' / ', $pathinfo);
+
+page_title (intl_get ('AppDoc') . ': ' . $fullname . ' / ' . $name);
+
+echo template_simple ('<p><a href="{site/prefix}/index/appdoc-appinfo-action?appname={cgi/appname}">{intl Back}</a></p>');
+
+echo template_simple ('boxviewer.spt', $data);
+
+?>
20 inc/app/appdoc/boxes/boxviewer/settings.php
@@ -0,0 +1,20 @@
+; <?php /*
+
+[Meta]
+
+name = Box Viewer
+description = A developer documentation browser used to describe SCS apps, boxes, and forms.
+
+[appname]
+
+alt = Application Name
+type = text
+rule 0 = not empty, You must enter an application name.
+
+[box]
+
+alt = Box Name
+type = text
+rule 0 = not empty, You must enter a box name.
+
+; */ ?>
67 inc/app/appdoc/boxes/formviewer/index.php
@@ -0,0 +1,67 @@
+<?php
+
+loader_import ('appdoc.functions');
+
+if (empty ($parameters['appname']) || strstr ($parameters['appname'], '..') || ! @is_dir (getcwd () . '/inc/app/' . $parameters['appname'])) {
+ header ('Location: ' . $_SERVER['HTTP_REFERER']);
+ exit;
+}
+
+if (empty ($parameters['form']) || strstr ($parameters['form'], '..') || ! @is_dir (getcwd () . '/inc/app/' . $parameters['appname'] . '/forms/' . $parameters['form'])) {
+ header ('Location: ' . $_SERVER['HTTP_REFERER']);
+ exit;
+}
+
+$path = getcwd () . '/inc/app/' . $parameters['appname'] . '/forms/' . $parameters['form'];
+$data = array ();
+
+$data['access'] = help_get_access ($path, getcwd () . '/inc/app/' . $parameters['appname']);
+$data['settings'] = ini_parse ($path . '/settings.php');
+$data['info'] = array_shift ($data['settings']);
+$data['params'] = $data['settings'];
+$data['description'] = $data['info']['description'];
+
+foreach ($data['params'] as $key => $value) {
+ $rules = array ();
+ foreach ($value as $k => $v) {
+ if (strpos ($k, 'rule ') === 0) {
+ $rules[] = $v;
+ }
+ }
+ if (count ($rules) == 0) {
+ $rules = false;
+ }
+ $data['params'][$key]['rules'] = $rules;
+}
+
+ob_start ();
+highlight_file ($path . '/index.php');
+$data['source'] = ob_get_contents ();
+ob_end_clean ();
+
+$info = ini_parse (getcwd () . '/inc/app/' . $parameters['appname'] . '/conf/config.ini.php', false);
+
+$fullname = $info['app_name'];
+if (! $fullname) {
+ $fullname = ucfirst ($parameters['appname']);
+}
+
+$pathinfo = explode ('/', $parameters['form']);
+
+foreach ($pathinfo as $key => $value) {
+ $pathinfo[$key] = ucfirst ($value);
+}
+
+if (! empty ($data['info']['name'])) {
+ $pathinfo[count ($pathinfo) - 1] = $data['info']['name'];
+}
+
+$name = join (' / ', $pathinfo);
+
+page_title (intl_get ('AppDoc') . ': ' . $fullname . ' / ' . $name);
+
+echo template_simple ('<p><a href="{site/prefix}/index/appdoc-appinfo-action?appname={cgi/appname}">{intl Back}</a></p>');
+
+echo template_simple ('formviewer.spt', $data);
+
+?>
20 inc/app/appdoc/boxes/formviewer/settings.php
@@ -0,0 +1,20 @@
+; <?php /*
+
+[Meta]
+
+name = Form Viewer
+description = A developer documentation browser used to describe SCS apps, boxes, and forms.
+
+[appname]
+
+alt = Application Name
+type = text
+rule 0 = not empty, You must enter an application name.
+
+[form]
+
+alt = Form Name
+type = text
+rule 0 = not empty, You must enter a form name.
+
+; */ ?>
64 inc/app/appdoc/boxes/helpdoc/add/index.php
@@ -0,0 +1,64 @@
+<?php
+
+loader_import ('saf.MailForm');
+
+class AddForm extends MailForm {
+ function AddForm () {
+ parent::MailForm ();
+
+ global $cgi;
+
+ $this->addWidget ('hidden', 'appname');
+ $this->addWidget ('hidden', 'lang');
+
+ $w =& $this->addWidget ('text', 'filename');
+ $w->alt = intl_get ('File Name (ie. 001-about-myApp)');
+ $w->addRule ('not empty', intl_get ('You must specify a file name.'));
+ $w->addRule ('not contains ".."', intl_get ('Your file name contains invalid characters.'));
+ $w->addRule ('not exists "inc/app/' . $cgi->appname . '/docs/' . $cgi->lang . '"', intl_get ('The specified file name already exists. Please choose another or edit that file.'));
+
+ $w =& $this->addWidget ('text', 'title');
+ $w->alt = intl_get ('Title');
+ $w->addRule ('not empty', intl_get ('You must specify a title.'));
+
+ session_set ('imagechooser_path', '/inc/app/' . $cgi->appname . '/pix');
+ $this->extra = 'onsubmit="xed_copy_value (this, \'body\')"';
+ $w =& $this->addWidget ('xed.Widget.Xeditor', 'body');
+
+ $w =& $this->addWidget ('msubmit', 'submit_button');
+
+ $b =& $w->getButton ();
+ $b->setValues (intl_get ('Save'));
+
+ $b =& $w->addButton ('submit_button');
+ $b->setValues (intl_get ('Cancel'));
+ $b->extra = 'onclick="window.location.href = \'' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $cgi->appname . '&lang=' . $cgi->lang . '\'; return false"';
+ }
+
+ function onSubmit ($vals) {
+ loader_import ('saf.File');
+
+ if (! preg_match ('/\.html$/', $vals['filename'])) {
+ $vals['filename'] .= '.html';
+ }
+
+ $vals['body'] = '<h1>' . $vals['title'] . '</h1>' . NEWLINEx2 . $vals['body'];
+
+ if (! file_overwrite (
+ site_docroot () . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang'] . '/' . $vals['filename'],
+ $vals['body']
+ )) {
+ echo '<p>Error: Unable to write to the file. Please verify your folder permissions.</p>';
+ return;
+ }
+
+ header ('Location: ' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $vals['appname'] . '&lang=' . $vals['lang']);
+ exit;
+ }
+}
+
+page_title (intl_get ('Adding Help File'));
+$form = new AddForm ();
+echo $form->run ();
+
+?>
91 inc/app/appdoc/boxes/helpdoc/add/language/index.php
@@ -0,0 +1,91 @@
+<?php
+
+loader_import ('saf.MailForm');
+
+class AddForm extends MailForm {
+ function AddForm () {
+ parent::MailForm ();
+
+ global $cgi;
+
+ $this->addWidget ('hidden', 'appname');
+ $this->addWidget ('hidden', 'lang');
+
+ $w =& $this->addWidget ('text', 'lang_code');
+ $w->alt = intl_get ('Language Code (ie. en)');
+ $w->addRule ('not empty', intl_get ('You must specify a language code.'));
+
+ $w =& $this->addWidget ('text', 'lang_name');
+ $w->alt = intl_get ('Language Name');
+ $w->addRule ('not empty', intl_get ('You must specify a language name.'));
+
+ loader_import ('help.Help');
+
+ $w =& $this->addWidget ('select', 'copy_from');
+ $w->alt = intl_get ('Copy From (Optional)');
+ $w->setValues (
+ array_merge (
+ array ('' => '- ' . intl_get ('SELECT') . ' -'),
+ help_get_langs ($cgi->appname)
+ )
+ );
+
+ $w =& $this->addWidget ('msubmit', 'submit_button');
+
+ $b =& $w->getButton ();
+ $b->setValues (intl_get ('Save'));
+
+ $b =& $w->addButton ('submit_button');
+ $b->setValues (intl_get ('Cancel'));
+ $b->extra = 'onclick="window.location.href = \'' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $cgi->appname . '&lang=' . $cgi->lang . '\'; return false"';
+ }
+
+ function onSubmit ($vals) {
+ loader_import ('saf.File');
+ loader_import ('saf.File.Directory');
+ loader_import ('saf.Misc.Ini');
+
+ $info = help_get_langs ($vals['appname']);
+
+ $info[$vals['lang_code']] = $vals['lang_name'];
+
+ if (! @mkdir (site_docroot () . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang_code'], 0777)) {
+ echo '<p>Error: Unable to create language folder. Please verify your folder permissions.</p>';
+ return;
+ }
+
+ if (! file_overwrite (
+ site_docroot () . '/inc/app/' . $vals['appname'] . '/docs/languages.php',
+ ini_write ($info)
+ )) {
+ echo '<p>Error: Unable to write to the file. Please verify your folder permissions.</p>';
+ return;
+ }
+
+ if (! empty ($vals['copy_from'])) {
+ // copy help files from specified lang to new dir
+ $pages = help_get_pages ($vals['appname'], $vals['lang']);
+ foreach ($pages as $page) {
+ $id = help_get_id ($page);
+ $res = copy (
+ site_docroot () . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang'] . '/' . $id . '.html',
+ site_docroot () . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang_code'] . '/' . $id . '.html'
+ );
+ if (! $res) {
+ echo '<p>Error: Unable to duplicate help files. Please verify your folder permissions.</p>';
+ return;
+ }
+ }
+ }
+
+ // go to new language
+ header ('Location: ' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $vals['appname'] . '&lang=' . $vals['lang_code']);
+ exit;
+ }
+}
+
+page_title (intl_get ('Adding Language'));
+$form = new AddForm ();
+echo $form->run ();
+
+?>
32 inc/app/appdoc/boxes/helpdoc/delete/index.php
@@ -0,0 +1,32 @@
+<?php
+
+global $cgi;
+
+if (empty ($cgi->appname) || strstr ($cgi->appname, '..') || ! @is_dir ('inc/app/' . $cgi->appname)) {
+ header ('Location: ' . site_prefix () . '/index/appdoc-app');
+ exit;
+}
+
+if (empty ($cgi->lang) || strstr ($cgi->lang, '..') || ! @is_dir ('inc/app/' . $cgi->appname . '/docs/' . $cgi->lang)) {
+ header ('Location: ' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $cgi->appname);
+ exit;
+}
+
+if (! is_array ($cgi->_key)) {
+ if (strstr ($cgi->_key, '..')) {
+ continue;
+ }
+ unlink (site_docroot () . '/inc/app/' . $cgi->appname . '/docs/' . $cgi->lang . '/' . $cgi->_key);
+} else {
+ foreach ($cgi->_key as $file) {
+ if (strstr ($file, '..')) {
+ continue;
+ }
+ unlink (site_docroot () . '/inc/app/' . $cgi->appname . '/docs/' . $cgi->lang . '/' . $file);
+ }
+}
+
+header ('Location: ' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $cgi->appname . '&lang=' . $cgi->lang);
+exit;
+
+?>
91 inc/app/appdoc/boxes/helpdoc/edit/index.php
@@ -0,0 +1,91 @@
+<?php
+
+loader_import ('saf.MailForm');
+loader_import ('help.Help');
+
+class EditForm extends MailForm {
+ function EditForm () {
+ parent::MailForm ();
+
+ global $cgi, $_helpdoc;
+
+ $this->addWidget ('hidden', 'appname');
+ $this->addWidget ('hidden', 'lang');
+ $this->addWidget ('hidden', 'helpfile');
+
+ $w =& $this->addWidget ('text', 'filename');
+ $w->alt = intl_get ('File Name (ie. 001-about-myApp)');
+ $w->addRule ('not empty', intl_get ('You must specify a file name.'));
+ $w->addRule ('not contains ".."', intl_get ('Your file name contains invalid characters.'));
+ $w->setValue ($cgi->helpfile);
+
+ $w =& $this->addWidget ('text', 'title');
+ $w->alt = intl_get ('Title');
+ $w->addRule ('not empty', intl_get ('You must specify a title.'));
+ $w->setValue ($_helpdoc->title);
+
+ session_set ('imagechooser_path', 'inc/app/' . $cgi->appname . '/pix');
+ $this->extra = 'onsubmit="xed_copy_value (this, \'body\')"';
+ $w =& $this->addWidget ('xed.Widget.Xeditor', 'body');
+ $w->setValue ($_helpdoc->body);
+
+ $w =& $this->addWidget ('msubmit', 'submit_button');
+
+ $b =& $w->getButton ();
+ $b->setValues (intl_get ('Save'));
+
+ $b =& $w->addButton ('submit_button');
+ $b->setValues (intl_get ('Cancel'));
+ $b->extra = 'onclick="window.location.href = \'' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $cgi->appname . '&lang=' . $cgi->lang . '\'; return false"';
+ }
+
+ function onSubmit ($vals) {
+ loader_import ('saf.File');
+
+ if (! preg_match ('/\.html$/', $vals['filename'])) {
+ $vals['filename'] .= '.html';
+ }
+
+ if (! preg_match ('/\.html$/', $vals['helpfile'])) {
+ $vals['helpfile'] .= '.html';
+ }
+
+ $vals['body'] = '<h1>' . $vals['title'] . '</h1>' . NEWLINEx2 . $vals['body'];
+
+ if (! file_overwrite (
+ site_docroot () . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang'] . '/' . $vals['filename'],
+ $vals['body']
+ )) {
+ echo '<p>Error: Unable to write to the file. Please verify your file and folder permissions.</p>';
+ return;
+ }
+
+ if ($vals['helpfile'] != $vals['filename']) {
+ // erase old file, this is a rename
+ $res = @unlink (site_docroot () . '/inc/app/' . $vals['appname'] . '/docs/' . $vals['lang'] . '/' . $vals['helpfile']);
+ if (! $res) {
+ echo '<p>Error: Unable to remove the old file. Please verify your file and folder permissions.</p>';
+ return;
+ }
+ }
+
+ header ('Location: ' . site_prefix () . '/index/appdoc-helpdoc-action?appname=' . $vals['appname'] . '&lang=' . $vals['lang']);
+ exit;
+ }
+}
+
+$GLOBALS['_helpdoc'] = new StdClass;
+global $cgi, $_helpdoc;
+
+loader_import ('help.Help');
+
+$_helpdoc->body = @join ('', @file ('inc/app/' . $cgi->appname . '/docs/' . $cgi->lang . '/' . $cgi->helpfile . '.html'));
+$_helpdoc->title = help_get_title ($_helpdoc->body, $cgi->helpfile);
+$_helpdoc->body = preg_replace ('/<h[1-6][^>]*>([^<]+)<\/h[1-6]>[\r\n]*/i', '', $_helpdoc->body, 1);
+
+page_title (intl_get ('Editing Help File') . ': ' . $cgi->title);
+
+$form = new EditForm ();
+echo $form->run ();
+
+?>
57 inc/app/appdoc/boxes/helpdoc/index.php
@@ -0,0 +1,57 @@
+<?php
+
+global $cgi;
+
+if (empty ($cgi->appname) || strstr ($cgi->appname, '..') || ! @is_dir ('inc/app/' . $cgi->appname)) {
+ header ('Location: ' . site_prefix () . '/index/appdoc-app');
+ exit;
+}
+
+if (empty ($cgi->lang)) {
+ $cgi->lang = 'en';
+}
+
+$info = ini_parse (getcwd () . '/inc/app/' . $cgi->appname . '/conf/config.ini.php', false);
+
+page_title (intl_get ('Help Files') . ': ' . $info['app_name']);
+
+if (! @is_dir ('inc/app/' . $cgi->appname . '/docs/' . $cgi->lang)) {
+ loader_import ('saf.File.Directory');
+
+ $res = Dir::build ('inc/app/' . $cgi->appname . '/docs/' . $cgi->lang, 0777);
+
+ if (! $res) {
+ echo '<p>' . intl_get ('Failed to create directory') . ': docs/' . $cgi->lang . '</p>';
+ echo '<p><a href="javascript: history.go (-1)">' . intl_get ('Back') . '</a></p>';
+ return;
+ }
+}
+
+loader_import ('help.Help');
+
+$data = array (
+ 'appname' => $cgi->appname,
+ 'lang' => $cgi->lang,
+ 'files' => array (),
+ 'langs' => help_get_langs ($cgi->appname),
+);
+
+$files = help_get_pages ($cgi->appname, $cgi->lang);
+if (! is_array ($files)) {
+ $files = array ();
+}
+
+foreach ($files as $file) {
+ $id = help_get_id ($file);
+ $body = @join ('', @file ($file));
+ $word_count = count (preg_split ('/\W+/s', strip_tags ($body), -1, PREG_SPLIT_NO_EMPTY));
+ $data['files'][basename ($file)] = array (
+ 'id' => $id,
+ 'title' => help_get_title ($body, $id),
+ 'words' => $word_count
+ );
+}
+
+echo template_simple ('helpdoc.spt', $data);
+
+?>
4 inc/app/appdoc/boxes/index/access.php
@@ -0,0 +1,4 @@
+sitellite_access = public
+sitellite_status = approved
+sitellite_action = on
+sitellite_template_set = admin
73 inc/app/appdoc/boxes/index/index.php
@@ -0,0 +1,73 @@
+<?php
+
+if (! session_admin ()) {
+ page_title ( 'AppDoc - Login' );
+
+ global $cgi;
+
+ if (isset ($cgi->username)) {
+ echo '<p>Invalid password. Please try again.</p>';
+ } else {
+ echo '<p>Please enter your username and password to enter.</p>';
+ }
+
+ echo template_simple ('<form method="post" action="{site/prefix}/index/sitellite-user-login-action">
+ <input type="hidden" name="goto" value="appdoc-app" />
+ <table cellpadding="5" border="0">
+ <tr>
+ <td>Username</td>
+ <td><input type="text" name="username" /></td>
+ </tr>
+ <tr>
+ <td>Password</td>
+ <td><input type="password" name="password" /></td>
+ </tr>
+ <tr>
+ <td>&nbsp;</td>
+ <td><input type="submit" value="Enter" /></td>
+ </tr>
+ </table>
+ </form>'
+ );
+
+ return;
+}
+
+page_title (intl_get ('AppDoc'));
+
+echo '<p>';
+//echo '<a href="' . site_prefix () . '/index/appdoc-translation-action?appname=GLOBAL">' . intl_get ('Global Translation') . '</a>';
+//echo ' &nbsp; &nbsp; ';
+echo '<a href="' . site_prefix () . '/index/help-app?appname=appdoc">' . intl_get ('Help') . '</a>';
+echo '</p>';
+
+echo '<p>' . intl_get ('Choose an app') . ':</p>';
+
+loader_import ('saf.File.Directory');
+
+$dir = new Dir (getcwd () . '/inc/app');
+if (! $dir->handle) {
+ die ($dir->error);
+}
+
+$apps = array ();
+$files = $dir->read_all ();
+
+echo '<ul>' . NEWLINE;
+foreach ($files as $file) {
+ if (strpos ($file, '.') === 0 || $file == 'CVS') {
+ continue;
+ } elseif (@is_dir (getcwd () . '/inc/app/' . $file)) {
+ // get name
+ $info = ini_parse (getcwd () . '/inc/app/' . $file . '/conf/config.ini.php', false);
+ if (isset ($info['app_name'])) {
+ $name = $info['app_name'];
+ } else {
+ $name = ucfirst ($file);
+ }
+ echo '<li><a href="' . site_prefix () . '/index/appdoc-appinfo-action?appname=' . $file . '">' . $name . '</a></li>' . NEWLINE;
+ }
+}
+echo '</ul>';
+
+?>
8 inc/app/appdoc/boxes/index/settings.php
@@ -0,0 +1,8 @@
+; <?php /*
+
+[Meta]
+
+name = AppDoc
+description = A developer documentation browser used to describe SCS apps, boxes, and forms.
+
+; */ ?>
85 inc/app/appdoc/boxes/translation/build/index.php
@@ -0,0 +1,85 @@
+<?php
+
+if ($parameters['appname'] == 'GLOBAL') {
+ $app = 'GLOBAL';
+ $read = 'inc/html';
+ $write = 'inc/lang/index.php';
+ $list = 'inc/lang/languages.php';
+ $langs = 'inc/lang';
+ $info = array (
+ 'app_name' => 'Global',
+ );
+} elseif (empty ($parameters['appname']) || strstr ($parameters['appname'], '..') || ! @is_dir (getcwd () . '/inc/app/' . $parameters['appname'])) {
+ header ('Location: ' . $_SERVER['HTTP_REFERER']);
+ exit;
+} else {
+ $app = $parameters['appname'];
+ $read = 'inc/app/' . $app;
+ $write = 'inc/app/' . $app . '/lang/index.php';
+ $list = 'inc/app/' . $app . '/lang/languages.php';
+ $langs = 'inc/app/' . $app . '/lang';
+ $info = ini_parse (getcwd () . '/inc/app/' . $app . '/conf/config.ini.php', false);
+}
+
+if (! @is_dir ($read)) {
+ die ('No app folder found.');
+}
+
+if (! @is_dir ($langs)) {
+ $r = mkdir ($langs, 0777);
+ if (! $r) {
+ die ('No lang folder found. Attempt to create failed.');
+ }
+}
+
+if (! @is_writeable ($langs)) {
+ die ('Cannot write to langs folder. Please change your filesystem permissions.');
+}
+
+if (! @file_exists ($list)) {
+ loader_import ('saf.File');
+ $r = file_overwrite ($list, ini_write (array ()));
+ if (! $r) {
+ die ('No lang/languages.php file found. Attempt to create failed.');
+ }
+}
+
+if (! @file_exists ($write)) {
+ $info = pathinfo ($write);
+ if (! @is_writeable ($info['dirname'])) {
+ die ('Cannot write to lang folder. Please change your filesystem permissions.');
+ }
+} else {
+ if (! @is_writeable ($write)) {
+ die ('Cannot write to lang/en.php file. Please change your filesystem permissions.');
+ }
+}
+
+$fullname = $info['app_name'];
+if (! $fullname) {
+ $fullname = ucfirst ($app);
+}
+
+set_time_limit (900);
+
+page_title (intl_get ('Languages') . ': ' . $fullname);
+
+echo '<p><strong>' . intl_get ('Generating translation index, please be patient.') . '</strong></p>';
+
+global $intl;
+
+$list = $intl->build_keylist ($read, $langs);
+if (! $list) {
+ die ('Error building index: ' . $intl->error);
+}
+
+$res = $intl->writeIndex ($write, $list);
+if (! $res) {
+ die ('Error writing index: ' . $intl->error);
+}
+
+echo template_simple ('<p><strong>{intl Finished}. <a href="{site/prefix}/index/appdoc-translation-action?appname={cgi/appname}">{intl Back}</a></strong></p>');
+
+set_time_limit (30);
+
+?>
38 inc/app/appdoc/boxes/translation/delete/index.php
@@ -0,0 +1,38 @@
+<?php
+
+global $cgi;
+
+if ($cgi->appname == 'GLOBAL') {
+ $file = 'inc/lang/languages.php';
+ $path = 'inc/lang';
+} else {
+ $file = 'inc/app/' . $cgi->appname . '/lang/languages.php';
+ $path = 'inc/app/' . $cgi->appname . '/lang';
+}
+
+$info = ini_parse ($file);
+
+foreach ($cgi->_key as $k) {
+ unset ($info[$k]);
+}
+
+$fp = fopen ($file, 'w');
+if (! $fp) {
+ page_title ('An Error Occurred');
+ echo 'Error: Failed to open languages.php file!';
+ return;
+}
+
+fwrite ($fp, ini_write ($info));
+fclose ($fp);
+
+foreach ($cgi->_key as $k) {
+ if (@file_exists ($path . '/' . $k . '.php')) {
+ unlink ($path . '/' . $k . '.php');
+ }
+}
+
+header ('Location: ' . site_prefix () . '/index/appdoc-translation-action?appname=' . $cgi->appname);
+exit;
+
+?>
52 inc/app/appdoc/boxes/translation/index.php
@@ -0,0 +1,52 @@
+<?php
+
+global $cgi;
+
+if ($cgi->appname == 'GLOBAL') {
+ $info = array (
+ 'app_name' => 'Global',
+ );
+ $lang_path = 'inc/lang';
+} elseif (empty ($cgi->appname) || strstr ($cgi->appname, '..') || ! @is_dir ('inc/app/' . $cgi->appname)) {
+ header ('Location: ' . site_prefix () . '/index/appdoc-app');
+ exit;
+} else {
+ $info = ini_parse (getcwd () . '/inc/app/' . $cgi->appname . '/conf/config.ini.php', false);
+ $lang_path = 'inc/app/' . $cgi->appname . '/lang';
+}
+
+page_title (intl_get ('Languages') . ': ' . $info['app_name']);
+
+if (! @is_dir ($lang_path)) {
+ loader_import ('saf.File.Directory');
+
+ $res = Dir::build ($lang_path, 0777);
+
+ if (! $res) {
+ echo '<p>' . intl_get ('Failed to create directory') . ': lang</p>';
+ echo '<p><a href="javascript: history.go (-1)">' . intl_get ('Back') . '</a></p>';
+ return;
+ }
+}
+
+global $intl;
+
+$data = array (
+ 'appname' => $cgi->appname,
+ 'langs' => $intl->getLanguages ($lang_path . '/languages.php'),
+);
+
+if (! is_array ($data['langs'])) {
+ $data['langs'] = array ();
+}