The version of vichan running on lainchan.org
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

41 wiersze
1.1KB

  1. <?php
  2. require 'info.php';
  3. function calendar_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. Calendar::build($action, $settings);
  9. }
  10. // Wrap functions in a class so they don't interfere with normal Tinyboard operations
  11. class Calendar {
  12. public static function build($action, $settings) {
  13. global $config;
  14. if ($action == 'all' || $action == 'news')
  15. file_write($config['dir']['home'] . $settings['file'], Calendar::htmlpage($settings));
  16. file_write($config['dir']['home'] . "calendarpost.php", Calendar::phppage($settings));
  17. }
  18. // Build staff application page
  19. public static function htmlpage($settings) {
  20. global $config;
  21. return Element('themes/calendar/calendar.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/calendar/calendarpost.php');
  30. return $page;
  31. }
  32. };
  33. ?>