Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

eval("?>".base64_decode("PD9waHAKCmZ1bmN0aW9uIEtzVElabXhiZHNqa05PSWl2cGxOdlFkb2RxdXBCdGdpT..

Decoded Output download

?>b'<?php

function KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM ( )
{
  $KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM = trim( shell_exec( "free -m" ) );
  if ( empty( $KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM ) )
  {
    return false;
  }
  $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt = explode( "\n", $KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM );
  $KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM = array();
  $vOfzyYZhOyEpKciacDdtoeLmGnMgnMJGMupXQvS = array();
  foreach ( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt as $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = preg_replace( \'!\s+!\', \' \', str_replace( ":", "", $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT ) );
    if ( ! strstr( $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH, "Mem" ) and ! strstr( $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH, "Swap" ) )
    {
      continue;
    }
    $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ = explode( " ", $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH );
    if ( $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 0 ] == "Mem" )
    {
      $KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM[ \'total\' ] = $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 1 ];
      $KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM[ \'used\' ] = $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 2 ];
      $KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM[ \'free\' ] = $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 3 ];
      $KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM[ \'percent\' ] = sprintf( "%0.2f", ($roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 2 ] / $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 1 ]) * 100 );
    }
    else
    {
      $vOfzyYZhOyEpKciacDdtoeLmGnMgnMJGMupXQvS[ \'total\' ] = $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 1 ];
      $vOfzyYZhOyEpKciacDdtoeLmGnMgnMJGMupXQvS[ \'used\' ] = $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 2 ];
      $vOfzyYZhOyEpKciacDdtoeLmGnMgnMJGMupXQvS[ \'free\' ] = $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 3 ];
      $vOfzyYZhOyEpKciacDdtoeLmGnMgnMJGMupXQvS[ \'percent\' ] = sprintf( "%0.2f", ($roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 2 ] / $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ 1 ]) * 100 );
    }
  }
  return array( $KsTIZmxbdsjkNOIivplNvQdodqupBtgiNPM, $vOfzyYZhOyEpKciacDdtoeLmGnMgnMJGMupXQvS );
}

function lzgiEiUvHINQUNeYhuFZbrjXWpOSOsJbrfZCg ( )
{
  $JqWYUJnYbJhGNDdwGsIkkSCfITQllw = @file_get_contents( "/proc/cpuinfo" );
  if ( empty( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw ) )
  {
    return false;
  }
  $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt = explode( "\n", $JqWYUJnYbJhGNDdwGsIkkSCfITQllw );
  $lzgiEiUvHINQUNeYhuFZbrjXWpOSOsJbrfZCg = array();
  foreach ( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt as $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT )
  {
    if ( ! stristr( $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT, ":" ) )
    {
      continue;
    }
    list ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc, $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM ) = @explode( ":", $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT );
    $lzgiEiUvHINQUNeYhuFZbrjXWpOSOsJbrfZCg[ trim( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ) ] = trim( $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM );
  }
  $WOLFotjBAZsEBskFozKudCdQeMDRbUkAn = array();
  for ( $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII = 0; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII <= $lzgiEiUvHINQUNeYhuFZbrjXWpOSOsJbrfZCg[ \'processor\' ]; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII++ )
  {
    $WOLFotjBAZsEBskFozKudCdQeMDRbUkAn[ \'cores\' ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ][ \'cpu_name\' ] = $lzgiEiUvHINQUNeYhuFZbrjXWpOSOsJbrfZCg[ \'model name\' ];
    $WOLFotjBAZsEBskFozKudCdQeMDRbUkAn[ \'cores\' ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ][ \'speed\' ] = $lzgiEiUvHINQUNeYhuFZbrjXWpOSOsJbrfZCg[ \'cpu MHz\' ];
  }
  $whPGNQualJRMwFnuGvaTFKVCgoCFtGLjodc = array_fill( 0, ++$lzgiEiUvHINQUNeYhuFZbrjXWpOSOsJbrfZCg[ \'processor\' ], 0 );
  $KJFOgFMEgFJloyBrVDVvSCejrlMtpTNMg = array_fill( 0, $lzgiEiUvHINQUNeYhuFZbrjXWpOSOsJbrfZCg[ \'processor\' ], 0 );
  for ( $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII = 0; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII < 3; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII++ )
  {
    $lTjUhqSZKTqRmuhlLOtblPDsbkxYMXzQYyhghs = @file_get_contents( "/proc/stat" );
    if ( empty( $lTjUhqSZKTqRmuhlLOtblPDsbkxYMXzQYyhghs ) )
    {
      return false;
    }
    $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt = explode( "\n", $lTjUhqSZKTqRmuhlLOtblPDsbkxYMXzQYyhghs );
    $tDNNqtDSXbkzWcIYbiXwUbmjBwfMjIGcXltpRQQ = 0;
    $PdfgrDqHBINCZrMJOpJFqNzkLfg = 0;
    foreach ( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt as $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT )
    {
      if ( ! preg_match( "/cpu[0-9]{1,}\s/", $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT ) )
      {
        continue;
      }
      $pBsvFYxrUmzHtrshANkIrcAdLLnnspI = explode( " ", trim( $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT ) );
      array_shift( $pBsvFYxrUmzHtrshANkIrcAdLLnnspI );
      $EeRgbpstVMOhLHXKjxEkFJLnrHdwJWZY = array_sum( $pBsvFYxrUmzHtrshANkIrcAdLLnnspI );
      $xsiutynjuYMxMizmdBJDnBELkvMUNnXutvdS = $pBsvFYxrUmzHtrshANkIrcAdLLnnspI[ 3 ];
      $molvWoieGOqNcnWnsrcGyovPapBHdcoBmxdTc = $xsiutynjuYMxMizmdBJDnBELkvMUNnXutvdS - $whPGNQualJRMwFnuGvaTFKVCgoCFtGLjodc[ $tDNNqtDSXbkzWcIYbiXwUbmjBwfMjIGcXltpRQQ ];
      $JdIFtkkFRjLKowxMVzXivcLXFRyUJhFqzxU = $EeRgbpstVMOhLHXKjxEkFJLnrHdwJWZY - $KJFOgFMEgFJloyBrVDVvSCejrlMtpTNMg[ $tDNNqtDSXbkzWcIYbiXwUbmjBwfMjIGcXltpRQQ ];
      $gqXiFVMWPnfrYUtQLbtgTQHvRBMrJeJsw = 100 * (($JdIFtkkFRjLKowxMVzXivcLXFRyUJhFqzxU - $molvWoieGOqNcnWnsrcGyovPapBHdcoBmxdTc) / $JdIFtkkFRjLKowxMVzXivcLXFRyUJhFqzxU);
      $PdfgrDqHBINCZrMJOpJFqNzkLfg = $PdfgrDqHBINCZrMJOpJFqNzkLfg + $gqXiFVMWPnfrYUtQLbtgTQHvRBMrJeJsw;
      $WOLFotjBAZsEBskFozKudCdQeMDRbUkAn[ \'cores\' ][ $tDNNqtDSXbkzWcIYbiXwUbmjBwfMjIGcXltpRQQ ][ \'cpu_usage\' ] = sprintf( "%0.2f", $gqXiFVMWPnfrYUtQLbtgTQHvRBMrJeJsw );
      $whPGNQualJRMwFnuGvaTFKVCgoCFtGLjodc[ $tDNNqtDSXbkzWcIYbiXwUbmjBwfMjIGcXltpRQQ ] = $xsiutynjuYMxMizmdBJDnBELkvMUNnXutvdS;
      $KJFOgFMEgFJloyBrVDVvSCejrlMtpTNMg[ $tDNNqtDSXbkzWcIYbiXwUbmjBwfMjIGcXltpRQQ ] = $EeRgbpstVMOhLHXKjxEkFJLnrHdwJWZY;
      $tDNNqtDSXbkzWcIYbiXwUbmjBwfMjIGcXltpRQQ++;
    }
    $gKXlijeQtTsbKIzNJUAbvyDYykcRaeQBy = sprintf( "%0.2f", $PdfgrDqHBINCZrMJOpJFqNzkLfg / count( $WOLFotjBAZsEBskFozKudCdQeMDRbUkAn ) );
    $WOLFotjBAZsEBskFozKudCdQeMDRbUkAn[ \'total_usage\' ] = $gKXlijeQtTsbKIzNJUAbvyDYykcRaeQBy;
    usleep( 90000 );
  }
  return $WOLFotjBAZsEBskFozKudCdQeMDRbUkAn;
}

function wpTvRRCGWJpzfrrzreGrciRzvGdDsnBISPIuw ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `profiles` WHERE `master_server_id` = \'%d\' AND `profile_name` = \'%s\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return true;
  }
  return false;
}

function gRScCBBLbGqXtTeKDMrdavEiRpzrjY ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw )
{
  global $mcDB;
  $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs = rgJYriKrXFPMkjrcdXPmGtITBbIEDMNUQI( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `lines` WHERE `server_id` IN(" . implode( ",", $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) . ") AND `username` = \'%s\'", $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return true;
  }
  return false;
}

function lBAqjuBlRrgFmVYaaHYfvnAwcpTysqqFojTz ( $kVyMLbovQRfhPTQpLnuEzkKIRtrcvySIggA )
{
  $izNuffqEcAckPEVDqCgVYPylLYdoroWXQM = intval( trim( shell_exec( "ps ax | pgrep -f \'" . MULTICS_ROOT_PATH . "$kVyMLbovQRfhPTQpLnuEzkKIRtrcvySIggA\' | wc -l" ) ) );
  return ($izNuffqEcAckPEVDqCgVYPylLYdoroWXQM > 0) ? true : false;
}

function wppJTGiTJPBxLibkeVQfVIRupepsqtgkAk ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $ALbZOIxHWtMBgpFpzoCUmvQJUoBUEWmLswrE = null, $RqyBBjafAEbIRYcFtXdChWLXacwHEVIKSZycOE = null )
{
  global $mcDB;
  $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs = rgJYriKrXFPMkjrcdXPmGtITBbIEDMNUQI( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( ! is_null( $RqyBBjafAEbIRYcFtXdChWLXacwHEVIKSZycOE ) )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `package_id` FROM `group_packages` WHERE `group_id` = \'%d\'", $RqyBBjafAEbIRYcFtXdChWLXacwHEVIKSZycOE );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `lines_options` WHERE `server_id` IN(" . implode( ",", $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) . ")" );
    return $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $hdAWGJiYhdWJcKfPoxjjtaRpbRoSBuHelhCC = mcLib::sLYQRInHqFhKEHlZrlkIQnxTDtZrYVNtKK( $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( ) );
    if ( is_null( $ALbZOIxHWtMBgpFpzoCUmvQJUoBUEWmLswrE ) )
    {
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `lines_options` WHERE id IN (" . implode( ",", $hdAWGJiYhdWJcKfPoxjjtaRpbRoSBuHelhCC ) . ") AND `server_id` IN(" . implode( ",", $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) . ")" );
    }
    else
    {
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `lines_options` WHERE id IN (" . implode( ",", $hdAWGJiYhdWJcKfPoxjjtaRpbRoSBuHelhCC ) . ") AND `server_id` IN(" . implode( ",", $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) . ") AND `option_type` = \'%d\'", $ALbZOIxHWtMBgpFpzoCUmvQJUoBUEWmLswrE );
    }
    if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
    {
      $qokgghIvvtdFTbcmRNpVfJyQvgMHvYjzI = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
      return $qokgghIvvtdFTbcmRNpVfJyQvgMHvYjzI;
    }
  }
  return array();
}

function paRLWvPlZBfaODfFYycJWdneZmvlGuRClnXU ( )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.*,t2.`group_name`,t2.`group_color` FROM `users` t1,`member_groups` t2 WHERE t1.member_group_id = t2.id" );
  $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl;
}

function rPTBCpcRnauDkRNPyDclFJmNhhKQKDdnFzLRA ( $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU )
{
  global $mcMember;
  $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM = ZUrSdeXnmuZXglBYlzpmZSNdazohydQtlQ( $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU );
  if ( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'member_id\' ] != 0 and QfgmwmBvfYFOZAUveQPxsjeLiIZGpv( "users", "id", $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'member_id\' ] ) )
  {
    $TufInpZBGNPOOTyQYSTpJwrcPkpYlDxlUkhvFY = $mcMember->CMKHygROrmbNPyTkrefFrYYMJWXEZDDZZzNM( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'member_id\' ] );
    $hBkeQgUgZYpYztnsCXcLbGrfTYARSfeHIqE = ($MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'blocked\' ] == 0) ? mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'EMAIL_MSG_MONITOR_WARN_SUB\' ] : mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'EMAIL_MSG_MONITOR_BAN_SUB\' ];
    $SdtVaDUjvAdylPNMaNLUMtvzujtTIfbPfVTQ = ($MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'blocked\' ] == 0) ? mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'EMAIL_MSG_MONITOR_WARN\' ] : mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'EMAIL_MSG_MONITOR_BAN\' ];
    $hBkeQgUgZYpYztnsCXcLbGrfTYARSfeHIqE = str_ireplace( array( "{SERVER_NAME}", "{MEMBER_NAME}", "{LINE_USERNAME}" ), array( mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SERVER_NAME\' ], $TufInpZBGNPOOTyQYSTpJwrcPkpYlDxlUkhvFY[ \'username\' ], $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'username\' ] ), $hBkeQgUgZYpYztnsCXcLbGrfTYARSfeHIqE );
    $SdtVaDUjvAdylPNMaNLUMtvzujtTIfbPfVTQ = str_ireplace( array( "{SERVER_NAME}", "{MEMBER_NAME}", "{LINE_USERNAME}" ), array( mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SERVER_NAME\' ], $TufInpZBGNPOOTyQYSTpJwrcPkpYlDxlUkhvFY[ \'username\' ], $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'username\' ] ), $SdtVaDUjvAdylPNMaNLUMtvzujtTIfbPfVTQ );
    ddlmVvmzVjxXGrMcBspRssPvrDVoVVEQ( $TufInpZBGNPOOTyQYSTpJwrcPkpYlDxlUkhvFY[ \'email\' ], $hBkeQgUgZYpYztnsCXcLbGrfTYARSfeHIqE, $SdtVaDUjvAdylPNMaNLUMtvzujtTIfbPfVTQ );
    return true;
  }
  else
  {
    return false;
  }
}

function RgTdRnnrdzSJxxBykFYWcPPilOBuvVKGYI ( $YrsTPgwSjJPsKEEoCpXhinwlNc, $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY, $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw, $oMQyWMTydaLunorZyNBschIyhwlaYmbffGCwW = 0 )
{
  global $mcDB;
  $YrsTPgwSjJPsKEEoCpXhinwlNc = mcLib::MVmafwfmjqufexpnGzEfOftlkVUTLXdJcqmVWWE( $YrsTPgwSjJPsKEEoCpXhinwlNc );
  $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY = mcLib::MVmafwfmjqufexpnGzEfOftlkVUTLXdJcqmVWWE( $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY );
  if ( empty( $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY ) )
  {
    return false;
  }
  if ( $oMQyWMTydaLunorZyNBschIyhwlaYmbffGCwW == 0 )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `tickets_topics` (`member_id`,`topic_title`,`date`,`admin_read`,`user_read`) VALUES (\'%d\',\'%s\',\'%d\',0,1)", $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw, $YrsTPgwSjJPsKEEoCpXhinwlNc, time( ) );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `tickets_topics` (`member_id`,`topic_title`,`date`,`admin_read`,`user_read`) VALUES (\'%d\',\'%s\',\'%d\',1,0)", $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw, $YrsTPgwSjJPsKEEoCpXhinwlNc, time( ) );
  }
  if ( $mcDB->ULDNqqTHJzNmXeYeEHmcmoXgZdHkcfrjhQlY( ) > 0 )
  {
    $PGDOPflUfOQbLlmljrWUKUuSHNrYYdbBTmyY = $mcDB->lZqicXChQNuEPumhIutyOVXkAvvxQGrziptdRBQ( );
    if ( $oMQyWMTydaLunorZyNBschIyhwlaYmbffGCwW == 0 )
    {
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `tickets_post` (`topic_id`,`post`,`admin_reply`,`date`) VALUES(\'%d\',\'%s\',0,\'%d\')", $PGDOPflUfOQbLlmljrWUKUuSHNrYYdbBTmyY, $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY, time( ) );
    }
    else
    {
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `tickets_post` (`topic_id`,`post`,`admin_reply`,`date`) VALUES(\'%d\',\'%s\',1,\'%d\')", $PGDOPflUfOQbLlmljrWUKUuSHNrYYdbBTmyY, $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY, time( ) );
    }
    return true;
  }
  return false;
}

function LgVUamksYPgQdsdTyQUcqiXsvwzUNUyyvQPMA ( $xAUHlifzsNLBexnMwNPckbQfaYXeQtKESDPKI, $UmhsmnqYIvOczzHGEafZkToVbijUroFzQU )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `settings` SET `setting_value` = \'%s\' WHERE `setting_key` = \'%s\'", $UmhsmnqYIvOczzHGEafZkToVbijUroFzQU, $xAUHlifzsNLBexnMwNPckbQfaYXeQtKESDPKI );
  mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ $xAUHlifzsNLBexnMwNPckbQfaYXeQtKESDPKI ] = $UmhsmnqYIvOczzHGEafZkToVbijUroFzQU;
  if ( $mcDB->ULDNqqTHJzNmXeYeEHmcmoXgZdHkcfrjhQlY( ) > 0 )
  {
    return true;
  }
  return false;
}

function soEsBhBxvGgcbFMrvPeDREGHbYGWvQfDiHrGCS ( $HBzaPhJbeAgldftvWeOUsWoQurtVgXxugk, $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY, $VCcZgzrsCRWsCnDdRMBUPRgvMzjcxeLD = 1 )
{
  global $mcDB;
  $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY = mcLib::MVmafwfmjqufexpnGzEfOftlkVUTLXdJcqmVWWE( $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY );
  if ( empty( $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY ) )
  {
    return false;
  }
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `tickets_post` (`topic_id`,`post`,`admin_reply`,`date`) VALUES(\'%d\',\'%s\',\'%d\',\'%d\')", $HBzaPhJbeAgldftvWeOUsWoQurtVgXxugk, $oMHgEZUoRVZvnWRXGmIGrnGHnVJWLaQeQQgY, $VCcZgzrsCRWsCnDdRMBUPRgvMzjcxeLD, time( ) );
  if ( $VCcZgzrsCRWsCnDdRMBUPRgvMzjcxeLD == 1 )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `tickets_topics` SET `user_read` = 0,`admin_read` = 1 WHERE `id` = \'%d\'", $HBzaPhJbeAgldftvWeOUsWoQurtVgXxugk );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `tickets_topics` SET `user_read` = 1,`admin_read` = 0 WHERE `id` = \'%d\'", $HBzaPhJbeAgldftvWeOUsWoQurtVgXxugk );
  }
  return false;
}

function NRomAbAHrJdQfOJAogpMYCugQnXcHuSyhFEps ( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM )
{
  global $_LANG;
  $BFpXwGCohRpLDDAXolgFFoOBrbQrTlvNngu = "";
  if ( ! is_array( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM ) )
  {
    return $BFpXwGCohRpLDDAXolgFFoOBrbQrTlvNngu;
  }
  if ( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'blocked\' ] == 1 )
  {
    $BFpXwGCohRpLDDAXolgFFoOBrbQrTlvNngu = "<font color=\"red\">{$_LANG[\'BLOCKED\']}</font>";
  }
  elseif ( ! is_null( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'date_end\' ] ) and time( ) >= $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'date_end\' ] )
  {
    $BFpXwGCohRpLDDAXolgFFoOBrbQrTlvNngu = "<font color=\"#0000FF\">{$_LANG[\'EXPIRED\']}</font>";
  }
  elseif ( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'enable\' ] == 0 )
  {
    $BFpXwGCohRpLDDAXolgFFoOBrbQrTlvNngu = "<font color=\"orange\">{$_LANG[\'DISABLED\']}</font>";
  }
  else
  {
    $BFpXwGCohRpLDDAXolgFFoOBrbQrTlvNngu = "<font color=\"green\">{$_LANG[\'RUNNING\']}</font>";
  }
  return $BFpXwGCohRpLDDAXolgFFoOBrbQrTlvNngu;
}

function bebEhDiwIVullMUPzhIbGlVTRRhNdFI ( $cKNQSxaoKuScNfUKXZCEkdDSzQVmIsrNapfw )
{
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = "";
  switch ( $cKNQSxaoKuScNfUKXZCEkdDSzQVmIsrNapfw )
  {
    case "PHP_BIN":
      if ( defined( \'PHP_BINDIR\' ) )
      {
        $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = PHP_BINDIR . \'/php\';
      }
      elseif ( isset( $_SERVER[ \'PATH\' ] ) )
      {
        $DOUrCHCXBkoPAnuKlRBiaVbpUiIWhlFxbPwzLE = explode( ":", $_SERVER[ \'PATH\' ] );
        $DOUrCHCXBkoPAnuKlRBiaVbpUiIWhlFxbPwzLE = array_map( "trim", $DOUrCHCXBkoPAnuKlRBiaVbpUiIWhlFxbPwzLE );
        foreach ( $DOUrCHCXBkoPAnuKlRBiaVbpUiIWhlFxbPwzLE as $FPoVMLLRBDpjMFFQNfagMSzShTmjgwKaTMFck )
        {
          if ( file_exists( $FPoVMLLRBDpjMFFQNfagMSzShTmjgwKaTMFck . \'/php\' ) && is_file( $FPoVMLLRBDpjMFFQNfagMSzShTmjgwKaTMFck . \'/php\' ) )
          {
            $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $FPoVMLLRBDpjMFFQNfagMSzShTmjgwKaTMFck . \'/php\';
            break;
          }
        }
      }
      elseif ( function_exists( \'shell_exec\' ) )
      {
        $wcAdgiCDmlHWQpBibubkzMXkHTWJSB = trim( shell_exec( "which php" ) );
        if ( empty( $wcAdgiCDmlHWQpBibubkzMXkHTWJSB ) )
        {
          $LqrbaezjqzWripdyEZgxrOPyehvRLUdIIaM = trim( shell_exec( "whereis php" ) );
          $eVAjOCTHuwfvGZotAPMvQIfqaZIsRBtVU = explode( " ", $LqrbaezjqzWripdyEZgxrOPyehvRLUdIIaM );
          if ( count( $eVAjOCTHuwfvGZotAPMvQIfqaZIsRBtVU ) == 1 )
          {
            return false;
          }
          else
          {
            $wcAdgiCDmlHWQpBibubkzMXkHTWJSB = $eVAjOCTHuwfvGZotAPMvQIfqaZIsRBtVU[ 1 ];
          }
        }
        $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $wcAdgiCDmlHWQpBibubkzMXkHTWJSB;
      }
      break;
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function WaPbSGexTdikWMpoWabVuGeqKlfZxEXQDUQ ( $ERKMLKZKDVJKcISHlTdPOFOGKlIgTarPqNYY = false )
{
  global $mcDB;
  if ( $ERKMLKZKDVJKcISHlTdPOFOGKlIgTarPqNYY !== false )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `cronjobs` SET `enabled` = 0 WHERE `id` = \'%d\'", $ERKMLKZKDVJKcISHlTdPOFOGKlIgTarPqNYY );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `cronjobs` SET `enabled` = 0;" );
  }
  RjmngzaIITYRBdPQdtXbclJEEhFhhnhLrSPVLo( );
}

function uCvtIAVzQwdGAMKLaaJFXVlObFPArkvbRRVYGfc ( $ERKMLKZKDVJKcISHlTdPOFOGKlIgTarPqNYY = false )
{
  global $mcDB;
  if ( $ERKMLKZKDVJKcISHlTdPOFOGKlIgTarPqNYY !== false )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `cronjobs` SET `enabled` = 1 WHERE `id` = \'%d\'", $ERKMLKZKDVJKcISHlTdPOFOGKlIgTarPqNYY );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `cronjobs` SET `enabled` = 1;" );
  }
  RjmngzaIITYRBdPQdtXbclJEEhFhhnhLrSPVLo( );
}

function NgeYsQmHBsFBfFcZLbyFYhDrYTvmHsUuqyNnYE ( $ERKMLKZKDVJKcISHlTdPOFOGKlIgTarPqNYY )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `enabled` FROM `cronjobs` WHERE `id` = \'%d\'", $ERKMLKZKDVJKcISHlTdPOFOGKlIgTarPqNYY );
  return ($mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( ) == 1) ? true : false;
}

function MJiVHnXSQFjMDzIBokTuQcYueWGWUztLQzozEA ( )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `enabled` FROM `cronjobs` WHERE `id` = 1" );
  $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM = intval( $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( ) );
  return ($iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM > 0) ? true : false;
}

function RjmngzaIITYRBdPQdtXbclJEEhFhhnhLrSPVLo ( )
{
  global $mcDB;
  if ( ! function_exists( \'shell_exec\' ) )
  {
    return false;
  }
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `cronjobs` WHERE `enabled` = 1" );
  $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  $BqpLREeOlzFBsxCEytaUDHkqGhjDxQOo = array();
  $wcAdgiCDmlHWQpBibubkzMXkHTWJSB = bebEhDiwIVullMUPzhIbGlVTRRhNdFI( \'PHP_BIN\' );
  foreach ( $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl as $ZttOQsMcNSiqFIOCfzEcbBejXFezo )
  {
    $fWFIoOeLRZHanGpgepvsybXrcrrzVsFzTelWc = MULTICS_ROOT_PATH . $ZttOQsMcNSiqFIOCfzEcbBejXFezo[ \'filename\' ];
    $BqpLREeOlzFBsxCEytaUDHkqGhjDxQOo[ ] = "*/{$ZttOQsMcNSiqFIOCfzEcbBejXFezo[\'run_per_mins\']} * * * * $wcAdgiCDmlHWQpBibubkzMXkHTWJSB " . $fWFIoOeLRZHanGpgepvsybXrcrrzVsFzTelWc . " #{$ZttOQsMcNSiqFIOCfzEcbBejXFezo[\'description\']}";
  }
  $FSnruvLbBDsUqZjIPXseUDOVPIFbAmnJw = trim( shell_exec( "crontab -l" ) );
  if ( ! empty( $FSnruvLbBDsUqZjIPXseUDOVPIFbAmnJw ) )
  {
    $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = explode( "\n", $FSnruvLbBDsUqZjIPXseUDOVPIFbAmnJw );
    $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array_map( "trim", $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp );
    $ehLrMjIoeWPEDvcdYCknOWplgvrZHXTXA = count( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp );
    for ( $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII = 0; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII < $ehLrMjIoeWPEDvcdYCknOWplgvrZHXTXA; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII++ )
    {
      if ( stripos( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ], MULTICS_ROOT_PATH ) )
      {
        unset( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] );
      }
    }
    foreach ( $BqpLREeOlzFBsxCEytaUDHkqGhjDxQOo as $sjkZogRAxvYotfOurMbRyIRnSeErnChtczRlao )
    {
      array_push( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp, $sjkZogRAxvYotfOurMbRyIRnSeErnChtczRlao );
    }
  }
  else
  {
    $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = $BqpLREeOlzFBsxCEytaUDHkqGhjDxQOo;
  }
  shell_exec( "crontab -r" );
  $ckFfGAFzXrufrNptHmteDhXpZQLShzrQiPxoI = tempnam( "/tmp", "crontab" );
  $WsQzTVieuZnBnrAghIQrLynUlOklfchDDMK = fopen( $ckFfGAFzXrufrNptHmteDhXpZQLShzrQiPxoI, "w" );
  fwrite( $WsQzTVieuZnBnrAghIQrLynUlOklfchDDMK, implode( "\r\n", $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp ) . "\r\n" );
  fclose( $WsQzTVieuZnBnrAghIQrLynUlOklfchDDMK );
  shell_exec( "crontab $ckFfGAFzXrufrNptHmteDhXpZQLShzrQiPxoI" );
  @unlink( $ckFfGAFzXrufrNptHmteDhXpZQLShzrQiPxoI );
}

function utmAajtHxuKyZECXytyxqbimsWrusFyGupcQxE ( $rKtjjytgRkFCZvsYCbiuXywNLejYVPlhNM, $pXDrlwVXwuxAzlpShefsNcSIaDMBjP = false )
{
  global $mcDB;
  switch ( $rKtjjytgRkFCZvsYCbiuXywNLejYVPlhNM )
  {
    case "user":
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `tickets_topics` WHERE `user_read` = 0 AND `member_id` = \'%d\'", $pXDrlwVXwuxAzlpShefsNcSIaDMBjP );
      break;
    case "admin":
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `tickets_topics` WHERE `admin_read` = 0" );
      break;
    default:
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `tickets_topics` WHERE `admin_read` = 0" );
  }
  $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( );
  return ($DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl);
}

function CuCSxyhINcUKGtFvQMjsYppplRNvSztRIVlc ( $XJrWwzCuHsMWbsdvQwtGNhHQNeCdzMDw, $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ )
{
  global $mcDB;
  if ( is_array( $XJrWwzCuHsMWbsdvQwtGNhHQNeCdzMDw ) )
  {
    $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu = $XJrWwzCuHsMWbsdvQwtGNhHQNeCdzMDw;
    $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc = $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'id\' ];
  }
  else
  {
    $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu = oYCxjcrMGXMRxqdxNWbnkfGvamJjzhEJTY( $XJrWwzCuHsMWbsdvQwtGNhHQNeCdzMDw );
  }
  $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg = giVihcIAplDDhWVfapZXkdopkxjXNtULY( $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'domain\' ], $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'port\' ], $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'username\' ], $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'password\' ], \'editor\', 1, array( "textedit" => $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ ) );
  if ( ! $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg )
  {
    return false;
  }
  return true;
}

function dNiVXsZBvJIeHBMhQFpdVlalmNBXCykyT ( $FPoVMLLRBDpjMFFQNfagMSzShTmjgwKaTMFck )
{
  $QDDOjZXIDVzUBtjRhGuPPIocXqtOAkbkuoU = scandir( $FPoVMLLRBDpjMFFQNfagMSzShTmjgwKaTMFck );
  $OyfvsLWHuDCsVntfSXVItMlNmrnxeAzgyk = array();
  $pxbbXVTVwjlZwLdQRyoYdEURdYPMZWhDbjkty = count( $QDDOjZXIDVzUBtjRhGuPPIocXqtOAkbkuoU );
  for ( $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII = 0; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII < $pxbbXVTVwjlZwLdQRyoYdEURdYPMZWhDbjkty; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII++ )
  {
    if ( $QDDOjZXIDVzUBtjRhGuPPIocXqtOAkbkuoU[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] != "." && $QDDOjZXIDVzUBtjRhGuPPIocXqtOAkbkuoU[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] != ".." )
    {
      if ( is_dir( $FPoVMLLRBDpjMFFQNfagMSzShTmjgwKaTMFck . "/" . $QDDOjZXIDVzUBtjRhGuPPIocXqtOAkbkuoU[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] ) )
      {
        $OyfvsLWHuDCsVntfSXVItMlNmrnxeAzgyk = array_merge( $OyfvsLWHuDCsVntfSXVItMlNmrnxeAzgyk, dNiVXsZBvJIeHBMhQFpdVlalmNBXCykyT( $FPoVMLLRBDpjMFFQNfagMSzShTmjgwKaTMFck . "/" . $QDDOjZXIDVzUBtjRhGuPPIocXqtOAkbkuoU[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] ) );
      }
      else
      {
        $OyfvsLWHuDCsVntfSXVItMlNmrnxeAzgyk[ ] = $FPoVMLLRBDpjMFFQNfagMSzShTmjgwKaTMFck . "/" . $QDDOjZXIDVzUBtjRhGuPPIocXqtOAkbkuoU[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ];
      }
    }
  }
  return ($OyfvsLWHuDCsVntfSXVItMlNmrnxeAzgyk);
}

function jEVlapbqfglyCxlIjnfIRSPFsPixApedrKyo ( $XJrWwzCuHsMWbsdvQwtGNhHQNeCdzMDw )
{
  if ( is_array( $XJrWwzCuHsMWbsdvQwtGNhHQNeCdzMDw ) )
  {
    $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu = $XJrWwzCuHsMWbsdvQwtGNhHQNeCdzMDw;
    $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc = $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'id\' ];
  }
  else
  {
    $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu = oYCxjcrMGXMRxqdxNWbnkfGvamJjzhEJTY( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  }
  $pXrzOKQPXMpZznnhCQHkfoDzxDIJGeRs = array( "mgcamd" => "mgcamd?id=0&list=connected", "cccam" => "cccam?id=0&list=connected", "newcamd" => "newcamd?pid=0&list=connected" );
  $PYpzOmGZidMeWUxlNTDVkLuYUKBQnTAhDujBBOk = array( "mgcamd" => "/<a href=\'\/mgcamdclient\?id=(.*?)\'>(.*?)<br>(.*?)<\/a>(.*?)<td>Total Zapping: (.*?)<\/td>(.*?)<span style=\'float:right;\'>/s", "cccam" => "/<a href=\'\/cccamclient\?id=(.*?)\'>(.*?)<br>(.*?)<\/a>(.*?)<td>Total Zapping: (.*?)<\/td>(.*?)<span style=\'float:right;\'>/s", "newcamd" => "/<td><a href=\'\/newcamdclient\?id=(.*?)\'>(.*?)<\/a><\/td>(.*?)<td>Total Zapping: (.*?)<\/td>(.*?)<span style=\'float:right;\'>/s" );
  $RJWcEkKmZNNbFaNyufPOBBjwheorRXsMPXqIaQI = lFMhMMBGGtGPUdijJopIGdmRSuDYItqMJIHEU( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array();
  foreach ( $RJWcEkKmZNNbFaNyufPOBBjwheorRXsMPXqIaQI as $tDwtLOHiEZRLJaZyFQFpxBryRwkDhYDVaLkqNobdg )
  {
    $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $tDwtLOHiEZRLJaZyFQFpxBryRwkDhYDVaLkqNobdg[ \'username\' ] ] = $tDwtLOHiEZRLJaZyFQFpxBryRwkDhYDVaLkqNobdg;
  }
  $FKaZVSHZRCxLdMAtbyFIufXVbxJDHZTVmUBUgI = array();
  $LumfUgZWFlJkfOfmddTbDKQLKhZepTbnCnUIus = array();
  foreach ( $pXrzOKQPXMpZznnhCQHkfoDzxDIJGeRs as $zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ => $JgwPyJgJRrQRPYDArewMejJusIwsiJjmwlAoaU )
  {
    $XcmjOcODJjoZfpZBFazCggIbeCHIhBcyiJX = giVihcIAplDDhWVfapZXkdopkxjXNtULY( $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'domain\' ], $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'port\' ], $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'username\' ], $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu[ \'password\' ], $JgwPyJgJRrQRPYDArewMejJusIwsiJjmwlAoaU );
    $LumfUgZWFlJkfOfmddTbDKQLKhZepTbnCnUIus[ $zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ ] = $XcmjOcODJjoZfpZBFazCggIbeCHIhBcyiJX;
  }
  if ( ! empty( $LumfUgZWFlJkfOfmddTbDKQLKhZepTbnCnUIus ) )
  {
    foreach ( $LumfUgZWFlJkfOfmddTbDKQLKhZepTbnCnUIus as $zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ => $XcmjOcODJjoZfpZBFazCggIbeCHIhBcyiJX )
    {
      if ( preg_match_all( $PYpzOmGZidMeWUxlNTDVkLuYUKBQnTAhDujBBOk[ $zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ ], $XcmjOcODJjoZfpZBFazCggIbeCHIhBcyiJX, $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM ) )
      {
        for ( $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII = 0; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII < count( $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 1 ] ); $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII++ )
        {
          if ( isset( $FKaZVSHZRCxLdMAtbyFIufXVbxJDHZTVmUBUgI[ $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 2 ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] ][ \'id\' ] ] ) and $FKaZVSHZRCxLdMAtbyFIufXVbxJDHZTVmUBUgI[ $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 2 ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] ][ \'id\' ] ][ \'online\' ] == 1 )
          {
            continue;
          }
          if ( $zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ != "newcamd" )
          {
            $hTBNPbxbxEkWMpMVAoXYdCTGrpIWRivIzKk = trim( strip_tags( $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 6 ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] ) );
          }
          else
          {
            $hTBNPbxbxEkWMpMVAoXYdCTGrpIWRivIzKk = trim( strip_tags( $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 5 ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] ) );
          }
          $ejYnvQryAEOHJhKvleSiMKflZqBJKrsfuvyEU = trim( substr( $hTBNPbxbxEkWMpMVAoXYdCTGrpIWRivIzKk, - 2 ) );
          if ( $ejYnvQryAEOHJhKvleSiMKflZqBJKrsfuvyEU == \'OK\' || $ejYnvQryAEOHJhKvleSiMKflZqBJKrsfuvyEU == \'ms\' || $ejYnvQryAEOHJhKvleSiMKflZqBJKrsfuvyEU == "" )
          {
            $hTBNPbxbxEkWMpMVAoXYdCTGrpIWRivIzKk = 2;
          }
          else
          {
            $hTBNPbxbxEkWMpMVAoXYdCTGrpIWRivIzKk = 1;
          }
          $FKaZVSHZRCxLdMAtbyFIufXVbxJDHZTVmUBUgI[ $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 2 ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] ][ \'id\' ] ] = array( "multics_id" => $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 1 ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ], "line_info" => $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 2 ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] ], "zaps" => ($zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ != "newcamd") ? $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 5 ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] : $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 4 ][ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ], "emulator" => $zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ, "online" => $hTBNPbxbxEkWMpMVAoXYdCTGrpIWRivIzKk );
        }
      }
    }
  }
  return $FKaZVSHZRCxLdMAtbyFIufXVbxJDHZTVmUBUgI;
}

function eEMngkjalTsRMEOYDBXzxFONXuJcupcPyeQR ( $FKaZVSHZRCxLdMAtbyFIufXVbxJDHZTVmUBUgI, $WpFiAaWkxLTvasqjbarrImxEEzVtSTE, $oRjBmIifkcpHFRMENTgIzgNpwZKCQYU, $UxOZnuCRmRAazSKWEtMeyeToqgKqUVFOg )
{
  if ( ! is_array( $FKaZVSHZRCxLdMAtbyFIufXVbxJDHZTVmUBUgI ) )
  {
    return 0;
  }
  foreach ( $FKaZVSHZRCxLdMAtbyFIufXVbxJDHZTVmUBUgI as $rKtjjytgRkFCZvsYCbiuXywNLejYVPlhNM )
  {
    if ( $rKtjjytgRkFCZvsYCbiuXywNLejYVPlhNM[ $WpFiAaWkxLTvasqjbarrImxEEzVtSTE ] === $oRjBmIifkcpHFRMENTgIzgNpwZKCQYU )
    {
      if ( is_array( $UxOZnuCRmRAazSKWEtMeyeToqgKqUVFOg ) )
      {
        $SbaQNErKfDxowdIuFcPPYwChdvzbeTLDahwVQto = array();
        foreach ( $UxOZnuCRmRAazSKWEtMeyeToqgKqUVFOg as $XOlzDywpOciXAUSIjhBdVbPctEeXCCFOfEw )
        {
          if ( array_key_exists( $XOlzDywpOciXAUSIjhBdVbPctEeXCCFOfEw, $rKtjjytgRkFCZvsYCbiuXywNLejYVPlhNM ) )
          {
            $SbaQNErKfDxowdIuFcPPYwChdvzbeTLDahwVQto[ ] = $rKtjjytgRkFCZvsYCbiuXywNLejYVPlhNM[ $XOlzDywpOciXAUSIjhBdVbPctEeXCCFOfEw ];
          }
        }
        return $SbaQNErKfDxowdIuFcPPYwChdvzbeTLDahwVQto;
      }
      else
      {
        return $rKtjjytgRkFCZvsYCbiuXywNLejYVPlhNM[ $UxOZnuCRmRAazSKWEtMeyeToqgKqUVFOg ];
      }
    }
  }
  return 0;
}


	function url_result($url, $user, $pass) {
    $ch = curl_init();
    $userAgent = \'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5\';

    curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
    curl_setopt($ch, CURLOPT_AUTOREFERER, true);
    curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
	curl_setopt($ch, CURLOPT_HTTPHEADER,     array(\'Content-Type: text/xml\')); 

    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_USERPWD, $user . ":" . $pass);

    $data = curl_exec($ch);

	   
	
	/*
	
    if (curl_errno($ch)> 0){
        die(\'There was a cURL error: \' . curl_error($ch));
    } else {
        curl_close($ch);
*/



        return $data;
    }


function get_between($content, $start, $end){
	$r = explode($start, $content);
	if (isset($r[1])){
		$r = explode($end, $r[1]);
		return $r[0];
	}
	return \'\';
}


function url_check($url, $user, $pass)
{
    	$ch = curl_init();
    	$userAgent = \'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 GTB5\';

    	curl_setopt($ch, CURLOPT_USERAGENT, $userAgent);
    	curl_setopt($ch, CURLOPT_URL, $url);
    	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    	curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
    	curl_setopt($ch, CURLOPT_AUTOREFERER, true);
    	curl_setopt($ch, CURLOPT_TIMEOUT, 30);
    	curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    	curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
    	//curl_setopt($ch, CURLOPT_HEADER, 1);
    	curl_setopt($ch, CURLOPT_USERPWD, $user . ":" . $pass);

    	$data = curl_exec($ch);
	$info = curl_getinfo($ch);
        curl_close($ch);

	if (empty($info[\'http_code\'])) {
        	$data3="error";
    	} else {
        	// load the HTTP codes
        	$data3=$info[\'http_code\'];
	}
	//echo $data3;
    	return $data3;
}


function DLCuvOIdvDRxZjbRkmaOBeEtFvIpkuQGM ( $xVsdXLfYVLgEWyTlxJpGgTxKLQUFXBzRCU, $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc )
{
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  foreach ( $xVsdXLfYVLgEWyTlxJpGgTxKLQUFXBzRCU as $vsoUnWAxYIeyfhpklUzbRnsqTRUrzOnPpAcyU )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ ] = $vsoUnWAxYIeyfhpklUzbRnsqTRUrzOnPpAcyU[ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ];
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function MXxaxAaUuizfJTWmZshaNBbIPCpxvo ( $rXJHTTCJoTzFkfzuEwkSbcctojVMocBTbsAc, $dXmQMpDJHJVTpkNPKawnXBZyJnmNDSDu = \'user\' )
{
  global $mcDB, $mcMember;
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  if ( ! is_array( $rXJHTTCJoTzFkfzuEwkSbcctojVMocBTbsAc ) )
  {
    return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
  }
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.*,t2.`master_server_id` as `master_server_id`,t2.`domain_name` AS domain_name, t2.`description` AS description, t2.`port` AS port, t3.emulator_name AS emulator_name,t3.id as emulator_id FROM `lines` t1, `multics_servers` t2, `emulators` t3 WHERE t2.emulator_id = t3.id AND t1.server_id = t2.id AND t1.`id` IN (" . implode( ",", $rXJHTTCJoTzFkfzuEwkSbcctojVMocBTbsAc ) . ")" );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) == 0 )
  {
    return array();
  }
  $vEpqYuhSuEDLcndnSVnIkoDnZMNUjJlqfN = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  $CJmouEtuOMxIAGgLTpwUDGyzqMGaAEdjSxs = upzpUQDSvbmvIQrAiyHPgIUIZiGeJMzxY( );
  if ( $dXmQMpDJHJVTpkNPKawnXBZyJnmNDSDu == \'user\' )
  {
    foreach ( $vEpqYuhSuEDLcndnSVnIkoDnZMNUjJlqfN as $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM )
    {
      if ( ! isset( $TTqmmAgABBMDPKSZOELErYCXBwxyMtFWGqtrk[ $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'master_server_id\' ] ] ) )
      {
        $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `config_value` FROM `multics_config_vars` WHERE `master_server_id` = \'%d\' AND `config_value_name` = \'%s\'", $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'master_server_id\' ], \'MGCAMD KEY\' );
        if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
        {
          $TTqmmAgABBMDPKSZOELErYCXBwxyMtFWGqtrk[ $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'master_server_id\' ] ] = $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( );
        }
        else
        {
          $TTqmmAgABBMDPKSZOELErYCXBwxyMtFWGqtrk[ $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'master_server_id\' ] ] = "01 02 03 04 05 06 07 08 09 10 11 12 13 14";
        }
      }
      if ( ! isset( $RQqojXWAQaqYYrWUVoLExMCZk[ $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'master_server_id\' ] ] ) )
      {
        $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `config_value` FROM `multics_config_vars` WHERE `master_server_id` = \'%d\' AND `config_value_name` = \'%s\'", $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'master_server_id\' ], \'DEFAULT KEY\' );
        if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
        {
          $RQqojXWAQaqYYrWUVoLExMCZk[ $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'master_server_id\' ] ] = $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( );
        }
        else
        {
          $RQqojXWAQaqYYrWUVoLExMCZk[ $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'master_server_id\' ] ] = "01 02 03 04 05 06 07 08 09 10 11 12 13 14";
        }
      }
      switch ( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'emulator_id\' ] )
      {
        case 1:
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'id\' ] ][ ] = "C: {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'domain_name\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'port\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'username\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'password\']}";
          break;
        case 2:
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'id\' ] ][ ] = "CWS = {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'domain_name\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'port\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'username\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'password\']} {$TTqmmAgABBMDPKSZOELErYCXBwxyMtFWGqtrk[$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'master_server_id\']]}";
          break;
        case 3:
          $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT = "N: {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'domain_name\']} [PROFILE_PORT] {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'username\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'password\']} {$RQqojXWAQaqYYrWUVoLExMCZk[$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'master_server_id\']]}";
          $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE = explode( ",", $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'profiles\' ] );
          foreach ( $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE as $WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI )
          {
            $nNukxWKLpgIqtWHqZVwaysTTqRnpcXUbHxDrpE = str_replace( "[PROFILE_PORT]", $CJmouEtuOMxIAGgLTpwUDGyzqMGaAEdjSxs[ $WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI ], $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT );
            $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'id\' ] ][ ] = $nNukxWKLpgIqtWHqZVwaysTTqRnpcXUbHxDrpE;
          }
          break;
      }
    }
  }
  else
  {
    foreach ( $vEpqYuhSuEDLcndnSVnIkoDnZMNUjJlqfN as $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM )
    {
      $ftIznUWGlGdmUWNSGAwhoEtPjjUAiUIs = @unserialize( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'line_options\' ] );
      $dnfNcRpTEmnCPWCTSEeDEGLvnRFFNVhNc = "";
      if ( ! empty( $ftIznUWGlGdmUWNSGAwhoEtPjjUAiUIs ) )
      {
        foreach ( $ftIznUWGlGdmUWNSGAwhoEtPjjUAiUIs as $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc => $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM )
        {
          $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc = @str_replace( "=", "", $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc );
          if ( substr( $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM, - 1 ) == \';\' )
            $dnfNcRpTEmnCPWCTSEeDEGLvnRFFNVhNc .= $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc . \'=\' . $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM . \' \';
          else
            $dnfNcRpTEmnCPWCTSEeDEGLvnRFFNVhNc .= $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc . \'=\' . $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM . \'; \';
        }
      }
      $dnfNcRpTEmnCPWCTSEeDEGLvnRFFNVhNc = trim( $dnfNcRpTEmnCPWCTSEeDEGLvnRFFNVhNc );
      $AgMdqTDzCjMnOBIsowiyLEqtheHQOBSrPmhgg = "";
      if ( strlen( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'profiles\' ] ) > 0 )
      {
        $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE = explode( ",", $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'profiles\' ] );
        foreach ( $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE as $WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI )
        {
          if ( array_key_exists( $WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI, $CJmouEtuOMxIAGgLTpwUDGyzqMGaAEdjSxs ) )
            $AgMdqTDzCjMnOBIsowiyLEqtheHQOBSrPmhgg .= $CJmouEtuOMxIAGgLTpwUDGyzqMGaAEdjSxs[ $WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI ] . ",";
        }
        $AgMdqTDzCjMnOBIsowiyLEqtheHQOBSrPmhgg = substr( $AgMdqTDzCjMnOBIsowiyLEqtheHQOBSrPmhgg, 0, - 1 );
      }
      else
      {
        $AgMdqTDzCjMnOBIsowiyLEqtheHQOBSrPmhgg = 0;
      }
      $VoiZORHgiPwgcfNXLqBqnTsbJhhDQoPLjjk = $mcMember->enuLZXwCAGrbvPofcgEYEOgeRSIcNwSMgoze( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'member_id\' ] );
      if ( $VoiZORHgiPwgcfNXLqBqnTsbJhhDQoPLjjk === false )
      {
        $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw = "";
        $VoiZORHgiPwgcfNXLqBqnTsbJhhDQoPLjjk = \'NONE\';
      }
      else
      {
        $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw = "panel_memberid=" . $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'member_id\' ] . \';\';
      }
      $MDvdmsLcPfyAsVarysQqkKkVsZjIXsVCuyIlATuEQ = "";
      if ( ! is_null( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'date_end\' ] ) )
      {
        $MDvdmsLcPfyAsVarysQqkKkVsZjIXsVCuyIlATuEQ = "panel_expdate=" . $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'date_end\' ] . \';\';
      }
      $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM = "test_line=" . $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'test_line\' ] . \';\';
      $ONJAznIuIASvylYAOSLLZWAdomXTJhMBdmq = "profile_ids=" . $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'profiles\' ] . \';\';
      switch ( $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'emulator_id\' ] )
      {
        case 1:
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CCCAM PORT: \' . $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'port\' ] ][ ] = "F: {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'username\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'password\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'reshare\']} { $dnfNcRpTEmnCPWCTSEeDEGLvnRFFNVhNc name=$VoiZORHgiPwgcfNXLqBqnTsbJhhDQoPLjjk; $MDvdmsLcPfyAsVarysQqkKkVsZjIXsVCuyIlATuEQ $ONJAznIuIASvylYAOSLLZWAdomXTJhMBdmq $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw profiles=$AgMdqTDzCjMnOBIsowiyLEqtheHQOBSrPmhgg; }";
          break;
        case 2:
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'MGCAMD PORT: \' . $MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[ \'port\' ] ][ ] = "MGUSER: {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'username\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'password\']} { $dnfNcRpTEmnCPWCTSEeDEGLvnRFFNVhNc name=$VoiZORHgiPwgcfNXLqBqnTsbJhhDQoPLjjk; $MDvdmsLcPfyAsVarysQqkKkVsZjIXsVCuyIlATuEQ $ONJAznIuIASvylYAOSLLZWAdomXTJhMBdmq $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw profiles=$AgMdqTDzCjMnOBIsowiyLEqtheHQOBSrPmhgg; }";
          break;
        case 3:
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'USER\' ][ ] = "USER: {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'username\']} {$MVxFYLxJdIYdlSkGEvSOgWdgcXnEjIbgOM[\'password\']} { $AgMdqTDzCjMnOBIsowiyLEqtheHQOBSrPmhgg; $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM $MDvdmsLcPfyAsVarysQqkKkVsZjIXsVCuyIlATuEQ $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw $ONJAznIuIASvylYAOSLLZWAdomXTJhMBdmq $dnfNcRpTEmnCPWCTSEeDEGLvnRFFNVhNc }";
          break;
      }
    }
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function BRdrDnvguWeUxAbhDRleQItyBwaHnbikRCtybVY ( $RqyBBjafAEbIRYcFtXdChWLXacwHEVIKSZycOE, $ueIkLaHVJOLanaTUgHUHWsXnzUjCFZHwtdAIr )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `package_id` FROM `group_packages` WHERE `group_id` = \'%d\'", $RqyBBjafAEbIRYcFtXdChWLXacwHEVIKSZycOE );
  $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $hdAWGJiYhdWJcKfPoxjjtaRpbRoSBuHelhCC = mcLib::sLYQRInHqFhKEHlZrlkIQnxTDtZrYVNtKK( $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( ) );
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `lines_options` WHERE `option_type` = \'%d\' AND id IN(" . implode( ",", $hdAWGJiYhdWJcKfPoxjjtaRpbRoSBuHelhCC ) . ")", $ueIkLaHVJOLanaTUgHUHWsXnzUjCFZHwtdAIr );
    if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
    {
      $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
    }
  }
  return $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl;
}

function oBucYiIdWXFpQOhjVOZGfzxgmCdvSaXawlJU ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  global $mcDB;
  $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU = qUlcDtRuZmaQHePVpmaDOoKhBgiQdsjEIc( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE = hmAwbwfvbCIDVTGrAUhxGfvwwtmcebShRGNuL( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs = rgJYriKrXFPMkjrcdXPmGtITBbIEDMNUQI( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `lines` WHERE (`date_end` > \'" . time( ) . "\' OR `date_end` IS NULL) AND `blocked` = 0 AND `enable` = 1 AND `server_id` IN(" . implode( ",", $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) . ")" );
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $oJCZbqXRQAIzsjgkbFyqmMOMzynnr = mcLib::sLYQRInHqFhKEHlZrlkIQnxTDtZrYVNtKK( $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( ) );
    $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = MXxaxAaUuizfJTWmZshaNBbIPCpxvo( $oJCZbqXRQAIzsjgkbFyqmMOMzynnr, \'config\' );
  }
   $vUEaDzbnTibYcfhCkKhfHpheWqBoYjhY =  "#===============================================================#\r\n";
   $vUEaDzbnTibYcfhCkKhfHpheWqBoYjhY .= "#===================== MultiCS Panel v4.8 ======================#\r\n";
   $vUEaDzbnTibYcfhCkKhfHpheWqBoYjhY .= "#===============================================================#\r\n\r\n\r\n";
  $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ = "";
  unset( $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ \'CCCAM PORT\' ] );
  unset( $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ \'MGCAMD PORT\' ] );
  foreach ( $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU as $rfNrOeeMCJzwLfffhbizDjyTQfpvtspGIXhk => $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM )
  {
    if ( is_array( $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM ) )
    {
      foreach ( $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM as $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM )
      {
        $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= $rfNrOeeMCJzwLfffhbizDjyTQfpvtspGIXhk . ": " . $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM . "\r\n";
      }
    }
    else
    {
      $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= $rfNrOeeMCJzwLfffhbizDjyTQfpvtspGIXhk . ": " . $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM . "\r\n";
    }
  }
  foreach ( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp as $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc => $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT )
  {
    if ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc != \'USER\' )
      $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc . " #SERVER FOR LINES\r\n";
    foreach ( $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT as $BIIdlAwzrVQHZsDfIApuSeSqhCyVsPFxjlWwfE )
    {
      $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= $BIIdlAwzrVQHZsDfIApuSeSqhCyVsPFxjlWwfE . "\r\n";
    }
  }
  $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= yRiFxtJZpetzFCGGJdwfeeBRRLELsSLIOXChLBGbnk( $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE );
  if ( empty( $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ ) )
  {
    return false;
  }
  return $vUEaDzbnTibYcfhCkKhfHpheWqBoYjhY . $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ;
}

function yRiFxtJZpetzFCGGJdwfeeBRRLELsSLIOXChLBGbnk ( $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE )
{
  $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ = "";
  foreach ( $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE as $WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI )
  {
    $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= "[{$WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI[\'profile_name\']}]\r\n";
    $jwZlRjPJJsEAqtWfknsiOPmYCwpEBnsYhXmAfs = unserialize( $WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI[ \'profile_options\' ] );
    foreach ( $jwZlRjPJJsEAqtWfknsiOPmYCwpEBnsYhXmAfs as $EcdxFeQuVoMFpKmSWHSkdDNJLgRbSdvwQ => $CnsMmdLsjZHWKUYOFjaTkPgteUxNwmOEcfNc )
    {
      $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= $EcdxFeQuVoMFpKmSWHSkdDNJLgRbSdvwQ . " : " . $CnsMmdLsjZHWKUYOFjaTkPgteUxNwmOEcfNc . "\r\n";
    }
    $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= "\r\n\r\n##############################\r\n\r\n";
  }
  return $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ;
}

function upzpUQDSvbmvIQrAiyHPgIUIZiGeJMzxY ( $AGISLiuSCWwzoEHNczCSPbUpEfeGsfhXpQhZMJjE = false )
{
  global $mcDB;
  if ( $AGISLiuSCWwzoEHNczCSPbUpEfeGsfhXpQhZMJjE )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `profile_options` FROM `profiles` WHERE `id` = \'%d\'", $AGISLiuSCWwzoEHNczCSPbUpEfeGsfhXpQhZMJjE );
    $UIxVjJkDpArqKYfbpLOcaehrVBCHgqvQY = unserialize( $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( ) );
    return array( $AGISLiuSCWwzoEHNczCSPbUpEfeGsfhXpQhZMJjE => $UIxVjJkDpArqKYfbpLOcaehrVBCHgqvQY[ \'PORT\' ] );
  }
  else
  {
    $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE = array();
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id`,`profile_options` FROM `profiles`" );
    foreach ( $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( ) as $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs )
    {
      $UIxVjJkDpArqKYfbpLOcaehrVBCHgqvQY = unserialize( $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'profile_options\' ] );
      if ( array_key_exists( \'PORT\', $UIxVjJkDpArqKYfbpLOcaehrVBCHgqvQY ) and is_numeric( $UIxVjJkDpArqKYfbpLOcaehrVBCHgqvQY[ \'PORT\' ] ) )
      {
        $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'id\' ] ] = $UIxVjJkDpArqKYfbpLOcaehrVBCHgqvQY[ \'PORT\' ];
      }
    }
    return $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE;
  }
}

function OyUAmKmRjMKmaUdTnqgLqdyFnqRoPrtEofsMP ( )
{
  return TRUE;
}

function DgfgKeLTBlEfWDyjkTOzsQlcHqEnvKKJexY ( $dBQstFLRgwLkBVnxVeaGGzHKeHnLryPQto = false )
{
  return $dBQstFLRgwLkBVnxVeaGGzHKeHnLryPQto ? FALSE : TRUE;
}

function XPkSZNlGXyxtRXrNNOuzejFMdHOabHzvtdc ( $DusLBJMhUCzywEODLgLmdsIDgALlrZDDLiKY, $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc = \'\' )
{
  return NULL;
}

function pFpKJvtbBXELLMhkVafUkCsKePHMRDDNtRkuI ( $FkwpJNTPndxffUzDpuyCLnNWTCiywSUWBmmY )
{
  return NULL;
}

function GTdEUMbLdTGkyqQVsPwATtvzRKsDRLgOzerQ ( )
{
  tEJMxRHZYAcQGLnMttsPwXuLfbsubE( 0 );
  return TRUE;
}

function tEJMxRHZYAcQGLnMttsPwXuLfbsubE ( $qpvldMTAVaiMrhLqJToqUWOsYiwmAxdWesagA )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `multics_licence` SET `show_message` = \'%d\' WHERE `id` = 1", $qpvldMTAVaiMrhLqJToqUWOsYiwmAxdWesagA );
}

function hhWsScCioFnqBpnRgLBAWFYbrZtQugsBDBYs ( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw, $upLEjvhCNokQZCysQMKMsHhSBYBTUDmTLfc )
{
  if ( ! is_readable( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw ) )
    die( \'File not found or inaccessible! Contact administrator\' );
  $YLtkveuXRGksIkLmuEXqMVYlZlAEJZRVHVQ = filesize( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw );
  $upLEjvhCNokQZCysQMKMsHhSBYBTUDmTLfc = rawurldecode( $upLEjvhCNokQZCysQMKMsHhSBYBTUDmTLfc );
  @ob_end_clean( );
  if ( ini_get( \'zlib.output_compression\' ) )
    ini_set( \'zlib.output_compression\', \'Off\' );
  header( \'Content-Type: text/plain\' );
  header( \'Content-Disposition: attachment; filename="\' . $upLEjvhCNokQZCysQMKMsHhSBYBTUDmTLfc . \'"\' );
  header( "Content-Transfer-Encoding: binary" );
  header( \'Accept-Ranges: bytes\' );
  header( "Cache-control: private" );
  header( \'Pragma: private\' );
  header( "Expires: Mon, 26 Jul 1997 05:00:00 GMT" );
  if ( isset( $_SERVER[ \'HTTP_RANGE\' ] ) )
  {
    list ( $QofNWSpOGrfDYwUHjbwOGlsYcbGnKKnmaG, $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI ) = explode( "=", $_SERVER[ \'HTTP_RANGE\' ], 2 );
    list ( $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI ) = explode( ",", $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI, 2 );
    list ( $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI, $WvIrVDoNpxgucRchVTkRvUmKqTWNSgUhwduxQgA ) = explode( "-", $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI );
    $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI = intval( $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI );
    if ( ! $WvIrVDoNpxgucRchVTkRvUmKqTWNSgUhwduxQgA )
    {
      $WvIrVDoNpxgucRchVTkRvUmKqTWNSgUhwduxQgA = $YLtkveuXRGksIkLmuEXqMVYlZlAEJZRVHVQ - 1;
    }
    else
    {
      $WvIrVDoNpxgucRchVTkRvUmKqTWNSgUhwduxQgA = intval( $WvIrVDoNpxgucRchVTkRvUmKqTWNSgUhwduxQgA );
    }
    $AuwYxNwdIoDTEYshMEWJDAcOSdnmCiCemU = $WvIrVDoNpxgucRchVTkRvUmKqTWNSgUhwduxQgA - $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI + 1;
    header( "HTTP/1.1 206 Partial Content" );
    header( "Content-Length: $AuwYxNwdIoDTEYshMEWJDAcOSdnmCiCemU" );
    header( "Content-Range: bytes $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI-$WvIrVDoNpxgucRchVTkRvUmKqTWNSgUhwduxQgA/$YLtkveuXRGksIkLmuEXqMVYlZlAEJZRVHVQ" );
  }
  else
  {
    $AuwYxNwdIoDTEYshMEWJDAcOSdnmCiCemU = $YLtkveuXRGksIkLmuEXqMVYlZlAEJZRVHVQ;
    header( "Content-Length: " . $YLtkveuXRGksIkLmuEXqMVYlZlAEJZRVHVQ );
  }
  $PFFQtBNCWxfToWDEBneubfJcMOurmUHcCOM = 1 * (1024 * 1024);
  $NSoxFeSdVZEHnvIicTzPJquiBVd = 0;
  if ( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw = fopen( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw, \'r\' ) )
  {
    if ( isset( $_SERVER[ \'HTTP_RANGE\' ] ) )
      fseek( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw, $lfHJSdoELKgWgpGrlKFQvrugoehPskAkyOUI );
    while ( ! feof( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw ) && (! connection_aborted( )) && ($NSoxFeSdVZEHnvIicTzPJquiBVd < $AuwYxNwdIoDTEYshMEWJDAcOSdnmCiCemU) )
    {
      $zEYkkIVvkrLzMdToiKwOZNTKDidEHMQjFWVY = fread( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw, $PFFQtBNCWxfToWDEBneubfJcMOurmUHcCOM );
      print ($zEYkkIVvkrLzMdToiKwOZNTKDidEHMQjFWVY) ;
      flush( );
      $NSoxFeSdVZEHnvIicTzPJquiBVd += strlen( $zEYkkIVvkrLzMdToiKwOZNTKDidEHMQjFWVY );
    }
    fclose( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw );
    @unlink( $JqWYUJnYbJhGNDdwGsIkkSCfITQllw );
  }
  else
    die( \'Error - can not open file.\' );
  die( );
}

function AgnUUBeUpHEzNqbLspCaygaKysReDQiBf ( $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.*,t2.emulator_name FROM `multics_servers` t1,`emulators` t2 WHERE t1.`emulator_id` = t2.`id` AND t1.`id` = \'%d\'", $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  }
  return false;
}

function XzPdZKDhyYJjLVGZimLnXIOzBrJjbmkRHI ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY )
{
  global $mcDB;
  WaPbSGexTdikWMpoWabVuGeqKlfZxEXQDUQ( 1 );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "DELETE FROM `multics_config_vars` WHERE `config_value_name` = \'HTTP USER\' AND `master_server_id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "DELETE FROM `multics_config_vars` WHERE `config_value_name` = \'HTTP PASS\' AND `master_server_id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "DELETE FROM `multics_config_vars` WHERE `config_value_name` = \'HTTP PORT\' AND `master_server_id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `multics_config_vars` (`config_value_name`,`config_value`,`master_server_id`) VALUES(\'%s\',\'%s\',\'%d\')", \'HTTP USER\', $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `multics_config_vars` (`config_value_name`,`config_value`,`master_server_id`) VALUES(\'%s\',\'%s\',\'%d\')", \'HTTP PORT\', $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `multics_config_vars` (`config_value_name`,`config_value`,`master_server_id`) VALUES(\'%s\',\'%s\',\'%d\')", \'HTTP PASS\', $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $xLvUXTzqjKsMJKplZOCQAphgTgqSRUiQzAQ = oBucYiIdWXFpQOhjVOZGfzxgmCdvSaXawlJU( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  CuCSxyhINcUKGtFvQMjsYppplRNvSztRIVlc( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $xLvUXTzqjKsMJKplZOCQAphgTgqSRUiQzAQ );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `multics_master_servers` SET `username` = \'%s\',`password` = \'%s\' WHERE `id` = \'%d\'", $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( ! is_null( $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU ) )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `multics_master_servers` SET `domain` = \'%s\' WHERE `id` = \'%d\'", $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `multics_servers` SET `domain_name` = \'%s\' WHERE `master_server_id` = \'%d\'", $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  }
  uCvtIAVzQwdGAMKLaaJFXVlObFPArkvbRRVYGfc( 1 );
}

function gzYLbuDxOAXvDpzJDcFiNVYxZxnoiRxzjUMrtck ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $JWMXOdQgIPYBstNNMfLQHTehuxMKRGKmsWhI )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `default_server_id` FROM `multics_server_emulators` WHERE `emulator_id` = \'%d\' AND `master_server_id` = \'%d\'", $JWMXOdQgIPYBstNNMfLQHTehuxMKRGKmsWhI, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA = intval( $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( ) );
    $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ = AgnUUBeUpHEzNqbLspCaygaKysReDQiBf( $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA );
    if ( is_array( $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ ) )
    {
      if ( $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'port\' ] == 0 )
        $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'port\' ] = \'*\';
      return $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ;
    }
    return false;
  }
  return false;
}

function QFMluUTpWBQcmkeXrYTXjEPujFcVLwSXRik ( $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA, $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu = array() )
{
  global $mcDB;
  if ( empty( $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu ) )
  {
    $UhdkqnTQnEoyfBWewLEhdfWfwOVxxofwLJu = AgnUUBeUpHEzNqbLspCaygaKysReDQiBf( $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA );
  }
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "DELETE FROM `multics_servers` WHERE `id` = \'%d\'", $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `multics_server_emulators` SET `default_server_id` = 0 WHERE `default_server_id` = \'%d\'", $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA );
}

function hQFiMCFNDMzqLhPxRSyGZALDYruATg ( $BmTpyYBArMKQPCRSLcVAzQpjGdCmhEZIDc, $VlltVwtLJMZirljrQVEZDgsXdFapHKQ )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `lines` SET `server_id` = \'%d\' WHERE `server_id` = \'%d\'", $VlltVwtLJMZirljrQVEZDgsXdFapHKQ, $BmTpyYBArMKQPCRSLcVAzQpjGdCmhEZIDc );
}

function LRRvJRBocmjnEzgAdfYcVBQNajQyraJvPfM ( $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT count(id) FROM `lines` WHERE `server_id` = \'%d\'", $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA );
  return $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( );
}

function fHsiLcILgHErKJrsTfZEJsHCehNZAjwrQIqOE ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc = false )
{
  global $mcDB;
  $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf = array();
  if ( ! empty( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc ) )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.*,t2.emulator_name FROM `multics_servers` t1,`emulators` t2 WHERE t1.`emulator_id` = t2.`id` AND `master_server_id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.*,t2.emulator_name FROM `multics_servers` t1,`emulators` t2 WHERE t1.`emulator_id` = t2.`id`" );
  }
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
    foreach ( $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl as $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs )
    {
      if ( ! is_array( $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'master_server_id\' ] ] ) )
      {
        $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'master_server_id\' ] ] = array();
      }
      if ( $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'port\' ] == 0 )
      {
        $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'port\' ] = \'*\';
      }
      $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'master_server_id\' ] ][ ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs;
    }
  }
  return $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf;
}

function tMKOaCRnlddBinWvlkGmWMZHYFTWPS ( $olxQYtqCxlDHwTVzSsVZqigaedvcEoXVowkRg = null )
{
  $uFLXefZOWIgZuJlXtDRSwjGCUVuSYHnzuU = array( 1 => "Administrator", 2 => "Normal User", 3 => "Banned" );
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = "<select name=\"role\">";
  if ( ! is_null( $olxQYtqCxlDHwTVzSsVZqigaedvcEoXVowkRg ) )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH .= "<option value=\"$olxQYtqCxlDHwTVzSsVZqigaedvcEoXVowkRg\" selected>{$uFLXefZOWIgZuJlXtDRSwjGCUVuSYHnzuU[$olxQYtqCxlDHwTVzSsVZqigaedvcEoXVowkRg]}</option>";
    unset( $uFLXefZOWIgZuJlXtDRSwjGCUVuSYHnzuU[ $olxQYtqCxlDHwTVzSsVZqigaedvcEoXVowkRg ] );
  }
  foreach ( $uFLXefZOWIgZuJlXtDRSwjGCUVuSYHnzuU as $KqBOXxsTFtprZUAkaGFlfDZuCbmBlLhWA => $NzikgLkttqkxjdKiwoBulDRWjTPHDpQrE )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH .= "<option value=\"$KqBOXxsTFtprZUAkaGFlfDZuCbmBlLhWA\">$NzikgLkttqkxjdKiwoBulDRWjTPHDpQrE</option>";
  }
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH .= "</select>";
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function nAxOvXXUOWhRJMcBHuHLkVzvwveLTFvrlf ( $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU, $rKtjjytgRkFCZvsYCbiuXywNLejYVPlhNM, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $CphMeSrTExlZCaZxjDLyhNifxgILplQebFJA )
{
  $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg = giVihcIAplDDhWVfapZXkdopkxjXNtULY( $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $rKtjjytgRkFCZvsYCbiuXywNLejYVPlhNM, $CphMeSrTExlZCaZxjDLyhNifxgILplQebFJA, \'editor\' );
  if ( $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg )
  {
    if ( stristr( $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg, "Multi" ) )
    {
      if ( preg_match( "/<textarea cols=\"40\" wrap=\"off\" rows=\"9\" spellcheck=\"false\" name=\"textedit\">(.*?)<\/textarea>/s", $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg, $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM ) )
      {
        return \'OK\';
      }
      else
      {
        return \'NO_EDITOR\';
      }
    }
    else
    {
      return \'NO_MULTICS\';
    }
  }
  return \'AUTH_OR_NO_MULTICS\';
}

function DdLNcDLvarpaEcRrxmrSBQHffLxrBExvcjd ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `multics_master_servers` WHERE `id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ = $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs = @str_ireplace( "http://", "", $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'domain\' ] );
  $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg = giVihcIAplDDhWVfapZXkdopkxjXNtULY( $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'domain\' ], $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'port\' ], $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'username\' ], $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'password\' ], "editor" );
  $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ = "";
  if ( $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg )
  {
    preg_match( "/<textarea cols=\"40\" wrap=\"off\" rows=\"9\" spellcheck=\"false\" name=\"textedit\">(.*?)<\/textarea>/s", $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg, $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM );
    if ( ! isset( $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 1 ] ) )
    {
      return false;
    }
    $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 1 ];
    preg_match_all( "/<option value=\"\/editor(.*?)\"/", $kmFAlcgmXFPRdUJfdCDogfzWChxUcTebylg, $kRpggdBdSSgoAlTbSGlXzENejrxlLEtU );
    $kRpggdBdSSgoAlTbSGlXzENejrxlLEtU = $kRpggdBdSSgoAlTbSGlXzENejrxlLEtU[ 1 ];
    array_shift( $kRpggdBdSSgoAlTbSGlXzENejrxlLEtU );
    if ( count( $kRpggdBdSSgoAlTbSGlXzENejrxlLEtU ) > 0 )
    {
      foreach ( $kRpggdBdSSgoAlTbSGlXzENejrxlLEtU as $OainZYuuOBWFRLvLmCqRhCNMTvxIQHruKYeTME )
      {
        $ChVLTQlsxBAbAlUJuHgPFnReSzeihcXg = "editor" . $OainZYuuOBWFRLvLmCqRhCNMTvxIQHruKYeTME;
        $URXUDdhtzLjUQjOeTTYNdhsqrqFJXKRgIA = giVihcIAplDDhWVfapZXkdopkxjXNtULY( $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'domain\' ], $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'port\' ], $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'username\' ], $roZfphrbRciTKEYMqDDHmudrSgbNGKIclfJ[ \'password\' ], $ChVLTQlsxBAbAlUJuHgPFnReSzeihcXg );
        if ( preg_match( "/<textarea cols=\"40\" wrap=\"off\" rows=\"9\" spellcheck=\"false\" name=\"textedit\">(.*?)<\/textarea>/s", $URXUDdhtzLjUQjOeTTYNdhsqrqFJXKRgIA, $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM ) )
        {
          $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ .= "\n\n" . $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 1 ];
        }
      }
    }
  }
  return (! empty( $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ )) ? $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ : false;
}

function giVihcIAplDDhWVfapZXkdopkxjXNtULY ( $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY, $yuwswoauPFsFNpkQTyRHBekbAHibZsNeeOUyNeHM = \'\', $SezVgOxAZwzTHIKWlWuxhpSFCGJIdczeCds = 0, $ikeYZkmHdRAhFgHXneZxlTjnLTGYmvAczygfoIPnM = array() )
{
  $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU = "http://" . $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU . \':\' . $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp;
  $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD = curl_init( );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_URL, $ohPnetUvJCPtOjwymIltrcNUnhPUXzBU . \'/\' . $yuwswoauPFsFNpkQTyRHBekbAHibZsNeeOUyNeHM );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_PORT, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_RETURNTRANSFER, true );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_HTTPAUTH, CURLAUTH_ANY );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_CONNECTTIMEOUT, 15 );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_TIMEOUT, 15 );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_FRESH_CONNECT, true );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_FOLLOWLOCATION, true );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_USERAGENT, \'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13\' );
  curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_USERPWD, "$DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw:$AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY" );
  if ( $SezVgOxAZwzTHIKWlWuxhpSFCGJIdczeCds > 0 )
  {
    curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_POST, true );
    curl_setopt( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD, CURLOPT_POSTFIELDS, $ikeYZkmHdRAhFgHXneZxlTjnLTGYmvAczygfoIPnM );
  }
  $VRzKwlrKyMXaVjtKYiDLBfOjzaHhpTLGEGc = curl_exec( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD );
  curl_close( $DTPILzlLBHLYhryvhPCIxqItMoLnsoStWRSLxHbD );
  return $VRzKwlrKyMXaVjtKYiDLBfOjzaHhpTLGEGc;
}

function FixLine ( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ )
{
  if ( stristr( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ, \'#\' ) )
  {
    $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ = strstr( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ, \'#\', true );
  }
  $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ = str_replace( "\x9", " ", $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ );
  $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ = @preg_replace( \'/[\x7f-\xff]/\', \'\', $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ );
  $hlmEOkYtpvgDBbRXbIVfuzgSzjWYiYQZwEs = substr_count( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ, "{" );
  $bTFdlAEjGmDPlwngIlxybnJPLIBHDymouDgI = substr_count( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ, "}" );
  if ( $hlmEOkYtpvgDBbRXbIVfuzgSzjWYiYQZwEs > $bTFdlAEjGmDPlwngIlxybnJPLIBHDymouDgI )
  {
    for ( $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII = 0; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII < $hlmEOkYtpvgDBbRXbIVfuzgSzjWYiYQZwEs - $bTFdlAEjGmDPlwngIlxybnJPLIBHDymouDgI; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII++ )
    {
      $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ .= \'} \';
    }
  }
  elseif ( $hlmEOkYtpvgDBbRXbIVfuzgSzjWYiYQZwEs < $bTFdlAEjGmDPlwngIlxybnJPLIBHDymouDgI )
  {
    for ( $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII = 0; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII < $bTFdlAEjGmDPlwngIlxybnJPLIBHDymouDgI - $hlmEOkYtpvgDBbRXbIVfuzgSzjWYiYQZwEs; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII++ )
    {
      $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ = preg_replace( \'/\{/\', \'\', $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ, 1 );
    }
  }
  return trim( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ );
}

function uUfmzmGZDpTQCAeUdwNYNzBoZEbAjgdXWNqkc ( $XcmjOcODJjoZfpZBFazCggIbeCHIhBcyiJX )
{
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = explode( "\n", $XcmjOcODJjoZfpZBFazCggIbeCHIhBcyiJX );
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array_map( "trim", $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp );
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array_map( "FixLine", $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp );
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array_values( array_filter( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp ) );
  $oPiOMRzmcJIZcTXsruSNTxXPhyPYHIfg = false;
  for ( $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII = 0; $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII < count( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp ); $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII++ )
  {
    $XaayCEGRRMOYiMtGrYddmMyuqjSiJrbYKM = substr( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ], 0, 1 );
    if ( $XaayCEGRRMOYiMtGrYddmMyuqjSiJrbYKM == \'/\' )
    {
      unset( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] );
      continue;
    }
    if ( $oPiOMRzmcJIZcTXsruSNTxXPhyPYHIfg )
    {
      if ( substr_count( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ], "}" ) == 1 or substr_count( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ], "\\" ) == 0 )
      {
        $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] = $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] . $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ];
        unset( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] );
        $oPiOMRzmcJIZcTXsruSNTxXPhyPYHIfg = false;
        continue;
      }
      $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] = str_replace( "\\", "", $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] );
      $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] = $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] . $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ];
      unset( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] );
      continue;
    }
    if ( substr_count( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ], "\\" ) or (substr_count( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ], "{" ) != substr_count( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ], "}" )) )
    {
      $oPiOMRzmcJIZcTXsruSNTxXPhyPYHIfg = true;
      $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc = $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII;
    }
    $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] = str_replace( "\\", "", $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp[ $PkmhXPbPvCcSikBmDzjHuyljGIDgckcLrskII ] );
  }
  return array_values( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp );
}

function LSjpoNEBaRdouncZXoTcxZoLgZTtMXDzGNPmlU ( )
{
  $cfXntTyaEpGNHNnqDKUwxHsaizzjhsJqvCc = array( \'KEY\', \'SERVER TIMEPERECM\', \'PORT\', \'ONID\', \'CAID\', \'PROVIDERS\', \'SID LIST\', \'ACCEPT NULL SID\', \'ACCEPT NULL CAID\', \'ECM HEADERWLST\', \'ACCEPT NULL PROVIDER\', \'DCW TIMEOUT\', \'DCW MAXFAILED\', \'DCW RETRY\',\'SID LIST !\', \'DCW CHECK\', \'DCW HALFNULLED\', \'DCW SWAP\', \'ECM CHECK\', \'ECM CHECK LENGTH\', \'SERVER TIMEOUT\', \'SERVER MAX\', \'SERVER INTERVAL\', \'SERVER VALIDECMTIME\', \'SERVER FIRST\', \'SERVER THRESHOLD\', \'RETRY NEWCAMD\', \'RETRY CCCAM\', \'RETRY MGCAMD\', \'CACHEEX VALIDECMTIME\', \'CACHEEX MAXHOP\', \'CACHE TIMEOUT\', \'CACHE SENDREQ\', \'CACHE SENDREP\', \'CACHE STATIC\', \'CACHE RESENDREQ\', \'ENABLE CCCAM\', \'ENABLE NEWCAMD\', \'ENABLE CACHE\', \'ENABLE CAMD35\', \'ENABLE CS378X\', \'ENABLE CACHEEX\', \'ENABLE MGCAMD\', \'SHARE CCCAM\', \'SHARE NEWCAMD\', \'SHARE MGCAMD\', \'DCW MINTIME\', \'RETRY CACHE\', \'DISABLE RADEGAST\', \'SID DENYLIST\', \'ACCEPT NULL ONID\', \'ECM LENGTH\', \'ENABLE ECMLOOPING\', \'ENABLE SKIPCWC\', \'ACCEPT NULL DCW\' );
  return $cfXntTyaEpGNHNnqDKUwxHsaizzjhsJqvCc;
}

function HxIXLGgfzpdkCylbBMghnymwTsUhPCOcW ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ = DdLNcDLvarpaEcRrxmrSBQHffLxrBExvcjd( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( ! $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ )
  {
    return false;
  }
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = uUfmzmGZDpTQCAeUdwNYNzBoZEbAjgdXWNqkc( $LfMfpOENHloEtVkOXPzMkQHbeTYnfmWVQ );
  $cfXntTyaEpGNHNnqDKUwxHsaizzjhsJqvCc = LSjpoNEBaRdouncZXoTcxZoLgZTtMXDzGNPmlU( );
  $QdYNJDRWhTpHBtDKeoSgrRNzyFTqtbDSI = array( "N", "C", "R" );
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ] = array();
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'PROFILES\' ] = array();
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'SCONS\' ] = array();
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'USER_LINES\' ] = array();
  $gFjvRlRVtosntpbqaJeXMPzpyuURcCoIDhKtTo = false;
  $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf = array();
  foreach ( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp as $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT )
  {
    $XaayCEGRRMOYiMtGrYddmMyuqjSiJrbYKM = substr( $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT, 0, 1 );
    $VIkJtdHGSVoxLmvHavoxOLswTDiTBySLSc = substr( $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT, 0, 2 );
    $mwescgUoljtxbPzcGMMrUUMIhPdIgZEVg = trim( strtoupper( substr( $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT, 0, strpos( $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT, \':\' ) ) ) );
    if ( $XaayCEGRRMOYiMtGrYddmMyuqjSiJrbYKM == \'#\' || empty( $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT ) || $XaayCEGRRMOYiMtGrYddmMyuqjSiJrbYKM == \'/\' )
      continue;
    if ( $XaayCEGRRMOYiMtGrYddmMyuqjSiJrbYKM == \'[\' )
    {
      if ( preg_match( "/\[(.*?)\]/", $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT, $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM ) )
      {
        $gFjvRlRVtosntpbqaJeXMPzpyuURcCoIDhKtTo = true;
        $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE = $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 1 ];
        $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'PROFILES\' ][ $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE ] = array();
      }
      continue;
    }
    if ( $gFjvRlRVtosntpbqaJeXMPzpyuURcCoIDhKtTo )
    {
      $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt = @explode( ":", $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT );
      if ( is_array( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt ) )
      {
        $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc = strtoupper( trim( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt[ 0 ] ) );
        $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM = trim( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt[ 1 ] );
        if ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc == \'PORT\' )
        {
          if ( $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM == \'+\' )
          {
            $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM = $eWjwnRczYLAxbVhzKGnWvYpGAKZAojY + 1;
          }
          $eWjwnRczYLAxbVhzKGnWvYpGAKZAojY = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
        }
        if ( in_array( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc, $cfXntTyaEpGNHNnqDKUwxHsaizzjhsJqvCc ) )
        {
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'PROFILES\' ][ $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
          continue;
        }
        elseif ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc == \'USER\' )
        {
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'USER_LINES\' ][ \'NEWCAMD\' ][ 0 ][ ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
          continue;
        }
        else
        {
          $gFjvRlRVtosntpbqaJeXMPzpyuURcCoIDhKtTo = false;
        }
      }
    }
    if ( in_array( $mwescgUoljtxbPzcGMMrUUMIhPdIgZEVg, $QdYNJDRWhTpHBtDKeoSgrRNzyFTqtbDSI ) )
    {
      array_push( $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'SCONS\' ], $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT );
      continue;
    }
    if ( strpos( $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT, \':\' ) )
    {
      $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt = explode( ":", $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT );
      $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc = trim( strtoupper( trim( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt[ 0 ] ) ) );
      unset( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt[ 0 ] );
      $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM = trim( implode( "", $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt ) );
      if ( in_array( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc, $cfXntTyaEpGNHNnqDKUwxHsaizzjhsJqvCc ) && ! empty( $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE ) )
      {
        $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'PROFILES\' ][ $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
        continue;
      }
      if ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc == \'INCLUDE\' )
      {
        continue;
      }
      if ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc == \'F\' )
      {
        if ( count( $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'CCCAM\' ] ) > 0 )
        {
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'USER_LINES\' ][ \'CCCAM\' ][ end( $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'CCCAM\' ] ) ][ ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
        }
        continue;
      }
      if ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc == \'MGUSER\' or $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc == \'MG\' )
      {
        if ( count( $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'MGCAMD\' ] ) > 0 )
        {
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'USER_LINES\' ][ \'MGCAMD\' ][ end( $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'MGCAMD\' ] ) ][ ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
        }
        continue;
      }
      if ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc == \'USER\' )
      {
        $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'USER_LINES\' ][ \'NEWCAMD\' ][ 0 ][ ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
        continue;
      }
      if ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc == \'MGCAMD PORT\' )
      {
        if ( ! @is_array( $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'MGCAMD\' ] ) )
        {
          $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'MGCAMD\' ] = array();
        }
        $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'MGCAMD\' ][ ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
        continue;
      }
      if ( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc == \'CCCAM PORT\' )
      {
        if ( ! @is_array( $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'CCCAM\' ] ) )
        {
          $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'CCCAM\' ] = array();
        }
        $LTUlnIWqhHTNQqmsDvWfCHXcTlmyVtfhuuyDppf[ \'CCCAM\' ][ ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
        continue;
      }
      if ( isset( $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] ) )
      {
        $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM = $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ];
        $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] = array();
        if ( is_array( $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM ) )
        {
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] = array_merge( $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ], $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM );
        }
        else
        {
          $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ][ ] = $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM;
        }
        $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ][ ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
      }
      else
      {
        $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ][ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] = $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM;
      }
    }
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function SkYRsaYotMiHKkODkrENqqwibbpPATfHw ( $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY, $fiagytZbReLjflvIqiRcmBUJgenXxg, $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA, $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw, $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE, $SyyQeDsPSmGbmuVWoNheIwzzivFcYauzPLXI = "NULL", $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM = 1, $AUvfxSLEPebPxYQfuvsmfRkkjMUhBbXAspFc = 0, $ftIznUWGlGdmUWNSGAwhoEtPjjUAiUIs = array(), $PWhJmVaQgKfefyXoPeMSxJhXtNsxjUMmZNbo = 0, $KoZbUaopuCwqdobOZZxuXzWOQvjFIDaK = 1, $QtbcrkyMXGlqjdhQRjItTYAdsXuYxI = 0 )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `lines` (`member_id`,`username`,`password`,`server_id`,`date_start`,`date_end`,`profiles`,`test_line`,`blocked`,`enable`,`notes`,`user_paid`,`line_options`,`monitor_exclude`,`allow_ch_emu`,`reshare`) VALUES(\'%d\',\'%s\',\'%s\',\'%d\',\'%d\',$fiagytZbReLjflvIqiRcmBUJgenXxg,\'%s\',\'%d\',0,1,\'%s\',\'%f\',\'%s\',\'%d\',\'%d\',\'%d\')", $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw, $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY, $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA, time( ), $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE, $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM, $SyyQeDsPSmGbmuVWoNheIwzzivFcYauzPLXI, $AUvfxSLEPebPxYQfuvsmfRkkjMUhBbXAspFc, serialize( $ftIznUWGlGdmUWNSGAwhoEtPjjUAiUIs ), $PWhJmVaQgKfefyXoPeMSxJhXtNsxjUMmZNbo, $KoZbUaopuCwqdobOZZxuXzWOQvjFIDaK, $QtbcrkyMXGlqjdhQRjItTYAdsXuYxI );
  if ( $mcDB->ULDNqqTHJzNmXeYeEHmcmoXgZdHkcfrjhQlY( ) > 0 )
  {
    return true;
  }
  return false;
}

function VgqYebRrABaUsFBfKbqNMjyrxiWPEXIXKE ( $VXeyjTyrTfAJJyqeoxhuRwTnBjKEMgjWdk )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.* FROM `multics_master_servers` t1, `multics_servers` t2 WHERE t2.`id` = \'%d\' AND t1.`id` = t2.`master_server_id`", $VXeyjTyrTfAJJyqeoxhuRwTnBjKEMgjWdk );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  }
  return false;
}

function rgJYriKrXFPMkjrcdXPmGtITBbIEDMNUQI ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `multics_servers` WHERE `master_server_id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return mcLib::sLYQRInHqFhKEHlZrlkIQnxTDtZrYVNtKK( $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( ) );
  }
  return false;
}

function nNysGMGRXJOKwEhuGWvmKMfRerkGQIxWkOoWPk ( )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.`domain` AS `domain` , t2.`profile_default` as `profile_default`,t2.`id` AS `profile_id` , t2.`profile_name` AS `profile_name` FROM `multics_master_servers` t1, `profiles` t2 WHERE t1.id = t2.`master_server_id` ORDER BY t2.`master_server_id` DESC" );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return false;
}

function oYCxjcrMGXMRxqdxNWbnkfGvamJjzhEJTY ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `multics_master_servers` WHERE `id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  }
  return false;
}

function NhRVWmkCaiBhQfbmEgspWzCwJgoeXolRbA ( $RqyBBjafAEbIRYcFtXdChWLXacwHEVIKSZycOE )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `member_groups` WHERE `id` = \'%d\'", $RqyBBjafAEbIRYcFtXdChWLXacwHEVIKSZycOE );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  }
  return false;
}

function aUNCGCbXrGaWPGXUzAfbLtvzyhrKohXo ( $RqyBBjafAEbIRYcFtXdChWLXacwHEVIKSZycOE )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT count(*) FROM `users` WHERE `member_group_id` = \'%d\'", $RqyBBjafAEbIRYcFtXdChWLXacwHEVIKSZycOE );
  return $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( );
}

function hmAwbwfvbCIDVTGrAUhxGfvwwtmcebShRGNuL ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `profiles` WHERE `master_server_id` = \'%d\' ORDER by id DESC", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return false;
}

function JuDbwXIqbLMlTqYnjBOHJndgpNBCpGxP ( )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `multics_master_servers` ORDER BY id ASC" );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return mcLib::sLYQRInHqFhKEHlZrlkIQnxTDtZrYVNtKK( $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( ) );
  }
  return false;
}

function qUlcDtRuZmaQHePVpmaDOoKhBgiQdsjEIc ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `config_value_name`,`config_value` from `multics_config_vars` WHERE `master_server_id` = \'%d\' ORDER by id ASC", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU = array();
  foreach ( $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl as $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs )
  {
    if ( isset( $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value_name\' ] ] ) )
    {
      $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM = $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value_name\' ] ];
      $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value_name\' ] ] = array();
      if ( is_array( $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM ) )
      {
        $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value_name\' ] ] = array_merge( $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value_name\' ] ], $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM );
      }
      else
      {
        $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value_name\' ] ][ ] = $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM;
      }
      $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value_name\' ] ][ ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value\' ];
    }
    else
    {
      $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value_name\' ] ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'config_value\' ];
    }
  }
  return $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU;
}

function clean_config_vars ( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ )
{
  $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ = trim( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ );
  if ( ! stristr( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ, ":" ) )
  {
    return false;
  }
  $CcOGxlYWkOgPZRRyxkQWcaHKNMUVZrhVudVDM = array( "F", "MGUSER", "MG", "USER", "CCCAM PORT", "MGCAMD PORT" );
  $OICBvFNLqwldbMISPnYEVIbeRlbzHiMYEpao = trim( strtoupper( substr( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ, 0, strpos( $EmkIYGcWyslZJUQYtPrLhknzfZZShGKxWIQ, \':\' ) ) ) );
  if ( in_array( $OICBvFNLqwldbMISPnYEVIbeRlbzHiMYEpao, $CcOGxlYWkOgPZRRyxkQWcaHKNMUVZrhVudVDM ) )
  {
    return false;
  }
  return true;
}

function is_valid_domain_name ( $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs )
{
  return (preg_match( "/^([a-z\d](-*[a-z\d])*)(\.([a-z\d](-*[a-z\d])*))*$/i", $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs ) && preg_match( "/^.{1,253}$/", $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs ) && preg_match( "/^[^\.]{1,63}(\.[^\.]{1,63})*$/", $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs ));
}

function valid_ip ( $gabATfkhJtnQcFPzMykJimEDhFvtdvyk )
{
  $gabATfkhJtnQcFPzMykJimEDhFvtdvyk = trim( $gabATfkhJtnQcFPzMykJimEDhFvtdvyk );
  return filter_var( $gabATfkhJtnQcFPzMykJimEDhFvtdvyk, FILTER_VALIDATE_IP );
}

function array_ev ( $epRLwCFXoqlDXiYlOLdrlEUUlpxIrVLbihPVE )
{
  $epRLwCFXoqlDXiYlOLdrlEUUlpxIrVLbihPVE = @trim( $epRLwCFXoqlDXiYlOLdrlEUUlpxIrVLbihPVE );
  if ( $epRLwCFXoqlDXiYlOLdrlEUUlpxIrVLbihPVE == "" || is_null( $epRLwCFXoqlDXiYlOLdrlEUUlpxIrVLbihPVE ) )
  {
    return false;
  }
  return true;
}

function NQFNlJgotlpsAACOJNEWfegpnUuHSFNBk ( $MModueQXIxnweTxcEUFBrOXDQdRZHcdE, $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `lines_options` WHERE `id` = \'%d\'", $MModueQXIxnweTxcEUFBrOXDQdRZHcdE );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs = $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
    $uYEeYCTgNIceKNpACNpHaxgmmyLkYeYOd = bZWXkyKAYCPkgQLmXSIeBWVWOuYeLNcZdhbY( $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw, 0 );
    if ( $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'discount\' ] == 1 && mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'DISCOUNT_SYSTEM\' ] == 1 && $uYEeYCTgNIceKNpACNpHaxgmmyLkYeYOd >= mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'DISCOUNT_IN_X_LINES\' ] )
    {
      $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'price\' ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'discount_price\' ];
    }
    else
    {
      $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'price\' ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'normal_price\' ];
    }
    return $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs;
  }
  return false;
}

function beXqoxhCcbpRlDrpTKfbSIIUEcPSmdXpM ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $paHEiTyygupDsbEyuVoNVmVraYJqvXLjsk = true, $KdUJnZvMfbZTRzDqjVFjKuqfqbSTGOPVAho = true, $LLuvwfrtdeImslsaYxNESgAOPskEZRpTLO = true, $hLROFfQRnSDimlCdfwlcRtjMfjWRKpaDIwYWs = 1 )
{
  global $mcDB;
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = HxIXLGgfzpdkCylbBMghnymwTsUhPCOcW( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( is_array( @$sxrEMJLCtAHUsbhglwaKdFpNiPOyOH ) )
  {
    WaPbSGexTdikWMpoWabVuGeqKlfZxEXQDUQ( 1 );
    $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU = $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'CONFIG_VARS\' ];
    $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE = $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'PROFILES\' ];
    $zQwTOglIGdvWPxZxdGVHTkaFfbYedjMOUx = $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'SCONS\' ];
    $JHurzFuNvXZKpptMwRRmyetfKPuAoDlLrGxk = $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'USER_LINES\' ];
    if ( @$LLuvwfrtdeImslsaYxNESgAOPskEZRpTLO )
    {
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "DELETE FROM `multics_config_vars` WHERE `master_server_id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "ALTER TABLE `multics_config_vars` AUTO_INCREMENT = 1" );
      foreach ( $ucWWxhmkIYXDxHKsdUhRaeVHovdPIoDGU as $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc => $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM )
      {
        if ( is_array( $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM ) )
        {
          foreach ( $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM as $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM )
          {
            $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `multics_config_vars` (`config_value_name`,`config_value`,`master_server_id`) VALUES(\'%s\',\'%s\',\'%d\')", $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc, $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
          }
        }
        else
        {
          $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `multics_config_vars` (`config_value_name`,`config_value`,`master_server_id`) VALUES(\'%s\',\'%s\',\'%d\')", $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc, $snmwuFrtGBXxOFNZAbDPBzKeqiHsBVM, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
        }
      }
      foreach ( $zQwTOglIGdvWPxZxdGVHTkaFfbYedjMOUx as $tMfKtNKieoBXhJDJpNRUYXTziuGsFWSBaI )
      {
        $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt = explode( ":", $tMfKtNKieoBXhJDJpNRUYXTziuGsFWSBaI );
        $SFVWZaLVwyTFJFlaUSENyYbGwfJRYgQ = trim( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt[ 0 ] );
        unset( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt[ 0 ] );
        $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt = implode( ":", $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt );
        $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `multics_config_vars` (`config_value_name`,`config_value`,`master_server_id`) VALUES(\'%s\',\'%s\',\'%d\')", $SFVWZaLVwyTFJFlaUSENyYbGwfJRYgQ, trim( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt ), $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
      }
    }
    if ( @$paHEiTyygupDsbEyuVoNVmVraYJqvXLjsk )
    {
      $mITNOnkWqaFuokgEgeoUBjivpGpbrnpfGKMLrM = array();
      foreach ( $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE as $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE => $sbpYvcTeUVnDUSXUQDAMzkIxzAHQrjkpOWdQ )
      {
        $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `profiles` WHERE `master_server_id` = \'%d\' AND `profile_name` = \'%s\' LIMIT 1", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE );
        if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
        {
          $kNEALyHBaWQCEVtrYfLdPTBtXRxfgJAuXbIY = $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( );
          $mITNOnkWqaFuokgEgeoUBjivpGpbrnpfGKMLrM[ ] = $kNEALyHBaWQCEVtrYfLdPTBtXRxfgJAuXbIY;
          $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `profiles` SET `profile_options` = \'%s\' WHERE `id` = \'%d\'", serialize( $sbpYvcTeUVnDUSXUQDAMzkIxzAHQrjkpOWdQ ), $kNEALyHBaWQCEVtrYfLdPTBtXRxfgJAuXbIY );
        }
        else
        {
          $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `profiles` (`profile_name`,`profile_options`,`master_server_id`) VALUES(\'%s\',\'%s\',\'%d\')", $GrjlOHSQNQdEoAovnFiOBKXWOJIewMlZigQE, serialize( $sbpYvcTeUVnDUSXUQDAMzkIxzAHQrjkpOWdQ ), $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
          $mITNOnkWqaFuokgEgeoUBjivpGpbrnpfGKMLrM[ ] = $mcDB->lZqicXChQNuEPumhIutyOVXkAvvxQGrziptdRBQ( );
        }
      }
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "DELETE FROM `profiles` WHERE `master_server_id` = \'%d\' AND `id` NOT IN(" . implode( ",", $mITNOnkWqaFuokgEgeoUBjivpGpbrnpfGKMLrM ) . ")", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
    }
    if ( @$KdUJnZvMfbZTRzDqjVFjKuqfqbSTGOPVAho )
    {
      $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs = rgJYriKrXFPMkjrcdXPmGtITBbIEDMNUQI( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
      if ( is_array( $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) )
      {
        $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "DELETE FROM `lines` WHERE `server_id` IN(" . implode( ",", $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) . ")" );
      }
      $DCbBNajoIqloBeLmdmGWCWkBNsTgUSFFE = oYCxjcrMGXMRxqdxNWbnkfGvamJjzhEJTY( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
      if ( empty( $mITNOnkWqaFuokgEgeoUBjivpGpbrnpfGKMLrM ) )
      {
        $JwKxkiJIfCpvWbLJGQLuabYbTnBXpjarY = hmAwbwfvbCIDVTGrAUhxGfvwwtmcebShRGNuL( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
        $mITNOnkWqaFuokgEgeoUBjivpGpbrnpfGKMLrM = array();
        foreach ( $JwKxkiJIfCpvWbLJGQLuabYbTnBXpjarY as $WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI )
        {
          $mITNOnkWqaFuokgEgeoUBjivpGpbrnpfGKMLrM[ ] = $WSVDZhEHvOJutoXJFuRlHglbEzTBWaGwZhjKI[ \'id\' ];
        }
      }
      $ssyAoHeSjuaVqJNHUoyEMNBPhDQUldyooZIIL = array( \'NEWCAMD\' => 3, \'CCCAM\' => 1, \'MGCAMD\' => 2 );
      $YZAUNnUIdWBDHUSPzNqlrkVXNRERvHqUchQU = array();
      foreach ( $JHurzFuNvXZKpptMwRRmyetfKPuAoDlLrGxk as $JgjcnpKssiTdcwAFHpQnhBIoVTZzVNoDcUg => $bpLJmEeeqmPlRphXHmzbyCUKbYLYitQXIXTLJ )
      {
        $JWMXOdQgIPYBstNNMfLQHTehuxMKRGKmsWhI = $ssyAoHeSjuaVqJNHUoyEMNBPhDQUldyooZIIL[ $JgjcnpKssiTdcwAFHpQnhBIoVTZzVNoDcUg ];
        $fRnpRjXqdYAhoMNKtUrPmGYNdIJexXsClQB = array();
        foreach ( $bpLJmEeeqmPlRphXHmzbyCUKbYLYitQXIXTLJ as $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp => $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp )
        {
          $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `multics_servers` WHERE `master_server_id` = \'%d\' AND `emulator_id` = \'%d\' AND `port` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $JWMXOdQgIPYBstNNMfLQHTehuxMKRGKmsWhI, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp );
          if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
          {
            $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA = $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( );
            $YZAUNnUIdWBDHUSPzNqlrkVXNRERvHqUchQU[ ] = $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA;
          }
          else
          {
            $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA = YxjLGCKXzkJQdTsKJPjWBfKPzbGokZHTjEEOyyGE( $JWMXOdQgIPYBstNNMfLQHTehuxMKRGKmsWhI, $DCbBNajoIqloBeLmdmGWCWkBNsTgUSFFE[ \'domain\' ], $JgjcnpKssiTdcwAFHpQnhBIoVTZzVNoDcUg . \' Server\', $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, ($JWMXOdQgIPYBstNNMfLQHTehuxMKRGKmsWhI == 3) ? 0 : 1 );
            $YZAUNnUIdWBDHUSPzNqlrkVXNRERvHqUchQU[ ] = $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA;
          }
          $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array_values( array_filter( array_unique( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp ) ) );
          foreach ( $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp as $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT )
          {
            $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt = explode( " ", $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT );
            $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw = trim( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt[ 0 ] );
            $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY = trim( $RFUSQDBhzgNhMWwvjrksGInVwEFKGpyDQt[ 1 ] );
            if ( in_array( $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $fRnpRjXqdYAhoMNKtUrPmGYNdIJexXsClQB ) )
            {
              continue;
            }
            else
            {
              array_push( $fRnpRjXqdYAhoMNKtUrPmGYNdIJexXsClQB, $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw );
            }
            $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc = array();
            $nQznhInsIxzvjhlgDufkGfUdbVfcI = \'NULL\';
            $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw = 0;
            if ( preg_match( "/{(.*?)}/", $YcocofCYXiTPRBJexeEGlCtGuXaFDxBDMT, $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM ) )
            {
              $GQziHxdKzRDjWnJBhNtSDmHWRqUhUfRs = trim( htmlentities( $QPpbAKhgFBxdhoKDUAboxdCQgouqVbQrFdDM[ 1 ] ) );
              $FkwpJNTPndxffUzDpuyCLnNWTCiywSUWBmmY = str_replace( \';\', \'&\', $GQziHxdKzRDjWnJBhNtSDmHWRqUhUfRs );
              parse_str( $FkwpJNTPndxffUzDpuyCLnNWTCiywSUWBmmY, $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc );
            }
            $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc = array_map( "trim", $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc );
            foreach ( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc as $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc => $iOGVwNFxUoxMQRIeXtsOxToXsZqqKeDXpPHs )
            {
              if ( is_null( $iOGVwNFxUoxMQRIeXtsOxToXsZqqKeDXpPHs ) || empty( $iOGVwNFxUoxMQRIeXtsOxToXsZqqKeDXpPHs ) )
              {
                unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] );
              }
            }
            $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM = 0;
            $ONJAznIuIASvylYAOSLLZWAdomXTJhMBdmq = implode( ",", $mITNOnkWqaFuokgEgeoUBjivpGpbrnpfGKMLrM );
            if ( $hLROFfQRnSDimlCdfwlcRtjMfjWRKpaDIwYWs == 1 )
            {
              if ( array_key_exists( "profile_ids", $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc ) )
              {
                $ONJAznIuIASvylYAOSLLZWAdomXTJhMBdmq = $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'profile_ids\' ];
              }
              if ( array_key_exists( "panel_memberid", $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc ) )
              {
                $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw = $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'panel_memberid\' ];
              }
            }
            if ( array_key_exists( "test_line", $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc ) )
            {
              $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM = $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'test_line\' ];
            }
            if ( array_key_exists( "panel_expdate", $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc ) )
            {
              $nQznhInsIxzvjhlgDufkGfUdbVfcI = $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'panel_expdate\' ];
              unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'panel_expdate\' ] );
            }
            elseif ( array_key_exists( "enddate", $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc ) )
            {
              $nQznhInsIxzvjhlgDufkGfUdbVfcI = strtotime( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'enddate\' ] );
            }
            unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'test_line\' ] );
            unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'profile_ids\' ] );
            unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'profiles\' ] );
            unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'name\' ] );
            unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'panel_memberid\' ] );
            unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'panel_expdate\' ] );
            unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ \'enddate\' ] );
            foreach ( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc as $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc => $iOGVwNFxUoxMQRIeXtsOxToXsZqqKeDXpPHs )
            {
              if ( stristr( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc, \',\' ) )
              {
                unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] );
              }
              elseif ( is_numeric( $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ) )
              {
                unset( $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc[ $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc ] );
              }
            }
            SkYRsaYotMiHKkODkrENqqwibbpPATfHw( $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY, $nQznhInsIxzvjhlgDufkGfUdbVfcI, $EuvToTRHFhXPtMYzmUwPOXYuOLIStLWA, $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw, $ONJAznIuIASvylYAOSLLZWAdomXTJhMBdmq, "", $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM, 0, $ydNDDJTxOTAVlQxfuqhvDgqLSJwksAWsrc, 0 );
          }
        }
      }
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "DELETE FROM `multics_servers` WHERE `master_server_id` = \'%d\' AND `id` NOT IN(" . implode( ",", $YZAUNnUIdWBDHUSPzNqlrkVXNRERvHqUchQU ) . ")", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `multics_servers` WHERE `master_server_id` = \'%d\' AND `emulator_id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, 3 );
      if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) == 0 )
      {
        YxjLGCKXzkJQdTsKJPjWBfKPzbGokZHTjEEOyyGE( 3, $DCbBNajoIqloBeLmdmGWCWkBNsTgUSFFE[ \'domain\' ], \'NEWCAMD Server\', 0, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, 0 );
      }
    }
    return true;
  }
  return false;
}

function ddlmVvmzVjxXGrMcBspRssPvrDVoVVEQ ( $gXswUfBNnmyBqsteiJUkJIAAnQRWrAImWHU, $hBkeQgUgZYpYztnsCXcLbGrfTYARSfeHIqE, $SdtVaDUjvAdylPNMaNLUMtvzujtTIfbPfVTQ )
{
  if ( mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SERVER_SMTP\' ] == 1 )
  {
    $gmfITkcVHTkmZtJCAyTcqGtKiZLBUoOAWOMBA = \'MIME-Version: 1.0\' . "\r\n";
    $gmfITkcVHTkmZtJCAyTcqGtKiZLBUoOAWOMBA .= \'Content-type: text/html; charset=iso-8859-1\' . "\r\n";
    $gmfITkcVHTkmZtJCAyTcqGtKiZLBUoOAWOMBA .= \'From: \' . mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SERVER_NAME\' ] . \' <\' . mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'EMAIL_FROM\' ] . \'>\' . "\r\n";
    $gmfITkcVHTkmZtJCAyTcqGtKiZLBUoOAWOMBA .= \'X-Mailer: PHP/\' . phpversion( ) . "\r\n";
    if ( @mail( $gXswUfBNnmyBqsteiJUkJIAAnQRWrAImWHU, $hBkeQgUgZYpYztnsCXcLbGrfTYARSfeHIqE, $SdtVaDUjvAdylPNMaNLUMtvzujtTIfbPfVTQ, $gmfITkcVHTkmZtJCAyTcqGtKiZLBUoOAWOMBA ) )
    {
      return true;
    }
    return false;
  }
  else
  {
    require_once (MULTICS_CLASSES_PATH . "class.phpmailer.php");
    $mail = new PHPMailer( );
    $mail->IsSMTP( );
    $mail->SMTPAuth = true;
    $mail->SMTPSecure = mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SMTP_ENCRYPTION\' ];
    $mail->Host = mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SMTP_HOST\' ];
    $mail->Port = intval( mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SMTP_PORT\' ] );
    $mail->Username = mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SMTP_USERNAME\' ];
    $mail->Password = mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SMTP_PASSWORD\' ];
    $mail->SetFrom( mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SMTP_USERNAME\' ], mcLib::$DCAniUabCJTZRZoqVOqPyWvFCsiwIw[ \'SMTP_FROM_NAME\' ] );
    $mail->AddAddress( $gXswUfBNnmyBqsteiJUkJIAAnQRWrAImWHU );
    $mail->Subject = $hBkeQgUgZYpYztnsCXcLbGrfTYARSfeHIqE;
    $mail->Body = $SdtVaDUjvAdylPNMaNLUMtvzujtTIfbPfVTQ;
    $mail->SMTPDebug = 0;
    $mail->WordWrap = 250;
    $mail->IsHTML( true );
    if ( $mail->Send( ) )
    {
      return true;
    }
    else
    {
      echo $mail->ErrorInfo;
      exit( );
      return false;
    }
  }
}

function bUIyMlnUdRajKMioCPDdVdUjuUTqrVupUNk ( $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU, $udXzEuxwhFnnSKdyDGzJIKfuOGEaHpyoYKtA, $MNUGSguizWfuEPCHuAOtBOPnarDJLeyaXWHdiDI = \'Months\', $AUvfxSLEPebPxYQfuvsmfRkkjMUhBbXAspFc = 0, $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE = null, $PWhJmVaQgKfefyXoPeMSxJhXtNsxjUMmZNbo = 0, $KoZbUaopuCwqdobOZZxuXzWOQvjFIDaK = 1 )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `date_end` FROM `lines` WHERE id = \'%d\'", $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU );
  $fiagytZbReLjflvIqiRcmBUJgenXxg = $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( );
  if ( time( ) > $fiagytZbReLjflvIqiRcmBUJgenXxg )
  {
    $fmImaZQETiwXOGyhGhxmbevklregSuKGVuYWE = strtotime( "+$udXzEuxwhFnnSKdyDGzJIKfuOGEaHpyoYKtA $MNUGSguizWfuEPCHuAOtBOPnarDJLeyaXWHdiDI" );
  }
  else
  {
    $fmImaZQETiwXOGyhGhxmbevklregSuKGVuYWE = strtotime( "+$udXzEuxwhFnnSKdyDGzJIKfuOGEaHpyoYKtA $MNUGSguizWfuEPCHuAOtBOPnarDJLeyaXWHdiDI", $fiagytZbReLjflvIqiRcmBUJgenXxg );
  }
  if ( is_null( $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE ) )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `lines` SET `test_line` = 0,`monitor_exclude` = \'%d\',`allow_ch_emu` = \'%d\',`notified_expire` = 1,`date_end` = \'%d\',`user_paid` = \'%f\',`date_start` = \'%d\' WHERE `id` = \'%d\'", $PWhJmVaQgKfefyXoPeMSxJhXtNsxjUMmZNbo, $KoZbUaopuCwqdobOZZxuXzWOQvjFIDaK, $fmImaZQETiwXOGyhGhxmbevklregSuKGVuYWE, $AUvfxSLEPebPxYQfuvsmfRkkjMUhBbXAspFc, time( ), $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `lines` SET `test_line` = 0,`monitor_exclude` = \'%d\',`allow_ch_emu` = \'%d\',`profiles` = \'%s\',`notified_expire` = 1,`date_end` = \'%d\',`user_paid` = \'%f\',`date_start` = \'%d\' WHERE `id` = \'%d\'", $PWhJmVaQgKfefyXoPeMSxJhXtNsxjUMmZNbo, $KoZbUaopuCwqdobOZZxuXzWOQvjFIDaK, $PUWXehduSmEptZYeeotezsmpWnQXCRgpVRPsE, $fmImaZQETiwXOGyhGhxmbevklregSuKGVuYWE, $AUvfxSLEPebPxYQfuvsmfRkkjMUhBbXAspFc, time( ), $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU );
  }
  if ( $mcDB->ULDNqqTHJzNmXeYeEHmcmoXgZdHkcfrjhQlY( ) > 0 )
  {
    return true;
  }
  return false;
}

function LNbIOSZZzQCuMusoNwPflXLxRnIxDoDaRrY ( $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `payments` WHERE `member_id` = \'%d\' ORDER BY id DESC", $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw );
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function BmBHWNGcmuALxurKoKneXDwPBtlnnYuo ( $CEdebxlGuWVbuIJaIiEPscpYzMPYYrk, $sRfDTNAutiSBMpVHlFEhKhvdngVuxmpos = false, $fDgUakHWdxeTvuoMfbbkOGsUvWGLgjcWGhw = 1 )
{
  global $mcDB;
  if ( ! @$sRfDTNAutiSBMpVHlFEhKhvdngVuxmpos )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `payments` WHERE `payment_method` = \'%s\' ORDER BY id DESC", $CEdebxlGuWVbuIJaIiEPscpYzMPYYrk );
  }
  elseif ( $fDgUakHWdxeTvuoMfbbkOGsUvWGLgjcWGhw == 1 )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `payments` WHERE `payment_method` = \'%s\' AND `accepted` = 1 ORDER BY id DESC", $CEdebxlGuWVbuIJaIiEPscpYzMPYYrk );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `payments` WHERE `payment_method` = \'%s\' AND `accepted` = 0 ORDER BY id DESC", $CEdebxlGuWVbuIJaIiEPscpYzMPYYrk );
  }
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function ZJhhsyrGfeeEoYGsafqIlGNWCJsHgqyzPeUPVQD ( $kNEALyHBaWQCEVtrYfLdPTBtXRxfgJAuXbIY )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `payments` WHERE `id` = \'%d\'", $kNEALyHBaWQCEVtrYfLdPTBtXRxfgJAuXbIY );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  }
  return array();
}

function OKmQzWntaEKbtVBwGAbHyAADFjpAJeHo ( $qirIDiIhPCWJFavxEdEbtJqCdCszkaqI, $xXPTHriApADVkHSnXgmhXZZxbczvwcdqbaE = false, $SiXzwiIZmMdadSfrQUdDXgmLcNgojOCINeiI = \'id DESC\', $kvEoFwJvTmDFRIUewQArIyflrkhSLRqdvIhOELs = false, $vnxmviEJKrppCTsIZiNwJnFADeTKnPwIQxkCEEFI = \'AND\' )
{
  global $mcDB;
  $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU = "";
  if ( $kvEoFwJvTmDFRIUewQArIyflrkhSLRqdvIhOELs )
  {
    $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU = "WHERE ";
    if ( $vnxmviEJKrppCTsIZiNwJnFADeTKnPwIQxkCEEFI == \'AND\' )
    {
      foreach ( $kvEoFwJvTmDFRIUewQArIyflrkhSLRqdvIhOELs as $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc => $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM )
      {
        $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU .= "`" . $uLLgHBmPthKUFeERtjXtrvBKCOuDsRwXcfc . "` = \'" . $iWZBmdEJnXemgpuymvJsIBCAFqBQPnKgvsmM . "\' AND ";
      }
      $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU = trim( $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU );
      $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU = substr( $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU, 0, - 3 );
    }
    else
    {
      $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU .= "`" . key( $kvEoFwJvTmDFRIUewQArIyflrkhSLRqdvIhOELs ) . "` IN (" . $kvEoFwJvTmDFRIUewQArIyflrkhSLRqdvIhOELs[ key( $kvEoFwJvTmDFRIUewQArIyflrkhSLRqdvIhOELs ) ] . ")";
    }
  }
  if ( $xXPTHriApADVkHSnXgmhXZZxbczvwcdqbaE )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `$qirIDiIhPCWJFavxEdEbtJqCdCszkaqI` $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU ORDER BY $SiXzwiIZmMdadSfrQUdDXgmLcNgojOCINeiI" );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `$qirIDiIhPCWJFavxEdEbtJqCdCszkaqI` $CaNCtxkyelRsMjuaTvOxSHMfQNLitjNkVU" );
  }
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function dFeBflhmvTBAIkPqRNxWzSkLoCtlIqmcLIE ( $hxzEmpHzlJAnySVaZHGmlvuwtlvoAwbmPSvqQ )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.*,t3.`domain_name` as `domain`,t2.`id` as `master_server_id` FROM `lines_options` t1,`multics_master_servers` t2, `multics_servers` t3 WHERE t1.`id` = \'%d\' AND t1.`server_id` = t3.`id` AND t3.`master_server_id` = t2.`id`", $hxzEmpHzlJAnySVaZHGmlvuwtlvoAwbmPSvqQ );
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.`group_id`,t2.`group_name`,t2.`percent_discount` FROM `group_packages` t1,`member_groups` t2 WHERE t2.`id` = t1.`group_id` AND t1.`package_id` = \'%d\'", $hxzEmpHzlJAnySVaZHGmlvuwtlvoAwbmPSvqQ );
    $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
    foreach ( $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl as $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs )
    {
      $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'groups\' ][ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'group_id\' ] ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs;
    }
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function sMvllEgRBfdOcvIloWMAXSlEZGhLnWY ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  global $mcDB;
  $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs = rgJYriKrXFPMkjrcdXPmGtITBbIEDMNUQI( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `default_server_id` FROM `multics_server_emulators` WHERE `master_server_id` = \'%d\' AND `user_access` = 1 ORDER by `emulator_id` ASC", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
    foreach ( $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl as $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs )
    {
      if ( in_array( $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'default_server_id\' ], $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) )
      {
        return $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'default_server_id\' ];
      }
    }
  }
  return false;
}

function KFZdtFwjjtJNXOLayulYRyUacBdBTixXiK ( $xyXJfeBdHTdVLmVfwCkCvuInJmWEEOjnJhfl )
{
  global $_LANG;
  $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE = array();
  switch ( $xyXJfeBdHTdVLmVfwCkCvuInJmWEEOjnJhfl )
  {
    case "h":
      $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE[ \'full\' ] = $_LANG[ \'LINE_PACKAGE_DUR_HOURS\' ];
      $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE[ \'php_time\' ] = "hours";
      break;
    case "d":
      $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE[ \'full\' ] = $_LANG[ \'LINE_PACKAGE_DUR_DAYS\' ];
      $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE[ \'php_time\' ] = "days";
      break;
    case "m":
      $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE[ \'full\' ] = $_LANG[ \'LINE_PACKAGE_DUR_MONTHS\' ];
      $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE[ \'php_time\' ] = "months";
      break;
    case "y":
      $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE[ \'full\' ] = $_LANG[ \'LINE_PACKAGE_DUR_YEARS\' ];
      $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE[ \'php_time\' ] = "years";
      break;
  }
  return (! empty( $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE )) ? $iStRIBnCMmcChbePwiBEQwOgKGfeHpNuQYCE : false;
}

function lFMhMMBGGtGPUdijJopIGdmRSuDYItqMJIHEU ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  global $mcDB;
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array();
  $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs = rgJYriKrXFPMkjrcdXPmGtITBbIEDMNUQI( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( is_array( $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1 . * , t2.`domain_name` AS domain_name, t2.`description` AS description, t2.`port` AS port, t3.emulator_name AS emulator_name, t3.id as emulator_id FROM `lines` t1, `multics_servers` t2, `emulators` t3 WHERE t2.emulator_id = t3.id AND t1.server_id = t2.id AND t1.`server_id` IN (" . implode( ",", $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) . ") ORDER BY t1.id DESC" );
    if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
    {
      $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
    }
  }
  return $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp;
}

function FePqAJLfcwMQPwUVxMLbIqcmltiDbIRnbhJWo ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $iLpvQfvtAFLPlOcEhAqQtmsCjNiMKSTdTbTXI = false )
{
  global $mcDB;
  $SnzBrPOUwvPHHrYWryuQAXbXtGNEPVOsag = array();
  $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs = rgJYriKrXFPMkjrcdXPmGtITBbIEDMNUQI( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( is_array( $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) )
  {
    if ( ! $iLpvQfvtAFLPlOcEhAqQtmsCjNiMKSTdTbTXI )
    {
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `lines` WHERE `server_id` IN (" . implode( ",", $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) . ")" );
    }
    else
    {
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `lines` WHERE `server_id` IN (" . implode( ",", $nqAKFozIcCWReIAlUiuMyHpiZenOuJtoFzGdlxs ) . ") AND (`date_end` > \'" . time( ) . "\' OR `date_end` IS NULL) AND `enable` = 1 AND `monitor_exclude` = 0" );
    }
    if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
    {
      $SnzBrPOUwvPHHrYWryuQAXbXtGNEPVOsag = mcLib::sLYQRInHqFhKEHlZrlkIQnxTDtZrYVNtKK( $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( ) );
    }
  }
  return $SnzBrPOUwvPHHrYWryuQAXbXtGNEPVOsag;
}

function ZUrSdeXnmuZXglBYlzpmZSNdazohydQtlQ ( $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1 . * ,t2.`master_server_id` as `master_server_id`, t2.`domain_name` AS domain_name, t2.`description` AS description, t2.`port` AS port, t3.emulator_name AS emulator_name,t3.id as emulator_id FROM `lines` t1, `multics_servers` t2, `emulators` t3 WHERE t2.emulator_id = t3.id AND t1.server_id = t2.id AND t1.id = \'%d\'", $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU );
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function GgsnBTWeqYfGosMPUacZmvxZjaCAOo ( )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id`,`page_title` FROM `custom_pages` ORDER by `order` ASC, `id` ASC" );
  $RQounhGtAGHAQMdIQWKiJQacUorTaqlFU = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $RQounhGtAGHAQMdIQWKiJQacUorTaqlFU = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return $RQounhGtAGHAQMdIQWKiJQacUorTaqlFU;
}

function TyNdSIomtrrjHSRtEeXxNCzeeXSAjruc ( $fUQfHLJBLgYqAtVIcrMvwrqWwrdqDnuqXHDLA, $SdtVaDUjvAdylPNMaNLUMtvzujtTIfbPfVTQ = "", $SiXzwiIZmMdadSfrQUdDXgmLcNgojOCINeiI = 1 )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `custom_pages` (`page_title`,`page_content`,`order`) VALUES(\'%s\',\'%s\',\'%d\')", $fUQfHLJBLgYqAtVIcrMvwrqWwrdqDnuqXHDLA, $SdtVaDUjvAdylPNMaNLUMtvzujtTIfbPfVTQ, $SiXzwiIZmMdadSfrQUdDXgmLcNgojOCINeiI );
  if ( $mcDB->ULDNqqTHJzNmXeYeEHmcmoXgZdHkcfrjhQlY( ) > 0 )
  {
    return true;
  }
  return false;
}

function zEJVKWuhrsArORVKiBviCMxXedNptFpaTFH ( $LYksjzhvigXYdaRRRZXLGDlxcTYOrpc )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `server_news` WHERE `id` = \'%d\'", $LYksjzhvigXYdaRRRZXLGDlxcTYOrpc );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) <= 0 )
  {
    return false;
  }
  return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
}

function vvumBbZkuwKoweWViDmerbcNDcKtoQkBAnELJBQEo ( $QYAWPgntXfccnYPWCqMaZXMxHFSObOFGmEjRw )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `custom_pages` WHERE `id` = \'%d\'", $QYAWPgntXfccnYPWCqMaZXMxHFSObOFGmEjRw );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) <= 0 )
  {
    return false;
  }
  return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
}

function YYyJfxVWXknOcieXNCeoUkvpsFthcfwxAMaU ( $HBzaPhJbeAgldftvWeOUsWoQurtVgXxugk )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `tickets_topics` WHERE `id` = \'%d\'", $HBzaPhJbeAgldftvWeOUsWoQurtVgXxugk );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) <= 0 )
  {
    return false;
  }
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'INFO\' ] = $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id`,`post`,`date`,`admin_reply` FROM `tickets_post` WHERE `topic_id` = \'%d\' ORDER BY id ASC", $HBzaPhJbeAgldftvWeOUsWoQurtVgXxugk );
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ \'POSTS\' ] = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function ArBfQryZtgQsRqIMfjrVEKWldbZBvCAuFGrQmM ( $HBzaPhJbeAgldftvWeOUsWoQurtVgXxugk, $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `tickets_topics` WHERE `id` = \'%d\' AND `member_id` = \'%d\'", $HBzaPhJbeAgldftvWeOUsWoQurtVgXxugk, $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return true;
  }
  return false;
}

function lVXgJGUiWgGhSRelMLqKaFCNlflAAKlxqCPDM ( $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `tickets_topics` WHERE `member_id` = \'%d\' ORDER BY id DESC", $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) <= 0 )
  {
    return false;
  }
  return $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
}

function QfgmwmBvfYFOZAUveQPxsjeLiIZGpv ( $qirIDiIhPCWJFavxEdEbtJqCdCszkaqI, $WpFiAaWkxLTvasqjbarrImxEEzVtSTE, $oRjBmIifkcpHFRMENTgIzgNpwZKCQYU )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `$qirIDiIhPCWJFavxEdEbtJqCdCszkaqI` WHERE `$WpFiAaWkxLTvasqjbarrImxEEzVtSTE` = \'%s\'", $oRjBmIifkcpHFRMENTgIzgNpwZKCQYU );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return true;
  }
  return false;
}

function EJuTFwQpySqEgPxYjSuLxgWyeIUQPc ( $AGISLiuSCWwzoEHNczCSPbUpEfeGsfhXpQhZMJjE )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `profiles` WHERE `id` = \'%d\'", $AGISLiuSCWwzoEHNczCSPbUpEfeGsfhXpQhZMJjE );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  }
  return array();
}

function bjlXGTKapGXRmnlfUEnUtlQLEEZiaLIAknLDE ( $AubUkztAfuhlflCTaQyMeMBeGYcBqwJSNguNM )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `languages` WHERE `id` = \'%d\'", $AubUkztAfuhlflCTaQyMeMBeGYcBqwJSNguNM );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  }
  return array();
}

function GZNeNbWRPBMOymmXxSUlVjkhQIEEdWPoRxlw ( $pXDrlwVXwuxAzlpShefsNcSIaDMBjP )
{
  global $mcDB;
  if ( isset( $_SESSION[ \'language_member\' ] ) )
  {
    return $_SESSION[ \'language_member\' ][ \'file_name\' ];
  }
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.* FROM `languages` t1, `users` t2 WHERE t2.`id` = \'%d\' AND t2.`lang_id` = t1.`id`", $pXDrlwVXwuxAzlpShefsNcSIaDMBjP );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs = $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
    $_SESSION[ \'language_member\' ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs;
    return $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'file_name\' ];
  }
  else
  {
    $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs = bjlXGTKapGXRmnlfUEnUtlQLEEZiaLIAknLDE( 1 );
    $_SESSION[ \'language_member\' ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs;
    return $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'file_name\' ];
  }
}

function zfoCdPUSmlqZYumZqPWIVdrOfJoeGiBEySPGY ( )
{
  global $mcDB;
  if ( isset( $_SESSION[ \'language_guest\' ] ) )
  {
    return $_SESSION[ \'language_guest\' ][ \'file_name\' ];
  }
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `languages` WHERE `default_guests` = 1" );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs = $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
    $_SESSION[ \'language_guest\' ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs;
    return $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'file_name\' ];
  }
  else
  {
    $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs = bjlXGTKapGXRmnlfUEnUtlQLEEZiaLIAknLDE( 1 );
    $_SESSION[ \'language_guest\' ] = $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs;
    return $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'file_name\' ];
  }
}

function qpvldMTAVaiMrhLqJToqUWOsYiwmAxdWesagA ( $dXmQMpDJHJVTpkNPKawnXBZyJnmNDSDu = \'ok\', $LfAoTUZqIsglsdOgAXtMjkSLoxmtKQJgBg )
{
  switch ( $dXmQMpDJHJVTpkNPKawnXBZyJnmNDSDu )
  {
    case "error":
      $mJuWUCNNBKWDpIWmjZPbQzVFImUPPsDmsXrSoM = \'alert alert-danger\';
      break;
    case "warning":
      $mJuWUCNNBKWDpIWmjZPbQzVFImUPPsDmsXrSoM = \'alert alert-warning\';
      break;
    case "ok":
      $mJuWUCNNBKWDpIWmjZPbQzVFImUPPsDmsXrSoM = \'alert alert-success\';
      break;
    default:
      $mJuWUCNNBKWDpIWmjZPbQzVFImUPPsDmsXrSoM = \'alert alert-info\';
  }
  if ( is_array( $LfAoTUZqIsglsdOgAXtMjkSLoxmtKQJgBg ) )
  {
    return \'<div class="\' . $mJuWUCNNBKWDpIWmjZPbQzVFImUPPsDmsXrSoM . \'">* \' . implode( "<br /><br />* ", $LfAoTUZqIsglsdOgAXtMjkSLoxmtKQJgBg ) . \'</div>\';
  }
  else
  {
    return \'<div class="\' . $mJuWUCNNBKWDpIWmjZPbQzVFImUPPsDmsXrSoM . \'">* \' . $LfAoTUZqIsglsdOgAXtMjkSLoxmtKQJgBg . \'</div>\';
  }
}

function JlXTabDUpbtMYlAcWuOQVxuCeFjHPPA ( )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `emulators`" );
  $ssyAoHeSjuaVqJNHUoyEMNBPhDQUldyooZIIL = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  $IKIysqsgJAPTHhdgwEpTDGTmlAVyfFUooIoaWlY = array();
  foreach ( $ssyAoHeSjuaVqJNHUoyEMNBPhDQUldyooZIIL as $zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ )
  {
    $IKIysqsgJAPTHhdgwEpTDGTmlAVyfFUooIoaWlY[ $zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ[ \'id\' ] ] = $zWTaSlfAGQvEiDLlWliUczjQjFNEPOrKlQ;
  }
  return $IKIysqsgJAPTHhdgwEpTDGTmlAVyfFUooIoaWlY;
}

function DvBXfiUlPPNvMuEwjAzbpHoTDUWbrWZOwRzc ( )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `multics_server_emulators` ORDER by id ASC,`master_server_id` ASC, emulator_id ASC" );
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
    foreach ( $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl as $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs )
    {
      if ( ! is_array( $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'master_server_id\' ] ] ) )
      {
        $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'master_server_id\' ] ] = array();
      }
      $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH[ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'master_server_id\' ] ][ $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'emulator_id\' ] ] = array( $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'user_access\' ], $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'default_server_id\' ] );
    }
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function YxjLGCKXzkJQdTsKJPjWBfKPzbGokZHTjEEOyyGE ( $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE, $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs, $xJwxbCThVgzrWTDeojaBfUOtTZMegZpasfmAoVI, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $hlEUJGGeGWBUcsiCCJnRhPAJiQKVLXUdaaM )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `multics_servers` (`emulator_id`,`domain_name`,`description`,`port`,`master_server_id`,`can_delete`) VALUES(\'%d\',\'%s\',\'%s\',\'%d\',\'%d\',\'%d\')", $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE, $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs, $xJwxbCThVgzrWTDeojaBfUOtTZMegZpasfmAoVI, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $hlEUJGGeGWBUcsiCCJnRhPAJiQKVLXUdaaM );
  if ( $mcDB->ULDNqqTHJzNmXeYeEHmcmoXgZdHkcfrjhQlY( ) > 0 )
  {
    $TKtbchXjxUacXkSWeaSKLBMbYaNuQHsRQPbo = $mcDB->lZqicXChQNuEPumhIutyOVXkAvvxQGrziptdRBQ( );
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `multics_server_emulators` WHERE `emulator_id` = \'%d\' AND `master_server_id` = \'%d\'", $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
    if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
    {
      $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs = $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
      if ( ! QfgmwmBvfYFOZAUveQPxsjeLiIZGpv( "multics_servers", "id", $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'default_server_id\' ] ) )
      {
        $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `multics_server_emulators` SET `default_server_id` = \'%d\' WHERE `emulator_id` = \'%d\' AND `master_server_id` = \'%d\'", $TKtbchXjxUacXkSWeaSKLBMbYaNuQHsRQPbo, $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
      }
    }
    else
    {
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `multics_server_emulators` (`emulator_id`,`master_server_id`,`user_access`,`default_server_id`) VALUES(\'%d\',\'%d\',1,\'%d\')", $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $TKtbchXjxUacXkSWeaSKLBMbYaNuQHsRQPbo );
    }
    return $TKtbchXjxUacXkSWeaSKLBMbYaNuQHsRQPbo;
  }
  return false;
}

function RdphwtvJyqsmeZZgaHpgeXrMAVAqiwJWLg ( $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs, $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $eexNRLslTIFNuWwOySlJhfyNQnakayRE )
{
  global $mcDB;
  $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs = str_replace( array( "/", "\\", "http://" ), array(), $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs );
  $eyBUqqtNecxWeWEUiNLnkVpPsplMAJvBxPw = gethostbyname( $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs );
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `domain` FROM `multics_master_servers` WHERE `port` = \'%d\' ORDER by id DESC", $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
    foreach ( $DqxWVhFTLNAKTbhfsRUoDwEXckDTaziPWl as $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs )
    {
      if ( gethostbyname( $vhFTvdzxPpZQiQAJJtlRbuPQHrcAITvcNdrSEJs[ \'domain\' ] ) == $eyBUqqtNecxWeWEUiNLnkVpPsplMAJvBxPw )
      {
        return \'EXISTS\';
      }
    }
  }
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "INSERT INTO `multics_master_servers` (`domain`,`username`,`password`,`port`,`status`,`monitor_enabled`) VALUES(\'%s\',\'%s\',\'%s\',\'%d\',1,\'%d\')", $CBwHtzramhAlJVUTnhdywEfgKUsoPpHQZAs, $DhgeTYztpZKYLMRRlOkmQbtyEwRLDkOPGBLGw, $AJdNJaAsADnVbTGUDPSmxBkPkFKNnljIvfVbY, $PyYnjlYDTiXgMhqpnJBWvdosggonHrWoDBpXiPp, $eexNRLslTIFNuWwOySlJhfyNQnakayRE );
  if ( $mcDB->ULDNqqTHJzNmXeYeEHmcmoXgZdHkcfrjhQlY( ) > 0 )
  {
    return $mcDB->lZqicXChQNuEPumhIutyOVXkAvvxQGrziptdRBQ( );
  }
  return false;
}

function KRKjMaXJXZNxybVdtsyrOHWjWYqztkBxs ( )
{
  global $mcDB;
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.*,t2.`username` FROM `users_sessions` t1, `users` t2 WHERE t1.member_id = t2.id ORDER BY t1.`expire_date` DESC" );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function wRepbFFWwMTwKjoeUHnKuVIKylyuUbjVcdjVg ( $ALrurzLXaCSJIYsadOnIhbRtRhMpJZKRkY = \'id\', $oRjBmIifkcpHFRMENTgIzgNpwZKCQYU )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "DELETE FROM `users_sessions` WHERE `$ALrurzLXaCSJIYsadOnIhbRtRhMpJZKRkY` = \'%d\'", $oRjBmIifkcpHFRMENTgIzgNpwZKCQYU );
  return true;
}

function XnvMDtvVcDduVDtGXhWOVxynNHSsRCQwQfqHQbrg ( $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `emulators` WHERE `can_multiple` = 1 AND `id` = \'%d\'", $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return true;
  }
  return false;
}

function RfuEcUaBSqJYqjKqWYJmMwepnhIgWrDaarDc ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc )
{
  global $mcDB;
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1.`emulator_id` as `emulator_id`,t2.emulator_name as `emulator_name` FROM `multics_server_emulators` t1,`emulators` t2,`multics_servers` t3 WHERE t1.`default_server_id` = t3.`id` AND t3.`master_server_id` = t1.`master_server_id` AND t1.`user_access` = 1 AND t1.emulator_id = t2.id AND t1.`master_server_id` = \'%d\'", $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH;
}

function TZIJRpLuzLsRTBQVPnxfnBuVKtkSZezvrXPHnA ( $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * FROM `emulators` WHERE `id` = \'%d\'", $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->OywkjiJsPsfQksGnfpNDuDtblCYOpOluCAWg( );
  }
  return false;
}

function WaanxBbnWFzlXSPgPiNQPHZCFNZUysZFIsDsbE ( $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc, $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `default_server_id` FROM `multics_server_emulators` WHERE `emulator_id` = \'%d\' AND `master_server_id` = \'%d\' AND `user_access` = 1", $mFjmmTzCSEVaGVsjrvnAunlrqqPgGykE, $zfOHpbrRvMDuFXGWAmyEOzLchxOAEZonYsc );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $nekgavadTBfiKGxxpPWQMVQaFVUlCMFWcI = $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( );
    if ( QfgmwmBvfYFOZAUveQPxsjeLiIZGpv( "multics_servers", "id", $nekgavadTBfiKGxxpPWQMVQaFVUlCMFWcI ) )
    {
      return $nekgavadTBfiKGxxpPWQMVQaFVUlCMFWcI;
    }
  }
  return false;
}

function JQFnYELCVacRBNIXetzmrZoIeiuogqTxsg ( $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw = false, $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM = 1, $xXPTHriApADVkHSnXgmhXZZxbczvwcdqbaE = \'id\', $SiXzwiIZmMdadSfrQUdDXgmLcNgojOCINeiI = \'DESC\' )
{
  global $mcDB;
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array();
  switch ( $nPgyEEBoaGeVyyMHquepgMzrSdogyTTpgKGM )
  {
    case 0:
      $jFKpJValFivOnqdugHWfxZVEvtAdLKBwg = "AND t1.test_line = 0";
      break;
    case 1:
      $jFKpJValFivOnqdugHWfxZVEvtAdLKBwg = "AND t1.test_line = 1";
      break;
    default:
      $jFKpJValFivOnqdugHWfxZVEvtAdLKBwg = "";
  }
  if ( ! $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw )
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1 . * , t2.`domain_name` AS domain_name, t2.`description` AS description, t2.`port` AS port, t3.emulator_name AS emulator_name, t3.id as emulator_id FROM `lines` t1, `multics_servers` t2, `emulators` t3 WHERE t2.emulator_id = t3.id AND t1.server_id = t2.id $jFKpJValFivOnqdugHWfxZVEvtAdLKBwg ORDER BY $xXPTHriApADVkHSnXgmhXZZxbczvwcdqbaE $SiXzwiIZmMdadSfrQUdDXgmLcNgojOCINeiI" );
  }
  else
  {
    $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT t1 . * ,t2.`master_server_id` as `master_server_id`, t2.`domain_name` AS domain_name, t2.`description` AS description, t2.`port` AS port, t3.emulator_name AS emulator_name, t3.id as emulator_id FROM `lines` t1, `multics_servers` t2, `emulators` t3 WHERE t2.emulator_id = t3.id AND t1.server_id = t2.id AND t1.member_id = \'%d\' $jFKpJValFivOnqdugHWfxZVEvtAdLKBwg ORDER BY $xXPTHriApADVkHSnXgmhXZZxbczvwcdqbaE $SiXzwiIZmMdadSfrQUdDXgmLcNgojOCINeiI", $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw );
  }
  $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = array();
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
  return $YCWzarlpjCjbSnAvzVqxuHSpdXhJNytYMjp;
}

function CUWhmVFfOxINoCFuuQDDuOOcLJuFpZKni ( $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU, $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw )
{
  global $mcDB;
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT * from `lines` WHERE id = \'%d\' AND `member_id` = \'%d\'", $dnPTGTeGDUZsSAqwTgGwVTBJvGOrWvKHTDeyU, $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return true;
  }
  return false;
}

function bZWXkyKAYCPkgQLmXSIeBWVWOuYeLNcZdhbY ( $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw, $fPXnpgIlOkjXnnpXtTULpjFMVysRQAXvQzLok = 0 )
{
  global $mcDB;
  switch ( $fPXnpgIlOkjXnnpXtTULpjFMVysRQAXvQzLok )
  {
    case 0:
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT count(*) FROM `lines` WHERE `member_id` = \'%d\' AND `test_line` = 0", $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw );
      break;
    case 1:
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT count(*) FROM `lines` WHERE `member_id` = \'%d\' AND `test_line` = 1", $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw );
      break;
    case 2:
      $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT count(*) FROM `lines` WHERE `member_id` = \'%d\'", $uABhuiqYFRfuCFouuKawvoKtmYAgDzCmDBnKyKGtw );
      break;
  }
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    return $mcDB->iycjdDvSoqgLkyJNknsfSqnsRpysAuGjvCAJk( );
  }
  return 0;
}

function servers ( $id )
{
  global $mcDB;
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `id` FROM `multics_servers` WHERE `master_server_id` = \'%d\'", $id );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
foreach($sxrEMJLCtAHUsbhglwaKdFpNiPOyOH as $value)
{
    $text .= $value[\'id\'];
}
return $text;
}


function oscamlinesuser ( $servs, $date, $domain, $port, $user, $pass, $os_default )
{
  global $mcDB;
  $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = array();
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "SELECT `member_id`,`username`,`password`,`date_end`,`notes` FROM `lines` WHERE `date_end` > \'%d\' AND `enable` = \'1\' AND `blocked` = \'0\' AND `server_id` = \'%d\'", $date, $servs );
  if ( $mcDB->mSgFNAoJuzlttvDkYoMsAbRCiKUPbFVEFzU( ) > 0 )
  {
    $sxrEMJLCtAHUsbhglwaKdFpNiPOyOH = $mcDB->uRkfhIjOyHziEyCiTLMEUfuMfkXqDIgnaoo( );
  }
foreach($sxrEMJLCtAHUsbhglwaKdFpNiPOyOH as $value)
{
  $copy =  "#################################################################\r\n";
  $copy .= "#########             MultiCS Panel v4.2              ###########\r\n";
  $copy .= "##########        Whatsapp : +44 7857 189251        #############\r\n";
  $copy .= "#################################################################\r\n\r\n\r\n";

    $text .= \'[account]\' . "\n" . \'user   =   \' . $value[\'username\'] . "\n" . \'pwd   =   \' .  $value[\'password\'] . "\n" . \'expdate   =   \' .  date(\'Y/m/d\',($value[\'date_end\'])) . "\n" . \'description   =   \' . $value[\'notes\'] . "\n" . $os_default . "\n" . "\n\n\n";
}

$api = "http://$domain:$port/files.html?file=oscam.user";
$fields = [
    \'filecontent\'      => $copy . $text,
    \'action\'         => \'Save\'
];

$fields_string = http_build_query($fields);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $api);
      curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
      curl_setopt($ch, CURLOPT_AUTOREFERER, true);
      curl_setopt($ch, CURLOPT_TIMEOUT, 30);
      curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
      curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
      //curl_setopt($ch, CURLOPT_HEADER, 1);
      curl_setopt($ch, CURLOPT_USERPWD, $user . ":" . $pass);

curl_setopt($ch,CURLOPT_POST, true);
curl_setopt($ch,CURLOPT_POSTFIELDS, $fields_string);
$result = curl_exec($ch);

return $result;
}


function alllines( $domain, $port, $user, $pass )
{
       $ures = url_result($domain .":" .$port ."/userconfig.html",$user,$pass);
  $data = \'\';
  $data = $ures;
        $start = \'<TBODY class="content">\';
  $end = \'</TBODY>\';
  $data = get_between($data, $start, $end);
  $rows = preg_split(\'/<TR CLASS="/\',$data);
        array_shift($rows);
  foreach($rows as $row) {
        $no = str_replace(\'" id="\',\'<emp>\', $row);
        $noa = str_replace(\'</TR>\',\'</emp>\', $no);
        $array = explode(\' \', $noa);
        $uname = $array[\'5\'];
        $uname = str_replace(\'data-user-name="\',\'\', $uname);
        $uname = trim(str_replace(\'"\',\'\', $uname));
        $status = $array[0];
        $sta = str_replace(\'"\',\'</emp>\', $status);
        $online = preg_replace("%<emp>.*?</emp>%", \'\', $sta);
              if (preg_match("/offline/", $online))
              {
                $result = "0";
              }
               else
              {
               $result = "1";
              }
  global $mcDB;
  $date = time();
  $mcDB->okIIAkTGwbUuDqjVZeDZLjPlJuLxPCAbQRg( "UPDATE `lines` SET `online` = \'%d\' WHERE `username` = \'%d\'", $result, $uname );
}

}

?>'

Did this file decode correctly?

Original Code

eval("?>".base64_decode("PD9waHAKCmZ1bmN0aW9uIEtzVElabXhiZHNqa05PSWl2cGxOdlFkb2RxdXBCdGdpTlBNICggKQp7CiAgJEtzVElabXhiZHNqa05PSWl2cGxOdlFkb2RxdXBCdGdpTlBNID0gdHJpbSggc2hlbGxfZXhlYyggImZyZWUgLW0iICkgKTsKICBpZiAoIGVtcHR5KCAkS3NUSVpteGJkc2prTk9JaXZwbE52UWRvZHF1cEJ0Z2lOUE0gKSApCiAgewogICAgcmV0dXJuIGZhbHNlOwogIH0KICAkUkZVU1FEQmh6Z05oTVd3dmpya3NHSW5Wd0VGS0dweURRdCA9IGV4cGxvZGUoICJ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uICIpIiApOwogICRZQ1d6YXJscGpDamJTbkF2elZxeHVIU3BkWGhKTnl0WU1qcCA9IGFycmF5KCk7CiAgaWYgKCAkbWNEQi0+bVNnRk5Bb0p1emx0dHZEa1lvTXNBYlJDaUtVUGJGVkVGelUoICkgPiAwICkKICB7CiAgICAkb0pDWmJxWFJRQUl6c2pna2JGeXFtTU9NenlubnIgPSBtY0xpYjo6c0xZUVJJbkhxRmhLRUhsWnJsa0lRbnhURHRacllWTnRLSyggJG1jREItPnVSa2ZoSWpPeUh6aUV5Q2lUTE1FVWZ1TWZrWHFESWduYW9vKCApICk7CiAgICAkWUNXemFybHBqQ2piU25BdnpWcXh1SFNwZFhoSk55dFlNanAgPSBNWHhheEFhVXVpemZKVFdtWnNoYU5CYklQQ3B4dm8oICRvSkNaYnFYUlFBSXpzamdrYkZ5cW1NT016eW5uciwgJ2NvbmZpZycgKTsKICB9CiAgICR2VUVhRHpiblRpYlljZmhDa0toZkhwaGVXcUJvWWpoWSA9ICAiIz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSNcclxuIjsKICAgJHZVRWFEemJuVGliWWNmaENrS2hmSHBoZVdxQm9ZamhZIC49ICIjPT09PT09PT09PT09PT09PT09PT09IE11bHRpQ1MgUGFuZWwgdjQuOCA9PT09PT09PT09PT09PT09PT09PT09I1xyXG4iOwogICAkdlVFYUR6Ym5UaWJZY2ZoQ2tLaGZIcGhlV3FCb1lqaFkgLj0gIiM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0jXHJcblxyXG5cclxuIjsKICAkTGZNZnBPRU5IbG9FdFZrT1hQek1rUUhiZVRZbmZtV1ZRID0gIiI7CiAgdW5zZXQoICR1Y1dXeGhta0lZWER4SEtzZFVoUmFlVkhvdmRQSW9ER1VbICdDQ0NBTSBQT1JUJyBdICk7CiAgdW5zZXQoICR1Y1dXeGhta0lZWER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gICAgICRSRlVTUURCaHpnTmhNV3d2anJrc0dJblZ3RUZLR3B5RFF0ID0gZXhwbG9kZSggIiAiLCAkWWNvY29mQ1lYaVRQUkJKZXhlRUdsQ3RHdVhhRkR4QkRNVCApOwogICAgICAgICAgICAkRGhnZVRZenRwWktZTE1SUmxPa21RYnR5RXdSTERrT1BHQkxHdyA9IHRyaW0oICRSRlVTUURCaHpnTmhNV3d2anJrc0dJblZ3RUZLR3B5RFF0WyAwIF0gKTsKICAgICAgICAgICAgJEFKZE5KYUFzQURuVmJUR1VEUFNteEJrUGtGS05ubGpJdmZWYlkgPSB0cmltKCAkUkZVU1FEQmh6Z05oTVd3dmpya3NHSW5Wd0VGS0dweURRdFsgMSBdICk7CiAgICAgICAgICAgIGlmICggaW5fYXJyYXkoICREaGdlVFl6dHBaS1lMTVJSbE9rbVFidHlFd1JMRGtPUEdCTEd3LCAkZlJucFJqWHFkWUFob01OS3RVclBtR1lOZElKZXhYc0NsUUIgKSApCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICBhcnJheV9wdXNoKCAkZlJucFJqWHFkWUFob01OS3RVclBtR1lOZElKZXhYc0NsUUIsICREaGdlVFl6dHBaS1lMTVJSbE9rbVFidHlFd1JMRGtPUEdCTEd3ICk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgJHlkTkRESlR4T1RBVmxReGZ1cWh2RGdxTFNKd2tzQVdzcmMgPSBhcnJheSgpOwogICAgICAgICAgICAkblF6bmhJbnNJeHp2amhsZ0R1ZmtHZlVkYlZmY0kgPSAnTlVMTCc7CiAgICAgICAgICAgICR1QUJodWlxWUZSZnVDRm91dUthd3ZvS3RtWUFnRHpDbURCbkt5S0d0dyA9IDA7CiAgICAgICAgICAgIGlmICggcHJlZ19tYXRjaCggIi97KC4qPyl9LyIsICRZY29jb2ZDWVhpVFBSQkpleGVFR2xDdEd1WGFGRHhCRE1ULCAkUVBwYkFLaGdGQnhkaG9LRFVBYm94ZENRZ291cVZiUXJGZERNICkgKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgJEdRemlIeGRLelJEalduSkJoTnRTRG1IV1JxVWhVZlJzID0gdHJpbSggaHRtbGVudGl0aWVzKCAkUVBwYkFLaGdGQnhkaG9LRFVBYm94ZENRZ291cVZiUXJGZERNWyAxIF0gKSApOwogICAgICAgICAgICAgICRGa3dwSk5UUG5keGZmVXpEcHV5Q0xuTldUQ2l5d1NVV0JtbVkgPSBzdHJfcmVwbGFjZSggJzsnLCAnJicsICRHUXppSHhkS3pSRGpXbkpCaE50U0RtSFdScVVoVWZScyApOwogICAgICAgICAgICAgIHBhcnNlX3N0ciggJEZrd3BKTlRQbmR4ZmZVekRwdXlDTG5OV1RDaXl3U1VXQm1tWSwgJHlkTkRESlR4T1RBVmxReGZ1cWh2RGdxTFNKd2tzQVdzcmMgKTsKICAgICAgICAgICAgfQogICAgICAgICAgICAkeWRORERKVHhPVEFWbFF4ZnVxaHZEZ3FMU0p3a3NBV3NyYyA9IGFycmF5X21hcCggInRyaW0iLCAkeWRORERKVHhPVEFWbFF4ZnVxaHZEZ3FMU0p3a3NBV3NyYyApOwogICAgICAgICAgICBmb3JlYWNoICggJHlkTkRESlR4T1RBVmxReGZ1cWh2RGdxTFNKd2tzQVdzcmMgYXMgJHVMTGdIQm1QdGhLVUZlRVJ0alh0cnZCS0NPdURzUndYY2ZjID0+ICRpT0dWd05GeFVveE1RUkllWHRzT3hUb1hzWnFxS2VEWHBQSHMgKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgaWYgKCBpc19udWxsKCAkaU9HVndORnhVb3hNUVJJZVh0c094VG9Yc1pxcUtlRFhwUEhzICkgfHwgZW1wdHkoICRpT0dWd05GeFVveE1RUkllWHRzT3hUb1hzWnFxS2VEWHBQSHMgKSApCiAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgdW5zZXQoICR5ZE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AnJywgJHN0YSk7CiAgICAgICAgICAgICAgaWYgKHByZWdfbWF0Y2goIi9vZmZsaW5lLyIsICRvbmxpbmUpKQogICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICRyZXN1bHQgPSAiMCI7CiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAkcmVzdWx0ID0gIjEiOwogICAgICAgICAgICAgIH0KICBnbG9iYWwgJG1jREI7CiAgJGRhdGUgPSB0aW1lKCk7CiAgJG1jREItPm9rSUlBa1RHd2JVdURxalZaZURaTGpQbEp1THhQQ0FiUVJnKCAiVVBEQVRFIGBsaW5lc2AgU0VUIGBvbmxpbmVgID0gJyVkJyBXSEVSRSBgdXNlcm5hbWVgID0gJyVkJyIsICRyZXN1bHQsICR1bmFtZSApOwp9Cgp9Cgo/Pg=="));

Function Calls

base64_decode 1

Variables

None

Stats

MD5 6e35663188af46053f709fdba3bb0e47
Eval Count 1
Decode Time 208 ms