[REQUEST] GM ONLINE SCRIPT

02/08/2014 17:37 Cloud'#1
CAN ANYONE GIVE ME WEBSITE SCRIPT FOR GM ONLINE/OFFLINE STATUS AND THE SQL? THANKS :rtfm:
02/08/2014 17:46 Sedrika#2
Have you at least tried it make it yourself?
If yes -> We'll help you to fix your code
If no -> No support from my side
02/08/2014 17:54 ZeroTwo02#3
Code:
<?php

	$_CONFIG['Droits_Serveur'] = array('Administrateur' => 'U', 'Maître du jeu' => 'P', 'Guide' => 'M', 'MJ' => 'Q', 'Modérateur' => 'N'); // Configuration des lettres GM
foreach($_CONFIG['Droits_Serveur'] as $description => $authentification) {
	
	echo '<table width="60%" align="center" cellspacing="0" cellpadding="2">';
	
	$Equipe_1 = odbc_exec($mssql, 'SELECT A.[account], A.[m_chLoginAuthority], C.[m_szName], C.[MultiServer], C.[TotalPlayTime] FROM [ACCOUNT_DBF].[dbo].[ACCOUNT_TBL_DETAIL] AS A (READUNCOMMITTED) LEFT JOIN [CHARACTER_01_DBF].[dbo].[CHARACTER_TBL] AS C ON C.[account] = A.[account] WHERE A.[m_chLoginAuthority] = \''.$auth.'\' AND C.[isblock] != \'D\'');
	while($Equipe_2 = odbc_fetch_array($Equipe_1)) {
		if($Equipe_2['MultiServer'] != 0) {$Equipe_2['MultiServer'] = '<font class="lightblue"><b>En Ligne</b></font>';} else {$Equipe_2['MultiServer'] = '<font class="red">Hors Ligne</font>';}
		
	echo '		<tr>
					<td width="30%" align="center"><b>'.$Equipe_2['m_szName'].'</b></td>
					<td width="30%" align="center">'.$Equipe_2['MultiServer'].'</td>
				</tr>';
		}
	echo '</table></table></table></table>';
}
?>
02/08/2014 17:54 FunkyJustice#4
[Only registered and activated users can see links. Click Here To Register...]

#Edit, sry men, i read only Gm online :x my default
02/08/2014 17:57 Cloud'#5
WEBSITE SCRIPT SIR.
02/08/2014 18:33 ZeroTwo02#6
Look above my script is suitable for websites ..
02/08/2014 18:53 Cloud'#7
it gives me error

Quote:
Originally Posted by naruto66620 View Post
Look above my script is suitable for websites ..
ill send you my script sir can you please help me?
02/08/2014 23:04 Lumi#8
Quote:
Originally Posted by Xxl3lubbs View Post
Stimmt, mit </table></table></table></table> wird ganz ganz sicher der eine geöffnete table geschlossen. Viel hilft doch schließlich viel. Wenn die Franzosen auch nur einmal etwas richtig machen könnten...

Aber lieber schlecht geholfen als gar nicht geholfen. Es ist ja bloß das HTML, das unterirdisch gruselig ist - selbst, wenn man in Betracht zieht, was hier sonst noch herumfliegt.
Immerhin versucht er bzw. hat versucht zu helfen im Gegensatz irgendwelche Predigt zu halten. (Ops Fanboys unterwegs)
Da ziehe ich doch lieber die Variante in Erwägung, dass lieber schlecht geholfen besser wäre als gar nicht geholfen. oke
Ich meine, man kann auch simple auf Fehler hinweisen, aber so geht mal gar nicht. :eek:

Quote:
Originally Posted by Cloud' View Post
it gives me error



ill send you my script sir can you please help me?
Send me your script. I will look over it.
02/08/2014 23:19 Chyukαsame#9
HTML Code:
	<tr>
		<td width="100%"><br />
			<table width="90%" align="center" cellspacing="0" cellpadding="2">
				<tr>
					<td width="18%" align="left" valign="top"><h3>Name</h3></td>
					<td width="22%" align="left" valign="top"><h3>Rankname</h3></td>
					<td width="20%" align="center" valign="top"><h3>Onlinestatus</h3></td>
					<td width="20%" align="center" valign="top"><h3>Onlinetime</h3></td>
				</tr>
			</table>
<?php
$_CONFIG['allg_svr_rights'] = array('Administrator' => 'P', 'Developer' => 'Z','Gamemaster' => 'N');
?>
<?php
foreach($_CONFIG['allg_svr_rights'] as $desc => $auth) {

	if($auth != 'N') {$style = ' style="border-bottom:1px dotted #c0c0c0;"';} else {$style = '';}
	
	echo '	<table width="90%" align="center" cellspacing="0" cellpadding="2"'.$style.'>';
	$team_q = @odbc_exec($connection, 'SELECT A.[account], A.[m_chLoginAuthority], C.[m_szName], C.[MultiServer], C.[TotalPlayTime] FROM [ACCOUNT_DBF].[dbo].[ACCOUNT_TBL_DETAIL] AS A LEFT JOIN [CHARACTER_01_DBF].[dbo].[CHARACTER_TBL] AS C ON C.[account] = A.[account] WHERE A.[m_chLoginAuthority] = \''.$auth.'\' AND C.[isblock] != \'D\'');
	while($team_a = @odbc_fetch_array($team_q)) {
		if($team_a['MultiServer'] != 0) {$team_a['MultiServer'] = '<font class="lightblue"><b>Online</b></font>';} else {$team_a['MultiServer'] = '<font class="red">Offline</font>';}
		
	echo '		<tr>
					<td width="18%" align="left"><b>'.$team_a['m_szName'].'</b></td>
					<td width="22%" align="left">'.$desc.'</td>
					<td width="20%" align="center">'.$team_a['MultiServer'].'</td>
					<td width="20%" align="center">'.sectohrs($team_a['TotalPlayTime']).'</td>
				</tr>';
		}
	echo '</table>';
}
?>
		</td>
	</tr>

Edit the $connection in your DB connect ;)


@Lumi: Ein Französisches Script bringt ihm aber auch nix xD
Besonders nicht bei so nem code xDDD
Sein Fehler ist, er bekommt keine DB verbindung ^^
02/09/2014 11:30 Chyukαsame#10
Timmy, beruhige dich, bevor Reavern die Gelbe Karte aus der epvp Box holt ^^
Ich habe ihm das Script von Sapphire geschickt und ihm erklärt was er ändern muss, damit es funktioniert, entweder er kann es oder hat pech.
02/09/2014 12:56 Cloud'#11
Quote:
<?php include('inc/config.inc.php'); ?>
<h1 id="Heading"> <center> FLYFF TEAM</h1>

<table style="width: 100%;">
<tr>
<td>Name</td>
<td>Gruppe</td>
<td>Status</td>
</tr>
<?php
odbc_exec($mssql, 'USE [CHARACTER_01_DBF]');
$query1 = odbc_exec($mssql, 'SELECT * FROM [CHARACTER_TBL] WHERE m_chAuthority != \'F\'');
while($result = odbc_fetch_array($query1)) {
if($result['MultiServer'] != '0'){
$result['status'] = '<font color="#00FF00">Online</font>';
}else{
$result['status'] = '<font color="#FF0000">Offline</font>';
}
if($result['m_chAuthority'] == 'Z')
{
$result['auth'] = 'Developer';
}
else if($result['m_chAuthority'] == 'P')
{
$result['auth'] = 'Owner';
}
else if($result['m_chAuthority'] == 'O')
{
$result['auth'] = 'Administrator';
}
else if($result['m_chAuthority'] == 'M')
{
$result['auth'] = 'Gamemaster';
}
else if($result['m_chAuthority'] == 'L')
{
$result['auth'] = 'Gamemaster';
}
echo '<tr>';
echo '<td>'.$result['m_szName'].'</td>';
echo '<td>'.$result['auth'].'</td>';
echo '<td>'.$result['status'].'</td>';
echo '</tr>';
}
?>
</table>
PLS. HELP ME, SHOWS OFFLINE EVEN THE STAFF IS ONLINE.
02/09/2014 13:17 .Trotex.#12

Look at this if function..
02/09/2014 16:08 Rhizon#13
Sometimes you have to enable MultiServer first - Just run the uspInitMultiServer Procedure with Serverindex 01 and dwSys 0.