Esempio n. 1
0
            }
            $template->assign_block_vars('shouts', array('ID' => $id, 'SHOUTER' => $shouter_html, 'MESSAGE' => $message, 'DELETE_IMG' => $delpost_img, 'DATE' => $time));
        }
        // Gets the chat_rooms for display
        $archive_link = '?mode=archive';
        if ($user->data['user_level'] == ADMIN) {
            $template->assign_block_vars('rooms', array('NAME' => $lang['Admin_rooms'], 'LIST' => '', 'STYLED_LIST' => '', 'CLASS' => !empty($chat_room_all) ? ' class="active"' : '', 'LINK' => append_sid('ajax_chat.' . PHP_EXT . $archive_link . '&admin=1&all_rooms=1')));
            $admin_mode = request_var('admin', '');
            if (!empty($admin_mode)) {
                $admin_mode = true;
                $archive_link .= '&admin=1';
            } else {
                $admin_mode = false;
            }
        }
        $room_filter = $admin_mode == true ? "shout_room != ''" : "shout_room LIKE '%|" . $user->data['user_id'] . "|%'";
        $sql = "SELECT DISTINCT shout_room\n\t\t\t\tFROM " . AJAX_SHOUTBOX_TABLE . "\n\t\t\t\tWHERE " . $room_filter . "\n\t\t\t\tORDER BY shout_id DESC";
        $results = $db->sql_query($sql);
        $rooms = $db->sql_fetchrowset($results);
        $room_users = get_chat_room_users($rooms, $chat_room, $archive_link);
        $chatroom_title = $room_users['title'];
        $chatroom_userlist = $room_users['userlist'];
        $rooms = $room_users['rooms'];
        foreach ($rooms as $room) {
            $template->assign_block_vars('rooms', $room);
        }
    }
    $template->assign_vars(array('L_SHOUTBOX_EMPTY' => $lang['Shoutbox_empty'], 'L_SHOUT_ROOMS' => $lang['Shout_rooms'], 'L_SHOUT_ROOM_TITLE' => $chatroom_title, 'L_SHOUT_ROOM_LIST' => $chatroom_userlist));
}
full_page_generation($template_to_parse, $template_to_parse == 'ajax_chat_body.tpl' ? $lang['Ajax_Chat'] : $lang['Ajax_Archive'], '', '');
Esempio n. 2
0
					AND p.user_id = " . $user_id . "
				ORDER BY p.view_stamp DESC
				LIMIT " . $start . ", " . $config['posts_per_page'];
$result = $db->sql_query($sql);

while ($row = $db->sql_fetchrow($result))
{
	$viewer = $row['viewer_id'];
	$viewer_avatar = user_get_avatar($row['viewer_id'], $row['user_level'], $row['user_avatar'], $row['user_avatar_type'], $row['user_allowavatar']);
	$template->assign_block_vars('row', array(
		'AVATAR' => $viewer_avatar,
		'VIEW_BY' => colorize_username($viewer, $row['username'], $row['user_color'], $row['user_active']),
		'NUMBER' => $row['counter'],
		'STAMP' => create_date_ip($user->data['user_dateformat'], $row['view_stamp'], $user->data['user_timezone'])
		)
	);
}

$template->assign_vars(array(
	'PAGINATION' => generate_pagination('profile_view_user.' . PHP_EXT . '?' . POST_USERS_URL . '=' . $user_id, $total, $config['posts_per_page'], $start),
	'PROFILE' => '<a href="' . append_sid(CMS_PAGE_PROFILE . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $user_id) . '" class="nav-current">' . $profile['username'] . '</a>',
	'L_VIEW_TITLE' => $meta_content['page_title'],
	'L_VIEWER' => $lang['Username'],
	'L_NUMBER' => $lang['Views'],
	'L_STAMP' => $lang['Last_updated']
	)
);

full_page_generation('profile_view_user_body.tpl', $lang['Profile'] . ' - ' . $lang['Views'], '', '');

?>
Esempio n. 3
0
			'U_AIM' => $aim_url,
			'U_ICQ' => $icq_url,
			'U_MSN' => $msn_url,
			'U_SKYPE' => $skype_url,
			'U_YIM' => $yahoo_url,
			'L_POSTER_ONLINE_STATUS' => $online_status_lang,
			'POSTER_ONLINE_STATUS_CLASS' => $online_status_class,
			'U_POSTER_ONLINE_STATUS' => $online_status_url,
			)
		);
		$k++;
	}
}

$template->assign_vars(array(
	'L_USERNAME' => $lang['Username'],
	'L_FORUMS' => $lang['Staff_forums'],
	'L_STATS' => $lang['Staff_stats'],
	'L_POSTS' => $lang['Posts'],
	'L_TOPICS' => $lang['Topics'],
	'L_LAST_POST' => $lang['Last_Post'],
	'L_JOINED' => $lang['Joined'],
	'L_CONTACT' => $lang['Staff_contact'],
	'L_MESSENGER' => $lang['Staff_messenger'],
	'L_WWW' => $lang['Website'],
	)
);

full_page_generation('staff_body.tpl', $lang['Staff'], '', '');

?>
Esempio n. 4
0
*/

/**
*
* @Icy Phoenix is based on phpBB
* @copyright (c) 2008 phpBB Group
*
*/

define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(IP_ROOT_PATH . 'common.' . PHP_EXT);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management

$cms_page['page_id'] = 'privacy_policy';
$cms_page['page_nav'] = (!empty($cms_config_layouts[$cms_page['page_id']]['page_nav']) ? true : false);
$cms_page['global_blocks'] = (!empty($cms_config_layouts[$cms_page['page_id']]['global_blocks']) ? true : false);
$cms_auth_level = (isset($cms_config_layouts[$cms_page['page_id']]['view']) ? $cms_config_layouts[$cms_page['page_id']]['view'] : AUTH_ALL);
check_page_auth($cms_page['page_id'], $cms_auth_level);

setup_extra_lang(array('lang_policies'));

full_page_generation('privacy_policy_body.tpl', $lang['PRIVACY_POLICY_TITLE'], '', '');

?>
Esempio n. 5
0
    if (CanRate($pic_id, $user->data['user_id'])) {
        $template->assign_block_vars('hon_rating', array());
        for ($i = 0; $i < $album_config['rate_scale']; $i++) {
            $template->assign_block_vars('hon_rating.hon_row', array('VALUE' => $i + 1));
        }
    } else {
        $template->assign_block_vars('hon_rating_cant', array());
    }
    $template->assign_vars(array('L_PLEASE_RATE_IT' => $lang['Please_Rate_It'], 'L_ALREADY_RATED' => $lang['Already_rated'], 'L_PIC_ID' => $lang['Pic_ID'], 'L_RATING' => $lang['Rating'], 'L_PIC_TITLE' => $lang['Pic_Title'] . $album_config['clown_rateType'], 'L_PIC_DESC' => $lang['Pic_Desc'], 'L_POSTER' => $lang['Pic_Poster'], 'L_POSTED' => $lang['Posted'], 'L_VIEW' => $lang['View'], 'L_COMMENTS' => $lang['Comments'], 'CAT_TITLE' => $thiscat['cat_title'], 'U_VIEW_CAT' => append_sid(album_append_uid('album_cat.' . PHP_EXT . '?cat_id=' . $cat_id)), 'U_PIC' => append_sid(album_append_uid('album_pic.' . PHP_EXT . '?pic_id=' . $pic_id)), 'U_COMMENT' => append_sid(album_append_uid('album_showpage.' . PHP_EXT . '?pic_id=' . $pic_id)), 'S_ACTION' => append_sid(album_append_uid('album_hotornot.' . PHP_EXT)), 'PIC_TITLE' => $thispic['pic_title'], 'PIC_DESC' => nl2br($thispic['pic_desc']), 'POSTER' => $poster, 'PIC_TIME' => create_date($config['default_dateformat'], $thispic['pic_time'], $config['board_timezone']), 'PIC_VIEW' => $thispic['pic_view_count'], 'PIC_RATING' => $image_rating, 'PIC_COMMENTS' => $thispic['comments'], 'PIC_ID' => $pic_id, 'PICTURE_ID' => $pic_id));
    if ($album_config['rate']) {
        $template->assign_block_vars('rate_switch', array());
    }
    if ($album_config['comment']) {
        $template->assign_block_vars('comment_switch', array());
    }
    full_page_generation('album_hon.tpl', $lang['Album'], '', '');
} else {
    if (!$user->data['session_logged_in']) {
        message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
    }
    $rate_user_id = $user->data['user_id'];
    $rate_user_ip = $user->data['session_ip'];
    $pic_id = request_var('pic_id', 0);
    if ($pic_id <= 0) {
        message_die(GENERAL_ERROR, 'Wrong Pic ID');
    }
    if ($album_config['hon_rate_sep'] == true) {
        $rating_field = 'rate_hon_point';
    } else {
        $rating_field = 'rate_point';
    }
Esempio n. 6
0
	'L_ONLINE_STATUS' => $lang['Online_status'],
	'L_USER_WWW' => $lang['Website'],
	'L_USER_EMAIL' => $lang['Send_Email'],
	'L_USER_PROFILE' => $lang['Profile'],

	'L_VIEWS_COUNT' => $lang['Topic_count'],
	'L_LAST_VIEWED' => !empty($like) ? $lang['LIKE_TIME'] : $lang['Topic_time'],
	'L_FROM' => $lang['Location'],
	'L_JOINED' => $lang['Joined'],

	'S_POSTS_LIKES' => !empty($like) ? true : false,
	'S_MODE_SELECT' => $select_sort_mode,
	'S_ORDER_SELECT' => $select_sort_order,
	'S_MODE_ACTION' => append_sid($base_url),

	'CLOSE_WINDOW' => $lang['Close_window'],

	'PAGINATION' => $pagination,
	'PAGE_NUMBER' => sprintf($lang['Page_of'], (floor($start / $config['topics_per_page']) + 1), ceil($total_members / $config['topics_per_page'])),
	'L_GOTO_PAGE' => $lang['Goto_page']
	)
);

if (!empty($like))
{
	$gen_simple_header = true;
	$template->assign_var('S_POPUP', true);
}
full_page_generation('whoviewed_body.tpl', $page_title, '', '');

?>
Esempio n. 7
0
            $template->assign_vars(array('L_NO_LOGINS' => $lang['No_logins']));
            $template->assign_block_vars('switch_display_ips.switch_no_logins', array());
        }
        $template->assign_vars(array('L_USERNAME' => $lang['Username'], 'L_LOGINS' => $lang['Logins'], 'L_IP' => $lang['IP'], 'L_BROWSER' => $lang['Browser'], 'L_TIME' => $lang['Time']));
    }
}
// End Advanced IP Tools Pack MOD
//Start Quick Administrator User Options and Information MOD
if ($user->data['user_level'] == ADMIN) {
    $template->assign_block_vars('switch_user_admin', array());
}
$sql = "SELECT * FROM " . BANLIST_TABLE . " WHERE ban_userid = " . $profiledata['user_id'] . " OR ban_email = '" . $db->sql_escape($profiledata['user_email']) . "'";
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
    $banned_username = $row['ban_userid'];
    $banned_email = $row['ban_email'];
}
$db->sql_freeresult($result);
$template->assign_vars(array('L_QUICK_ADMIN_OPTIONS' => $lang['Quick_admin_options'], 'L_ADMIN_EDIT_PROFILE' => $lang['Admin_edit_profile'], 'L_ADMIN_EDIT_PERMISSIONS' => $lang['Admin_edit_permissions'], 'L_USER_ACTIVE_INACTIVE' => $profiledata['user_active'] == 1 ? $lang['User_active'] : $lang['User_not_active'], 'L_BANNED_USERNAME' => $banned_username == '' ? $lang['Username_not_banned'] : $lang['Username_banned'], 'L_BANNED_EMAIL' => $banned_email == '' ? $lang['User_email_not_banned'] : htmlspecialchars(sprintf($lang['User_email_banned'], $profiledata['user_email'])), 'L_USER_BAN_UNBAN' => $banned_username == '' ? $lang['USER_BAN'] : $lang['USER_UNBAN'], 'U_USER_BAN_UNBAN' => IP_ROOT_PATH . 'card.' . PHP_EXT . '?mode=' . ($banned_username == '' ? 'ban' : 'unban') . '&amp;' . POST_USERS_URL . '=' . $profiledata['user_id'] . '&amp;sid=' . $user->data['session_id'], 'U_ADMIN_EDIT_PROFILE' => ADM . '/admin_users.' . PHP_EXT . '?sid=' . $user->data['session_id'] . '&amp;' . POST_USERS_URL . '=' . $profiledata['user_id'] . '&amp;mode=edit&amp;redirect=yes', 'U_ADMIN_EDIT_PERMISSIONS' => ADM . '/admin_ug_auth.' . PHP_EXT . '?sid=' . $user->data['session_id'] . '&amp;' . POST_USERS_URL . '=' . $profiledata['user_id'] . '&amp;mode=user'));
//End Quick Administrator User Options and Information MOD
include IP_ROOT_PATH . 'includes/bb_usage_stats.' . PHP_EXT;
// We need to keep this here... to make sure also $view_bb_usage_allowed is assigned
$extra_stats_auth = !empty($view_bb_usage_allowed) || !empty($ip_display_auth) ? true : false;
$template->assign_vars(array('L_EXTRA_STATS' => !empty($show_extra_stats) ? $lang['EXTRA_STATS_HIDE'] : $lang['EXTRA_STATS_SHOW'], 'U_EXTRA_STATS' => append_sid(IP_ROOT_PATH . CMS_PAGE_PROFILE . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $profiledata['user_id'] . (!empty($show_extra_stats) ? '' : '&amp;stats=1')), 'S_EXTRA_STATS_AUTH' => !empty($extra_stats_auth) ? true : false, 'S_EXTRA_STATS' => !empty($show_extra_stats) ? true : false));
// MG Cash MOD For IP - BEGIN
if (!empty($config['plugins']['cash']['enabled'])) {
    $cm_viewprofile->post_vars($template, $profiledata, $user->data);
}
// MG Cash MOD For IP - END
full_page_generation('profile_view_body.tpl', htmlspecialchars($profiledata['username']), '', '');
Esempio n. 8
0
include IP_ROOT_PATH . 'common.' . PHP_EXT;
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management
include IP_ROOT_PATH . 'includes/functions_credits.' . PHP_EXT;
$mode = request_var('mode', '', true);
/*
* Parse for modes...
*/
setup_hacks_list_array();
scan_hl_files();
switch ($mode) {
    default:
        $sql = 'SELECT * FROM ' . HACKS_LIST_TABLE . "\n\t\t\t\tWHERE hack_hide = 'No'\n\t\t\t\tORDER BY hack_name ASC";
        $result = $db->sql_query($sql, 0, 'credits_');
        $row_class = '';
        $i = 0;
        while ($row = $db->sql_fetchrow($result)) {
            $row_class = ip_zebra_rows($row_class);
            $template->assign_block_vars('listrow', array('ROW_CLASS' => $row_class, 'HACK_ID' => $row['hack_id'], 'HACK_AUTHOR' => $row['hack_author_email'] != '' ? USE_CRYPTIC_EMAIL ? $row['hack_author'] . '<br />' . cryptize_hl_email($row['hack_author_email']) : '<a href="mailto:' . $row['hack_author_email'] . '">' . $row['hack_author'] . '</a>' : $row['hack_author'], 'HACK_WEBSITE' => $row['hack_author_website'] != '' ? '<a target="blank" href="' . $row['hack_author_website'] . '">' . $row['hack_author_website'] . '</a>' : $lang['No_Website'], 'HACK_NAME' => $row['hack_download_url'] != '' ? '<a target="blank" href="' . $row['hack_download_url'] . '">' . $row['hack_name'] . '</a>' : $row['hack_name'], 'HACK_DESC' => $row['hack_desc'], 'HACK_VERSION' => $row['hack_version'] != '' ? $row['hack_version'] : ''));
        }
        if (empty($i)) {
            $template->assign_block_vars('empty_switch', array());
            $template->assign_var('L_NO_HACKS', $lang['No_Hacks']);
        }
}
$template->assign_vars(array('L_PAGE_NAME' => $meta_content['page_title'], 'S_MODE_ACTION' => append_sid(basename(__FILE__)), 'L_VERSION' => $lang['Version'], 'L_AUTHOR' => $lang['Author'], 'L_DESCRIPTION' => $lang['Description'], 'L_HACK_NAME' => $lang['Hack_Name'], 'L_WEBSITE' => $lang['Website']));
full_page_generation('credits_display.tpl', $lang['Hacks_List'], '', '');
Esempio n. 9
0
			'L_STATUS' => $lang['Login_Status'],
			'L_HIDDEN' => $lang['Login_Hidden'],
			'L_VISIBLE' => $lang['Login_Visible'],
			'L_DEFAULT' => $lang['Login_Default'],

			'U_SEND_PASSWORD' => append_sid(CMS_PAGE_PROFILE . '?mode=sendpassword'),
			'U_RESEND_ACTIVATION_EMAIL' => append_sid(CMS_PAGE_PROFILE . '?mode=resend'),

			'S_HIDDEN_FIELDS' => $s_hidden_fields
			)
		);

		if (!isset($_GET['admin']) && ($config['require_activation'] == USER_ACTIVATION_SELF))
		{
			$template->assign_var('S_SWITCH_RESEND_ACTIVATION_EMAIL', true);
		}

		if (!isset($_GET['admin']))
		{
			$template->assign_block_vars('switch_login_type', array());
		}

		full_page_generation('login_body.tpl', $lang['Login'], '', '');
	}
	else
	{
		redirect(append_sid(CMS_PAGE_FORUM, true));
	}
}

?>
Esempio n. 10
0
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) define('IP_ROOT_PATH', './');
if (!defined('PHP_EXT')) define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
include(IP_ROOT_PATH . 'common.' . PHP_EXT);
include_once(IP_ROOT_PATH . 'includes/functions_groups.' . PHP_EXT);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management

if (!$user->data['session_logged_in'])
{
	redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=profile_main.' . PHP_EXT, true));
	exit;
}

//Start Output of Page
$link_name = '';
$nav_server_url = create_server_url();
$breadcrumbs['address'] = $lang['Nav_Separator'] . '<a href="' . $nav_server_url . append_sid(CMS_PAGE_PROFILE_MAIN) . '"' . (!empty($link_name) ? '' : ' class="nav-current"') . '>' . $lang['Profile'] . '</a>' . (!empty($link_name) ? ($lang['Nav_Separator'] . '<a class="nav-current" href="#">' . $link_name . '</a>') : '');

full_page_generation('profile_main_body.tpl', $lang['Profile'], '', '');

?>
Esempio n. 11
0
<?php

/**
*
* @package Icy Phoenix
* @version $Id$
* @copyright (c) 2008 Icy Phoenix
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
define('IN_ICYPHOENIX', true);
if (!defined('IP_ROOT_PATH')) {
    define('IP_ROOT_PATH', './');
}
if (!defined('PHP_EXT')) {
    define('PHP_EXT', substr(strrchr(__FILE__, '.'), 1));
}
include IP_ROOT_PATH . 'common.' . PHP_EXT;
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management
$gen_simple_header = true;
full_page_generation('bbcb_mg_colorpicker.tpl', $lang['bbcb_mg_colorpicker'], '', '');
Esempio n. 12
0
            $sql_d = "SELECT f.*\n\t\t\t\tFROM " . FORUMS_TABLE . " f\n\t\t\t\tWHERE f.forum_id = '" . $draft_row[$i]['forum_id'] . "'\n\t\t\t\tLIMIT 1";
            $result_d = $db->sql_query($sql_d);
            $draft_row_data = $db->sql_fetchrow($result_d);
            $db->sql_freeresult($result_d);
            $draft_image = '<img src="' . $images['topic_nor_unread'] . '" alt="" />';
            $draft_type = $lang['Drafts_NT'];
            $draft_load = 'loadn';
            $draft_cat_link = append_sid(IP_ROOT_PATH . CMS_PAGE_VIEWFORUM . '?' . POST_FORUM_URL . '=' . $draft_row_data['forum_id']);
            $draft_title_link = append_sid(IP_ROOT_PATH . 'drafts.' . PHP_EXT . '?mode=' . $draft_load . '&amp;d=' . $draft_row[$i]['draft_id']);
            $draft_row[$i]['draft_cat'] = '<a href="' . $draft_cat_link . '">' . $draft_row_data['forum_name'] . '</a>';
            $draft_row[$i]['draft_title'] = '<a href="' . $draft_title_link . '">' . $draft_row[$i]['draft_subject'] . '</a>';
        } else {
            $draft_image = '<img src="' . $images['topic_nor_read'] . '" alt="" />';
            $draft_type = $lang['Drafts_NPM'];
            $draft_load = 'loadp';
            $draft_cat_link = append_sid(IP_ROOT_PATH . CMS_PAGE_PRIVMSG);
            $draft_title_link = append_sid(IP_ROOT_PATH . 'drafts.' . PHP_EXT . '?mode=' . $draft_load . '&amp;d=' . $draft_row[$i]['draft_id']);
            $draft_subject = $draft_row[$i]['draft_subject'] ? $draft_row[$i]['draft_subject'] : '...';
            // Missing subject produces an empty link
            $draft_row[$i]['draft_cat'] = '<a href="' . $draft_cat_link . '">' . $lang['Drafts_NPM'] . '</a>';
            $draft_row[$i]['draft_title'] = '<a href="' . $draft_title_link . '">' . $draft_subject . '</a>';
        }
        $row_class = ip_zebra_rows($row_class);
        $template->assign_block_vars('draft_row', array('ROW_CLASS' => $row_class, 'S_DRAFT_ID' => $draft_row[$i]['draft_id'], 'DRAFT_IMG' => $draft_image, 'DRAFT_TYPE' => $draft_type, 'DRAFT_CAT_LINK' => $draft_cat_link, 'DRAFT_CAT' => $draft_row[$i]['draft_cat'], 'DRAFT_TITLE_LINK' => $draft_title_link, 'DRAFT_TITLE' => $draft_row[$i]['draft_title'], 'DRAFT_TIME' => create_date_ip($config['default_dateformat'], $draft_row[$i]['save_time'], $config['board_timezone']), 'U_DRAFT_LOAD' => append_sid(IP_ROOT_PATH . 'drafts.' . PHP_EXT . '?mode=' . $draft_load . '&amp;d=' . $draft_row[$i]['draft_id']), 'U_DRAFT_DELETE' => append_sid(IP_ROOT_PATH . 'drafts.' . PHP_EXT . '?mode=delete&amp;d=' . $draft_row[$i]['draft_id'])));
    }
    $template->assign_vars(array('PAGINATION' => generate_pagination('drafts.' . PHP_EXT . '?mode=list', $drafts_count, $config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $config['topics_per_page']) + 1, ceil($drafts_count / $config['topics_per_page'])), 'L_GOTO_PAGE' => $lang['Goto_page']));
} else {
    $template->assign_block_vars('switch_no_drafts', array());
}
full_page_generation('drafts_body.tpl', $lang['Drafts'], '', '');
        $order_by = "pics {$sort_order} LIMIT {$start}, " . $config['topics_per_page'];
        break;
    case 'last_pic':
        $order_by = "last_pic {$sort_order} LIMIT {$start}, " . $config['topics_per_page'];
        break;
    default:
        $order_by = "user_regdate {$sort_order} LIMIT {$start}, " . $config['topics_per_page'];
        break;
}
$sql = "SELECT u.username, u.user_id, u.user_active, u.user_color, u.user_regdate, COUNT(p.pic_id) AS pics, MAX(p.pic_id) AS last_pic, COUNT(c.cat_user_id) AS cats\n\t\tFROM " . USERS_TABLE . " AS u, " . ALBUM_TABLE . " AS p, " . ALBUM_CAT_TABLE . " AS c\n\t\tWHERE u.user_id <> " . ANONYMOUS . "\n\t\t\tAND c.cat_user_id = u.user_id\n\t\t\tAND c.cat_id = p.pic_cat_id\n\t\tGROUP BY user_id\n\t\tORDER BY {$order_by}";
$result = $db->sql_query($sql);
$memberrow = array();
while ($row = $db->sql_fetchrow($result)) {
    $memberrow[] = $row;
}
$row_class = '';
for ($i = 0; $i < sizeof($memberrow); $i++) {
    $username = colorize_username($memberrow[$i]['user_id'], $memberrow[$i]['username'], $memberrow[$i]['user_color'], $memberrow[$i]['user_active'], true, false, false, false);
    $row_class = ip_zebra_rows($row_class);
    $template->assign_block_vars('memberrow', array('ROW_CLASS' => $row_class, 'USERNAME' => $username, 'U_VIEWGALLERY' => append_sid(album_append_uid('album.' . PHP_EXT . '?user_id=' . $memberrow[$i]['user_id'])), 'JOINED' => create_date($lang['DATE_FORMAT'], $memberrow[$i]['user_regdate'], $config['board_timezone']), 'PICS' => $memberrow[$i]['pics']));
}
$sql = "SELECT COUNT(DISTINCT u.user_id) AS total\n\t\tFROM " . USERS_TABLE . " AS u, " . ALBUM_TABLE . " AS p, " . ALBUM_CAT_TABLE . " AS c\n\t\tWHERE u.user_id <> " . ANONYMOUS . "\n\t\t\tAND c.cat_user_id = u.user_id\n\t\t\tAND c.cat_id = p.pic_cat_id";
$result = $db->sql_query($sql);
$pagination = '&nbsp;';
if ($total = $db->sql_fetchrow($result)) {
    $total_galleries = $total['total'];
    $pagination = generate_pagination('album_personal_index.' . PHP_EXT . '?mode=' . $mode . '&amp;order=' . $sort_order, $total_galleries, $config['topics_per_page'], $start);
}
$template->assign_vars(array('PAGINATION' => $pagination, 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $config['topics_per_page']) + 1, ceil($total_galleries / $config['topics_per_page']))));
full_page_generation('album_personal_index_body.tpl', $lang['Album'], '', '');
Esempio n. 14
0
    $cms_page['global_blocks'] = $layout_row['global_blocks'] == 0 ? false : true;
    $cms_page['page_nav'] = $layout_row['page_nav'] == 0 ? false : true;
}
if (!$cms_default_page) {
    $meta_content['page_title'] = !empty($layout_name) ? $layout_name : $config['sitename'];
    $breadcrumbs['address'] = $lang['Nav_Separator'] . '<a class="nav-current" href="#">' . $meta_content['page_title'] . '</a>';
}
// Let's remove $auth->acl_get('a_') until I finish coding permissions properly... and also add/remove 'a_' when users are added/removed from administrators in ACP
//$is_admin = (($user->data['user_level'] == ADMIN) || $auth->acl_get('a_')) ? true : false;
$is_admin = $user->data['user_level'] == ADMIN ? true : false;
$cms_acp_url = '';
if ($is_admin || $auth->acl_get('cms_admin') || !empty($user->data['user_cms_auth']['cmsl_admin'][$layout])) {
    $cms_acp_url = '<br /><br /><div style="text-align: center;">';
    $cms_acp_url .= '<a href="' . append_sid('cms.' . PHP_EXT . '?mode=blocks&amp;l_id=' . $layout . (!empty($user->session_id) ? '&amp;sid=' . $user->session_id : '')) . '">' . $lang['CMS_ACP'] . '</a>';
    $cms_acp_url .= '</div>';
}
$layout_name_add = '';
$query = $_SERVER['QUERY_STRING'];
if (preg_match("/news=categories/", $query)) {
    $layout_name_add = $lang['LINK_NEWS_CAT'];
} elseif (preg_match("/news=archives/", $query)) {
    $layout_name_add = $lang['LINK_NEWS_ARC'];
}
if (!empty($layout_name_add)) {
    $layout_name = (empty($layout_name) ? '' : $layout_name . ' - ') . $layout_name_add;
}
$template->assign_vars(array('CMS_PAGE_TITLE' => !empty($layout_name) ? $layout_name : $config['sitename'], 'S_PAGE_NAV' => $cms_page['page_nav'], 'S_GLOBAL_BLOCKS' => $cms_page['global_blocks']));
// Start Blocks
$ip_cms->cms_parse_blocks($layout, false, false, '');
full_page_generation('layout/' . $layout_template, $meta_content['page_title'], $meta_content['description'], $meta_content['keywords']);
Esempio n. 15
0
        update_user_color($user->data['user_id'], $config['active_users_color'], 0);
        update_user_posts_details($user->data['user_id'], '', '', false, false);
        */
        $redirect_url = append_sid(CMS_PAGE_FORUM);
        meta_refresh(3, $redirect_url);
        $message = $lang['Unsub_success'] . '<br /><br />' . sprintf($lang['Click_return_group'], '<a href="' . append_sid(CMS_PAGE_GROUP_CP . '?' . POST_GROUPS_URL . '=' . $group_id) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid(CMS_PAGE_FORUM) . '">', '</a>');
        $db->clear_cache();
        message_die(GENERAL_MESSAGE, $message);
    } else {
        $unsub_msg = isset($_POST['unsub']) ? $lang['Confirm_unsub'] : $lang['Confirm_unsub_pending'];
        $s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" /><input type="hidden" name="unsub" value="1" />';
        $s_hidden_fields .= '<input type="hidden" name="sid" value="' . $user->data['session_id'] . '" />';
        $nav_server_url = create_server_url();
        $breadcrumbs['address'] = $lang['Nav_Separator'] . '<a href="' . $nav_server_url . append_sid(CMS_PAGE_GROUP_CP) . '" class="nav-current">' . $lang['Group_Control_Panel'] . '</a>';
        $template->assign_vars(array('MESSAGE_TITLE' => $lang['Confirm'], 'MESSAGE_TEXT' => $unsub_msg, 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'S_CONFIRM_ACTION' => append_sid(CMS_PAGE_GROUP_CP), 'S_HIDDEN_FIELDS' => $s_hidden_fields));
        full_page_generation('confirm_body.tpl', $lang['Group_Control_Panel'], '', '');
    }
} elseif ($group_id) {
    // Did the group moderator get here through an email?
    // If so, check to see if they are logged in.
    if (isset($_GET['validate'])) {
        if (!$user->data['session_logged_in']) {
            redirect(append_sid(CMS_PAGE_LOGIN . '?redirect=groupcp.' . PHP_EXT . '&' . POST_GROUPS_URL . '=' . $group_id, true));
        }
    }
    // For security, get the ID of the group moderator.
    $sql = "SELECT g.group_moderator, g.group_type, g.group_rank, g.group_color, aa.auth_mod\n\t\tFROM (" . GROUPS_TABLE . " g\n\t\tLEFT JOIN " . AUTH_ACCESS_TABLE . " aa ON aa.group_id = g.group_id)\n\t\tWHERE g.group_id = '" . $group_id . "'\n\t\tORDER BY auth_mod DESC";
    $result = $db->sql_query($sql);
    if ($group_info = $db->sql_fetchrow($result)) {
        $group_moderator = $group_info['group_moderator'];
        $group_rank = $group_info['group_rank'];
Esempio n. 16
0
            $s_hidden_fields .= '<input type="hidden" name="m_id" value="' . $m_id . '" />';
            $s_hidden_fields .= '<input type="hidden" name="action" value="' . $action . '" />';
            $s_hidden_fields .= '<input type="hidden" name="item_type" value="' . $item_type . '" />';
            $template->assign_vars(array('MESSAGE_TITLE' => $lang['Confirm'], 'MESSAGE_TEXT' => $lang['Confirm_delete_item'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_ENABLED' => $lang['Enabled'], 'L_DISABLED' => $lang['Disabled'], 'S_CONFIRM_ACTION' => append_sid('cms_menu.' . PHP_EXT . '?mode=menu_list'), 'S_HIDDEN_FIELDS' => $s_hidden_fields));
            full_page_generation(CMS_TPL . 'confirm_body.tpl', $lang['Confirm'], '', '');
        } else {
            if ($mi_id != 0 && $m_id != 0) {
                $sql = "DELETE FROM " . CMS_NAV_MENU_TABLE . "\n\t\t\t\t\tWHERE menu_item_id = '" . $mi_id . "'\n\t\t\t\t\t\tOR menu_parent_id = '" . $m_id . "'";
                $result = $db->sql_query($sql);
                $message = $lang['Menu_deleted'] . '<br /><br />' . sprintf($lang['Click_Return_CMS_Menu'], '<a href="' . append_sid('cms_menu.' . PHP_EXT . '?mode=menu_list') . '">', '</a>') . '<br /><br />';
                message_die(GENERAL_MESSAGE, $message);
            } else {
                message_die(GENERAL_MESSAGE, $lang['CMS_Menu_Not_Exist']);
            }
        }
    } elseif ($action == 'list' || $action == false) {
        $sql = "SELECT * FROM " . CMS_NAV_MENU_TABLE . "\n\t\t\t\t\t\tWHERE menu_parent_id = '0'\n\t\t\t\t\t\tORDER BY menu_name ASC";
        $result = $db->sql_query($sql);
        $template_to_parse = CMS_TPL . 'cms_menu_list_body.tpl';
        $template->assign_var('CMS_PAGE_TITLE', $lang['CMS_MENU_PAGE']);
        $menu_item = array();
        while ($menu_item = $db->sql_fetchrow($result)) {
            $menu_id = $menu_item['menu_id'];
            $append_url = '&amp;mi_id=' . $menu_item['menu_item_id'] . '&amp;m_id=' . $menu_item['menu_id'];
            $template->assign_block_vars('menu_row', array('MENU_ID' => $menu_item['menu_id'], 'MENU_NAME' => $menu_item['menu_name'], 'MENU_DESCRIPTION' => $menu_item['menu_desc'], 'U_ITEMS_EDIT' => append_sid('cms_menu.' . PHP_EXT . '?mode=menu_block' . $append_url), 'U_EDIT' => append_sid('cms_menu.' . PHP_EXT . '?mode=menu_list&amp;action=edit' . $append_url), 'U_DELETE' => append_sid('cms_menu.' . PHP_EXT . '?mode=menu_list&amp;action=delete' . $append_url)));
        }
        $template->assign_vars(array('L_CMS_MENU_TITLE' => $lang['CMS_MENU_PAGE'], 'L_CMS_MENU_EXPLAIN' => $lang['CMS_MENU_PAGE_EXPLAIN'], 'L_CMS_ID' => $lang['CMS_ID'], 'L_CMS_ACTIONS' => $lang['CMS_Actions'], 'L_CMS_NAME' => $lang['CMS_Name'], 'L_CMS_DESCRIPTION' => $lang['CMS_Description'], 'L_CMS_EDIT_MENU_ITEMS' => $lang['CMS_Menu_Edit_menu_links_button'], 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], 'L_SUBMIT' => $lang['Submit'], 'L_PREVIEW' => $lang['Preview'], 'L_MENU_ADD' => $lang['CMS_Menu_New_Menu'], 'S_MENU_ACTION' => append_sid('cms_menu.' . PHP_EXT . '?mode=menu_list'), 'S_HIDDEN_FIELDS' => $s_hidden_fields));
    }
}
full_page_generation($template_to_parse, $lang['Home'], '', '');
Esempio n. 17
0
	$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $user->data['session_id'] . '" />';

	$l_confirm = ($delete || ($mode == 'delete')) ? $lang['Confirm_delete'] : $lang['Confirm_delete_poll'];

	$template->assign_vars(array(
		'MESSAGE_TITLE' => $lang['Information'],
		'MESSAGE_TEXT' => $l_confirm,

		'L_YES' => $lang['Yes'],
		'L_NO' => $lang['No'],

		'S_CONFIRM_ACTION' => append_sid('posting.' . PHP_EXT),
		'S_HIDDEN_FIELDS' => $s_hidden_fields
		)
	);
	full_page_generation('confirm_body.tpl', $lang['Confirm'], '', '');
}
elseif ($mode == 'vote')
{
	// Vote in a poll
	$voted_id = request_var('vote_id', array('' => 0));
	$voted_id = (sizeof($voted_id) > 1) ? array_unique($voted_id) : $voted_id;

	// Does this topic contain a poll?
	if (!empty($post_info['poll_start']))
	{
		$sql = "SELECT o.*
			FROM " . POLL_OPTIONS_TABLE . " o
			WHERE o.topic_id = " . $topic_id . "
			ORDER BY o.poll_option_id";
		$result = $db->sql_query($sql);
Esempio n. 18
0
    $row['username'] = $events[$i]['event_author'];
    $row['post_username'] = $events[$i]['event_author'];
    $row['topic_time'] = $events[$i]['event_time'];
    $row['id2'] = $events[$i]['event_last_author_id'];
    $row['post_username2'] = $events[$i]['event_last_author'];
    $row['user2'] = $events[$i]['event_last_author'];
    $row['topic_last_post_id'] = $events[$i]['event_last_id'];
    $row['topic_views'] = $events[$i]['event_views'];
    $row['forum_id'] = $events[$i]['event_forum_id'];
    $row['forum_name'] = $events[$i]['event_forum_name'];
    $row['topic_calendar_time'] = $events[$i]['event_calendar_time'];
    $row['topic_calendar_duration'] = $events[$i]['event_calendar_duration'];
    $row['topic_icon'] = $events[$i]['event_icon'];
    $topic_rowset[] = $row;
}
$split_type = false;
$display_nav_tree = intval($config['calendar_forum']) == 1;
$footer = $s_forum_list . '&nbsp;<input type="submit" value="' . $lang['Go'] . '" class="liteoption" />';
topic_list('TOPIC_LIST_SCHEDULER', 'topics_list_box', $topic_rowset, $title, $split_type, $display_nav_tree, $footer);
// system
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
$s_hidden_fields .= '<input type="hidden" name="date" value="' . $date . '" />';
$s_hidden_fields .= '<input type="hidden" name="start" value="' . $start . '" />';
$nav_separator = empty($nav_separator) ? empty($lang['Nav_Separator']) ? '&nbsp;&raquo;&nbsp;' : $lang['Nav_Separator'] : $nav_separator;
$total = $topics_count;
if ($total == 0) {
    $total++;
}
$template->assign_vars(array('PAGINATION' => generate_pagination('calendar_scheduler.' . PHP_EXT . '?d=' . $date . '&amp;mode=' . $mode, $total, $config['topics_per_page'], $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $config['topics_per_page']) + 1, ceil($topics_count / $config['topics_per_page'])), 'L_GOTO_PAGE' => $lang['Goto_page'], 'NAV_SEPARATOR' => $nav_separator, 'S_ACTION' => append_sid('calendar_scheduler.' . PHP_EXT), 'S_HIDDEN_FIELDS' => $s_hidden_fields));
full_page_generation('calendar_scheduler_body.tpl', $lang['Calendar'], '', '');
Esempio n. 19
0
                $pic_preview_hs = '';
                if ($album_config['lb_preview']) {
                    $slideshow_cat = '';
                    $slideshow = !empty($slideshow_cat) ? ', { slideshowGroup: \'' . $slideshow_cat . '\' } ' : '';
                    $pic_preview_hs = ' class="highslide" onclick="return hs.expand(this' . $slideshow . ');"';
                    $pic_preview = 'onmouseover="showtrail(\'' . append_sid(album_append_uid('album_picm.' . PHP_EXT . '?pic_id=' . $row['pic_id'])) . '\',\'' . addslashes($row[$j]['pic_title']) . '\', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"';
                }
                //if(!$auth_data['view'])
                if ($auth_data['view'] >= 0) {
                    $template_vars = array('L_USERNAME' => $row['pic_username'], 'U_PROFILE' => append_sid(CMS_PAGE_PROFILE . '?mode=viewprofile&u=' . $row['pic_user_id']), 'PIC_PREVIEW_HS' => $pic_preview_hs, 'PIC_PREVIEW' => $pic_preview, 'CATEGORY' => $row['cat_user_id'] != ALBUM_PUBLIC_GALLERY ? $lang['Users_Personal_Galleries'] : $row['cat_title'], 'U_PIC_CAT' => $row['cat_id'] == $cat_id ? append_sid(album_append_uid('album_cat.' . PHP_EXT . '?cat_id=' . $row['cat_id'])) : append_sid(album_append_uid('album.' . PHP_EXT)), 'GROUP_NAME' => 'all');
                    album_build_detail_vars($template_vars, $row);
                    $template->assign_block_vars('switch_search_results.search_results', $template_vars);
                    $in[$numres] = $row['pic_id'];
                    $numres++;
                }
            }
        } while ($row = $db->sql_fetchrow($result));
        $template->assign_vars(array('L_NRESULTS' => $numres, 'L_TRESULTS' => $total_pics, 'IMG_FOLDER' => $images['topic_nor_read'], 'L_TCATEGORY' => $lang['Pic_Cat'], 'L_TTITLE' => $lang['Pic_Image'], 'L_TSUBMITER' => $lang['Author'], 'L_TSUBMITED' => $lang['Time'], 'S_THUMBNAIL_SIZE' => $album_config['thumbnail_size']));
    } else {
        message_die(GENERAL_MESSAGE, $lang['No_search_match']);
    }
} else {
    message_die(GENERAL_ERROR, 'Bad request');
    //$template->assign_block_vars('switch_search', array());
}
// --------------------------------
// Pagination
// --------------------------------
$template->assign_vars(array('PAGINATION' => generate_pagination(append_sid(album_append_uid('album_search.' . PHP_EXT . '?mode=' . $mode . '&amp;search=' . $search)), $total_pics, $pics_per_page, $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], floor($start / $pics_per_page) + 1, ceil($total_pics / $pics_per_page))));
full_page_generation('album_search_body.tpl', $lang['Search'], '', '');
Esempio n. 20
0
		)
	);
}

while (($i % $smileys_columns) != 0)
{
	$smiley_url = $server_url . 'images/spacer.gif';
	$template->assign_block_vars('smileys_row.smileys_column', array(
		'SMILEY_IMG' => false,
		'SMILEY_BBC_INPUT' => 'sm_' . $i,
		'SMILEY_BBC' => ''
		)
	);
	$i++;
}

$template->assign_vars(array(
	'L_CLOSE_WINDOW' => $lang['Close_window'],
	'U_STANDARD_SMILEYS' => append_sid('posting.' . PHP_EXT . '?mode=smilies'),

	'S_CATEGORY_SELECT' => $s_categories,
	'S_COLSPAN' => $s_colspan,
	'S_COLWIDTH' => $s_colwidth,
	'S_ACTION' => append_sid('smileys.' . PHP_EXT),
	)
);

$gen_simple_header = true;
full_page_generation('smileys_body.tpl', $lang['SMILEYS'], '', '');

?>
Esempio n. 21
0
    }
} elseif ($mode) {
    $template->assign_block_vars('switch_current_sig', array());
    $signature = $user->data['user_sig'];
    //$user_sig = prepare_message($user->data['user_sig'], $html_on, $bbcode_on, $smilies_on);
    $user_sig = $user->data['user_sig'];
    if ($user_sig != '') {
        $bbcode->is_sig = true;
        $user_sig = $bbcode->parse($user_sig);
        $bbcode->is_sig = false;
        $user_sig = censor_text($user_sig);
        $user_sig = '<br />' . $config['sig_line'] . '<br />' . $user_sig;
        //$user_sig = nl2br($user_sig);
    } else {
        $user_sig = $lang['sig_none'];
    }
}
$template->assign_vars(array('SIG_SAVE' => $lang['sig_save'], 'SIG_CANCEL' => $lang['Cancel'], 'SIG_PREVIEW' => $lang['Preview'], 'SIG_EDIT' => $lang['sig_edit'], 'SIG_CURRENT' => $lang['sig_current'], 'SIG_LINK' => append_sid(CMS_PAGE_PROFILE . '?mode=signature'), 'L_SIGNATURE' => $lang['Signature'], 'L_SIGNATURE_EXPLAIN' => sprintf($lang['Signature_explain'], $config['max_sig_chars']), 'HTML_STATUS' => $html_status, 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . append_sid('faq.' . PHP_EXT . '?mode=bbcode') . '" target="_blank">', '</a>'), 'SMILIES_STATUS' => $smilies_status, 'SIGNATURE' => stripslashes($signature), 'CURRENT_PREVIEW' => $user_sig, 'PREVIEW' => htmlspecialchars(stripslashes($signature)), 'REAL_PREVIEW' => $preview_sig, 'SAVE_MESSAGE' => $save_message));
// BBCBMG - BEGIN
$s_disable_bbc_special_content = empty($config['allow_all_bbcode']) ? true : false;
include IP_ROOT_PATH . 'includes/bbcb_mg.' . PHP_EXT;
$template->assign_var_from_handle('BBCB_MG', 'bbcb_mg');
// BBCBMG - END
// BBCBMG SMILEYS - BEGIN
include_once IP_ROOT_PATH . 'includes/functions_post.' . PHP_EXT;
generate_smilies('inline');
include IP_ROOT_PATH . 'includes/bbcb_smileys_mg.' . PHP_EXT;
$template->assign_var_from_handle('BBCB_SMILEYS_MG', 'bbcb_smileys_mg');
// BBCBMG SMILEYS - END
full_page_generation('profile_signature.tpl', $lang['Signature'], '', '');
Esempio n. 22
0
include(IP_ROOT_PATH . 'common.' . PHP_EXT);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
// End session management

$template->assign_vars(array(
	'L_RSS_NEWS_HELP_TITLE'				=> $lang['Rss_news_help_title'],
	'L_RSS_NEWS_HELP_HEADER'			=> $lang['Rss_news_help_header'],
	'L_RSS_NEWS_HELP_EXPLAIN'			=> $lang['Rss_news_help_explain'],
	'L_RSS_NEWS_HELP_HEADER_2'		=> $lang['Rss_news_help_header_2'],
	'L_RSS_NEWS_HELP_EXPLAIN_2'		=> $lang['Rss_news_help_explain_2'],
	'L_RSS_NEWS_HELP_HEADER_3'		=> $lang['Rss_news_help_header_3'],
	'L_RSS_NEWS_HELP_EXPLAIN_3'		=> $lang['Rss_news_help_explain_3'],
	'L_RSS_NEWS_HELP_RIGHTS'			=> $lang['Rss_news_help_rights'],
	'U_RSS'												=> IP_ROOT_PATH . 'rss.' . PHP_EXT,
	'U_RSS_NEWS'									=> IP_ROOT_PATH . 'news_rss.' . PHP_EXT,
	'U_RSS_ATOM'									=> IP_ROOT_PATH . 'rss.' . PHP_EXT . '?atom',
	'L_URL_RSS_EXPLAIN'						=> $lang['L_url_rss_explain'],
	'L_URL_RSS_NEWS_EXPLAIN'			=> $lang['L_url_rss_news_explain'],
	'L_URL_RSS_ATOM_EXPLAIN'			=> $lang['L_url_rss_atom_explain'],
	'L_CLOSE_WINDOW'							=> $lang['Close_window']
	)
);

$gen_simple_header = true;
full_page_generation('rss_news_help.tpl', $lang['Rss_news_help_title'], '', '');

?>
Esempio n. 23
0
function username_search($search_match, $ajax_search = false)
{
    global $db, $config, $template, $images, $theme, $user, $lang;
    global $starttime, $gen_simple_header;
    $username_list = '';
    if (!empty($search_match)) {
        $username_search = preg_replace('/\\*/', '%', phpbb_clean_username($search_match));
        $sql = "SELECT username\n\t\t\tFROM " . USERS_TABLE . "\n\t\t\tWHERE LOWER(username) LIKE '" . $db->sql_escape(strtolower($username_search)) . "' AND user_id <> " . ANONYMOUS . "\n\t\t\tORDER BY username";
        $result = $db->sql_query($sql);
        if ($row = $db->sql_fetchrow($result)) {
            do {
                $username_list .= '<option value="' . htmlspecialchars($row['username']) . '">' . htmlspecialchars($row['username']) . '</option>';
            } while ($row = $db->sql_fetchrow($result));
        } else {
            $username_list .= '<option>' . $lang['No_match'] . '</option>';
        }
        $db->sql_freeresult($result);
    }
    $target_form_name = preg_replace('/[^A-Za-z0-9-_]+/', '', request_var('target_form_name', 'post'));
    $target_element_name = preg_replace('/[^A-Za-z0-9-_]+/', '', request_var('target_element_name', 'username'));
    $s_hidden_fields = build_hidden_fields(array('target_form_name' => $target_form_name, 'target_element_name' => $target_element_name));
    $template->assign_vars(array('USERNAME' => !empty($search_match) ? phpbb_clean_username($search_match) : '', 'L_CLOSE_WINDOW' => $lang['Close_window'], 'L_SEARCH_USERNAME' => $lang['FIND_USERNAME'], 'L_UPDATE_USERNAME' => $lang['Select_username'], 'L_SELECT' => $lang['Select'], 'L_SEARCH' => $lang['Search'], 'L_SEARCH_EXPLAIN' => $lang['Search_author_explain'], 'L_CLOSE_WINDOW' => $lang['Close_window'], 'S_TARGET_FORM_NAME' => $target_form_name, 'S_TARGET_ELEMENT_NAME' => $target_element_name, 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_USERNAME_OPTIONS' => $username_list, 'S_SEARCH_ACTION' => append_sid(CMS_PAGE_SEARCH . '?mode=searchuser')));
    if ($ajax_search = true) {
        if ($username_list == '') {
            $template->assign_var('USERNAME_LIST_VIS', 'style="display: none;"');
        }
    } else {
        if ($username_list != '') {
            $template->assign_block_vars('switch_select_name', array());
        }
    }
    $gen_simple_header = true;
    full_page_generation('search_username.tpl', $lang['Search'], '', '');
    return;
}
Esempio n. 24
0
			$config_data['default'] = $target_userdata[$user_field];
			$input = $class_form->create_input($config_data['name'], $config_data);

			// dump to template
			$template->assign_block_vars('field', array(
				'L_NAME' => $class_settings->get_lang($config_data['lang_key']),
				'L_EXPLAIN' => !empty($config_data['explain']) ? $class_settings->get_lang($config_data['explain']) : '',
				'INPUT' => $input,
				)
			);
		}
	}

	// system
	$s_hidden_fields .= '<input type="hidden" name="sid" value="' . $user->data['session_id'] . '" />';
	$s_hidden_fields .= '<input type="hidden" name="view_user_id" value="' . $view_user_id . '" />';
	$s_hidden_fields .= '<input type="hidden" name="sub" value="' . $menu_name . '" />';
	$s_hidden_fields .= '<input type="hidden" name="mod_id" value="' . $mod_id . '" />';
	$s_hidden_fields .= '<input type="hidden" name="mod_sub_id" value="' . $sub_id . '" />';
	$s_hidden_fields .= '<input type="hidden" name="set" value="add" />';
	$template->assign_vars(array(
		'S_PROFILCP_ACTION' => append_sid('profile_options.' . PHP_EXT),
		'NAV_SEPARATOR' => $nav_separator,
		'S_HIDDEN_FIELDS' => $s_hidden_fields,
		)
	);

	full_page_generation('profile_options_body.tpl', $lang['Preferences'], '', '');
}

?>
Esempio n. 25
0
    if ($album_config['disp_late'] == 1) {
        album_build_recent_pics($allowed_cat);
    }
    // Highest Rated Pics
    if ($album_config['disp_high'] == 1) {
        album_build_highest_rated_pics($allowed_cat);
    }
    // Most Viewed Pics
    if ($album_config['disp_mostv'] == 1) {
        album_build_most_viewed_pics($allowed_cat);
    }
    //Random Pics
    if ($album_config['disp_rand'] == 1) {
        album_build_random_pics($allowed_cat);
    }
    $template->assign_vars(array('BREADCRUMBS_ADDRESS' => empty($breadcrumbs['address']) ? $meta_content['page_title_clean'] != $config['sitename'] ? $lang['Nav_Separator'] . '<a href="#" class="nav-current">' . $meta_content['page_title_clean'] . '</a>' : '' : $breadcrumbs['address'], 'ALBUM_NAV' => $album_nav_cat_desc, 'S_COLS' => $cols, 'S_COL_WIDTH' => $cols_width, 'S_THUMBNAIL_SIZE' => $album_config['thumbnail_size'], 'TARGET_BLANK' => $album_config['fullpic_popup'] ? 'target="_blank"' : '', 'L_RAND_PICS' => $lang['Random_Pictures'], 'L_HI_RATINGS' => $lang['Highest_Rated_Pictures'], 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'], 'L_MOST_VIEWED' => $lang['Most_Viewed_Pictures'], 'L_NO_PICS' => $lang['No_Pics'], 'L_PIC_TITLE' => $lang['Pic_Image'], 'L_PIC_ID' => $lang['Pic_ID'], 'L_VIEW' => $lang['View'], 'L_POSTER' => $lang['Pic_Poster'], 'L_POSTED' => $lang['Posted'], 'L_ALBUM_ALLPICS' => $lang['All_Picture_List_Of_User'], 'L_ALBUM_OTF' => $lang['Pic_Gallery'], 'L_ALBUM_HON' => $lang['Hot_Or_Not'], 'L_ALBUM_RDF' => $lang['Pic_RDF'], 'L_ALBUM_RSS' => $lang['Pic_RSS'], 'U_ALBUM_ALLPICS' => append_sid(album_append_uid('album_allpics.' . PHP_EXT)), 'U_ALBUM_OTF' => append_sid(album_append_uid('album_otf.' . PHP_EXT)), 'U_ALBUM_HON' => append_sid(album_append_uid('album_hotornot.' . PHP_EXT)), 'U_ALBUM_RDF' => append_sid(album_append_uid('album_rdf.' . PHP_EXT)), 'U_ALBUM_RSS' => append_sid(album_append_uid('album_rss.' . PHP_EXT))));
} else {
    if ($album_view_mode == ALBUM_VIEW_LIST) {
        include ALBUM_MOD_PATH . 'album_memberlist.' . PHP_EXT;
    } else {
        // include our special personal gallery files
        // this file holds all the code to handle personal galleries
        // except moderation and management of personal gallery categories.
        include ALBUM_MOD_PATH . 'album_personal.' . PHP_EXT;
    }
}
if (empty($album_view_mode)) {
    album_display_index($album_user_id, ALBUM_ROOT_CATEGORY, true, true, true);
}
full_page_generation($template_to_parse, $meta_content['page_title'], $meta_content['description'], $meta_content['keywords']);
Esempio n. 26
0
			'U_TAG_TEXT' => append_sid(CMS_PAGE_TAGS . '?mode=view&amp;tag_text=' . htmlspecialchars(urlencode($tag['tag_text']))),
			'TAG_TEXT' => htmlspecialchars($tag['tag_text']),
			'TAG_FONT_SIZE' => $tag_font_size,
			'TAG_COUNT' => $tag['tag_count'],
			)
		);
		$i++;
	}
}

$template->assign_vars(array(
	'S_SHOW_CLOUD' => ($mode == 'cloud') ? true : false,
	'S_FORM_ACTION' => append_sid(CMS_PAGE_TAGS),
	'S_HIDDEN_FIELDS' => $s_hidden_fields,
	'S_SORT_ORDER_SELECT' => $sort_order_select_box,
	'S_SORT_DIR_SELECT' => $sort_dir_select_box,

	'U_TAGS_SEARCH_PAGE' => append_sid(CMS_PAGE_TAGS),
	'U_TAGS_SEARCH_REPLACE' => append_sid(CMS_PAGE_TAGS . '?mode=replace'),
	'U_TAGS' => append_sid(CMS_PAGE_TAGS),
	)
);

$pagination_append = ($mode == 'list') ? ('&amp;sort_order=' . $sort_order . '&amp;sort_dir=' . $sort_dir) : ('&amp;tag_text=' . $tag_text);

generate_full_pagination(CMS_PAGE_TAGS . '?mode=' . $mode . $pagination_append, $num_items, $per_page, $start);

full_page_generation($template_to_parse, $lang['TOPIC_TAGS'], '', '');

?>
Esempio n. 27
0
        $sql = 'DELETE FROM ' . DIGEST_SUBSCRIBED_FORUMS_TABLE . ' WHERE user_id = ' . $user->data['user_id'];
        $result = $db->sql_query($sql);
        // Note that if "all_forums" is checked, this is noted in the subscriptions table. It does not put
        // each forum in the subscribed_forums table. This conserves disk space. "all_forums" means all
        // forums this user is allowed to access.
        if ($_POST['all_forums'] !== 'on') {
            foreach ($_POST as $key => $value) {
                if (substr($key, 0, 6) == 'forum_') {
                    $sql = 'INSERT INTO ' . DIGEST_SUBSCRIBED_FORUMS_TABLE . ' (user_id, forum_id) VALUES (' . $user->data['user_id'] . ', ' . htmlspecialchars(substr($key, 6)) . ')';
                    $result = $db->sql_query($sql);
                }
            }
        }
    }
    // Show appropriate confirmation message
    $confim_message = '<br /><br />' . sprintf($lang['digest_click_return'], '<a href="' . append_sid('digests.' . PHP_EXT) . '">', '</a>');
    if ($update_type == 'unsubscribe') {
        $message = $lang['digest_unsubscribe'] . $confim_message;
    } elseif ($update_type == 'create') {
        $message = $lang['digest_create'] . $confim_message;
    } else {
        $message = $lang['digest_modify'] . $confim_message;
    }
    $redirect_url = append_sid('digests.' . PHP_EXT);
    meta_refresh(3, $redirect_url);
    message_die(GENERAL_MESSAGE, $message);
}
// Generate the page
include_once IP_ROOT_PATH . 'includes/users_zebra_block.' . PHP_EXT;
full_page_generation($template_to_parse, $lang['digest_page_title'], '', '');
Esempio n. 28
0
$easter_egg_link  = '';
$easter_egg_array = array('http://www.abcp.de', 'http://www.cback.de', 'http://www.german-garrison.de', 'http://www.501st.com', 'http://www.cback.net', 'http://www.google.de', 'http://www.oxpus.de');

srand((double)microtime() * 1000000);
$rnd = rand(0, sizeof($easter_egg_array) - 1);
$easter_egg_link = $easter_egg_array[$rnd];
*/

/*
* Include Visual Confirmation System
*/
define('CRACKER_TRACKER_VCONFIRM', true);
define('CTRACKER_ACCOUNT_FREE', true);
include_once(IP_ROOT_PATH . 'includes/ctracker/engines/ct_visual_confirm.' . PHP_EXT);

// Send some vars to the template
$template->assign_vars(array(
	'CONFIRM_IMAGE' => $confirm_image,
	'PAGE_ICON' => $images['ctracker_key_icon'],
	'S_FORM_ACTION' => append_sid('login_captcha.' . PHP_EXT . '?mode=check&amp;uid=' . $user_id),
	'S_HIDDEN_FIELDS' => $s_hidden_fields,
	'L_HEADER_TEXT' => $lang['ctracker_login_title'],
	'L_DESCRIPTION' => $lang['ctracker_login_confim'],
	'L_BUTTON_TEXT' => $lang['ctracker_login_button'],
	//'EASTER_EGG_LINK' => $easter_egg_link
	)
);

full_page_generation('login_captcha.tpl', $lang['ctracker_login_title'], '', '');

?>
Esempio n. 29
0
    $template->css_include = array_merge($template->css_include, $css_temp);
    unset($css_temp);
    include_once IP_ROOT_PATH . 'includes/functions_admin_phpbb3.' . PHP_EXT;
    $roles_admin = request_var('roles_admin', 0);
    if (empty($roles_admin)) {
        include_once IP_ROOT_PATH . 'includes/class_cms_permissions.' . PHP_EXT;
        $cms_permissions = new cms_permissions();
        $pmode = request_var('pmode', '');
        $pmode_array = array('intro', 'setting_cms_user_global', 'setting_cms_group_global', 'setting_cms_user_local', 'setting_cms_group_local', 'setting_plugins_user_global', 'setting_plugins_group_global', 'setting_user_global', 'setting_group_global', 'setting_user_local', 'setting_group_local', 'setting_admin_global', 'setting_mod_global', 'view_admin_global', 'view_user_global', 'view_mod_global');
        $pmode = in_array($pmode, $pmode_array) ? $pmode : $pmode_array[0];
        $cms_permissions->main(0, $pmode);
        $template_to_parse = CMS_TPL . $cms_permissions->tpl_name;
        $page_title = $lang[$cms_permissions->page_title];
    } else {
        include_once IP_ROOT_PATH . 'includes/class_cms_permissions_roles.' . PHP_EXT;
        $cms_permissions_roles = new cms_permissions_roles();
        $rmode = request_var('rmode', '');
        $rmode_array = array('admin_roles', 'cms_roles', 'mod_roles', 'plugins_roles', 'user_roles');
        $rmode = in_array($rmode, $rmode_array) ? $rmode : $rmode_array[0];
        $cms_permissions_roles->main(0, $rmode);
        $template_to_parse = CMS_TPL . $cms_permissions_roles->tpl_name;
        $page_title = $lang[$cms_permissions_roles->page_title];
    }
    $template->assign_vars(array('S_CMS_ACTION' => append_sid($cms_admin->root . '?mode=auth&amp;pmode=' . $pmode), 'U_CMS_BASE_URL' => append_sid($cms_admin->root . '?mode=auth'), 'ICON_MOVE_UP' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_arrow_up.png" alt="' . $lang['MOVE_UP'] . '" title="' . $lang['MOVE_UP'] . '" />', 'ICON_MOVE_UP_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_arrow_up_gray.png" alt="' . $lang['MOVE_UP'] . '" title="' . $lang['MOVE_UP'] . '" />', 'ICON_MOVE_DOWN' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_arrow_down.png" alt="' . $lang['MOVE_DOWN'] . '" title="' . $lang['MOVE_DOWN'] . '" />', 'ICON_MOVE_DOWN_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_arrow_down_gray.png" alt="' . $lang['MOVE_DOWN'] . '" title="' . $lang['MOVE_DOWN'] . '" />', 'ICON_EDIT' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_edit.png" alt="' . $lang['EDIT'] . '" title="' . $lang['EDIT'] . '" />', 'ICON_EDIT_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_edit.png" alt="' . $lang['EDIT'] . '" title="' . $lang['EDIT'] . '" />', 'ICON_DELETE' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_delete.png" alt="' . $lang['DELETE'] . '" title="' . $lang['DELETE'] . '" />', 'ICON_DELETE_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_delete.png" alt="' . $lang['DELETE'] . '" title="' . $lang['DELETE'] . '" />', 'ICON_SYNC' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_refresh.png" alt="' . $lang['RESYNC'] . '" title="' . $lang['RESYNC'] . '" />', 'ICON_SYNC_DISABLED' => '<img src="' . IP_ROOT_PATH . 'templates/common/images/cms_icon_refresh.png" alt="' . $lang['RESYNC'] . '" title="' . $lang['RESYNC'] . '" />', 'IMG_USER_SEARCH' => $images['cms_icon_search']));
}
if (empty($cms_admin->mode)) {
    $template_to_parse = CMS_TPL . 'cms_index_body.tpl';
    $template->assign_var('CMS_PAGE_TITLE', false);
}
full_page_generation($template_to_parse, $page_title, '', '');
Esempio n. 30
0
$pagination = generate_pagination($base_url, $total_topics, $topic_limit, $start);

if($total_topics == '0')
{
	$template->assign_block_vars('switch_no_topics', array());
}

$template->assign_vars(array(
	'L_RECENT_TITLE' => ($total_topics == '1') ? sprintf($lang['Recent_title_one'], $total_topics, $l_mode) : sprintf($lang['Recent_title_more'], $total_topics, $l_mode),
	'L_TODAY' => $lang['Recent_today'],
	'L_YESTERDAY' => $lang['Recent_yesterday'],
	'L_LAST24' => $lang['Recent_last24'],
	'L_LASTWEEK' => $lang['Recent_lastweek'],
	'L_LAST' => $lang['Recent_last'],
	'L_DAYS' => $lang['Recent_days'],
	'L_SELECT_MODE' => $lang['Recent_select_mode'],
	'L_SHOWING_POSTS' => $lang['Recent_showing_posts'],
	'L_LASTPOST' => ($mode == 'utview') ? $lang['Topic_time'] : $lang['Last_Post'],
	'L_NO_TOPICS' => $lang['Recent_no_topics'],
	'U_SORT_CAT' => append_sid('recent.' . PHP_EXT . '?amount_days=' . $amount_days . '&amp;mode=' . $mode . '&amp;psort=cat&amp;start=' . $start . (!empty($user_id) ? ('&amp;' . POST_USERS_URL . '=' . $user_id) : '')),
	'U_SORT_TIME' => append_sid('recent.' . PHP_EXT . '?amount_days=' . $amount_days . '&amp;mode=' . $mode . '&amp;psort=time&amp;start=' . $start . (!empty($user_id) ? ('&amp;' . POST_USERS_URL . '=' . $user_id) : '')),
	'AMOUNT_DAYS' => $amount_days,
	'FORM_ACTION' => append_sid('recent.' . PHP_EXT),
	'PAGINATION' => ($total_topics != '0') ? $pagination : '&nbsp;',
	'PAGE_NUMBER' => ($total_topics != '0') ? sprintf($lang['Page_of'], (floor($start / $topic_limit) + 1), ceil($total_topics / $topic_limit)) : '&nbsp;',
	)
);

full_page_generation('recent_body.tpl', $lang['Recent_topics'], '', '');

?>