<?php
	session_start();
	include_once 'conn/conn.php';
?>
<!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=gb2312" />
<title>明日网络U盘</title>
<link type="text/css" rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="js/choose.js"></script>
<script type="text/javascript" src="js/index.js"></script>
</head>
<body>
<div id="contain">
<div id="links">
<div id="sys"><img border="0" src="images/indexico.gif" width="14" height="14" />&nbsp;<a onclick="location='index.php'">首页</a> | <img border="0" src="images/collection.gif" width="12" height="16"  /><a onclick="window.external.AddFavorite(location.href,document.title)">&nbsp;加入收藏夹</a> | <img border="0" src="images/setindex.gif" width="13" height="16" />&nbsp;<a onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('http://<?php echo $_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME']; ?>')" >设为首页</a></div></div>
<div id="header">
<div id="left">
<?php
	if(empty($_SESSION['name']) or is_null($_SESSION['name'])){
		include_once 'login/login.php';
	}else{
?>
<div id="lgsp" style="background-image: url(images/lged.gif); width: 78px; height:18px; background-position:center; background-repeat:no-repeat; padding: 3px;">&nbsp;</div>
<hr style=" width: 80%; border: 1px #597ECB solid;" />
<span>欢迎光临：<font color="#ff0000"><?php echo $_SESSION['name']; ?></font></span><p />
<a href="?act=up">我要上传</a> | <a href="?act=down">我要下载</a><p />
<a href="logout.php">重新登录</a>
<?php	
	}
?>
</div>
<div id="bccd"></div>
<div id="foundbook"></div>
<div id="mingrisoft"></div>
<div id="mrbbs"></div>
<div id="right"></div>

<div id="found">&nbsp;
下载码：
<input id="chkdown" type="text" />&nbsp;
<button id="downbtn" onclick="chkdown()"></button>&nbsp;&nbsp;搜索：<input id="fdfile" type="text" />&nbsp;<select id="foundtype">
<?php
	$typesql = "select id,genrename from tb_uptype";
	$typearr = $conne->getRowsArray($typesql);
	$conne->close_rst();
	foreach($typearr as $value){
?>
		<option value="<?php echo $value['genrename']; ?>"><?php echo $value['genrename']; ?></option>
<?php
	}
?>
</select>&nbsp;
<button id="foundbtn" onclick="chkdown()"></button>
</div>

<div id="content">
<?php
	$act = $_GET['act'];
	switch($act){
		case 'up':
			include 'upfile.php';
			break;
		case 'upfile':
			include 'upfile_chk.php';
			break;
		case 'down':
			include 'downfile.php';
			break;
		case 'downcode':
			include 'downcode.php';
			break;
		case 'queryfile':
			include 'queryfile.php';
			break;
		default:
			include 'pub.php';
			break;
	}
?>
</div>
<div id="bottom"><?php include_once 'bottom.html'; ?></div>
</div>
</div>
</body>
</html>
