Advertisement
Guest User

Untitled

a guest
Jul 9th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     define('IN_MYBB', NULL);
  3.     include('serveur_samp.php');
  4.     include('inc/class.ini.php');
  5.     require_once './global.php';
  6.     require_once './inc/class.MyBBIntegrator.php';
  7.     $MyBBI = new MyBBIntegrator($mybb, $db, $cache, $plugins, $lang, $config);
  8.     $data_users = $MyBBI->getUser();
  9.     $lastvisit = $data_users['lastvisit'];
  10.     $lastvisitday =  date('d/m/Y', $lastvisit);
  11.     $lastvisitdeure = date('h:i [A]', $lastvisit);
  12.     $my_key = $MyBBI->mybb->user['logoutkey'];
  13.     $login_status = $MyBBI->login($MyBBI->mybb->input['name'], $MyBBI->mybb->input['password']);   
  14.     include('header.php');
  15.  
  16.     $contents = ftp_nlist($conn_id, "/scriptfiles/LARP/Users");
  17.  
  18.     $count = count($contents);
  19.     $count = ($count - 2);
  20.     $max = 0;
  21.     sort($contents);
  22.    
  23.     $x = $count;
  24.     $y = 25;
  25.  
  26.     $page = $x / $y;
  27.     $page = floor($page);
  28.    
  29.     if (fmod($x, $y) != 0)
  30.     {
  31.         $page = ($page + 1);
  32.     }
  33.     else
  34.     {
  35.         $page = ($page);
  36.     }
  37.  
  38.     if (!isset($_GET['page']))
  39.     {
  40.         $x = 0;
  41.         $max = 25;
  42.     }
  43.     else
  44.     {
  45.         if ($_GET['page'] <= $page)
  46.         {
  47.             if ($_GET['page'] == 0)
  48.             {
  49. ?>
  50. <META HTTP-EQUIV="Refresh" CONTENT=60; URL="listeplayer.php?page=1">
  51. <?php
  52.             }
  53.             if ($_GET['page'] == 1)
  54.             {
  55.                 $x = 0 ;
  56.                 $max = 25;
  57.             }
  58.             if ($_GET['page'] > 1)
  59.             {
  60.             $get_page = $_GET['page'];
  61.             $x = 1 + (25 * $get_page);
  62.             $max = 25 + (25 * $get_page);
  63.             }
  64.         }
  65.     }
  66. ?>
  67. <div id="content">
  68.     <div class="wrapper">
  69.         <div class="navigation">
  70.             <a href="index.php">Forums</a> > <a href="listplayer.php">Liste joueur</a>
  71.             <br /><img src="images/night/nav_bit.gif" alt="" /><span class="active">Liste des joueurs</span>
  72.         </div>
  73.         <br />
  74.         <table border="0" cellspacing="0" cellpadding="5" class="tborder">
  75.         <tr>
  76.         <td class="trow1" style="text-align: center;"><strong>Joueur</strong></td>
  77.         <td class="trow1" style="text-align: center;"><strong>level</strong></td>
  78.         <td class="trow1" style="text-align: center;"><strong>sexe</strong></td>
  79.         <td class="trow1" style="text-align: center;"><strong>age</strong></td>
  80.         <td class="trow1" style="text-align: center;"><strong>Telephone</strong></td>
  81.         <td class="trow1" style="text-align: center;"><strong>banque</strong></td>
  82.         <td class="trow1" style="text-align: center;"><strong>skin</strong></td>
  83.         <td class="trow1" style="text-align: center;"><strong>Derniére Connection</strong></td>
  84.         <td class="trow1" style="text-align: center;"><strong>Statuts</strong></td>
  85.         </tr>
  86. <?php
  87.  
  88. for ($x; $x < $max; $x++)
  89. {
  90.     if ($contents[$x] != "/scriptfiles/LARP/Users/Aliases" and $contents[$x] != "/scriptfiles/LARP/Users/Bans")
  91.     {
  92.         $name = preg_replace('#/scriptfiles/LARP/Users/(.+).ini#isU', '$1', $contents[$x]);
  93.         $dir_remote = '/scriptfiles/LARP/Users/'.$name.'.ini';
  94.         $dir_local = 'data_users/'.$name.'.ini';
  95.         $handle = fopen($dir_local, 'w');
  96.         if (ftp_fget($conn_id, $handle, $dir_remote, FTP_ASCII, 0))
  97.         {
  98.             $ini_array = parse_ini_file($dir_local, true);
  99.             $sex = $ini_array['Sex'];
  100.             $lastlogged = $ini_array['LastLogged'];
  101.             $statuts = $ini_array['Banned'];
  102. ?>     
  103.             <tr>
  104.             <td style="text-align: center;"><?php echo $name; ?></td>
  105.             <td style="text-align: center;"><?php echo $ini_array['Level']; ?></td>
  106.             <td style="text-align: center;"><?php echo "<img src=\"images/". $ini_array['Sex'] .".gif\"/>". sex($sex) . ""; ?></td>
  107.             <td style="text-align: center;"><?php echo $ini_array['Age']; ?> </td>
  108.             <td style="text-align: center;"><?php echo $ini_array['PhoneNr']; ?></td>
  109.             <td style="text-align: right;"><?php echo $ini_array['Bank']; ?> $$</td>
  110.             <td style="text-align: center;"><?php echo $ini_array['Model']; ?></td>
  111.             <td style="text-align: center;"><?php echo lastlogged($lastlogged); ?></td>
  112.             <td style="text-align: center;"><?php echo statuts($statuts); ?></td>
  113.             </tr>
  114. <?php
  115.         }
  116.     }
  117. }
  118. ?>
  119.         </table>
  120.     <div id="page" style="text-align: center;"> <<< [x] >>></div>
  121.     </div>
  122. </div>
  123. <?php
  124. include('footer.php');
  125. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement