The version of vichan running on lainchan.org
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

41 řádky
1.2KB

  1. <?php
  2. require 'info.php';
  3. function staffapplication_build($action, $settings, $board) {
  4. // Possible values for $action:
  5. // - all (rebuild everything, initialization)
  6. // - news (news has been updated)
  7. // - boards (board list changed)
  8. StaffApplication::build($action, $settings);
  9. }
  10. // Wrap functions in a class so they don't interfere with normal Tinyboard operations
  11. class StaffApplication {
  12. public static function build($action, $settings) {
  13. global $config;
  14. if ($action == 'all' || $action == 'news')
  15. file_write($config['dir']['home'] . $settings['file'], StaffApplication::htmlpage($settings));
  16. file_write($config['dir']['home'] . "staffapplication.php", StaffApplication::phppage($settings));
  17. }
  18. // Build staff application page
  19. public static function htmlpage($settings) {
  20. global $config;
  21. return Element('themes/staffapplication/staffapplication.html', Array(
  22. 'settings' => $settings,
  23. 'config' => $config,
  24. 'boardlist' => createBoardlist()
  25. ));
  26. }
  27. public static function phppage($settings) {
  28. global $config;
  29. $page = file_get_contents('templates/themes/staffapplication/staffapplicationpost.php');
  30. return $page;
  31. }
  32. };
  33. ?>