<?php
/*
乘风下载管理系统
作者QQ：178575
作者Email：yliangcf@163.com
作者网站：http://www.qqcf.com
详细简介：http://www.qqcf.com/cfdown.htm
上面有程序在线演示，安装演示，使用疑难解答，最新版本下载等内容
因为这些内容可能时常更新，就没有放在程序里，请自己上网站查看
*/
?>
<?php 
session_start();

//安装锁定文件不存在时，开始安装程序
if(!file_exists('install/install.lock')) header('Location: install/index.php');

@include("conn.php");
@include("include/myfunction.php");
@include("config.php");
@include("include/getcookie.php");


$action = isset($_REQUEST["action"]) ? chkstr($_REQUEST["action"],1) : "";

@include("include/cf_do.php");
?>
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="keywords" content="<?php echo $sysseotitle?>" />
	<meta name="description" content="<?php echo $sysseotitle?>" />
	<meta charset="utf-8">
	<title><?php echo $systitle?></title>
	<link rel="stylesheet" href="images/style2.css" />
	<script src="js/jquery.min.js"></script>
</head>
<body>

<div class="navbar">
	<div class="navbar-inner">
		<div class="container">
			<div class="nav">
				<li><a href="./">首页</a></li>

			</div>
			<div class="navr">

			<?php if ($_COOKIE['cfdownadmin']!="") echo '<a href="../admin/">登录</a>';?>
			</div>
		</div>
	</div>
</div>
<style>
#common_content_main{background:#fff;position:relative;}
.common_content_main .yanshi_xiazai{margin-top:18px;margin-bottom:8px;}
.common_content_main .yanshi_xiazai a{font-size:16px;padding:10px 20px;margin-right:20px;background:#2DBFBE;color:#fff;}
.common_content_main .yanshi_xiazai a:hover{background:#FF6263;}
</style>

<div class="container">       
	<div class="hero-unit">

<center><b><?php echo $Rs['title']?></b>
<div class="common_content_main">
	<p class="yanshi_xiazai">


<script>
$(function(){
 $("#login").click(function(){
  var username = $("#username").val();
  var pwd = $("#pwd").val();
  var cookies_time = $("#cookies_time").val();

 if(username==""){
  alert("请输入用户名!");
  $("#username").focus();
  return false;
 }

 if(pwd==""){
  alert("请输入密码!");
  $("#pwd").focus();
  return false;
 }

  $.ajax({url: "index.php",type: "post",data:"action=userloginsave&username="+username+"&pwd="+pwd+"&cookies_time="+cookies_time,success: function(response){

   if(response.indexOf("成功")>=0){
    location.href='user/default';
   }else{
    alert($.trim(response));
   }
  }});
 });
});
</script>

<table id="userlogin" width=200>

<?php 
if($_SESSION["cfstatuser"]=="")
{
?>

      <tr> 
        <td >用户名：</td>
        <td><INPUT id=username size=15 name=username value="<?php echo $_GET["username"];?>" style="width:130px"></td>
      </tr>
      <tr> 
        <td>密&nbsp;&nbsp;码：</td>
        <td><INPUT id=pwd type=password size=15 name=pwd style="width:130px"></td>
      </tr>

      <tr> 
        <td>Cookie：</td>
        <td><select name="cookies_time" id="cookies_time" style="width:134px;">
            <option value="3600" selected>不保留</option>
            <option value="86400">保留一天</option>
			<option value="604800">保留一周</option>
            <option value="2592000">保留一个月</option>
          </select></td>
      </tr>

      <tr> 
        <td><a href="s/pwdrecover.php">忘记密码</a></td>
        <td style="padding-top:5px;">
<a href="javascript:;"><img src="images/login.gif" border=0 id="login"></a>
&nbsp;<a href="reg.php"><img src="images/reg.gif" border=0></a>
</td>
      </tr>

<?php 
}
else
{
  echo "<tr><td style='text-align:center;padding:10px;'><a href='user.php'><img src='images/manage.gif' 
            border=0></a></td></tr>";
  echo "<tr><td style='text-align:center;padding:10px;'><a href='user.php?action=userlogout' onClick=\"{if(confirm('确定要退出管理么?')){return true;}return false;}\"><img src='images/logout.gif' 
            border=0></a></td></tr>";
}
?>

</form>
</table>
	
	</p>
</div>
</center><br />




</div>
</div>


</div>
</div>
<div class="scf-footer">
<ul class="scf-link-list">合作网站：
<li class="last"><a href="http://www.qqcf.com/" target="_blank">乘风原创程序</a></li>
</ul><p>Copyright <?php echo strftime("%Y",time());?> <a href="http://www.qqcf.com/" target="_blank">乘风下载系统</a>. All Rights Reserved. <a href="http://www.qqcf.com/" target="_blank">乘风</a> 版权所有</div>

</body>
</html>
