Ejemplo n.º 1
0
	<?php 
    if ($num_rows > 0) {
        // query contains stuff so spit it out
        foreach ($data_set as $clients) {
            // get data from query and loop
            $cid = $clients['id'];
            $name = $clients['name'];
            $level = $clients['level'];
            $connections = $clients['connections'];
            $time_edit = $clients['time_edit'];
            ## Change to human readable ##
            $time_edit_read = date($tformat, $time_edit);
            // this must be after the time_diff
            ## row color ##
            $alter = alter();
            $client = clientLink($name, $cid);
            // setup heredoc (table data)
            $data = <<<EOD
\t\t\t<tr class="{$alter}">
\t\t\t\t<td><strong>{$client}</td>
\t\t\t\t<td>{$connections}</td>
\t\t\t\t<td>@{$cid}</td>
\t\t\t\t<td>{$level}</td>
\t\t\t\t<td><em>{$time_edit_read}</em></td>
\t\t\t</tr>
EOD;
            echo $data;
        }
        $no_data = false;
    } else {
        $no_data = true;
Ejemplo n.º 2
0
         $time_expire = $pen['time_expire'];
         $reason = tableClean($pen['reason']);
         $client_id = $pen['client_id'];
         $client_name = tableClean($pen['name']);
         $duration = $pen['duration'];
         ## Tidt data to make more human friendly
         if ($time_expire != '-1') {
             $duration_read = time_duration($duration * 60);
         } else {
             $duration_read = '';
         }
         $time_expire_read = timeExpirePen($time_expire);
         $time_add_read = date($tformat, $time_add);
         $reason_read = removeColorCode($reason);
         if ($mem->loggedIn()) {
             $client_name_read = clientLink($client_name, $client_id);
         } else {
             $client_name_read = $client_name;
         }
         ## Row color
         $alter = alter();
         // setup heredoc (table data)
         $data = <<<EOD
t<tr class="{$alter}">
t\t<td><strong>{$client_name_read}</strong></td>
t\t<td>{$ban_id}</td>
t\t<td>{$type}</td>
t\t<td>{$time_add_read}</td>
t\t<td>{$duration_read}</td>
t\t<td>{$time_expire_read}</td>
t\t<td>{$reason_read}</td>
Ejemplo n.º 3
0
    private function buildLines($data_set, $ani = false)
    {
        global $tformat;
        // get the standardised time format
        if ($ani == 'tb') {
            $ani = 'tb-row';
        } elseif ($ani == 'yes') {
            $ani = 'animate';
        } else {
            $ani = '';
        }
        if (count($data_set) > 0) {
            foreach ($data_set as $data) {
                $id = $data['id'];
                $msg_type = $data['msg_type'];
                $msg = cleanvar(removeColorCode($data['msg']));
                $client_link = clientLink($data['client_name'], $data['client_id']);
                $time_read = date($tformat, $data['msg_time']);
                ## Highlight Commands ##
                if (substr($msg, 0, 1) == '!' or substr($msg, 0, 1) == '@') {
                    $msg = '<span class="chat-cmd">' . $msg . "</span>";
                }
                $alter = alter();
                // setup heredoc (table data)
                $data = <<<EOD
\t\t\t<tr class="{$alter} {$ani}" id="{$id}">
\t\t\t\t<td>{$id}</td>
\t\t\t\t<td><strong>{$client_link}</strong></td>
\t\t\t\t<td>{$msg_type}</td>
\t\t\t\t<td>{$msg}</td>
\t\t\t\t<td><em>{$time_read}</em></td>
\t\t\t</tr>
EOD;
                $content .= $data;
            }
        }
        return $content;
    }
Ejemplo n.º 4
0
function displayEchLog($array, $style = 'client')
{
    global $tformat;
    // import the time format varible for use in this function
    foreach ($array as $ech_log) {
        ## get vars
        $id = $ech_log['id'];
        $type = $ech_log['type'];
        $msg = tableClean($ech_log['msg']);
        $time_add = $ech_log['time_add'];
        $time_add_read = date($tformat, $time_add);
        $game_id = $ech_log['game_id'];
        ## Page row color alternate
        $alter = alter();
        if ($style == 'admin') {
            $cid = $ech_log['client_id'];
            $client_link = clientLink($cid, $cid, $game_id);
            $table = <<<EOD
\t\t\t<tr class="{$alter}">
\t\t\t\t<td>{$id}</td>
\t\t\t\t<td>{$type}</td>
\t\t\t\t<td>{$msg}</td>
\t\t\t\t<td><em>{$time_add_read}</em></td>
\t\t\t\t<td>{$client_link}</td>
\t\t\t</tr>
EOD;
        } else {
            // if client
            $user_name = tableClean($ech_log['user_name']);
            $user_link = echUserLink($ech_log['user_id'], $user_name);
            $table = <<<EOD
\t\t\t<tr class="{$alter}">
\t\t\t\t<td>{$id}</td>
\t\t\t\t<td>{$type}</td>
\t\t\t\t<td>{$msg}</td>
\t\t\t\t<td><em>{$time_add_read}</em></td>
\t\t\t\t<td>{$user_link}</td>
\t\t\t</tr>
EOD;
        }
        echo $table;
        // echo out the formated data
    }
}
Ejemplo n.º 5
0
                $duration_read = time_duration($duration * 60);
            } else {
                $duration_read = '';
            }
            $time_expire_read = timeExpirePen($time_expire);
            $time_add_read = date($tformat, $time_add);
            $reason_read = removeColorCode($reason);
            if ($type_admin) {
                // admin cell only needed for admin type
                $admin = '<td><strong>' . clientLink($admin_name, $admin_id) . '</strong></td>';
            } else {
                $admin = NULL;
            }
            ## Row color
            $alter = alter();
            $client = clientLink($client_name, $client_id);
            // setup heredoc (table data)
            $data = <<<EOD
\t\t\t<tr class="{$alter}">
\t\t\t\t<td><strong>{$client}</strong></td>
\t\t\t\t<td>{$type}</td>
\t\t\t\t<td>{$time_add_read}</td>
\t\t\t\t<td>{$duration_read}</td>
\t\t\t\t<td>{$time_expire_read}</td>
\t\t\t\t<td>{$reason_read}
\t\t\t\t\t<br /><em>{$pen_data}</em>
\t\t\t\t</td>
\t\t\t\t{$admin}
\t\t\t</tr>
EOD;
            echo $data;
Ejemplo n.º 6
0
	<?php 
    if ($num_rows > 0) {
        foreach ($data_set as $notice) {
            // get data from query and loop
            $cname = tableClean($notice['client_name']);
            $cid = $notice['client_id'];
            $aname = tableClean($notice['admin_name']);
            $aid = $notice['admin_id'];
            $reason = tableClean($notice['reason']);
            $time_add = $notice['time_add'];
            ## Change to human readable	time
            $time_add = date($tformat, $time_add);
            ## Row color
            $alter = alter();
            $client = clientLink($cname, $cid);
            $admin = clientLink($aname, $aid);
            // setup heredoc (table data)
            $data = <<<EOD
\t\t\t<tr class="{$alter}">
\t\t\t\t<td><strong>{$client}</strong></td>
\t\t\t\t<td>@{$cid}</td>
\t\t\t\t<td><em>{$time_add}</em></td>
\t\t\t\t<td>{$reason}</td>
\t\t\t\t<td><strong>{$admin}</strong></td>
\t\t\t</tr>
EOD;
            echo $data;
        }
        $no_data = false;
    } else {
        $no_data = true;
Ejemplo n.º 7
0
            $time_add = $data['time_add'];
            $reason = tableClean($data['reason']);
            $client_id = $data['target_id'];
            $client_name = tableClean($data['target_name']);
            $admin_id = $data['admin_id'];
            $admin_name = tableClean($data['admins_name']);
            ## Tidt data to make more human friendly
            if ($time_expire != '-1') {
                $duration_read = time_duration($duration * 60);
            } else {
                $duration_read = '';
            }
            $time_add_read = date($tformat, $time_add);
            $reason_read = removeColorCode($reason);
            $client_link = clientLink($client_name, $client_id);
            $admin_link = clientLink($admin_name, $admin_id);
            ## Row color
            $alter = alter();
            // setup heredoc (table data)
            $data = <<<EOD
\t\t\t<tr class="{$alter}">
\t\t\t\t<td><strong>{$client_link}</strong></td>
\t\t\t\t<td>{$time_add_read}</td>
\t\t\t\t<td>{$reason_read}</td>
\t\t\t\t<td><strong>{$admin_link}</strong></td>
\t\t\t</tr>
EOD;
            echo $data;
        }
    } else {
        $no_data = true;
Ejemplo n.º 8
0
	<tbody>
	<?php 
    if ($num_rows > 0) {
        // query contains stuff
        foreach ($data_set as $info) {
            // get data from query and loop
            $cid = $info['id'];
            $name = $info['name'];
            $level = $info['level'];
            $connections = $info['connections'];
            $time_edit = $info['time_edit'];
            ## Change to human readable
            $time_diff = time_duration($time - $time_edit, 'yMwd');
            $time_edit = date($tformat, $time_edit);
            // this must be after the time_diff
            $client_link = clientLink($name, $cid);
            $alter = alter();
            // setup heredoc (table data)
            $data = <<<EOD
\t\t\t<tr class="{$alter}">
\t\t\t\t<td><strong>{$client_link}</strong></td>
\t\t\t\t<td>@{$cid}</td>
\t\t\t\t<td>{$level}</td>
\t\t\t\t<td>{$connections}</td>
\t\t\t\t<td><em>{$time_edit}</em></td>
\t\t\t\t<td><em>{$time_diff}</em></td>
\t\t\t</tr>
EOD;
            echo $data;
        }
        $no_data = false;
Ejemplo n.º 9
0
            // query contains stuff
            foreach ($data_set as $data) {
                // get data from query and loop
                $time_add = $data['time_add'];
                $reason = tableClean($data['reason']);
                $client_id = $data['target_id'];
                $client_name = tableClean($data['target_name']);
                ## Tidt data to make more human friendly
                if ($time_expire != '-1') {
                    $duration_read = time_duration($duration * 60);
                } else {
                    $duration_read = '';
                }
                $time_add_read = date($tformat, $time_add);
                $reason_read = removeColorCode($reason);
                $client_link = clientLink($client_name, $client_id);
                ## Row color
                $alter = alter();
                // setup heredoc (table data)
                $data = <<<EOD
\t\t\t<tr class="{$alter}">
\t\t\t\t<td><strong>{$client_link}</strong></td>
\t\t\t\t<td>{$time_add_read}</td>
\t\t\t\t<td>{$reason_read}</td>
\t\t\t</tr>
EOD;
                echo $data;
            }
        } else {
            $no_data = true;
            echo '<tr class="odd"><td colspan="4">There are no bot kicks in the database</td></tr>';