<?php
//////////////////////////// COPYRIGHT NOTICE //////////////////////////////
// This script is part of PhotoPost vBGallery, a software application by  //
// All Enthusiast, Inc.  Use of any kind of part or all of this           //
// script or modification of this script requires a license from All      //
// Enthusiast, Inc.  Use or modification of this script without a license //
// constitutes Software Piracy and will result in legal action from All   //
// Enthusiast, Inc.  All rights reserved.                                 //
// http://www.photopost.com      legal@photopost.com                      //
//                                                                        //
//            PhotoPost Copyright 2008, All Enthusiast, Inc.              //
////////////////////////////////////////////////////////////////////////////


// ######################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'sendmessage');
define('NO_REGISTER_GLOBALS', 1);
define('PP_SCRIPT', 'vBGallery');

// ################### PRE-CACHE TEMPLATES AND DATA ######################
	
// get special phrase groups
	$phrasegroups = array('messaging');
	
// pre-cache templates used by all actions
$globaltemplates = array(
	'im_send_aim',
	'im_send_icq',
	'im_send_yahoo',
	'im_send_msn',
	'im_send_skype',
	'im_message',
	'newpost_usernamecode'
);
		
	// pre-cache templates used by specific actions
		$actiontemplates = array();

// ######################### REQUIRE BACK-END ############################
require_once('./gallery_global.php');


// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

// ##### Redirect to vB sendmessage.php ##################################

$vbulletin->templatecache['im_send_aim'] = str_replace( '"member.php', '"' . $vbulletin->options['bburl'] . '/member.php', $vbulletin->templatecache['im_send_aim']);
$vbulletin->templatecache['im_send_icq'] = str_replace( '"member.php', '"' . $vbulletin->options['bburl'] . '/member.php', $vbulletin->templatecache['im_send_icq']);
$vbulletin->templatecache['im_send_yahoo'] = str_replace( '"member.php', '"' . $vbulletin->options['bburl'] . '/member.php', $vbulletin->templatecache['im_send_yahoo']);
$vbulletin->templatecache['im_send_msn'] = str_replace( '"member.php', '"' . $vbulletin->options['bburl'] . '/member.php', $vbulletin->templatecache['im_send_msn']);
$vbulletin->templatecache['im_send_skype'] = str_replace( '"member.php', '"' . $vbulletin->options['bburl'] . '/member.php', $vbulletin->templatecache['im_send_skype']);


require_once(DIR . '/sendmessage.php');
	

?>