<?php
/*
 * 注意：此文件由tpl_engine编译型模板引擎编译生成。
 * 如果您的模板要进行修改，请修改 templates/default/modules/album/album_update.html
 * 如果您的模型要进行修改，请修改 models/modules/album/album_update.php
 *
 * 修改完成之后需要您进入后台重新编译，才会重新生成。
 * 如果您开启了debug模式运行，那么您可以省去上面这一步，但是debug模式每次都会判断程序是否更新，debug模式只适合开发调试。
 * 如果您正式运行此程序时，请切换到service模式运行！
 * 
 * 如有您有问题请到官方论坛（http://tech.jooyea.com/bbs/）提问，谢谢您的支持。
 */
?><?php
	//引入语言包
	$a_langpackage=new albumlp;
	
	//必须登录才能浏览该页面
	require("foundation/auser_mustlogin.php");

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

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

	if($album_id!=''){
		$dbo = new dbex;
		//读写分离定义函数
		dbtarget('r',$dbServs);

		$sql = "select * from $t_album where album_id = $album_id";
		$album_row = $dbo -> getRow($sql);
		$public='';$pals='';$pri='';
		//相册私密预定义
		if($album_row['album_secret']=='0'){$public="selected=selected";}
		if($album_row['album_secret']=='1'){$pals="selected=selected";}
		if($album_row['album_secret']=='2'){$pri="selected=selected";}
		
	}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/row_menus.css">
<link rel="stylesheet" type="text/css" href="skin/<?php echo $skinUrl;?>/css/iframe.css">
</head>

<script type='text/javascript'>
function check_form(){
	if((document.getElementById("album_name").value=="")||(document.getElementById("album_information").value=="")){
		parent.Dialog.alert("<?php echo $a_langpackage->a_inp_err;?>");
		return false;
	}
}
</script>
<body>
  <div class="main_right_title">
     <span class="main_title_dot2"></span>
     <span class="main_title_txt"><?php echo $a_langpackage->a_edit;?></span>
  </div>

<div id="tabsB">
  <ul>
  	<li class="nowbutl"><a href="?app=album_list" title="<?php echo $a_langpackage->a_main;?>" class="nowbutl"><span class="nowbutr"><?php echo $a_langpackage->a_mine;?></span></a></li>
    <li><a href="?app=album_friend" title="<?php echo $a_langpackage->a_friend;?>"><span><?php echo $a_langpackage->a_friend;?></span></a></li>
  </ul>
    <div class="div_but" onclick="location.href='?app=album_creat'"><?php echo $a_langpackage->a_creat;?></div>
    <div class="div_but_3" onclick="location.href='?app=photo_upload'"><?php echo $a_langpackage->a_upload;?></div>
</div>
<div style="clear:both"></div>
<form name="form" action="do.php?act=album_upd&album_id=<?php echo $album_id;?>" method="post" onsubmit='return check_form()'>
<table class="album_list">
	<tr><th><?php echo $a_langpackage->a_name;?></th>
		<td><input type="text" name="album_name" id="album_name" size="35" value="<?php echo $album_row['album_name'];?>" /></td></tr>
	<tr><th><?php echo $a_langpackage->a_inf;?></th>
		<td><textarea name="album_information" id="album_information" cols="30" rows="5"><?php echo $album_row['album_information'];?></textarea></td></tr>
	<tr><th><?php echo $a_langpackage->a_secret;?></th>
		<td><select name='album_secret'>
			<option value='0' <?php echo $public;?>><?php echo $a_langpackage->a_all;?></option>
			<option value='1' <?php echo $pals;?>><?php echo $a_langpackage->a_fri;?></option>
			<option value='2' <?php echo $pri;?>><?php echo $a_langpackage->a_myself;?></option>
		</select></td></tr>
	<tr><td></td>
		<td><input type="submit" class="anniu" value="<?php echo $a_langpackage->a_b_upd;?>" name='action' /></td>
	</tr>
</table>
</form>
</body>
</html>