<?php
	//必须登录才能浏览该页面
	require("foundation/auser_mustlogin.php");
	
	//引入模块公共方法文件
	require("foundation/module_blog.php");
	require("foundation/module_album.php");
	
	//语言包引入
	$b_langpackage=new bloglp;
	
	//变量定义
	$user_id=get_sess_userid();
	
	//数据表定义  
	$t_blog_sort=$tablePreStr."blog_sort";
	$t_blog=$tablePreStr."blog";
	$t_album=$tablePreStr."album";
	
	$dbo=new dbex;
	//创建数据库连接
	dbtarget('r',$dbServs);
	
	$ulog_id=short_check(get_argg('id'));
	$titleStr=$b_langpackage->b_creat;
	$goBackUrl='?app=blog';
	$ulogTitle='';
	$usubPara='';
	$ulogTxt='';
	$album_id='';
	$form_action="do.php?act=blog_add";
	$pri='';$public='';$pals='';
	$blog_sort_name='';
	//判断是否编辑blog内容
	$public="checked=checked";
	if($ulog_id!=""){
		$titleStr=$b_langpackage->b_edit;
		$goBackUrl='?app=blog_show&id='.$ulog_id;
		$condition="log_id=$ulog_id";$order_by="";$type="getRow";
		$result=get_db_data($dbo,$t_blog,$condition,$order_by,$type);
		$ulogTitle=$result['log_title'];
		$usubPara=$result['log_sort'];
		$ulogTxt=$result['log_content'];
		$blog_limit=$result['blog_limit'];
		if(empty($blog_limit)){$public="checked=checked";}
		if($blog_limit==1){$pals="checked=checked";}   
		if($blog_limit==2){$pri="checked=checked";}
		$blog_sort_name=$result['log_sort_name'];
    $form_action="do.php?act=blog_edit&id=".$ulog_id;
	}
	
?>