CAN ANYONE GIVE ME WEBSITE SCRIPT FOR GM ONLINE/OFFLINE STATUS AND THE SQL? THANKS :rtfm:
<?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>';
}
?>
Immerhin versucht er bzw. hat versucht zu helfen im Gegensatz irgendwelche Predigt zu halten. (Ops Fanboys unterwegs)Quote:
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.
Send me your script. I will look over it.Quote:
it gives me error
ill send you my script sir can you please help me?
<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>
PLS. HELP ME, SHOWS OFFLINE EVEN THE STAFF IS ONLINE.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>