<?php
require("session_check.php");	
	
	//语言包引入
	$u_langpackage=new uilp;
	
	//数据表定义
	$t_config=$tablePreStr."config";
	
	//数据库连接
	$dbo=new dbex;
	dbtarget('w',$dbServs);
	
	$sql="select v from $t_config where k='templates'";
	$templ=$dbo->getRow($sql);
	$sql="select v from $t_config where k='skin'";
	$skin=$dbo->getRow($sql);
?>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="css/right.css">
</head>
<body>
	
<div class="container">
	<div class="rs_head"><?php echo $u_langpackage->u_skin_admin?></div>
</div>
	<table class='main'>
		<tr>
			<th> <?php echo $u_langpackage->u_skin_plan?> </th><th> <?php echo $u_langpackage->u_currently_apply?> </th> <th> <?php echo $u_langpackage->u_admin_handle?> </th>
		</tr>
		<?php
		if(file_exists("../skin/".$templ['v'])){
			$ref=opendir("../skin/".$templ['v']);
			while($skin_dir=readdir($ref)){
				if(!preg_match("/^\./",$skin_dir)&&$skin_dir!='js'&&$skin_dir!='home'){
					$selected="";
					if($skin['v']==$templ['v'].'/'.$skin_dir){
						$selected="√";
					}
						echo '<tr><td>'.$skin_dir.'</td>  <td>'.$selected.'</td>';
						echo '<td>&nbsp|&nbsp<a href="change_skin.action.php?skin_name='.$templ['v']."/".$skin_dir.'">'.$u_langpackage->u_app_skin.'</a>&nbsp|&nbsp</td></tr>';
						echo '<tr><td class="dotted_line" colspan="10" style="line-height:100%;">&nbsp</td></tr>';
				}
			}
		}
		?>
	</table>	
	
<div class="container">
	<div class="rs_head"><?php echo $u_langpackage->u_prompt_inf?></div>
</div>
<table class="main main_left">
	<tr>
		<td>
		<?php echo str_replace("{template}",$templ['v'],$u_langpackage->u_skin_1);?><br />
		<?php echo $u_langpackage->u_skin_2?><br />
		<?php echo $u_langpackage->u_skin_3?><br />
		<?php echo $u_langpackage->u_skin_4?><br />
		<?php echo $u_langpackage->u_skin_5?><br />
		</td>
	</tr>
</table>
	
	
</body>
</html>		