Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Feb 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Not met and do not know what the error is described.Expect people to help

    Dear everyone,

    I have this problem because the doctor see if that helps.

    Admin page of my company are phenomena like this:

    When logging in to dc and then not being on the address bar to jump phenomenon jump between 2 this link:


    dochoigonhatminh.com/cmsv1.1/index.php


    dochoigonhatminh.com/cmsv1.1/login/index.php

    Code index.php page:
    Code:
     <?php
    session_start();
    if(isset($_SESSION['Login_cms']) && $_SESSION['Login_cms']=="login")
    {
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title></title>
    <meta name="" content="">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    <META content="MSHTML 6.00.3790.0" name=GENERATOR>
    
    </head>
    <FRAMESET cols=200,* border="5" bordercolor="#C1C1C1">
    <frame name="treemenu" src="treemenu.php" style="width : 300px; border : 1px solid #cdcdcd"></frame>
    <frame name="main" src="main.php"></frame>
    </FRAMESET>
    <noframes></noframes>
    
    </html>
    <?php
    }
    else
    {
        ?>
        <script>
        window.location="login/index.php";
        </script>
        <?php
    }
    ?>
    Code page login/index.php:
    Code:
     <?php
    session_start();
    include("../config.php");
    include("../function/function.php");
    $tb="cms_admin";
    $login="out";
    if(isset($_REQUEST['submit']))
    {
        $fullname=$_REQUEST['fullname'];
        $pass=mahoa($_REQUEST['pass']);
        $remember=$_REQUEST['remember'];
        //**************************select admin*********************//
        $s_a='select * from '.$tb.' where name="'.$fullname.'" and pass="'.$pass.'" and active=1 and level <= 2';
        $q_a=mysql_query($s_a);
        if(mysql_num_rows($q_a)>0)
        {
            $r_a=mysql_fetch_array($q_a);
            $id_a=$r_a['id'];
            $name_a=$r_a['name'];
            $level_a=$r_a['level'];
            $quantri=$r_a['quantri'];
            $_SESSION['Name_admin']=$name_a;
            $_SESSION['ID_admin']=$id_a;
            $_SESSION['Level_admin']=$level_a;
            if($level_a=="2")
            {
                $_SESSION['Quantri_admin']=$quantri;
            }
        }
    }
    if(isset($_SESSION['Name_admin']))
    {
        $login="login";
        $_SESSION['Login_cms']=$login;
    }
    if(isset($_REQUEST['remember']))
    {
        setcookie("Name_admin",$name_a,time()+3600*24*10);
        setcookie("ID_admin",$id_a,time()+3600*24*10);
        setcookie("Level_admin",$level_a,time()+3600*24*10);
        if($level_a=="2")
            {
                setcookie("Quantri_admin",$quantri,time()+3600*24*10);
            }
        setcookie("Login_cms","login",time()+3600*24*10);
    }
    if(isset($_COOKIE['Login_cms']) && $_COOKIE['Login_cms']=="login")
    {
        $login="login";
        $_SESSION['Name_admin']=$_COOKIE['Name_admin'];
        $_SESSION['ID_admin']=$_COOKIE['ID_admin'];
        $_SESSION['Level_admin']=$_COOKIE['Level_admin'];
        if(isset($_COOKIE['Quantri_admin']))
        {
            $_SESSION['Quantri_admin']=$_COOKIE['Quantri_admin'];
        }
    }
    if(isset($_REQUEST['login']) && $_REQUEST['login']=="out")
    {
        session_destroy();
        setcookie('Login_cms','out',time()-3600*24*10);
        $login='out';
        $_SESSION['Login_cms']="out";
    }
    if($login=="login" || (isset($_SESSION['Login_cms']) && $_SESSION['Login_cms']=="login"))
    {
        ?>
        <script>
        window.location="../index.php";
        </script>
        <?php
    }
    else
    {
    ////////////////////select ban tin////////////
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="../style.css" rel="stylesheet" type="text/css" />
    <meta name="" content="">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    
    </head>
    <body>
    
    <table width="200" border="0" cellspacing="0" cellpadding="4" style="margin:auto; margin-top : 150px" align="center">
    <script>
        function checkcontact()
            {
            if (document.check.fullname.value=='')
                {
                alert('Bạn chưa điền tên Đăng nh*p');
                document.check.fullname.focus();
                return false;
                }
            if (document.check.pass.value=='')
                {
                alert('Bạn chưa điền pass');
                document.check.pass.focus();
                return false;
                }
            }
    </script>
    <form  name="check" id="contactform"  method="post" action="index.php" onSubmit="return checkcontact()">
    <tr class="gridTitle">
        <td class="gridTitle" align="center" colspan="2" style="color : #ff0000">
        CMS - Đăng nh*p
        </td>
    </tr>
    <tr class="gridTitle">
        <td class="gridRow" align="center" width="30%">
        Urse Name
        </td>
        <td class="gridRow" align="center">
        <input id="name" name="fullname" class="text">
        </td>
    </tr>
    <tr class="gridTitle">
        <td class="gridRow" align="center" width="30%">
        Pass
        </td>
        <td class="gridRow" align="center">
        <input type="password" name="pass">
        </td>
    </tr>
    <tr class="gridTitle">
        <td class="gridRow" align="center" width="30%">
        Remember
        </td>
        <td class="gridRow" >
        <input type="checkbox" name="remember">
        </td>
    </tr>
    <tr class="gridTitle">
        <td class="gridRow" align="center" colspan="2">
        <input type="submit" value="Đăng nh*p" name="submit">
        <input type="button" value="Nh*p lại">
        </td>
    </tr>
    </form>
    </table>
    </body>
    </html>
    <?php
    }
    ?>


    But one problem is that my company has more than 10 machines, only 2 are in the normal machine, the rest are all on the same faulty tren.Tat 1 account

    You see sir help me with advice. Thank you
    Last edited by vinyl-junkie; 02-17-2014 at 03:31 PM. Reason: Corrected code tags


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •