Exemplo n.º 1
0
    $display = $_POST['display'];
    updateRace($idRace, $display);
    header("Location:.?do=displayAdmin");
}
if ($do == "createRace") {
    $raceName = $_POST['raceName'];
    $idRace = $_POST['idRace'];
    $place = $_POST['place'];
    $date = $_POST['Date'];
    $display = $_POST['display'];
    write_races($idRace, $raceName, $place, $date, $display);
    header("Location:.?do=displayAdmin");
}
if ($do == "changePermissions") {
    $idUser = $_POST['IdUser'];
    $role = $_POST['Role'];
    updatePermission($idUser, $role);
    header("Location:.?do=displayUsersListPage");
}
if ($do == "addResults") {
    $idRace = $_POST['IdRace'];
    $idRunner = $_POST['IdRunner'];
    $position = $_POST['Position'];
    $time = $_POST['Time'];
    updateRaceResult($idRace, $idRunner, $position, $time);
    header("Location:.?do=displayAdmin");
}
if ($do == "displayUsersListPage") {
    $users = read_users();
    include "./view/displayUsersListAdmin.php";
}
Exemplo n.º 2
0
				<div class="logoContainer">
					<!-- <img src="logo-bar.png"> -->
				</div>
				
				<div class="button">
					<p><a href ="http://birdonwheels5.no-ip.org">Back to Block Explorer</a></p>
				</div>
				
			</header>

	
	<?php 
// Determine if the user loading the page has been here before.
$ip = $_SERVER['REMOTE_ADDR'];
$user_array = array();
$user_array = read_users();
$avg = 24;
$average_string = "(24 hr average)";
// Declare variables
$diff = array();
$diff = get_avg_diffs($avg);
$sha_diff = number_format($diff[0], 2, '.', '');
$scrypt_diff = number_format($diff[1], 2, '.', '');
$skein_diff = number_format($diff[2], 2, '.', '');
$groestl_diff = number_format($diff[3], 2, '.', '');
$qubit_diff = number_format($diff[4], 2, '.', '');
$sha_hashrate = "";
$scrypt_hashrate = "";
$skein_hashrate = "";
$groestl_hashrate = "";
$qubit_hashrate = "";
Exemplo n.º 3
0
	<body style="background-color:#f4f4f4;float:left;background-color:white">
	
	<?php 
// These values are used to compute coins/day for all algos.
// Measured in MH/s and are estimates of 1 Scrypt MH/s
//$sha_hashrate = 1; // This one gets multiplied by 1000 later so we can use GH/s instead of MH/s
//$scrypt_hashrate = 1;
//$skein_hashrate = 280;
//$groestl_hashrate = 15;
//$qubit_hashrate = 7;
// Determine if the user loading the page has been here before.
$ip = $_SERVER['REMOTE_ADDR'];
$filename = "ip_data.dat";
$separator = "qpwoeiruty";
$users = array();
$users = read_users("ip_data.dat");
$user_position_in_array = search_ip_address($filename, $users, $ip);
if ($user_position_in_array >= 0) {
    $sha_hashrate = $users[$user_position_in_array]->get_sha_hashrate();
    $scrypt_hashrate = $users[$user_position_in_array]->get_scrypt_hashrate();
    $skein_hashrate = $users[$user_position_in_array]->get_skein_hashrate();
    $groestl_hashrate = $users[$user_position_in_array]->get_groestl_hashrate();
    $qubit_hashrate = $users[$user_position_in_array]->get_qubit_hashrate();
    // -----------------------
    if ($sha_hashrate == 1) {
        $sha_input = "";
    } else {
        $sha_input = $sha_hashrate;
    }
    if ($scrypt_hashrate == 1) {
        $scrypt_input = "";
Exemplo n.º 4
0
<?php

require_once "../includes/session.php";
require_once "../includes/db_connection.php";
require_once "../includes/functions.php";
include "../includes/layouts/header.php";
confirm_access();
confirm_admin();
read_users();
?>

    <!-- [page main] -->
  <section class="main container-fluid">
    <?php 
echo message();
?>
    <div class="panel panel-default center-block">
      <div class="panel-heading">
        <h1 class="panel-title text-center">Current Users</h1>
      </div>
      <div class="panel-body">
        <div class="table-responsive">
          <table class="table table-condensed">
            <thead>
              <tr>
                <th><p>Name</p></th>
                <th><p>Email</p></th>
                <th><p>Created</p></th>
                <th colspan="3"><p>Action</p></th>
              </tr>
            </thead>
Exemplo n.º 5
0
<?php

include "userManager.php";
$filename = "ip_data.dat";
$users = array();
$users = read_users($filename);
print "There are " . count_users($filename) . " unique users who visited the block explorer. \n <br/>";
print "They are: \n <br/>";
display_ip_addresses($filename, $users);
print " \n \n <br/><br/>";
print "And here are the details of each: \n \n <br/> <br/>";
display_ip_info($filename, $users);
Exemplo n.º 6
0
        $message['color'] = 'red';
    }
}
$dir_val = scandir(ROOT_DIR . './theme/');
array_shift($dir_val);
array_shift($dir_val);
$ver = json_decode(get_url('http://wot-news.com/ajax/clanstat', $config), TRUE);
// Config
$config = update_array($config, get_config());
// Scaning /tabs/ directory
$tabs_dir = read_tabs_dir();
// Checking if all files in db
$tabs_check = check_tabs_db($tabs_dir);
// Reading current db
$current_tab = read_tabs();
$current_user = read_users();
/**Мультиклан считываем**/
$multiclan = read_multiclan();
$multiclan_main = multi_main($multiclan);
foreach ($multiclan as $clan) {
    $multiclan_info[$clan['id']] = $cache->get('get_last_roster_' . $clan['id'], 0);
    /*if($multiclan_info[$clan['id']] === FALSE) {
          $multiclan_info[$clan['id']] = get_api_roster($clan['id'],$config);
      }
      if(empty($multiclan_info)){
          $multiclan_info[$clan['id']]['status'] = 'error';
          $multiclan_info[$clan['id']]['status'] = 'ERROR';
      }
      if($multiclan_info[$clan['id']]['status'] == 'ok' &&  $multiclan_info[$clan['id']]['status_code'] == 'NO_ERROR'){
          $cache->clear('get_last_roster_'.$clan['id']);
          $cache->set('get_last_roster_'.$clan['id'], $multiclan_info[$clan['id']]);