Beispiel #1
0
    public function returnClientForm($cid)
    {
        if (empty($cid)) {
            return NULL;
        }
        global $mem;
        // use the member class instance from outside this class
        if ($mem->reqLevel('edit_xlrstats')) {
            $xlr_token = genFormToken('xlrstats');
            if ($this->xlr_hide == 1) {
                $hide = 'checked="checked"';
            }
            $data = '<div id="cd-act-xlrstats" class="act-slide">
				<form action="lib/plugins/' . __CLASS__ . '/actions.php" method="post">
				
					<label for="xlr-name">Fixed Name:</label>
						<input type="text" name="fixed-name" value="' . $this->xlr_fixed_name . '" id="xlr-name" /><br />
					
					<label for="xlr-hid">Hide Stats:</label>
						<input type="checkbox" name="hidden" id="xlr-hid" ' . $hide . ' />
						
					<div class="xlr"></div>
					
					<input type="hidden" name="cid" value="' . $cid . '" />
					<input type="hidden" name="token" value="' . $xlr_token . '" />
					<input type="submit" name="xlrstats-sub" value="Save Changes" />
				</form>
			</div>';
            return $data;
        } else {
            return NULL;
        }
    }
Beispiel #2
0
	public function view()
	{
		if ($this->isValidating()) return $this->validate(RT_JSON);
		if ($this->isPosting()) return $this->processPost();		
		session_start();
		
		$v = $this->smarty;
		$v->assign('title', 'Contact Us');
		$v->assign('inc_content', v('contact_us.html'));
		$v->assign('ftoken', genFormToken('ftoken_contact_us'));
		$this->display($v, v('index.html'));
	}
$page = "settings-game";
$page_title = "Games Settings";
$auth_name = 'manage_settings';
require 'inc.php';
if ($no_games && $_GET['t'] != 'add') {
    send('settings-games.php?t=add');
}
if ($_GET['t'] == 'add') {
    // if add game type page
    $is_add = true;
    $add_game_token = genFormToken('addgame');
} else {
    // if edit current game settings
    $is_add = false;
    // We are using the game information that was pulled in setup.php
    $game_token = genFormToken('gamesettings');
    if ($_GET['w'] == 'game') {
        set_warning('You have changed game/DB since the last page!');
    }
}
require 'inc/header.php';
if ($is_add) {
    ?>

	<a href="settings-games.php" class="float-left">&laquo; Go Back</a>
	<br />

	<form action="actions/settings-game.php" method="post">

	<fieldset>
		<legend>Add a New Game</legend>
Beispiel #4
0
	</tbody>
</table>

<fieldset>
	<legend>Add to Blacklist</legend>
	<form action="actions/blacklist.php" method="post" id="add-bl-form">
		<div class="left-side" style="width: auto;">
			<label for="bl-reason">Reason:</label>
				<textarea rows="6" cols="18" name="reason" id="bl-reason" class="clr-txt">Enter a reason for this ban...</textarea>
		</div>
		<div class="left-side">
			<label for="bl-ip" class="ip-label">IP Address:</label>
				<input type="text" name="ip" id="bl-ip" /><br />
				
			<?php 
    $bl_token = genFormToken('addbl');
    ?>
			<input type="hidden" name="token" value="<?php 
    echo $bl_token;
    ?>
" />
				
			<input id="add-user-step-2" type="submit" value="Ban IP Address" />
		</div>
	</form>
</fieldset>

<?php 
}
// end if on what kind of page this is
require 'inc/footer.php';
Beispiel #5
0
<?php

$page = "settings";
$page_title = "Settings";
$auth_name = 'manage_settings';
$b3_conn = true;
require 'inc.php';
// get a list of main Echelon settings from the config table
$settings = $dbl->getSettings('cosmos');
$token_settings = genFormToken('settings');
require 'inc/header.php';
?>

<fieldset>
	<legend>Echelon Settings</legend>
	
	<form action="actions/settings.php" method="post" id="settings-f">
	
		<fieldset class="none">
			<legend>General Echelon Settings</legend>
			
			<label for="name">Site Name:</label><?php 
tooltip('The name of your site (eg your clanname)');
?>
				<input type="text" name="name" value="<?php 
echo $settings['name'];
?>
">

			<label for="email">Echelon Admin Email:</label><?php 
tooltip('Email for the admin of this site');
     ## row color
     $alter = alter();
     ## Make it human readable
     if ($pb_active == 1) {
         $pb_active_read = '<span class="on">Yes</span>';
     } else {
         $pb_active_read = '<span class="off">No</span>';
     }
     $ip_read = ipLink($ip);
     // set a warning that the active game has changed since the last page?
     if ($game != $game_id) {
         $warn = 'game';
     } else {
         $warn = '';
     }
     $del_token = genFormToken('del-server' . $id);
     $table = <<<EOD
t<tr class="{$alter}">
t\t<td>{$id}</td>
t\t<td><strong><a href="settings-server.php?t=srv&amp;id={$id}">{$name}</a></strong></td>
t\t<td>{$ip_read}</td>
t\t<td>{$pb_active_read}</td>
t\t<td><a href="settings-games.php?game={$game_id}&amp;w={$warn}" title="Edit the settings for {$game_name}">{$game_name}</a></td>
t\t<td>
t\t\t<a href="settings-server.php?t=srv&amp;id={$id}"><img src="images/edit.png" alt="[E]" /></a>
t\t\t<form style="display: inline;" method="post" action="actions/settings-server.php?t=del&amp;id={$id}">
t\t\t\t<input type="hidden" name="token" value="{$del_token}" />
t\t\t\t<input class="harddel" type="image" title="Delete this Server" src="images/delete.png" alt="[D]" />
t\t\t</form>
t\t</td>
t</tr>
Beispiel #7
0
/**
 * Spits out the unban/remove penalty button
 *
 * @param string $pen_id - id of the penalty to remove
 * @param string $cid - client_id of the client the penalty is against
 * @param string $type - the type of penalty it is
 * @param string $inactive - whether the penalty is active or not
 * @return string
 */
function unbanButton($pen_id, $cid, $type, $inactive)
{
    $token = genFormToken('unban' . $pen_id);
    // gen form token with appened penalty id in order to make all the tokens unique
    // if pen is a tempban, ban or warning and it is still active then show unban
    if (($type == 'TempBan' || $type == 'Ban' || $type == 'Warning') && $inactive == 0) {
        return '<form method="post" action="actions/b3/unban.php" class="unban-form">
			<input type="hidden" name="token" value="' . $token . '" />
			<input type="hidden" name="cid" value="' . $cid . '" />
			<input type="hidden" name="banid" value="' . $pen_id . '" />
			<input type="hidden" name="type" value="' . $type . '" />
			<input type="image" value="Unban" name="unban-sub" src="images/delete.png" title="De-Activate / Unban" />
		</form>';
    } else {
        return null;
    }
}
Beispiel #8
0
    exit;
    // no need to continue with this page
} else {
    // else if not logged in and not a login request
    $page = "login";
    $page_title = "Login";
    require 'inc/header.php';
    ?>
<fieldset id="login-field">
	<legend>Login</legend>

	<form id="login-form" action="login.php" method="post">

		<?php 
    echo trys();
    $token = genFormToken('login');
    ?>

		 <label for="f-name">Username:</label>
			<input type="text" name="f-name" id="f-name" tabindex="1" /><br />

		 <label for="f-pw">Password:</label>
			<input type="password" name="f-pw" id="f-pw" tabindex="2" />
		
		<?php 
    if ($num_games != 0) {
        ?>
		
		<label for="f-game">Game:</label>
			<select name="f-game" id="f-game" tabindex="3">
				<?php 
	<tbody>
	<?php 
    // notice on the query we say that time_add does not equal time_edit, this is because of bug in alias recording in B3 that has now been solved
    $query = "SELECT ip, num_used, time_add, time_edit FROM ipaliases WHERE client_id = ? ORDER BY time_edit DESC";
    $stmt = $db->mysql->prepare($query) or die('IP Alias Database Query Error' . $db->mysql->error);
    $stmt->bind_param('i', $cid);
    $stmt->execute();
    $stmt->bind_result($ip, $num_used, $time_add, $time_edit);
    $stmt->store_result();
    // needed for the $stmt->num_rows call
    if ($stmt->num_rows) {
        while ($stmt->fetch()) {
            $time_add = date($tformat, $time_add);
            $time_edit = date($tformat, $time_edit);
            $alter = alter();
            $token_del = genFormToken('del' . $id);
            // setup heredoc (table data)
            $data = <<<EOD
\t\t\t\t<tr class="{$alter}">
\t\t\t\t\t<td><a href="clients.php?s={$ip}"><strong>{$ip}</strong></a></td>
\t\t\t\t\t<td>{$num_used}</td>
\t\t\t\t\t<td><em>{$time_add}</em></td>
\t\t\t\t\t<td><em>{$time_edit}</em></td>
\t\t\t\t</tr>
EOD;
            echo $data;
        }
    } else {
        // if there are no aliases connected with this user then put out a small and short message
        echo '<tr><td colspan="4">' . $name . ' has no other IP\'s.</td></tr>';
    }
Beispiel #10
0
	<fieldset id="edit-ban">
		<legend>Edit this Ban</legend>
		
		<?php 
if ($num_rows > 0) {
    $reason_read = cleanvar(removeColorCode($reason));
    $name = cleanvar($name);
    $time_add_read = date($tformat, $time_add);
    $time_expire_read = timeExpirePen($time_expire);
    if ($duration != 0) {
        $duration_read = time_duration($duration * 60, 'yMwdhm');
    } else {
        $duration_read = 'Permanent';
    }
    $token_eb = genFormToken('editban');
    ?>
		
		<fieldset class="none eb-fs">
			<legend>Information about the ban</legend>
			<table class="cd-table">
				<tbody>
					<tr>
						<th>Client Name</th>
						<td><?php 
    echo $name;
    ?>
</td>

						<th>Time Add</th>
						<td><?php