Esempio n. 1
0
    ?>
</span>
	
	<table class="user-table">
		<caption><img src="images/cd-page-icon.png" width="32" height="32" alt="" /><?php 
    echo $display;
    ?>
<small>Everything Echelon knows about <?php 
    echo $display;
    ?>
</small></caption>
		<tbody>
			<tr>
				<th>Name</th>
					<td><?php 
    echo tableClean($username);
    ?>
</td>
				<th>Display Name</th>
					<td><?php 
    echo $display;
    ?>
</td>
			</tr>
			<tr>
				<th>Email</th>
					<td><?php 
    echo emailLink($email, $display);
    ?>
</td>
				<th>IP Address</th>
Esempio n. 2
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
    }
}
Esempio n. 3
0
		<th colspan="7"></th>
	</tr>
</tfoot>
<tbody>
<?php 
    if ($num_rows > 0) {
        // query contains stuff
        foreach ($data_set as $pen) {
            // get data from query and loop
            $ban_id = $pen['ban_id'];
            $type = $pen['type'];
            $time_add = $pen['time_add'];
            $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;
            }
Esempio n. 4
0
 if ($num_rows > 0) {
     // query contains stuff
     foreach ($data_set as $data) {
         // get data from query and loop
         $type = $data['type'];
         $time_add = $data['time_add'];
         $time_expire = $data['time_expire'];
         $reason = tableClean($data['reason']);
         $pen_data = tableClean($data['data']);
         $duration = $data['duration'];
         $client_id = $data['client_id'];
         $client_name = tableClean($data['client_name']);
         if ($type_admin) {
             // only admin type needs these lines
             $admin_id = $data['admins_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_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;
Esempio n. 5
0
				<td><?php 
echo $connections;
?>
</td>
		</tr>
		<tr>
			<th>GUID</th>
				<td>
				<?php 
echo guidLink($mem, $config['game']['game'], $guid);
?>
				</td>
			<th>IP Address</th>
				<td>
					<?php 
$ip = tableClean($ip);
if ($mem->reqLevel('view_ip')) {
    if ($ip != "") {
        ?>
							<a href="clients.php?s=<?php 
        echo $ip;
        ?>
&amp;t=ip" title="Search for other users with this IP adreess"><?php 
        echo $ip;
        ?>
</a>
								&nbsp;&nbsp;
							<a href="http://whois.domaintools.com/<?php 
        echo $ip;
        ?>
" title="Whois IP Search"><img src="images/id_card.png" width="16" height="16" alt="W" /></a>
Esempio n. 6
0
	</thead>
	<tfoot>
		<tr>
			<th colspan="5">Click client name to see details</th>
		</tr>
	</tfoot>
	<tbody>
	<?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>
Esempio n. 7
0
	</thead>
	<tfoot>
		<tr>
			<th colspan="4"></th>
		</tr>
	</tfoot>
	<tbody>
	<?php 
        if ($num_rows > 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>
Esempio n. 8
0
// bind in the client_id for the query
$stmt->execute();
// run query
$stmt->store_result();
// store the result - needed for the num_rows check
if ($stmt->num_rows) {
    // if results exist
    $stmt->bind_result($pid, $type, $time_add, $time_expire, $reason, $data, $inactive, $duration, $admin_id, $admin_name);
    while ($stmt->fetch()) {
        // fetcht the results and store in an array
        // Change into readable times
        $time_add = date($tformat, $time_add);
        $time_expire_read = timeExpire($time_expire, $type, $inactive);
        $reason = tableClean(removeColorCode($reason));
        $data = tableClean($data);
        $admin_name = tableClean($admin_name);
        if ($type_inc != 'Kick' && $type_inc != 'Notice' && $time_expire != '-1') {
            $duration = time_duration($duration * 60, 'yMwdhm');
        } else {
            $duration = '';
        }
        // Row odd/even colouring
        $alter = alter();
        if ($admin_id != 1) {
            // if admin is not B3 show clientdetails link else show just the name
            $admin_link = '<a href="clientdetails.php?id=' . $admin_id . '" title="View the admin\'s client page">' . $admin_name . '</a>';
        } else {
            $admin_link = $admin_name;
        }
        if ($mem->reqLevel('unban')) {
            // if user has access to unban show unban button
Esempio n. 9
0
            $stmt->bind_result($name);
            echo '<ol>';
            while ($stmt->fetch()) {
                echo '<li onClick="fill(\'' . tableClean($name) . '\');">' . $name . '</li>';
            }
            echo '</ol>';
        } else {
            // if nothing try even more flexible query
            $query_3 = "SELECT name FROM clients WHERE SUBSTRING(SOUNDEX(name),2) = SUBSTRING(SOUNDEX('%%%" . $string . "%%%'),2) ORDER BY name LIMIT 10";
            $stmt = $db->mysql->prepare($query_3);
            $stmt->execute();
            $stmt->store_result();
            if ($stmt->num_rows) {
                // if something return data
                $stmt->bind_result($name);
                echo '<ol>';
                while ($result = $query_3->fetch_object()) {
                    echo '<li onClick="fill(\'' . tableClean($name) . '\');">' . $name . '</li>';
                }
                echo '</ol>';
            } else {
                // if nothing try even more flexible query
                echo '<ol><li>There are no matches to your search</li></ol>';
            }
            // show error if nothing gotten overal
        }
        // end if two returned nothing!
    }
    // end if query one returned nothing !
    echo '<ol><li>There was nothing in the search box</li></ol>';
}
Esempio n. 10
0
					<th>Time</th>
				</tr>
			</thead>
			<tfoot>
				<tr><td colspan="4"></td></tr>
			</tfoot>
	
		<?php 
        // nested while loop for content
        if ($num_rows_[$i] > 0) {
            foreach ($records[$i] as $record) {
                //there are still rows in results
                $id = $record['id'];
                $time = date($tformat, $record['msg_time']);
                $type = tableClean($record['msg_type']);
                $msg = tableClean($record['msg']);
                ## Highlight Commands ##
                if (substr($msg, 0, 1) == '!' or substr($msg, 0, 1) == '@') {
                    $msg = '<span class="chat-cmd">' . $msg . "</span>";
                }
                ## Row color
                $alter = alter();
                ## preapre heredoc
                $data = <<<EOD
\t\t\t\t\t<tr class="{$alter}">
\t\t\t\t\t\t<td>{$id}</td>
\t\t\t\t\t\t<td>{$type}</td>
\t\t\t\t\t\t<td>{$msg}</td>
\t\t\t\t\t\t<td><em>{$time}</em></td>
\t\t\t\t\t</tr>
EOD;