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

<?php
/**
* @package µForum
* @file admin/mass_email.php
* @version 1.0.x, 17-08-2007, 13:16
* @copyright 2008(c) PioDer <[email protected]>
* @link http://pioder.gim2przemysl.int.pl/dsf.html
* @license GNU GPL v3
**/
define('IN_uF', true);
//include files
include('./../config.php');
include('./../includes/constants.php');
include('./../includes/class_db.php');
include('./../includes/class_error.php');
//connect to database
DataBase::db_connect();
include('./../includes/sessions.php');
include('./../includes/class_user.php');
include('./../common.php');
include('./../includes/admin/class_main.php');
include('./../includes/class_email.php');
include('./../includes/class_forum.php');
include('./../includes/admin/class_forum.php');
include('./../lngs/'.Admin_Over::DefaultLang().'/admin.php');
sess_del_invalid($_SESSION['uid']);
sess_register($_SESSION['uid']);
sess_delete_old();
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)
{
Email::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');
?>