require_once $phpbb_root_path . 'includes/functions_post.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_selects.' . $phpEx;
require_once $phpbb_root_path . 'includes/functions_validate.' . $phpEx;
$im_userdata = array();
$im_userdata = init_imprefs($userdata['user_id']);
// Check possible variables
$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
$type = !empty($_REQUEST['type']) ? $_REQUEST['type'] : 'received';
$cancel = isset($_REQUEST['cancel']) ? true : false;
$confirm = isset($_REQUEST['confirm']) ? true : false;
$delete = isset($_REQUEST['delete']) ? true : 0;
$mark_list = !empty($_REQUEST['mark']) ? $_REQUEST['mark'] : 0;
$sort_order = $_REQUEST['order'] == 'DESC' ? 'DESC' : 'ASC';
$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) : 0;
if ($cancel) {
    thoul_redirect('admin_im_log.' . $phpEx . '?mode=edit&' . POST_USERS_URL . '=' . intval($_REQUEST[POST_USERS_URL]) . '&type=' . $type);
}
if ($mode == 'edit' && (isset($_REQUEST['username']) || isset($_REQUEST[POST_USERS_URL]))) {
    if (isset($_REQUEST[POST_USERS_URL])) {
        $userid = intval($_REQUEST[POST_USERS_URL]);
        $sql_where = 'user_id=' . $userid;
    } elseif (isset($_REQUEST['username'])) {
        $username = trim(strip_tags($_REQUEST['username']));
        $sql_where = "username = '******'", "''", $username) . "'";
    }
    $sql = 'SELECT username, user_id FROM ' . USERS_TABLE . ' WHERE ' . $sql_where;
    if (!($result = $db->sql_query($sql))) {
        $msg = 'Could not get username/user id';
        message_die(GENERAL_ERROR, $msg, '', __LINE__, __FILE__, $sql);
    }
    $row = $db->sql_fetchrow($result);
Example #2
0
}
// Get user's IM Preferences
$im_userdata = array();
$im_userdata = init_imprefs($userdata['user_id'], true);
// mode check
$mode = !empty($_REQUEST['mode']) ? $_REQUEST['mode'] : FRAMES_MODE;
// mode2 check - mode2 will be the window mode of the IM Client that is displayed
$mode2 = !empty($_REQUEST['mode2']) ? $_REQUEST['mode2'] : $im_userdata['current_mode'];
if ($mode2 != MAIN_MODE && $mode2 != WIDE_MODE && $mode2 != MINI_MODE) {
    $mode2 = $prill_config['default_mode'];
}
//
// Not logged in? Then go to the login page.
//
if (!$userdata['session_logged_in']) {
    thoul_redirect('login.' . $phpEx . '?redirect=imclient.' . $phpEx . '?mode=' . $mode . '&mode2=' . $mode2 . '&simple=1');
}
//
// Have IM privs for the user been turned off by admin?
//
if (!$im_userdata['admin_allow_ims']) {
    $message = $lang['Cannot_send_im_admin'] . $append_msg;
    message_die(GENERAL_MESSAGE, $message);
}
// Include commonly used files
include_once $phpbb_root_path . 'includes/bbcode.' . $phpEx;
//
// Have IM privs for the user been turned off by user?
//
if (!$im_userdata['user_allow_ims'] && $mode != 'editprofile') {
    $message = sprintf($lang['Cannot_send_im'], '<a href="' . append_sid("imclient.{$phpEx}?mode=editprofile&oldmode=" . $mode . '_' . $mode2) . '" onClick="javascript:window.open(\'' . append_sid("imclient.{$phpEx}?mode=editprofile&oldmode=" . $mode . '_' . $mode2) . '\', \'im_prefs\', \'scrollbars, resizable, height=' . $im_userdata['prefs_height'] . ', innerHeight=' . $im_userdata['prefs_height'] . ', innerWidth=' . $im_userdata['prefs_width'] . ', width=' . $im_userdata['prefs_width'] . '\'); return false">', '</a>');
    return;
}
define('IN_PHPBB', TRUE);
define('IN_PRILLIAN', TRUE);
$phpbb_root_path = './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
require_once './pagestart.' . $phpEx;
require_once PRILL_PATH . 'prill_common.' . $phpEx;
// Is fopen allowed to use URLs?
if (!ini_get('allow_url_fopen')) {
    message_die(GENERAL_MESSAGE, 'No_allow_url_fopen');
}
$confirm = isset($_REQUEST['confirm']) ? TRUE : FALSE;
$cancel = isset($_REQUEST['cancel']) ? TRUE : FALSE;
if ($cancel) {
    thoul_redirect('admin/' . append_sid('admin_im_network.' . $phpEx, true));
}
$mode = isset($_REQUEST['mode']) ? $_REQUEST['mode'] : '';
$s_hidden_fields = '';
if (isset($_REQUEST['autodetect'])) {
    $mode = 'autodetect_form';
}
switch ($mode) {
    case 'autodetect_form':
        $template->set_filenames(array('body' => 'network_detect_body.tpl'));
        $template->assign_vars(array('L_SUBMIT' => $lang['Submit'], 'L_NETWORK_TITLE' => $lang['Network_autodetect'], 'L_NETWORK_TEXT' => $lang['Network_autodetect_explain'], 'L_URL' => $lang['URL'], 'L_REQUIRED' => $lang['Items_required'], 'S_FORM_ACTION' => append_sid('admin_im_network.' . $phpEx)));
        break;
    case 'autodetect':
        $message = '';
        $site_url = isset($_REQUEST['site_url']) ? trim($_REQUEST['site_url']) : '';
        // If no url was entered complain ...
Example #4
0
//--------------------------------------------------------------------------------------------------
// This file builds the Message Log window content.
if (!defined('IN_PHPBB') || !defined('IN_PRILLIAN')) {
    die('Hacking attempt');
}
// Check possible variables
// $type - Possible values include "received", "sent", "offreceived", "offsent"
$type = !empty($_REQUEST['type']) ? $_REQUEST['type'] : 'received';
$cancel = isset($_REQUEST['cancel']) ? true : false;
$confirm = isset($_REQUEST['confirm']) ? true : false;
$delete = isset($_REQUEST['delete']) ? true : 0;
$mark_list = !empty($_REQUEST['mark']) ? $_REQUEST['mark'] : 0;
$sort_order = $_REQUEST['order'] == 'DESC' ? 'DESC' : 'ASC';
$start = isset($_REQUEST['start']) ? intval($_REQUEST['start']) : 0;
if ($cancel) {
    thoul_redirect('imclient.' . $phpEx . '?mode=log&type=' . $type);
}
$u_profile_base = $phpbb_root_path . "profile.{$phpEx}?mode=viewprofile&amp;" . POST_USERS_URL . '=';
$offsite = false;
$name_sql = '';
$network_mark = '';
// First, set up some options based on $type
switch ($type) {
    case 'offsent':
        $sender = $userdata['username'];
        $u_sender = $u_profile_base . $userdata['user_id'];
        $sql_user = '******' . $userdata['user_id'];
        $msg_sql = $sql_user;
        $type_title = $lang['Offsite_Messages_Sent_by'] . $userdata['username'];
        $no_msg = $lang['No_sent'];
        $name_sql = 'pm.instmsgs_to_username, ';