//管理主题
function managesubject()
{
	if(confirm("确定"+$("#selecttype option:selected").get(0).text+"吗？")){ 
		var	ran		=	Math.random();
		switch($("#selecttype").val()){
			case 'del':
				$("#loading").show();
				var data = $("#SubjectForm").formToArray(); 
				$.post(APP+'/Form/del/ran/'+ran,data,function(flid){
				    if(flid){
						alert(flid);
						$("#loading").hide();
						window.location.href=window.location.href;
					}
				});
			break;
			
			case 'move':
				$("#loading").show();
				var selectboard = $("#selectboard").val();
				if(selectboard!=0){
					var data = $("#SubjectForm").formToArray(); 
					$.post(APP+'/Form/move/ran/'+ran,data,function(flid){
					    if(flid){
							alert(flid);
							$("#loading").hide();
							window.location.href=window.location.href;
						}
					});
				}else{
					alert('请选择移动的版块');
				}
			break;
		}
	}else{
		return;
	}
}

//设置版块规则
function setboardintroduction(boardId){
	var introduction = $("#boardintroduction").val();
	var	ran		=	Math.random();
	$.post(APP+'/Form/setboard',{ran:ran,boardId:boardId,introduction:introduction},function(flid){
	    if(flid){
	        alert(flid);
	        setTimeout(function(){$.facebox.close();},250);	
	    	$('#boardset').html(introduction);			
		}
	});
}

function pagepost(type,typecontent,page){
	$('#list').hide();
	$('#list1').show();
	$('#list1').html('数据加载中......');
	var	ran		=	Math.random();
	$.post(APP+'/Public/formsearchpost/',{type:type,typecontent:typecontent,page:page,ran:ran},function(flid){
	    if(flid){
			$('#list1').html(flid);
		}
	});
}



