后台index.php

<?php
    session_start();
 
session_register("u_name");
require_once("../config/db.inc.php");
require_once("../config/config.inc.php");
require_once("../config/function.php");
require_once("../config/set.php");

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>链小科技二手管理系统</title>
<script language="javascript">
<!--
function dlcheck()
{
    if(document.dlform.dluser.value=="")
 {
     alert ("请输入用户名!!!");
     document.dlform.dluser.focus();
  return false;
 }
 if(document.dlform.dlcode.value=="")
 {
     alert ("用户名或密码错误!!!");
  document.dlform.dluser.value="";
  document.dlform.dluser.focus();
  return false;
 }
}
//-->
</script>
<style type="text/css">
<!--
.style1 {
 font-size: 36px;
 font-weight: bold;
}
body {font-size:14px;}
-->
</style>
</head>
<style>
.title1 {font-size:25px;font-family:"黑体";color=red;}
.title2 {color:red;font-size:20px;font-family:"黑体";}
font {font-size:15px;}
td {font-size:15px;}
input,textarea,select {
 font-size: 14px;
 color: black;
 background-color: #CCCCCC;
 border: 1px solid #006666;
}
.inputb {
 font-size: 14px;
 color: blue;
 background-color: #CCCCCC;
 border: 1px solid #006666;
}

.textareab {
 font-size: 14px;
 color: black;
 background-color: #CCCCCC;
 border: 1px solid #006666;
 text-decoration: none;
}
</style>
<body>
<?php
if($_GET[action]=='unlogin')
{
session_unregister("u_name");
}
if($_GET[action]=='login')
{
 if (($user==$_POST[dluser])&&($code==$_POST[dlcode]))
 {
 $_SESSION[u_name]=$_POST[dluser];

 }else{
     echo '<script language="javascript"> alert ("此用户不存在或无权操作!!!");location="index.php?action=unlogin";exit(0);</script>';
  exit(0);}
 
}


if(!isset($_SESSION[u_name]))
{
?>
<form action="index.php?action=login" method="post" name="dlform" onSubmit="return dlcheck()">
<table cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=230 align=center borderColorLight=#7a8fa3 border=1>
   <tr class=bold bgColor=#f0f7ff>
     <td width="307" height=23 bgcolor="#00CCFF"><P align=center>用户:
      <input type="text" name="dluser" maxlength="20"></p></td>
   </tr>
   <tr class=bold bgColor=#f0f7ff>
     <td width="307" height=23 bgcolor="#00CCFF"><P align=center>密码:
      <input type="password" name="dlcode" maxlength="20"></p></td>
   </tr>
   <tr class=bold bgColor=#f0f7ff>
     <td width="307" height=23 bgcolor="#00CCFF"><P align=center>
       <input type="submit" name="dlsubmit" value="登陆"><input type="reset" name="dlreset" value="重置"></p></td>
   </tr>
</table></form>
<?php
}else{
?>
<table cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=780 align=center borderColorLight=#7a8fa3 border=1>
  <tr class=bold bgColor=#99CCFF>
  <td height=23 colspan="3"><P align=center class="style1">链小科技二手管理系统</p></td>
  </tr>
  <tr class=bold bgColor=#99CCFF>
    <td height=23 colspan="2"><P align=right><a href="index.php?action=unlogin">登出</a></p></td>
  </tr>
  <tr>
    <td width="100" height=23 valign="top"> 
 <table width=100 border=1 align=center cellPadding=2 cellSpacing=0 borderColorLight=#7a8fa3 borderColorDark=#ffffff>
      <tr class=bold bgColor=#f0f7ff>
        <td width="98%" height=23 bgcolor="#99CCFF"><P align=center><a href="index.php?action=2s_diqu">地区设置</a></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
   <tr class=bold bgColor=#f0f7ff>
        <td width="98%" height=23 bgcolor="#99CCFF"><P align=center><a href="index.php?action=2s_shangpin">商品分类设置</a></td>
      </tr>
       <tr>
        <td>&nbsp;</td>
      </tr>
      <tr class=bold bgColor=#f0f7ff>
        <td width="98%" height=23 bgcolor="#99CCFF"><P align=center><a href="index.php?action=2s_zhanghao">帐号管理</a></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr class=bold bgColor=#f0f7ff>
        <td bgcolor="#99CCFF"><div align="center"><a href="index.php?action=2s_qingchu">清除无效数据</a></div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr class=bold bgColor=#f0f7ff>
        <td bgcolor="#99CCFF"><div align="center"><a href="index.php?action=2s_gonggao">公告</a></div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr class=bold bgColor=#f0f7ff>
        <td bgcolor="#99CCFF"><div align="center"><a href="index.php?action=2s_selfset">推荐信息设置</a></div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr class=bold bgColor=#f0f7ff>
        <td bgcolor="#99CCFF"><div align="center">&nbsp;</div></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr class=bold bgColor=#f0f7ff>
        <td bgcolor="#99CCFF">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr class=bold bgColor=#f0f7ff>
        <td bgcolor="#99CCFF">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr class=bold bgColor=#f0f7ff>
        <td bgcolor="#99CCFF">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
    <td width="666" height=23 valign="top">
<?php
 if(isset($_SESSION[u_name]))
 {
     if($_GET[action]=='login'||$_GET[action]=='2s_diqu')
  {
      include("2s_diqu.php");
  }elseif($_GET[action]=='2s_shangpin')
  {
      include("2s_shangpin.php");
  }elseif($_GET[action]=='2s_zhanghao')
  {
      include("2s_zhanghao.php");
  }elseif($_GET[action]=='2s_qingchu')
  {
      include("2s_qingchu.php");
  }elseif($_GET[action]=='2s_xxxx')
  {
      include("2s_xxxx.php");
  }elseif($_GET[action]=='2s_tingyong')
  {
      include("2s_tingyong.php");
  }elseif($_GET[action]=='2s_chaxun')
  {
      include("2s_chaxun.php");
  }elseif($_GET[action]=='2s_gonggao')
  {
      include("2s_gonggao.php");
  }elseif($_GET[action]=='2s_selfset')
  {
      include("2s_selfset.php");
  }else
 echo "请从正常途径进入本页!";
 exit();
}}
?>
    </td>
  </tr>
</table>
</body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值