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

	//变量取得
	$photo_id = short_check(get_argg('photo_id'));
	$album_id=short_check(get_argg('album_id'));
	$user_id=get_sess_userid();

	//数据表定义区
	$t_album = $tablePreStr."album";
	$t_photo = $tablePreStr."photo";

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

	$sql = "select * from $t_photo where photo_id=$photo_id";
	$photo_row = $dbo ->getRow($sql);

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

	//设置封面
	$sql = "update $t_album set album_skin = '$photo_row[photo_thumb_src]' where album_id=$album_id and user_id=$user_id";
	if($dbo -> exeUpdate($sql)){
		//缓存功能区
		require($webRoot.$baseLibsPath."action/album_list_update.action.cache.php");
	}

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