/**
         * Adds the CSS/Style output specific to the chat_session. Each chat_session can be different. So we need to output the CSS after each chat box with all the
         * specifics for colors, fonts, widths, etc.
         *
         * @global    none
         *
         * @param    $chat_session - This is out master settings instance.
         *
         * @return    $content - The output of the styles. Will be echoed at some other point.
         */
        function chat_session_box_styles($chat_session, $id_override = '')
        {
            $content = '';
            //		echo $chat_session;
            if (empty($id_override)) {
                $CSS_prefix = '#wpmudev-chat-box-' . $chat_session['id'];
                $content .= '<style type="text/css" id="wpmudev-chat-box-' . $chat_session['id'] . '-css">';
            } else {
                $CSS_prefix = '#wpmudev-chat-box-' . $id_override;
                $content .= '<style type="text/css" id="wpmudev-chat-box-' . $id_override . '-css">';
            }
            $content .= $CSS_prefix . ' {
				height: ' . $chat_session['box_height'] . ';
				width: ' . $chat_session['box_width'] . ';
				color: ' . $chat_session['box_text_color'] . ';
				background-color: ' . $chat_session['box_background_color'] . '; ' . $chat_session['box_font_style'] . ';
				border: ' . $chat_session['box_border_width'] . ' solid ' . $chat_session['box_border_color'] . '; } ';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-header {
				background-color: ' . $chat_session['box_border_color'] . '; } ';
            if ($chat_session['users_list_position'] != "none") {
                $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list {
				background-color: ' . $chat_session['users_list_background_color'] . ';
				overflow-y: auto; overflow-x: hidden; } ';
                if ($chat_session['users_list_position'] == "left" || $chat_session['users_list_position'] == "right") {
                    $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list {
					width: ' . $chat_session['users_list_width'] . ';
					float: ' . $chat_session['users_list_position'] . '; } ';
                } else {
                    if ($chat_session['users_list_position'] == "above" || $chat_session['users_list_position'] == "below") {
                        $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list {
					height: ' . $chat_session['users_list_height'] . '; } ';
                    }
                }
                if (!empty($chat_session['users_list_header'])) {
                    $users_list_header_font_style = '';
                    if (!empty($chat_session['users_list_header_font_family'])) {
                        if (isset($this->_chat_options_defaults['fonts_list'][$chat_session['users_list_header_font_family']])) {
                            $users_list_header_font_style .= 'font-family: ' . $this->_chat_options_defaults['fonts_list'][$chat_session['users_list_header_font_family']] . ';';
                        }
                    }
                    if (!empty($chat_session['users_list_header_font_size'])) {
                        $users_list_header_font_style .= 'font-size: ' . wpmudev_chat_check_size_qualifier($chat_session['users_list_header_font_size']) . ';';
                    }
                    $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list .wpmudev-chat-users-list-header {
					color: ' . $chat_session['users_list_header_color'] . ';
					' . $users_list_header_font_style . '; } ';
                }
                if ($chat_session['users_list_show'] == "avatar") {
                    $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list ul li.wpmudev-chat-user a {
						width: ' . $chat_session['users_list_avatar_width'] . ';
						height:' . $chat_session['users_list_avatar_width'] . ';
						text-decoration: none;
						display: block; } ';
                    if (isset($chat_session['users_list_avatar_border_width']) && !empty($chat_session['users_list_avatar_border_width'])) {
                        $users_list_avatar_width = wpmudev_chat_check_size_qualifier($chat_session['users_list_avatar_border_width']);
                    } else {
                        $users_list_avatar_width = '0';
                    }
                    $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list ul li.wpmudev-chat-user a img {
						width: ' . $chat_session['users_list_avatar_width'] . ';
						height:' . $chat_session['users_list_avatar_width'] . ';
						border-width: ' . $users_list_avatar_width . ';
						border-style: solid;
						} ';
                    if (isset($chat_session['users_list_moderator_avatar_border_color']) && !empty($chat_session['users_list_moderator_avatar_border_color'])) {
                        $users_list_moderator_avatar_border_color = $chat_session['users_list_moderator_avatar_border_color'];
                    } else {
                        if (isset($chat_session['users_list_background_color']) && !empty($chat_session['users_list_background_color'])) {
                            $users_list_moderator_avatar_border_color = $chat_session['users_list_background_color'];
                        }
                    }
                    if ($users_list_moderator_avatar_border_color) {
                        $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list ul.wpmudev-chat-moderators li.wpmudev-chat-user a img {
						border-color: ' . $users_list_moderator_avatar_border_color . '; }';
                    }
                    if (isset($chat_session['users_list_user_avatar_border_color']) && !empty($chat_session['users_list_user_avatar_border_color'])) {
                        $users_list_user_avatar_border_color = $chat_session['users_list_user_avatar_border_color'];
                    } else {
                        if (isset($chat_session['users_list_background_color']) && !empty($chat_session['users_list_background_color'])) {
                            $users_list_user_avatar_border_color = $chat_session['users_list_background_color'];
                        }
                    }
                    if ($users_list_user_avatar_border_color) {
                        $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list ul.wpmudev-chat-users li.wpmudev-chat-user a img {
						border-color: ' . $users_list_user_avatar_border_color . '; }';
                    }
                } else {
                    if ($chat_session['users_list_show'] == "name") {
                        $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list ul.wpmudev-chat-moderators li.wpmudev-chat-user a {
					color: ' . $chat_session['users_list_moderator_color'] . ';
					text-decoration: none;
					' . $chat_session['users_list_font_style'] . '; } ';
                        $content .= $CSS_prefix . ' div.wpmudev-chat-module-users-list ul.wpmudev-chat-users li.wpmudev-chat-user a {
					color: ' . $chat_session['users_list_name_color'] . ';
					text-decoration: none;
					' . $chat_session['users_list_font_style'] . '; } ';
                    }
                }
            }
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list {
				width: ' . $chat_session['show_messages_width'] . ';
				background-color: ' . $chat_session['row_area_background_color'] . ';
				float: ' . $chat_session['show_messages_position'] . '; } ';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row {
				background-color:' . $chat_session['row_background_color'] . ';
				border-top:' . $chat_session['row_border_width'] . ' solid ' . $chat_session['row_border_color'] . ';
				border-bottom:' . $chat_session['row_border_width'] . ' solid ' . $chat_session['row_border_color'] . ';
				border-left: 0; border-right: 0;
				margin-bottom: ' . $chat_session['row_spacing'] . '; } ';
            if (isset($this->chat_auth['auth_hash']) && !empty($this->chat_auth['auth_hash'])) {
                $content .= $CSS_prefix . '.wpmudev-chat-box-moderator div.wpmudev-chat-module-messages-list div.wpmudev-chat-row-auth_hash-' . $this->chat_auth['auth_hash'] . ' ul.wpmudev-chat-row-footer  li.wpmudev-chat-user-invite, #wpmudev-chat-box-' . $chat_session['id'] . '.wpmudev-chat-box-moderator div.wpmudev-chat-module-messages-list div.wpmudev-chat-row-auth_hash-' . $this->chat_auth['auth_hash'] . ' ul.wpmudev-chat-row-footer  li.wpmudev-chat-admin-actions-item-block-ip  { display:none; } ';
            }
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row a.wpmudev-chat-user-avatar {
			display: block; width: ' . $chat_session['row_avatar_width'] . '; height: ' . $chat_session['row_avatar_width'] . '; }';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row a.wpmudev-chat-user-avatar img {
			border: 0; width: ' . $chat_session['row_avatar_width'] . '; height: ' . $chat_session['row_avatar_width'] . '; }';
            if (empty($chat_session['row_date_color'])) {
                $chat_session['row_date_color'] = $chat_session['row_background_color'];
            }
            if ($chat_session['row_date'] == "enabled") {
                if (!empty($chat_session['row_date_text_color'])) {
                    $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row span.date {
					color: ' . $chat_session['row_date_text_color'] . '; } ';
                }
                if (!empty($chat_session['row_date_color'])) {
                    $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row span.date {
					background-color:' . $chat_session['row_date_color'] . '; } ';
                }
            }
            if ($chat_session['row_time'] == "enabled") {
                if (!empty($chat_session['row_date_text_color'])) {
                    $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row span.time {
					color: ' . $chat_session['row_date_text_color'] . '; } ';
                }
                if (!empty($chat_session['row_date_color'])) {
                    $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row span.time {
					background-color:' . $chat_session['row_date_color'] . '; } ';
                }
            }
            if ($chat_session['row_name_avatar'] == "name" || $chat_session['row_name_avatar'] == "name-avatar") {
                $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row a.wpmudev-chat-user-name {
				color: ' . $chat_session['row_name_color'] . '; } ';
                $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row-moderator a.wpmudev-chat-user-name {
				color: ' . $chat_session['row_moderator_name_color'] . '; } ';
            }
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row code {
				background-color:' . $chat_session['row_code_color'] . '; } ';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-messages-list div.wpmudev-chat-row p.wpmudev-chat-message {
				color:' . $chat_session['row_text_color'] . ';
				' . $chat_session['row_font_style'] . '; } ';
            $content .= $CSS_prefix . ' ul.wpmudev-chat-actions-menu ul.wpmudev-chat-actions-settings-menu {
				background-color: ' . $chat_session['box_border_color'] . ';
				border: 0px;
			}';
            if (!empty($chat_session['box_border_color'])) {
                $content .= $CSS_prefix . ' ul.wpmudev-chat-actions-menu ul.wpmudev-chat-actions-settings-menu li {
				background-color: ' . $chat_session['box_border_color'] . ';
				border-left: 1px solid ' . $chat_session['box_text_color'] . ';
				border-right: 1px solid ' . $chat_session['box_text_color'] . ';
				border-bottom: 1px solid ' . $chat_session['box_text_color'] . ';
			}';
            }
            $content .= $CSS_prefix . ' ul.wpmudev-chat-actions-menu ul.wpmudev-chat-actions-settings-menu a {
				color: ' . $chat_session['box_text_color'] . ';
				background-color: ' . $chat_session['box_border_color'] . '
			}';
            $content .= $CSS_prefix . ' ul.wpmudev-chat-actions-menu ul.wpmudev-chat-actions-settings-menu a:hover {
				color: ' . $chat_session['box_border_color'] . ';
				background-color: ' . $chat_session['box_text_color'] . '
			}';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-message-area textarea.wpmudev-chat-send {
				height: ' . $chat_session['row_message_input_height'] . ';
				background-color: ' . $chat_session['row_message_input_background_color'] . ';
				color: ' . $chat_session['row_message_input_text_color'] . '; ' . $chat_session['row_message_input_font_style'] . ';
				resize: ' . $chat_session['row_message_input_lock'] . ';
			}';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-message-area textarea.wpmudev-chat-send::-webkit-input-placeholder {
			color: ' . $chat_session['row_message_input_text_color'] . '; }';
            // set the placeholder text color to match the actual color for text.
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-message-area textarea.wpmudev-chat-send::-webkit-input-placeholder {
			color: ' . $chat_session['row_message_input_text_color'] . '; }';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-message-area textarea.wpmudev-chat-send:-moz-placeholder {
			color: ' . $chat_session['row_message_input_text_color'] . '; }';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-message-area textarea.wpmudev-chat-send::-moz-placeholder {
			color: ' . $chat_session['row_message_input_text_color'] . '; }';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-message-area textarea.wpmudev-chat-send:-ms-input-placeholder {
			color: ' . $chat_session['row_message_input_text_color'] . '; }';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-message-area ul.wpmudev-chat-send-meta {
				background-color: ' . $chat_session['box_border_color'] . '; }';
            $content .= $CSS_prefix . ' div.wpmudev-chat-module-message-area ul.wpmudev-chat-send-meta li.wpmudev-chat-send-input-emoticons ul.wpmudev-chat-emoticons-list {
			background-color: ' . $chat_session['box_border_color'] . '; }';
            $content .= '</style>';
            return $content;
        }
function wpmudev_chat_form_section_dashboard($form_section = 'widget')
{
    global $wpmudev_chat;
    //	echo "form_section[". $form_section ."]<br />";
    //	echo "wpmudev_chat<pre>"; print_r($wpmudev_chat->_chat_options[$form_section]); echo "</pre>";
    //	echo "wpmudev_chat<pre>"; print_r($wpmudev_chat->_chat_options); echo "</pre>";
    ?>

	<fieldset>
		<legend><?php 
    _e('Chat Widget on Dashboard', $wpmudev_chat->translation_domain);
    ?>
</legend>
		<table border="0" cellpadding="4" cellspacing="0">
			<tr>
				<td class="chat-label-column chat-label-column-top"><label for="chat_dashboard_widget"><?php 
    if (is_network_admin()) {
        _e('Enable Chat Widget on Network Dashboard?', $wpmudev_chat->translation_domain);
    } else {
        _e('Enable Chat Widget on Dashboard?', $wpmudev_chat->translation_domain);
    }
    ?>
</label></td>
				<td class="chat-value-column">
					<select id="chat_dashboard_widget" name="chat[dashboard_widget]">
						<option value="enabled" <?php 
    print $wpmudev_chat->get_option('dashboard_widget', $form_section) == 'enabled' ? 'selected="selected"' : '';
    ?>
><?php 
    _e('Enabled', $wpmudev_chat->translation_domain);
    ?>
</option>
						<option value="disabled" <?php 
    print $wpmudev_chat->get_option('dashboard_widget', $form_section) == 'disabled' ? 'selected="selected"' : '';
    ?>
><?php 
    _e('Disabled', $wpmudev_chat->translation_domain);
    ?>
</option>
					</select>

					<p class="description"><?php 
    _e('If enabled, Users will able to control visibility via their profile.', $wpmudev_chat->translation_domain);
    ?>
</p>
				</td>
				<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('dashboard_widget', 'tip');
    ?>
</td>
			</tr>
			<tr>
				<td class="chat-label-column">
					<label for="dashboard_widget_title"><?php 
    _e("Title", $wpmudev_chat->translation_domain);
    ?>
</label>
				</td>
				<td class="chat-value-column">
					<input type="text" id="chat_dashboard_widget_title" name="chat[dashboard_widget_title]" value="<?php 
    echo $wpmudev_chat->get_option('dashboard_widget_title', $form_section);
    ?>
" size="5" placeholder="<?php 
    echo wpmudev_chat_get_help_item('box_title', 'placeholder');
    ?>
"/>

				</td>
				<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('box_title', 'tip');
    ?>
</td>
			</tr>
			<tr>
				<td class="chat-label-column">
					<label for="chat_dashboard_widget_height"><?php 
    _e("Height", $wpmudev_chat->translation_domain);
    ?>
</label>
				</td>
				<td class="chat-value-column">
					<input type="text" id="chat_dashboard_widget_height" name="chat[dashboard_widget_height]" class="size" size="5"
						value="<?php 
    echo wpmudev_chat_check_size_qualifier($wpmudev_chat->get_option('dashboard_widget_height', $form_section));
    ?>
"
						placeholder="<?php 
    echo wpmudev_chat_get_help_item('box_height', 'placeholder');
    ?>
"/>
				</td>
				<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('box_height', 'tip');
    ?>
</td>
			</tr>
		</table>
	</fieldset>

	<fieldset>
		<legend><?php 
    _e('Chat Status Widget on Dashboard', $wpmudev_chat->translation_domain);
    ?>
</legend>
		<table border="0" cellpadding="4" cellspacing="0">
			<tr>
				<td class="chat-label-column chat-label-column-top"><label for="chat_dashboard_status_widget"><?php 
    if (is_network_admin()) {
        _e('Enable Chat Status Widget on Network Dashboard?', $wpmudev_chat->translation_domain);
    } else {
        _e('Enable Chat Status Widget on Dashboard?', $wpmudev_chat->translation_domain);
    }
    ?>
</label></td>
				<td class="chat-value-column">
					<select id="chat_dashboard_status_widget" name="chat[dashboard_status_widget]">
						<option value="enabled" <?php 
    print $wpmudev_chat->get_option('dashboard_status_widget', $form_section) == 'enabled' ? 'selected="selected"' : '';
    ?>
><?php 
    _e('Enabled', $wpmudev_chat->translation_domain);
    ?>
</option>
						<option value="disabled" <?php 
    print $wpmudev_chat->get_option('dashboard_status_widget', $form_section) == 'disabled' ? 'selected="selected"' : '';
    ?>
><?php 
    _e('Disabled', $wpmudev_chat->translation_domain);
    ?>
</option>
					</select>

					<p class="description"><?php 
    _e('If enabled, Users will able to control visibility via their profile.', $wpmudev_chat->translation_domain);
    ?>
</p>
				</td>
				<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('dashboard_status_widget', 'tip');
    ?>
</td>
			</tr>
			<tr>
				<td class="chat-label-column">
					<label for="dashboard_status_widget_title"><?php 
    _e("Title", $wpmudev_chat->translation_domain);
    ?>
</label>
				</td>
				<td class="chat-value-column">
					<input type="text" id="chat_dashboard_status_widget_title" name="chat[dashboard_status_widget_title]" value="<?php 
    echo $wpmudev_chat->get_option('dashboard_status_widget_title', $form_section);
    ?>
" size="5" placeholder="<?php 
    echo wpmudev_chat_get_help_item('box_title', 'placeholder');
    ?>
"/>
				</td>
				<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('box_title', 'tip');
    ?>
</td>
			</tr>
		</table>
	</fieldset>

	<fieldset>
		<legend><?php 
    _e('Chat Friends widget on Dashboard', $wpmudev_chat->translation_domain);
    ?>
</legend>
		<p><?php 
    _e('Requires either the WPMUDEV Friends plugins or BuddyPress with Friends option enabled', $wpmudev_chat->translation_domain);
    ?>
</p>
		<table border="0" cellpadding="4" cellspacing="0">
			<tr>
				<td class="chat-label-column chat-label-column-top"><label for="chat_dashboard_friends_widget"><?php 
    if (is_multisite() && is_network_admin()) {
        _e('Enable Chat Friends Widget on Network Dashboard?', $wpmudev_chat->translation_domain);
    } else {
        _e('Enable Chat Friends Widget on Dashboard?', $wpmudev_chat->translation_domain);
    }
    ?>
</label></td>
				<td class="chat-value-column">
					<select id="chat_dashboard_friends_widget" name="chat[dashboard_friends_widget]">
						<option value="enabled" <?php 
    print $wpmudev_chat->get_option('dashboard_friends_widget', $form_section) == 'enabled' ? 'selected="selected"' : '';
    ?>
><?php 
    _e('Enabled', $wpmudev_chat->translation_domain);
    ?>
</option>
						<option value="disabled" <?php 
    print $wpmudev_chat->get_option('dashboard_friends_widget', $form_section) == 'disabled' ? 'selected="selected"' : '';
    ?>
><?php 
    _e('Disabled', $wpmudev_chat->translation_domain);
    ?>
</option>
					</select>

					<p class="description"><?php 
    _e('If enabled, Users will able to control visibility via their profile.', $wpmudev_chat->translation_domain);
    ?>
</p>
				</td>
				<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('dashboard_friends_widget', 'tip');
    ?>
</td>
			</tr>
			<tr>
				<td class="chat-label-column">
					<label for="dashboard_friends_widget_title"><?php 
    _e("Title", $wpmudev_chat->translation_domain);
    ?>
</label>
				</td>
				<td class="chat-value-column">
					<input type="text" id="chat_dashboard_friends_widget_title" name="chat[dashboard_friends_widget_title]" value="<?php 
    echo $wpmudev_chat->get_option('dashboard_friends_widget_title', $form_section);
    ?>
" size="5" placeholder="<?php 
    echo wpmudev_chat_get_help_item('box_title', 'placeholder');
    ?>
"/>
				</td>
				<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('box_title', 'tip');
    ?>
</td>
			</tr>
			<tr>
				<td class="chat-label-column">
					<label for="chat_dashboard_friends_widget_height"><?php 
    _e("Height", $wpmudev_chat->translation_domain);
    ?>
</label>
				</td>
				<td class="chat-value-column">
					<input type="text" id="chat_dashboard_friends_widget_height" name="chat[dashboard_friends_widget_height]" class="size" size="5"
						value="<?php 
    echo wpmudev_chat_check_size_qualifier($wpmudev_chat->get_option('dashboard_friends_widget_height', $form_section));
    ?>
"
						placeholder="<?php 
    echo wpmudev_chat_get_help_item('dashboard_friends_widget_height', 'placeholder');
    ?>
"/>
				</td>
				<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('dashboard_friends_widget_height', 'tip');
    ?>
</td>
			</tr>
		</table>
	</fieldset>

<?php 
}
function wpmudev_chat_users_list($form_section = 'page')
{
    global $wpmudev_chat;
    ?>
	<fieldset>
		<legend><?php 
    _e('Show list of chat Users', $wpmudev_chat->translation_domain);
    ?>
</legend>
		<p class="info"><?php 
    _e("With this option you can show the list of users participating in the chat session. You may position the users list on either side of the chat window. You may also chose to display the user avatar or name.", $wpmudev_chat->translation_domain);
    ?>
</p>
		<p class="info"><?php 
    _e("For left right positions the avatar option works best. For above or below positions the name format works best.", $wpmudev_chat->translation_domain);
    ?>
</p>

		<table border="0" cellpadding="4" cellspacing="0">
		<tr>
			<td class="chat-label-column"><label for="chat_users_list_position"><?php 
    _e("Show Users List Position", $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<select id="chat_users_list_position" name="chat[users_list_position]" >
					<option value="none" <?php 
    print $wpmudev_chat->get_option('users_list_position', $form_section) == 'none' ? 'selected="selected"' : '';
    ?>
><?php 
    _e("Do not show users list", $wpmudev_chat->translation_domain);
    ?>
</option>
					<option value="right" <?php 
    print $wpmudev_chat->get_option('users_list_position', $form_section) == 'right' ? 'selected="selected"' : '';
    ?>
><?php 
    _e("To the Right of the Messages list", $wpmudev_chat->translation_domain);
    ?>
</option>
					<option value="left" <?php 
    print $wpmudev_chat->get_option('users_list_position', $form_section) == 'left' ? 'selected="selected"' : '';
    ?>
><?php 
    _e("To the left of the Messages list", $wpmudev_chat->translation_domain);
    ?>
</option>
					<option value="above" <?php 
    print $wpmudev_chat->get_option('users_list_position', $form_section) == 'above' ? 'selected="selected"' : '';
    ?>
><?php 
    _e("Above of the Messages list", $wpmudev_chat->translation_domain);
    ?>
</option>
					<option value="below" <?php 
    print $wpmudev_chat->get_option('users_list_position', $form_section) == 'below' ? 'selected="selected"' : '';
    ?>
><?php 
    _e("Below the the Messages list", $wpmudev_chat->translation_domain);
    ?>
</option>
				</select>
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_position', 'tip');
    ?>
</td>
		</tr>
		<tr>
			<td class="chat-label-column"><label for="chat_users_list_style"><?php 
    _e("Show Moderators and Users", $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<select id="chat_users_list_style" name="chat[users_list_style]" >
					<option value="split" <?php 
    print $wpmudev_chat->get_option('users_list_style', $form_section) == 'split' ? 'selected="selected"' : '';
    ?>
><?php 
    _e("Split - Show moderator and user as separate lists. ", $wpmudev_chat->translation_domain);
    ?>
</option>
					<option value="combined" <?php 
    print $wpmudev_chat->get_option('users_list_style', $form_section) == 'combined' ? 'selected="selected"' : '';
    ?>
><?php 
    _e("Combined - Show moderators first, then users.", $wpmudev_chat->translation_domain);
    ?>
</option>
				</select>
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_style', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_width_tr">
			<td class="chat-label-column"><label for="chat_users_list_width"><?php 
    _e('List Width/Height', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_width" name="chat[users_list_width]" class=""
					value="<?php 
    print $wpmudev_chat->get_option('users_list_width', $form_section);
    ?>
"
					placeholder="<?php 
    echo wpmudev_chat_get_help_item('users_list_width', 'placeholder');
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_width', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_background_color_tr">
			<td class="chat-label-column"><label for="chat_users_list_background_color"><?php 
    _e('Background Color', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_background_color" name="chat[users_list_background_color]" class="pickcolor_input"
					value="<?php 
    echo $wpmudev_chat->get_option('users_list_background_color', $form_section);
    ?>
"
					data-default-color="<?php 
    echo $wpmudev_chat->get_option('users_list_background_color', $form_section);
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_background_color', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_width_tr">
			<td class="chat-label-column"><label for="chat_users_list_threshold_delete"><?php 
    _e('Remove Inactive User after (seconds)', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_threshold_delete" name="chat[users_list_threshold_delete]" class=""
					value="<?php 
    print $wpmudev_chat->get_option('users_list_threshold_delete', $form_section);
    ?>
"
					placeholder="<?php 
    echo wpmudev_chat_get_help_item('users_list_threshold_delete', 'placeholder');
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_threshold_delete', 'tip');
    ?>
</td>
		</tr>

		<tr>
			<td class="chat-label-column"><label for="chat_users_list_header"><?php 
    _e("Header Above Lists", $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" name="chat[users_list_header]" id="chat_users_list_header"
					value="<?php 
    echo $wpmudev_chat->get_option('users_list_header', $form_section);
    ?>
"
					placeholder="<?php 
    echo wpmudev_chat_get_help_item('users_list_header', 'placeholder');
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_header', 'tip');
    ?>
</td>
		</tr>
		<tr>
			<td class="chat-label-column"><label for="chat_users_list_header_font_family"><?php 
    _e("Header Font", $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<select id="chat_users_list_header_font_family" name="chat[users_list_header_font_family]">
					<option value=""><?php 
    _e("-- None inherit from theme --", $wpmudev_chat->translation_domain);
    ?>
</option>
					<?php 
    foreach ($wpmudev_chat->_chat_options_defaults['fonts_list'] as $font_name => $font) {
        ?>
						<option value="<?php 
        print $font_name;
        ?>
" <?php 
        print $wpmudev_chat->get_option('users_list_header_font_family', $form_section) == $font_name ? 'selected="selected"' : '';
        ?>
 ><?php 
        print $font_name;
        ?>
</option>
					<?php 
    }
    ?>
				</select>

			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_header_font_family', 'tip');
    ?>
</td>
		</tr>
		<tr>
			<td class="chat-label-column"><label for="chat_users_list_header_font_size"><?php 
    _e("Header Font Size", $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<?php 
    $users_list_header_font_size = trim($wpmudev_chat->get_option('users_list_header_font_size', $form_section));
    ?>
				<input type="text" name="chat[users_list_header_font_size]" id="chat_users_list_header_font_size"
					value="<?php 
    echo !empty($users_list_header_font_size) ? wpmudev_chat_check_size_qualifier($users_list_header_font_size) : '';
    ?>
"
					placeholder="<?php 
    echo wpmudev_chat_get_help_item('users_list_header_font_size', 'placeholder');
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_header_font_size', 'tip');
    ?>
</td>
		</tr>
		<tr>
			<td class="chat-label-column"><label for="chat_users_list_header_color"><?php 
    _e('Header Text Color', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_header_color" name="chat[users_list_header_color]" class="pickcolor_input"
					value="<?php 
    echo $wpmudev_chat->get_option('users_list_header_color', $form_section);
    ?>
"
					data-default-color="<?php 
    echo $wpmudev_chat->get_option('users_list_header_color', $form_section);
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_header_color', 'tip');
    ?>
</td>
		</tr>

		<tr id="chat_users_list_show_tr">
			<?php 
    $users_list_show = $wpmudev_chat->get_option('users_list_show', $form_section);
    ?>

			<td class="chat-label-column"><label for="chat_users_list_show"><?php 
    _e("Show Users List", $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<select id="chat_users_list_show" name="chat[users_list_show]" >
					<option value="avatar" <?php 
    print $users_list_show == 'avatar' ? 'selected="selected"' : '';
    ?>
><?php 
    _e("Avatars", $wpmudev_chat->translation_domain);
    ?>
</option>
					<option value="name" <?php 
    print $users_list_show == 'name' ? 'selected="selected"' : '';
    ?>
><?php 
    _e("Names", $wpmudev_chat->translation_domain);
    ?>
</option>
				</select>
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_show', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_avatar_width_tr" <?php 
    if ($users_list_show != "avatar") {
        echo ' style="display:none" ';
    }
    ?>
>
			<td class="chat-label-column"><label for="chat_users_list_avatar_width"><?php 
    _e('User Avatar Width', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_avatar_width" name="chat[users_list_avatar_width]" class=""
					value="<?php 
    echo wpmudev_chat_check_size_qualifier($wpmudev_chat->get_option('users_list_avatar_width', $form_section), array('px'));
    ?>
"
					placeholder="<?php 
    echo wpmudev_chat_get_help_item('users_list_avatar_width', 'placeholder');
    ?>
"/>
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_avatar_width', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_avatar_border_width_tr" <?php 
    if ($users_list_show != "avatar") {
        echo ' style="display:none" ';
    }
    ?>
>
			<td class="chat-label-column"><label for="chat_users_list_avatar_border_width"><?php 
    _e('User Avatar Border Width', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_avatar_border_width" name="chat[users_list_avatar_border_width]" class=""
					value="<?php 
    echo wpmudev_chat_check_size_qualifier($wpmudev_chat->get_option('users_list_avatar_border_width', $form_section), array('px'));
    ?>
"
					placeholder="<?php 
    echo wpmudev_chat_get_help_item('users_list_avatar_border_width', 'placeholder');
    ?>
"/>
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_avatar_border_width', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_moderator_avatar_border_color_tr"  <?php 
    if ($users_list_show != "avatar") {
        echo ' style="display:none" ';
    }
    ?>
>
			<td class="chat-label-column"><label for="chat_users_list_moderator_avatar_border_color"><?php 
    _e('Moderator Avatar Border Color', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_moderator_avatar_border_color" name="chat[users_list_moderator_avatar_border_color]" class="pickcolor_input"
					value="<?php 
    echo $wpmudev_chat->get_option('users_list_moderator_avatar_border_color', $form_section);
    ?>
"
					data-default-color="<?php 
    echo $wpmudev_chat->get_option('users_list_moderator_avatar_border_color', $form_section);
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_moderator_avatar_border_color', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_user_avatar_border_color_tr"  <?php 
    if ($users_list_show != "avatar") {
        echo ' style="display:none" ';
    }
    ?>
>
			<td class="chat-label-column"><label for="chat_users_list_user_avatar_border_color"><?php 
    _e('User Avatar Border Color', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_user_avatar_border_color" name="chat[users_list_user_avatar_border_color]" class="pickcolor_input"
					value="<?php 
    echo $wpmudev_chat->get_option('users_list_user_avatar_border_color', $form_section);
    ?>
"
					data-default-color="<?php 
    echo $wpmudev_chat->get_option('users_list_user_avatar_border_color', $form_section);
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_user_avatar_border_color', 'tip');
    ?>
</td>
		</tr>




		<tr id="chat_users_list_moderator_color_tr"  <?php 
    if ($users_list_show != "name") {
        echo ' style="display:none" ';
    }
    ?>
>
			<td class="chat-label-column"><label for="chat_users_list_moderator_color"><?php 
    _e('Moderator Name Color', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_moderator_color" name="chat[users_list_moderator_color]" class="pickcolor_input"
					value="<?php 
    echo $wpmudev_chat->get_option('users_list_moderator_color', $form_section);
    ?>
"
					data-default-color="<?php 
    echo $wpmudev_chat->get_option('users_list_moderator_color', $form_section);
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_moderator_color', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_name_color_tr"  <?php 
    if ($users_list_show != "name") {
        echo ' style="display:none" ';
    }
    ?>
>
			<td class="chat-label-column"><label for="chat_users_list_name_color"><?php 
    _e('User Name Color', $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<input type="text" id="chat_users_list_name_color" name="chat[users_list_name_color]" class="pickcolor_input"
					value="<?php 
    echo $wpmudev_chat->get_option('users_list_name_color', $form_section);
    ?>
"
					data-default-color="<?php 
    echo $wpmudev_chat->get_option('users_list_name_color', $form_section);
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_name_color', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_font_family_tr"  <?php 
    if ($users_list_show != "name") {
        echo ' style="display:none" ';
    }
    ?>
>
			<td class="chat-label-column"><label for="chat_users_list_font_family"><?php 
    _e("Font", $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<select id="chat_users_list_font_family" name="chat[users_list_font_family]">
					<option value=""><?php 
    _e("-- None inherit from theme --", $wpmudev_chat->translation_domain);
    ?>
</option>
					<?php 
    foreach ($wpmudev_chat->_chat_options_defaults['fonts_list'] as $font_name => $font) {
        ?>
						<option value="<?php 
        print $font_name;
        ?>
" <?php 
        print $wpmudev_chat->get_option('users_list_font_family', $form_section) == $font_name ? 'selected="selected"' : '';
        ?>
 ><?php 
        print $font_name;
        ?>
</option>
					<?php 
    }
    ?>
				</select>
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_font_family', 'tip');
    ?>
</td>
		</tr>
		<tr id="chat_users_list_font_size_tr" <?php 
    if ($users_list_show != "name") {
        echo ' style="display:none" ';
    }
    ?>
>
			<td class="chat-label-column"><label for="chat_users_list_font_size"><?php 
    _e("Font size", $wpmudev_chat->translation_domain);
    ?>
</label></td>
			<td class="chat-value-column">
				<?php 
    $users_list_font_size = trim($wpmudev_chat->get_option('users_list_font_size', $form_section));
    ?>
				<input type="text" name="chat[users_list_font_size]" id="chat_users_list_font_size"
					value="<?php 
    echo !empty($users_list_font_size) ? wpmudev_chat_check_size_qualifier($users_list_font_size) : '';
    ?>
"
					placeholder="<?php 
    echo wpmudev_chat_get_help_item('users_list_font_size', 'placeholder');
    ?>
" />
			</td>
			<td class="chat-help-column"><?php 
    echo wpmudev_chat_get_help_item('users_list_font_size', 'tip');
    ?>
</td>
		</tr>

		</table>
	</fieldset>
	<?php 
}