View sourcecode

The following files exists in this folder. Click to view.

test.php

84 lines ASCII Unix (LF)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
    session_start
();
    
date_default_timezone_set('CET');
    require_once(
'databaseconnection.php');
    include(
'functions.php');
?>
<!DOCTYPE html>
<html lang="sv">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>LBMLadders</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB" crossorigin="anonymous">
</head>
<body>
    <?php
    $startdate 
strtotime("now");
    print(
$startdate);
    
$u date("Y-m-d H:i:s"$startdate);
    print(
$u);
    echo 
"<br>";
    echo 
"<br>";
    
$date date("Y-m-d H:i:s");
    print(
$date);
    echo 
"<br>";
    
$sek strtotime($date);
    print(
$sek);
    echo 
"<br>";
    echo 
"<br>";
        
    
$s 0;
    
$i 0;
    
$h 0;
    
$d 0;
    
$m 0;
    
$y 0;
    echo 
"<br>";

    
$raisetime strtotime("+".$y." years +".$m." months +".$d." days +".$h." hours +".$i." minutes +".$s." seconds"$startdate);
    print(
$raisetime);
    print(
date("Y-m-d H:i:s"$raisetime));
    echo 
"<br>";

    
$timeleft $raisetime $startdate;
    print(
$timeleft);
    echo 
"<br>";
    echo 
sectotime($timeleft);

    
/*$sql = "SELECT ladderId FROM players WHERE userId = :userId;";
                $stm = $pdo->prepare($sql);
                $stm->execute(array('userId' => $_SESSION['userId']));
                $res = $stm->fetchAll(PDO::FETCH_ASSOC);
                foreach($res as $a){
                    $sql = "SELECT * FROM ladders WHERE ladderId = :ladderId;";
                    $stm = $pdo->prepare($sql);
                    $stm->execute(array('ladderId' => $a['ladderId']));
                    $res = $stm->fetch(PDO::FETCH_ASSOC);
                    $i[] = $res;
                }

    echo "<pre>";
    print_r($i);
    echo "</pre>";*/
/*
    $playerId = 8;

    $sql = "SELECT userId FROM players WHERE playerId = :playerId;";
    $stm = $pdo->prepare($sql);
    $stm->execute(array('playerId' => $playerId));
    $res = $stm->fetch(PDO::FETCH_ASSOC);

    $sql = "SELECT username FROM users WHERE userId = :userId;";
    $stm = $pdo->prepare($sql);
    $stm->execute(array('userId' => $res['userId']));
    $res = $stm->fetch(PDO::FETCH_ASSOC);

    echo $res['username'];

    echo getplayername($playerId);*/

    
print(playerpoints(18));
    
    
?>
</body>