/**
	 * prepare backend category edit render
	 *
	 * @param int    $id
	 * @param moscomprofilerUser $user
	 * @param object $plugin
	 */
	private function showCategoryEdit( $id, $user, $plugin, $message = null ) {
		global $_CB_framework;

		$categoryEditor				=	$plugin->params->get( 'category_editor', 1 );

		$row						=	cbgjData::getCategories( null, array( 'id', '=', (int) $id ), null, null, false );

		$input						=	array();

		$input['publish']			=	moscomprofilerHTML::yesnoSelectList( 'published', null, (int) cbgjClass::getCleanParam( true, 'published', $row->get( 'published', ( $plugin->params->get( 'category_approve', 0 ) ? 0 : 1 ) ) ) );

		if ( $row->get( 'id' ) ) {
			$categories				=	cbgjClass::getCategoryOptions( null, 0, array( $row->get( 'id' ) ) );
		} else {
			$categories				=	cbgjClass::getCategoryOptions();
		}

		if ( $categories ) {
			array_unshift( $categories, moscomprofilerHTML::makeOption( '0', CBTxt::T( 'No Parent' ) ) );

			$input['parent']		=	moscomprofilerHTML::selectList( $categories, 'parent', null, 'value', 'text', (int) cbgjClass::getCleanParam( true, 'parent', $row->get( 'parent', 0 ) ), 1, false, false );
		} else {
			$input['parent']		=	CBTxt::Th( 'There currently are no categories.' );
		}

		$input['name']				=	'<input type="text" id="name" name="name" value="' . htmlspecialchars( cbgjClass::getCleanParam( true, 'name', $row->get( 'name' ) ) ) . '" class="inputbox" size="40" />';

		if ( $categoryEditor >= 2 ) {
			$description			=	cbgjClass::getHTMLCleanParam( true, 'description', $row->get( 'description' ) );
		} else {
			$description			=	cbgjClass::getCleanParam( true, 'description', $row->get( 'description' ) );
		}

		if ( $categoryEditor == 3 ) {
			$input['description']	=	$_CB_framework->displayCmsEditor( 'description', $description, 400, 200, 40, 5 );
		} else {
			$input['description']	=	'<textarea id="description" name="description" class="inputbox" cols="40" rows="5">' . htmlspecialchars( $description ) . '</textarea>';
		}

		$input['file']				=	'<input type="file" id="logo" name="logo" class="inputbox" size="40" />';
		$input['del_logo']			=	'<input type="checkbox" id="del_logo" name="del_logo" class="inputbox" value="1" /> <label for="del_logo">' . CBTxt::T( 'Delete logo?' ) . '</label>';

		$listTypes					=	array();
		$listTypes[]				=	moscomprofilerHTML::makeOption( '1', CBTxt::T( 'Open' ) );
		$listTypes[]				=	moscomprofilerHTML::makeOption( '2', CBTxt::T( 'Approval' ) );
		$listTypes[]				=	moscomprofilerHTML::makeOption( '3', CBTxt::T( 'Invite' ) );
		$input['types']				=	moscomprofilerHTML::selectList( $listTypes, 'types[]', 'size="4" multiple="multiple" class="inputbox required"', 'value', 'text', explode( '|*|', cbgjClass::getCleanParam( true, 'types', $row->get( 'types', $plugin->params->get( 'category_types_default', '1|*|2|*|3' ) ) ) ), 1, false, false );

		$listAccess					=	array();
		$listAccess[]				=	moscomprofilerHTML::makeOption( '-2', CBTxt::T( '- Everybody' ) );
		$listAccess[]				=	moscomprofilerHTML::makeOption( '-1', CBTxt::T( '- All Registered Users' ) );
		$listAccess					=	array_merge( $listAccess, $_CB_framework->acl->get_group_children_tree( null, 'USERS', false ) );
		$input['access']			=	moscomprofilerHTML::selectList( $listAccess, 'access', 'class="inputbox required"', 'value', 'text', (int) cbgjClass::getCleanParam( true, 'access', $row->get( 'access', $plugin->params->get( 'category_access_default', -2 ) ) ), 1, false, false );

		$input['create']			=	moscomprofilerHTML::yesnoSelectList( 'create', null, (int) cbgjClass::getCleanParam( true, 'create', $row->get( 'create' ), $plugin->params->get( 'category_create_default', 1 ) ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );

		$listCreate					=	array();
		$listCreate[]				=	moscomprofilerHTML::makeOption( '-1', CBTxt::T( '- All Registered Users' ) );
		$listCreate					=	array_merge( $listCreate, $_CB_framework->acl->get_group_children_tree( null, 'USERS', false ) );
		$input['create_access']		=	moscomprofilerHTML::selectList( $listCreate, 'create_access', 'class="inputbox"', 'value', 'text', (int) cbgjClass::getCleanParam( true, 'create_access', $row->get( 'create_access', $plugin->params->get( 'category_createaccess_default', -1 ) ) ), 1, false, false );

		$input['nested']			=	moscomprofilerHTML::yesnoSelectList( 'nested', null, (int) cbgjClass::getCleanParam( true, 'nested', $row->get( 'nested' ), $plugin->params->get( 'category_nested_default', 1 ) ), CBTxt::T( 'Enable' ), CBTxt::T( 'Disable' ) );
		$input['nested_access']		=	moscomprofilerHTML::selectList( $listCreate, 'nested_access', 'class="inputbox"', 'value', 'text', (int) cbgjClass::getCleanParam( true, 'nested_access', $row->get( 'nested_access', $plugin->params->get( 'category_nestedaccess_default', -1 ) ) ), 1, false, false );
		$input['owner']				=	'<input type="text" id="user_id" name="user_id" value="' . (int) cbgjClass::getCleanParam( true, 'user_id', $row->get( 'user_id', $user->id ) ) . '" class="inputbox required digits" size="6" />';

		cbgjClass::displayMessage( $message );

		HTML_cbgjAdmin::showCategoryEdit( $row, $input, $user, $plugin );
	}