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.

86 lines
1.9 KiB

  1. <?php
  2. /**
  3. * @package uForum
  4. * @file pms.php
  5. * @version $Id$
  6. * @copyright 2009(c) PioDer <pioder@wp.pl>
  7. * @link http://pioder.gim2przemysl.int.pl/
  8. * @license GNU GPL v3
  9. **/
  10. define('IN_uF', true);
  11. //include files
  12. include('./config.php');
  13. include('./includes/constants.php');
  14. include('./includes/class_db.php');
  15. include('./includes/class_error.php');
  16. //connect to database
  17. DataBase::db_connect();
  18. include('./includes/sessions.php');
  19. include('./includes/class_user.php');
  20. include('./common.php');
  21. include('./includes/classes/class_pms.php');
  22. include('./includes/class_overall.php');
  23. include('./includes/class_forum.php');
  24. include('./includes/class_posting.php');
  25. include('./includes/class_topic.php');
  26. include('./includes/classes/secure.php');
  27. include('./lngs/'.Over::DefaultLang().'/main.php');
  28. $start = Over::TimeGeneration();
  29. sess_del_invalid($_SESSION['uid']);
  30. sess_register($_SESSION['uid']);
  31. sess_delete_old();
  32. //costam
  33. if ($_SESSION['uid']<1)
  34. {
  35. $stop = Over::TimeGeneration();
  36. message_forum($lng['youarenotlogd'],'login.php?mode=login');
  37. }
  38. foreach ($_POST as $name => $value)
  39. {
  40. if ($forum_config['use_censorlist'])
  41. {
  42. $_POST[$name] = Secure::UseCensorlist($value);
  43. }
  44. }
  45. $uid = $_SESSION['uid'];
  46. $default_skin = Over::ViewSkinName();
  47. if (isset($_GET['mode']))
  48. {
  49. switch($_GET['mode'])
  50. {
  51. case 'folder':
  52. {
  53. include ('./includes/pms/pms_folder.php');
  54. break;
  55. }
  56. //delete message
  57. case 'delete':
  58. {
  59. include ('./includes/pms/pms_delete.php');
  60. break;
  61. }
  62. case 'view':
  63. {
  64. include ('./includes/pms/pms_view.php');
  65. break;
  66. }
  67. //write message
  68. case 'write':
  69. {
  70. include ('./includes/pms/pms_write.php');
  71. break;
  72. }
  73. default:
  74. {
  75. $stop = Over::TimeGeneration();
  76. message_forum($lng['invalidmode'],'index.php');
  77. break;
  78. }
  79. }
  80. }
  81. else
  82. {
  83. header('Location: pms.php?mode=folder&submode=inbox');
  84. }
  85. ?>