<?php
require("session_check.php");

	//语言包引入
	$u_langpackage=new uilp;
	
	$loc=short_check(get_argg('loc'));
	
	if(empty($loc)){
		echo "<script type='text/javascript'>alert('$u_langpackage->u_file_no');window.history.go(-1);</script>";
	}
	
	function list_child_file($local){
		global $u_langpackage;
		$ref=opendir("../templates/".$local);
		while($tp_dir=readdir($ref)){
			if(!preg_match("/^\./",$tp_dir)){
				if(filetype("../templates/".$local."/".$tp_dir)=="dir"){
					list_child_file($local."/".$tp_dir);
				}
				if(filetype("../templates/".$local."/".$tp_dir)=="file"){
					$act_time=date("Y-m-d H:i:s",filemtime("../templates/".$local));
					global $loc;
					$show_local=$local.'/'.$tp_dir;
					$show_local=preg_replace("/$loc\//","",$show_local);
					echo '<tr><td><input type="checkbox" name="c_tmp[]" value="'.$show_local.'" /></td><td style="margin-right:30px;"><font color=blue>'.$show_local.'</font></td> <td>'.$act_time.'</td> <td><a href="change_tmp.php?tmp_path='.$local.'/'.$tp_dir.'">'.$u_langpackage->u_amend.'</a></td></tr>';
					echo '<tr><td class="dotted_line" colspan="10" style="line-height:100%;">&nbsp</td></tr>';
				}
			}
		}
	}

?>
<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">
<script type='text/javascript'>

ifcheck =true;
function all_select(form)
{
	for(i = 0; i < form.elements.length; i ++)
	{
		var e = form.elements[i];
		if (e.type == 'checkbox')
		{
			e.checked = ifcheck;
		}
	}
	ifcheck = (ifcheck == true) ? false : true;
}

</script>
</head>
<body>
	
<div class="container">
	<div class="rs_head"><?php echo $loc;?><?php echo $u_langpackage->u_tempfile_list?></div>
</div>
<form action='action_comp.php?pro=<?php echo $loc;?>' method='post'>
<table class='main main_left' cellspacing=0>
	<tr>
		<th> <?php echo $u_langpackage->u_choice?> </th><th> <?php echo $u_langpackage->u_file_name?> </th><th> <?php echo $u_langpackage->u_amend_time?> </th><th width="15%"> <?php echo $u_langpackage->u_admin_handle?> </th>
	</tr>
	<?php
		list_child_file($loc);
	?>
	<tr>
		<td colspan='4' style="text-align:right" >
			<input type="button" value="<?php echo $u_langpackage->u_check?>" class="top_button" onClick="all_select(form);" />
			<input type="submit" value="<?php echo $u_langpackage->u_compile?>" class="top_button" name='batch' />
			<input type="button" onclick='javascript:history.go(-1);' value="<?php echo $u_langpackage->u_list_back?>" class="top_button" />
		</td>
	</tr>

</table>	
</form>
	
<div class="container">
	<div class="rs_head"><?php echo $u_langpackage->u_clew_inf?></div>
</div>
<table class="main main_left">
	<tr>
		<td><?php echo str_replace('{temp}',$loc,$u_langpackage->u_temp_save)?> </td>
	</tr>
	<tr>
		<td>
			<?php echo $u_langpackage->u_do_flow?> <br />
			<?php echo $u_langpackage->u_flow_1?><br />
			<?php echo $u_langpackage->u_flow_2?><br />
			<?php echo $u_langpackage->u_flow_3?><br />
			<?php echo $u_langpackage->u_flow_4?><br />
			<?php echo $u_langpackage->u_flow_5?><br />
			<?php echo $u_langpackage->u_flow_6?><br />
		</td>
	</tr>
</table>
	
</body>
</html>		