<?php
	//引入模块公共方法文件
	require("foundation/aanti_refresh.php");

	//引入语言包
	$a_langpackage=new albumlp;

	//变量取得
	$album_name = short_check(get_argp('album_name'));
	$album_information = short_check(get_argp('album_information'));
	$album_secret=short_check(get_argp('album_secret'));
	$user_id =get_sess_userid();
	$user_name = get_sess_username();

	//防止重复提交
	antiRePost($album_name);
	
	//数据表定义区
	$t_album = $tablePreStr."album";

	$dbo = new dbex;
	//读写分离定义函数
	dbtarget('w',$dbServs);

	$album_skin = "uploadfiles/album/logo.jpg";
	$sql = "insert into $t_album (`album_name`,`user_id`,`user_name`,`album_information`,`add_time`,`album_secret`,`album_skin`) " .
			"values('$album_name',$user_id,'$user_name','$album_information',now(),'$album_secret','$album_skin'); ";
	if($dbo -> exeUpdate($sql)){
		//缓存功能区
		require($webRoot.$baseLibsPath."action/album_list_update.action.cache.php");
	}
	$album_id = mysql_insert_id();

	//回应信息
	action_return(1,"","modules.php?app=photo_upload&album_id=$album_id");
?>