<div id='pp-iframe-wrap' class='pp-contentbox-back' style='overflow:auto'>
<form onsubmit='check_form()' action='{$this->ipsclass->base_url}act=profile&amp;CODE=personal_iframe_comments_save&amp;member_id={$member['id']}&amp;md5check={$this->ipsclass->md5_check}' method='POST'>
	<if="is_array($comments) and count($comments)">
		<foreach="$comments as $comment">
			<if="$comment['comment_approved']">
				<div class='pp-contentbox-entry-noheight' id='pp-comment-entry-main-{$comment['comment_id']}'>
			<else />
				<div class='pp-contentbox-entry-noheight-mod' id='pp-comment-entry-main-{$comment['comment_id']}'>
			</if>
				<div class='pp-tiny-text'>
				<div class='pp-image-thumb-wrap-floatright'><img src='{$comment['pp_thumb_photo']}' width='{$comment['pp_thumb_width']}' height='{$comment['pp_thumb_height']}' alt='' /></div>
					<if="( $member['id'] == $this->ipsclass->member['id'] ) OR ( $this->ipsclass->member['g_is_supmod'] )">
						<!-- MOD CHECKBOX -->
						<input type='checkbox' class='input-checkbox' id="pp-checked-{$comment['comment_id']}" name="pp-checked[{$comment['comment_id']}]" value='1' onclick="parent.ips_personal_portal.toggle_comment_box('{$comment['comment_id']}', 1)" />
						<!-- / MOD CHECKBOX -->
					</if>
					{$comment['_pp_gender_image']} <strong><a href='{$this->ipsclass->base_url}showuser={$comment['id']}' target='_parent'>{$comment['members_display_name']}</a></strong>
					<br />
					{$comment['comment_content']}
					<br />
					<strong>{$comment['_comment_date']}</strong>
				</div>
			</div>
		</foreach>
		<div class='pp-contentbox-entry-noheight'>
			<div style='float:right'>
				<if="( $member['id'] == $this->ipsclass->member['id'] ) OR ( $this->ipsclass->member['g_is_supmod'] )">
					<select name='pp-moderation' id='pp-moderation'>
						<option value='approve'>{$this->ipsclass->lang['m_comment_app']}</option>
						<option value='unapprove'>{$this->ipsclass->lang['m_comment_unapp']}</option>
						<option value='delete'>{$this->ipsclass->lang['m_comment_delete']}</option>
					</select>
					<input type='submit' class='button' value='{$this->ipsclass->lang['m_go_button']}' />
				</if>
			</div>
			<div style='margin-top:7px'>{$pages}&nbsp;</div>
	<else />
		<div class='post1' style='padding:6px'>
			<em>{$this->ipsclass->lang['m_no_comments']} {$member['members_display_name']}.</em>
		</div>
	</if>
</form>
</div>
<br /><br /><br /> <!-- Gotta give room for page jump... -->
<script type='text/javascript'>
//<![CDATA
var _saved = parseInt( "{$this->ipsclass->input['_saved']}" );
if ( _saved )
{
	parent.ips_personal_portal.reload_comments();
}
// Check form
function check_form()
{
	var selectbox = document.getElementById('pp-moderation');
	var chosen    = selectbox.options[ selectbox.selectedIndex ].value;
	
	if ( chosen == 'delete' )
	{
		if ( confirm("{$this->ipsclass->lang['m_confirm']}") )
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	else
	{
		return true;
	}
}
//]]>
</script>