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.8 KiB

<?php
/**
* @package uForum
* @file admin/mass_email.php
* @version $Id$
* @copyright 2007-2010 (c) PioDer <[email protected]>
* @link http://www.pioder.pl/
* @license see LICENSE.txt
**/
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');
?>