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.

67 lines
1.9 KiB

  1. <?php
  2. /**
  3. * @package µForum
  4. * @file admin/mass_email.php
  5. * @version 1.0.x, 17-08-2007, 13:16
  6. * @copyright 2008(c) PioDer <pioder@wp.pl>
  7. * @link http://pioder.gim2przemysl.int.pl/dsf.html
  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/admin/class_main.php');
  22. include('./../includes/class_email.php');
  23. include('./../includes/class_forum.php');
  24. include('./../includes/admin/class_forum.php');
  25. include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
  26. sess_del_invalid($_SESSION['uid']);
  27. sess_register($_SESSION['uid']);
  28. sess_delete_old();
  29. if (User::UserInformation($_SESSION['uid'],'rank')!=2)
  30. {
  31. admin_message_forum($lng['yournotadmin'],'../index.php');
  32. }
  33. if (!$forum_config['allow_send_email'])
  34. {
  35. admin_message_forum($lng['mass_email_disabled'],'forum_info.php');
  36. }
  37. if (isset($_POST['msg_content']))
  38. {
  39. if (strlen($_POST['msg_content'])>=5)
  40. {
  41. Email::SendMassEmail(str_replace('%email%',$forum_config['forumname'],$lng['mass']),Post::TagsReplace($_POST['msg_content']));
  42. $msg='./template/blank.tpl';
  43. admin_message_forum($lng['mass_email_sended'],'forum_info.php');
  44. }
  45. else
  46. {
  47. $msg = './template/post_error_body.tpl';
  48. $message = $lng['to_short_msg_content'];
  49. }
  50. }
  51. else
  52. {
  53. $_POST['msg_content'] = '';
  54. $msg='./template/blank.tpl';
  55. }
  56. $skin = array(
  57. 'L.save'=>$lng['submit'],
  58. 'mass_email'=>$lng['mass_email'],
  59. 'L.reset'=>$lng['reset'],
  60. 'L.msg_content'=>$lng['msg_content'],
  61. 'L.main_beam'=>$lng['mass_email2']
  62. );
  63. Admin_Over::GenerateHeader();
  64. include('./template/mass_email.tpl');
  65. include('./template/overall_footer.tpl');
  66. ?>