Jump to content

Recommended Posts

https://metin2.download/picture/W2EVDP1bLxSI6ooRUbgpB8rI6pv9TLyN/.png

<?PHP

  ERROR_REPORTING(0);

  if(!file_exists('./inc/config.inc.php'))

  {

    header('Location: install.php');

  }



  session_name("m2hp");

  session_start();

 

  require("./inc/config.inc.php");

  require("./inc/rights.inc.php");

  require("./inc/functions.inc.php");



  $sqlHp = mysql_connect(SQL_HP_HOST, SQL_HP_USER, SQL_HP_PASS);

  $sqlServ = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS);

 

  if(!is_resource($sqlServ) OR !is_resource($sqlHp)) {

    exit("Verbindung zur Datenbank fehlgeschlagen: Abbruch");

  }

  require("./inc/head.inc.php");

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" href="style.css" />

<script type="text/javascript" src="jsp/jquery.core.js"></script>

<script type="text/javascript" src="jsp/effects.core.js"></script>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<script type="text/javascript">

    $(document).ready(function(){

        $("#reload").click(function(){

            $(".display").slideUp(1500,"",function(){

                $(".display").load("inc/status.php",function(){

                $(".display").slideDown(1500);

            });

            });

        });

    });

    </script>

<title>Guerra2 | MMORPG | M2Guerra.org</title>

</head>

<body>

<!--- MENU ----------------------------------------------------->

<div id="menu">

    <ul>

        <li><a href="index.php">Home</a></li>

        <li><a href="index.php?s=cadastro">Cadastrar</a></li>

        <li><a href="index.php?s=downloads-jogo">Downloads</a></li>

        <li><a href="index.php?s=rankings">Rankings</a></li>

        <li><a href="/board">Forums</a></li>

        <li><a href="index.php?s=loja">Loja</a></li>


    </ul>

</div>



<div id="head">

    <div class="clear-b"></div>

  <a><div class="logo hover"></div></a></div>





<div id="main_top"></div>

<div id="main_main">

<div style="margin-top:-30px;">

<div id="side_top">TOP 10</div>

<div id="side_main">

<?php include('inc/rank.inc.php'); ?><br>

<a href="index.php?s=rankings">>> Komplette Rangliste</a>

</div>

<div id="side_foot"></div>

</div><br>

<div id="side_top">SERVER INFO</div>

<div id="side_main">

                            <?PHP include 'inc/statusbar.inc.php';?>

                        <center>    <div id="reload"><input type="submit" class="btn" value="Reload" name="submit"></div></center>

</div>

<div id="side_foot"></div>

<div style="margin-top:-675px;">

  <?PHP

            $includeDir = ".".DIRECTORY_SEPARATOR."pages".DIRECTORY_SEPARATOR;

            $includeDefault = $includeDir."home.php";

            

            if(isset($_GET['s']) && !empty($_GET['s']))

            {

            

                $_GET['s'] = str_replace("0", '', $_GET['s']);

                $includeFile = basename(realpath($includeDir.$_GET['s'].".php"));

                $includePath = $includeDir.$includeFile;

                

                if(!empty($includeFile) && file_exists($includePath))

                {

                    include($includePath);

                }

                else

                {

                include($includeDefault);

                }



            }

            else

            {

                include($includeDefault);

            }

        ?>  

 

<br><br><br>

<br><br><br>

<br><br><br>

<br><br><br><br><br><br>

<br><br><br><br><br><br>

<br><br><br><br>



</div></div>

<div id="main_foot"></div>

<div id="footer">

<p>Copyright © by <a href="./">Omega3</a>.<br>

All Rights Reserved.<br>

Website Design created by <a href="./">MrAiiRmaaX</a>.

</p>

</div>

</body>

</html>

 

 
after



[spoiler]

<?PHP

  ERROR_REPORTING(0);

  if(!file_exists('./inc/config.inc.php'))

  {

    header('Location: install.php');

  }



  session_name("m2hp");

  session_start();

 

  require("./inc/config.inc.php");

  require("./inc/rights.inc.php");

  require("./inc/functions.inc.php");



  $sqlHp = mysql_connect(SQL_HP_HOST, SQL_HP_USER, SQL_HP_PASS);

  $sqlServ = mysql_connect(SQL_HOST, SQL_USER, SQL_PASS);

 

  if(!is_resource($sqlServ) OR !is_resource($sqlHp)) {

    exit("Verbindung zur Datenbank fehlgeschlagen: Abbruch");

  }

  require("./inc/head.inc.php");

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" href="style.css" />

<script type="text/javascript" src="jsp/jquery.core.js"></script>

<script type="text/javascript" src="jsp/effects.core.js"></script>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

<script type="text/javascript">

    $(document).ready(function(){

        $("#reload").click(function(){

            $(".display").slideUp(1500,"",function(){

                $(".display").load("inc/status.php",function(){

                $(".display").slideDown(1500);

            });

            });

        });

    });

    </script>

<title>Guerra2 | MMORPG | M2Guerra.org</title>

</head>

<body>

<!--- MENU ----------------------------------------------------->

<div id="menu">

    <ul>

        <li><a href="index.php">Home</a></li>

        <li><a href="index.php?s=cadastro">Cadastrar</a></li>

        <li><a href="index.php?s=downloads-jogo">Downloads</a></li>

        <li><a href="index.php?s=rankings">Rankings</a></li>

        <li><a href="/board">Forums</a></li>

        <li><a href="index.php?s=loja">Loja</a></li>


    </ul>

</div>



<div id="head">

    <div class="clear-b"></div>

  <a><div class="logo hover"></div></a></div>





<div id="main_top"></div>

<div id="main_main">
<div style="margin-top:-30px;">
<div id="side_top">LOGIN</div>

<div id="side_main">

<?php include('inc/loginbar.inc.php'); ?>


</div>

<div id="side_foot"></div>

</div><br>

<div id="side_top">TOP 10</div>

<div id="side_main">

<?php include('inc/rank.inc.php'); ?><br>

<a href="index.php?s=rankings">>> Komplette Rangliste</a>

</div>

<div id="side_foot"></div>

</div><br>

<div id="side_top">SERVER INFO</div>

<div id="side_main">

                            <?PHP include 'inc/statusbar.inc.php';?>

                        <center>    <div id="reload"><input type="submit" class="btn" value="Reload" name="submit"></div></center>

</div>

<div id="side_foot"></div>

<div style="margin-top:-675px;">

  <?PHP

            $includeDir = ".".DIRECTORY_SEPARATOR."pages".DIRECTORY_SEPARATOR;

            $includeDefault = $includeDir."home.php";

            

            if(isset($_GET['s']) && !empty($_GET['s']))

            {

            

                $_GET['s'] = str_replace("0", '', $_GET['s']);

                $includeFile = basename(realpath($includeDir.$_GET['s'].".php"));

                $includePath = $includeDir.$includeFile;

                

                if(!empty($includeFile) && file_exists($includePath))

                {

                    include($includePath);

                }

                else

                {

                include($includeDefault);

                }



            }

            else

            {

                include($includeDefault);

            }

        ?>  

 

<br><br><br>

<br><br><br>

<br><br><br>

<br><br><br><br><br><br>

<br><br><br><br><br><br>

<br><br><br><br>



</div></div>

<div id="main_foot"></div>

<div id="footer">

<p>Copyright © by <a href="./">Omega3</a>.<br>

All Rights Reserved.<br>

Website Design created by <a href="./">MrAiiRmaaX</a>.

</p>

</div>

</body>

</html>
 
help ?

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
https://metin2.dev/topic/4878-help-login-area-error/
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

How i love a peace of Validate coding standard turns to a pile of shit like this code.
What exactly is your problem? You cant login or your top player list is fucked up?
 
edit:// I dont know what your problem exactly is but place session_start(); at the begining of your PHP code at first.
 
Like this:

<?php
session_name("m2hp");
session_start();

starting session handling must be done before any text, HTML, or JavaScript is sent to the browser.

Edited by Ayaka
Link to comment
https://metin2.dev/topic/4878-help-login-area-error/#findComment-30768
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.