Jump to content
  • 0

Question

Posted

I want to configure this lin2panel for my server but I have an error.
some help or guide to configure it.

LOG
[09-Oct-2017 19:33:25 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function mssql_connect() in www/lin2panel/index.php:18
Stack trace:
#0 {main}
<?php
// Start output buffering
ob_start("ob_gzhandler");

// Set error storing
ini_set ( "track_errors", true );

// Start session
include_once ( "includes/session.php" );

// Load configuration
include_once ( "includes/config.php" );
include_once ( "includes/functions.php" );
include_once ( "includes/l2atl.php" );
include_once ( "includes/stats.php" );

// Open databases
$link_panel = sqlsrv_connect ( $sql_ip, $sql_user, $sql_password, true );
mssql_select_db ( $sql_db_panel, $link_panel );
$link_db = sqlsrv_connect ( $sql_ip, $sql_user, $sql_password, true );
mssql_select_db ( $sql_db_db, $link_db );
$link_world = sqlsrv_connect ( $sql_ip, $sql_user, $sql_password, true );
mssql_select_db ( $sql_db_world, $link_world );

// Check logout
if ( isset ( $_GET [ "logout" ] ) && $_GET [ "logout" ] == 1 && isset ( $_SESSION [ "account" ] ) ) {
  $_SESSION [ "logged" ] = "OUT";
  header ( "Location: " . $_SERVER [ "PHP_SELF" ] );
  exit ();
}

// Destroy logout session
if ( isset ( $_SESSION [ "logged" ] ) && $_SESSION [ "logged" ] == "OUT" && isset ( $_COOKIE [ session_name () ] ) ) {
  setcookie ( session_name (), '', time () - 42000, '/' );
}

// Check login
if ( isset ( $_POST [ "login" ] ) && $_POST [ "login" ] == 1 && isset ( $_POST [ "account" ] ) && ! empty ( $_POST [ "account" ] ) && isset ( $_POST [ "password" ] ) && ! empty ( $_POST [ "password" ] ) ) {
  $_SESSION [ "account" ] = preg_replace ( "/[^a-z]+/", "", strtolower ( $_POST [ "account" ] ) );
  $query = "select top 2 * from account (nolock) where account='" . $_SESSION [ "account" ] . "' and password=0x" . md5 ( $_POST [ "password" ] ) . " order by uid";
  $res = mssql_query ( $query, $link_panel );
  $array_account = mssql_fetch_array ( $res );
  if ( mssql_num_rows ( $res ) == 1 ) {
    $_SESSION [ "logged" ] = "OK";
    $_SESSION [ "uid" ] = $array_account [ "uid" ];
    $_SESSION [ "lang" ] = $array_account [ "language" ];
    log_msg ( date ( "Y-m-d H:i:s" ) . " " . $_SERVER [ "REMOTE_ADDR" ] . " " . $_SESSION [ "account" ] . " \"logged-in\"\r\n" );
  } else {
    $_SESSION [ "logged" ] = "ERR";
  }
  mssql_free_result ( $res );
  header ( "Location: " . $_SERVER [ "HTTP_REFERER" ] );
  exit ();
}

// Check privileges for page
if ( isset ( $_SESSION [ "logged" ] ) && $_SESSION [ "logged" ] == "OK" ) {
  $query = "select top 2 * from account_privileges (nolock) where uid=" . $_SESSION [ "uid" ] . " and page='" . str_replace ( "'", "''", $_SERVER [ "QUERY_STRING" ] ) . "' order by uid";
  $res = mssql_query ( $query, $link_panel );
  $array_privileges = mssql_fetch_array ( $res );
  if ( mssql_num_rows ( $res ) != 1 ) {
    $_SESSION [ "privileged" ] = true;
  }
  mssql_free_result ( $res );
}

// Write logs
if ( isset ( $_SESSION [ "logged" ] ) && ! empty ( $_SESSION [ "logged" ] ) ) {
  switch ( $_SESSION [ "logged" ] ) {
    case "OK":
      log_msg ( date ( "Y-m-d H:i:s" ) . " " . $_SERVER [ "REMOTE_ADDR" ] . " " . $_SESSION [ "account" ] . " \"" . preg_replace ( "/[\n\r]/", "", $_SERVER [ "REQUEST_URI" ] ) . "\"\r\n" );
      break;
    case "ERR":
      log_msg ( date ( "Y-m-d H:i:s" ) . " " . $_SERVER [ "REMOTE_ADDR" ] . " " . $_SESSION [ "account" ] . " \"error-login\"\r\n" );
      break;
    case "OUT":
      log_msg ( date ( "Y-m-d H:i:s" ) . " " . $_SERVER [ "REMOTE_ADDR" ] . " " . $_SESSION [ "account" ] . " \"logged-out\"\r\n" );
      break;
    default:
  }
} else {
  log_msg ( date ( "Y-m-d H:i:s" ) . " " . $_SERVER [ "REMOTE_ADDR" ] . " unknown \"" . preg_replace ( "/[\n\r]/", "", $_SERVER [ "REQUEST_URI" ] ) . "\"\r\n" );
}

// Set and load language
if ( isset ( $_SESSION [ "lang" ] ) ) {
  $lang = $_SESSION [ "lang" ];
}
if ( ! isset ( $lang ) ) {
  if ( isset ( $_SERVER [ "HTTP_ACCEPT_LANGUAGE" ] ) ) {
    $array_language = preg_split ( "/[,;\s]+/", $_SERVER [ "HTTP_ACCEPT_LANGUAGE" ] );
    foreach ( $array_language as $language ) {
      if ( array_key_exists ( $language, $array_pages_language ) ) {
        $lang = $language;
        break;
      }
    }
  }
  if ( ! isset ( $lang ) ) {
    $lang = "en";
  }
  $_SESSION [ "lang" ] = $lang;
}
include_once ( "lang/" . $array_pages_language [ $lang ] . ".php" );

// Check for page return
if ( isset ( $_GET [ "ref" ] ) && $_GET [ "ref" ] == 1 ) {
  ignore_user_abort ( true );
  if ( isset ( $_SESSION [ "referer" ] ) && ! empty ( $_SESSION [ "referer" ] ) ) {
    header ( "Location: " . $_SESSION [ "referer" ] );
    unset ( $_SESSION [ "referer" ] );
  } else {
    header ( "Location: " . $_SERVER [ "HTTP_REFERER" ] );
  }
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title><?php print ( $_text [ 0 ] ); ?></title>
<meta http-equiv="content-type" content="text/html; charset=windows-1250" />
<link rel="stylesheet" href="style.css" type="text/css" />
</head>
<body>
<?php
if ( isset ( $_SESSION [ "logged" ] ) && $_SESSION [ "logged" ] == "OK" ) {
?>
<div class="menu">
<?php
  foreach ( $array_pages as $i => $val ) {
    $query = "select top 2 * from account_privileges (nolock) where uid=" . $_SESSION [ "uid" ] . " and page='p=" . $i . "' order by uid";
    $res = mssql_query ( $query, $link_panel );
    $array_privileges = mssql_fetch_array ( $res );
    if ( $i == -1 ||
         ( ( $array_privileges [ "privilege" ] & $array_page_privilege [ "read" ] ||
             $array_privileges [ "privilege" ] & $array_page_privilege [ "write" ] ) &&
           ( $array_privileges [ "privilege" ] & $array_page_privilege [ "no_menu" ] ) == 0 ) ) {
?>
  <div class="menu-<?php print ( $i == ( isset ( $_GET [ "p" ] ) ? $_GET [ "p" ] : -1 ) ? "selected" : "unselected" ); ?>">
    <a class="menu" href="<?php print ( $_SERVER [ "PHP_SELF" ] ); ?>?p=<?php print ( $i ); ?>"><?php print ( $_text_menu [ $i ] ); ?></a>
  </div>
<?php
    }
    mssql_free_result ( $res );
  }
?>
</div>
<div class="strona">
  <br />
<?php
  if ( isset ( $_GET [ "p" ] ) && array_key_exists ( $_GET [ "p" ], $array_pages ) ) {
    $query = "select top 2 * from account_privileges (nolock) where uid=" . $_SESSION [ "uid" ] . " and page='p=" . str_replace ( "'", "''", $_GET [ "p" ] ) . "' order by uid";
    $res = mssql_query ( $query, $link_panel );
    $array_privileges = mssql_fetch_array ( $res );
    mssql_free_result ( $res );
    if ( $_GET [ "p" ] == -1 ||
         ( $array_privileges [ "privilege" ] & $array_page_privilege [ "read" ] ||
           $array_privileges [ "privilege" ] & $array_page_privilege [ "write" ] ) ) {
      if ( $array_privileges [ "privilege" ] & $array_page_privilege [ "no_menu" ] ) {
        if ( isset ( $_GET [ "f" ] ) && ! empty ( $_GET [ "f" ] ) ) {
          $query = "select top 2 * from account_privileges (nolock) where uid=" . $_SESSION [ "uid" ] . " and page='p=" . str_replace ( "'", "''", $_GET [ "p" ] ) . "&f=" . str_replace ( "'", "''", $_GET [ "f" ] ) . "' order by uid";
          $res = mssql_query ( $query, $link_panel );
          $array_privileges = mssql_fetch_array ( $res );
          mssql_free_result ( $res );
          if ( $array_privileges &&
               ( $array_privileges [ "privilege" ] & $array_page_privilege [ "read" ] ||
                 $array_privileges [ "privilege" ] & $array_page_privilege [ "write" ] ) ) {
            $part = $directory_parts . $array_pages [ $_GET [ "p" ] ] . "/index.php";
            include ( $part );
          } else {
?>
<table class="center" width="50%">
  <tr>
    <td colspan="2" class="center"><span class="error"><?php print ( $_text [ 336 ] ); ?></span></td>
  </tr>
</table>
<?php
          }
        } else {
?>
<table class="center" width="50%">
  <tr>
    <td colspan="2" class="center"><span class="error"><?php print ( $_text [ 336 ] ); ?></span></td>
  </tr>
</table>
<?php
        }
      } else {
        $part = $directory_parts . $array_pages [ $_GET [ "p" ] ] . "/index.php";
        include ( $part );
      }
    } else {
?>
<table class="center" width="50%">
  <tr>
    <td colspan="2" class="center"><span class="error"><?php print ( $_text [ 336 ] ); ?></span></td>
  </tr>
</table>
<?php
    }
  } else {
    $_GET [ "p" ] = -1;
    include ( $directory_parts . $array_pages [ $_GET [ "p" ] ] . "/index.php" );
  }
?>
  <br /><br />
</div>
<?php
} else {
?>
<div class="login">
<form method="post" action="<?php print ( $_SERVER [ "PHP_SELF" ] ); ?>">
<input name="login" type="hidden" value="1" />
<table class="center" width="50%">
<?php
  if ( isset ( $_SESSION [ "logged" ] ) && $_SESSION [ "logged" ] == "ERR" ) {
    unset ( $_SESSION [ "logged" ] );
    unset ( $_SESSION [ "account" ] );
    session_destroy ();
?>
  <tr>
    <td colspan="2" class="center"><span class="error"><?php print ( $_text [ 294 ] ); ?></span></td>
  </tr>
  <tr><td colspan="2" height="4"></td></tr>
<?php
  } elseif ( isset ( $_SESSION [ "logged" ] ) && $_SESSION [ "logged" ] == "OUT" ) {
    unset ( $_SESSION [ "logged" ] );
    unset ( $_SESSION [ "account" ] );
    unset ( $_SESSION [ "uid" ] );
    unset ( $_SESSION [ "lang" ] );
    session_destroy ();
?>
  <tr>
    <td colspan="2" class="center"><span class="logout"><?php print ( $_text [ 313 ] ); ?></span></td>
  </tr>
  <tr><td colspan="2" height="12"></td></tr>
<?php
  }
?>
  <tr>
    <td class="center" width="50%"><?php print ( $_text [ 292 ] ); ?></td>
    <td class="center" width="50%"><input name="account" type="text" class="center" /></td>
  </tr>
  <tr>
    <td class="center" width="50%"><?php print ( $_text [ 253 ] ); ?></td>
    <td class="center" width="50%"><input name="password" type="password" class="center" /></td>
  </tr>
  <tr><td colspan="2" height="4"></td></tr>
  <tr>
    <td colspan="2" class="center"><input class="accept" type="submit" value="<?php print ( $_text [ 293 ] ); ?>" /></td>
  </tr>
</table>
</form>
</div>  
<script type="text/javascript">
// <![CDATA[
document.onload = function () {
  document.forms [ 0 ].account.focus ();
};
// ]]>
</script>
<?php
}
?>
</body>
</html>
<?php
// Close cached link
l2_cached_close ();

// Close databases
mssql_close ( $link_panel );
mssql_close ( $link_db );
mssql_close ( $link_world );

// Flush data
ob_end_flush ();
?>

 

2 answers to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • In your place l will join to Mobius community to get something decent or just go to Lucera 2 ( ofc no source) if you want interlude on Classic client, coz Acis not have have it yet.
    • The client and the system aren't working very well; the screen is black, and some things aren't loading.  😞 
    • LINEAGE2.SK Summer Season is Comming! GRAND OPENING - 14.08.2026 at 20:00 GMT+1  OBT - 07.08.2025 at 20:00 GMT+1   Website :https://lineage2.sk Discord : https://discord.gg/gj7AC5juGP       Server Features and Rates Xp – 20x Sp – 20x Adena – 10x Drop – 15x Spoil - 15x  Epic Raid Boss  - 1x Regular RB - 5x  Quest - 5x Fame - 2x Epaulette - 15x Manor - 15x     Special Features Somik Interface Limited AutoFarm Vote System Champions System Achievement System And more in information below     Enchant Settings  Safe Enchant: +3  Max Enchant: +16 Enchant Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%     NPC Buffer all buffs, songs, dances including 3rd prof + resists Buff Slots: 24 (+4) / 12 Buff Duration: 2 Hours     Epic Bosses & Respawns Queen Ant: 24 hours +/-8h Core: 3 days +/-8h Orfen: 2 days +/-8h Baium: 5 days +/-8h Beleth: 7 days +/-8h Antharas: 7 days +/-8h Valakas: 7 days +/-8h     Instances Zones Zaken: 6 players Normal Freya: 6 players Hard Freya: 12 Players Frintezza: 6 Players Tiat: 6 Players Beleth: 12 Players     GM Shop weapon/armor/jwl (max S grade) shots/spiritshots (max S grade) mana potions (1000 MP, 10s)      Global Gatekeeper all towns including cata/necro ToI Gracia Hellbound ...     Olympiad period 7 days (Monday) no class participants min 6 base class participants min 6 max enchant +6 Start points 20     Class Transfer for Adena     Subclass Quest Not required Max Subclass 3 Subclass Max LvL 85     Events Team vs Team Capture the Flag Death Match Last Hero Korean Style Treasure Hunt      Clans All new clans start with Clan LvL 5! Clan Skills/LvL for Clan Coins     Others  max 3 windows per HWID  BoM/MoM spawned in towns Auto-learn skills Autoloot Retail LvL of Epic Bosses Cancellation return buff system (30sec) Cancellation return buff -  not effect olympiad
    • LINEAGE2.SK Summer Season is Comming! GRAND OPENING - 14.08.2026 at 20:00 GMT+1  OBT - 07.08.2025 at 20:00 GMT+1   Website :https://lineage2.sk Discord : https://discord.gg/gj7AC5juGP       Server Features and Rates Xp – 20x Sp – 20x Adena – 10x Drop – 15x Spoil - 15x  Epic Raid Boss  - 1x Regular RB - 5x  Quest - 5x Fame - 2x Epaulette - 15x Manor - 15x     Special Features Somik Interface Limited AutoFarm Vote System Champions System Achievement System And more in information below     Enchant Settings  Safe Enchant: +3  Max Enchant: +16 Enchant Chance: 63%  Attribute Stone Chance: 50%  Attribute Crystal Chance: 30%     NPC Buffer all buffs, songs, dances including 3rd prof + resists Buff Slots: 24 (+4) / 12 Buff Duration: 2 Hours     Epic Bosses & Respawns Queen Ant: 24 hours +/-8h Core: 3 days +/-8h Orfen: 2 days +/-8h Baium: 5 days +/-8h Beleth: 7 days +/-8h Antharas: 7 days +/-8h Valakas: 7 days +/-8h     Instances Zones Zaken: 6 players Normal Freya: 6 players Hard Freya: 12 Players Frintezza: 6 Players Tiat: 6 Players Beleth: 12 Players     GM Shop weapon/armor/jwl (max S grade) shots/spiritshots (max S grade) mana potions (1000 MP, 10s)      Global Gatekeeper all towns including cata/necro ToI Gracia Hellbound ...     Olympiad period 7 days (Monday) no class participants min 6 base class participants min 6 max enchant +6 Start points 20     Class Transfer for Adena     Subclass Quest Not required Max Subclass 3 Subclass Max LvL 85     Events Team vs Team Capture the Flag Death Match Last Hero Korean Style Treasure Hunt      Clans All new clans start with Clan LvL 5! Clan Skills/LvL for Clan Coins     Others  max 3 windows per HWID  BoM/MoM spawned in towns Auto-learn skills Autoloot Retail LvL of Epic Bosses Cancellation return buff system (30sec) Cancellation return buff -  not effect olympiad
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..