- <?php
- /**
- * @package uForum
- * @file admin/mass_email.php
- * @version $Id$
- * @copyright 2009(c) PioDer <pioder@wp.pl>
- * @link http://pioder.gim2przemysl.int.pl/
- * @license GNU GPL v3
- **/
- define('IN_uF', true);
- //include files
- include('./../config.php');
- include('./../includes/constants.php');
- include('./../includes/db.php');
- include('./../includes/errors.php');
- //connect to database
- DataBase::db_connect();
- include('./../includes/sessions.php');
- include('./../includes/classes/class_user.php');
- include('./../common.php');
- include('./../includes/admin/class_main.php');
- include('./../includes/emailer.php');
- include('./../includes/classes/class_forum.php');
- include('./../includes/admin/class_forum.php');
- include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
- SessDelInvalid();
- SessRegister();
- SessDeleteOld();
- if (User::UserInformation($_SESSION['uid'],'rank')!=2)
- {
- admin_message_forum($lng['yournotadmin'],'../index.php');
- }
- if (!$forum_config['allow_send_email'])
- {
- admin_message_forum($lng['mass_email_disabled'],'forum_info.php');
- }
-
- if (isset($_POST['msg_content']))
- {
- if (strlen($_POST['msg_content'])>=5)
- {
- SendMassEmail(str_replace('%email%',$forum_config['forumname'],$lng['mass']),Post::TagsReplace($_POST['msg_content']));
- $msg='./template/blank.tpl';
- admin_message_forum($lng['mass_email_sended'],'forum_info.php');
- }
- else
- {
- $msg = './template/post_error_body.tpl';
- $message = $lng['to_short_msg_content'];
- }
- }
- else
- {
- $_POST['msg_content'] = '';
- $msg='./template/blank.tpl';
- }
- $skin = array(
- 'L.save'=>$lng['submit'],
- 'mass_email'=>$lng['mass_email'],
- 'L.reset'=>$lng['reset'],
- 'L.msg_content'=>$lng['msg_content'],
- 'L.main_beam'=>$lng['mass_email2']
- );
- Admin_Over::GenerateHeader();
- include('./template/mass_email.tpl');
- include('./template/overall_footer.tpl');
- ?>
|