The following files exists in this folder. Click to view.
test.php84 lines ASCII Unix (LF) 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
<?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>