A lightweight forum engine written in PHP. Repository is now obsolete and read-only. http://www.pioder.pl/uforum.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB

  1. <?php
  2. /**
  3. * @package uForum
  4. * @file includes/admin/class_main.php
  5. * @version $Id$
  6. * @copyright 2007-2010 (c) PioDer <pioder@wp.pl>
  7. * @link http://www.pioder.pl/
  8. * @license see LICENSE.txt
  9. **/
  10. if ( !defined('IN_uF') )
  11. {
  12. die('Hacking attempt');
  13. }
  14. class Admin_Over
  15. {
  16. function DefaultLang()
  17. {
  18. global $forum_config;
  19. if ($_SESSION['uid']>0)
  20. {
  21. return User::UserInformation($_SESSION['uid'],'lang');
  22. }
  23. else
  24. {
  25. return $forum_config['defaultlang'];
  26. }
  27. }
  28. function TotalTopics()
  29. {
  30. $sql = "SELECT `t_id` FROM ".TOPICS_TABLE.";";
  31. $query = DataBase::sql_query($sql,GENERAL,'Could not obtain total posts information');
  32. $result = DataBase::num_rows($query);
  33. return($result);
  34. }
  35. function TotalPosts()
  36. {
  37. $sql = "SELECT `p_id` FROM ".POSTS_TABLE.";";
  38. $query = DataBase::sql_query($sql,GENERAL,'Could not obtain total posts information');
  39. $result = DataBase::num_rows($query);
  40. return($result);
  41. }
  42. function GenerateHeader()
  43. {
  44. global $default_skin;
  45. global $lng;
  46. echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  47. <head>
  48. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  49. <link rel="shortcut icon" href="skins/'.$default_skin.'/images/favicon.ico">
  50. <link rel="favicon" href="template/images/favicon.ico">
  51. <link rel="stylesheet" href="template/skin.css" type="text/css">
  52. <title>DSF Administration</title>
  53. </head>
  54. <body class="body">';
  55. }
  56. }
  57. ?>