Advertisement
Guest User

Untitled

a guest
Jun 6th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.76 KB | None | 0 0
  1. <font color="white">
  2. <?php
  3. #Script by Stipt
  4. #Please do not remove credits
  5.  
  6. //===========: Settings :==========/
  7. $database_host = "173.208.123.140";
  8. $database_user = "lostsoul_admin";
  9. $database_pass = "lsa5701!";
  10. $database = "lostsoul_characters";
  11.  
  12. //===========: Script :===========/
  13. $online_aplayers = 0;
  14. $online_hplayers = 0;
  15.  
  16. $whosonline = '<!--Script made by Stipt-->
  17.                 <!--Last updated: '.@date("d/M/Y G:i", time()).'-->
  18.               <br>
  19.               <table width=100%>
  20.                 <tr>
  21.                   <th><u>Name</u></th>
  22.                   <th><u>Level</u></th>
  23.                   <th><u>Race</u></th>
  24.                   <th><u>Class</u></th>
  25.                </tr>';
  26.                
  27.                 //===========: Settings :==========/
  28. $database_host1 = "173.208.123.140";
  29. $database_user1 = "lostsoul_admin";
  30. $database_pass1 = "lsa5701!";
  31. $database1 = "lostsoul_uldaman_characters";
  32.  
  33. //===========: Script :===========/
  34. $online_aplayers1 = 0;
  35. $online_hplayers1 = 0;
  36.  
  37. $whosonline = '<!--Script made by Stipt-->
  38.                 <!--Last updated: '.@date("d/M/Y G:i", time()).'-->
  39.               <br>
  40.               <table width=100%>
  41.                 <tr>
  42.                   <th><u>Name</u></th>
  43.                   <th><u>Level</u></th>
  44.                   <th><u>Race</u></th>
  45.                   <th><u>Class</u></th>
  46.                </tr>';
  47.  
  48. @mysql_connect("$database_host", "$database_user", "$database_pass") or die("Unable to connect to server, please try again later");
  49. @mysql_select_db("$database") or die("Unable to connect to database, please try again later");  
  50.  
  51. $online = mysql_query("SELECT name, gender, race, class,  level FROM characters WHERE online = 1");
  52. $total_online = mysql_num_rows($online);
  53.  
  54. while( $row = mysql_fetch_array($online)) {
  55.     $faction = (($row['race'] == 1 || $row['race'] == 3 || $row['race'] == 4 || $row['race'] == 7 || $row['race'] == 11) ? 'alliance' : 'horde');
  56.     if($faction == 'alliance') $online_aplayers++;
  57.     else $online_hplayers++;
  58.     $whosonline .= "<tr>
  59.                       <td>{$row['name']}</td>
  60.                       <td>{$row['level']}</td>
  61.                       <td><img src='icons/race/{$row['race']}-{$row['gender']}.gif'></td>
  62.                       <td><img src='icons/class/{$row['class']}.gif'></td>
  63.                      
  64.                     </tr>";
  65. }
  66. $whosonline .= '</table>';
  67.  
  68. ?>
  69. <!--Seperate online Script-->
  70.  
  71. Name:  <b>Optical PvP</b><br><br><br><br><br/>
  72. Online:  <?php echo $online_hplayers+$online_aplayers ; print " (<font color='blue'>Alliance: $online_aplayers</font> / <font color='red'>Horde: $online_hplayers</font>)"; ?><br><br><br><br><br/>
  73. Uptime:  <b><?php $lss = mysql_connect("173.208.123.140","lostsoul_admin","lsa5701!");
  74. if (!$lss)
  75.   {
  76.   die('Could not connect: ' . mysql_error());
  77.   }?><?php mysql_select_db("lostsoul_accounts", $lss);
  78.  
  79. $upt = mysql_query("SELECT uptime FROM uptime ORDER BY starttime DESC LIMIT 0,1");
  80.  
  81. while($up = mysql_fetch_array($upt))
  82.   {
  83.   echo $up['uptime'];
  84.   } ?></b><br/><br><br><br><br><br><br><br><br><br/><br><br><br><br><br/>
  85. <br/>
  86. <br/>
  87. Name:  <b>Uldaman Highrate</b><br><br><br><br><br/><?php
  88. @mysql_connect("$database_host1", "$database_user1", "$database_pass1") or die("Unable to connect to server, please try again later");
  89. @mysql_select_db("$database1") or die("Unable to connect to database, please try again later");  
  90. $online1 = mysql_query("SELECT name, gender, race, class,  level FROM characters WHERE online = 1");
  91. $total_online1 = mysql_num_rows($online1);
  92.  
  93. while( $row1 = mysql_fetch_array($online1)) {
  94.     $faction1 = (($row1['race'] == 1 || $row1['race'] == 3 || $row1['race'] == 4 || $row1['race'] == 7 || $row1['race'] == 11) ? 'alliance' : 'horde');
  95.     if($faction1 == 'alliance') $online_aplayers1++;
  96.     else $online_hplayers1++;
  97.     $whosonline1 .= "<tr>
  98.                       <td>{$row1['name']}</td>
  99.                       <td>{$row1['level']}</td>
  100.                       <td><img src='icons/race/{$row1['race']}-{$row1['gender']}.gif'></td>
  101.                       <td><img src='icons/class/{$row1['class']}.gif'></td>
  102.                      
  103.                     </tr>";
  104. }
  105. $whosonline1 .= '</table>';
  106. ?>
  107. Online:  <?php echo $online_hplayers1+$online_aplayers1 ; print " (<font color='blue'>Alliance: $online_aplayers1</font> / <font color='red'>Horde: $online_hplayers1</font>)"; ?><br><br><br><br><br/>
  108. Uptime:  <b><?php $lss1 = mysql_connect("173.208.123.140","lostsoul_admin","lsa5701!");
  109. if (!$lss1)
  110.   {
  111.   die('Could not connect: ' . mysql_error());
  112.   }?><?php mysql_select_db("lostsoul_accounts", $lss1);
  113.  
  114. $upt1 = mysql_query("SELECT uptime FROM uptime ORDER BY starttime DESC LIMIT 0,1");
  115.  
  116. while($up1 = mysql_fetch_array($upt1))
  117.   {
  118.   echo $up1['uptime'];
  119.   } ?></b><br><br><br><br><br><br><br><br><br><br/>
  120. <br/>
  121. <br/>
  122. Total Online Players: <b> <?php echo $online_hplayers+$online_aplayers+$online_hplayers1+$online_aplayers1 ; ?></b>
  123. </font>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement