⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.php.bak

📁 一个php的公司信息系统
💻 BAK
字号:
<?php
  require('session.inc');
  require('connect.inc');
  $stid=$_POST['stid'];
  $login=$_GET['login'];
  $pass=$_POST['pass'];
  if ($stid=='none'||$login==1)
  {
  	
    $str_sql="select * from USERTB where stid = '$stid' and pass = '$pass';";
    echo $str_sql;
    $result=mysql_db_query($db,$str_sql,$link_id);
    if (!$result) html_error_exit('MySQL查询命令失败!');
    $nor=@mysql_num_rows($result);
    if ($nor==0)
    {
      html_header("登录失败",'<META http-equiv="refresh" content="2; url=index.php">');
      echo "<td align=right valign=center><br>密码错或公司未注册,请检查登录密码,2秒后自动返回登录页面<br><br><br><a href=index.php>返回登录</a></td>";
      html_footer();
    }
    else
    {
      $record=mysql_fetch_object($result);
      $usern=$stid;
      $ltimes=$record->logtimes + 1;
      $ld=$record->ldate;
      

      
   

      $str_sql="select stname from STOREHOUSETB where stid = '$stid';";
      $result=mysql_db_query($db,$str_sql,$link_id);
      if (!$result) html_error_exit('MySQL查询命令失败!');
      else
      {
        $record=mysql_fetch_object($result);
        $gs=$record->stname;
      }
      $t=date('Y-m-d H:i:s');
      $str_sql="update USERTB set
                              logtimes = '$ltimes',
                              ldate = '$t'
                where stid = '$stid';";
      $result=mysql_db_query($db,$str_sql,$link_id);
      if (!$result) html_error_exit('MySQL更新命令失败!');
      
   
      $html_title = '登录成功,正在转接服务器';
      $html_meta = '<META HTTP-EQUIV="expires" CONTENT="0"><META HTTP-EQUIV="Pragma" CONTENT="no-cache">
                     <script language="JavaScript">
                     <!--
                     function MM_goToURL() { //v3.0
                       var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
                         for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='."'".'"+args[i+1]+"'."'".'");
                     }
                     //-->
                     </script>';
      $html_onload = 'onload="MM_goToURL('."'parent','index2.php');return document.MM_returnValue".'"';
      require('htmlhead.inc');
      echo "如果你的浏览器没有反应,请按<br><a href=index2.php>这里</a>";
      require('htmlend.inc');
    }
  }
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -