hey epvp
I share a script I wrote recently ,
I apologize if shared ..
I share a script I wrote recently ,
I apologize if shared ..
PHP Code:
<?php
error_reporting(1);
define("MSQL_HOST", "ip");
define("MSQL_USER", "user");
define("MSQL_PASS", "pass");
$connect = @mysql_connect(MSQL_HOST, MSQL_USER, MSQL_PASS);
if($connect){
$limit = 15;
$sqlCmd = "SELECT `3` as 'empire',`4` as 'shout',`1` as 'msgTime' FROM log.shout_log ORDER BY msgTime DESC LIMIT ".$limit;
$sqlQry = mysql_query($sqlCmd);
echo '<table><tr><th>Date</th><th>Post</th></tr>';
while($row = mysql_fetch_object($sqlQry)){
echo '
<tr>
<td>
'.$row->msgTime.'
</td>
<td>
';
if($row->empire == 1){
echo '<span style="color:red;">'.htmlspecialchars($row->shout).'</span>';
} elseif($row->empire == 2){
echo '<span style="color:yellow;">'.htmlspecialchars($row->shout).'</span>';
} elseif($row->empire == 3){
echo '<span style="color:blue;">'.htmlspecialchars($row->shout).'</span>';
}
echo '
</td>
</tr>
';
}
echo '</table>';
} else {
echo "Error connecting to server";
}
?>