コード例 #1
0
ファイル: login.php プロジェクト: Vovaks/coin
<?php

include_once "classes/Session.php";
if (!empty($_POST['login']) && !empty($_POST['password'])) {
    Session::login($_POST['login'], $_POST['password']);
    if (empty($_SESSION['apiKey'])) {
        Session::getNetwork(Session::BITCOINTESTNET);
    }
}
if (Session::isLoggedIn() && isset($_GET['logout'])) {
    Session::logOut();
}
?>

<?php 
if (!Session::isLoggedIn()) {
    ?>
   <form class= "form-inline" method="POST" action="main.php">
<div align="center">
        <div class="form-group">
            <label>Email</label>
            <input type="email" class="form-control" id="email" placeholder="*****@*****.**" name="login">
        </div>
        <div class="form-group">
            <label>Password</label>
            <input type="password" class="form-control" id="password" placeholder="53543770Samsung" name="password">
        </div>
        <button type="submit" class="btn btn-default">Enter</button>
        </div>
    </form>
コード例 #2
0
ファイル: main.php プロジェクト: Vovaks/coin
<?php

/*
Autor:  Vladimir Rjabkov
Date: 05.11.2015
Time: 10:40
*/
require_once 'classes/Handler.php';
include_once 'classes/Session.php';
if (isset($_POST['btn_sendBT'])) {
    //Send BT
    header('Location: sendBT.php');
}
if (isset($_POST['coin'])) {
    Session::getNetwork($_POST['coin']);
}
?>

<!DOCTYPE html>

<head>
    <meta http-equiv="Content-Type" content="text/css; charset=UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>TEST_BlockIO</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
    <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</head>

<body>