Пример #1
0
function pageController()
{
    $data = array();
    if (isset($_GET['action']) && isset($_GET['counter'])) {
        $data['value'] = click();
    } else {
        $data['value'] = 0;
    }
    return $data;
}
Пример #2
0
function pageController()
{
    $data = array();
    if (Input::has('action') && Input::has('hits')) {
        $data['value'] = click();
        $data['action'] = Input::get('action');
    } else {
        $data['value'] = 0;
        $data['action'] = "New Game";
    }
    $data['hitOrMiss'] = hitOrMiss();
    return $data;
}
Пример #3
0
    }
}
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Home8</title>
	</head>
	<body>
		<div>
			<p>Send form: <?php 
echo click();
?>
</p>
		</div>
		<form method="post">
			<div>
				<label>Name</label>
				<input type="text" name="name">
				<input type="hidden" name="click" value="<?php 
echo click();
?>
"
			</div>
			<div>
				<input type="submit" >
			</div>
		</form>
	</body>
</html>
Пример #4
0
<?php

php;
if ($n > 1) {
    ?>
    <div class="page">
        <a <?php 
    click(0, $_GET['page'], 'green');
    ?>
 href="index.php">1</a>
        <?php 
    $i = 1;
    while ($i++ < $n) {
        ?>
            <a <?php 
        click($i, $_GET['page'], 'green');
        ?>
 href="index.php?page=<?php 
        echo $i;
        ?>
"><?php 
        echo $i;
        ?>
</a>
        <?php 
    }
    ?>
    </div>
<?php 
}
Пример #5
0
    </div>
  <center>
</div>
<div class="container">
<center>
    <input type="text" name="inputText" class="form-control" style="width: 200px;display: inline-block;">
      <input type="submit" name="SubmitButton" class="btn btn-success">
   
    <br>
 
    <?php 
if (isset($_POST['SubmitButton'])) {
    //check if form was submitted
    $input = $_POST['inputText'];
    //get input text
    click($input);
}
function click($name)
{
    $url = 'https://beam.pro/api/v1/channels/' . $name;
    $obj = json_decode(@file_get_contents($url), true);
    if ($obj == "") {
        echo '<h1><font color="#FFFFFF"<i class="icon icon-beam"> Beam Channel does not exist</font></h1>';
        return;
    }
    echo "<center><img src='https://beam.pro/api/v1/users/" . $obj['user']['id'] . "/avatar' width='100px' height='100px' style='border:3px solid #fff'>";
    echo "<h1>" . $obj['user']['username'] . '</h1><h3>';
    echo "<b>Followers: </b>" . number_format($obj['numFollowers']);
    echo "<br><b>Experience: </b>" . $obj['user']['experience'];
    echo "<br><b>Sparks: </b>" . $obj['user']['sparks'];
    echo "<br><b>Channel id: </b>" . $obj['user']['id'];
Пример #6
0
<?php

php;
?>
<div class="page">
    Выводить статьи: <br>
    <a <?php 
click(3, $_SESSION['num'], 'black');
?>
 href="?num=3"> по 3</a>
    <a <?php 
click(5, $_SESSION['num'], 'black');
?>
 href="?num=5"> по 5</a>
    <a <?php 
click(10, $_SESSION['num'], 'black');
?>
 href="?num=10"> по 10</a>
</div>